|
Oracle Fusion Middleware extensions for Applications Core API Reference 11g Release 1 (11.1.2) E22562-02 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object oracle.jbo.server.RowImpl oracle.jbo.server.EntityImpl oracle.apps.fnd.applcore.oaext.model.OAEntityImpl
public class OAEntityImpl
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:
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.fnd:OA_TRANSLATABLE
is
set, it will override the above default behavior as follows:
true
, the attribute
will be considered a translatable attribute.
false
, the attribute
will not be considered a translatable attribute.
OA_TL_ENTITY_ACCESSOR
on the base entity to the name of the accessor.
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 ,
, or
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 |
---|
public static final java.lang.String RCS_ID
public static final java.lang.String SEED_DATA_USER
protected static final int UPDATE
protected static final int INSERT
protected static final int DELETE
protected static final int SELECT
protected static final int LOCK
Constructor Detail |
---|
public OAEntityImpl()
Method Detail |
---|
protected void doDML(int operation, oracle.jbo.server.TransactionEvent event)
#insertRow(TransactionEvent event)
,
#updateRow(TransactionEvent event)
, or
#deleteRow(TransactionEvent event)
method.
Returns the cached sql statement depending on the type
doDML
in class oracle.jbo.server.EntityImpl
operation
- one of
INSERT
,
UPDATE
,
DELETE
, or
SELECT
.event
- the event to be processed.public boolean isPlsqlEntity()
protected void insertRow()
protected void updateRow()
protected void deleteRow()
protected void lockRow()
protected void doSelect(boolean lock)
doSelect
in class oracle.jbo.server.EntityImpl
lock
- true if we should use "for update" in the queryprotected void changeSessionLanguageForTL(java.lang.String newLangCode)
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.
newLangCode
- the new language code for the sessionprotected boolean isActivityPublishingEnabled()
protected java.lang.String getActivityStreamServiceId()
protected java.lang.String[] getActivityActorsGUIDs()
protected java.lang.String[] getAdditionalServiceIds()
protected java.lang.String getActivityObjectTypeNames()
protected void notifyEventRaised(java.lang.String eventName, java.util.ArrayList<oracle.jbo.server.EventAttrVals> payload)
notifyEventRaised
in class oracle.jbo.server.EntityImpl
protected java.lang.String getCurrentTLRowLangCode()
protected java.lang.Object getHistoryContextForAttribute(oracle.jbo.server.AttributeDefImpl attr)
getHistoryContextForAttribute
in class oracle.jbo.server.EntityImpl
public oracle.jbo.AttributeDef getAttributeDef(java.lang.String attributeName)
attributeName
- the name of the attribute
protected void validateEntity()
validateEntity
in class oracle.jbo.server.EntityImpl
public void lock()
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.
lock
in interface oracle.jbo.Row
lock
in class oracle.jbo.server.EntityImpl
protected void prepareForDML(int operation, oracle.jbo.server.TransactionEvent e)
Example:
In the following example, we delete all the detail records, when master
is marked for deletion.
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
protected void prepareForDML(int operation, TransactionEvent e)
{
if (operation == DML_DELETE)
{
deleteAllDetailRecords();
}
super.prepareForDML(operation, e);
}
prepareForDML
in class oracle.jbo.server.EntityImpl
operation
- action performed on the row. It can be one of the
following:
e
- this Entity Object's transaction event.#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)
protected void handlePostChangesError()
handlePostChangesError
in class oracle.jbo.server.EntityImpl
public oracle.jbo.server.EntityDefImpl getEntityDef()
getEntityDef
in class oracle.jbo.server.EntityImpl
protected oracle.jbo.server.EntityImpl getContainerEntity()
getContainerEntity
in class oracle.jbo.server.EntityImpl
null
public boolean isTranslatable()
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.
isTranslatableAttribute(int)
public static boolean isTranslatable(OAViewObjectImpl vo)
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.
isTranslatableAttribute(int)
,
isTranslatable()
public java.util.HashMap getHistoryColumnsOfTLEntity(java.lang.String lang)
lang
- - Language for which the history column information
needs to be retrieved.
public java.lang.String[] getTranslatedLanguages()
A record is considered translated if LANGUAGE and SOURCE_LANG columns are equal.
public boolean isTranslated()
getTranslatedLanguages()
would return more than one language.
getTranslatedLanguages()
public java.lang.String[] getInstalledLanguages()
getBaseLanguage()
public java.lang.String getBaseLanguage()
getInstalledLanguages()
public static OATranslatedEntityStaticInfo getTranslatedEntityStaticInfo(oracle.jbo.server.EntityDefImpl entityDef)
public OATranslatedEntityStaticInfo getTranslatedEntityStaticInfo()
protected java.util.Map getTranslatedAttributesIndexMap()
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;
}
protected java.util.Map getKeyAttributesIndexMap()
public boolean isTranslatableAttribute(int baseIndex)
baseIndex
- attribute index in the Entity.
public static java.lang.Boolean isTranslatable(oracle.jbo.server.ViewAttributeDefImpl attrDef)
attrDef
- of ViewAttributeDefImpl type
public void setNewRowState(byte state)
setNewRowState
in interface oracle.jbo.Row
setNewRowState
in class oracle.jbo.server.EntityImpl
state
- entity state to be set on the new row.public void remove()
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.
remove
in interface oracle.jbo.Row
remove
in class oracle.jbo.server.EntityImpl
protected void create(oracle.jbo.AttributeList nameValuePair)
create
in class oracle.jbo.server.EntityImpl
nameValuePair
- name/value pair to initialize the entitypublic java.lang.Object getAttributeInternal(int baseIndex)
getAttributeInternal
in class oracle.jbo.server.EntityImpl
baseIndex
- specifies which attribute.
setAttributeInternal(int, Object)
public java.lang.Object getAttribute(int baseIndex, java.lang.String lang)
baseIndex
- specifies which attribute.lang
- the language handle (one of "US", "JP", ...).
setAttribute(int, String, Object)
public void setAttribute(int index, java.lang.String lang, java.lang.Object val)
index
- the attribute index.lang
- the language handle (one of "US", "JP", ...).val
- The value of the attributegetAttribute(int, String)
public void setAttributeInternal(int index, java.lang.Object val)
setAttributeInternal
in class oracle.jbo.server.EntityImpl
public void populateAttributeAsChanged(int index, java.lang.Object value)
populateAttributeAsChanged
in class oracle.jbo.server.EntityImpl
index
- value
- protected void populateAttributeAsChanged(int index, java.lang.String lang, java.lang.Object value)
public java.lang.Object getPostedAttribute(int index)
getPostedAttribute
in class oracle.jbo.server.EntityImpl
index
- attribute index.
protected java.lang.StringBuffer buildDMLStatement(int operation, oracle.jbo.server.AttributeDefImpl[] allAttrs, oracle.jbo.server.AttributeDefImpl[] retCols, oracle.jbo.server.AttributeDefImpl[] retKeys, boolean batchMode)
buildDMLStatement
in class oracle.jbo.server.EntityImpl
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
bindDMLStatement
in class oracle.jbo.server.EntityImpl
java.sql.SQLException
public void postChanges(oracle.jbo.server.TransactionEvent e)
postChanges
in interface oracle.jbo.server.TransactionPostListener
postChanges
in class oracle.jbo.server.EntityImpl
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)
appId
- Application IdcategoryCode
- Document Sequence Category CodesobId
- 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 DateseqVal
- Document Sequence Value to use in Manual ModesuppressWarn
- Suppress warning (Y/N/null)suppressError
- Suppress Error (valid values are Y/N/null)
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)
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)
appId
- Application IdcategoryCode
- Document Sequence Category CodesobId
- 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 DateseqVal
- Document Sequence Value to use in Manual ModesuppressWarn
- Suppress warning (Y/N/null)suppressError
- Suppress Error (valid values are Y/N/null)
prepareForDML(int operation, TransactionEvent e)
public void refresh(int refMode)
refresh
in interface oracle.jbo.Row
refresh
in class oracle.jbo.server.EntityImpl
refMode
- refresh mode for this entity.protected void doDMLWithLOBs(int operation, oracle.jbo.server.TransactionEvent e)
doDMLWithLOBs
in class oracle.jbo.server.EntityImpl
protected boolean checkConsistency(oracle.jbo.server.SparseArray target, boolean lock)
checkConsistency
in class oracle.jbo.server.EntityImpl
public java.lang.Long getSetId(java.lang.String foreinKeyAttribute)
null
will be returned.
foreinKeyAttribute
- the foreign key attribute name.
-1
if the reference is not Set Id enabled.protected void refreshViewAccessor(oracle.jbo.server.ViewAccessorDef va, java.util.Map attrNameValues, oracle.jbo.RowSet rs)
refreshViewAccessor
in class oracle.jbo.server.RowImpl
protected boolean isRefreshRequired(oracle.jbo.server.ViewAccessorDef va, java.lang.String[] attrNames, java.lang.Object[] attrValues)
isRefreshRequired
in class oracle.jbo.server.RowImpl
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.
public java.lang.String getCurrentLanguage()
public java.lang.String getWhoUser()
public static java.sql.Date getCurrentSystemDate()
public java.sql.Timestamp getCurrentDBTime()
public java.sql.Timestamp getCurrentDBDate()
getCurrentDBTime()
public java.sql.Timestamp getCurrentDBTimeWithNanos()
public java.sql.Date getCurrentDatabaseDate()
java.sql.Date
instance.
protected void appendXMLElementNodes(org.w3c.dom.Document xmlDoc, org.w3c.dom.Node node, int nContainees, long options, oracle.jbo.server.AttributeDefImpl[] attrs)
appendXMLElementNodes
in class oracle.jbo.server.EntityImpl
protected boolean readAttrsFromXML(org.w3c.dom.Element element, oracle.jbo.server.AttributeDefImpl[] attributeDefImpl, int i)
readAttrsFromXML
in class oracle.jbo.server.EntityImpl
protected boolean containsFlexfields()
public java.lang.Object getFlexfieldParameterValue(java.lang.String localFlexID, java.lang.String paramName)
localFlexID
- the local ID of the flexfield usageparamName
- the name of the parameter
public java.lang.String getFlexfieldStructureCode(java.lang.String sinAttrName)
Gets the flexfield structure code based on the structure instance number attribute.
sinAttrName
- the name of the structure instance number attribute
protected java.lang.String getFlexfieldStructureCode(long appid, java.lang.String flexCode, long sin)
appid
- the application IDflexCode
- the flexfield codesin
- the structure instance number
public static java.lang.String toFlexfieldString(java.math.BigDecimal n, int precision, int scale)
n
- the numberprecision
- the precision of the numberscale
- the scale of the number
public static java.lang.String toFlexfieldString(java.sql.Date d)
d
- the date
public static java.lang.String toFlexfieldStringDate(java.sql.Timestamp t)
t
- the timestamp
public static java.lang.String toFlexfieldStringDateTime(java.sql.Timestamp t)
t
- the timestamp
public static java.lang.String toFlexfieldStringTime5(java.sql.Timestamp t)
t
- the timestamp
public static java.lang.String toFlexfieldStringTime8(java.sql.Timestamp t)
t
- the timestamp
public static java.math.BigDecimal parseFlexfieldNumber(java.lang.String s)
s
- the string to be parsed
public static java.sql.Timestamp parseFlexfieldDate(java.lang.String s)
s
- the string to be parsed
public static java.sql.Timestamp parseFlexfieldDateTime(java.lang.String s)
s
- the string to be parsed
public static java.sql.Timestamp parseFlexfieldTime5(java.lang.String s)
s
- the string to be parsed
public static java.sql.Timestamp parseFlexfieldTime8(java.lang.String s)
s
- the string to be parsed
public static boolean validateFlexfieldValue(java.lang.Object newValue, java.lang.Object source, java.lang.String viewAccessorName, java.lang.String viewAccAttrName, java.lang.String newValueVarName)
true
immediately.
This method is meant to be an alternative to using an ADF list validator.
newValue
- the new value to be checkedsource
- the OAEntityImpl
where the view accessor is
definedviewAccessorName
- the name of the view accessorviewAccAttrName
- the value attribute of the value view objectnewValueVarName
- the name of the variable bound to the new value;
null if no variable is bound to the new value
public static boolean validateFlexfieldRequired(java.lang.Object value, boolean isEmptyStringSameAsNull)
value
- the value to be validatedisEmptyStringSameAsNull
- true if the empty string "" is treated as null
public static boolean validateFlexfieldMinValue(java.math.BigDecimal value, java.math.BigDecimal min, boolean isNullAllowed)
This method returns true
if the given value is null.
value
- the valuemin
- the minimum valueisNullAllowed
- Deprecated. true if null is allowed
java.lang.IllegalArgumentException
- if the minimum value is nullpublic static boolean validateFlexfieldMinValue(java.util.Date value, java.util.Date min, boolean isNullAllowed)
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.
value
- the valuemin
- the minimum valueisNullAllowed
- Deprecated. true if null is allowed
java.lang.IllegalArgumentException
- if the minimum value is nullpublic static boolean validateFlexfieldMaxValue(java.math.BigDecimal value, java.math.BigDecimal max, boolean isNullAllowed)
This method returns true
if the given value is null.
value
- the valuemax
- the maximum valueisNullAllowed
- Deprecated. true if null is allowed
java.lang.IllegalArgumentException
- if the maximum value is nullpublic static boolean validateFlexfieldMaxValue(java.util.Date value, java.util.Date max, boolean isNullAllowed)
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.
value
- the valuemax
- the maximum valueisNullAllowed
- Deprecated. true if null is allowed
java.lang.IllegalArgumentException
- if the maximum value is nullpublic static boolean validateFlexfieldMaxLength(java.lang.String value, int maxLength, boolean isNullAllowed)
This method returns true
if the given value is null.
value
- the value to be validatedmaxLength
- the maximum length of a valueisNullAllowed
- Deprecated. true if null is allowed
public static boolean validateFlexfieldUppercase(java.lang.String value, boolean isNullAllowed)
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.
value
- the value to be validatedisNullAllowed
- Deprecated. true if null is allowed
public static boolean validateFlexfieldNumericOnly(java.lang.String value, boolean isNullAllowed)
Empty string "" is considered invalid. It is not the same as null.
This method returns true
if the given value is null.
value
- the value to be validatedisNullAllowed
- Deprecated. true if null is allowed
public static boolean validateFlexfieldRJZFNumber(java.lang.String value, int length, boolean isNullAllowed)
Empty string "" is considered invalid, even when the given length is 0.
This method returns true
if the given value is null.
value
- the value to be validatedlength
- the length of the numberisNullAllowed
- Deprecated. true if null is allowed
public static boolean validateFlexfieldNumber(java.math.BigDecimal value, int precision, java.lang.Integer scale, boolean isNullAllowed)
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.
value
- the value to be validatedprecision
- the precision of the numberscale
- the scale of the numberisNullAllowed
- Deprecated. true if null is allowed
#validateFlexfieldNumber(String, int, int, boolean)
public static boolean validateFlexfieldNumber(java.lang.String value, int precision, java.lang.Integer scaleObj, boolean isNullAllowed)
This method returns true
if the given value is null.
value
- the value to be validatedprecision
- the precision of the numberscaleObj
- the scale of the numberisNullAllowed
- Deprecated. true if null is allowed
java.lang.IllegalArgumentException
- if the given precision or scale is invalidpublic static boolean validateFlexfieldDate(java.lang.String value, boolean isNullAllowed)
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.
value
- the value to be validatedisNullAllowed
- Deprecated. true if null is allowed
public static boolean validateFlexfieldDateTime(java.lang.String value, boolean isNullAllowed)
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.
value
- the value to be validatedisNullAllowed
- Deprecated. true if null is allowed
public static boolean validateFlexfieldTime5(java.lang.String value, boolean isNullAllowed)
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.
value
- the value to be validatedisNullAllowed
- Deprecated. true if null is allowed
public static boolean validateFlexfieldTime8(java.lang.String value, boolean isNullAllowed)
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.
value
- the value to be validatedisNullAllowed
- Deprecated. true if null is allowed
public void handleEffectiveDateOperationsForSeedData()
protected boolean isExtensibleFlexfield()
protected boolean isExtensibleTranslatableFlexfield()
public boolean isAttributeUpdateable(int index)
isAttributeUpdateable
in interface oracle.jbo.Row
isAttributeUpdateable
in class oracle.jbo.server.EntityImpl
|
Oracle Fusion Middleware extensions for Applications Core API Reference 11g Release 1 (11.1.2) E22562-02 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |