|
Oracle Fusion Middleware Java API Reference for Oracle ADF Model 11g Release 1 (11.1.1.7.0) E10653-08 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.util.AbstractMap
oracle.jbo.common.JboAbstractMap
oracle.adf.model.binding.DCDataControl
public abstract class DCDataControl
The application class that manages connection to a Data Provider object. The DCDataControl class provides:
ApplicationModule
,
Transaction
,
DCTransactionStateListener
,
DCErrorHandler
Nested Class Summary |
---|
Nested classes/interfaces inherited from class java.util.AbstractMap |
---|
java.util.AbstractMap.SimpleEntry<K,V>, java.util.AbstractMap.SimpleImmutableEntry<K,V> |
Nested classes/interfaces inherited from interface oracle.adf.model.DataControl |
---|
DataControl.DataChangeEventPolicy |
Nested classes/interfaces inherited from interface java.util.Map |
---|
java.util.Map.Entry<K,V> |
Field Summary | |
---|---|
static byte |
ABSTRACT
|
static java.lang.String |
GET_ApplicationModule
|
static java.lang.String |
GET_dataProvider
|
static java.lang.String |
GET_DataProvider
|
static java.lang.String |
GET_DCFrame
|
static java.lang.String |
GET_MethodResults
|
static java.lang.String |
GET_Name
|
static byte |
JCLIENT
|
protected java.util.ArrayList |
mBindingContainerList
|
protected java.lang.String |
mDataControlFrameName
|
protected java.lang.Object |
mDataProvider
|
protected DCErrorHandler |
mErrorHandler
|
protected boolean |
mErrorHandlerActive
|
protected DCErrorHandler |
mErrorHandlerThrow
|
static java.lang.String |
METHOD_RESULT
|
protected boolean |
mIsReleased
|
protected boolean |
mIsReleasing
|
protected boolean |
mIsRoot
|
protected LocaleContext |
mLocaleCtx
|
protected java.lang.Object |
mLock
|
protected java.lang.String |
mName
|
protected DCDataControl |
mParent
|
protected DCDataControl |
mRootApplication
|
protected java.util.ArrayList |
mStatusBarList
DCStatusBarInterface objects that are notified with status bar messages. |
protected java.util.ArrayList |
mTxnListeners
DCTransactionStateListener objects that are notified of commit or rollback events when generated from the data-provider layer. |
protected java.lang.Object |
mUserData
|
static byte |
OPER_CTRL_BINDING_VALIDATION
|
static byte |
OPER_DATA_ROW_CREATE
|
static byte |
OPER_DATA_ROW_CREATE_ONLY
|
static byte |
OPER_DATA_ROW_REMOVE
|
static byte |
OPER_DATA_ROW_UPDATE
|
static byte |
OPER_EXECUTE
|
static byte |
OPER_FIND_MODE
|
static byte |
OPER_SORT_COLLECTION
|
static java.lang.String |
PNAME_Type
|
static int |
REL_ALL_REFS
|
static int |
REL_DATA_REFS
|
static int |
REL_VIEW_REFS
|
static int |
REL_WEAK_DATA_REFS
|
protected static java.lang.String |
VCCRITERIA
|
protected static java.lang.String |
VCCRITERIAITEM
|
protected static java.lang.String |
VCCRITERIAITEMVALUE
|
protected static java.lang.String |
VCCRITERIAOPERATOR
|
Fields inherited from class oracle.jbo.common.JboAbstractMap |
---|
MAP_NULL_VALUE |
Fields inherited from interface oracle.adf.model.DataControl |
---|
DATACHANGE_EVENT_POLLINGMODE |
Constructor Summary | |
---|---|
protected |
DCDataControl()
|
protected |
DCDataControl(boolean root,
java.lang.Object userData)
Constructs a root DCDataControl object that connects to a Data Provider of the given name. |
Method Summary | |
---|---|
protected java.util.List |
_internal_dbg_debug_data()
framework use only |
void |
addBindingContainer(DCBindingContainer formBnd)
Register the given form binding object with this application. |
void |
addBindingContainer(java.lang.String name,
DCBindingContainer formBnd)
Register the given form binding object with this application with the given name. |
void |
addBindingContainer(java.lang.String name,
DCBindingContainer formBnd,
DCBindingContainerDef formDef)
Register the given form binding object with this application with the given name. |
void |
addBindingContainerRef(NamedObjectImpl formBnd)
Register the given form binding object with this application. |
void |
addBindingWithExc(java.lang.String name)
|
protected void |
addDataChangeListener(DCIteratorBinding iter)
subclasses to override and add iteratorbinding as a DataChangeListener on the appropriate collection. |
abstract void |
addDataChangeListener(java.lang.Object dataObj,
DataChangeListener dcl)
|
protected DCBindingContainer |
addOrCreateBindingContainer(java.lang.String name,
DCBindingContainer formBnd,
DCBindingContainerDef formDef,
boolean initialize,
boolean replace)
|
void |
addStatusBarInterface(DCStatusBarInterface statusBar)
Add the given status bar object to this application's list. |
void |
addTransactionStateListener(DCTransactionStateListener statusBar)
Adds listeners like StatusBar and NavigationBars that have to listen and react to transaction's modified state. |
protected void |
afterReportException(DCBindingContainer formBnd,
java.lang.Exception ex)
|
protected abstract void |
applySortCriteria(DCIteratorBinding iter,
SortCriteria[] sortby)
|
abstract void |
applyViewCriteria(ViewCriteria vc,
DCIteratorBinding iter,
RowSetIterator rsi)
Internal: Applications should not use this method. |
protected void |
beforeReportException(DCBindingContainer formBnd,
java.lang.Exception ex)
|
void |
beginRequest(java.util.HashMap requestCtx)
Invoked in some contexts to signal the beginning of a model request. |
protected void |
cacheMethodResult(DCInvokeMethod method,
java.lang.Object result,
java.lang.Object paramVals)
|
void |
callCommitTransaction()
Helper method that invokes beforeSaveTransaction event on all DCPanelBinding objects and then invokes the BC4J transaction's commit() method to save all changes to the database. |
void |
cleanup()
|
protected abstract void |
clearIteratorBinding(DCIteratorBinding iter)
|
void |
commitTransaction()
Invokes the BC4J transaction's commit() method to save all changes to the database. |
protected void |
connect()
If this DCDataControl is root, this method invokes the corresponding BC4J Transaction's connect() method to create a database connection. |
RowSetIterator |
createAccessorRowSetIterator(RowSetIterator masterRSI,
DCIteratorBinding iter,
java.lang.String accName,
java.lang.String beanClass)
creates a accessor RSI using the current or the first row of the masterRSI and calling the get<accName> method on it to get the RSI dataprovider. |
RowSetIterator |
createAccessorRowSetIterator(RowSetIterator masterRSI,
Row row,
DCIteratorBinding iter,
java.lang.String accName,
java.lang.String beanClass)
|
protected RowSetIterator |
createAccessorRowSetIterator(RowSetIterator masterRSI,
Row row,
DCIteratorBinding iter,
java.lang.String accName,
java.lang.String beanClass,
boolean trackMaster)
|
protected RowSetIterator |
createAccessorRowSetIteratorForMasterRow(DCIteratorBinding iter,
RowSetIterator masterRSI,
Row row,
java.lang.Object result,
java.lang.String accName,
java.lang.String beanClass,
boolean trackMaster)
|
DCBindingContainer |
createBindingContainer(java.lang.String name,
java.lang.String formDefName,
boolean initialize)
Create a DCBindingContainer instance using the given name and form definition. |
DCBindingContainer |
createBindingContainerInstance(java.lang.String mBindingContainerClassName)
|
java.lang.Object |
createRowData(DCRowContext ctx)
Create a new row for the iterator associated with the given iterator-binding at the given index and return the new row. |
RowSetIterator |
createRowSetIteratorImpl(DCIteratorBinding iter,
java.lang.String defName,
java.lang.Object sourceObj,
RowSetIterator master)
Creates an RSI for a given iterator and source collection/object. |
protected abstract RowSetIterator |
createRowSetIteratorImpl(java.lang.String defName,
java.lang.Object sourceObj,
RowSetIterator master)
Create a DCRowSetIteratorImpl or a subclass thereof for the give defName element types, using the given source collection/object and optionally the master RSI if there is a dependency defined on the master. |
java.lang.Object |
createSavepoint()
|
java.io.Serializable |
createSnapshot()
Creates a snapshot of the state of the DataControl. |
ViewCriteria |
createViewCriteria(DCIteratorBinding iter)
Internal: Applications should not use this method. Create a new viewCriteria associated with the given iterator binding's collection. |
boolean |
discardIfDefinitionChanged()
|
void |
displayStatus(DCIteratorBinding iterBinding,
java.lang.String msgId,
java.lang.Object[] params)
Send the given message Id and parameter list along with the current iterator binding object to all status bar instances registered with this Application. |
void |
displayStatus(java.lang.String msg)
Send the given message to all status bar interface objects registered with this application. |
void |
doneCommit(TransactionStateEvent event)
Implementation of oracle.jbo.TransactionStateListener interface. |
void |
doneRollback(TransactionStateEvent event)
Implementation of oracle.jbo.TransactionStateListener interface. |
void |
endRequest(java.util.HashMap requestCtx)
Invoked in some contexts to signal the end of a model request. |
protected abstract void |
executeIteratorBinding(DCIteratorBinding iterBinding)
Implies forced execute of the collection that this iterator binding is bound to. |
protected abstract void |
executeIteratorBindingIfNeeded(DCIteratorBinding iterBinding)
This method is invoked when a bindingcontainer is 'refreshing' itself before it's data is displayed. |
void |
executeIteratorBindingWithParams(DCIteratorBinding iter,
OperationParameter[] params,
java.lang.Object[] paramVals)
|
DCBindingContainer |
findBindingContainer(java.lang.String name)
Return the DCBindingContainer instance registered with this DCAppication with the given name. |
RowSetIterator |
findOrCreateAccessorRowSetIterator(DCIteratorBinding masterIter,
DCIteratorBinding iter,
java.lang.String accName,
java.lang.String beanClass)
|
RowSetIterator |
findOrCreateAccessorRowSetIterator(RowSetIterator masterRSI,
DCIteratorBinding iter,
java.lang.String accName,
java.lang.String beanClass)
Deprecated. since 10.1.2 |
RowSetIterator |
findOrCreateMethodRowSetIterator(DCIteratorBinding iter,
java.lang.String beanClass,
java.lang.Object result)
|
protected RowSetIterator |
findOrCreateRowSetIteratorImpl(DCIteratorBinding iter,
java.lang.String defName,
java.lang.Object sourceObj,
RowSetIterator master)
|
protected abstract RowSetIterator |
findOrCreateViewObjectForCriteria(DCIteratorBinding iter,
ViewCriteria vc,
RowSetIterator master,
java.lang.String accName)
|
protected abstract RowSetIterator |
findOrCreateViewObjectForCriteriaItem(DCIteratorBinding iter,
ViewCriteriaItem vc,
RowSetIterator master)
|
protected Variable |
findVariable(java.lang.String path)
|
void |
focusGained(DCIteratorBinding iterBinding,
DCControlBinding binding,
int attrIndex)
This method is used by the framework to display currency information in the status bars. |
java.lang.Object |
get(java.lang.Object keyObj)
override hashmap.get() |
protected abstract java.lang.Object |
getAccessorValue(RowSetIterator masterRSI,
Row row,
DCIteratorBinding iter,
java.lang.String accName)
|
DataControl |
getAdaptedDC()
In case of adapter datacontrols, this returns the adapter datacontrol instance and null in all other cases. |
protected ApplicationModule |
getAM()
|
java.lang.String |
getAppDefName()
framework use only |
ApplicationModule |
getApplicationModule()
For all nonbc4j Applications, this should return null. |
AttributeDef[] |
getAttributeDefs(DCIteratorBinding iterBinding,
java.lang.String[] attrNames)
Return attribute definition for the given iterator binding and for the given set of attributes from the elements-definition of the mapped collection. |
BindingContext |
getBindingContext()
Returns the binding context in which this datacontrol is registered |
DCErrorHandler |
getCurrentErrorHandler()
Returns the DCErrorHandler registered with the root DCDataControl. |
java.lang.String |
getDataControlFrameName()
framework use only |
java.lang.Object |
getDataProvider()
Return the Business Service Object that this datacontrol is associated with. |
DCDataControlDef |
getDef()
Returns the definition object for this DCDataControl |
protected long |
getDeferredEstimatedRowCount(DCIteratorBinding iter)
|
Definition |
getDefinition(java.lang.String name,
int type)
|
boolean |
getErrorHandlerActive()
Returns the error-handler active state of the root DCDataControl object. |
protected abstract long |
getEstimatedRowCount(DCIteratorBinding iter)
Implement estimated row count logic in this method and return the row count for a collection bound to this iterator. |
protected java.lang.String |
getIteratorStructureDefName(DCIteratorBinding iter)
return structuredef beanclass name for this iterator binding. |
abstract AttributeDef[] |
getKeyAttributeDefs(DCIteratorBinding dataIter)
|
abstract int |
getLastEventId()
|
abstract ListBindingDef |
getListBindingDef(DCIteratorBinding dataIter,
Key rowKey,
java.lang.String name)
|
abstract java.lang.String |
getListBindingName(DCIteratorBinding dataIter,
Key rowKey,
java.lang.String attrName,
java.lang.String name)
|
abstract RowSetIterator |
getListBindingRSI(DCIteratorBinding dataIter,
Key rowKey,
java.lang.String attrName,
java.lang.String name)
|
LocaleContext |
getLocaleContext()
Returns the locale for this Application |
java.util.Map |
getMethodResults()
For looking up method results stored in this DataControl. |
int |
getMethodResultUseCount(java.lang.Object key)
|
java.lang.String |
getName()
Returns the instance name of this DCDataControl object. |
DCDataControl |
getParent()
Returns the container DCDataControl object if any. |
abstract RowSetIterator |
getPreferredListRSI(DCIteratorBinding dataIter,
Key rowKey,
java.lang.String attrName,
java.lang.String name)
|
DCDataControl |
getRootDataControl()
Returns the root DCDataControl object. |
protected abstract RowSetIterator |
getRowSetIterator(java.lang.String masterName)
Given the name of an RSI, find if it's already created and cached on the datacontrol |
oracle.adf.share.security.SecurityContext |
getSecurityContext()
|
SessionContext |
getSessionContext()
|
protected SessionContextManager |
getSessionContextManager()
|
protected abstract SortCriteria[] |
getSortCriteria(DCIteratorBinding iter)
|
protected java.lang.String[] |
getSubstitutedDefNames(DCIteratorBinding iter)
|
protected java.lang.Object |
getSyncLock()
Obtain a lock on this object when subclasses need to lock access to data inside this DC. |
protected DCBindingContainer |
getUnresolvedBindingContainer(java.lang.String fullName)
|
java.lang.Object |
getUserData()
|
ViewCriteria |
getViewCriteria(DCIteratorBinding iter)
Internal: Applications should not use this method. Return viewCriteria associated with the given iterator binding's collection. |
boolean |
hasBindingsWithExc()
|
boolean |
hasDefinitionChanged()
|
protected boolean |
hasKeyAttributes(DCIteratorBinding iter)
|
boolean |
hasOperationParamsChanged(OperationInfo info)
|
boolean |
hasPermission(DCControlBinding binding,
java.lang.String actions)
|
boolean |
hasPermission(DCControlBinding binding,
java.lang.String target,
java.lang.String actions)
|
boolean |
hasPermission(java.security.Permission permission)
|
void |
initialize()
*** Advanced method *** |
protected void |
initializeBindingContainer(DCBindingContainerDef formDef,
DCBindingContainer formBnd,
boolean initialize)
|
void |
initializeContainerFromDef(java.lang.String name)
|
void |
initializeFromMetadata(java.util.Map map)
|
protected void |
internalCacheMethodResults(boolean flag)
|
protected java.lang.Object |
internalGet(java.lang.String key)
For EL evaluation. |
protected Row |
internalGetCurrentRow(DCIteratorBinding iter)
|
DataControlFrame |
internalGetDataControlFrame()
framework use only |
protected ViewObject |
internalGetIterBindingViewObject(DCIteratorBinding iter)
|
protected void |
internalPut(java.lang.String key,
java.lang.Object value)
|
protected void |
internalSetTransactionStateChanged(boolean state)
|
protected java.lang.Object |
invalidateMethodResult(DCInvokeMethod method)
|
java.lang.Object |
invokeMethod(DCInvokeMethodDef methodInfo,
java.util.ArrayList params)
Deprecated. since 10.1.3. not called anymore. Use invokeOperation() instead. |
protected java.lang.Object |
invokeMethod(DCInvokeMethod method,
OperationBinding action,
java.util.Map params)
Override this method if a datacontrol wants to implement custom invocation of a method and avoid introspection and invoke method call using reflection. |
boolean |
invokeOperation(java.util.Map ctx,
OperationBinding action)
All OperationBindings should first delegate to the DataControl associated with the binding to perform the action. |
boolean |
isAttributeSortable(DCIteratorBinding iter,
AttributeDef ad)
|
protected boolean |
isBoundRowIteratorEvent(DCIteratorBinding iter,
JboEvent ev)
|
boolean |
isClientTier()
Returns true in case of BC4J client-tier app. |
boolean |
isDataChangeManager()
|
boolean |
isJClientApp()
|
boolean |
isOperationSupported(DCIteratorBinding iterBinding,
byte operation)
Returns true for operation = OPER_CTRL_BINDING_VALIDATION Returns false for all other cases. |
boolean |
isReleasing()
|
boolean |
isRoot()
Returns true if this DCDataControl is the root DCDataControl. |
abstract boolean |
isTransactionDirty()
Returns true if this transaction has been dirtied by this application. |
boolean |
isTransactionModified()
Returns true if this DCDataControl has modified attribute values. |
protected void |
markAccessorIterListenerForFKMerge(DCIteratorBinding iter)
|
protected boolean |
modifyTransactionStateForAttributeSet(DCIteratorBinding iterBind,
Row row,
AttributeDef ad)
|
void |
processChangeNotifications()
During the render phase of the datacontrol lifecycle the pending notifications for auto refreshing data may be processed. |
protected void |
rebuildIteratorIfNeeded(DCIteratorBinding iterBinding)
|
java.lang.Object |
registerDataProvider(DCRowContext ctx)
Called before the row in the RowContext object is modified/marked as removed. |
void |
release()
Releases the DataControl. |
void |
release(int flags)
Deprecated. release() will be invoked whenever the DC
is to be released. The DC should invoke releaseBindings(int)
in order to notify the DataBinding facility of the release.
The default implementation of this method now invokes
release() . |
void |
releaseAll()
|
protected void |
releaseBindings(int flags)
Based on the value of the flags parameter, notifies the bindings to release references to the objects in the data provider layer Valid values for flags are: REL_ALL_REFS - if the bindings
should release all references to both the DataControls
and to the data provider objects like RowSetIterators. |
boolean |
releaseData(DCIteratorBinding iter)
|
void |
releaseFromDCFrame()
To be called only from frame release. |
protected void |
releaseMethodResults(boolean force)
Release the method results cache if mClearMethodResults is true. |
protected void |
removeBindingContainer(DCBindingContainer formBnd)
Remove the DCBindingContainer object of the given name (if any). |
void |
removeBindingWithExc(java.lang.String name)
|
protected void |
removeDataChangeListener(DCIteratorBinding iter)
subclasses to override and remove iteratorbinding as a DataChangeListener on the appropriate collection. |
abstract void |
removeDataChangeListener(java.lang.Object dataObj,
DataChangeListener dcl)
|
boolean |
removeRowData(DCRowContext ctx)
This method is to remove the row object (the obj parameter)
from the underlying data source. |
boolean |
removeRowDataFromCollection(DCRowContext ctx)
This method is to remove the row object (the obj parameter)
from the collection. |
void |
removeSnapshot(java.io.Serializable handle)
Removes the snapshot associated with the snapshot handle. |
void |
removeStatusBarInterface(DCStatusBarInterface statusBar)
Remove the given instance of status bar interface if found. |
void |
removeTransactionStateListener(DCTransactionStateListener statusBar)
Remove the given object from JUTransactionStateListener list. |
void |
reportException(DCBindingContainer formBnd,
java.lang.Exception ex)
This method is used by all framework binding objects to report exceptions. |
protected void |
resetAttributeExceptionInRow(DCIteratorBinding iter,
Row row,
AttributeDef def,
AttrValException ave)
|
boolean |
resetState()
Resets the DataControl. |
protected AttributeDef[] |
resolveAttributeDefs(StructureDef def,
java.lang.String[] attrNames)
|
void |
restoreSavepoint(java.lang.Object handle)
|
void |
restoreSnapshot(java.io.Serializable handle)
Restore the state of the DataControl with the snapshot state that is referenced by the handle. |
void |
rollbackTransaction()
Helper method that invokes rollback on the current Transaction. |
void |
setAppDefName(java.lang.String appDefName)
framework use only |
void |
setAttributeInRow(DCIteratorBinding iterBind,
Row row,
AttributeDef ad,
java.lang.Object value)
|
void |
setAttributesInRow(DCIteratorBinding iterBind,
Row row,
AttributeDef[] ads,
java.lang.Object[] values)
|
void |
setBindingContext(BindingContext ctx)
|
void |
setClientApp(byte clientType)
|
abstract void |
setCurrentRowWithKey(DCIteratorBinding iter,
Key keyObj)
Use the given key to set the current row in the RowSetIterator for the given iteratorbinding. |
abstract void |
setCurrentRowWithKey(DCIteratorBinding iter,
java.lang.String stringKey)
Converts the serialized stringKey into a Row key object (using collection's key metadata) and then calls findByKey on the RowSetIterator to find the row matching this key. |
abstract void |
setCurrentRowWithKeyValue(DCIteratorBinding iter,
java.lang.String stringValue)
This method works for Collections with only one Key attribute and not for multi-part attribute keys. |
void |
setDataControlFrameName(java.lang.String dataControlFrameName)
framework use only |
protected void |
setDataProvider(java.lang.Object obj)
|
void |
setDef(DCDataControlDef appDef)
Sets the definition object of this DCDataControl Object |
void |
setErrorHandler(java.lang.Object errHandlerObj)
Registers a DCErrorHandler with the root DCDataControl. |
void |
setErrorHandlerActive(boolean b)
*** Advanced method *** |
void |
setLocaleContext(LocaleContext locale)
Helper method that sets the locale in the current Application. |
void |
setName(java.lang.String name)
Sets the instance name of this DCDataControl Object |
void |
setParent(DCDataControl parent)
Sets the parent datacontrol. |
void |
setPartialUpdate(boolean flag)
Tell DC that this binding is being updated during partial update, so that it doesn't cache any exceptions for this udpate and simply throws them back. |
protected void |
setPinned(boolean flag)
Advanced for ADS usage only |
void |
setSessionContext(SessionContext sessionContext)
|
void |
setTransactionModified()
If this transaction is not in modified state, this method sets it to a modified state. |
abstract int |
startEvents(int fromIndex)
|
void |
stopEvents()
|
void |
sync(java.lang.String syncFromDiagnostic)
Incase syncNeeded, then use this event to synchronize data from remote tier in batch. |
void |
syncIfNeeded(java.lang.String syncFromDiagnostic)
Incase syncNeeded, then use this event to synchronize data from remote tier in batch. |
boolean |
syncNeeded()
Primarily used in ADFBC which returns true, if it is deployed in batchmode. |
java.lang.String |
toString()
|
void |
transactionStateChanged(boolean state)
Use this method to notify all transaction state change listeners of the change |
void |
validate()
Called when datacontrol changes needs to be validated after updates have been processed for a page. |
Methods inherited from class oracle.jbo.common.JboAbstractMap |
---|
entrySet, equals, hashCode, put, setThrowIfPropertyNotFoundOnGet |
Methods inherited from class java.util.AbstractMap |
---|
clear, clone, containsKey, containsValue, isEmpty, keySet, putAll, remove, size, values |
Methods inherited from class java.lang.Object |
---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
Methods inherited from interface java.util.Map |
---|
clear, containsKey, containsValue, entrySet, equals, hashCode, isEmpty, keySet, put, putAll, remove, size, values |
Field Detail |
---|
protected boolean mIsRoot
protected DCDataControl mParent
protected DCDataControl mRootApplication
protected java.lang.Object mUserData
protected java.lang.String mName
protected java.lang.Object mLock
protected volatile boolean mIsReleased
protected volatile boolean mIsReleasing
protected java.util.ArrayList mBindingContainerList
protected DCErrorHandler mErrorHandler
protected DCErrorHandler mErrorHandlerThrow
protected boolean mErrorHandlerActive
protected LocaleContext mLocaleCtx
public static final byte ABSTRACT
public static final byte JCLIENT
public static final java.lang.String METHOD_RESULT
public static final byte OPER_DATA_ROW_UPDATE
public static final byte OPER_DATA_ROW_CREATE
public static final byte OPER_DATA_ROW_REMOVE
public static final byte OPER_FIND_MODE
public static final byte OPER_CTRL_BINDING_VALIDATION
public static final byte OPER_EXECUTE
public static final byte OPER_SORT_COLLECTION
public static final byte OPER_DATA_ROW_CREATE_ONLY
protected java.lang.Object mDataProvider
protected java.lang.String mDataControlFrameName
public static final java.lang.String GET_MethodResults
public static final java.lang.String GET_ApplicationModule
public static final java.lang.String GET_DataProvider
public static final java.lang.String GET_dataProvider
public static final java.lang.String GET_Name
public static final java.lang.String GET_DCFrame
protected static final java.lang.String VCCRITERIA
protected static final java.lang.String VCCRITERIAITEM
protected static final java.lang.String VCCRITERIAITEMVALUE
protected static final java.lang.String VCCRITERIAOPERATOR
public static final int REL_ALL_REFS
public static final int REL_DATA_REFS
public static final int REL_VIEW_REFS
public static final int REL_WEAK_DATA_REFS
public static final java.lang.String PNAME_Type
protected java.util.ArrayList mStatusBarList
protected java.util.ArrayList mTxnListeners
Constructor Detail |
---|
protected DCDataControl()
protected DCDataControl(boolean root, java.lang.Object userData)
root
- If this DCDataControl is a root DCDataControl managing the transaction.userData
- Data to store with the DCDataControl object.Method Detail |
---|
public final java.lang.String getName()
getName
in interface DataControl
public final void setName(java.lang.String name)
public final DCDataControlDef getDef()
public final void setDef(DCDataControlDef appDef)
public void initializeFromMetadata(java.util.Map map)
public void initialize()
Creates a connection to the data-provider layer.
public java.lang.Object getDataProvider()
DataControl
getDataProvider
in interface DataControl
protected void setDataProvider(java.lang.Object obj)
public final void reportException(DCBindingContainer formBnd, java.lang.Exception ex)
If the error handler is set to active state, then this method calls the registered error handler's reportException method. Othewise, it simply throws the given exception as a JboException.
DCErrorHandler
,
JboException
public final DCErrorHandler getCurrentErrorHandler()
JUErrorHandlerDialog
public void setErrorHandler(java.lang.Object errHandlerObj)
Custom error handlers may also implement oracle.jbo.JboExceptionHandler to handle batched Exceptions raised during client-side processing of Exceptions thrown in the Business Components tier. after the DCErrorHandler is set with DCDataControl in this method.
Note that errors are sent to the registered error handler only when the error handler state is marked active (which is true by default) using the setErrorHandlerActive method.
errHandlerObj
- An implementation of DCErrorHandler interface
that may optionally implement JboExceptionHandler interface too.
If errHandler implements the JboExceptionHandler, this method sets
it as the ExceptionHandler on the root ApplicationModule that this
client Application is connected with. Else, method sets a default
ExceptionHandler which will collect all Exceptions
and throw a new JboException with these Exceptions set as in the new
JboException's details list, for the errHandler to display
as one JboException with a bag of Exceptions.JUErrorHandler
,
JUErrorHandlerDialog
,
JboExceptionHandler
,
ApplicationModule
public final boolean getErrorHandlerActive()
public final void setErrorHandlerActive(boolean b)
Sets the error-handler active state of the root DCDataControl object. This is used to control whether to throw an exception raised by the framework (which is used by automated regression tests to trap exceptions and log them). By default the state is set to true - meaning raise all exceptions via the registered error handler.
protected void connect()
public LocaleContext getLocaleContext()
public void setLocaleContext(LocaleContext locale)
public DataControl getAdaptedDC()
public ApplicationModule getApplicationModule()
protected ApplicationModule getAM()
protected abstract RowSetIterator getRowSetIterator(java.lang.String masterName)
protected abstract java.lang.Object getAccessorValue(RowSetIterator masterRSI, Row row, DCIteratorBinding iter, java.lang.String accName)
public RowSetIterator createAccessorRowSetIterator(RowSetIterator masterRSI, DCIteratorBinding iter, java.lang.String accName, java.lang.String beanClass)
public RowSetIterator createAccessorRowSetIterator(RowSetIterator masterRSI, Row row, DCIteratorBinding iter, java.lang.String accName, java.lang.String beanClass)
protected RowSetIterator createAccessorRowSetIteratorForMasterRow(DCIteratorBinding iter, RowSetIterator masterRSI, Row row, java.lang.Object result, java.lang.String accName, java.lang.String beanClass, boolean trackMaster)
protected RowSetIterator createAccessorRowSetIterator(RowSetIterator masterRSI, Row row, DCIteratorBinding iter, java.lang.String accName, java.lang.String beanClass, boolean trackMaster)
public RowSetIterator findOrCreateMethodRowSetIterator(DCIteratorBinding iter, java.lang.String beanClass, java.lang.Object result)
public RowSetIterator findOrCreateAccessorRowSetIterator(RowSetIterator masterRSI, DCIteratorBinding iter, java.lang.String accName, java.lang.String beanClass)
protected Row internalGetCurrentRow(DCIteratorBinding iter)
public RowSetIterator findOrCreateAccessorRowSetIterator(DCIteratorBinding masterIter, DCIteratorBinding iter, java.lang.String accName, java.lang.String beanClass)
protected abstract RowSetIterator createRowSetIteratorImpl(java.lang.String defName, java.lang.Object sourceObj, RowSetIterator master)
protected RowSetIterator findOrCreateRowSetIteratorImpl(DCIteratorBinding iter, java.lang.String defName, java.lang.Object sourceObj, RowSetIterator master)
protected abstract RowSetIterator findOrCreateViewObjectForCriteria(DCIteratorBinding iter, ViewCriteria vc, RowSetIterator master, java.lang.String accName)
protected abstract RowSetIterator findOrCreateViewObjectForCriteriaItem(DCIteratorBinding iter, ViewCriteriaItem vc, RowSetIterator master)
public final RowSetIterator createRowSetIteratorImpl(DCIteratorBinding iter, java.lang.String defName, java.lang.Object sourceObj, RowSetIterator master)
public final boolean isRoot()
public final DCDataControl getParent()
public void setParent(DCDataControl parent)
parent
- The parent datacontrol of this datacontrol.public final DCDataControl getRootDataControl()
public final java.lang.Object getUserData()
protected final void removeBindingContainer(DCBindingContainer formBnd)
public final void addBindingContainer(DCBindingContainer formBnd)
NameClashException
- If there is another object of the same name already registered, this
method will throw this exception.public final void addBindingContainerRef(NamedObjectImpl formBnd)
NameClashException
- If there is another object of the same name already registered, this
method will throw this exception.public final void addBindingContainer(java.lang.String name, DCBindingContainer formBnd, DCBindingContainerDef formDef)
InvalidObjNameException
- If the given name does not follow the BC4J component or Java Identifier
naming rules.
NameClashException
- If there is another object of the same name already registered, this
method will throw this exception.JboNameUtil.isNameValid(String)
public final void addBindingContainer(java.lang.String name, DCBindingContainer formBnd)
InvalidObjNameException
- If the given name does not follow the BC4J component or Java Identifier
naming rules.
NameClashException
- If there is another object of the same name already registered, this
method will throw this exception.JboNameUtil.isNameValid(String)
protected void initializeBindingContainer(DCBindingContainerDef formDef, DCBindingContainer formBnd, boolean initialize)
protected DCBindingContainer addOrCreateBindingContainer(java.lang.String name, DCBindingContainer formBnd, DCBindingContainerDef formDef, boolean initialize, boolean replace)
public final DCBindingContainer findBindingContainer(java.lang.String name)
public final DCBindingContainer createBindingContainer(java.lang.String name, java.lang.String formDefName, boolean initialize)
public boolean isJClientApp()
public void setClientApp(byte clientType)
public DCBindingContainer createBindingContainerInstance(java.lang.String mBindingContainerClassName)
public void initializeContainerFromDef(java.lang.String name)
public final void addStatusBarInterface(DCStatusBarInterface statusBar)
public final void removeStatusBarInterface(DCStatusBarInterface statusBar)
public final void displayStatus(DCIteratorBinding iterBinding, java.lang.String msgId, java.lang.Object[] params)
public final void displayStatus(java.lang.String msg)
public final void focusGained(DCIteratorBinding iterBinding, DCControlBinding binding, int attrIndex)
public final boolean hasBindingsWithExc()
public void validate()
public void commitTransaction()
public final void callCommitTransaction()
public void rollbackTransaction()
public final boolean isTransactionModified()
public void setTransactionModified()
protected void internalSetTransactionStateChanged(boolean state)
public final void transactionStateChanged(boolean state)
public final void addTransactionStateListener(DCTransactionStateListener statusBar)
public final void removeTransactionStateListener(DCTransactionStateListener statusBar)
public final void doneCommit(TransactionStateEvent event)
event
- A description of the event.public final void doneRollback(TransactionStateEvent event)
event
- A description of the event.public void beginRequest(java.util.HashMap requestCtx)
Subclassing datacontrols may extend this method to perform request level initialization of the DataControl.
This method is guaranteed to be called only once per browser request. Page forwards should not result in multiple invocations.
beginRequest
in interface ManagedDataControl
requestCtx
- a HashMap representing request context. Web
applications which require request context may use the
BindingContext.HTTP_REQUEST and
BindingContext.HTTP_RESPONSE keys to acquire a reference
from from the BindingContext.public void endRequest(java.util.HashMap requestCtx)
Subclassing datacontrols may extend this method to perform request level cleanup of the DataControl.
This method is guaranteed to be called only once per browser request. Page forwards should not result in multiple invocations.
endRequest
in interface ManagedDataControl
requestCtx
- a HashMap representing request context. Web
applications which require request context may use the
BindingContext.HTTP_REQUEST and
BindingContext.HTTP_RESPONSE keys to acquire a reference
from from the BindingContext.public java.io.Serializable createSnapshot()
ManagedDataControl
public void restoreSnapshot(java.io.Serializable handle)
ManagedDataControl
handle
- Serializable a snaphsot handle that was created with
ManagedDataControl.createSnapshot()
.public void removeSnapshot(java.io.Serializable handle)
ManagedDataControl
handle
- Serializable a snapshot handle that was created with
ManagedDataControl.createSnapshot()
.public java.lang.Object createSavepoint()
public void restoreSavepoint(java.lang.Object handle)
public Definition getDefinition(java.lang.String name, int type)
protected DCBindingContainer getUnresolvedBindingContainer(java.lang.String fullName)
public void release(int flags)
release()
will be invoked whenever the DC
is to be released. The DC should invoke releaseBindings(int)
in order to notify the DataBinding facility of the release.
The default implementation of this method now invokes
release()
.
DataControl
REL_ALL_REFS
- if this data control
should release all references to both the view and model
objects.
REL_DATA_REFS
- if this data control
should release all references to data provider objects. The
likely usage would be when say an Application Module is to
be checked into a pool and this data-control may be given
that or another checked out AM to work with subsequently.
REL_VIEW_REFS
- if this data control
should release all references to the UI/View layer objects.
public void releaseFromDCFrame()
public boolean isReleasing()
public void release()
DataControl
This should close all open DataControl resources.
release
in interface DataControl
protected void releaseBindings(int flags)
REL_ALL_REFS
- if the bindings
should release all references to both the DataControls
and to the data provider objects like RowSetIterators.
objects.
REL_DATA_REFS
- if the bindings should
should release all references to data provider objects. The
likely usage would be when say an Application Module is to
be checked into a pool and this data-control may be given
that or another checked out AM to work with subsequently.
public abstract AttributeDef[] getKeyAttributeDefs(DCIteratorBinding dataIter)
public abstract java.lang.String getListBindingName(DCIteratorBinding dataIter, Key rowKey, java.lang.String attrName, java.lang.String name)
public abstract RowSetIterator getListBindingRSI(DCIteratorBinding dataIter, Key rowKey, java.lang.String attrName, java.lang.String name)
public abstract RowSetIterator getPreferredListRSI(DCIteratorBinding dataIter, Key rowKey, java.lang.String attrName, java.lang.String name)
public abstract ListBindingDef getListBindingDef(DCIteratorBinding dataIter, Key rowKey, java.lang.String name)
public boolean releaseData(DCIteratorBinding iter)
public java.lang.Object get(java.lang.Object keyObj)
get
in interface java.util.Map
get
in class JboAbstractMap
protected java.lang.Object internalGet(java.lang.String key)
dataProvider
- returns getDataProvider()name
- returns getName()applicationModule
- returns getApplicationModule()
internalGet
in class JboAbstractMap
protected void internalPut(java.lang.String key, java.lang.Object value)
internalPut
in class JboAbstractMap
public void cleanup()
protected void rebuildIteratorIfNeeded(DCIteratorBinding iterBinding)
protected abstract void executeIteratorBinding(DCIteratorBinding iterBinding)
protected abstract void executeIteratorBindingIfNeeded(DCIteratorBinding iterBinding)
protected java.lang.String[] getSubstitutedDefNames(DCIteratorBinding iter)
protected java.lang.String getIteratorStructureDefName(DCIteratorBinding iter)
public AttributeDef[] getAttributeDefs(DCIteratorBinding iterBinding, java.lang.String[] attrNames)
public boolean isAttributeSortable(DCIteratorBinding iter, AttributeDef ad)
public boolean isOperationSupported(DCIteratorBinding iterBinding, byte operation)
public final void setBindingContext(BindingContext ctx)
public final BindingContext getBindingContext()
public java.lang.Object invokeMethod(DCInvokeMethodDef methodInfo, java.util.ArrayList params)
protected java.lang.Object invokeMethod(DCInvokeMethod method, OperationBinding action, java.util.Map params)
public boolean invokeOperation(java.util.Map ctx, OperationBinding action)
DataControl
invokeOperation
in interface DataControl
public void addBindingWithExc(java.lang.String name)
public void removeBindingWithExc(java.lang.String name)
public abstract boolean isTransactionDirty()
public boolean isClientTier()
public java.lang.String toString()
toString
in class java.util.AbstractMap
public boolean syncNeeded()
public void syncIfNeeded(java.lang.String syncFromDiagnostic)
public void sync(java.lang.String syncFromDiagnostic)
protected abstract long getEstimatedRowCount(DCIteratorBinding iter)
protected long getDeferredEstimatedRowCount(DCIteratorBinding iter)
public void setSessionContext(SessionContext sessionContext)
public SessionContext getSessionContext()
protected SessionContextManager getSessionContextManager()
public abstract void setCurrentRowWithKeyValue(DCIteratorBinding iter, java.lang.String stringValue)
Converts the stringValue into a Row key (using collection's key metadata) and then calls findByKey on the RowSetIterator to find the row matching this key. If a row is found, that row is set as current.
public abstract void setCurrentRowWithKey(DCIteratorBinding iter, java.lang.String stringKey)
public abstract void setCurrentRowWithKey(DCIteratorBinding iter, Key keyObj)
public java.lang.Object registerDataProvider(DCRowContext ctx)
public void setAttributeInRow(DCIteratorBinding iterBind, Row row, AttributeDef ad, java.lang.Object value)
protected boolean modifyTransactionStateForAttributeSet(DCIteratorBinding iterBind, Row row, AttributeDef ad)
public void setAttributesInRow(DCIteratorBinding iterBind, Row row, AttributeDef[] ads, java.lang.Object[] values)
public java.lang.Object createRowData(DCRowContext ctx)
public boolean removeRowData(DCRowContext ctx)
obj
parameter)
from the underlying data source.
ctx
- the row context to be removed.
true
if the operation was successful.
false
otherwise.public boolean removeRowDataFromCollection(DCRowContext ctx)
obj
parameter)
from the collection. It should not remove the row from the underlying
data source.
ctx
- the row context to be removed.
true
if the operation was successful.
false
otherwise.protected AttributeDef[] resolveAttributeDefs(StructureDef def, java.lang.String[] attrNames)
protected abstract void applySortCriteria(DCIteratorBinding iter, SortCriteria[] sortby)
protected abstract SortCriteria[] getSortCriteria(DCIteratorBinding iter)
protected ViewObject internalGetIterBindingViewObject(DCIteratorBinding iter)
protected void internalCacheMethodResults(boolean flag)
public java.util.Map getMethodResults()
protected void releaseMethodResults(boolean force)
force
- if true, clear the method results cachepublic int getMethodResultUseCount(java.lang.Object key)
public boolean resetState()
The ADF/BC DataControl has extended resetState to release the DataControl ApplicationModule to the ApplicationPool in unmanaged release mode.
An EJB DataControl provider may extend resetState to close the DataControl EJB SessionBean
The Toplink DataControl provider extends resetState to reset the DataControl's UnitOfWork and associated RowSetIterators.
Please note that resetState may not occur immediately. If beginRequest has been invoked on the DataControl then resetState processing will be deferred until endRequest processing.
Extending DataControl providers may optionally invoke release(REL_DATA_REFS) after performing and DataControl specific resetState handling.
resetState
in interface ManagedDataControl
public abstract void applyViewCriteria(ViewCriteria vc, DCIteratorBinding iter, RowSetIterator rsi)
public ViewCriteria getViewCriteria(DCIteratorBinding iter)
public ViewCriteria createViewCriteria(DCIteratorBinding iter)
protected void resetAttributeExceptionInRow(DCIteratorBinding iter, Row row, AttributeDef def, AttrValException ave)
public boolean hasPermission(DCControlBinding binding, java.lang.String target, java.lang.String actions)
public boolean hasPermission(DCControlBinding binding, java.lang.String actions)
public boolean hasPermission(java.security.Permission permission)
public oracle.adf.share.security.SecurityContext getSecurityContext()
public boolean hasOperationParamsChanged(OperationInfo info)
protected void cacheMethodResult(DCInvokeMethod method, java.lang.Object result, java.lang.Object paramVals)
protected java.lang.Object invalidateMethodResult(DCInvokeMethod method)
protected boolean isBoundRowIteratorEvent(DCIteratorBinding iter, JboEvent ev)
protected Variable findVariable(java.lang.String path)
public void executeIteratorBindingWithParams(DCIteratorBinding iter, OperationParameter[] params, java.lang.Object[] paramVals)
protected boolean hasKeyAttributes(DCIteratorBinding iter)
protected void markAccessorIterListenerForFKMerge(DCIteratorBinding iter)
public boolean isDataChangeManager()
protected void addDataChangeListener(DCIteratorBinding iter)
protected void removeDataChangeListener(DCIteratorBinding iter)
protected java.lang.Object getSyncLock()
public void stopEvents()
public abstract void addDataChangeListener(java.lang.Object dataObj, DataChangeListener dcl)
public abstract void removeDataChangeListener(java.lang.Object dataObj, DataChangeListener dcl)
public abstract int startEvents(int fromIndex)
public abstract int getLastEventId()
protected abstract void clearIteratorBinding(DCIteratorBinding iter)
protected void setPinned(boolean flag)
public void setPartialUpdate(boolean flag)
public void setAppDefName(java.lang.String appDefName)
appDefName
- public java.lang.String getAppDefName()
public void setDataControlFrameName(java.lang.String dataControlFrameName)
public java.lang.String getDataControlFrameName()
public DataControlFrame internalGetDataControlFrame()
protected java.util.List _internal_dbg_debug_data()
public void processChangeNotifications()
protected void beforeReportException(DCBindingContainer formBnd, java.lang.Exception ex)
protected void afterReportException(DCBindingContainer formBnd, java.lang.Exception ex)
public boolean hasDefinitionChanged()
public boolean discardIfDefinitionChanged()
public void releaseAll()
|
Oracle Fusion Middleware Java API Reference for Oracle ADF Model 11g Release 1 (11.1.1.7.0) E10653-08 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |