Class OracleBeanSession

  extended by org.mentabean.jdbc.AnsiSQLBeanSession
      extended by org.mentabean.jdbc.OracleBeanSession
All Implemented Interfaces:

public class OracleBeanSession
extends AnsiSQLBeanSession

When using limit, Oracle will NOT sort first before limiting, so a trick must be used. Now in Oracle is 'sysdate'. Oracle only supports sequences for primary keys.


Nested Class Summary
Nested classes/interfaces inherited from class org.mentabean.jdbc.AnsiSQLBeanSession
AnsiSQLBeanSession.QueryAndValues, AnsiSQLBeanSession.Value
Field Summary
Fields inherited from class org.mentabean.jdbc.AnsiSQLBeanSession
beanManager, conn, DEBUG, DEBUG_NATIVE, dispatcher, loaded
Fields inherited from interface org.mentabean.BeanSession
Constructor Summary
OracleBeanSession(BeanManager beanManager, Connection conn)
Method Summary
protected  String getCurrentTimestampCommand()
          Get the command representing 'now' in this database.
protected  StringBuilder handleLimit(StringBuilder sb, OrderBy orderBy, Limit limit)
          Oracle will not SORT first then apply LIMIT.
 void insert(Object bean)
          Insert the bean in the database.
Methods inherited from class org.mentabean.jdbc.AnsiSQLBeanSession
addTrigger, bindToInsertStatement, buildQuery, buildSelect, buildSelect, buildSelect, buildSelect, buildSelectImpl, buildSelectMinus, buildSelectMinus, buildTableName, countList, createBasicInstance, createPKConstraintQuery, createTable, createTableAlias, createTableAlias, createTables, debugNativeSql, debugSql, delete, dispatchAfterDelete, dispatchAfterInsert, dispatchAfterUpdate, dispatchBeforeDelete, dispatchBeforeInsert, dispatchBeforeUpdate, dispatchTrigger, dropTable, getConfigFor, getConnection, getDatabaseType, getProperties, getPropertyBean, getValueFromBean, getValueFromBean, injectValue, isSet, isVarcharUnlimitedSupported, load, load, loadImpl, loadList, loadList, loadList, loadList, loadList, loadList, loadList, loadList, loadListMinus, loadListMinus, loadListMinus, loadListMinus, loadMinus, loadUnique, loadUnique, loadUniqueImpl, loadUniqueMinus, populateBean, populateBean, populateBean, populateBean, populateBeanImpl, populateBeanMinus, populateBeanMinus, prepareInsertQuery, propertyToColumn, propertyToColumn, propertyToColumn, removeTrigger, save, save, saveAll, update, updateAll
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail


public OracleBeanSession(BeanManager beanManager,
                         Connection conn)
Method Detail


protected String getCurrentTimestampCommand()
Description copied from class: AnsiSQLBeanSession
Get the command representing 'now' in this database. This base implementation returns null, in other words, no now command will be used.

getCurrentTimestampCommand in class AnsiSQLBeanSession
the command for now in this database (now(), sysdate, etc)


protected StringBuilder handleLimit(StringBuilder sb,
                                    OrderBy orderBy,
                                    Limit limit)
Oracle will not SORT first then apply LIMIT.

handleLimit in class AnsiSQLBeanSession
A string builder with the the SQL modified for the limit operation


public void insert(Object bean)
Description copied from interface: BeanSession
Insert the bean in the database. Depending on the type of PK, the generation of the PK can and should be taken care by the DB itself. The generated PK should be inserted in the bean by reflection, before the method returns. The default, database-independent implementation of this method, insert all fields in the database not worrying about PK generation strategies.

Specified by:
insert in interface BeanSession
insert in class AnsiSQLBeanSession
bean - The bean to insert

Copyright © 2013. All Rights Reserved.