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

E10653-04

oracle.jbo.server.ejb.facade
Class EntityFacadeImpl

java.lang.Object
  extended by oracle.jbo.server.RowImpl
      extended by oracle.jbo.server.EntityImpl
          extended by oracle.jbo.server.ejb.facade.EntityFacadeImpl
All Implemented Interfaces:
java.util.EventListener, AttributeList, DomainOwnerInterface, JIReservedVarNames, ExprValueSupplier, JboReservedVarNames, Row, Entity, TransactionListener, TransactionPostListener, ValidationListener, ValidationManager, VariableManagerOwnerBase, XMLInterface

public abstract class EntityFacadeImpl
extends EntityImpl

Abstract base class for Entity Facade. This class extends EntityImpl. Beyond the base EntityImpl functionality, this class is responsible for interacting with the Local Entity Bean instance.

When the user builds an Entity Facade for an Entity Bean, a subclass of this class is generated.


Field Summary
protected  javax.ejb.EJBLocalObject mEJBLocalObject
           
 
Fields inherited from class oracle.jbo.server.EntityImpl
CURRENT_VERSION, DML_DELETE, DML_INSERT, DML_UPDATE, MAXATTRCONST, mOrigData, ORACLE_ROWID_COLUMN, ORIGINAL_VERSION, 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
EntityFacadeImpl()
          Constructs an Entity Facade.
 
Method Summary
protected  void doDML(int operation, TransactionEvent e)
          Overrides the base implementation of doDML(int, oracle.jbo.server.TransactionEvent).
protected  void doSelect(boolean lock)
          Overrides the base implementation of doSelect(boolean).
 java.lang.Object getAttributeInternal(int index)
          Overrides the base implementation of getAttributeInternal(int) to make it public.
protected  javax.ejb.EJBLocalObject getEJBLocalObject()
          Returns the Local Entity Bean reference.
 boolean isAttributeUpdateable(int index)
          Checks if the attribute is updateable.
protected abstract  void mergeBeanAttributes()
           
protected abstract  void populateFromBean()
          An abstract method responsible for populating Entity Facade attributes with the corresponding attribute values from the Entity Bean.
 void setAttribute(int index, java.lang.Object val)
          Sets the value of an attribute, given its index position.
protected  void setEJBLocalObject(javax.ejb.EJBLocalObject ejbObject)
          Sets the Local Entity Bean reference.
abstract  void updateBean(javax.ejb.EJBLocalObject ejbObject)
          An abstract method responsible for updating the Entity Bean with attribute values from this Entity Facade.
 
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, findAssociationAccessorVO, findEntityViewLinkAccessorVO, findOrCreateLocalViewObject, findOrCreateViewAccessorRS, findOrCreateViewAccessorRS, findViewAccessorDef, findViewAccessorVO, getAltKey, getAttribute, getAttribute, getAttribute, getAttributeChangedCount, getAttributeCount, getAttributeHints, getAttributeHints, getAttributeIndexOf, getAttributeNames, getAttributeValue, getAttributeValues, getAttrInvokeAccessor, getBaseAttributeCount, getChangeIndicator, getComparator, getContainerEntity, getDBTransaction, getDynamicAttributeCount, getDynamicAttributeValue, getEffDtInitEndDateValue, getEffectiveDate, getEntityCache, getEntityCacheInternal, getEntityDef, getEntityState, getHistoryContextForAttribute, getKey, getListBindingRSI, getListBindings, 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, isDead, isInCache, isInvalid, isLocked, isOrigDataEmpty, isOrigDataPopulated, isPostedToDB, isTransientTransactionListener, isTransientTransactionPostListener, isValid, isViewAccessorAttribute, lock, lockTopLevelEntity, markViewAccessorsDirty, notifyAttributesAndBlgChanged, notifyAttributesChanged, notifyAttributesChanged, notifyEntityActivated, 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, 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, getHints, getMessageBundleClass, getMethodKind, getResourceBundleDef, getRowExceptions, getSecurityHints, getVariableManager, 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
 

Field Detail

mEJBLocalObject

protected javax.ejb.EJBLocalObject mEJBLocalObject
Constructor Detail

EntityFacadeImpl

public EntityFacadeImpl()
Constructs an Entity Facade.

Method Detail

mergeBeanAttributes

protected abstract void mergeBeanAttributes()
                                     throws java.lang.Exception
Throws:
java.lang.Exception

getEJBLocalObject

protected javax.ejb.EJBLocalObject getEJBLocalObject()
Returns the Local Entity Bean reference.

Returns:
the Local Entity Bean.

setEJBLocalObject

protected void setEJBLocalObject(javax.ejb.EJBLocalObject ejbObject)
Sets the Local Entity Bean reference.

Parameters:
ejbObject - the Local Entity Bean.

isAttributeUpdateable

public boolean isAttributeUpdateable(int index)
Description copied from class: EntityImpl
Checks if the attribute is updateable. This method finds the attribute, given its index, then examines its updateable status which can be READ_ONLY, UPDATEABLE_WHILE_NEW, or UPDATEABLE.

This method can be overridden. For example, override this method if you want to check the updateable status and you have dependencies between two or more attributes.

Specified by:
isAttributeUpdateable in interface Row
Overrides:
isAttributeUpdateable in class EntityImpl
Parameters:
index - the attribute's index (0-based).
Returns:
false if the attribute is READ_ONLY; true if attribute is UPDATEABLE or if the attribute is UPDATEABLE_WHILE_NEW and the current row is new.

setAttribute

public void setAttribute(int index,
                         java.lang.Object val)
Description copied from class: EntityImpl
Sets the value of an attribute, given its index position.

If there is a set method for this attribute in a subclass of this Entity Object, that method is invoked. The set method name is derived from the attribute name: for example, the method getDeptNo() pertains to an attribute named "Deptno".

This method should not be overridden; override setAttributeInternal instead.

Specified by:
setAttribute in interface AttributeList
Overrides:
setAttribute in class EntityImpl
Parameters:
index - the index of the attribute.
val - the value to be assigned to the attribute. The class of the returned value a Java type determined by this Entity Object's definition object.

doSelect

protected void doSelect(boolean lock)
Overrides the base implementation of doSelect(boolean).

It populates Entity Facade attributes with the corresponding attribute values from the Entity Bean by calling the abstract method populateFromBean().

Overrides:
doSelect in class EntityImpl
Parameters:
lock - a flag indicating whether the Entity Facade is being 'selected' for update (with a lock) or not. This flag is currently unsed by EntityFacadeImpl.

populateFromBean

protected abstract void populateFromBean()
                                  throws java.lang.Exception
An abstract method responsible for populating Entity Facade attributes with the corresponding attribute values from the Entity Bean.

A subclass of this class has an implementation of this method which performs this operation specific to that subclass.

Throws:
java.lang.Exception - if something goes wrong while retrieving attribute values from the Entity Bean or while setting attibute values into this Entity Facade. Note that it may throw an EJB exception.

updateBean

public abstract void updateBean(javax.ejb.EJBLocalObject ejbObject)
                         throws java.lang.Exception
An abstract method responsible for updating the Entity Bean with attribute values from this Entity Facade.

A subclass of this class has an implementation of this method which performs this operation specific to that subclass.

Parameters:
ejbObject - the Local Entity Bean.
Throws:
java.lang.Exception - if something goes wrong while retrieving attribute values from this Entity Facade or while setting attibute values into the Entity Bean. Note that it may throw an EJB exception.

doDML

protected void doDML(int operation,
                     TransactionEvent e)
Overrides the base implementation of doDML(int, oracle.jbo.server.TransactionEvent).

It performs data update operation, syncing the Entity Facade with the corresponding Local Entity Bean instance. If this Entity Facade is a new one, it will create a new Local Entity Bean instance. If this Facade was removed (deleted), it will remove the Entity Bean instance. If this Facade was updated, it will update the Entity Bean with the new attribute values.

Overrides:
doDML in class EntityImpl
Parameters:
operation - identifies the data update operation to perform.
e - describes the transaction event.

getAttributeInternal

public java.lang.Object getAttributeInternal(int index)
Overrides the base implementation of getAttributeInternal(int) to make it public.

Overrides:
getAttributeInternal in class EntityImpl
Parameters:
index - the attribute index.
Returns:
the attribute value.

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

E10653-04

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