public class BeanDCHandler extends BeanDCInvocationHandler implements TransactionalDataControl, UpdateableDataControl, ManagedDataControl
| Modifier and Type | Field and Description |
|---|---|
protected DataControl |
_dc
BeanDC Data Control instance
|
static java.lang.String |
beginRequest |
static java.lang.String |
commitTransaction |
static java.lang.String |
createRowData |
static java.lang.String |
createSnapshot |
static java.lang.String |
endRequest |
static java.lang.String |
getDataProvider |
static java.lang.String |
getName
Proxy DC methods
|
static java.lang.String |
invokeOperation |
static java.lang.String |
isTransactionDirty |
static java.lang.String |
registerDataProvider |
static java.lang.String |
release |
static java.lang.String |
removeRowData |
static java.lang.String |
removeSnapshot |
static java.lang.String |
resetState |
static java.lang.String |
restoreSnapshot |
static java.lang.String |
rollbackTransaction |
static java.lang.String |
setAttributeValue |
static java.lang.String |
validate |
| Constructor and Description |
|---|
BeanDCHandler(DataControl dc) |
| Modifier and Type | Method and Description |
|---|---|
void |
beginRequest(java.util.HashMap requestCtx)
Invoked in some contexts to signal the beginning of a model request.
|
void |
commitTransaction()
Commits the current transaction to save all changes to the data source.
|
java.lang.Object |
createRowData(RowContext ctx)
This method is called by the data binding framework when a new
row is needed from the data control.
|
java.io.Serializable |
createSnapshot()
Creates a snapshot of the state of the DataControl.
|
void |
endRequest(java.util.HashMap requestCtx)
Invoked in some contexts to signal the end of a model request.
|
java.lang.Object |
getDataProvider()
Returns the Business Service Object that this datacontrol is associated with.
|
java.lang.String |
getName()
Returns name to identify this datacontrol inside a BindingContext.
|
boolean |
invokeOperation(java.util.Map bindingContext,
OperationBinding action)
Invokes an operation identified by the given method info and with ordered arguments in the params list.
|
boolean |
isTransactionDirty()
Returns true if this transaction has been dirtied by this application, as a result
of data updates, deletes or inserts.
|
java.lang.Object |
registerDataProvider(RowContext ctx)
This method is called by the data binding facility before the row in the RowContext object is
modified or marked as removed, so the row can be marked dirty by the data control.
|
void |
release()
Releases the DataControl.
|
boolean |
removeRowData(RowContext ctx)
This method is called by the data binding facility when a row
should be removed from the underlying data source.
|
void |
removeSnapshot(java.io.Serializable handle)
Removes the snapshot associated with the snapshot handle.
|
boolean |
resetState()
Resets the DataControl.
|
void |
restoreSnapshot(java.io.Serializable handle)
Restore the state of the DataControl with the snapshot
state that is referenced by the handle.
|
void |
rollbackTransaction()
Rolls back the current transaction.
|
boolean |
setAttributeValue(AttributeContext ctx,
java.lang.Object value)
This method is called by the data binding framework when a new
value is to be set on an attribute in a bean.
|
void |
validate()
Validates transaction if dirty.
|
findMethod, findMethods, getInstance, invoke, invoke, invokeMethodprotected DataControl _dc
public static final java.lang.String getName
public static final java.lang.String release
public static final java.lang.String getDataProvider
public static final java.lang.String invokeOperation
public static final java.lang.String isTransactionDirty
public static final java.lang.String rollbackTransaction
public static final java.lang.String commitTransaction
public static final java.lang.String setAttributeValue
public static final java.lang.String createRowData
public static final java.lang.String registerDataProvider
public static final java.lang.String removeRowData
public static final java.lang.String validate
public static final java.lang.String beginRequest
public static final java.lang.String endRequest
public static final java.lang.String resetState
public static final java.lang.String createSnapshot
public static final java.lang.String restoreSnapshot
public static final java.lang.String removeSnapshot
public BeanDCHandler(DataControl dc)
public java.lang.String getName()
getName in interface DataControlpublic void release()
This should close all open DataControl resources.
release in interface DataControlpublic java.lang.Object getDataProvider()
getDataProvider in interface DataControlpublic boolean invokeOperation(java.util.Map bindingContext,
OperationBinding action)
invokeOperation in interface DataControlbindingContext - A binding context that provide access to all binding related objects.action - OperationBindingpublic boolean isTransactionDirty()
isTransactionDirty in interface TransactionalDataControlpublic void rollbackTransaction()
rollbackTransaction in interface TransactionalDataControlpublic void commitTransaction()
commitTransaction in interface TransactionalDataControlpublic boolean setAttributeValue(AttributeContext ctx, java.lang.Object value)
Return true if the base framework should skip any further processing of this attribute set. Otherwise return false so that framework can perform a set or put of the attribute value based on introspection.
setAttributeValue in interface UpdateableDataControlpublic java.lang.Object createRowData(RowContext ctx)
createRowData in interface UpdateableDataControlctx - Context of the new row.public java.lang.Object registerDataProvider(RowContext ctx)
registerDataProvider in interface UpdateableDataControlctx - Context of the row to be modified or removed.public boolean removeRowData(RowContext ctx)
removeRowData in interface UpdateableDataControlctx - Context of the rowDefinitionProviderDataControl to be removed.public void validate()
validate in interface UpdateableDataControlpublic java.io.Serializable createSnapshot()
public void restoreSnapshot(java.io.Serializable handle)
handle - Serializable a snaphsot handle that was created with
createSnapshot().public void removeSnapshot(java.io.Serializable handle)
handle - Serializable a snapshot handle that was created with
createSnapshot().public void beginRequest(java.util.HashMap requestCtx)
ManagedDataControlDatacontrols may implement this method to perform request level initialization.
This method is to be called only once per request. For example, in web applications, page forwards should not result in multiple invocations of this method.
beginRequest in interface ManagedDataControlrequestCtx - a HashMap representing request context.public void endRequest(java.util.HashMap requestCtx)
ManagedDataControlDatacontrols may implement this method to perform request level cleanup.
This method is to be called only once per request. For example, in web applications, page forwards should not result in multiple invocations of this method.
endRequest in interface ManagedDataControlrequestCtx - a HashMap representing request context.public boolean resetState()
ManagedDataControlFor example, an EJB DataControl provider may extend resetState to close the DataControl EJB SessionBean
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.
resetState in interface ManagedDataControl