com.ptc.windchill.esi.utl
Class ESIUtility
java.lang.Object
com.ptc.windchill.esi.utl.ESIUtility
- public class ESIUtility
- extends Object
A convenient class for ESI to handle Windchill objects those are/not
container-aware and/or revision controled.
Method Summary |
static Persistable |
findAnObj(Class aClass,
String attrName,
String attrValue,
String version,
String iteration,
WTContainerRef containerRef)
Find an iterated object. |
Persistable |
findAnObj(Class aClass,
String attrName,
String attrValue,
WTContainerRef containerRef)
|
static Persistable |
findAnObj(Class aClass,
String attrName,
String attrValue,
WTContainerRef containerRef,
boolean latest)
Find an object. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
CLASSNAME
public static final String CLASSNAME
- See Also:
- Constant Field Values
ESIUtility
public ESIUtility()
findAnObj
public static Persistable findAnObj(Class aClass,
String attrName,
String attrValue,
WTContainerRef containerRef,
boolean latest)
- Find an object.
If latest is true, the object is treated as
Iterated
,
in this case , attrName, containerRef, latest should be unique.
Otherwise the object is treated as non-Iterated,attrName, containerRef should be unique.
Note:If the given containerRef is not null, queries base on the following hierarchy
1. Current container , eg. PDMLinkProduct
2. Organization container , ie. OrgContainer
3. Site container, ie. ExchangeContainer
For example, to find 'part1'. query looks up current container (eg. PDMLinkProduct)
if not found , looks up organization , if not found in org container
looks up Site container.
Otherwise , the query is not container aware.
- Parameters:
aClass
- Mapped to the database table being queriedattrName
- The attribute name as an identity of the objectattrValue
- The value for that identitycontainerRef
- latest
-
findAnObj
public Persistable findAnObj(Class aClass,
String attrName,
String attrValue,
WTContainerRef containerRef)
findAnObj
public static Persistable findAnObj(Class aClass,
String attrName,
String attrValue,
String version,
String iteration,
WTContainerRef containerRef)
throws WTException
- Find an iterated object.
If the given version and iteration are null , return the latest object.
Note:If the given containerRef is not null, queries base on the following hierarchy
1. Current container , eg.
PDMLinkProduct
2. Organization container , ie. OrgContainer
3. Site container, ie. ExchangeContainer
For example, to find 'part1'. query looks up current container (eg. PDMLinkProduct)
if not found , looks up organization , if not found in org container
looks up Site container.
Otherwise , the query is not container aware.
- Parameters:
aClass
- Mapped to the database table being queriedattrName
- The attribute name as an identity of the objectattrValue
- The value for that identityversion
- The version ,eg. A, B ...iteration
- The iteration eg. 1, 2 ...containerRef
- The container where the object resided directly , means not the parent container.
- Throws:
WTException