|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectwt.epm.util.EPMHelper
The EPMHelper class provides set of static methods for
sorting, filtering and indexing collections of objects.
Supported API: false
Extendable: false
Constructor Summary | |
EPMHelper()
|
Method Summary | |
static boolean |
containsInstance(WTCollection objects,
Class[] classes)
Determines whether the given collection contains at least one instance of any of the classes in the given list. |
static List |
difference(Collection firstSet,
Collection secondSet)
Returns a List that contains all of the Persistable objects that are in the first collection but are not in the second collection. |
static List |
extractObjects(Collection arrays,
int index)
Given a collection of arrays, extracts the object at the given index from each array. |
protected static List |
extractObjects(Collection arrays,
int index,
List objects)
|
static List |
filterObjects(Collection objects,
Class classToKeep)
Given a collection of objects, filters out all objects except those of the given class from the collection. |
protected static List |
filterObjects(Collection objects,
Class classToKeep,
List objectsToKeep)
|
static Iterator |
getIterator(Collection collection)
Returns a Iterator over the given Collection. |
static WTSet |
getPredecessors(WTCollection iterations)
Returns the predecessor for each Iterated object in the given collection. |
static String |
getVersionDisplay(Iterated anIteration)
Returns the string representing the version identifier to be displayed in a message. |
static Map |
indexById(Collection objects)
Indexes a collection of Persistable objects by their object identifiers. |
static Map |
indexByMaster(Collection objects)
Indexes a collection of Iterated objects by the object identifiers of their masters. |
static Map |
indexByVersion(Collection objects)
Indexes a collection of Iterated objects by their version key. |
static boolean |
inPersonalCabinet(CabinetBased object)
Returns true if the entry resides in a personal cabinet, returns false if in an shared cabinet. |
static Iterator |
persistableIterator(Collection collection)
Returns "persistable" iterator if input parameter is WTCollection and regular collection iterator otherwise. |
static Iterator |
queryKeyIterator(Collection collection)
Returns "queryKey" iterator if input parameter is WTCollection and regular collection iterator otherwise. |
static Iterator |
referenceIterator(Collection collection)
Returns "reference" iterator if input parameter is WTCollection and regular collection iterator otherwise. |
static List |
removeDuplicates(List originals)
Removes duplicates from a list of Persistable objects or ObjectIdentifiers. |
protected static List |
removeDuplicates(List originals,
List noDuplicates)
|
static Map |
sortByClass(Collection objects)
Sorts the objects based upon the concrete class that they belong to. |
static List |
toList(WTCollection objects)
Returns a List that contains all of the Persistable objects that are in the supplied WTCollection. |
static QueryResult |
toQueryResult(WTCollection objects)
Returns a QueryResult that contains all of the Persistable objects that are in the supplied WTCollection. |
static Vector |
toVector(WTCollection objects)
Returns a Vector that contains all of the Persistable objects that are in the supplied WTCollection. |
static Collection |
wrapWithPersistableIterator(WTCollection c)
Returns Collection that wraps given WTCollection and returns WTCollection persistable iterator as result of Collection iterator() method. |
static Collection |
wrapWithQueryKeyIterator(WTCollection c)
Returns Collection that wraps given WTCollection and returns WTCollection queryKey iterator as result of Collection iterator() method. |
static Collection |
wrapWithReferenceIterator(WTCollection c)
Returns Collection that wraps given WTCollection and returns WTCollection reference iterator as result of Collection iterator() method. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public EPMHelper()
Method Detail |
public static List extractObjects(Collection arrays, int index)
public static List filterObjects(Collection objects, Class classToKeep)
public static List removeDuplicates(List originals)
public static Map sortByClass(Collection objects)
public static Map indexById(Collection objects)
public static Map indexByMaster(Collection objects)
public static Map indexByVersion(Collection objects) throws WTException
WTException
public static List difference(Collection firstSet, Collection secondSet)
public static Iterator getIterator(Collection collection)
public static boolean containsInstance(WTCollection objects, Class[] classes)
public static WTSet getPredecessors(WTCollection iterations) throws WTException
WTException
public static List toList(WTCollection objects) throws WTException
WTException
public static Vector toVector(WTCollection objects) throws WTException
WTException
public static QueryResult toQueryResult(WTCollection objects) throws WTException
WTException
public static Iterator persistableIterator(Collection collection) throws WTException
collection
- object collection
WTException
public static Iterator referenceIterator(Collection collection) throws WTException
collection
- object collection
WTException
public static Iterator queryKeyIterator(Collection collection) throws WTException
collection
- object collection
WTException
public static Collection wrapWithPersistableIterator(WTCollection c)
c
- WTCollection object
public static Collection wrapWithReferenceIterator(WTCollection c)
c
- WTCollection object
public static Collection wrapWithQueryKeyIterator(WTCollection c)
c
- WTCollection object
public static boolean inPersonalCabinet(CabinetBased object) throws WTException
object
-
WTException
protected static List extractObjects(Collection arrays, int index, List objects)
protected static List filterObjects(Collection objects, Class classToKeep, List objectsToKeep)
protected static List removeDuplicates(List originals, List noDuplicates)
public static String getVersionDisplay(Iterated anIteration) throws VersionControlException
anIteration
- Iterated
VersionControlException
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |