Methods Summary |
---|
public org.hibernate.sql.CaseFragment | createCaseFragment()
// Oracle did add support for ANSI CASE statements in 9i
return new ANSICaseFragment();
|
public java.lang.String | getCurrentTimestampSQLFunctionName()
// the standard SQL function name is current_timestamp...
return "current_timestamp";
|
public java.lang.String | getCurrentTimestampSelectString()
return "select systimestamp from dual";
|
public java.lang.String | getLimitString(java.lang.String sql, boolean hasOffset)
sql = sql.trim();
boolean isForUpdate = false;
if ( sql.toLowerCase().endsWith(" for update") ) {
sql = sql.substring( 0, sql.length()-11 );
isForUpdate = true;
}
StringBuffer pagingSelect = new StringBuffer( sql.length()+100 );
if (hasOffset) {
pagingSelect.append("select * from ( select row_.*, rownum rownum_ from ( ");
}
else {
pagingSelect.append("select * from ( ");
}
pagingSelect.append(sql);
if (hasOffset) {
pagingSelect.append(" ) row_ where rownum <= ?) where rownum_ > ?");
}
else {
pagingSelect.append(" ) where rownum <= ?");
}
if ( isForUpdate ) {
pagingSelect.append( " for update" );
}
return pagingSelect.toString();
|
public java.lang.String | getSelectClauseNullString(int sqlType)
return getBasicSelectClauseNullString( sqlType );
|
protected void | registerCharacterTypeMappings()
registerColumnType( Types.CHAR, "char(1 char)" );
registerColumnType( Types.VARCHAR, 4000, "varchar2($l char)" );
registerColumnType( Types.VARCHAR, "long" );
|
protected void | registerDateTimeTypeMappings()
registerColumnType( Types.DATE, "date" );
registerColumnType( Types.TIME, "date" );
registerColumnType( Types.TIMESTAMP, "timestamp" );
|