Skip navigation links

Oracle Fusion Middleware Java API Reference for Oracle ADF Model
11g Release 2 (11.1.2.2.0)

E17483-03


oracle.adf.model
Interface DataControlFrame

All Known Implementing Classes:
DataControlFrameImpl

public interface DataControlFrame
Since:
11.1.0

Method Summary
 boolean addDataControlPolicy(DataControlPolicy policy)
          Adds a datacontrol policy to this datacontrol frame.
 void beginTransaction(TransactionProperties properties)
          Begin a new transaction.
 void commit()
          Commit the current underlying transaction.
 SavepointHandle createSavepoint()
          Create a savepoint marking the current state of the task flow context.
 java.io.Serializable createSnapshot()
          Creates a snapshot of the states of the DataControls in the frame.
 java.util.Collection<DCDataControl> datacontrols()
          Returns the set of data controls in the frame
 DCDataControl findDataControl(java.lang.String dcName)
          Retrieve a datacontrol instance with the given name from this datacontrol frame.
 DataControlPolicy findPolicy(java.lang.String name)
          Retrieve a datacontrol policy with the given name from this datacontrol frame.
 java.lang.String findUniqueKey(java.lang.String key, java.util.Map dcMap)
          Return a key that is unique among the keys for datacontrols in the BindingContext.
 DCBindingContainer getBindingContainer(java.lang.Object key)
           
 java.util.Collection<DCBindingContainer> getBindingContainers()
           
 DataControlPolicy getDefaultPolicy()
          Return the default datacontrol policy of this datacontrol frame.
 java.lang.String getName()
           
 java.lang.String getOpenTransactionName()
          Returns the name of the transaction if a transaction is open in this datacontrol frame.
 boolean isTransactionDirty()
          Indicates if unsaved data modifications exists within the current task flow context.
 boolean isTransactionOpen()
          Deprecated. replaced by getOpenTransactionName()
 DCBindingContainer putBindingContainer(java.lang.Object key, DCBindingContainer bc)
           
 void release()
          Release the datacontrol frame.
 void releaseSavepoint(SavepointHandle cp)
          Release a save point when it is no longer needed.
 DCBindingContainer removeBindingContainer(java.lang.Object key)
           
 void removeSnapshot(java.io.Serializable handle)
          Removes the state snapshot associated with the snapshot handle.
 void restoreSavepoint(SavepointHandle cp)
          Restore the transaction back to a previously created checkpoint.
 void restoreSnapshot(java.io.Serializable handle)
          Restore the states of the DataControls in the frame with the snapshot states that are referenced by the handle.
 void resumeTransaction()
          Resume the transaction associated with with this context.
 void rollback()
          Rollback the underlying transaction.
 void suspendTransaction()
          Called to suspend the transaction associated with this datacontrol frame.

 

Method Detail

release

void release()
Release the datacontrol frame. It is an error to call any other methods on the datacontrol frame after it has been released.

If there is an open unresolved transaction when a datacontrol frame is released its parent context must retain any of the child's data controls until the transaction is resolved. Upon resolving the transaction the parent frame is free to release the child's data controls.


createSavepoint

SavepointHandle createSavepoint()
Create a savepoint marking the current state of the task flow context.
Returns:
a checkpoint.

restoreSavepoint

void restoreSavepoint(SavepointHandle cp)
Restore the transaction back to a previously created checkpoint.
Parameters:
cp - the checkpoint to return to. Must have been created by a call to createSavepoint() on the same transaction.

releaseSavepoint

void releaseSavepoint(SavepointHandle cp)
Release a save point when it is no longer needed. It is an error to attempt to restore a save point after it has been released.
Parameters:
cp - the savepoint to release. Must have been created by a call to createSavepoint() on the same transaction.

createSnapshot

java.io.Serializable createSnapshot()
Creates a snapshot of the states of the DataControls in the frame. A snapshot may be used to save the DataControlFrame state so that it may be restored some time later. Returns a serializable handle to the snapshot.
Returns:
a snapshot handle

restoreSnapshot

void restoreSnapshot(java.io.Serializable handle)
Restore the states of the DataControls in the frame with the snapshot states that are referenced by the handle.
Parameters:
handle - Serializable a snaphsot handle that was created with createSnapshot().

removeSnapshot

void removeSnapshot(java.io.Serializable handle)
Removes the state snapshot associated with the snapshot handle.
Parameters:
handle - Serializable a snapshot handle that was created with createSnapshot().

beginTransaction

void beginTransaction(TransactionProperties properties)
Begin a new transaction.
Parameters:
properties - the transaction properties. Used by beginTransaction in BindingContext

suspendTransaction

void suspendTransaction()
Called to suspend the transaction associated with this datacontrol frame. Typically used when it's know that on activity will be performed on the transaction for an extended period of time, such as when a second, independent transaction is being used for some other unit of work.

resumeTransaction

void resumeTransaction()
Resume the transaction associated with with this context. Used by resumeTransaction in BindingContext.

getOpenTransactionName

java.lang.String getOpenTransactionName()
Returns the name of the transaction if a transaction is open in this datacontrol frame. If the transaction policy of this frame is "existing", it returns the name of the transaction of the other frame specified in the datacontrol policy if that transaction is open. A transaction is open if beginTransaction has been called but it has not been committed or rolled back.
Returns:
Name of the open transaction in this datacontrol frame, or null if there is no transaction in this frame, or the transaction is not open.

isTransactionOpen

boolean isTransactionOpen()
Deprecated. replaced by getOpenTransactionName()
Whether there is an open transaction in this frame, ie, whether beginTransaction has been called on this frame which has not been committed or rolled back.
Returns:
True if there is an open transaction in this frame, false otherwise.

isTransactionDirty

boolean isTransactionDirty()
Indicates if unsaved data modifications exists within the current task flow context.
Returns:
true indicates unsaved data exists,
false indicates there is no unsaved data.

getName

java.lang.String getName()
Returns:
the name for this datacontrol frame.

commit

void commit()
Commit the current underlying transaction.

rollback

void rollback()
Rollback the underlying transaction.

findDataControl

DCDataControl findDataControl(java.lang.String dcName)
Retrieve a datacontrol instance with the given name from this datacontrol frame.
Parameters:
dcName - Name of the datacontrol
Returns:
A datacontrol with the given name, or null if none can be found.
See Also:
DataControlPolicy.getDataControl()

findPolicy

DataControlPolicy findPolicy(java.lang.String name)
Retrieve a datacontrol policy with the given name from this datacontrol frame.
Parameters:
name - Name of the datacontrol
Returns:
A datacontrol policy with the given name, or null if none can be found.

getDefaultPolicy

DataControlPolicy getDefaultPolicy()
Return the default datacontrol policy of this datacontrol frame.
Returns:
The default policy of this datacontrol frame.

addDataControlPolicy

boolean addDataControlPolicy(DataControlPolicy policy)
Adds a datacontrol policy to this datacontrol frame.
Parameters:
policy - The datacontrol policy to be added.
Returns:
true if the policy has been added sucessfully, false if the policy cannot be added because a policy already exists for the given name.

getBindingContainer

DCBindingContainer getBindingContainer(java.lang.Object key)

putBindingContainer

DCBindingContainer putBindingContainer(java.lang.Object key,
                                       DCBindingContainer bc)

removeBindingContainer

DCBindingContainer removeBindingContainer(java.lang.Object key)

getBindingContainers

java.util.Collection<DCBindingContainer> getBindingContainers()

findUniqueKey

java.lang.String findUniqueKey(java.lang.String key,
                               java.util.Map dcMap)
Return a key that is unique among the keys for datacontrols in the BindingContext. The unique key can be the same as the key passed into this method, or a different key if a unique key has been generated if it clashes with another datacontrol created by a different frame. This method is used by BindingContext only.
Parameters:
key - key for the datacontrol
dcMap - map of datacontrol from the BindingContext
Returns:
A unique name that can be used as key for storing the datacontrol into the data structures in the BindingContext. The name can be different from the key if more than one datacontrol frames reference different datacontrol instances using the same name.

datacontrols

java.util.Collection<DCDataControl> datacontrols()
Returns the set of data controls in the frame
Returns:

Skip navigation links

Oracle Fusion Middleware Java API Reference for Oracle ADF Model
11g Release 2 (11.1.2.2.0)

E17483-03


Copyright © 1997, 2012, Oracle. All rights reserved.