Overview | Package | Class | Tree | Deprecated | Index | Help
| Oracle Application Development Framework Model and Business Components Java API Reference 10g Release 3 (10.1.3) B16005-01
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## oracle.jbo.server.ejb.facade
Class EntityFacadeImpl

`java.lang.Object
oracle.jbo.server.RowImpl
oracle.jbo.server.EntityImpl
oracle.jbo.server.ejb.facade.EntityFacadeImpl`

All Implemented Interfaces:
  AttributeList, DomainOwnerInterface, Entity, java.util.EventListener, Row, TransactionListener, oracle.jbo.server.TransactionManager, TransactionPostListener, ValidationListener, ValidationManager, 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
`DML_DELETE, DML_INSERT, DML_UPDATE, MAXATTRCONST, ORACLE_ROWID_COLUMN, 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
`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`

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, create, createAssociationAccessorRS, createAssociationAccessorVO, createEntityViewLinkAccessorRS, createEntityViewLinkAccessorVO, doDMLForCascadeUpdate, doDMLWithLOBs, domainToBeModified, donePostingAll, doRefreshSQL, findAssociationAccessorVO, findEntityViewLinkAccessorVO, getAttribute, getAttribute, getAttributeChangedCount, getAttributeCount, getAttributeIndexOf, getAttributeNames, getAttributeValue, getAttributeValues, getAttrInvokeAccessor, getChangeIndicator, getContainerEntity, getDBTransaction, getDynamicAttributeCount, getDynamicAttributeValue, getEntityCache, getEntityDef, getEntityState, getHistoryContextForAttribute, getKey, getPKBasedRef, getPostedAttribute, getPostState, getPrimaryKey, getRefreshSQLKeyAttrs, getSQLBuilder, getStateAsString, getStructureDef, getTransactionListeners, getTransactionListenersList, getTransPostHandle, getValidationListeners, getValidationListenersList, handleActivatedRowNotFound, handlePostChangesError, hasAttributeException, hasUpdatePrivilege, initData, isAttributeChanged, isAttributeChangedInTransaction, isAttributePopulated, isDead, isInCache, isInvalid, isLocked, isPostedToDB, isTransientTransactionListener, isTransientTransactionPostListener, isValid, lock, lockTopLevelEntity, notifyAttributesChanged, notifyAttributesChanged, notifyEntityActivated, populateAttribute, populateAttribute, populateAttribute, populateAttributeAsChanged, postChanges, prepareForBatchDML, prepareForDML, readAttrsFromXML, readXML, refresh, refreshFKInNewContainees, registerAttributeException, remove, removeAndRetain, removeFromCollection, removeTransactionPostListener, resetPKBasedRef, revert, setAttribute, setAttributeChanged, setAttributeInternal, setAttrInvokeAccessor, setDynamicAttributeValue, setInvalid, setLocked, setNewRowState, setPostedToDB, setTransPostHandle, toString, validate, validateEntity, vetoRemoveWithDetails`

Methods inherited from class oracle.jbo.server.RowImpl
`clearAllExceptions, clearAttributeException, clearRowExceptions, createXMLDefinition, findAttrAndGetIndex, getAllExceptions, getAttributeInternal, getRowExceptions, hasAttributeException, hasDeferredExceptions, printXMLDefinition, readXML, registerRowException, setAttributeInternal, 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.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.

Overview | Package | Class | Tree | Deprecated | Index | Help
| Oracle Application Development Framework Model and Business Components Java API Reference 10g Release 3 (10.1.3) B16005-01
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

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