public class RestDCEntityImpl extends EntityImpl
| Modifier and Type | Field and Description |
|---|---|
protected java.util.Map<java.lang.String,java.lang.Object> |
mPopulatedRows |
CURRENT_VERSION, DML_DELETE, DML_INSERT, DML_UPDATE, MAXATTRCONST, mOrigData, ORACLE_ROWID_COLUMN, ORIGINAL_VERSION, PROPERTY_FORCE_BATCH_ON_CHILDREN, PROPERTY_LOOKUP_ACCESSOR, PROPERTY_LOOKUP_ATTR_NAME, PROPERTY_LOOKUP_DISPATTR, PROPERTY_LOOKUP_TYPE, PROPERTY_MULTIPLE_VERSION_NUMBER_UPDATE, SKIP_ON_ATTR_ERR, SYS_EFFDT_ROW_SPLIT, TRANS_ORIGINAL_VERSION, XML_CI_CHANGED, XML_PK_CHANGED, XML_PK_CHANGED_YESPROPERTY_SERVICE_RESOURCE_CONTAINER_PATHSTATUS_DEAD, STATUS_DELETED, STATUS_MODIFIED, STATUS_UNMODIFIEDEFFDT_ADJUST_EFFECTIVE_END_DATE_MODE, EFFDT_ADJUST_EFFECTIVE_START_DATE_MODE, 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_INSERT_MODE, 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_NEWXML_IGNORE_DEPTH_COUNT, XML_OPT_ALL_ROWS, XML_OPT_ASSOC_CONSISTENT, XML_OPT_CHANGES_ONLY, XML_OPT_LIMIT_RANGE, XML_PASSIVATION_USERESERVED_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_DEFRESERVED_VAR_VALUE| Constructor and Description |
|---|
RestDCEntityImpl() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
doDML(int operation,
TransactionEvent e)
Performs INSERT/UPDATE/DELETE processing for the row.
|
java.lang.Object |
getAttributeInternal(int index)
Gets the attribute value by index.
|
protected java.util.Map |
getDataBean() |
protected java.lang.String |
getLogDump() |
protected RestDataControl |
getRestDataControl() |
protected void |
initPopulatedRows() |
protected void |
populateAttrMap() |
java.lang.Object |
reloadDependentAttribute(java.lang.String attributeName)
Deprecated.
|
protected void |
setDataBean(java.util.Map map) |
addToTransactionManager, addToValidationListeners, addTransactionPostListener, addTransactionPostListenerNoCheck, afterCommit, afterRemove, afterRollback, appendXMLElementNodes, appendXMLElementNodesForAttrs, beforeCommit, beforeRollback, bindDMLStatement, bindWhereClause, buildDMLStatement, buildRefreshSQL, buildWhereClause, callPostChanges, checkConsistency, clearAttributeException, compare, copyChangedNonKeyAttributes, copyEffDtEntity, create, createArray, createAssociationAccessorRS, createAssociationAccessorVO, createBlob, createClob, createEntityAttrHints, createEntityViewLinkAccessorRS, createEntityViewLinkAccessorVO, createNClob, createRef, createStruct, createUnqualifiedRowSet, createViewAccessorRS, createViewAccessorRS, doAllowsOperation, doDMLForCascadeUpdate, doDMLWithLOBs, doEffectiveDateRangeOperation, domainToBeModified, donePostingAll, doRefreshSQL, doSelect, doSelectForAltKey, eventsDebugOnly, fetchExprValueSupplierOverrideRow, findAssociationAccessorVO, findEntityViewLinkAccessorVO, findOrCreateAssociationAccessorRS, findOrCreateLocalViewObject, findOrCreateViewAccessorRS, findOrCreateViewAccessorRS, findViewAccessorDef, findViewAccessorVO, getAltKey, getAttribute, getAttribute, getAttribute, getAttributeChangedCount, getAttributeCount, getAttributeHints, getAttributeHints, getAttributeIndexOf, getAttributeNames, getAttributeValue, getAttributeValues, getAttrInvokeAccessor, getBaseAttributeCount, getChangeIndicator, getComparator, getContainerEntity, getDBTransaction, getDynamicAttributeCount, getDynamicAttributeValue, getEffDtInitEndDateValue, getEffectiveDate, getEntityCache, getEntityCacheInternal, getEntityDef, getEntityState, getExprVarVal, getHistoryContextForAttribute, getKey, getKeyForLogger, getListBindingRSI, getListBindings, getLookupDescription, getOrigData, getParentVariableManager, getPKBasedRef, getPostedAttribute, getPostState, getPrimaryKey, getRefreshSQLKeyAttrs, getRowOperations, getSQLBuilder, getStateAsString, getStringForLogger, getStructureDef, getTransactionListeners, getTransactionListenersList, getTransPostHandle, getValidationListeners, getValidationListenersList, handleActivatedRowNotFound, handleEffectiveDateOperations, handleEffectiveDateRowCreate, handleEffectiveDateRowDelete, handleEffectiveDateRowUpdate, handleListBindingMismatch, handlePostChangesError, hasAttributeException, hasListBindings, hasUpdatePrivilege, initAttributeValuesFromNameValuePairDuringCreate, initBusLogicGroupDefaults, initBusLogicGroupDfltExprAttrs, initData, initDefaultExpressionAttributes, initDefaults, initialize, isAttributeChanged, isAttributeChanged, isAttributeChangedInTransaction, isAttributePopulated, isAttributePopulated, isAttributeUpdateable, isDead, isInCache, isInvalid, isLocked, isLookupIdValid, isOrigDataEmpty, isOrigDataPopulated, isPostedToDB, isSkipDML, isTransientTransactionListener, isTransientTransactionPostListener, isValid, isViewAccessorAttribute, lock, lockTopLevelEntity, markViewAccessorsDirty, notifyAttributesAndBlgChanged, notifyAttributesChanged, notifyAttributesChanged, notifyEntityActivated, notifyEventRaised, outputEventString, populateAttribute, populateAttribute, populateAttribute, populateAttributeAsChanged, postChanges, prepareForBatchDML, prepareForDML, prepareVOToFetchNextEffDtRows, prepareVOToFetchNextEffDtRows, prepareVOToFetchNextEffDtSeqRows, prepareVOToFetchNextEffDtSeqRows, prepareVOToFetchPrevEffDtRows, prepareVOToFetchPrevEffDtRows, prepareVOToFetchPrevEffDtSeqRows, prepareVOToFetchPrevEffDtSeqRows, readAttrsFromXML, readXML, refresh, refreshFKInNewContainees, registerAttributeException, remove, removeAndRetain, removedByAnotherTrans, removeFromCollection, removeTransactionPostListener, resetPKBasedRef, revert, revertChangesToEffDtEntity, setAttribute, setAttribute, setAttributeChanged, setAttributeInternal, setAttributeValues, setAttrInvokeAccessor, setDynamicAttributeValue, setEffectiveDateMode, setEntityDef, setInvalid, setLocked, setNewRowState, setPostedToDB, setTransPostHandle, toString, validate, validateDateEffectivity, validateEntity, variablesAdded, vetoRemoveWithDetailsaddListBindingsForAttribute, clearAllExceptions, clearAttributeException, clearRowExceptions, createXMLDefinition, doAutoClearAttribute, ensureVariableManager, findAttrAndGetIndex, findListBindingName, forceFilterListExecute, getAllExceptions, getAttributeInternal, getAttributeSecurityHints, getAttributeSecurityHints, getCombinedAttrNames, getEffectiveDateMode, getExprMethodVal, getExprVarValType, getGlobalOperations, getHints, getMessageBundleClass, getMethodKind, getResourceBundleDef, getRowExceptions, getSecurityHints, getVariableManager, getViewAccessorResultIndex, hasAttributeException, hasDeferredExceptions, hasVariables, invokeMethod, isRefreshRequired, isRefreshRequired, isRefreshRequired, lookupListBinding, printXMLDefinition, readXML, refreshViewAccessor, refreshViewAccessor, refreshViewAccessor, registerRowException, setAttributeInternal, setExprVarVal, setInMultiSetter, skipFilterListOnKeyAttributes, writeXML, writeXML, writeXML, writeXMLclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetAttributeSecurityHints, getAttributeSecurityHints, getEffectiveDateMode, getSecurityHintsprotected java.util.Map<java.lang.String,java.lang.Object> mPopulatedRows
protected void doDML(int operation,
TransactionEvent e)
EntityImplThis method calls buildDMLStatement() to build the DML string based on the DML operation to be performed. For insert and update, the DML statement will only set the values that have been modified/changed. Other attributes do not participate in the DML.
Next, bindDMLStatement() is called to bind the DML statement with values to be updated and any other where-clause and returning parameters. After this, it executes the jdbc-statement or adds the current DML as a batch operation into a batched jdbc-statement, to be executed in Transaction.postChanges().
Here is sample code for overriding the doDML() method of any Entity Object's EntityImpl class to invoke a stored procedure, and pass arguments. For example, given a PL/SQL stored procedure like:
PROCEDURE updateDepartment( p_Deptno NUMBER,
p_Dname VARCHAR2,
p_Loc VARCHAR2 )
The code to call it when an Entity is updated would look like this: Note: The following code assumes only updates are possible, disallowing inserts and deletes by ignoring them in the doDML() method.
public void doDML(int operation, TransactionEvent e) {
// Don't call the superclass. This procedure handles only updates
//super.doDML(operation, e);
CallableStatement stmt = null;
// ONLY Perform updates, this Entity won't allow inserts/deletes.
if (operation == DML_UPDATE)
{
// Prepare JDBC CallableStatement with the Stored Procedure Call
String updateStr = "{call updateDepartment(?,?,?)}";
stmt = getDBTransaction().createCallableStatement(updateStr, 1);
try
{
// Bind the Statement Parameters and Execute this Statement
stmt.setString(1, getDeptno().toString());
stmt.setString(2, getDname().toString());
stmt.setString(3, getLoc().toString());
stmt.execute();
}
catch (Exception ex)
{
throw new oracle.jbo.JboException(ex);
}
finally
{
try
{
stmt.close();
}
catch (Exception nex)
{
}
}
}
}
doDML in class EntityImploperation - the integer representation of DML_INSERT, DML_UPDATE, or
DML_DELETE.e - this Entity Object's transaction event.protected void initPopulatedRows()
protected void setDataBean(java.util.Map map)
protected java.util.Map getDataBean()
protected void populateAttrMap()
protected java.lang.String getLogDump()
public java.lang.Object getAttributeInternal(int index)
EntityImplThis method is not typically overridden. However, it could be overridden, for example, to return numeric values stored as integers, in a two-decimal format.
getAttributeInternal in class EntityImplindex - the index of the attribute.@Deprecated @Concealed public java.lang.Object reloadDependentAttribute(java.lang.String attributeName)
protected RestDataControl getRestDataControl()