wt.fc.manifest
Class ManifestServerHelper

java.lang.Object
  extended bywt.fc.manifest.ManifestServerHelper

public class ManifestServerHelper
extends Object

This helper defines all methods necessary for creating a Manifest, and building/adding Directive objects to that Manifest. When the Manifest has been completely built, it should be processed by the service accessible on this helper.

Supported API: false

Extendable: false


Field Summary
private static String CLASSNAME
           
private static String RESOURCE
           
static ManifestServiceSvr service
          

Supported API: false
private static boolean verbose
           
 
Constructor Summary
ManifestServerHelper()
           
 
Method Summary
static String addQueryAdhocForeignKeyExistenceDirective(Class foreignKeyClass, String foreignKeyAttribute, Class parentClass, String parentAttribute, WTCollection roleObjects, Manifest manifest, String name)
          Add a QueryAdHocForeignKeyExistenceDirective to the Manifest.
static String addQueryAdhocForeignKeyExistenceDirective(Class foreignKeyClass, String foreignKeyAttribute, Class parentClass, String parentAttribute, WTCollection roleObjects, Manifest manifest, String name, boolean includeDescendants)
          Add a QueryAdHocForeignKeyExistenceDirective to the Manifest.
static String addQueryLinkExistenceDirective(RoleDescriptor roleDescriptor, WTCollection roleObjects, Manifest manifest, boolean queryRoleA, String name)
          This method will properly add a QueryLinkExistenceSingleRoleDirective to the specified Manifest performing any appropriate merging or optimizations.
static String addQueryLinkExistenceDirective(RoleDescriptor roleDescriptor, WTCollection roleObjects, Manifest manifest, String name)
          This method will properly add a QueryLinkExistenceDirective to the specified Manifest performing any appropriate merging or optimizations.
static Manifest createManifest()
          Use this method to create instances of Manifest.
private static WTCollection getAdHocQueryKeyCollection(WTCollection c)
          Given a WTCollection that contains only ObjectIdentifier QueryKeys.
private static QueryKey[] getObjectQueryKeys(WTCollection c)
          Replace any VersionForeignKey QueryKeys in the input WTCollection with ObjectIdentifier QueryKeys.
private static QueryKey[] getQueryKeys(WTCollection c, RoleDescriptor rd)
          Given a WTCollection that may contain return a QueryKey[] where all QueryKeys are VersionForeignKeys or ObjectIdentifiers.
private static QueryKey[] getVersionQueryKeys(WTCollection c)
          Replace any ObjectIdentifier QueryKeys in the input WTCollection with VersionForeignKey QueryKeys.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

RESOURCE

private static final String RESOURCE
See Also:
Constant Field Values

CLASSNAME

private static final String CLASSNAME

verbose

private static boolean verbose

service

public static final ManifestServiceSvr service


Supported API: false

Constructor Detail

ManifestServerHelper

public ManifestServerHelper()
Method Detail

createManifest

public static Manifest createManifest()
Use this method to create instances of Manifest.

Supported API: false

Returns:
Manifest

addQueryLinkExistenceDirective

public static String addQueryLinkExistenceDirective(RoleDescriptor roleDescriptor,
                                                    WTCollection roleObjects,
                                                    Manifest manifest,
                                                    String name)
                                             throws WTException
This method will properly add a QueryLinkExistenceDirective to the specified Manifest performing any appropriate merging or optimizations.

Supported API: false

Parameters:
roleDescriptor - The RoleDescriptor describing the role played by all the objects in the specified WTCollection.
roleObjects - The objects that play the role specified in the RoleDescriptor on the links being queried.
manifest - The Manifest object that the Directive should be added to.
name - The name that should be used to store this particular Directive. If null is provided, the storage name is internally generated and returned, if not the name you specified is returned.
Returns:
String
Throws:
WTException

addQueryLinkExistenceDirective

public static String addQueryLinkExistenceDirective(RoleDescriptor roleDescriptor,
                                                    WTCollection roleObjects,
                                                    Manifest manifest,
                                                    boolean queryRoleA,
                                                    String name)
                                             throws WTException
This method will properly add a QueryLinkExistenceSingleRoleDirective to the specified Manifest performing any appropriate merging or optimizations.

Supported API: false

Parameters:
roleDescriptor -
roleObjects -
manifest -
queryRoleA -
name -
Returns:
String
Throws:
WTException

addQueryAdhocForeignKeyExistenceDirective

public static String addQueryAdhocForeignKeyExistenceDirective(Class foreignKeyClass,
                                                               String foreignKeyAttribute,
                                                               Class parentClass,
                                                               String parentAttribute,
                                                               WTCollection roleObjects,
                                                               Manifest manifest,
                                                               String name)
                                                        throws WTException
Add a QueryAdHocForeignKeyExistenceDirective to the Manifest. Do not include descendants.

Supported API: false

Parameters:
foreignKeyClass -
foreignKeyAttribute -
parentClass -
parentAttribute -
roleObjects -
manifest -
name -
Returns:
String
Throws:
WTException

addQueryAdhocForeignKeyExistenceDirective

public static String addQueryAdhocForeignKeyExistenceDirective(Class foreignKeyClass,
                                                               String foreignKeyAttribute,
                                                               Class parentClass,
                                                               String parentAttribute,
                                                               WTCollection roleObjects,
                                                               Manifest manifest,
                                                               String name,
                                                               boolean includeDescendants)
                                                        throws WTException
Add a QueryAdHocForeignKeyExistenceDirective to the Manifest.

Supported API: false

Parameters:
foreignKeyClass -
foreignKeyAttribute -
parentClass -
parentAttribute -
roleObjects -
manifest -
name -
includeDescendants - In some cases the class of the "parentAttribute" will always have the same type. If this is true then includeDescendants should be false to enhance performance. E.g., if the "parentAttribute" is the predecessor for an Iterated object then all predecessors will have the same class name and includeDescendants should be false.
Returns:
String
Throws:
WTException

getObjectQueryKeys

private static QueryKey[] getObjectQueryKeys(WTCollection c)
                                      throws WTException
Replace any VersionForeignKey QueryKeys in the input WTCollection with ObjectIdentifier QueryKeys.

Parameters:
c -
Returns:
QueryKey[]
Throws:
WTException

getAdHocQueryKeyCollection

private static WTCollection getAdHocQueryKeyCollection(WTCollection c)
                                                throws WTException
Given a WTCollection that contains only ObjectIdentifier QueryKeys.

Parameters:
c -
Returns:
WTCollection
Throws:
WTException

getVersionQueryKeys

private static QueryKey[] getVersionQueryKeys(WTCollection c)
                                       throws WTException
Replace any ObjectIdentifier QueryKeys in the input WTCollection with VersionForeignKey QueryKeys.

Parameters:
c -
Returns:
QueryKey[]
Throws:
WTException

getQueryKeys

private static QueryKey[] getQueryKeys(WTCollection c,
                                       RoleDescriptor rd)
                                throws WTException
Given a WTCollection that may contain return a QueryKey[] where all QueryKeys are VersionForeignKeys or ObjectIdentifiers.

Parameters:
c -
rd -
Returns:
WTCollection
Throws:
WTException