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

E22562-01

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

java.lang.Object
  extended by oracle.jbo.server.RowImpl
      extended by oracle.jbo.server.EntityImpl
          extended by oracle.apps.fnd.applcore.oaext.model.OAEntityImpl
All Implemented Interfaces:
java.util.EventListener, oracle.jbo.AttributeList, oracle.jbo.domain.DomainOwnerInterface, 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
Direct Known Subclasses:
ApplTaxonomyComponentsEOImpl, ApplTaxonomyEOImpl, ApplTaxonomyHierarchyEOImpl, ApplTaxonomyNodeComponentsEOImpl, ApplTaxonomyTranslationEOImpl, DescriptiveFlexfieldColumnUsageEOImpl, DescriptiveFlexfieldContextEOImpl, DescriptiveFlexfieldContextSegmentEOImpl, DescriptiveFlexfieldEOImpl, DescriptiveFlexfieldGlobalSegmentEOImpl, DescriptiveFlexfieldParameterEOImpl, DescriptiveFlexfieldSecondaryColumnUsageEOImpl, DescriptiveFlexfieldSecondaryTableUsageEOImpl, DescriptiveFlexfieldSecondaryUsageEOImpl, DescriptiveFlexfieldSegmentEOImpl, DescriptiveFlexfieldTableUsageEOImpl, DescriptiveFlexfieldUsageEOImpl, DocSequenceAssignmentsEOImpl, DocumentSequencesEOImpl, ExtensibleFlexfieldAllUiPageEOImpl, ExtensibleFlexfieldAllUiPageTaskFlowEOImpl, ExtensibleFlexfieldCategoryContextEOImpl, ExtensibleFlexfieldCategoryEOImpl, ExtensibleFlexfieldContextUsageEOImpl, ExtensibleFlexfieldSecondaryContextUsageEOImpl, ExtensibleFlexfieldSecondaryUiPageEOImpl, ExtensibleFlexfieldSecondaryUiPageTaskFlowEOImpl, ExtensibleFlexfieldUiPageEOImpl, ExtensibleFlexfieldUiPageTaskFlowEOImpl, FavoritesEOImpl, FndAttachedDocumentsEOImpl, FndCalDayPEOImpl, FndCalMonthPEOImpl, FndCalQuarterPEOImpl, FndCalWeekPEOImpl, FndCalYearPEOImpl, FndDemoCityEOImpl, FndDemoContinentEOImpl, FndDemoCountryEOImpl, FndDemoDeptEmpEOImpl, FndDemoDeptEOImpl, FndDemoEmpEOImpl, FndDemoLabelEOImpl, FndDemoStateEOImpl, FndDeploymentsEOImpl, FndDocumentCategoriesEOImpl, FndDocumentEntitiesDTEOImpl, FndDocumentEntitiesEOImpl, FndDocumentsEOImpl, FndDocumentsTlEOImpl, FndFormFunctionsEOImpl, FndGrantsEOImpl, FndKfEssFiltersPEOImpl, FndMapDocSeqAssignmentsEOImpl, FndMapDocSequenceAuditEOImpl, FndMapDocSequenceCatsEOImpl, FndMapDocSequenceUsersEOImpl, FndMapDocumentSequencesEOImpl, FndMapProfileCatsEOImpl, FndMapProfileOptionsEOImpl, FndMenuEntriesEOImpl, FndMenusEOImpl, FndMenusTranslationEOImpl, FndObjectInstanceSetsEOImpl, FndObjectInstanceSetsTranslationEOImpl, FndObjectsEOImpl, FndObjectsTranslationEOImpl, FndSessionUsersEOImpl, FndTreeFlatteningHistoryEOImpl, FndTreeLogEOImpl, FndTreeLogParamEOImpl, FndTreeVersionEOImpl, KeyFlexfieldColumnUsageEOImpl, KeyFlexfieldEOImpl, KeyFlexfieldLabeledSegmentEOImpl, KeyFlexfieldSecondaryColumnUsageEOImpl, KeyFlexfieldSecondaryTableUsageEOImpl, KeyFlexfieldSegmentEOImpl, KeyFlexfieldSegmentInstanceEOImpl, KeyFlexfieldSegmentLabelEOImpl, KeyFlexfieldStructureEOImpl, KeyFlexfieldStructureInstanceEOImpl, KeyFlexfieldTableUsageEOImpl, KeyFlexfieldValidationRuleEOImpl, KeyFlexfieldValueAttributeEOImpl, KFFMEntityImpl, KFFReadOnlyEntityImpl, LookupTypeEOImpl, LookupValueEOImpl, LookupValueTranslationEOImpl, MessageEOImpl, MessageRuntimeTestEOImpl, PillarMappingEOImpl, ProfileLevelEOImpl, ProfileOptionEOImpl, ProfileOptionLevelEOImpl, ProfileOptionValueEOImpl, RdsPillarDataUsageEOImpl, RdsPillarTplgyMapEOImpl, RecentItemsEOImpl, SetIdAssignmentsEOImpl, SetIdSetPEOImpl, SetIdSetsEOImpl, TreeEntityImpl, ValueSetEOImpl, ValueSetValidationTableEOImpl, ValueSetValueEOImpl

public class OAEntityImpl
extends oracle.jbo.server.EntityImpl

Represent a database row in middle-tier.

An entity object represents the row in cache from a database object, such as a table or view. Database rows are represented as individual entities, in which attributes typically correspond to columns in the corresponding table.

There are two types of entity objects in Oracle Applications:

Regular Entities

These entities map directly to a database table or a view. Each entity instance maps to a single row in the table or view.

Translatable Entities

These entities map to a base table 'XXXX_B' representing untranslatable data, and a translation table 'XXXX_TL' representing the translated data. For each row in the translated entity there is one row in the base table, and n translated rows in the translation table where n is the number of installed languages in the system.
A translated entity consists of:
  1. The translated entity representing the _VL view which both translated and non-translated columns from _B and _TL tables.
  2. An entity representing the _TL table.
  3. A Composite association joing the two entities.

These are the steps to create translated entities:

Creating the translation base _B Entity
Create an entity on top of your xxxx_VL database view. The entity must extend OAEntityImpl. Make sure you follow the following rules:
  1. Follow the naming standard for entities.
  2. Do not include the ROWID column from the _VL view.
  3. Properly mark the primary keys.
  4. Indicate the base xxxx_B table name for this entity by setting fnd:OA_BASE_TABLE property to the name of the base table. The existance of this property will mark this entity as a translatable entity.

Creating the _TL Entity
Create an entity on top of your translations xxxx_TL table. The entity must extend OAEntityImpl. You need to make sure you follow the following rules:
  1. The name of the TL entity should be the same as the base entity with 'TL'. Example: For CustomerEO it would be CustomerTLEO.
  2. Properly mark the primary keys including the 'Language' column
  3. The name of the attribute pointing to the LANGUAGE column must be 'Language'.
  4. The name of the attribute pointing to the SOURCE_LANG column must be 'SourceLang'.
  5. By default, all attributes in the TL entity (other than Language & SourceLang) will be considered translatable attributes if: If the attribute property fnd:OA_TRANSLATABLE is set, it will override the above default behavior as follows:

Creating the Entity Association between the translatable and TL entities
  1. Create an Entity Association between the translatable & TL entity.
  2. Follow the naming standard for associations.
  3. Make sure it is a composite association.
  4. Make sure that the destination accessor name for the TL entity is 'OA_TL_ENTITIES'. If for some reason you want to have a different accessor name, then tell the translation entity (base entity) the name of this accessor by setting the property OA_TL_ENTITY_ACCESSOR on the base entity to the name of the accessor.

PLSql Entities

Entity Objects based on PL/SQL stored procedures. This allows one or more of the four entity object methods (update, insert, delete, and lock) to be implemented by a PL/SQL procedure in a PL/SQL package.

This class overrides the doDML method to call one of the methods: insertRow(), updateRow(), or deleteRow(). You can simply one or more of these three methods (and possibly the lockRow() method for locking the EO) with Java code that calls their PL/SQL procedure.

To identify an entity to be a PlSql entity set the Application schema based property fnd:OA_PLSQL_ENTITY to the value "Y" on the entity. For a PLSql entity that needs TL table support, follow the steps mentioned above for TL table support. Identify both the _B table and the _TL table as PLSql entities by setting the Application schema based property fnd:OA_PLSQL_ENTITY.


Field Summary
protected static int DELETE
          Delete Operation indicator
protected static int INSERT
          Insert Operation indicator
protected static int LOCK
          Lock Operation indicator
static java.lang.String RCS_ID
          Oracle Applications internal source control identifier.
static java.lang.String SEED_DATA_USER
           
protected static int SELECT
          Lock Operation indicator
protected static int UPDATE
          Update Operation indicator
 
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
OAEntityImpl()
           
 
Method Summary
protected  void appendXMLElementNodes(org.w3c.dom.Document xmlDoc, org.w3c.dom.Node node, int nContainees, long options, oracle.jbo.server.AttributeDefImpl[] attrs)
           
protected  int bindDMLStatement(int operation, java.sql.PreparedStatement stmt, oracle.jbo.server.AttributeDefImpl[] allAttrs, oracle.jbo.server.AttributeDefImpl[] retCols, oracle.jbo.server.AttributeDefImpl[] retKeys, java.util.HashMap retrList, boolean batchMode)
          Overridden to funnel Base translation EO bind DML to _B table instead of _VL view.
protected  java.lang.StringBuffer buildDMLStatement(int operation, oracle.jbo.server.AttributeDefImpl[] allAttrs, oracle.jbo.server.AttributeDefImpl[] retCols, oracle.jbo.server.AttributeDefImpl[] retKeys, boolean batchMode)
          Overridden to funnel Base translation EO DML to _B table instead of _VL view.
protected  void changeSessionLanguageForTL(java.lang.String newLangCode)
          Change the session language for the current session.
protected  boolean checkConsistency(oracle.jbo.server.SparseArray target, boolean lock)
           
protected  boolean containsFlexfields()
          Returns true if this entity has flexfields.
protected  void create(oracle.jbo.AttributeList nameValuePair)
          Creates an entity based on set of attributes.
protected  void deleteRow()
          can be overridden to call your PL/SQL code to do the delete operation on the entity. If you don't override this method, then a deleteRow() operation will simply cause a SQL DELETE statement to be issued.
protected  void doDML(int operation, oracle.jbo.server.TransactionEvent event)
          Routes a change operation to the #insertRow(TransactionEvent event), #updateRow(TransactionEvent event), or #deleteRow(TransactionEvent event) method.
protected  void doDMLWithLOBs(int operation, oracle.jbo.server.TransactionEvent e)
           
protected  void doSelect(boolean lock)
          Does the query for the object, and sets "locked" to true.
protected  java.lang.String[] getActivityActorsGUIDs()
          Returns String[] of GUIDs of the Actors involved with the Activities associated with the EO.
protected  java.lang.String getActivityObjectTypeNames()
          Bug: 10080364 : This attr should provide a "," separated list of object type names associated with a particular Activity.
protected  java.lang.String getActivityStreamServiceId()
          Returns the servce id to be used to publish the Activites for the Business Events raised for this Entity.
protected  java.lang.String[] getAdditionalServiceIds()
           
 java.lang.Object getAttribute(int baseIndex, java.lang.String lang)
          Gets the attribute value for the passed language code.
 oracle.jbo.AttributeDef getAttributeDef(java.lang.String attributeName)
          Gets an AttributeDef of a column, given an attribute named.
 java.lang.Object getAttributeInternal(int baseIndex)
          gets the value of the given attribute.
 java.lang.String getBaseLanguage()
          Returns the code for the base language in this database.
protected  oracle.jbo.server.EntityImpl getContainerEntity()
          Gets the owning entity.
 java.sql.Date getCurrentDatabaseDate()
          Gets the current database date as a java.sql.Date instance.
 java.sql.Timestamp getCurrentDBDate()
          Deprecated. instead use getCurrentDBTime().
 java.sql.Timestamp getCurrentDBTime()
          Returns a Timestamp instance with nanos set to 0 of database time same as getCurrentDBDate() method.
 java.sql.Timestamp getCurrentDBTimeWithNanos()
           
 java.lang.String getCurrentLanguage()
          Returns the current language.
static java.sql.Date getCurrentSystemDate()
          Gets the current Java system date.
protected  java.lang.String getCurrentTLRowLangCode()
          Returns the language code of the current TL rowl.
 java.lang.Long getDocSequence(java.lang.Long appId, java.lang.String categoryCode, java.lang.Long sobId, java.lang.String methodCode, java.sql.Timestamp txnDate, java.lang.Long seqVal, java.lang.String suppressWarn, java.lang.String suppressError)
          Deprecated.  
 java.lang.Long[] getDocSequenceValueWithId(java.lang.Long appId, java.lang.String categoryCode, java.lang.Long sobId, java.lang.String methodCode, java.sql.Timestamp txnDate, java.lang.Long seqVal, java.lang.String suppressWarn, java.lang.String suppressError)
          Will populate the entity attribute with a document sequence in Automatic mode, based on the schema based properties being set on the attribute using Applications Property Inspector in the Entity Attribute editor in JDev for fnd:DOC_SEQUENCE (Document Sequence), fnd:DOC_SEQ_APPLICATION_ID (Application Id), fnd:DOC_SEQ_METHOD_CODE (Method Code), fnd:DOC_SEQ_CATEGORY_CODE (Category Code), fnd:DOC_SEQ_SET_OF_BOOKS_ID (Ledger Id), fnd:DOC_SEQ_TXN_DATE (Transaction Date) Application Id, Method Code, Category Code, Ledger Id and Transaction Code, should be populated with valid Groovy expressions.
 oracle.jbo.server.EntityDefImpl getEntityDef()
          Gets the metadata associated with the entity.
 java.lang.Object getFlexfieldParameterValue(java.lang.String localFlexID, java.lang.String paramName)
          Internal: Applications should not use this method. Gets the value of a flexfield parameter.
protected  java.lang.String getFlexfieldStructureCode(long appid, java.lang.String flexCode, long sin)
          Gets the structure code for a key flexfield structure instance number.
 java.lang.String getFlexfieldStructureCode(java.lang.String sinAttrName)
          Internal: Applications should not use this method.
 java.util.HashMap getHistoryColumnsOfTLEntity(java.lang.String lang)
          Returns the history column attributes and values of the TL Entity for a given language.
protected  java.lang.Object getHistoryContextForAttribute(oracle.jbo.server.AttributeDefImpl attr)
           
 java.lang.String[] getInstalledLanguages()
          Returns the list of language codes installed in the database instance including the base language.
protected  java.util.Map getKeyAttributesIndexMap()
          similar to getTranslatedAttributesIndexMap(), but maps between FOO_B's primary key attributes and the corresponding primary key attributes of FOO_TL.
 java.lang.Object getPostedAttribute(int index)
           
 java.lang.Long getSetId(java.lang.String foreinKeyAttribute)
          Returns the Set Id value to be used for the references specified by its foreign key attribute name.
protected  java.util.Map getTranslatedAttributesIndexMap()
          produces a map between translated attributes of the FOO_B entity and the attributes of the FOO_TL object.
 OATranslatedEntityStaticInfo getTranslatedEntityStaticInfo()
          gets a OATranslatedEntityStaticInfo for this object.
static OATranslatedEntityStaticInfo getTranslatedEntityStaticInfo(oracle.jbo.server.EntityDefImpl entityDef)
          gets a OATranslatedEntityStaticInfo for the entityDef.
 java.lang.String[] getTranslatedLanguages()
          Returns an array of Language codes ({"US", "DE", "JP", ...}) for which actual translations exist.
 java.lang.String getWhoUser()
          Returns the User responsible for manipulating this entity.
 void handleEffectiveDateOperationsForSeedData()
          The seed data fwk needs this API to be made public.
protected  void handlePostChangesError()
           
protected  void insertRow()
          can be overridden to call your PL/SQL code to do the insert operation on the entity. If you don't override this method, then an insertRow() operation will simply cause a SQL INSERT statement to be issued.
protected  boolean isActivityPublishingEnabled()
          This API is used to turn on Activity publishing for Business Events.
 boolean isAttributeUpdateable(int index)
          
protected  boolean isExtensibleFlexfield()
          Returns true if this entity has flexfield type extensible.
protected  boolean isExtensibleTranslatableFlexfield()
          Returns true if this entity has flexfield type extensible and is translatable.
 boolean isPlsqlEntity()
          Returns true if this entity is a plsql entity.
protected  boolean isRefreshRequired(oracle.jbo.server.ViewAccessorDef va, java.lang.String[] attrNames, java.lang.Object[] attrValues)
          Check if a view accessor should be refreshed when a list of attribute get changed.
 boolean isTranslatable()
          Returns true if this entity is a translatable entity.
static boolean isTranslatable(OAViewObjectImpl vo)
          Returns true if the view object has reference to any entity that is translatable.
static java.lang.Boolean isTranslatable(oracle.jbo.server.ViewAttributeDefImpl attrDef)
          Returns true if the attribute with this attrDef is a translatable attribute.
 boolean isTranslatableAttribute(int baseIndex)
          Returns true if the attribute with this index is a translatable attribute.
 boolean isTranslated()
          This returns true if there is at least on translated language other than the base language for this entity, which means that getTranslatedLanguages() would return more than one language.
 void lock()
          Locks the database row mapped to this entity object.
protected  void lockRow()
          can be overridden to call your PL/SQL code to do the lock operation on the entity. If you don't override this method, then a lockRow() operation will simply cause a SQL SELECT...FOR UPDATE statement to be issued.
protected  void notifyEventRaised(java.lang.String eventName, java.util.ArrayList<oracle.jbo.server.EventAttrVals> payload)
           
static java.sql.Timestamp parseFlexfieldDate(java.lang.String s)
          Parses a flexfield date string.
static java.sql.Timestamp parseFlexfieldDateTime(java.lang.String s)
          Parses a flexfield date-time string.
static java.math.BigDecimal parseFlexfieldNumber(java.lang.String s)
          Parses a flexfield number string.
static java.sql.Timestamp parseFlexfieldTime5(java.lang.String s)
          Parses a flexfield time string with maximum length being 5.
static java.sql.Timestamp parseFlexfieldTime8(java.lang.String s)
          Parses a flexfield time string with maximum length being 8.
 void populateAttributeAsChanged(int index, java.lang.Object value)
          exposed this as public method for ApplCore internal use.
protected  void populateAttributeAsChanged(int index, java.lang.String lang, java.lang.Object value)
           
 void postChanges(oracle.jbo.server.TransactionEvent e)
          Override of EntityImpl.postChanges()
protected  void prepareForDML(int operation, oracle.jbo.server.TransactionEvent e)
          Process a row when any operation like insert/update/delete is performed.
protected  boolean readAttrsFromXML(org.w3c.dom.Element element, oracle.jbo.server.AttributeDefImpl[] attributeDefImpl, int i)
           
 void refresh(int refMode)
           
protected  void refreshViewAccessor(oracle.jbo.server.ViewAccessorDef va, java.util.Map attrNameValues, oracle.jbo.RowSet rs)
           
 void remove()
          Marks the row for deletion.
 void setAttribute(int index, java.lang.String lang, java.lang.Object val)
          Sets the attribute value for the passed language code.
 void setAttributeInternal(int index, java.lang.Object val)
           
 void setNewRowState(byte state)
           
static java.lang.String toFlexfieldString(java.math.BigDecimal n, int precision, int scale)
          Converts a BigDecimal to a string.
static java.lang.String toFlexfieldString(java.sql.Date d)
          Converts the given date to a string in flexfield "date" format.
static java.lang.String toFlexfieldStringDate(java.sql.Timestamp t)
          Converts the given timestamp to a string in flexfield "date" format.
static java.lang.String toFlexfieldStringDateTime(java.sql.Timestamp t)
          Converts the given timestamp to a string in flexfield "date time" format.
static java.lang.String toFlexfieldStringTime5(java.sql.Timestamp t)
          Converts the given timestamp to a string in flexfield "time" format with maximum length being 5.
static java.lang.String toFlexfieldStringTime8(java.sql.Timestamp t)
          Converts the given timestamp to a string in flexfield "time" format with maximum length being 8.
protected  void updateRow()
          can be overridden to call your PL/SQL code to do the update operation on the entity. If you don't override this method, then an updateRow() operation will simply cause a SQL UPDATE statement to be issued.
protected  void validateEntity()
          Validates an entity.
static boolean validateFlexfieldDate(java.lang.String value, boolean isNullAllowed)
          Checks whether the given value matches the pattern "yyyy/MM/dd HH:mm:ss" where "HH:mm:ss" should always be "00:00:00".
static boolean validateFlexfieldDateTime(java.lang.String value, boolean isNullAllowed)
          Checks whether the given value matches the date format "yyyy/MM/dd HH:mm:ss".
static boolean validateFlexfieldMaxLength(java.lang.String value, int maxLength, boolean isNullAllowed)
          Checks whether the length of the given value is equal to or less than the given length.
static boolean validateFlexfieldMaxValue(java.math.BigDecimal value, java.math.BigDecimal max, boolean isNullAllowed)
          Checks whether the given value is less than or equal to the maximum value.
static boolean validateFlexfieldMaxValue(java.util.Date value, java.util.Date max, boolean isNullAllowed)
          Checks whether the given value is less than or equal to the maximum value.
static boolean validateFlexfieldMinValue(java.math.BigDecimal value, java.math.BigDecimal min, boolean isNullAllowed)
          Checks whether the given value is greater than or equal to the minimum value.
static boolean validateFlexfieldMinValue(java.util.Date value, java.util.Date min, boolean isNullAllowed)
          Checks whether the given value is greater than or equal to the minimum value.
static boolean validateFlexfieldNumber(java.math.BigDecimal value, int precision, java.lang.Integer scale, boolean isNullAllowed)
          Checks whether the given value is an Oracle decimal number.
static boolean validateFlexfieldNumber(java.lang.String value, int precision, java.lang.Integer scaleObj, boolean isNullAllowed)
          Checks whether the given value is an Oracle decimal number.
static boolean validateFlexfieldNumericOnly(java.lang.String value, boolean isNullAllowed)
          Checks whether the given value contains numeric digits (0-9) only.
static boolean validateFlexfieldRequired(java.lang.Object value, boolean isEmptyStringSameAsNull)
          Returns true if the given value is not null.
static boolean validateFlexfieldRJZFNumber(java.lang.String value, int length, boolean isNullAllowed)
          Checks whether the given value is a Right-Justified-Zero-Filled (RJZF) number of the given length.
static boolean validateFlexfieldTime5(java.lang.String value, boolean isNullAllowed)
          Checks whether the given value matches the date format "HH:mm".
static boolean validateFlexfieldTime8(java.lang.String value, boolean isNullAllowed)
          Checks whether the given value matches the date format "HH:mm:ss".
static boolean validateFlexfieldUppercase(java.lang.String value, boolean isNullAllowed)
          Checks whether the given value is in uppercase.
static boolean validateFlexfieldValue(java.lang.Object newValue, java.lang.Object source, java.lang.String viewAccessorName, java.lang.String viewAccAttrName, java.lang.String newValueVarName)
          Checks if a value is in the list provided by a view accessor.
 
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, createAssociationAccessorRS, createAssociationAccessorVO, createEntityAttrHints, createEntityViewLinkAccessorRS, createEntityViewLinkAccessorVO, 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
 

Field Detail

RCS_ID

public static final java.lang.String RCS_ID
Oracle Applications internal source control identifier.

See Also:
Constant Field Values

SEED_DATA_USER

public static final java.lang.String SEED_DATA_USER
See Also:
Constant Field Values

UPDATE

protected static final int UPDATE
Update Operation indicator

See Also:
Constant Field Values

INSERT

protected static final int INSERT
Insert Operation indicator

See Also:
Constant Field Values

DELETE

protected static final int DELETE
Delete Operation indicator

See Also:
Constant Field Values

SELECT

protected static final int SELECT
Lock Operation indicator

See Also:
Constant Field Values

LOCK

protected static final int LOCK
Lock Operation indicator

See Also:
Constant Field Values
Constructor Detail

OAEntityImpl

public OAEntityImpl()
Method Detail

doDML

protected void doDML(int operation,
                     oracle.jbo.server.TransactionEvent event)
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

Overrides:
doDML in class oracle.jbo.server.EntityImpl
Parameters:
operation - one of INSERT, UPDATE, DELETE, or SELECT.
event - the event to be processed.

isPlsqlEntity

public boolean isPlsqlEntity()
Returns true if this entity is a plsql entity. An entity can be marked to be a plsql entity, by setting Application schema based property "fnd:OA_PLSQL_ENTITY" on the entity to the value "Y".

Returns:
true if the entity is plsql entity.

insertRow

protected void insertRow()
can be overridden to call your PL/SQL code to do the insert operation on the entity. If you don't override this method, then an insertRow() operation will simply cause a SQL INSERT statement to be issued.


updateRow

protected void updateRow()
can be overridden to call your PL/SQL code to do the update operation on the entity. If you don't override this method, then an updateRow() operation will simply cause a SQL UPDATE statement to be issued.


deleteRow

protected void deleteRow()
can be overridden to call your PL/SQL code to do the delete operation on the entity. If you don't override this method, then a deleteRow() operation will simply cause a SQL DELETE statement to be issued.


lockRow

protected void lockRow()
can be overridden to call your PL/SQL code to do the lock operation on the entity. If you don't override this method, then a lockRow() operation will simply cause a SQL SELECT...FOR UPDATE statement to be issued. NOTE: Subclass overriding this method must not call super.


doSelect

protected void doSelect(boolean lock)
Does the query for the object, and sets "locked" to true.

Overrides:
doSelect in class oracle.jbo.server.EntityImpl
Parameters:
lock - true if we should use "for update" in the query

changeSessionLanguageForTL

protected void changeSessionLanguageForTL(java.lang.String newLangCode)
Change the session language for the current session. This method is used to change the session language when calling the plsql procedures to perform updates on the _TL records.

For plsql apis that take language parameter, developer should overwrite this method to do nothing. This will avoid unnecessary cost of changing session language and improve performance.

Parameters:
newLangCode - the new language code for the session

isActivityPublishingEnabled

protected boolean isActivityPublishingEnabled()
This API is used to turn on Activity publishing for Business Events. By default this returns false. SubClasses should override this method to turn on Activity publishing.

Returns:
true if Acitvity publishing is enabled.

getActivityStreamServiceId

protected java.lang.String getActivityStreamServiceId()
Returns the servce id to be used to publish the Activites for the Business Events raised for this Entity. By default this returns null. When null returned, service id is defaulted to the full name of the EO.

Returns:
activityStreamServiceId

getActivityActorsGUIDs

protected java.lang.String[] getActivityActorsGUIDs()
Returns String[] of GUIDs of the Actors involved with the Activities associated with the EO. This API should be overridden in a sub class if an Actor(s) other than the logged in user needs to be associated with the Activities of the EO. If null is returned, current logged in user's GUID will be used.

Returns:
String[] GUIDs

getAdditionalServiceIds

protected java.lang.String[] getAdditionalServiceIds()

getActivityObjectTypeNames

protected java.lang.String getActivityObjectTypeNames()
Bug: 10080364 : This attr should provide a "," separated list of object type names associated with a particular Activity.

Returns:

notifyEventRaised

protected void notifyEventRaised(java.lang.String eventName,
                                 java.util.ArrayList<oracle.jbo.server.EventAttrVals> payload)
Overrides:
notifyEventRaised in class oracle.jbo.server.EntityImpl

getCurrentTLRowLangCode

protected java.lang.String getCurrentTLRowLangCode()
Returns the language code of the current TL rowl.

Returns:
the language code of the current TL row.

getHistoryContextForAttribute

protected java.lang.Object getHistoryContextForAttribute(oracle.jbo.server.AttributeDefImpl attr)
Overrides:
getHistoryContextForAttribute in class oracle.jbo.server.EntityImpl

getAttributeDef

public oracle.jbo.AttributeDef getAttributeDef(java.lang.String attributeName)
Gets an AttributeDef of a column, given an attribute named.

Parameters:
attributeName - the name of the attribute
Returns:
definition of the attribute or null if attribute not found.

validateEntity

protected void validateEntity()
Validates an entity. After validating current entity it validates other listeners that are members of ValidationListeners list.

Overrides:
validateEntity in class oracle.jbo.server.EntityImpl

lock

public void lock()
Locks the database row mapped to this entity object. If the row is new or already locked by the entity object, or if the transaction's locking mode is LOCK_NONE, this method has no effect. If the entity object is contained by another (that is, it is part of a composition association and has a master entity object), this method locks the top-most entity object in the chain of containers before attempting to lock itself.

Specified by:
lock in interface oracle.jbo.Row
Overrides:
lock in class oracle.jbo.server.EntityImpl

prepareForDML

protected void prepareForDML(int operation,
                             oracle.jbo.server.TransactionEvent e)
Process a row when any operation like insert/update/delete is performed. User can overwrite this method and add any custom logic, like initialize any attribute on insertion.

Example:

In the following example, we delete all the detail records, when master is marked for deletion.


 protected void prepareForDML(int operation, TransactionEvent e)
 {
   if (operation == DML_DELETE)
   {
     deleteAllDetailRecords();
   }

   super.prepareForDML(operation, e);
 }
 
Handles document sequencing. If an entity attribute has been identified that it should be populated using a document sequence (in the Applications Property Inspector panel), then at this point in the entity life cycle, we will populate the attribute with a document sequence based on the inputs, provided the sequence method is automatic. If the document sequence is manual, we will validate the document sequence. The document sequence Id corresonding to the attribute is stored in the entity's variable manager using the name as attrName+"DocSeqId". You can retrieve the docSeqId in the entity by calling: ensureVariableManager.getVariableValue(attrName+"DocSeqId"); where attrName is the name of the attribute on which document sequence property is set to true in the Applications Property Inspector panel. The docSeqId can only be retrieved after this call (prepareForDML()) is done. See parent class for complete documentation

Overrides:
prepareForDML in class oracle.jbo.server.EntityImpl
Parameters:
operation - action performed on the row. It can be one of the following:
  • DML_INSERT
  • DML_UPDATE
  • DML_DELETE
e - this Entity Object's transaction event.
See Also:
#validateDocSequence, getDocSequenceValueWithId(java.lang.Long, java.lang.String, java.lang.Long, java.lang.String, java.sql.Timestamp, java.lang.Long, java.lang.String, java.lang.String), EntityImpl.prepareForDML(int, oracle.jbo.server.TransactionEvent)

handlePostChangesError

protected void handlePostChangesError()
Overrides:
handlePostChangesError in class oracle.jbo.server.EntityImpl

getEntityDef

public oracle.jbo.server.EntityDefImpl getEntityDef()
Gets the metadata associated with the entity. The entity definition holds the entity structure.

Overrides:
getEntityDef in class oracle.jbo.server.EntityImpl
Returns:
the metadata definition of the entity

getContainerEntity

protected oracle.jbo.server.EntityImpl getContainerEntity()
Gets the owning entity. It points to the master entity in case of a composite association.

Overrides:
getContainerEntity in class oracle.jbo.server.EntityImpl
Returns:
master entity if present, else null

isTranslatable

public boolean isTranslatable()
Returns true if this entity is a translatable entity. You can make an OAEntityImpl translatable by setting the entity schema based property "fnd:OA_BASE_TABLE" to some _B database table which is TL compliant. A translatable entity is an entity which is based on two underlying tables, one called the base table which does not have translatable columns , and the other called TL table which contains the translatable columns.

Returns:
true if the entity is translatable.
See Also:
isTranslatableAttribute(int)

isTranslatable

public static boolean isTranslatable(OAViewObjectImpl vo)
Returns true if the view object has reference to any entity that is translatable. You can make an OAEntityImpl translatable by setting the entity schema based property "fnd:OA_BASE_TABLE" to some _B database table which is TL compliant. A translatable entity is an entity which is based on two underlying tables, one called the base table which does not have translatable columns , and the other called TL table which contains the translatable columns.

Returns:
true if the view object has reference to any entity that is translatable.
See Also:
isTranslatableAttribute(int), isTranslatable()

getHistoryColumnsOfTLEntity

public java.util.HashMap getHistoryColumnsOfTLEntity(java.lang.String lang)
Returns the history column attributes and values of the TL Entity for a given language. The HashMap that is returned is a mapping of AttributeDefImpl of the history column to the value of the history column.

Parameters:
lang - - Language for which the history column information needs to be retrieved.
Returns:
HashMap of history column attributes.

getTranslatedLanguages

public java.lang.String[] getTranslatedLanguages()
Returns an array of Language codes ({"US", "DE", "JP", ...}) for which actual translations exist. The list will always return the base language as one of the translated languages. If there are no translations, or if the entity is not translatable, only the base language will be returned.

A record is considered translated if LANGUAGE and SOURCE_LANG columns are equal.

Returns:
an array of language codes representing the translations available in this entity.

isTranslated

public boolean isTranslated()
This returns true if there is at least on translated language other than the base language for this entity, which means that getTranslatedLanguages() would return more than one language.

Returns:
true if there is at least one translation other than the base language for this entity.
See Also:
getTranslatedLanguages()

getInstalledLanguages

public java.lang.String[] getInstalledLanguages()
Returns the list of language codes installed in the database instance including the base language.

Returns:
List of installed language codes. Example: {"US", "JP", ..}.
See Also:
getBaseLanguage()

getBaseLanguage

public java.lang.String getBaseLanguage()
Returns the code for the base language in this database.

Returns:
The language code of the base language. Example: US.
See Also:
getInstalledLanguages()

getTranslatedEntityStaticInfo

public static OATranslatedEntityStaticInfo getTranslatedEntityStaticInfo(oracle.jbo.server.EntityDefImpl entityDef)
gets a OATranslatedEntityStaticInfo for the entityDef. there is one OATranslatedEntityStaticInfo for each entity def name on each JVM.The OATranslatedEntityStaticInfo is statically saved for each def name. This method and some other MLS related methods should ideally reside in OAEntityDefImpl. However, since we don't ask developers to always generate Def classes, this is a workaround for now. For internal use only. can be removed at any time.


getTranslatedEntityStaticInfo

public OATranslatedEntityStaticInfo getTranslatedEntityStaticInfo()
gets a OATranslatedEntityStaticInfo for this object. there is one OATranslatedEntityStaticInfo for each entity def name on each JVM. The OATranslatedEntityStaticInfo is statically saved for each def name. For interna use only. Can be removed at any time.


getTranslatedAttributesIndexMap

protected java.util.Map getTranslatedAttributesIndexMap()
produces a map between translated attributes of the FOO_B entity and the attributes of the FOO_TL object. In most cases, this is done automatically for you, by making the assumption that any non-key attribute in the FOO_TL which is a String must be a translated attribute, and should correspond to an attribute of the same name in FOO_B.

If for some reason your FOO_B and FOO_TL entity objects don't follow this pattern, then you can override this method to provide a Hashtable mapping of Integer to Integer objects. The keys are Integers representing the attribute indices in the FOO_B which correspond to translated attributes, and the values returned by those keys are Integers representing the attribute indices in the FOO_TL table. For example, if FOO_TL has translated attributes DESCRIPTION and COMMENT, then FOO_B should too (since we added a non- persistent attribute for each translated item, as mentioned above) So getTranslatedAttributesIndexMap() could return a Hashtable created by the code:

   {
     Hashtable translated = new Hashtable();
     // map B's DESCRIPTION to TL's
     translated.put(new Integer(FooBImpl.DESCRIPTION),
           new Integer(FooTlImpl.DESCRIPTION));
     // map B's COMMENT to TL's
     translated.put(new Integer(FooBImpl.COMMENT),
           new Integer(FooTlImpl.COMMENT));
     return translated;
   }
 

Returns:
Hashtable which maps Integer indices of translated attributes in FOO_B to the corresponding indices in FOO_TL

getKeyAttributesIndexMap

protected java.util.Map getKeyAttributesIndexMap()
similar to getTranslatedAttributesIndexMap(), but maps between FOO_B's primary key attributes and the corresponding primary key attributes of FOO_TL. This is normally calculated for you, based on the assumption that we can traverse the association between FOO_B and FOO_TL. But if that approach doesn't work because of something unusual in your Entity Objects, you can override this method to specify the mapping.

Returns:
Hashtable which maps Integer indices of keys in FOO_B to the corresponding indices in FOO_TL

isTranslatableAttribute

public boolean isTranslatableAttribute(int baseIndex)
Returns true if the attribute with this index is a translatable attribute.

Parameters:
baseIndex - attribute index in the Entity.
Returns:
true if the attribute is translatable.

isTranslatable

public static java.lang.Boolean isTranslatable(oracle.jbo.server.ViewAttributeDefImpl attrDef)
Returns true if the attribute with this attrDef is a translatable attribute.

Parameters:
attrDef - of ViewAttributeDefImpl type
Returns:
true if the attribute is translatable.

setNewRowState

public void setNewRowState(byte state)
Specified by:
setNewRowState in interface oracle.jbo.Row
Overrides:
setNewRowState in class oracle.jbo.server.EntityImpl
Parameters:
state - entity state to be set on the new row.

remove

public void remove()
Marks the row for deletion.

Override this method to add your own business logic for the remove operation. For example, you can implement business logic that throws an exception that report why an entity object cannot be removed.

Specified by:
remove in interface oracle.jbo.Row
Overrides:
remove in class oracle.jbo.server.EntityImpl

create

protected void create(oracle.jbo.AttributeList nameValuePair)
Creates an entity based on set of attributes. If the EntityObject is Translatable, then it also creates Entity Objects for the TL rows.

Overrides:
create in class oracle.jbo.server.EntityImpl
Parameters:
nameValuePair - name/value pair to initialize the entity

getAttributeInternal

public java.lang.Object getAttributeInternal(int baseIndex)
gets the value of the given attribute.

Overrides:
getAttributeInternal in class oracle.jbo.server.EntityImpl
Parameters:
baseIndex - specifies which attribute.
Returns:
the value of the attribute.
See Also:
setAttributeInternal(int, Object)

getAttribute

public java.lang.Object getAttribute(int baseIndex,
                                     java.lang.String lang)
Gets the attribute value for the passed language code.

Parameters:
baseIndex - specifies which attribute.
lang - the language handle (one of "US", "JP", ...).
Returns:
value of the attribute.
See Also:
setAttribute(int, String, Object)

setAttribute

public void setAttribute(int index,
                         java.lang.String lang,
                         java.lang.Object val)
Sets the attribute value for the passed language code.

Parameters:
index - the attribute index.
lang - the language handle (one of "US", "JP", ...).
val - The value of the attribute
See Also:
getAttribute(int, String)

setAttributeInternal

public void setAttributeInternal(int index,
                                 java.lang.Object val)
Overrides:
setAttributeInternal in class oracle.jbo.server.EntityImpl

populateAttributeAsChanged

public void populateAttributeAsChanged(int index,
                                       java.lang.Object value)
exposed this as public method for ApplCore internal use.

Overrides:
populateAttributeAsChanged in class oracle.jbo.server.EntityImpl
Parameters:
index -
value -

populateAttributeAsChanged

protected void populateAttributeAsChanged(int index,
                                          java.lang.String lang,
                                          java.lang.Object value)

getPostedAttribute

public java.lang.Object getPostedAttribute(int index)
Overrides:
getPostedAttribute in class oracle.jbo.server.EntityImpl
Parameters:
index - attribute index.
Returns:
Object

buildDMLStatement

protected java.lang.StringBuffer buildDMLStatement(int operation,
                                                   oracle.jbo.server.AttributeDefImpl[] allAttrs,
                                                   oracle.jbo.server.AttributeDefImpl[] retCols,
                                                   oracle.jbo.server.AttributeDefImpl[] retKeys,
                                                   boolean batchMode)
Overridden to funnel Base translation EO DML to _B table instead of _VL view.

Overrides:
buildDMLStatement in class oracle.jbo.server.EntityImpl
Returns:

bindDMLStatement

protected int bindDMLStatement(int operation,
                               java.sql.PreparedStatement stmt,
                               oracle.jbo.server.AttributeDefImpl[] allAttrs,
                               oracle.jbo.server.AttributeDefImpl[] retCols,
                               oracle.jbo.server.AttributeDefImpl[] retKeys,
                               java.util.HashMap retrList,
                               boolean batchMode)
                        throws java.sql.SQLException
Overridden to funnel Base translation EO bind DML to _B table instead of _VL view.

Overrides:
bindDMLStatement in class oracle.jbo.server.EntityImpl
Returns:
Throws:
java.sql.SQLException

postChanges

public void postChanges(oracle.jbo.server.TransactionEvent e)
Override of EntityImpl.postChanges()

Specified by:
postChanges in interface oracle.jbo.server.TransactionPostListener
Overrides:
postChanges in class oracle.jbo.server.EntityImpl

getDocSequence

public java.lang.Long getDocSequence(java.lang.Long appId,
                                     java.lang.String categoryCode,
                                     java.lang.Long sobId,
                                     java.lang.String methodCode,
                                     java.sql.Timestamp txnDate,
                                     java.lang.Long seqVal,
                                     java.lang.String suppressWarn,
                                     java.lang.String suppressError)
Deprecated. 

Will populate the entity attribute with a document sequence in Automatic mode, based on the schema based properties being set on the attribute using Applications Property Inspector in the Entity Attribute editor in JDev for fnd:DOC_SEQUENCE (Document Sequence), fnd:DOC_SEQ_APPLICATION_ID (Application Id), fnd:DOC_SEQ_METHOD_CODE (Method Code), fnd:DOC_SEQ_CATEGORY_CODE (Category Code), fnd:DOC_SEQ_SET_OF_BOOKS_ID (Ledger Id), fnd:DOC_SEQ_TXN_DATE (Transaction Date) Application Id, Method Code, Category Code, Ledger Id and Transaction Code, should be populated with valid Groovy expressions. The Groovy expressions when evaluated should return a Long for Application Id, and Ledger Id, String for Method Code and Category Code, Timestamp for Transaction Date fields. This method will be invoked by prepareForDML() method on the entity, when posting the data to the database. Override this if you want a different behavior/way of populating the document sequence.

Parameters:
appId - Application Id
categoryCode - Document Sequence Category Code
sobId - Ledger Id to use for this Document Sequence.
methodCode - Document sequence Method Code (Automatic ("A"), Manual ("M") or null for both modes).
txnDate - Document Transaction Date
seqVal - Document Sequence Value to use in Manual Mode
suppressWarn - Suppress warning (Y/N/null)
suppressError - Suppress Error (valid values are Y/N/null)
Returns:
Document Sequence Value
See Also:
getDocSequenceValueWithId(java.lang.Long, java.lang.String, java.lang.Long, java.lang.String, java.sql.Timestamp, java.lang.Long, java.lang.String, java.lang.String), prepareForDML(int operation, TransactionEvent e)

getDocSequenceValueWithId

public java.lang.Long[] getDocSequenceValueWithId(java.lang.Long appId,
                                                  java.lang.String categoryCode,
                                                  java.lang.Long sobId,
                                                  java.lang.String methodCode,
                                                  java.sql.Timestamp txnDate,
                                                  java.lang.Long seqVal,
                                                  java.lang.String suppressWarn,
                                                  java.lang.String suppressError)
Will populate the entity attribute with a document sequence in Automatic mode, based on the schema based properties being set on the attribute using Applications Property Inspector in the Entity Attribute editor in JDev for fnd:DOC_SEQUENCE (Document Sequence), fnd:DOC_SEQ_APPLICATION_ID (Application Id), fnd:DOC_SEQ_METHOD_CODE (Method Code), fnd:DOC_SEQ_CATEGORY_CODE (Category Code), fnd:DOC_SEQ_SET_OF_BOOKS_ID (Ledger Id), fnd:DOC_SEQ_TXN_DATE (Transaction Date) Application Id, Method Code, Category Code, Ledger Id and Transaction Code, should be populated with valid Groovy expressions. The Groovy expressions when evaluated should return a Long for Application Id, and Ledger Id, String for Method Code and Category Code, Timestamp for Transaction Date fields. This method will be invoked by prepareForDML() method on the entity, when posting the data to the database. Override this if you want a different behavior/way of populating the document sequence.

Parameters:
appId - Application Id
categoryCode - Document Sequence Category Code
sobId - Ledger Id to use for this Document Sequence.
methodCode - Document sequence Method Code (Automatic ("A"), Manual ("M") or null for both modes).
txnDate - Document Transaction Date
seqVal - Document Sequence Value to use in Manual Mode
suppressWarn - Suppress warning (Y/N/null)
suppressError - Suppress Error (valid values are Y/N/null)
Returns:
Document Sequence Value (in 0th position) and Document Sequence id (in 1st position) as an array.
See Also:
prepareForDML(int operation, TransactionEvent e)

refresh

public void refresh(int refMode)
Specified by:
refresh in interface oracle.jbo.Row
Overrides:
refresh in class oracle.jbo.server.EntityImpl
Parameters:
refMode - refresh mode for this entity.

doDMLWithLOBs

protected void doDMLWithLOBs(int operation,
                             oracle.jbo.server.TransactionEvent e)
Overrides:
doDMLWithLOBs in class oracle.jbo.server.EntityImpl

checkConsistency

protected boolean checkConsistency(oracle.jbo.server.SparseArray target,
                                   boolean lock)
Overrides:
checkConsistency in class oracle.jbo.server.EntityImpl

getSetId

public java.lang.Long getSetId(java.lang.String foreinKeyAttribute)
Returns the Set Id value to be used for the references specified by its foreign key attribute name. If the reference has a composite key, the first attribute in the key combination must be used. If the reference is not Set Id enabled, null will be returned.

Parameters:
foreinKeyAttribute - the foreign key attribute name.
Returns:
the set id value to be used for the reference, or -1 if the reference is not Set Id enabled.

refreshViewAccessor

protected void refreshViewAccessor(oracle.jbo.server.ViewAccessorDef va,
                                   java.util.Map attrNameValues,
                                   oracle.jbo.RowSet rs)
Overrides:
refreshViewAccessor in class oracle.jbo.server.RowImpl

isRefreshRequired

protected boolean isRefreshRequired(oracle.jbo.server.ViewAccessorDef va,
                                    java.lang.String[] attrNames,
                                    java.lang.Object[] attrValues)
Check if a view accessor should be refreshed when a list of attribute get changed.

Overrides:
isRefreshRequired in class oracle.jbo.server.RowImpl
Parameters:
va - The View Accessor to be checked.
attrNames - The array of changed attribute.
attrValues - The array of values for the changed attribute if values are not in the current row.
Returns:
Return true if the View Accessor should be refreshed, orelse, false.

getCurrentLanguage

public java.lang.String getCurrentLanguage()
Returns the current language.

Returns:
current language.

getWhoUser

public java.lang.String getWhoUser()
Returns the User responsible for manipulating this entity.

Returns:

getCurrentSystemDate

public static java.sql.Date getCurrentSystemDate()
Gets the current Java system date. The return date is 'normalized' by setting the hours, minutes, seconds, and milliseconds to zero.

Returns:
the current Java system date with the hours, minutes, seconds, and milliseconds set to zero

getCurrentDBTime

public java.sql.Timestamp getCurrentDBTime()
Returns a Timestamp instance with nanos set to 0 of database time same as getCurrentDBDate() method.

Returns:
Timestamp instance with nanos set to 0.

getCurrentDBDate

public java.sql.Timestamp getCurrentDBDate()
Deprecated. instead use getCurrentDBTime().

Returns a Timestamp instance with nanos set to 0 of database time. same as getCurrentDBTime() method.

Returns:
Timestamp instance with nanos set to 0.
See Also:
getCurrentDBTime()

getCurrentDBTimeWithNanos

public java.sql.Timestamp getCurrentDBTimeWithNanos()
Returns:
Timestamp instance with nanos of database time.

getCurrentDatabaseDate

public java.sql.Date getCurrentDatabaseDate()
Gets the current database date as a java.sql.Date instance.

Returns:
java.sql.Date instance of database date.

appendXMLElementNodes

protected void appendXMLElementNodes(org.w3c.dom.Document xmlDoc,
                                     org.w3c.dom.Node node,
                                     int nContainees,
                                     long options,
                                     oracle.jbo.server.AttributeDefImpl[] attrs)
Overrides:
appendXMLElementNodes in class oracle.jbo.server.EntityImpl

readAttrsFromXML

protected boolean readAttrsFromXML(org.w3c.dom.Element element,
                                   oracle.jbo.server.AttributeDefImpl[] attributeDefImpl,
                                   int i)
Overrides:
readAttrsFromXML in class oracle.jbo.server.EntityImpl

containsFlexfields

protected boolean containsFlexfields()
Returns true if this entity has flexfields.

Returns:
true if this entity has flexfields

getFlexfieldParameterValue

public java.lang.Object getFlexfieldParameterValue(java.lang.String localFlexID,
                                                   java.lang.String paramName)
Internal: Applications should not use this method. Gets the value of a flexfield parameter.

Parameters:
localFlexID - the local ID of the flexfield usage
paramName - the name of the parameter
Returns:
the value of the flexfield parameter

getFlexfieldStructureCode

public java.lang.String getFlexfieldStructureCode(java.lang.String sinAttrName)
Internal: Applications should not use this method.

Gets the flexfield structure code based on the structure instance number attribute.

Parameters:
sinAttrName - the name of the structure instance number attribute
Returns:
the structure code; null if the structure instance number is null or the code is not found

getFlexfieldStructureCode

protected java.lang.String getFlexfieldStructureCode(long appid,
                                                     java.lang.String flexCode,
                                                     long sin)
Gets the structure code for a key flexfield structure instance number.

Parameters:
appid - the application ID
flexCode - the flexfield code
sin - the structure instance number
Returns:
the structure code; null if not found

toFlexfieldString

public static java.lang.String toFlexfieldString(java.math.BigDecimal n,
                                                 int precision,
                                                 int scale)
Converts a BigDecimal to a string.

Parameters:
n - the number
precision - the precision of the number
scale - the scale of the number
Returns:
the string; null if the given object is null

toFlexfieldString

public static java.lang.String toFlexfieldString(java.sql.Date d)
Converts the given date to a string in flexfield "date" format.

Parameters:
d - the date
Returns:
the string; null if the given object is null

toFlexfieldStringDate

public static java.lang.String toFlexfieldStringDate(java.sql.Timestamp t)
Converts the given timestamp to a string in flexfield "date" format.

Parameters:
t - the timestamp
Returns:
the string

toFlexfieldStringDateTime

public static java.lang.String toFlexfieldStringDateTime(java.sql.Timestamp t)
Converts the given timestamp to a string in flexfield "date time" format.

Parameters:
t - the timestamp
Returns:
the string

toFlexfieldStringTime5

public static java.lang.String toFlexfieldStringTime5(java.sql.Timestamp t)
Converts the given timestamp to a string in flexfield "time" format with maximum length being 5.

Parameters:
t - the timestamp
Returns:
the string

toFlexfieldStringTime8

public static java.lang.String toFlexfieldStringTime8(java.sql.Timestamp t)
Converts the given timestamp to a string in flexfield "time" format with maximum length being 8.

Parameters:
t - the timestamp
Returns:
the string

parseFlexfieldNumber

public static java.math.BigDecimal parseFlexfieldNumber(java.lang.String s)
Parses a flexfield number string.

Parameters:
s - the string to be parsed
Returns:
the BigDecimal value

parseFlexfieldDate

public static java.sql.Timestamp parseFlexfieldDate(java.lang.String s)
Parses a flexfield date string. If the given date string contains hours, minutes or seconds, they are discarded.

Parameters:
s - the string to be parsed
Returns:
the timestamp value

parseFlexfieldDateTime

public static java.sql.Timestamp parseFlexfieldDateTime(java.lang.String s)
Parses a flexfield date-time string.

Parameters:
s - the string to be parsed
Returns:
the timestamp value

parseFlexfieldTime5

public static java.sql.Timestamp parseFlexfieldTime5(java.lang.String s)
Parses a flexfield time string with maximum length being 5.

Parameters:
s - the string to be parsed
Returns:
the timestamp value

parseFlexfieldTime8

public static java.sql.Timestamp parseFlexfieldTime8(java.lang.String s)
Parses a flexfield time string with maximum length being 8.

Parameters:
s - the string to be parsed
Returns:
the timestamp value

validateFlexfieldValue

public static boolean validateFlexfieldValue(java.lang.Object newValue,
                                             java.lang.Object source,
                                             java.lang.String viewAccessorName,
                                             java.lang.String viewAccAttrName,
                                             java.lang.String newValueVarName)
Checks if a value is in the list provided by a view accessor. If the given value is null or "", this method returns true immediately. This method is meant to be an alternative to using an ADF list validator.

Parameters:
newValue - the new value to be checked
source - the OAEntityImpl where the view accessor is defined
viewAccessorName - the name of the view accessor
viewAccAttrName - the value attribute of the value view object
newValueVarName - the name of the variable bound to the new value; null if no variable is bound to the new value
Returns:
true if the value is in the list provided by a view accessor, or if the value is null or ""

validateFlexfieldRequired

public static boolean validateFlexfieldRequired(java.lang.Object value,
                                                boolean isEmptyStringSameAsNull)
Returns true if the given value is not null.

Parameters:
value - the value to be validated
isEmptyStringSameAsNull - true if the empty string "" is treated as null
Returns:
true if the given value is not null

validateFlexfieldMinValue

public static boolean validateFlexfieldMinValue(java.math.BigDecimal value,
                                                java.math.BigDecimal min,
                                                boolean isNullAllowed)
Checks whether the given value is greater than or equal to the minimum value.

This method returns true if the given value is null.

Parameters:
value - the value
min - the minimum value
isNullAllowed - Deprecated. true if null is allowed
Returns:
true if the given value is greater than or equal to the minimum value
Throws:
java.lang.IllegalArgumentException - if the minimum value is null

validateFlexfieldMinValue

public static boolean validateFlexfieldMinValue(java.util.Date value,
                                                java.util.Date min,
                                                boolean isNullAllowed)
Checks whether the given value is greater than or equal to the minimum value. Objects such as java.sql.Date objects should be normalized before validation, as the comparison is done without lowering the precision.

This method returns true if the given value is null.

Parameters:
value - the value
min - the minimum value
isNullAllowed - Deprecated. true if null is allowed
Returns:
true if the given value is greater than or equal to the minimum value
Throws:
java.lang.IllegalArgumentException - if the minimum value is null

validateFlexfieldMaxValue

public static boolean validateFlexfieldMaxValue(java.math.BigDecimal value,
                                                java.math.BigDecimal max,
                                                boolean isNullAllowed)
Checks whether the given value is less than or equal to the maximum value.

This method returns true if the given value is null.

Parameters:
value - the value
max - the maximum value
isNullAllowed - Deprecated. true if null is allowed
Returns:
true if the given value is less than or equal to the maximum value
Throws:
java.lang.IllegalArgumentException - if the maximum value is null

validateFlexfieldMaxValue

public static boolean validateFlexfieldMaxValue(java.util.Date value,
                                                java.util.Date max,
                                                boolean isNullAllowed)
Checks whether the given value is less than or equal to the maximum value. Objects such as java.sql.Date objects should be normalized before validation, as the comparison is done without lowering the precision.

This method returns true if the given value is null.

Parameters:
value - the value
max - the maximum value
isNullAllowed - Deprecated. true if null is allowed
Returns:
true if the given value is less than or equal to the maximum value
Throws:
java.lang.IllegalArgumentException - if the maximum value is null

validateFlexfieldMaxLength

public static boolean validateFlexfieldMaxLength(java.lang.String value,
                                                 int maxLength,
                                                 boolean isNullAllowed)
Checks whether the length of the given value is equal to or less than the given length.

This method returns true if the given value is null.

Parameters:
value - the value to be validated
maxLength - the maximum length of a value
isNullAllowed - Deprecated. true if null is allowed
Returns:
true if the given value is valid; false otherwise

validateFlexfieldUppercase

public static boolean validateFlexfieldUppercase(java.lang.String value,
                                                 boolean isNullAllowed)
Checks whether the given value is in uppercase. The value is converted to a string by String.valueOf and is compared with its uppercase form:
String.valueOf(value).equals(String.valueOf(value).toUpperCase())
If the string is equal to its uppercase form, this method returns true. Empty string "" is a valid value.

This method returns true if the given value is null.

Parameters:
value - the value to be validated
isNullAllowed - Deprecated. true if null is allowed
Returns:
true if the given value is valid; false otherwise

validateFlexfieldNumericOnly

public static boolean validateFlexfieldNumericOnly(java.lang.String value,
                                                   boolean isNullAllowed)
Checks whether the given value contains numeric digits (0-9) only.

Empty string "" is considered invalid. It is not the same as null.

This method returns true if the given value is null.

Parameters:
value - the value to be validated
isNullAllowed - Deprecated. true if null is allowed
Returns:
true if the given value is valid; false otherwise

validateFlexfieldRJZFNumber

public static boolean validateFlexfieldRJZFNumber(java.lang.String value,
                                                  int length,
                                                  boolean isNullAllowed)
Checks whether the given value is a Right-Justified-Zero-Filled (RJZF) number of the given length. This is equivalent to checking whether the given value fits the given length and contains only numeric characters. For example, if the given length is 4, "0123", "0004", and "9001" are valid while "00001" and "02" are invalid. This zero-fill requirement applies only to values which contain only numeric digits. Values such as "aBc" and "000A" which contain non-numeric digits are considered valid as long as they are less than the given length.

Empty string "" is considered invalid, even when the given length is 0.

This method returns true if the given value is null.

Parameters:
value - the value to be validated
length - the length of the number
isNullAllowed - Deprecated. true if null is allowed
Returns:
true if the given value is valid; false otherwise

validateFlexfieldNumber

public static boolean validateFlexfieldNumber(java.math.BigDecimal value,
                                              int precision,
                                              java.lang.Integer scale,
                                              boolean isNullAllowed)
Checks whether the given value is an Oracle decimal number. This method converts the given BigDecimal object to a string by calling toPlainString(), and delegates the validation to validateFlexfieldNumber(String, int, int, boolean).

This method returns true if the given value is null.

Parameters:
value - the value to be validated
precision - the precision of the number
scale - the scale of the number
isNullAllowed - Deprecated. true if null is allowed
Returns:
true if the given value is valid; false otherwise
See Also:
#validateFlexfieldNumber(String, int, int, boolean)

validateFlexfieldNumber

public static boolean validateFlexfieldNumber(java.lang.String value,
                                              int precision,
                                              java.lang.Integer scaleObj,
                                              boolean isNullAllowed)
Checks whether the given value is an Oracle decimal number. In general, the value should match the pattern "[+|-]?[\d]*[\.]?[\d]*" with the following exceptions: Empty string "" is considered invalid. If the decimal separator is present, the scale cannot be zero or less than zero. For example, "100." is invalid.

This method returns true if the given value is null.

Parameters:
value - the value to be validated
precision - the precision of the number
scaleObj - the scale of the number
isNullAllowed - Deprecated. true if null is allowed
Returns:
true if the given value is valid; false otherwise
Throws:
java.lang.IllegalArgumentException - if the given precision or scale is invalid

validateFlexfieldDate

public static boolean validateFlexfieldDate(java.lang.String value,
                                            boolean isNullAllowed)
Checks whether the given value matches the pattern "yyyy/MM/dd HH:mm:ss" where "HH:mm:ss" should always be "00:00:00". The total length of the given string must be exactly 19. Fields should be zero-filled if they are shorter than the field patterns.

This method checks only the format of the given string. It cannot verify whether the date the string represents is a valid date within the user's calendar.

This method returns true if the given value is null.

Parameters:
value - the value to be validated
isNullAllowed - Deprecated. true if null is allowed
Returns:
true if the given value is valid; false otherwise

validateFlexfieldDateTime

public static boolean validateFlexfieldDateTime(java.lang.String value,
                                                boolean isNullAllowed)
Checks whether the given value matches the date format "yyyy/MM/dd HH:mm:ss". The total length of the given string must be exactly 19. Fields should be zero-filled if they are shorter than the field patterns.

This method checks only the format of the given string. It cannot verify whether the date the string represents is a valid date within the user's calendar.

This method returns true if the given value is null.

Parameters:
value - the value to be validated
isNullAllowed - Deprecated. true if null is allowed
Returns:
true if the given value is valid; false otherwise

validateFlexfieldTime5

public static boolean validateFlexfieldTime5(java.lang.String value,
                                             boolean isNullAllowed)
Checks whether the given value matches the date format "HH:mm". The length of the given string must be exactly 5. Fields should be zero-filled if they are shorter than the field patterns.

This method checks only the format of the given string. It cannot verify whether the time the string represents is a valid time within the user's calendar.

This method returns true if the given value is null.

Parameters:
value - the value to be validated
isNullAllowed - Deprecated. true if null is allowed
Returns:
true if the given valid is valid; false otherwise

validateFlexfieldTime8

public static boolean validateFlexfieldTime8(java.lang.String value,
                                             boolean isNullAllowed)
Checks whether the given value matches the date format "HH:mm:ss". The length of the given string must be exactly 8. Fields should be zero-filled if they are shorter than the field patterns.

This method checks only the format of the given string. It cannot verify whether the time the string represents is a valid time within the user's calendar.

This method returns true if the given value is null.

Parameters:
value - the value to be validated
isNullAllowed - Deprecated. true if null is allowed
Returns:
true if the given value is valid; false otherwise

handleEffectiveDateOperationsForSeedData

public void handleEffectiveDateOperationsForSeedData()
The seed data fwk needs this API to be made public. This API delegates to the EntityImpl implementation of this method which does date effective operations immediately rather than doing them during the post cycle.


isExtensibleFlexfield

protected boolean isExtensibleFlexfield()
Returns true if this entity has flexfield type extensible.

Returns:
true if this entity has flexfield type extensible.

isExtensibleTranslatableFlexfield

protected boolean isExtensibleTranslatableFlexfield()
Returns true if this entity has flexfield type extensible and is translatable.

Returns:
true if this entity has flexfield type extensible and is translatable.

isAttributeUpdateable

public boolean isAttributeUpdateable(int index)

Specified by:
isAttributeUpdateable in interface oracle.jbo.Row
Overrides:
isAttributeUpdateable in class oracle.jbo.server.EntityImpl

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

E22562-01

Copyright © 2011 Oracle. All Rights Reserved.