Skip navigation links

Oracle Fusion Middleware Java API Reference for Oracle ADF Model
11g Release 1 (11.1.1.5.0)

E10653-06


oracle.jbo.server
Class DSEntityImpl

java.lang.Object
  extended by oracle.jbo.server.RowImpl
      extended by oracle.jbo.server.EntityImpl
          extended by oracle.jbo.server.DSEntityImpl

All Implemented Interfaces:
java.util.EventListener, AttributeList, DomainOwnerInterface, JIReservedVarNames, ExprScriptSupplier, ExprValueSupplier, ExprWrappable, JboReservedVarNames, Row, Entity, TransactionListener, TransactionPostListener, ValidationListener, ValidationManager, VariableManagerOwnerBase, XMLInterface

public class DSEntityImpl
extends EntityImpl
Since:
release specific (what release of product did this appear in)

Field Summary

 

Fields inherited from class oracle.jbo.server.EntityImpl
CURRENT_VERSION, DML_DELETE, DML_INSERT, DML_UPDATE, MAXATTRCONST, mOrigData, ORACLE_ROWID_COLUMN, ORIGINAL_VERSION, PROPERTY_LOOKUP_ATTR_NAME, PROPERTY_LOOKUP_DISPATTR, PROPERTY_LOOKUP_TYPE, SYS_EFFDT_ROW_SPLIT, XML_CI_CHANGED, XML_PK_CHANGED, XML_PK_CHANGED_YES

 

Fields inherited from interface oracle.jbo.server.Entity
STATUS_DEAD, STATUS_DELETED, STATUS_MODIFIED, STATUS_UNMODIFIED

 

Fields inherited from interface oracle.jbo.Row
EFFDT_DELETE_FUTURE_CHANGE_MODE, EFFDT_DELETE_MODE, EFFDT_DELETE_NEXT_CHANGE_MODE, EFFDT_DELETE_THIS_CHANGE_MODE, EFFDT_DELETE_ZAP_MODE, EFFDT_EXPERT_MODE, EFFDT_NONE_MODE, EFFDT_UPDATE_CHANGE_INSERT_MODE, EFFDT_UPDATE_CORRECTION, EFFDT_UPDATE_MODE, EFFDT_UPDATE_NEW_EARLIEST_CHANGE_MODE, EFFDT_UPDATE_OVERRIDE_MODE, REFRESH_CONTAINEES, REFRESH_FORGET_NEW_ROWS, REFRESH_REMOVE_NEW_ROWS, REFRESH_UNDO_CHANGES, REFRESH_WITH_DB_FORGET_CHANGES, REFRESH_WITH_DB_ONLY_IF_UNCHANGED, STATUS_INITIALIZED, STATUS_NEW

 

Fields inherited from interface oracle.jbo.XMLInterface
XML_IGNORE_DEPTH_COUNT, XML_OPT_ALL_ROWS, XML_OPT_ASSOC_CONSISTENT, XML_OPT_CHANGES_ONLY, XML_OPT_LIMIT_RANGE, XML_PASSIVATION_USE

 

Fields inherited from interface oracle.jbo.JboReservedVarNames
RESERVED_VAR_AGG_AVG, RESERVED_VAR_AGG_COUNT, RESERVED_VAR_AGG_MAX, RESERVED_VAR_AGG_MIN, RESERVED_VAR_AGG_SUM, RESERVED_VAR_AGGVAL_PREFIX, RESERVED_VAR_STRUCTURE_DEF

 

Fields inherited from interface oracle.jbo.expr.JIReservedVarNames
RESERVED_VAR_VALUE

 

Constructor Summary
DSEntityImpl()
          default constructor

 

Method Summary
protected  void doDML(int operation, TransactionEvent e)
          Performs INSERT/UPDATE/DELETE processing for the row.
protected  void doSelect(boolean lock)
          Advanced: Most applications should not use this method.

 

Methods inherited from class oracle.jbo.server.EntityImpl
addToTransactionManager, addToValidationListeners, addTransactionPostListener, addTransactionPostListenerNoCheck, afterCommit, afterRemove, afterRollback, appendXMLElementNodes, appendXMLElementNodesForAttrs, beforeCommit, beforeRollback, bindDMLStatement, bindWhereClause, buildDMLStatement, buildRefreshSQL, buildWhereClause, checkConsistency, clearAttributeException, compare, copyChangedNonKeyAttributes, copyEffDtEntity, create, createAssociationAccessorRS, createAssociationAccessorVO, createEntityAttrHints, createEntityViewLinkAccessorRS, createEntityViewLinkAccessorVO, createUnqualifiedRowSet, createViewAccessorRS, createViewAccessorRS, doAllowsOperation, doDMLForCascadeUpdate, doDMLWithLOBs, domainToBeModified, donePostingAll, doRefreshSQL, doSelectForAltKey, eventsDebugOnly, fetchExprValueSupplierOverrideRow, findAssociationAccessorVO, findEntityViewLinkAccessorVO, findOrCreateLocalViewObject, findOrCreateViewAccessorRS, findOrCreateViewAccessorRS, findViewAccessorDef, findViewAccessorVO, getAltKey, getAttribute, getAttribute, getAttribute, getAttributeChangedCount, getAttributeCount, getAttributeHints, getAttributeHints, getAttributeIndexOf, getAttributeInternal, getAttributeNames, getAttributeValue, getAttributeValues, getAttrInvokeAccessor, getBaseAttributeCount, getChangeIndicator, getComparator, getContainerEntity, getDBTransaction, getDynamicAttributeCount, getDynamicAttributeValue, getEffDtInitEndDateValue, getEffectiveDate, getEntityCache, getEntityCacheInternal, getEntityDef, getEntityState, getHistoryContextForAttribute, getKey, getListBindingRSI, getListBindings, getLookupDescription, getOrigData, getParentVariableManager, getPKBasedRef, getPostedAttribute, getPostState, getPrimaryKey, getRefreshSQLKeyAttrs, getSQLBuilder, getStateAsString, getStructureDef, getTransactionListeners, getTransactionListenersList, getTransPostHandle, getValidationListeners, getValidationListenersList, handleActivatedRowNotFound, handleEffectiveDateOperations, handleEffectiveDateRowCreate, handleEffectiveDateRowDelete, handleEffectiveDateRowUpdate, handleListBindingMismatch, handlePostChangesError, hasAttributeException, hasListBindings, hasUpdatePrivilege, initBusLogicGroupDefaults, initBusLogicGroupDfltExprAttrs, initData, initDefaultExpressionAttributes, initDefaults, initialize, isAttributeChanged, isAttributeChanged, isAttributeChangedInTransaction, isAttributePopulated, isAttributePopulated, isAttributeUpdateable, isDead, isInCache, isInvalid, isLocked, isLookupIdValid, isOrigDataEmpty, isOrigDataPopulated, isPostedToDB, isTransientTransactionListener, isTransientTransactionPostListener, isValid, isViewAccessorAttribute, lock, lockTopLevelEntity, markViewAccessorsDirty, notifyAttributesAndBlgChanged, notifyAttributesChanged, notifyAttributesChanged, notifyEntityActivated, notifyEventRaised, outputEventString, populateAttribute, populateAttribute, populateAttribute, populateAttributeAsChanged, postChanges, prepareForBatchDML, prepareForDML, prepareVOToFetchNextEffDtRows, prepareVOToFetchNextEffDtRows, prepareVOToFetchNextEffDtSeqRows, prepareVOToFetchNextEffDtSeqRows, prepareVOToFetchPrevEffDtRows, prepareVOToFetchPrevEffDtRows, prepareVOToFetchPrevEffDtSeqRows, prepareVOToFetchPrevEffDtSeqRows, readAttrsFromXML, readXML, refresh, refreshFKInNewContainees, registerAttributeException, remove, removeAndRetain, removeFromCollection, removeTransactionPostListener, resetPKBasedRef, revert, revertChangesToEffDtEntity, setAttribute, setAttribute, setAttributeChanged, setAttributeInternal, setAttributeValues, setAttrInvokeAccessor, setDynamicAttributeValue, setEffectiveDateMode, setEntityDef, setInvalid, setLocked, setNewRowState, setPostedToDB, setTransPostHandle, toString, validate, validateDateEffectivity, validateEntity, variablesAdded, vetoRemoveWithDetails

 

Methods inherited from class oracle.jbo.server.RowImpl
addListBindingsForAttribute, clearAllExceptions, clearAttributeException, clearRowExceptions, createXMLDefinition, doAutoClearAttribute, ensureVariableManager, findAttrAndGetIndex, findListBindingName, forceFilterListExecute, getAllExceptions, getAttributeInternal, getAttributeSecurityHints, getAttributeSecurityHints, getCombinedAttrNames, getEffectiveDateMode, getExprMethodVal, getExprVarVal, getGlobalScript, getHints, getMessageBundleClass, getMethodKind, getResourceBundleDef, getRowExceptions, getSecurityHints, getVariableManager, getViewAccessorResultIndex, hasAttributeException, hasDeferredExceptions, hasVariables, isRefreshRequired, isRefreshRequired, isRefreshRequired, lookupListBinding, printXMLDefinition, readXML, refreshViewAccessor, refreshViewAccessor, refreshViewAccessor, registerRowException, setAttributeInternal, setExprVarVal, setInMultiSetter, skipFilterListOnKeyAttributes, writeXML, writeXML, writeXML, writeXML

 

Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

 

Methods inherited from interface oracle.jbo.Row
getAttributeSecurityHints, getAttributeSecurityHints, getEffectiveDateMode, getSecurityHints

 

Methods inherited from interface oracle.jbo.XMLInterface
readXML, writeXML, writeXML, writeXML, writeXML

 

Constructor Detail

DSEntityImpl

public DSEntityImpl()
default constructor

Method Detail

doDML

protected void doDML(int operation,
                     TransactionEvent e)
Description copied from class: EntityImpl
Performs INSERT/UPDATE/DELETE processing for the row. Override this method to provide custom logic for processing inserts, updates, and deletes. Note, do not set any of this Entity's attributes in this method if this entity needs to work alike in both batch and non-batchmode cases. Perform all setAttributes that needs to done in postChanges() phase in prepareForDML().

This method calls buildDMLStatement() to build the DML string based on the DML operation to be performed. For insert and update, the DML statement will only set the values that have been modified/changed. Other attributes do not participate in the DML.

Next, bindDMLStatement() is called to bind the DML statement with values to be updated and any other where-clause and returning parameters. After this, it executes the jdbc-statement or adds the current DML as a batch operation into a batched jdbc-statement, to be executed in Transaction.postChanges().

Here is sample code for overriding the doDML() method of any Entity Object's EntityImpl class to invoke a stored procedure, and pass arguments. For example, given a PL/SQL stored procedure like:

 PROCEDURE updateDepartment( p_Deptno NUMBER,
                             p_Dname  VARCHAR2,
                             p_Loc    VARCHAR2 )
 

The code to call it when an Entity is updated would look like this: Note: The following code assumes only updates are possible, disallowing inserts and deletes by ignoring them in the doDML() method.

    public void doDML(int operation, TransactionEvent e) {
       // Don't call the superclass. This procedure handles only updates
       //super.doDML(operation, e);
       CallableStatement stmt = null;
       // ONLY Perform updates, this Entity won't allow inserts/deletes.
       if (operation == DML_UPDATE)
       {
         // Prepare JDBC CallableStatement with the Stored Procedure Call
         String updateStr = "{call updateDepartment(?,?,?)}";
         stmt = getDBTransaction().createCallableStatement(updateStr, 1);
         try
         {
            // Bind the Statement Parameters and Execute this Statement
            stmt.setString(1, getDeptno().toString());
            stmt.setString(2, getDname().toString());
            stmt.setString(3, getLoc().toString());
            stmt.execute();
          }
          catch (Exception ex)
          {
            throw new oracle.jbo.JboException(ex);
          }
          finally
          {
             try
             {
                stmt.close();
             }
             catch (Exception nex)
             {
          }
        }
      }
    }
 
Overrides:
doDML in class EntityImpl
Parameters:
operation - the integer representation of DML_INSERT, DML_UPDATE, or DML_DELETE.
e - this Entity Object's transaction event.

doSelect

protected void doSelect(boolean lock)
Description copied from class: EntityImpl
Advanced: Most applications should not use this method.

Performs SELECT/SELECT FOR UPDATE processing for the row. This method faults-in all column-values from the database object for this Entity Object.

This method can be overridden, for example, if you want to fill in the Entity Object values yourself.

Overrides:
doSelect in class EntityImpl
Parameters:
lock - true generates a "SELECT for UPDATE"

Skip navigation links

Oracle Fusion Middleware Java API Reference for Oracle ADF Model
11g Release 1 (11.1.1.5.0)

E10653-06


Copyright © 1997, 2011, Oracle. All rights reserved.