|
Oracle ADF Model and Business Components API Reference 10.1.2 B14022-01 | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.util.AbstractMap oracle.jbo.common.JboAbstractMap oracle.adf.model.binding.DCDataControl oracle.adf.model.bc4j.DCJboDataControl
The application class that manages connection to a BC4J Application Module. The DCDataControl class provides:
ApplicationModule
,
Transaction
,
DCTransactionStateListener
,
DCErrorHandler
Nested Class Summary |
Nested classes inherited from class java.util.Map |
java.util.Map.Entry |
Field Summary | |
static int |
EXC_MODE_DEFAULT
|
static int |
EXC_MODE_DEFERRED
|
static int |
EXC_MODE_IMMEDIATE
|
Fields inherited from class oracle.adf.model.binding.DCDataControl |
ABSTRACT, JCLIENT, mBindingContainerList, mDataProvider, mErrorHandler, mErrorHandlerActive, mErrorHandlerThrow, mIsRoot, mLocaleCtx, mName, mParent, mRootApplication, mStatusBarList, mTxnListeners, mUserData, OPER_CTRL_BINDING_VALIDATION, OPER_DATA_ROW_CREATE, OPER_DATA_ROW_REMOVE, OPER_DATA_ROW_UPDATE, OPER_EXECUTE, OPER_FIND_MODE, OPER_SORT_COLLECTION, PNAME_Type, REL_ALL_REFS, REL_DATA_REFS, REL_VIEW_REFS, REL_WEAK_DATA_REFS |
Constructor Summary | |
protected |
DCJboDataControl()
*** For internal framework use only *** |
|
DCJboDataControl(ApplicationModule am)
Constructor used internally by the framework to associate an application module with a JClient application object. |
|
DCJboDataControl(DCDataControl parent,
ApplicationModule am,
java.lang.Object userData)
Constructor to be used to create a nested DCDataControl inside another DCDataControl object. |
|
DCJboDataControl(java.util.Hashtable context,
java.lang.String rootAMDefName,
java.lang.Object userData)
Constructs a root DCDataControl object that connects to a BC4J Application Module of the given name. |
|
DCJboDataControl(SessionCookie sessionCookie)
|
Method Summary | |
protected void |
applySortCriteria(DCIteratorBinding iter,
SortCriteria[] sortBy)
Sets the sort critiera that will be applied next time when the source for this iteratorBinding is executed. |
void |
beginRequest(java.util.HashMap requestCtx)
Invoked in some contexts to signal the beginning of a model request. |
void |
commitTransaction()
Invokes the BC4J transaction's commit() method to save all changes to the database. |
protected void |
connect()
*** For internal framework use only *** If this application 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 |
protected RowSetIterator |
createAccessorRowSetIterator(RowSetIterator masterRSI,
Row row,
DCIteratorBinding iter,
java.lang.String accName,
java.lang.String beanClass,
boolean trackMaster)
|
void |
createRootApplicationModule()
*** Advanced method *** *** For internal framework use only *** |
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. |
protected 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. |
void |
endRequest(java.util.HashMap requestCtx)
Invoked in some contexts to signal the end of a model request. |
protected void |
executeIteratorBinding(DCIteratorBinding iterBinding)
Implies forced execute of the collection that this iterator binding is bound to. |
protected void |
executeIteratorBindingIfNeeded(DCIteratorBinding iterBinding)
This method is invoked when a bindingcontainer is 'refreshing' itself before it's data is displayed. |
ViewObject |
findCustomViewObject(java.lang.String name,
java.lang.String interfaceName)
|
protected java.lang.Object |
getAccessorValue(RowSetIterator masterRSI,
Row row,
DCIteratorBinding iter,
java.lang.String accName)
|
ApplicationModule |
getApplicationModule()
Returns the associated oracle.jbo.ApplicationModule object |
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. |
java.util.Hashtable |
getContext()
Returns the context object with which the root DCApplication was created. |
java.util.Properties |
getDBConnectionProps()
*** For internal framework use only *** |
java.lang.String |
getDBConnectionURL()
*** For internal framework use only *** |
protected long |
getEstimatedRowCount(DCIteratorBinding iter)
Implement estimated row count logic in this method and return the row count for a collection bound to this iterator. |
LocaleContext |
getLocaleContext()
Returns the locale for this Application |
java.lang.String |
getPackageName()
*** For internal framework use only *** |
int |
getReleaseLevel()
|
java.lang.String |
getRootAMDefName()
Returns root DCDataControl's ApplicationModule definition name. |
protected RowSetIterator |
getRowSetIterator(java.lang.String masterName)
Given the name of an RSI, find if it's already created and cached on the datacontrol |
protected SortCriteria[] |
getSortCriteria(DCIteratorBinding iter)
Returns an ordered array of SortCriteria that will be applied when the source for this iteratorBinding is executed. |
ViewCriteria |
getViewCriteria(DCIteratorBinding iter)
Return viewCriteria associated with the given iterator binding's collection. |
void |
initialize()
*** Advanced method *** *** For internal framework use only *** |
protected java.lang.Object |
internalGet(java.lang.String key)
For EL evaluation. |
boolean |
isClientTier()
Returns true if this data-control's Application module is deployed in three-tier mode |
boolean |
isOperationSupported(DCIteratorBinding iterBinding,
byte oper)
Returns true for find, create, remove operations. |
boolean |
isTransactionDirty()
Returns true if this transaction has been dirtied by this application. |
void |
prepareSession()
|
void |
release(int flags)
Use this method to release connection to an Application Module |
boolean |
removeRowData(DCRowContext ctx)
This method is to remove the row object (the obj parameter)
from the underlying data source. |
protected void |
resetAttributeExceptionInRow(DCIteratorBinding iter,
Row row,
AttributeDef def,
AttrValException ave)
Reset any deferred exception in the row for the given attribute, for which the AttrValException was raised. |
boolean |
resetState()
Resets the DataControl. |
void |
rollbackTransaction()
Helper method that invokes rollback on the current Transaction. |
void |
setAttributeInRow(DCIteratorBinding iterBind,
Row row,
AttributeDef ad,
java.lang.Object value)
|
void |
setBundledExceptionMode(int mode)
|
void |
setClientApp(byte clientType)
Incase of non-JClient, set the transaction to deferred exception mode by default |
void |
setConnectionInfo(java.lang.String dbConnectionURL,
java.util.Properties dbConnectionProps)
*** For internal framework use only *** |
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. |
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. |
protected void |
setDataProvider(java.lang.Object provider)
|
void |
setLocaleContext(LocaleContext locale)
Helper method that sets the locale in the current Application Module's session. |
void |
setPackageName(java.lang.String packageName)
*** For internal framework use only *** |
void |
setReleaseLevel(int releaseLevel)
|
void |
setSessionCookie(SessionCookie sessionCookie)
|
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. |
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 |
Methods inherited from class java.util.AbstractMap |
clear, clone, containsKey, containsValue, isEmpty, keySet, put, putAll, remove, size, values |
Methods inherited from class java.lang.Object |
finalize, getClass, notify, notifyAll, wait, wait, wait |
Methods inherited from interface oracle.jbo.TransactionStateListener |
doneCommit, doneRollback |
Methods inherited from interface java.util.Map |
clear, containsKey, containsValue, entrySet, equals, isEmpty, keySet, put, putAll, remove, size, values |
Field Detail |
public static final int EXC_MODE_DEFAULT
public static final int EXC_MODE_DEFERRED
public static final int EXC_MODE_IMMEDIATE
Constructor Detail |
protected DCJboDataControl()
public DCJboDataControl(java.util.Hashtable context, java.lang.String rootAMDefName, java.lang.Object userData)
context
- Context to pass on to the BC4J Application Module on creation.rootAMDefName
- Name that identifies the root BC4J Application Module.userData
- Data to store with the DCDataControl object.public DCJboDataControl(ApplicationModule am)
public DCJboDataControl(DCDataControl parent, ApplicationModule am, java.lang.Object userData)
public DCJboDataControl(SessionCookie sessionCookie)
Method Detail |
public void initialize()
Creates a connection to the BC4J application module.
initialize
in class DCDataControl
public final void createRootApplicationModule()
If this DCAppication is root, and the root's application module is not created, this method creates a root BC4J Application Module using the root application module def name and the context information (both passed to the constructor of the root DCDataControl).
ApplicationModuleCreateException
- if the application module is not
created, perhaps due to an improper root application module name.ApplicationModule
,
ApplicationModuleHome.create()
public final java.util.Hashtable getContext()
protected void connect()
connect
in class DCDataControl
public final java.lang.String getRootAMDefName()
public final java.lang.String getDBConnectionURL()
public final java.util.Properties getDBConnectionProps()
public final void setConnectionInfo(java.lang.String dbConnectionURL, java.util.Properties dbConnectionProps)
public final java.lang.String getPackageName()
public final void setPackageName(java.lang.String packageName)
public final LocaleContext getLocaleContext()
getLocaleContext
in class DCDataControl
public final void setLocaleContext(LocaleContext locale)
setLocaleContext
in class DCDataControl
protected java.lang.Object internalGet(java.lang.String key)
transactionDirty
- returns getApplicationModule().isTransactionDirty()
internalGet
in class DCDataControl
public final ApplicationModule getApplicationModule()
getApplicationModule
in class DCDataControl
public void release(int flags)
release
in interface DCDataControlManagement
release
in class DCDataControl
protected RowSetIterator getRowSetIterator(java.lang.String masterName)
DCDataControl
getRowSetIterator
in class DCDataControl
protected java.lang.Object getAccessorValue(RowSetIterator masterRSI, Row row, DCIteratorBinding iter, java.lang.String accName)
getAccessorValue
in class DCDataControl
protected RowSetIterator createAccessorRowSetIterator(RowSetIterator masterRSI, Row row, DCIteratorBinding iter, java.lang.String accName, java.lang.String beanClass, boolean trackMaster)
createAccessorRowSetIterator
in class DCDataControl
public RowSetIterator createAccessorRowSetIterator(RowSetIterator masterRSI, DCIteratorBinding iter, java.lang.String accName, java.lang.String beanClass)
DCDataControl
createAccessorRowSetIterator
in class DCDataControl
protected RowSetIterator createRowSetIteratorImpl(java.lang.String defName, java.lang.Object sourceObj, RowSetIterator master)
DCDataControl
createRowSetIteratorImpl
in class DCDataControl
protected void executeIteratorBinding(DCIteratorBinding iterBinding)
DCDataControl
executeIteratorBinding
in class DCDataControl
protected void executeIteratorBindingIfNeeded(DCIteratorBinding iterBinding)
DCDataControl
executeIteratorBindingIfNeeded
in class DCDataControl
public void setCurrentRowWithKeyValue(DCIteratorBinding iter, java.lang.String stringValue)
DCDataControl
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.
setCurrentRowWithKeyValue
in class DCDataControl
public void setCurrentRowWithKey(DCIteratorBinding iter, java.lang.String stringKey)
DCDataControl
setCurrentRowWithKey
in class DCDataControl
protected long getEstimatedRowCount(DCIteratorBinding iter)
DCDataControl
getEstimatedRowCount
in class DCDataControl
public boolean isTransactionDirty()
DCDataControl
isTransactionDirty
in class DCDataControl
public void commitTransaction()
DCDataControl
commitTransaction
in class DCDataControl
public void validate()
DCDataControl
validate
in class DCDataControl
public void rollbackTransaction()
DCDataControl
rollbackTransaction
in class DCDataControl
public boolean isOperationSupported(DCIteratorBinding iterBinding, byte oper)
isOperationSupported
in class DCDataControl
public boolean isClientTier()
isClientTier
in class DCDataControl
public boolean syncNeeded()
DCDataControl
syncNeeded
in class DCDataControl
public void syncIfNeeded(java.lang.String syncFromDiagnostic)
DCDataControl
syncIfNeeded
in class DCDataControl
public void sync(java.lang.String syncFromDiagnostic)
DCDataControl
sync
in class DCDataControl
public void setClientApp(byte clientType)
setClientApp
in class DCDataControl
public void setBundledExceptionMode(int mode)
public void prepareSession()
public void beginRequest(java.util.HashMap requestCtx)
DCDataControl
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 DCDataControlManagement
beginRequest
in class DCDataControl
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)
DCDataControl
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 DCDataControlManagement
endRequest
in class DCDataControl
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 boolean resetState()
DCDataControl
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 DCDataControlManagement
resetState
in class DCDataControl
public ViewObject findCustomViewObject(java.lang.String name, java.lang.String interfaceName)
protected void setDataProvider(java.lang.Object provider)
setDataProvider
in class DCDataControl
public AttributeDef[] getAttributeDefs(DCIteratorBinding iterBinding, java.lang.String[] attrNames)
DCDataControl
getAttributeDefs
in class DCDataControl
public void setSessionCookie(SessionCookie sessionCookie)
protected void applySortCriteria(DCIteratorBinding iter, SortCriteria[] sortBy)
applySortCriteria
in class DCDataControl
protected SortCriteria[] getSortCriteria(DCIteratorBinding iter)
getSortCriteria
in class DCDataControl
public java.lang.Object createRowData(DCRowContext ctx)
DCDataControl
createRowData
in class DCDataControl
public boolean removeRowData(DCRowContext ctx)
DCDataControl
obj
parameter)
from the underlying data source.
removeRowData
in class DCDataControl
true
if the operation was successful.
false
otherwise.public void setAttributeInRow(DCIteratorBinding iterBind, Row row, AttributeDef ad, java.lang.Object value)
setAttributeInRow
in class DCDataControl
public ViewCriteria getViewCriteria(DCIteratorBinding iter)
DCDataControl
getViewCriteria
in class DCDataControl
public int getReleaseLevel()
{@link oracle.jbo.ApplicationModule#getReleaseLevel()}
public void setReleaseLevel(int releaseLevel)
{@link oracle.jbo.ApplicationModule#setReleaseLevel(int)}
protected void resetAttributeExceptionInRow(DCIteratorBinding iter, Row row, AttributeDef def, AttrValException ave)
resetAttributeExceptionInRow
in class DCDataControl
|
Oracle ADF Model and Business Components API Reference 10.1.2 B14022-01 | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Copyright © 1997, 2004, Oracle. All rights reserved.