Best code examples for Hibernate ORM NoArgSQLFunction class (org.hibernate.dialect.function.NoArgSQLFunction)

These code examples were ranked by Codota’s semantic indexing as the best open source examples for Hibernate ORM NoArgSQLFunction class.
You can now enable Codota on your own code to easily search and navigate your Java codebase.

Hibernate ORM NoArgSQLFunction examples from Open Source projects
This code example shows how to use the following methods:
		registerFunction( "to_char", new StandardSQLFunction("to_char",StandardBasicTypes.STRING) );
		registerFunction( "to_date", new StandardSQLFunction("to_date",StandardBasicTypes.TIMESTAMP) );
		registerFunction( "sysdate", new NoArgSQLFunction("sysdate", StandardBasicTypes.TIMESTAMP, false) );
		registerFunction( "getdate", new NoArgSQLFunction("getdate", StandardBasicTypes.TIMESTAMP, false) );
		registerFunction( "nvl", new StandardSQLFunction("nvl") );
 
	} 
	 
	public boolean dropConstraints() { 
            return true; 
	} 
	 
	public boolean qualifyIndexName() { 
            return false; 
	} 
 
	public boolean supportsUnique() { 
		return false; 
	} 
     
Full Snippet Info
4
CodeRank
This code example shows how to use the following methods:
		registerFunction( "soundex", new StandardSQLFunction( "soundex" ) );
		registerFunction( "sysdate", new NoArgSQLFunction( "sysdate", StandardBasicTypes.DATE, false ) );
		registerFunction( "rowid", new NoArgSQLFunction( "rowid", StandardBasicTypes.LONG, false ) );
		registerFunction( "rownum", new NoArgSQLFunction( "rownum", StandardBasicTypes.LONG, false ) );
		registerFunction( "instr", new StandardSQLFunction( "instr", StandardBasicTypes.INTEGER ) );
		registerFunction( "lpad", new StandardSQLFunction( "lpad", StandardBasicTypes.STRING ) );
		registerFunction( "replace", new StandardSQLFunction( "replace", StandardBasicTypes.STRING ) );
		registerFunction( "rpad", new StandardSQLFunction( "rpad", StandardBasicTypes.STRING ) );
		registerFunction( "translate", new StandardSQLFunction( "translate", StandardBasicTypes.STRING ) );
		registerFunction( "substring", new StandardSQLFunction( "substr", StandardBasicTypes.STRING ) );
		registerFunction( "coalesce", new NvlFunction() );
		registerFunction( "atan2", new StandardSQLFunction( "atan2", StandardBasicTypes.FLOAT ) );
		registerFunction( "mod", new StandardSQLFunction( "mod", StandardBasicTypes.INTEGER ) );
		registerFunction( "nvl", new StandardSQLFunction( "nvl" ) );
		registerFunction( "nvl2", new StandardSQLFunction( "nvl2" ) );
		registerFunction( "power", new StandardSQLFunction( "power", StandardBasicTypes.FLOAT ) );
		registerFunction( "add_months", new StandardSQLFunction( "add_months", StandardBasicTypes.DATE ) );
		registerFunction( "months_between", new StandardSQLFunction( "months_between", StandardBasicTypes.FLOAT ) );
		registerFunction( "next_day", new StandardSQLFunction( "next_day", StandardBasicTypes.DATE ) );
	} 
Full Snippet Info
4
CodeRank
This code example shows how to use the following methods:
		registerFunction("current_timestamp", new NoArgSQLFunction("current_timestamp", StandardBasicTypes.TIMESTAMP, false));
		registerFunction("current_date", new NoArgSQLFunction("current_date", StandardBasicTypes.DATE, false));
	} 
 
	/** 
	 * Register column types date, time, timestamp 
	 */ 
	protected void registerDateTimeColumnTypes() { 
		registerColumnType(Types.DATE, "ansidate");
		registerColumnType(Types.TIMESTAMP, "timestamp(9) with time zone");
	} 
 
	// lock acquisition support ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 
 
	/** 
	 * Does this dialect support <tt>FOR UPDATE</tt> in conjunction with outer 
	 * joined rows? 
	 *  
	 * @return True if outer joined rows can be locked via <tt>FOR UPDATE</tt>. 
	 */ 
Full Snippet Info
4
CodeRank
This code example shows how to use the following methods:
		registerFunction( 
				"current_timestamp", new NoArgSQLFunction( "current_timestamp", StandardBasicTypes.TIMESTAMP, false )
		); 
	} 
} 
Full Snippet Info
4
CodeRank
This code example shows how to use the following methods:
	public boolean bindLimitParametersFirst() { 
		return false; 
	} 
 
	@Override 
	public boolean supportsVariableLimit() { 
		return true; 
	} 
 
	@Override 
	public int convertToFirstRowValue(int zeroBasedFirstResult) {
		// Our dialect paginated results aren't zero based. The first row should get the number 1 and so on 
		return zeroBasedFirstResult + 1;
	} 
 
	@Override 
	public String getLimitString(String query, int offset, int limit) {
		// We transform the query to one with an offset and limit if we have an offset and limit to bind 
		if (offset > 1 || limit > 1) return getLimitString(query, true);
		return query;
Full Snippet Info
4
CodeRank