Oracle Fusion Middleware extensions for Applications Core API Reference
11g Release 1 (11.1.1.6)

E22562-03

oracle.apps.fnd.applcore.oaext.model
Class KFFMEntityImpl

java.lang.Object
  extended by oracle.jbo.server.RowImpl
      extended by oracle.jbo.server.EntityImpl
          extended by oracle.apps.fnd.applcore.oaext.model.OAEntityImpl
              extended by oracle.apps.fnd.applcore.oaext.model.KFFMEntityImpl
All Implemented Interfaces:
java.util.EventListener, oracle.jbo.AttributeList, oracle.jbo.domain.DomainOwnerInterface, oracle.jbo.domain.ExtDomainOwnerInterface, oracle.jbo.expr.JIReservedVarNames, oracle.jbo.ExprScriptSupplier, oracle.jbo.ExprValueSupplier, oracle.jbo.ExprWrappable, oracle.jbo.JboReservedVarNames, oracle.jbo.Row, oracle.jbo.server.Entity, oracle.jbo.server.TransactionListener, oracle.jbo.server.TransactionPostListener, oracle.jbo.server.ValidationListener, oracle.jbo.server.ValidationManager, oracle.jbo.VariableManagerOwnerBase, oracle.jbo.XMLInterface

public class KFFMEntityImpl
extends OAEntityImpl

A key flexfield combination-maintenance entity. This implementation prevents the same combination to exist more than once in the code-combination table by overriding doDML method. A lock is created on the combination that is about to be inserted or updated. If the lock cannot be created because the combination already exists or the combination is already locked, an exception is thrown.


Nested Class Summary
protected static class KFFMEntityImpl.CombinationExistsException
          Thrown when the combination to be inserted or updated already exists in the combination table.
protected static class KFFMEntityImpl.CombinationLockedException
          Thrown when the combination to be inserted or updated is already locked.
 
Field Summary
 
Fields inherited from class oracle.apps.fnd.applcore.oaext.model.OAEntityImpl
DELETE, INSERT, LOCK, RCS_ID, SEED_DATA_USER, SELECT, UPDATE
 
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
KFFMEntityImpl()
           
 
Method Summary
protected  void doDML(int operation, oracle.jbo.server.TransactionEvent e)
          Routes a change operation to the #insertRow(TransactionEvent event), #updateRow(TransactionEvent event), or #deleteRow(TransactionEvent event) method.
protected  boolean isAutoCombinationLockEnabled()
          Returns true if combination locking should be attempted before the actual DML_INSERT or DML_UPDATE operations in doDML.
protected  void lockCombination(oracle.jbo.server.DBTransaction dbt)
          Creates a lock on the combination represented by this entity.
protected  void setAutoCombinationLockEnabled(boolean b)
          Sets whether combination locking should be attempted before the actual DML_INSERT or DML_UPDATE operations in doDML.
 
Methods inherited from class oracle.apps.fnd.applcore.oaext.model.OAEntityImpl
appendXMLElementNodes, bindDMLStatement, buildDMLStatement, changeSessionLanguageForTL, checkConsistency, containsFlexfields, create, deleteRow, doDMLWithLOBs, doSelect, getActivityActorsGUIDs, getActivityObjectTypeNames, getActivityStreamServiceId, getAdditionalServiceIds, getAttribute, getAttributeDef, getAttributeInternal, getBaseLanguage, getContainerEntity, getCurrentDatabaseDate, getCurrentDBDate, getCurrentDBTime, getCurrentDBTimeWithNanos, getCurrentLanguage, getCurrentSystemDate, getCurrentTLRowLangCode, getDocSequence, getDocSequenceValueWithId, getEntityDef, getFlexfieldParameterValue, getFlexfieldStructureCode, getFlexfieldStructureCode, getHistoryColumnsOfTLEntity, getHistoryContextForAttribute, getInstalledLanguages, getKeyAttributesIndexMap, getPostedAttribute, getSetId, getTranslatedAttributesIndexMap, getTranslatedEntityStaticInfo, getTranslatedEntityStaticInfo, getTranslatedLanguages, getWhoUser, handleEffectiveDateOperationsForSeedData, handlePostChangesError, insertRow, isActivityPublishingEnabled, isAttributeUpdateable, isExtensibleFlexfield, isExtensibleTranslatableFlexfield, isPlsqlEntity, isRefreshRequired, isTranslatable, isTranslatable, isTranslatable, isTranslatableAttribute, isTranslated, lock, lockRow, notifyEventRaised, parseFlexfieldDate, parseFlexfieldDateTime, parseFlexfieldNumber, parseFlexfieldTime5, parseFlexfieldTime8, populateAttributeAsChanged, populateAttributeAsChanged, postChanges, prepareForDML, readAttrsFromXML, refresh, refreshViewAccessor, remove, setAttribute, setAttributeInternal, setNewRowState, toFlexfieldString, toFlexfieldString, toFlexfieldStringDate, toFlexfieldStringDateTime, toFlexfieldStringTime5, toFlexfieldStringTime8, updateRow, validateEntity, validateFlexfieldDate, validateFlexfieldDateTime, validateFlexfieldMaxLength, validateFlexfieldMaxValue, validateFlexfieldMaxValue, validateFlexfieldMinValue, validateFlexfieldMinValue, validateFlexfieldNumber, validateFlexfieldNumber, validateFlexfieldNumericOnly, validateFlexfieldRequired, validateFlexfieldRJZFNumber, validateFlexfieldTime5, validateFlexfieldTime8, validateFlexfieldUppercase, validateFlexfieldValue
 
Methods inherited from class oracle.jbo.server.EntityImpl
addToTransactionManager, addToValidationListeners, addTransactionPostListener, addTransactionPostListenerNoCheck, afterCommit, afterRemove, afterRollback, appendXMLElementNodesForAttrs, beforeCommit, beforeRollback, bindWhereClause, buildRefreshSQL, buildWhereClause, clearAttributeException, compare, copyChangedNonKeyAttributes, copyEffDtEntity, createArray, createAssociationAccessorRS, createAssociationAccessorVO, createBlob, createClob, createEntityAttrHints, createEntityViewLinkAccessorRS, createEntityViewLinkAccessorVO, createNClob, createRef, createStruct, createUnqualifiedRowSet, createViewAccessorRS, createViewAccessorRS, doAllowsOperation, doDMLForCascadeUpdate, domainToBeModified, donePostingAll, doRefreshSQL, doSelectForAltKey, eventsDebugOnly, fetchExprValueSupplierOverrideRow, findAssociationAccessorVO, findEntityViewLinkAccessorVO, findOrCreateLocalViewObject, findOrCreateViewAccessorRS, findOrCreateViewAccessorRS, findViewAccessorDef, findViewAccessorVO, getAltKey, getAttribute, getAttribute, getAttribute, getAttributeChangedCount, getAttributeCount, getAttributeHints, getAttributeHints, getAttributeIndexOf, getAttributeNames, getAttributeValue, getAttributeValues, getAttrInvokeAccessor, getBaseAttributeCount, getChangeIndicator, getComparator, getDBTransaction, getDynamicAttributeCount, getDynamicAttributeValue, getEffDtInitEndDateValue, getEffectiveDate, getEntityCache, getEntityCacheInternal, getEntityState, getKey, getListBindingRSI, getListBindings, getLookupDescription, getOrigData, getParentVariableManager, getPKBasedRef, getPostState, getPrimaryKey, getRefreshSQLKeyAttrs, getSQLBuilder, getStateAsString, getStructureDef, getTransactionListeners, getTransactionListenersList, getTransPostHandle, getValidationListeners, getValidationListenersList, handleActivatedRowNotFound, handleEffectiveDateOperations, handleEffectiveDateRowCreate, handleEffectiveDateRowDelete, handleEffectiveDateRowUpdate, handleListBindingMismatch, hasAttributeException, hasListBindings, hasUpdatePrivilege, initBusLogicGroupDefaults, initBusLogicGroupDfltExprAttrs, initData, initDefaultExpressionAttributes, initDefaults, initialize, isAttributeChanged, isAttributeChanged, isAttributeChangedInTransaction, isAttributePopulated, isAttributePopulated, isDead, isInCache, isInvalid, isLocked, isLookupIdValid, isOrigDataEmpty, isOrigDataPopulated, isPostedToDB, isTransientTransactionListener, isTransientTransactionPostListener, isValid, isViewAccessorAttribute, lockTopLevelEntity, markViewAccessorsDirty, notifyAttributesAndBlgChanged, notifyAttributesChanged, notifyAttributesChanged, notifyEntityActivated, outputEventString, populateAttribute, populateAttribute, populateAttribute, prepareForBatchDML, prepareVOToFetchNextEffDtRows, prepareVOToFetchNextEffDtRows, prepareVOToFetchNextEffDtSeqRows, prepareVOToFetchNextEffDtSeqRows, prepareVOToFetchPrevEffDtRows, prepareVOToFetchPrevEffDtRows, prepareVOToFetchPrevEffDtSeqRows, prepareVOToFetchPrevEffDtSeqRows, readXML, refreshFKInNewContainees, registerAttributeException, removeAndRetain, removeFromCollection, removeTransactionPostListener, resetPKBasedRef, revert, revertChangesToEffDtEntity, setAttribute, setAttribute, setAttributeChanged, setAttributeValues, setAttrInvokeAccessor, setDynamicAttributeValue, setEffectiveDateMode, setEntityDef, setInvalid, setLocked, setPostedToDB, setTransPostHandle, toString, validate, validateDateEffectivity, 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, lookupListBinding, printXMLDefinition, readXML, 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

KFFMEntityImpl

public KFFMEntityImpl()
Method Detail

isAutoCombinationLockEnabled

protected final boolean isAutoCombinationLockEnabled()
Returns true if combination locking should be attempted before the actual DML_INSERT or DML_UPDATE operations in doDML.

Returns:
true if combination locking should be attempted in doDML
See Also:
doDML(int, TransactionEvent), lockCombination(DBTransaction)

setAutoCombinationLockEnabled

protected final void setAutoCombinationLockEnabled(boolean b)
Sets whether combination locking should be attempted before the actual DML_INSERT or DML_UPDATE operations in doDML.

Parameters:
b - true if combination locking should be attempted in doDML
See Also:
doDML(int, TransactionEvent), lockCombination(DBTransaction)

doDML

protected void doDML(int operation,
                     oracle.jbo.server.TransactionEvent e)
Routes a change operation to the #insertRow(TransactionEvent event), #updateRow(TransactionEvent event), or #deleteRow(TransactionEvent event) method. Returns the cached sql statement depending on the type This method is overriden to attempt to lock the combination represented by this entity for both DML_INSERT and DML_UPDATE before calling super.doDML.

A subclass that overrides this method can turn the auto locking off by calling setAutoCombinationLockEnabled(false) and manually creates the lock by calling lockCombination(e.getDBTransaction()) in the right place.

Overrides:
doDML in class OAEntityImpl
Parameters:
operation - one of INSERT, UPDATE, DELETE, or SELECT.
e - the event to be processed.
Throws:
KFFMEntityImpl.CombinationExistsException - if the combination to be inserted or updated already exists.
KFFMEntityImpl.CombinationLockedException - if the combination to be inserted or updated is already locked.
FlexfieldJboException - if any error occurs while locking the combination
See Also:
lockCombination(DBTransaction), setAutoCombinationLockEnabled(boolean)

lockCombination

protected void lockCombination(oracle.jbo.server.DBTransaction dbt)
                        throws KFFMEntityImpl.CombinationExistsException,
                               KFFMEntityImpl.CombinationLockedException
Creates a lock on the combination represented by this entity.

Parameters:
dbt - the transaction where the lock is created
Throws:
KFFMEntityImpl.CombinationExistsException - if the combination to be locked already exists
KFFMEntityImpl.CombinationLockedException - if the combination to be locked is already locked
FlexfieldJboException - if any error occurs while creating the lock

Oracle Fusion Middleware extensions for Applications Core API Reference
11g Release 1 (11.1.1.6)

E22562-03

Copyright © 2012 Oracle. All Rights Reserved.