oracle.jheadstart.model.bc4j
Class RuleFrameTransImpl

java.lang.Object
  extended byoracle.jbo.server.DBTransactionImpl
      extended byoracle.jbo.server.DBTransactionImpl2
          extended byoracle.jheadstart.model.bc4j.JhsDBTransactionImpl
              extended byoracle.jheadstart.model.bc4j.RuleFrameTransImpl
All Implemented Interfaces:
Bc4jDBTransaction, oracle.jbo.server.DBTransaction, JhsConstants, MessageConstants, oracle.jbo.pcoll.PCollManagerHelper, oracle.jbo.Transaction, oracle.jbo.server.TransactionManager, oracle.jbo.server.ValidationManager

public class RuleFrameTransImpl
extends JhsDBTransactionImpl
implements MessageConstants


Field Summary
 
Fields inherited from class oracle.jbo.server.DBTransactionImpl
MAX_CURSORS_UNINITIALIZED, mConnectionCredentials, mInternalCredentials, mSQLBuilder, mTxnListeners, POST_ABORT_ON_FIRST_EXCEPTION, POST_ALL_NO_RESET_ON_EXCEPTION, POST_ALL_RESET_ON_EXCEPTION
 
Fields inherited from interface oracle.jheadstart.JhsConstants
ACCESS_DENIED, ACTION, CHANGES_TO_COMMIT, CHECK_LOGIN, CONTROLLER, DATA_OBJECT, DATA_OBJECT_NOT_FOUND, DATA_OBJECT_SET, DEBUG_MARLIN_PAGE, DELETE, DELETE_ROW, DISCLOSED, ERROR, ERROR_MESSAGE, EXPAND_TREE, FAILURE, FIRST, GROUP_ACCESS_DATA_OBJECT, HANDLER, HAS_CHANGES, INFO_TABLE, INFORMATION, INFOS_TO_REMOVE, INSERT, INTEGER, IS_INSERTING, IS_NOT_INSERTING, IS_NOT_UPDATING, IS_NOT_VIEWING, IS_UPDATING, IS_VIEWING, JHEADSTART, JHEADSTART_NAMESPACE, JHS_MESSAGE_STACK, JHS_USER, JHS_USER_ERROR, JHS_USER_INFORMATION, LAST, LIST, LOCALE_OBJECT, LOGGED_IN, LOGIN_PAGE, MAP, MESSAGE_RESOURCES, MESSAGESTACK, MULTIPART_REQUEST_HANDLER, NEW_LOGIN, NEW_SESSION, NEW_USER_PAGE, NEXT, NLS, PAGE_NAME, PASSWORD, PREVIOUS, REQUEST_CONTEXT_PATH, REQUEST_SERVLET_PATH, ROWNUM, SAVE_NEW_USER, SERVLET_REQUEST, SESSION_DATA, SIZE, STACK_TRACE, START_ACTION, START_ACTION_PATH, SUCCESS, TREE_ACTION, TREE_INFO, TREE_NODE_TYPE, UIX_INCLUDES, UIX_RESULT_TYPE, UPDATE, USER_CLASS, USER_DATA_OBJECT, USER_ERROR, USERNAME, VIEW, WARNING
 
Fields inherited from interface oracle.jheadstart.model.bc4j.Bc4jDBTransaction
VERSION
 
Fields inherited from interface oracle.jbo.server.DBTransaction
DEFAULT
 
Fields inherited from interface oracle.jbo.Transaction
LOCK_NONE, LOCK_OPTIMISTIC, LOCK_OPTUPDATE, LOCK_PESSIMISTIC
 
Constructor Summary
RuleFrameTransImpl()
           
 
Method Summary
 void commit()
           
 void doCommit()
          Checks whether there are messages on the stack, and throws exception if this is the case, otherwise call super.doCommit postChanges checks as well for messages on the stack.
protected  oracle.jbo.JboException getMessageStack(java.lang.String messageStack)
           
protected  void handleSQLError(java.sql.SQLException e)
           
 void postChanges(oracle.jbo.server.TransactionEvent te)
          Throw JboException that wraps all messages on stack.
 java.lang.String toString()
           
 
Methods inherited from class oracle.jheadstart.model.bc4j.JhsDBTransactionImpl
addMessage, addMessage, clearMessageStack, getCurrentDBDate, getExceptionStack, getMessageStack, getUser, hasMessage, rollback, setUser, throwExceptionFromMessageStack, validate
 
Methods inherited from class oracle.jbo.server.DBTransactionImpl2
connect, connect, connect, connect, connectToDataSource, connectToDataSource, connectToDataSource, connectToDataSource, connectToDataSource, connectToDataSource, createCallableStatement, createEntityInstance, createEntityInstance, createPreparedStatement, createRef, createStatement, createViewObjectFromQueryClauses, createViewObjectFromQueryStmt, disconnect, findByPrimaryKey, findByPrimaryKey, getCurrentDbTime, reconnect, reconnect
 
Methods inherited from class oracle.jbo.server.DBTransactionImpl
addToValidationListeners, addTransactionListener, addTransactionListenerNoCheck, addTransactionPostListener, addTransactionPostListenerNoCheck, addTransactionStateListener, addViewClearCacheListener, addWarning, applyChangeSet, checkConnected, clearEntityCache, closeTransaction, commitAndSaveChangeSet, createApplicationModule, createApplicationModule, createViewLink, createViewLinkBetweenViewObjects, createViewLinkFromEntityAssocName, createViewObject, disconnect, doRollback, dumpEntityCaches, dumpQueryResult, executeCommand, findApplicationModule, findEntityCache, getBatchPostExceptionThreshold, getConnectionMetadata, getJdbcConnection, getLockingMode, getPersistManagerConnection, getPostChangesFlag, getPostThreshold, getRootApplicationModule, getSession, getSQLBuilder, getSyncLock, getTransactionHandler, getTransactionState, getTxnApplicationModuleImpl, getValidationThreshold, isBundledExceptionMode, isClearCacheOnCommit, isClearCacheOnRollback, isConnected, isConnected, isDirty, isLockOptimistic, isTrackNewAndModifiedRowsOnly, postChanges, removeChangeSet, removeTransactionListener, removeTransactionPostListener, removeTransactionStateListener, removeViewClearCacheListener, setBatchModeForEntity, setBatchPostExceptionThreshold, setBundledExceptionMode, setClearCacheOnCommit, setClearCacheOnRollback, setLockingMode, setPostChangesFlag, setPostThreshold, setTrackNewAndModifiedRowsOnly, setTransactionHandler, setValidationThreshold, showCursorUsage
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface oracle.jbo.server.DBTransaction
addTransactionListener, addTransactionListenerNoCheck, addTransactionPostListener, addTransactionPostListenerNoCheck, addWarning, closeTransaction, connect, connectToDataSource, connectToDataSource, createApplicationModule, createApplicationModule, createCallableStatement, createEntityInstance, createEntityInstance, createPreparedStatement, createStatement, createViewLink, createViewLinkBetweenViewObjects, createViewLinkFromEntityAssocName, createViewObject, createViewObjectFromQueryClauses, createViewObjectFromQueryStmt, disconnect, findApplicationModule, findByPrimaryKey, findByPrimaryKey, getBatchPostExceptionThreshold, getPostThreshold, getRootApplicationModule, getSession, getSQLBuilder, getTransactionHandler, getValidationThreshold, isConnected, isLockOptimistic, isTrackNewAndModifiedRowsOnly, reconnect, removeTransactionListener, removeTransactionPostListener, setBatchPostExceptionThreshold, setPostThreshold, setTrackNewAndModifiedRowsOnly, setTransactionHandler, setValidationThreshold
 
Methods inherited from interface oracle.jbo.Transaction
addTransactionStateListener, addViewClearCacheListener, applyChangeSet, clearEntityCache, commitAndSaveChangeSet, connect, connect, connect, connectToDataSource, connectToDataSource, connectToDataSource, connectToDataSource, createRef, disconnect, dumpQueryResult, executeCommand, getConnectionMetadata, getLockingMode, isBundledExceptionMode, isClearCacheOnCommit, isClearCacheOnRollback, isConnected, isDirty, postChanges, reconnect, removeChangeSet, removeTransactionStateListener, removeViewClearCacheListener, setBundledExceptionMode, setClearCacheOnCommit, setClearCacheOnRollback, setLockingMode
 
Methods inherited from interface oracle.jbo.server.ValidationManager
addToValidationListeners
 

Constructor Detail

RuleFrameTransImpl

public RuleFrameTransImpl()
Method Detail

postChanges

public void postChanges(oracle.jbo.server.TransactionEvent te)
Description copied from class: JhsDBTransactionImpl
Throw JboException that wraps all messages on stack. If no messages available, call super.postChanges

Overrides:
postChanges in class JhsDBTransactionImpl

doCommit

public void doCommit()
Description copied from class: JhsDBTransactionImpl
Checks whether there are messages on the stack, and throws exception if this is the case, otherwise call super.doCommit postChanges checks as well for messages on the stack. That's because we want to show the errors before posting the changes to the database because we could get unhandled database errors when we try to set a required column to Null. Now, if postChanges already checks the message stack, why do we have to do it here again? That's because there are situations where postChanges is not called but doCommit is. This happens when BC4J thinks there are no changes to post. This happens when a setAttribute method fails in the update method. We trap this failure, and add a message to the stack. However, if this was the only attribute that was updated by the user, bc4j sees no changes and does not call postChanges.

Overrides:
doCommit in class JhsDBTransactionImpl
See Also:
DBTransactionImpl.doCommit()

commit

public void commit()
Specified by:
commit in interface oracle.jbo.Transaction
Overrides:
commit in class JhsDBTransactionImpl

toString

public java.lang.String toString()
Overrides:
toString in class JhsDBTransactionImpl

handleSQLError

protected void handleSQLError(java.sql.SQLException e)
                       throws oracle.jbo.JboException
Throws:
oracle.jbo.JboException

getMessageStack

protected oracle.jbo.JboException getMessageStack(java.lang.String messageStack)