|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectwt.fc.PersistenceServerHelper
This class implements helper methods for server side PersistenceManagerSvr
operations.
Supported API: true
Extendable: false
PersistenceManagerSvr
Field Summary | |
private static String |
CLASSNAME
|
static PersistenceManagerSvr |
manager
Supported API: true |
static String |
REFERENTIAL_INTEGRITY_DIRECTIVE_KEY
This attribute is used as a common key for all Referential Integrity directives stored in a Manifest. |
private static String |
RESOURCE
|
Constructor Summary | |
PersistenceServerHelper()
|
Method Summary | |
static WTValuedMap |
appendCopyLinkMap(WTValuedMap copyLinkMap,
Map sourceObjectsToLinksMap,
String roleObjectRole,
WTKeyedMap sourceObjectToRoleObjectMap)
Build an aggregate copyLinkMap. |
static WTValuedHashMap |
buildCopyLinkMap(WTList linksToCopy,
WTList roleObjects,
List roleObjectRole,
WTList otherRoleObjects)
Builds a copy-link map that can be passed as an argument to PersistenceManagerSvr.copyLink() method. |
static QuerySpec |
buildLinkRoleQuerySpec(Object a_source,
String a_role,
Class a_linkClass)
Builds a QuerySpec for retrieving objects related to the specified source object(s), role, and link class. |
static void |
copyLinks(Map sourceObjectsToLinksMap,
String roleObjectRole,
WTKeyedMap sourceObjectToRoleObjectMap)
Copies forward RoleObject values in sourceObjectToRoleObjectMap to copies of links in sourceObjectsToLinksMap. |
static QueryResult |
expand(Object source,
String role,
Class linkClass,
boolean onlyOtherSide)
Retrieves objects related to the specified source object(s) role and link class. |
static Map |
expand(WTCollection source,
String role,
Class linkClass)
Expand a collection of objects and return a java.util.Map with keys = source QueryKeys, values = WTArrayLists of associated link ObjectIdentifiers. |
static Map |
expand(WTCollection source,
String role,
Class linkClass,
boolean addLatestCriteria)
Expand a collection of objects and optionally specify a latest criteria. |
static WTList |
expandToOtherSideObjectList(Object a_source,
String a_role,
Class a_linkClass)
Retrieves objects related to the specified source object(s), role, and link class. |
static Manifest |
getGlobalTransactionManifest(Object a_key)
Returns a Manifest from the current global Transaction associated with the specified key. |
static void |
insert(WTCollection objects,
Map createStampMap,
Map modifyStampMap)
Stores the WTCollection of Persistable objects into the datastore. |
static BinaryLink |
newCopyLink(BinaryLink linkToCopy,
Persistable roleObject,
String roleObjectRole,
Persistable otherRoleObject)
Creates a new copy of a link by duplicating it and replacing the role members. |
static void |
store(WTCollection objects,
Map createStampMap,
Map modifyStampMap)
Stores the WTCollection of Persistable objects into the datastore. |
private static void |
store(WTCollection objects,
Map createStampMap,
Map modifyStampMap,
boolean a_insert)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
private static final String RESOURCE
private static final String CLASSNAME
public static final String REFERENTIAL_INTEGRITY_DIRECTIVE_KEY
public static final PersistenceManagerSvr manager
Constructor Detail |
public PersistenceServerHelper()
Method Detail |
public static BinaryLink newCopyLink(BinaryLink linkToCopy, Persistable roleObject, String roleObjectRole, Persistable otherRoleObject) throws WTException
linkToCopy
- The original link to copy.roleObject
- The object on the "roleObjectRole" side to assign. If left null, the "linkToCopy"'s role object is not replaced.roleObjectRole
- The role the "roleObject" plays in the association.otherRoleObject
- The object on the other side of the "roleObjectRole" side to assign. If left null, the "linkToCopy"'s other side role object is not replaced.
WTException
public static WTValuedHashMap buildCopyLinkMap(WTList linksToCopy, WTList roleObjects, List roleObjectRole, WTList otherRoleObjects) throws WTException
linksToCopy
- The original links to copy.roleObjects
- The objects on the "roleObjectRole" side to assign. If the list is null or an element is null, the "linkToCopy"'s role object is not replaced.roleObjectRole
- The role the "roleObject" plays in the association.otherRoleObjects
- The objects on the other side of the "roleObjectRole" side to assign. If the list is null or an element is null, the "linkToCopy"'s other side role object is not replaced.
WTException
PersistenceManagerSvr.copyLink(WTValuedHashMap)
public static QueryResult expand(Object source, String role, Class linkClass, boolean onlyOtherSide) throws WTException
source
- The persistable object to navigate. This object can be a single Peristable object or a WTCollection.role
- The role to navigate to.linkClass
- The association's link class to navigate.onlyOtherSide
- Indicates that only the other side objects of the association should be returned. If false, then the link objects are returned (the other side object can be obtained via the link object's getter method).
WTException
public static Map expand(WTCollection source, String role, Class linkClass) throws WTException
source
- role
- linkClass
-
WTException
public static Map expand(WTCollection source, String role, Class linkClass, boolean addLatestCriteria) throws WTException
source
- role
- linkClass
- addLatestCriteria
-
WTException
public static Manifest getGlobalTransactionManifest(Object a_key) throws WTException
a_key
- The key to use to look up the Manifest.
WTException
public static void insert(WTCollection objects, Map createStampMap, Map modifyStampMap) throws WTException
objects
- The WTCollection of objects to be inserted into the datastorecreateStampMap
- Map to use to retrieve associated create Timestamp. The keys for this map are Persistables and the values are Timestamps.modifyStampMap
- Map to use to retrieve associated modify Timestamp. The keys for this map are Persistables and the values are Timestamps.
WTException
public static void store(WTCollection objects, Map createStampMap, Map modifyStampMap) throws WTException
objects
- The WTCollection of objects to be inserted into the datastorecreateStampMap
- Map to use to retrieve associated create Timestamp. The keys for this map are Persistables and the values are Timestamps.modifyStampMap
- Map to use to retrieve associated modify Timestamp. The keys for this map are Persistables and the values are Timestamps.
WTException
public static void copyLinks(Map sourceObjectsToLinksMap, String roleObjectRole, WTKeyedMap sourceObjectToRoleObjectMap) throws WTException
sourceObjectsToLinksMap
- keys = source objects, values = linksroleObjectRole
- sourceObjectToRoleObjectMap
- keys = source objects, values = new role objects
WTException
public static WTValuedMap appendCopyLinkMap(WTValuedMap copyLinkMap, Map sourceObjectsToLinksMap, String roleObjectRole, WTKeyedMap sourceObjectToRoleObjectMap) throws WTException
copyLinkMap
- sourceObjectsToLinksMap
- roleObjectRole
- sourceObjectToRoleObjectMap
-
WTException
public static WTList expandToOtherSideObjectList(Object a_source, String a_role, Class a_linkClass) throws WTException
WTException
public static QuerySpec buildLinkRoleQuerySpec(Object a_source, String a_role, Class a_linkClass) throws WTException
WTException
private static void store(WTCollection objects, Map createStampMap, Map modifyStampMap, boolean a_insert) throws WTException
WTException
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |