wt.epm.util
Class FamilyUtility

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

public class FamilyUtility
extends Object

FamilyUtility is a server-side class that provides some utility methods for working with Families.

Supported API: false

Extendable: false


Nested Class Summary
private static class FamilyUtility.ContainedObjectList
           
private static class FamilyUtility.ContainerPair
           
 
Field Summary
private static String DATABASE_ID
           
private static String EPMRESOURCE
           
private static String GENERIC_ROLE
           
private static String INSTANCE_ROLE
           
private static String ORIGINAL_COPY_ROLE
           
private static String WORKING_COPY_KEY
           
private static String WORKING_COPY_ROLE
           
 
Constructor Summary
FamilyUtility()
           
 
Method Summary
static void checkFamilyFolders(Vector newDoc)
           
private static void constructException(EPMDocument doc1, EPMDocument doc2)
           
private static ArrayList filterForContainer(List origList, WTContainerRef containerRef)
           
private static ExistsExpression fromWorkingCopy(QuerySpec outerSelect, int betweenInsts, int betweenGenerics)
           
static ObjectIdentifier getOID(Persistable object)
           
private static ExistsExpression isCheckedOut(QuerySpec outerSelect, int betweenDocs)
           
private static QuerySpec newSubSelect(String prefix)
           
private static ArrayList SBmadeStandalone(Map docsOrigFamily)
           
private static ArrayList SBmadeStandaloneFrom(EPMDocument generic, List documents)
          todo check if we need this method at all for new FT model (GIV 09/09/04)
static QueryResult wasMadeStandalone(List documents)
          This method checks for a special situation that may occur with family tables.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

EPMRESOURCE

private static final String EPMRESOURCE
See Also:
Constant Field Values

INSTANCE_ROLE

private static final String INSTANCE_ROLE
See Also:
Constant Field Values

GENERIC_ROLE

private static final String GENERIC_ROLE
See Also:
Constant Field Values

ORIGINAL_COPY_ROLE

private static final String ORIGINAL_COPY_ROLE
See Also:
Constant Field Values

WORKING_COPY_ROLE

private static final String WORKING_COPY_ROLE
See Also:
Constant Field Values

WORKING_COPY_KEY

private static final String WORKING_COPY_KEY
See Also:
Constant Field Values

DATABASE_ID

private static final String DATABASE_ID
See Also:
Constant Field Values
Constructor Detail

FamilyUtility

public FamilyUtility()
Method Detail

wasMadeStandalone

public static QueryResult wasMadeStandalone(List documents)
                                     throws WTException
This method checks for a special situation that may occur with family tables. A user may check out both an instance and its generic. Remove the instance from the family and then make the instance a standalone model. This method finds all of the instances in the given list of checked out EPM Documents that were removed from their family and then made a standalone model. This method returns a query result that holds Object[] in which the first element in each array is an object reference for the instance that was removed from its family and then made standalone and the second element is an object reference for the generic that the instance was removed from. Note: This method assumes that both the instance that was made standalone and the generic it was removed from are still checked out AND the list holds the working copies of the checked out EPM Documents

Supported API: false

Returns:
QueryResult -- Object[] where [0] is object reference for the instance that was made standalone and [1] is object reference for the generic the instance was removed from
Throws:
WTException

checkFamilyFolders

public static void checkFamilyFolders(Vector newDoc)
                               throws WTException
Throws:
WTException

getOID

public static ObjectIdentifier getOID(Persistable object)

fromWorkingCopy

private static ExistsExpression fromWorkingCopy(QuerySpec outerSelect,
                                                int betweenInsts,
                                                int betweenGenerics)
                                         throws QueryException
Throws:
QueryException

isCheckedOut

private static ExistsExpression isCheckedOut(QuerySpec outerSelect,
                                             int betweenDocs)
                                      throws WTException
Throws:
WTException

newSubSelect

private static QuerySpec newSubSelect(String prefix)
                               throws QueryException
Throws:
QueryException

constructException

private static void constructException(EPMDocument doc1,
                                       EPMDocument doc2)
                                throws WTException
Throws:
WTException

SBmadeStandaloneFrom

private static ArrayList SBmadeStandaloneFrom(EPMDocument generic,
                                              List documents)
                                       throws WTException
todo check if we need this method at all for new FT model (GIV 09/09/04)

Throws:
WTException

SBmadeStandalone

private static ArrayList SBmadeStandalone(Map docsOrigFamily)
                                   throws WTException
Throws:
WTException

filterForContainer

private static ArrayList filterForContainer(List origList,
                                            WTContainerRef containerRef)
                                     throws WTException
Throws:
WTException