|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
The SyncBoDataFacade provides access functions to all data objects (SyncBo or Row structures) in the repository, and a creator method for the SyncBo object. An object or a collection of data objects could be retrieved from the repository using their metadata descriptors, primary key attribute, or a Query object. An instance of this class could be retrieved from the SmartSyncRuntime. This data facade can be used for the following operation.
Example:
Deleting a SyncBo.where dataFacade is the SyncBoDataFacade.
txMgr.beginTransaction();
dataFacade.deleteSyncBo(existingGlobalSyncBo);
txMgr.rollback(txMgr.getCurrentTransaction());
SmartSyncRuntime.getSyncBoDataFacade(com.sap.ip.me.api.conf.VisibilityType)
Method Summary | |
SyncBo |
createEmptySyncBo(SyncBoDescriptor syncBoDescriptor)
Creates an empty SyncBo instance. |
void |
deleteSyncBo(SyncBo syncBo)
Deletes an existing SyncBo object specified by the SyncBo parameter from the repository. |
JQueryResult |
executeQuery(JQuery query)
Returns results for the Join Query, use default parameter values. |
JQueryResult |
executeQuery(JQuery query,
int startIdx,
int maxCount)
Returns results for the Join Query, use default parameter values. |
JQueryResult |
executeQuery(JQuery query,
JQueryParameterSet params)
Returns results for the Join Query |
JQueryResult |
executeQuery(JQuery query,
JQueryParameterSet params,
int startIdx,
int maxCount)
Returns results for the Join Query |
Row |
getRow(RowDescriptor rowDescriptor,
java.math.BigInteger primaryKey)
Returns Row instance for the specified primary key from the repository. |
Row |
getRow(RowDescriptor rowDescriptor,
java.lang.String primaryKey)
Returns Row instance for the specified primary key from the repository. |
Row |
getRow(java.lang.String primaryKey)
Deprecated. use getRow(RowDescriptor,String) or getRow(RowDescriptor,BigInteger) instead!! |
RowList |
getRows(Query query)
Returns a static list of Row instances for a specified query from the repository. |
RowCollection |
getRows(RowDescriptor rowDescriptor)
Returns a static collection of all Row instances for the specified RowDescriptor from the repository. |
SmartSyncTransactionManager |
getSmartSyncTransactionManager()
Returns an instance of a SmartSyncTransactionManager. |
SyncBo |
getSyncBo(java.lang.String primaryKey)
Deprecated. use getSyncBo(SyncBoDescriptor,String instead) |
SyncBo |
getSyncBo(SyncBoDescriptor syncBoDescriptor,
java.math.BigInteger primaryKey)
Returns a SyncBo instance for the specified primary key from the repository. |
SyncBo |
getSyncBo(SyncBoDescriptor syncBoDescriptor,
java.lang.String primaryKey)
Returns a SyncBo instance for the specified primary key from the repository. |
SyncBoList |
getSyncBos(Query query)
Deprecated. Use queries for top rows and obtain SyncBO's on demand instead because of performance reasons |
SyncBoCollection |
getSyncBos(SyncBoDescriptor syncBoDescriptor)
Returns a static collection of all SyncBo objects for the specified SyncBoDescriptor from the repository. |
void |
insertSyncBo(SyncBo syncBo)
Adds the specified SyncBo into the repository. |
void |
replaceSyncBo(SyncBo syncBo)
Deprecated. for performant write access to SyncBo and its Rows use Row.modifyFieldValue(FieldDescriptor, Object)
in conjunction with SyncBo.modifyRow(Row) instead. |
int |
size(Query query)
Returns the number of objects that will be returned from the repository for the specified Query instance. |
Method Detail |
public SyncBo createEmptySyncBo(SyncBoDescriptor syncBoDescriptor) throws ModificationNotAllowedException
syncBoDescriptor
- the SyncBoDescriptor of the
SyncBo object to be created
ModificationNotAllowedException
- is thrown if the operation is
against the rule defined in the metadata. However as of 2.1 SP02,
this method is not subjected anymore to any test against the rule in
the metadata to give applications the freedom of creating empty
SyncBo instances regardless of the its create permission and
processing type. Instead, SmartSync enforces the rules when this
instance is inserted into the repository.public void deleteSyncBo(SyncBo syncBo) throws PersistenceException, ModificationNotAllowedException
syncBo
- the SyncBo object to be
deleted from the repository
ModificationNotAllowedException
- is thrown if the operation is
against the rule defined in the metadata.
PersistenceException
- is thrown ifany persistent
layer related errors occurred during the delete operationpublic SyncBo getSyncBo(java.lang.String primaryKey) throws PersistenceException
primaryKey
- the primary key of the SyncBo to be
retrieved
PersistenceException
- is thrown if the specified primary key
does not exist or if any persistent layer realat ed errors occurred
during retrieval.public SyncBo getSyncBo(SyncBoDescriptor syncBoDescriptor, java.lang.String primaryKey) throws PersistenceException
primaryKey
- the primaryKey of the SyncBo with leading zerossyncBoDescriptor
- the SyncBoDescriptor of the SyncBo to be retrieved.
PersistenceException
- is thrown if the specified primary key
does not exist or if any persistent layer realat ed errors occurred
during retrieval.public SyncBo getSyncBo(SyncBoDescriptor syncBoDescriptor, java.math.BigInteger primaryKey) throws PersistenceException
primaryKey
- the primaryKey of the SyncBo in BigInteger formatsyncBoDescriptor
- the SyncBoDescriptor of the SyncBo to be retrieved.
PersistenceException
- is thrown if the specified primary key
does not exist or if any persistent layer realated errors occurred
during retrieval.public SyncBoCollection getSyncBos(SyncBoDescriptor syncBoDescriptor) throws PersistenceException
syncBoDescriptor
- the SyncBoDescriptor of the SyncBo
objects to be retrieved
PersistenceException
- is thrown ifany persistent layer related
errors occurred during the retrievalpublic SyncBoList getSyncBos(Query query) throws PersistenceException
query
- the Query object that contains the
condtion
PersistenceException
- is thrown ifany persistent layer related
errors occurred during the retrievalpublic int size(Query query) throws PersistenceException
query
- the Query object that contains the
condtion
PersistenceException
- is thrown ifany persistent layer related
errors occurred during the executionpublic Row getRow(java.lang.String primaryKey) throws PersistenceException
//the primary key
String primaryKey = "0000000120";
//leading zeros will be lost here.
BigInteger key = new BigInteger(KEY);
//key.toString() will be "120"
SyncBoDataFacade.getRow(key.toString());
primaryKey
- the primary key of the Row object to be
retrieved
PersistenceException
- is thrown if the specified primary key
does not exist and if any persistent layer realated errors occurred
during the retrieval.public Row getRow(RowDescriptor rowDescriptor, java.lang.String primaryKey) throws PersistenceException
primaryKey
- the primary key of the Row object with leading zerosrowDescriptor
- the RowDescriptor of the Row object to be retrieved
PersistenceException
- is thrown if the specified primary key
does not exist and if any persistent layer realated errors occurred
during the retrieval.public Row getRow(RowDescriptor rowDescriptor, java.math.BigInteger primaryKey) throws PersistenceException
primaryKey
- the primary key of the Row object in BigInteger formatrowDescriptor
- the RowDescriptor of the Row object to be retrieved
PersistenceException
- is thrown if the specified primary key
does not exist and if any persistent layer realated errors occurred
during the retrieval.public RowCollection getRows(RowDescriptor rowDescriptor) throws PersistenceException
rowDescriptor
- the RowDescriptor of the Row objects to
be retrieved
PersistenceException
- is thrown ifany persistent layer related
errors occurred during the retrievalpublic RowList getRows(Query query) throws PersistenceException
query
- the Query object that contains the
condtion
PersistenceException
- is thrown ifany persistent layer related
errors occurred during the retrievalpublic void insertSyncBo(SyncBo syncBo) throws PersistenceException, ModificationNotAllowedException
syncBo
- the SyncBo object to be
inserted
ModificationNotAllowedException
- is thrown if the insert
operation is against the rule defined in the metadata or if the
specified SyncBo status is not INITIAL.
PersistenceException
- is thrown ifany persistent
layer related errors occurred during the object insertionpublic void replaceSyncBo(SyncBo syncBo) throws PersistenceException, ModificationNotAllowedException
Row.modifyFieldValue(FieldDescriptor, Object)
in conjunction with SyncBo.modifyRow(Row)
instead.
syncBo
- the unlinked copy of the
SyncBo object
PersistenceException
- is thrown ifany persistent
layer related errors occurred during the object insertion
ModificationNotAllowedException
- is thrown if the replace
operation is against the rule defined in the metadata or if the
specified SyncBo status is not UNLINKED.public SmartSyncTransactionManager getSmartSyncTransactionManager() throws SmartSyncException
SmartSyncException
public JQueryResult executeQuery(JQuery query, JQueryParameterSet params) throws PersistenceException, SmartSyncException
query
- instance of com.sap.ip.me.api.persist.query.JQueryparams
- query parameters
PersistenceException
- I/O Errors
SmartSyncException
JQuery
,
JQueryResult
public JQueryResult executeQuery(JQuery query, JQueryParameterSet params, int startIdx, int maxCount) throws PersistenceException, SmartSyncException
query
- instance of com.sap.ip.me.api.persist.query.JQueryparams
- query parametersstartIdx
- index of first item to return (0-based)maxCount
- maximum number of items to return (-1 to return all)
PersistenceException
- I/O Errors
SmartSyncException
JQuery
,
JQueryResult
public JQueryResult executeQuery(JQuery query) throws PersistenceException, SmartSyncException
query
- instance of com.sap.ip.me.api.persist.query.JQuery
PersistenceException
- I/O Errors
SmartSyncException
JQuery
,
JQueryResult
public JQueryResult executeQuery(JQuery query, int startIdx, int maxCount) throws PersistenceException, SmartSyncException
query
- instance of com.sap.ip.me.api.persist.query.JQuerystartIdx
- index of first item to return (0-based)maxCount
- maximum number of items to return (-1 to return all)
PersistenceException
- I/O Errors
SmartSyncException
JQuery
,
JQueryResult
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |