com.bea.ld.dsmediator.update
Class DataServiceMediator
java.lang.Object
com.bea.ld.dsmediator.update.Mediator
com.bea.ld.dsmediator.update.DataServiceMediator
- public class DataServiceMediator
- extends com.bea.ld.dsmediator.update.Mediator
Method Summary |
void |
executeUpdatePlan(UpdatePlan updatePlan)
For each unique data source instance within update plan, submit will invoked for inserted, updated or deleted. |
void |
flushCachedMetaData()
flush the cached decomposition map and data source meta data
internal use only, invoked in development mode |
com.bea.ld.dsmediator.update.DataServiceMetaData |
getDataServiceMetaData(java.lang.String dsName)
lookup DataObject meta data by ds name |
UpdatePlan |
getUpdatePlan(commonj.sdo.DataGraph sdo)
For a given view SDO object, decompose it and return a update plan
Update plan is a sequence of nodes decomposed from original View SDO object. |
java.util.Properties[] |
submit(commonj.sdo.DataGraph dataGraph,
java.lang.String dsName)
First, the change summary for the data graph will be analyzed using
the metadata for the associated SDO and an update plan will be produced.
|
java.util.Properties[] |
submit(java.lang.String[] dgStrings,
java.lang.String dsName)
Deserialize the serialized SDO into a DataGraph, then call the
method submit . |
java.util.Properties[] |
submit(java.lang.String dgString,
java.lang.String dsName)
Deprecated. |
Methods inherited from class com.bea.ld.dsmediator.update.Mediator |
getInstance, setMediatorClassName |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DataServiceMediator
public DataServiceMediator()
- should not be called directly
submit
public java.util.Properties[] submit(java.lang.String dgString,
java.lang.String dsName)
- Deprecated.
- Submit a serialized SDO for update/insert/delete to the given
DataService (logical or physical).
- Parameters:
dgString
- serialized SDOdsName
- data service this submit is targeted for
- Returns:
- Primary keys. If adds of top level data objects have occurred that have primary keys, then after a successful submit,
the values of the primary keys for the inserted tuples will be returned as an array of java Properties, (xpath name/value in string) pairs.
This only applies to the primary keys of the top level data object.
Nested data objects that have their primary keys computed do not return their values.
Returning the top level pkeys of inserted tuples, allows the developer to refetch tuples based on their new primary keys
if desired.
If one had an array of Customer with primary key CustID in your SDO and inserted two customers, then the submit would return
an array of two Properties with the name being CustID, relative to the Customer type and the value in string format being
the new primary key value for each inserted Customer.
submit
public java.util.Properties[] submit(java.lang.String[] dgStrings,
java.lang.String dsName)
- Deserialize the serialized SDO into a DataGraph, then call the
method
submit
.
- Parameters:
dgStrings
- array of serialized SDOs to updatedsName
- DataService to execute the SDO update against
- Returns:
- Primary keys. If adds of top level data objects have occurred that have primary keys, then after a successful submit,
the values of the primary keys for the inserted tuples will be returned as an array of java Properties, (xpath name/value in string) pairs.
This only applies to the primary keys of the top level data object.
Nested data objects that have their primary keys computed do not return their values.
Returning the top level pkeys of inserted tuples, allows the developer to refetch tuples based on their new primary keys
if desired.
If one had an array of Customer with primary key CustID in your SDO and inserted two customers, then the submit would return
an array of two Properties with the name being CustID, relative to the Customer type and the value in string format being
the new primary key value for each inserted Customer.
submit
public java.util.Properties[] submit(commonj.sdo.DataGraph dataGraph,
java.lang.String dsName)
- First, the change summary for the data graph will be analyzed using
the metadata for the associated SDO and an update plan will be produced.
The update plan will be used to apply the changes in the SDO for
the data sources used in the view - view update decomposition.
Second, any custom update override methods #performUpdate will be
invoked for each altered dataServiceMetaData object in the update plan
if the update override exists.
If there is no update override or the update override returns "true" to
continue, submit will be called on each dataServiceMetaData instances.
- Parameters:
dataGraph
- data graph being submitted for updatedsName
- DataService to execute the SDO update against
- Returns:
- Primary keys. If adds of top level data objects have occurred that have primary keys, then after a successful submit,
the values of the primary keys for the inserted tuples will be returned as an array of java Properties, (xpath name/value in string) pairs.
This only applies to the primary keys of the top level data object.
Nested data objects that have their primary keys computed do not return their values.
Returning the top level pkeys of inserted tuples, allows the developer to refetch tuples based on their new primary keys
if desired.
If one had an array of Customer with primary key CustID in your SDO and inserted two customers, then the submit would return
an array of two Properties with the name being CustID, relative to the Customer type and the value in string format being
the new primary key value for each inserted Customer.
getUpdatePlan
public UpdatePlan getUpdatePlan(commonj.sdo.DataGraph sdo)
- For a given view SDO object, decompose it and return a update plan
Update plan is a sequence of nodes decomposed from original View SDO object. Each node in sequence can either be a SDO instance only
or a SDO with a sub-update plan, which is another sequence of nodes.
in View SDO, if a parent DataObject get updated, at least partially due to the changes on the DataObjects nested inside it, then SDO instances corresponding
to those children DataObjects will be addChild into sub-update plan.
Update plan contains inserted, updated, deleted and unchanged SDO instances as well.
Update plan is constructed from a LinkedHashMap tree, independent SDO instances are addChild in the same level and update sequence on their
source dataobjects is preserved
- Parameters:
sdo
-
- Returns:
executeUpdatePlan
public void executeUpdatePlan(UpdatePlan updatePlan)
- For each unique data source instance within update plan, submit will invoked for inserted, updated or deleted.
- Parameters:
updatePlan
-
getDataServiceMetaData
public com.bea.ld.dsmediator.update.DataServiceMetaData getDataServiceMetaData(java.lang.String dsName)
- lookup DataObject meta data by ds name
- Parameters:
dsName
- ds file name
- Returns:
- internal data structure used by mediator that describes the dataobject
flushCachedMetaData
public void flushCachedMetaData()
- flush the cached decomposition map and data source meta data
internal use only, invoked in development mode
Copyright © 2006 BEA Systems Inc. All Rights Reserved.