wt.epm.util
Class EPMQueryHelper

java.lang.Object
  extended bywt.epm.util.EPMQueryHelper

public class EPMQueryHelper
extends Object

The EPMQueryHelper class provides set of static methods to help with performing queries and manipulating their results.

Supported API: false

Extendable: false


Field Summary
private static int CHUNK_SIZE
           
private static String CLIENT_QUERY_HELPER_CLASS
           
private static Class clientQueryHelperClaz
           
private static String CONFIGSPEC_OBJECT_KEY
           
static Object EDIT_IBAS
           
private static String RESOURCE
           
 
Constructor Summary
EPMQueryHelper()
           
 
Method Summary
static void addCheckedOutFilterToQuerySpec(QuerySpec select, Class workableClass, int workableIndex, EPMWorkspace ws)
           
protected static int addLinkCondition(QuerySpec qs, Class linkCl, long[] ids)
           
static void addModifiedFilterToQuerySpec(QuerySpec select, Class workableClass, int workableIndex, boolean modified, EPMWorkspace ws)
           
static void addModifiedInSBFilterToQuerySpec(QuerySpec select, Class iteratedClass, int iteratedIndex, boolean modified)
           
static ObjectIdentifier assignUniqueIdentifier(Persistable object)
           
static WhereExpression buildExpression(Class objectClass, String attribute, long[] databaseIds)
          Builds a where expression for the query based on an array of database identifiers.
static void copyAndSaveEPMSepFamilyTables(Collection familyTablesToCopy, Collection moveLinksFor, ConfigSpec configSpec)
          This method clones and stores FamilyTable including all it's containedIn links and returns new FamilyTable
private static SearchCondition createInSearchCondition(Class targetClass, String attribute, long[] value)
           
private static SearchCondition createInSearchCondition(Class targetClass, String attribute, long[] value, boolean negate)
           
static QueryResult difference(QueryResult firstSet, QueryResult secondSet)
          Returns a QueryResult that contains all of the objects that are in the first set but are not in the second set.
static long[] extractBranchIds(Collection objects)
          Extracts the branch identifier from each object in the collection of Iterated objects or VersionForeignKeys.
static long[] extractBranchIds(WTCollection objects, Class[] classes, boolean includeSubClasses)
          Returns the branch identifier for each object in the collection that is an instance of one of the given classes.
static long[] extractIds(Collection objects)
          Extracts the database identifier from each object in the collection of Persistable objects or ObjectIdentifiers.
static long[] extractIds(Collection persistables, Map persistablesById)
           
static long[] extractIDs(ObjectIdentifier[] objectIDs, Class objectClass)
           
static long[] extractIds(WTCollection objects, Class[] classes, boolean includeSubClasses)
          Returns the database identifier for each object in the collection that is an instance of one of the given classes.
static long[] extractMasterIds(Collection objects)
          Extracts the database identifier of the Master of each object in the collection of Iterated objects removing duplicates.
static QueryResult extractObjects(QueryResult arrays, Class objectClass)
          Given a query result of arrays, extracts the object of the given class from each array.
static QueryResult extractObjects(QueryResult arrays, int index)
          Given a query result of arrays, extracts the object at the given index from each array.
private static long[] familyTables2familyTableMasterIds(Collection familyTables)
           
static QueryResult familyTablesDocListDifference(EPMWorkspace ws, Collection familyTables, Collection docs, boolean checkedoutOnly, Boolean modified)
          This method returns list of documents from the Family Tables which do not present in the collection of docs
static Collection familyTablesDocListDifferenceCollection(EPMWorkspace ws, Collection familyTables, Collection docs, boolean checkedoutOnly, Boolean modified)
          This method do the same thing as familyTablesDocListDifference but returns Collection of EPMDocument-s instead of QueryResult
static QueryResult filterObjects(QueryResult objects, Class classToKeep)
          Given a query result of objects, filters out all objects except those of the given class from the query result.
private static int findIndex(Object[] array, Class objectClass)
           
static QueryResult findObjects(ObjectIdentifier[] objectIDs)
          Retrieves Persistable objects from the database given their object identifiers.
static QueryResult getBuildRules(Iterated object)
           
private static Object getKey(Object object)
           
static QueryResult getLatestCompatible(QueryResult originals)
          Gets latest compatible objects from a query result of Persistable objects.
static QueryResult getLatestCompatible(QueryResult originals, WTContainerRef preferedContainerRef)
          Gets latest compatible objects from a query result of Persistable objects.
protected static void getLatestCompatibleInstance(long[] masterOIDs, long[] familyTableOIDs, Map instances)
           
private static QuerySpec getOnlyInstancesRestriction()
           
static QueryResult getPreviousContainedInLinksAndStuff(Collection famTables, long[] docIds)
           
static String getType(QueryResult result)
           
static void initializeRoles(QueryResult links, QueryResult objects)
          Initializes the RoleA and RoleB members for each link using the objects provided in the other QueryResult.
static boolean isArrays(QueryResult result)
          Given a query result, determine whether or not it contains arrays.
static boolean isLaterIteration(Iterated first, Iterated second)
          Compares two Iterated objects of same Master and returns true if the first Iteration is later than the second.
static HashMap lookupAttrDefs(String[] attrDefNames)
           
static ConfigSpec lookupConfigSpec(EPMWorkspace workspace)
           
static QueryResult lookupContainedInLinks(Collection familyTables, ConfigSpec configSpec)
          This method returns list of documents from the Family Tables which do not present in the collection of docs
static QueryResult lookupContainedInLinksAndFamilyTablesForMemberAndCheckOtherCheckouts(Collection docs, EPMWorkspace ws)
           
static List lookupContainers(String[] containerNames)
           
static Map lookupDependencyLinks(List documents, boolean getDocuments, ConfigSpec configSpec)
           
static QueryResult lookupDocuments(Collection documents, ConfigSpec configSpec, EPMWorkspace ws)
           
static QueryResult lookupDocuments(Vector docs, ConfigSpec configSpec, EPMWorkspace ws)
           
static QueryResult lookupFamilyTableCells(Collection containedInLinks)
           
static QueryResult lookupFamilyTableColumns(Collection familyTables)
           
static QueryResult lookupFamilyTableColumns(long[] familyTableIds)
           
static QueryResult lookupFamilyTableMembers(Collection familyTables, ConfigSpec configSpec)
           
static QueryResult lookupFamilyTables(Collection members, EPMWorkspace workspace)
           
private static QueryResult lookupFamilyTables(long[] ids, EPMWorkspace workspace, boolean returnLink, boolean returnDocId)
           
static Map lookupFamilyTablesAndLinkByMembers(Collection members, EPMWorkspace workspace)
           
static Map lookupFamilyTablesByMembers(Collection members, EPMWorkspace workspace)
           
static Collection lookupFamilyTablesForMembers(Collection members)
           
static QueryResult lookupFeatureDefinitions(Collection familyTables)
           
static Map lookupGenerics(Collection instances, ConfigSpec configSpec)
          Method returns Map where key is instance CADName and value is correspondent generic EPMDocument
static IBAHolder[] lookupIBAs(Collection holderList)
           
static IBAHolder[] lookupIBAs(IBAHolder[] holders)
          Given an array of IBAHolders, this method queries windchill database and gets values of all attributes with constraints.
static QueryResult lookupInstancesAndContainedInLinks(Collection familyTables, ConfigSpec configSpec)
           
static QueryResult lookupInstancesAndContainedInLinks(QueryResult familyTables, ConfigSpec configSpec)
           
static Map lookupLatestCompatibleFamilyTableMemberIterations(Collection memberMasters, Collection familyTables)
          Returns a map the latest instances of given masters compatible with the given family tables, where : key is a instance value is a link.
static QueryResult lookupMembersAndContainedInLinks(Collection familyTables, ConfigSpec configSpec)
           
static QueryResult lookupMembersAndContainedInLinks(QueryResult familyTables, ConfigSpec configSpec)
           
private static QueryResult lookupMembersAndContainedInLinks(QueryResult familyTables, ConfigSpec configSpec, QuerySpec querySpec)
           
static Map lookupOrganizations(Collection orgNames)
           
static Map lookupOrganizations(String[] orgNames)
           
static QueryResult lookupParameterDefinitions(Collection familyTables)
           
static QueryResult lookupParamMaps(Collection ibaHolders)
           
static EPMDocument lookupTopGeneric(EPMFamilyTable familyTable)
           
static List lookupTopGeneric(List familyTables)
           
static QueryResult lookupTopGenericAndContainedInLink(Collection familyTables, ConfigSpec configSpec)
           
static QueryResult lookupTopGenericAndContainedInLink(QueryResult familyTables, ConfigSpec configSpec)
           
static QueryResult lookupVariantLinks(Collection instances, boolean onlyOtherSide, ConfigSpec configSpec)
           
static QueryResult lookupVariantLinks(Collection instances, ConfigSpec configSpec)
           
static QueryResult lookupVariantLinks(QueryResult instances, boolean onlyOtherSide, ConfigSpec configSpec)
           
static QueryResult lookupVariantLinks(QueryResult instances, ConfigSpec configSpec)
           
static EPMWorkspace lookupWorkspace(String name)
           
static EPMWorkspace lookupWorkspace(String name, WTPrincipal owner)
           
static QueryResult removeDuplicates(QueryResult originals)
          Removes duplicates from a query result of Persistable objects or ObjectIdentifiers.
static QueryResult sandboxFamilyTablesDocListDifference(WTContainerRef sandboxContainerRef, Collection familyTables, Collection docs, Boolean modifiedInSandBox)
          This method returns list of documents from the Family Tables which do not present in the collection of docs
static Collection selectLatestIteration(Collection originals)
          Given a collection of Iterated and Mastered objects, return the latest iterations for each set of iterations in the collection that share the same master.
static Object[] toArray(QueryResult objects, Class objectClass)
          Returns an array of type objectClass that contains all of the objects in the supplied QueryResult.
private static long[] trimArray(long[] array, int newLength)
           
 
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

CHUNK_SIZE

private static int CHUNK_SIZE

CONFIGSPEC_OBJECT_KEY

private static final String CONFIGSPEC_OBJECT_KEY
See Also:
Constant Field Values

EDIT_IBAS

public static final Object EDIT_IBAS

clientQueryHelperClaz

private static Class clientQueryHelperClaz

CLIENT_QUERY_HELPER_CLASS

private static String CLIENT_QUERY_HELPER_CLASS
Constructor Detail

EPMQueryHelper

public EPMQueryHelper()
Method Detail

extractObjects

public static QueryResult extractObjects(QueryResult arrays,
                                         int index)
Given a query result of arrays, extracts the object at the given index from each array.

Supported API: false

Returns:
QueryResult of objects.

extractObjects

public static QueryResult extractObjects(QueryResult arrays,
                                         Class objectClass)
Given a query result of arrays, extracts the object of the given class from each array. Note: This method assumes that the arrays do not contain any null values.

Supported API: false

Returns:
QueryResult of objects.

filterObjects

public static QueryResult filterObjects(QueryResult objects,
                                        Class classToKeep)
Given a query result of objects, filters out all objects except those of the given class from the query result.

Supported API: false

Returns:
QueryResult of objects of the given class.

isArrays

public static boolean isArrays(QueryResult result)
Given a query result, determine whether or not it contains arrays.

Supported API: false

Returns:
boolean - whether or not the QueryResult holds arrays

toArray

public static Object[] toArray(QueryResult objects,
                               Class objectClass)
Returns an array of type objectClass that contains all of the objects in the supplied QueryResult.

Supported API: false

Returns:
Object[] - an array of type objectClass containing all of the objects from the QueryResult

removeDuplicates

public static QueryResult removeDuplicates(QueryResult originals)
Removes duplicates from a query result of Persistable objects or ObjectIdentifiers.

Supported API: false

Returns:
QueryResult of Persistable objects or ObjectIdentifiers with duplicates removed

getLatestCompatible

public static QueryResult getLatestCompatible(QueryResult originals)
                                       throws WTException
Gets latest compatible objects from a query result of Persistable objects. If there are two iterations of the same document, it selects the latest of the two. This method works only on Iterated (or Mastered objects) , else if returns null

Supported API: false

Returns:
QueryResult of Persistable objects with the latest iterations
Throws:
WTException

isLaterIteration

public static boolean isLaterIteration(Iterated first,
                                       Iterated second)
                                throws WTException
Compares two Iterated objects of same Master and returns true if the first Iteration is later than the second. If the iterations are not of the same Master, it returns false.

Supported API: false

Returns:
boolean
Throws:
WTException

findObjects

public static QueryResult findObjects(ObjectIdentifier[] objectIDs)
                               throws WTException
Retrieves Persistable objects from the database given their object identifiers. Note: The objects may belong to the different classes.

Supported API: false

Returns:
QueryResult of Persistable objects retrieved from the database
Throws:
WTException

difference

public static QueryResult difference(QueryResult firstSet,
                                     QueryResult secondSet)
Returns a QueryResult that contains all of the objects that are in the first set but are not in the second set.

Supported API: false

Returns:
QueryResult of objects that are in the first set but not the second

initializeRoles

public static void initializeRoles(QueryResult links,
                                   QueryResult objects)
Initializes the RoleA and RoleB members for each link using the objects provided in the other QueryResult. By initializing the role members, we avoid querying for each role object one at a time.

Supported API: false

Returns:
QueryResult of links with their role members initialized.

extractIds

public static long[] extractIds(Collection objects)
Extracts the database identifier from each object in the collection of Persistable objects or ObjectIdentifiers.

Supported API: false

Returns:
Array of database identifiers.

extractIds

public static long[] extractIds(WTCollection objects,
                                Class[] classes,
                                boolean includeSubClasses)
                         throws WTException
Returns the database identifier for each object in the collection that is an instance of one of the given classes.

Supported API: false

Returns:
Array of database identifiers
Throws:
WTException

extractMasterIds

public static long[] extractMasterIds(Collection objects)
Extracts the database identifier of the Master of each object in the collection of Iterated objects removing duplicates.

Supported API: false

Returns:
Array of database identifiers of the Masters.

extractBranchIds

public static long[] extractBranchIds(Collection objects)
Extracts the branch identifier from each object in the collection of Iterated objects or VersionForeignKeys.

Supported API: false

Returns:
Array of branch identifiers.

extractBranchIds

public static long[] extractBranchIds(WTCollection objects,
                                      Class[] classes,
                                      boolean includeSubClasses)
                               throws WTException
Returns the branch identifier for each object in the collection that is an instance of one of the given classes.

Supported API: false

Returns:
Array of database identifiers
Throws:
WTException

buildExpression

public static WhereExpression buildExpression(Class objectClass,
                                              String attribute,
                                              long[] databaseIds)
                                       throws WTException
Builds a where expression for the query based on an array of database identifiers. If the number of database identifiers is one, this method builds an EQUAL expression otherwise it builds an IN clause.

Supported API: false

Returns:
WhereExpression
Throws:
WTException

getType

public static String getType(QueryResult result)

findIndex

private static int findIndex(Object[] array,
                             Class objectClass)

extractIDs

public static long[] extractIDs(ObjectIdentifier[] objectIDs,
                                Class objectClass)

getKey

private static Object getKey(Object object)

trimArray

private static long[] trimArray(long[] array,
                                int newLength)

getLatestCompatible

public static QueryResult getLatestCompatible(QueryResult originals,
                                              WTContainerRef preferedContainerRef)
                                       throws WTException
Gets latest compatible objects from a query result of Persistable objects. If there are two iterations of the same document, it selects the latest of the two subject to the WTContainer preference. This method works only on Iterated (or Mastered objects) , else if returns null

Supported API: false

Returns:
QueryResult of Persistable objects with the latest iterations
Throws:
WTException

selectLatestIteration

public static Collection selectLatestIteration(Collection originals)
                                        throws WTException
Given a collection of Iterated and Mastered objects, return the latest iterations for each set of iterations in the collection that share the same master. Note: If the collection contains master but no iterations of that master, this method will return the master.

Supported API: false

Returns:
Collection that contains the latest iterations
Throws:
WTException

lookupWorkspace

public static EPMWorkspace lookupWorkspace(String name,
                                           WTPrincipal owner)
                                    throws WTException
Throws:
WTException

lookupWorkspace

public static EPMWorkspace lookupWorkspace(String name)
                                    throws WTException
Throws:
WTException

lookupConfigSpec

public static ConfigSpec lookupConfigSpec(EPMWorkspace workspace)
                                   throws WTException
Throws:
WTException

lookupDocuments

public static QueryResult lookupDocuments(Collection documents,
                                          ConfigSpec configSpec,
                                          EPMWorkspace ws)
                                   throws WTException
Throws:
WTException

lookupDocuments

public static QueryResult lookupDocuments(Vector docs,
                                          ConfigSpec configSpec,
                                          EPMWorkspace ws)
                                   throws WTException
Throws:
WTException

lookupFamilyTables

public static QueryResult lookupFamilyTables(Collection members,
                                             EPMWorkspace workspace)
                                      throws WTException
Throws:
WTException

lookupFamilyTablesForMembers

public static Collection lookupFamilyTablesForMembers(Collection members)
                                               throws WTException
Throws:
WTException

lookupFamilyTablesByMembers

public static Map lookupFamilyTablesByMembers(Collection members,
                                              EPMWorkspace workspace)
                                       throws WTException
Throws:
WTException

lookupFamilyTablesAndLinkByMembers

public static Map lookupFamilyTablesAndLinkByMembers(Collection members,
                                                     EPMWorkspace workspace)
                                              throws WTException
Throws:
WTException

extractIds

public static long[] extractIds(Collection persistables,
                                Map persistablesById)
                         throws WTException
Throws:
WTException

lookupFamilyTables

private static QueryResult lookupFamilyTables(long[] ids,
                                              EPMWorkspace workspace,
                                              boolean returnLink,
                                              boolean returnDocId)
                                       throws WTException
Throws:
WTException

lookupContainedInLinksAndFamilyTablesForMemberAndCheckOtherCheckouts

public static QueryResult lookupContainedInLinksAndFamilyTablesForMemberAndCheckOtherCheckouts(Collection docs,
                                                                                               EPMWorkspace ws)
                                                                                        throws WTException
Throws:
WTException

familyTablesDocListDifferenceCollection

public static Collection familyTablesDocListDifferenceCollection(EPMWorkspace ws,
                                                                 Collection familyTables,
                                                                 Collection docs,
                                                                 boolean checkedoutOnly,
                                                                 Boolean modified)
                                                          throws WTException
This method do the same thing as familyTablesDocListDifference but returns Collection of EPMDocument-s instead of QueryResult

Throws:
WTException

familyTablesDocListDifference

public static QueryResult familyTablesDocListDifference(EPMWorkspace ws,
                                                        Collection familyTables,
                                                        Collection docs,
                                                        boolean checkedoutOnly,
                                                        Boolean modified)
                                                 throws WTException
This method returns list of documents from the Family Tables which do not present in the collection of docs

Returns:
QueryResult
Throws:
WTException

createInSearchCondition

private static SearchCondition createInSearchCondition(Class targetClass,
                                                       String attribute,
                                                       long[] value)
                                                throws WTException
Throws:
WTException

createInSearchCondition

private static SearchCondition createInSearchCondition(Class targetClass,
                                                       String attribute,
                                                       long[] value,
                                                       boolean negate)
                                                throws WTException
Throws:
WTException

sandboxFamilyTablesDocListDifference

public static QueryResult sandboxFamilyTablesDocListDifference(WTContainerRef sandboxContainerRef,
                                                               Collection familyTables,
                                                               Collection docs,
                                                               Boolean modifiedInSandBox)
                                                        throws WTException
This method returns list of documents from the Family Tables which do not present in the collection of docs

Returns:
QueryResult
Throws:
WTException

lookupContainedInLinks

public static QueryResult lookupContainedInLinks(Collection familyTables,
                                                 ConfigSpec configSpec)
                                          throws WTException
This method returns list of documents from the Family Tables which do not present in the collection of docs

Returns:
QueryResult
Throws:
WTException

lookupFamilyTableMembers

public static QueryResult lookupFamilyTableMembers(Collection familyTables,
                                                   ConfigSpec configSpec)
                                            throws WTException
Throws:
WTException

lookupInstancesAndContainedInLinks

public static QueryResult lookupInstancesAndContainedInLinks(Collection familyTables,
                                                             ConfigSpec configSpec)
                                                      throws WTException
Throws:
WTException

lookupInstancesAndContainedInLinks

public static QueryResult lookupInstancesAndContainedInLinks(QueryResult familyTables,
                                                             ConfigSpec configSpec)
                                                      throws WTException
Throws:
WTException

lookupTopGenericAndContainedInLink

public static QueryResult lookupTopGenericAndContainedInLink(Collection familyTables,
                                                             ConfigSpec configSpec)
                                                      throws WTException
Throws:
WTException

lookupTopGenericAndContainedInLink

public static QueryResult lookupTopGenericAndContainedInLink(QueryResult familyTables,
                                                             ConfigSpec configSpec)
                                                      throws WTException
Throws:
WTException

lookupMembersAndContainedInLinks

public static QueryResult lookupMembersAndContainedInLinks(Collection familyTables,
                                                           ConfigSpec configSpec)
                                                    throws WTException
Throws:
WTException

lookupMembersAndContainedInLinks

public static QueryResult lookupMembersAndContainedInLinks(QueryResult familyTables,
                                                           ConfigSpec configSpec)
                                                    throws WTException
Throws:
WTException

lookupMembersAndContainedInLinks

private static QueryResult lookupMembersAndContainedInLinks(QueryResult familyTables,
                                                            ConfigSpec configSpec,
                                                            QuerySpec querySpec)
                                                     throws WTException
Throws:
WTException

getOnlyInstancesRestriction

private static QuerySpec getOnlyInstancesRestriction()
                                              throws WTException
Throws:
WTException

lookupLatestCompatibleFamilyTableMemberIterations

public static Map lookupLatestCompatibleFamilyTableMemberIterations(Collection memberMasters,
                                                                    Collection familyTables)
                                                             throws WTException
Returns a map the latest instances of given masters compatible with the given family tables, where : key is a instance value is a link.

Throws:
WTException

getLatestCompatibleInstance

protected static void getLatestCompatibleInstance(long[] masterOIDs,
                                                  long[] familyTableOIDs,
                                                  Map instances)
                                           throws WTException
Throws:
WTException

lookupFamilyTableCells

public static QueryResult lookupFamilyTableCells(Collection containedInLinks)
                                          throws WTException
Throws:
WTException

lookupFamilyTableColumns

public static QueryResult lookupFamilyTableColumns(Collection familyTables)
                                            throws WTException
Throws:
WTException

lookupFamilyTableColumns

public static QueryResult lookupFamilyTableColumns(long[] familyTableIds)
                                            throws WTException
Throws:
WTException

familyTables2familyTableMasterIds

private static long[] familyTables2familyTableMasterIds(Collection familyTables)
                                                 throws WTException
Throws:
WTException

lookupParameterDefinitions

public static QueryResult lookupParameterDefinitions(Collection familyTables)
                                              throws WTException
Throws:
WTException

lookupFeatureDefinitions

public static QueryResult lookupFeatureDefinitions(Collection familyTables)
                                            throws WTException
Throws:
WTException

lookupVariantLinks

public static QueryResult lookupVariantLinks(Collection instances,
                                             ConfigSpec configSpec)
                                      throws WTException
Throws:
WTException

lookupVariantLinks

public static QueryResult lookupVariantLinks(Collection instances,
                                             boolean onlyOtherSide,
                                             ConfigSpec configSpec)
                                      throws WTException
Throws:
WTException

lookupVariantLinks

public static QueryResult lookupVariantLinks(QueryResult instances,
                                             ConfigSpec configSpec)
                                      throws WTException
Throws:
WTException

lookupVariantLinks

public static QueryResult lookupVariantLinks(QueryResult instances,
                                             boolean onlyOtherSide,
                                             ConfigSpec configSpec)
                                      throws WTException
Throws:
WTException

lookupGenerics

public static Map lookupGenerics(Collection instances,
                                 ConfigSpec configSpec)
                          throws WTException
Method returns Map where key is instance CADName and value is correspondent generic EPMDocument

Parameters:
instances -
configSpec -
Returns:
Throws:
WTException

lookupDependencyLinks

public static Map lookupDependencyLinks(List documents,
                                        boolean getDocuments,
                                        ConfigSpec configSpec)
                                 throws WTException
Throws:
WTException

addLinkCondition

protected static int addLinkCondition(QuerySpec qs,
                                      Class linkCl,
                                      long[] ids)
                               throws WTException
Throws:
WTException

lookupIBAs

public static IBAHolder[] lookupIBAs(Collection holderList)
                              throws WTException
Throws:
WTException

lookupIBAs

public static IBAHolder[] lookupIBAs(IBAHolder[] holders)
                              throws WTException
Given an array of IBAHolders, this method queries windchill database and gets values of all attributes with constraints.

Throws:
WTException

lookupAttrDefs

public static HashMap lookupAttrDefs(String[] attrDefNames)
                              throws WTException
Throws:
WTException

lookupContainers

public static List lookupContainers(String[] containerNames)
                             throws WTException
Throws:
WTException

lookupOrganizations

public static Map lookupOrganizations(Collection orgNames)
                               throws WTException
Throws:
WTException

lookupOrganizations

public static Map lookupOrganizations(String[] orgNames)
                               throws WTException
Throws:
WTException

lookupTopGeneric

public static EPMDocument lookupTopGeneric(EPMFamilyTable familyTable)

lookupTopGeneric

public static List lookupTopGeneric(List familyTables)

getBuildRules

public static QueryResult getBuildRules(Iterated object)
                                 throws WTException
Throws:
WTException

assignUniqueIdentifier

public static ObjectIdentifier assignUniqueIdentifier(Persistable object)
                                               throws WTException
Throws:
WTException

addModifiedFilterToQuerySpec

public static void addModifiedFilterToQuerySpec(QuerySpec select,
                                                Class workableClass,
                                                int workableIndex,
                                                boolean modified,
                                                EPMWorkspace ws)
                                         throws WTException
Parameters:
select -
workableClass -
workableIndex -
modified - - if true query will return only modified objects if false only not modified
Throws:
WTException

addCheckedOutFilterToQuerySpec

public static void addCheckedOutFilterToQuerySpec(QuerySpec select,
                                                  Class workableClass,
                                                  int workableIndex,
                                                  EPMWorkspace ws)
                                           throws WTException
Throws:
WTException

addModifiedInSBFilterToQuerySpec

public static void addModifiedInSBFilterToQuerySpec(QuerySpec select,
                                                    Class iteratedClass,
                                                    int iteratedIndex,
                                                    boolean modified)
                                             throws WTException
Throws:
WTException

copyAndSaveEPMSepFamilyTables

public static void copyAndSaveEPMSepFamilyTables(Collection familyTablesToCopy,
                                                 Collection moveLinksFor,
                                                 ConfigSpec configSpec)
                                          throws WTException,
                                                 WTPropertyVetoException
This method clones and stores FamilyTable including all it's containedIn links and returns new FamilyTable

Parameters:
familyTablesToCopy - - Collection of EPMSepFamilyTables that must be cloned
Throws:
WTException
WTPropertyVetoException

getPreviousContainedInLinksAndStuff

public static QueryResult getPreviousContainedInLinksAndStuff(Collection famTables,
                                                              long[] docIds)
                                                       throws WTException
Throws:
WTException

lookupParamMaps

public static QueryResult lookupParamMaps(Collection ibaHolders)
                                   throws WTException
Throws:
WTException