Methods Summary |
---|
public org.hibernate.sql.CaseFragment | createCaseFragment()
return new DecodeCaseFragment();
|
public org.hibernate.sql.JoinFragment | createOuterJoinFragment()
return new OracleJoinFragment();
|
public java.lang.String | getCurrentTimestampSQLFunctionName()
return "sysdate";
|
public java.lang.String | getCurrentTimestampSelectString()
return "select sysdate 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_ <= ? and rownum_ > ?");
}
else {
pagingSelect.append(" ) where rownum <= ?");
}
if ( isForUpdate ) {
pagingSelect.append( " for update" );
}
return pagingSelect.toString();
|
public java.lang.String | getSelectClauseNullString(int sqlType)
switch(sqlType) {
case Types.VARCHAR:
case Types.CHAR:
return "to_char(null)";
case Types.DATE:
case Types.TIMESTAMP:
case Types.TIME:
return "to_date(null)";
default:
return "to_number(null)";
}
|