Hibernate ORM SingleLineSqlCommandExtractor - top ranked examples from Open Source projects

These code examples were ranked by Codota’s semantic indexing as the best open source examples for Hibernate ORM SingleLineSqlCommandExtractor class.

This code example shows how to use the following methods:
 * import sql files, there are a number of value declarations that are incompatible with Sql Server. This 
 * custom extractor takes care of transforming those values into something SQL Server understands. 
 * 
 * @author Jeff Fischer 
 */ 
public class DemoSqlServerSingleLineSqlCommandExtractor extends SingleLineSqlCommandExtractor {
 
    private static final SupportLogger LOGGER = SupportLogManager.getLogger("UserOverride", DemoSqlServerSingleLineSqlCommandExtractor.class);
 
    private static final String BOOLEANTRUEMATCH = "(?i)(true)";
    private static final String BOOLEANFALSEMATCH = "(?i)(false)";
    private static final String TIMESTAMPMATCH = "(?i)(current_date)";
    public static final String TRUE = "'TRUE'";
    public static final String FALSE = "'FALSE'";
    public static final String CURRENT_TIMESTAMP = "CURRENT_TIMESTAMP";
 
    protected boolean alreadyRun = false;
 
    @Override 
    public String[] extractCommands(Reader reader) {
Full Snippet Info
6
CodeRank
Contextual code suggestions in your IDE  Get Codota for Java
This code example shows how to use the following methods:
 * import sql files, there are a number of value declarations that are incompatible with Oracle. This 
 * custom extractor takes care of transforming those values into something Oracle understands. 
 * 
 * @author Jeff Fischer 
 */ 
public class DemoOracleSingleLineSqlCommandExtractor extends SingleLineSqlCommandExtractor {
 
    private static final SupportLogger LOGGER = SupportLogManager.getLogger("UserOverride", DemoOracleSingleLineSqlCommandExtractor.class);
 
    private static final String BOOLEANTRUEMATCH = "(?i)(true)";
    private static final String BOOLEANFALSEMATCH = "(?i)(false)";
    private static final String TIMESTAMPMATCH = "(?<!\\{ts\\s)('\\d{4}-\\d{2}-\\d{2}\\s\\d{2}:\\d{2}:\\d{2}')";
    public static final String TRUE = "1";
    public static final String FALSE = "0";
 
    protected boolean alreadyRun = false;
 
    @Override 
    public String[] extractCommands(Reader reader) {
        if (!alreadyRun) {
Full Snippet Info
6
CodeRank
Contextual code suggestions in your IDE  Get Codota for Java