com.ptc.epm.commands.util
Class QueryHelper

java.lang.Object
  extended bycom.ptc.epm.commands.util.QueryHelper

public class QueryHelper
extends Object


Field Summary
static String LIST_SEPARATOR
           
static String RANGE_SEPARATOR
           
static ReferenceFactory refFactory
           
static char SQL_WILD_CARD
           
static char WILD_CARD
           
 
Constructor Summary
QueryHelper()
           
 
Method Summary
private static String convertWildCards(String queryValue)
           
static SearchCondition floatWhere(Class queryClass, String attributeName, String value)
           
private static Set getAssemblies(QueryResult docs)
           
static EPMDocument getLatest(EPMDocumentMaster docMaster)
           
static QueryResult getLatestIterations(QueryResult epmDocs)
          Queries the database to find the latest iteration of each EPM document.
private static ObjectIdentifier getOID(Persistable object)
           
static Persistable getPersistableFromObid(String obid)
           
static Map groupAsmDocs(QueryResult epmDocs)
           
private static boolean hasWildCards(String queryValue)
           
private static Map indexById(Collection objects)
           
static SearchCondition integerWhere(Class queryClass, String attributeName, String value)
           
private static boolean isList(String queryValue)
           
private static boolean isRange(String queryValue)
           
static AttributeDefDefaultView lookupAttributeDefinition(String attrName)
           
static QueryResult removeCheckedOutDocs(QueryResult epmDocs)
           
static QueryResult removeDuplicateDocs(QueryResult epmDocs)
           
static QueryResult returnLatestDocs(QueryResult epmDocs)
           
static SearchCondition stringWhere(Class queryClass, String attributeName, String value)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

WILD_CARD

public static final char WILD_CARD
See Also:
Constant Field Values

SQL_WILD_CARD

public static final char SQL_WILD_CARD
See Also:
Constant Field Values

LIST_SEPARATOR

public static final String LIST_SEPARATOR
See Also:
Constant Field Values

RANGE_SEPARATOR

public static final String RANGE_SEPARATOR
See Also:
Constant Field Values

refFactory

public static ReferenceFactory refFactory
Constructor Detail

QueryHelper

public QueryHelper()
Method Detail

lookupAttributeDefinition

public static AttributeDefDefaultView lookupAttributeDefinition(String attrName)
                                                         throws WTException
Throws:
WTException

removeDuplicateDocs

public static QueryResult removeDuplicateDocs(QueryResult epmDocs)
                                       throws WTException
Throws:
WTException

removeCheckedOutDocs

public static QueryResult removeCheckedOutDocs(QueryResult epmDocs)
                                        throws WTException
Throws:
WTException

returnLatestDocs

public static QueryResult returnLatestDocs(QueryResult epmDocs)
                                    throws WTException
Throws:
WTException

getLatestIterations

public static QueryResult getLatestIterations(QueryResult epmDocs)
                                       throws WTException
Queries the database to find the latest iteration of each EPM document.

Throws:
WTException

getPersistableFromObid

public static Persistable getPersistableFromObid(String obid)

integerWhere

public static SearchCondition integerWhere(Class queryClass,
                                           String attributeName,
                                           String value)
                                    throws WTException
Throws:
WTException

floatWhere

public static SearchCondition floatWhere(Class queryClass,
                                         String attributeName,
                                         String value)
                                  throws WTException
Throws:
WTException

stringWhere

public static SearchCondition stringWhere(Class queryClass,
                                          String attributeName,
                                          String value)
                                   throws WTException
Throws:
WTException

getLatest

public static EPMDocument getLatest(EPMDocumentMaster docMaster)
                             throws WTException
Throws:
WTException

getAssemblies

private static Set getAssemblies(QueryResult docs)

groupAsmDocs

public static Map groupAsmDocs(QueryResult epmDocs)
                        throws WTException
Throws:
WTException

indexById

private static Map indexById(Collection objects)

getOID

private static ObjectIdentifier getOID(Persistable object)

hasWildCards

private static boolean hasWildCards(String queryValue)

convertWildCards

private static String convertWildCards(String queryValue)

isList

private static boolean isList(String queryValue)

isRange

private static boolean isRange(String queryValue)