|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectwt.fc.collections.CollectionsHelper
Provides utility methods for dealing with WTCollection
s.
Supported API: true
Extendable: false
Field Summary | |
private static String |
CLASSNAME
|
static WTCollection |
EMPTY_COLLECTION
A reusable empty collection. |
(package private) static Iterator |
EMPTY_ITERATOR
|
static WTKeyedMap |
EMPTY_KEYED_MAP
A reusable empty map. |
static WTList |
EMPTY_LIST
A reusable empty list. |
(package private) static ListIterator |
EMPTY_LIST_ITERATOR
|
(package private) static long[] |
EMPTY_LONG_ARRAY
|
static WTKeyedMap |
EMPTY_MAP
Deprecated. Replaced by EMPTY_KEYED_MAP |
(package private) static Object[] |
EMPTY_OBJECT_ARRAY
|
static WTSet |
EMPTY_SET
A reusable empty set. |
static WTValuedMap |
EMPTY_VALUED_MAP
A reusable empty map. |
static CollectionsManager |
manager
Supported API: false |
static int |
OBJECT_IDENTIFIER
A key mask used to determine what types of QueryKeys and WTReferences can be stored in a WTCollection or WTKeyedMap Supported API: false |
private static String |
RESOURCE
|
static int |
VERSION_FOREIGN_KEY
A key mask used to determine what types of QueryKeys and WTReferences can be stored in a WTCollection or WTKeyedMap Supported API: false |
Constructor Summary | |
CollectionsHelper()
|
Method Summary | |
(package private) static void |
addElement(WTCollection c,
Object o)
Delegated to by ResultProcessor.addElement implementations |
(package private) static void |
addElement(WTKeyedMap m,
Object o)
Delegated to by ResultProcessor.addElement implementations |
static List |
getExcludedClasses(WTCollection collection,
Class base_class)
Get the list of known subclasses of the given base_class that do not have instances in the given collection. |
static WTSet |
getNonPersistedSubSet(WTCollection collection,
boolean connect)
Get a sub set of the objects in the given collection that are not persisted. |
static WTSet |
getPersistedSubSet(WTCollection collection,
boolean connect)
Get a sub set of the objects in the given collection that are persisted. |
static void |
inflate(WTCollection collection)
Inflate all elements in the collection that do not have an in-memory copy of their Persistable. |
static void |
inflate(WTCollection collection,
RefreshSpec spec)
Inflate all elements in the collection that do not have an in-memory copy of their Persistable. |
static void |
inflate(WTKeyedMap map)
Inflate all elements in the map that do not have an in-memory copy of their Persistable. |
static void |
inflate(WTKeyedMap map,
RefreshSpec spec)
Inflate all elements in the map that do not have an in-memory copy of their Persistable, with access control disabled.. |
static boolean |
isInflated(WTCollection collection)
Determine if the given collection contains inflated objects. |
static WTCollection |
synchronizedWTCollection(WTCollection collection)
Supported API: true |
static WTKeyedMap |
synchronizedWTKeyedMap(WTKeyedMap map)
Supported API: true |
static WTList |
synchronizedWTList(WTList list)
Supported API: true |
static WTSet |
synchronizedWTSet(WTSet set)
Supported API: true |
static WTValuedMap |
synchronizedWTValuedMap(WTValuedMap map)
Supported API: true |
static WTCollection |
unmodifiableWTCollection(WTCollection collection)
Supported API: true |
static WTKeyedMap |
unmodifiableWTKeyedMap(WTKeyedMap map)
Supported API: true |
static WTList |
unmodifiableWTList(WTList list)
Supported API: true |
static WTSet |
unmodifiableWTSet(WTSet set)
Supported API: true |
static WTValuedMap |
unmodifiableWTValuedMap(WTValuedMap map)
Supported API: true |
static void |
validate(WTCollection collection,
Class filter)
Ensures that all the objects in the given collection are instances of the given filter class. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
private static final String RESOURCE
private static final String CLASSNAME
public static final int OBJECT_IDENTIFIER
WTCollection
,
Constant Field Valuespublic static final int VERSION_FOREIGN_KEY
WTCollection
,
Constant Field Valuespublic static final WTCollection EMPTY_COLLECTION
public static final WTList EMPTY_LIST
public static final WTSet EMPTY_SET
public static final WTKeyedMap EMPTY_KEYED_MAP
public static final WTValuedMap EMPTY_VALUED_MAP
public static final CollectionsManager manager
public static final WTKeyedMap EMPTY_MAP
static final Iterator EMPTY_ITERATOR
static final ListIterator EMPTY_LIST_ITERATOR
static final Object[] EMPTY_OBJECT_ARRAY
static final long[] EMPTY_LONG_ARRAY
Constructor Detail |
public CollectionsHelper()
Method Detail |
public static List getExcludedClasses(WTCollection collection, Class base_class) throws WTException
TableExpression
in order to optimize the number of tables a database
query needs to hit.
collection
- base_class
-
Class
es
WTException
wt.query.AbstractTableExpression#setExcludedDescendants(List)
public static WTSet getNonPersistedSubSet(WTCollection collection, boolean connect)
collection
- connect
-
getPersistedSubSet(wt.fc.collections.WTCollection, boolean)
public static WTSet getPersistedSubSet(WTCollection collection, boolean connect)
collection
- connect
-
getNonPersistedSubSet(wt.fc.collections.WTCollection, boolean)
public static void inflate(WTCollection collection) throws WTException
collection
-
WTException
public static void inflate(WTKeyedMap map) throws WTException
map
-
WTException
public static void inflate(WTCollection collection, RefreshSpec spec) throws WTException
collection
- spec
-
WTException
public static void inflate(WTKeyedMap map, RefreshSpec spec) throws WTException
map
- spec
-
WTException
public static boolean isInflated(WTCollection collection)
collection
-
public static WTCollection synchronizedWTCollection(WTCollection collection)
collection
-
public static WTKeyedMap synchronizedWTKeyedMap(WTKeyedMap map)
map
-
public static WTList synchronizedWTList(WTList list)
list
-
public static WTSet synchronizedWTSet(WTSet set)
set
-
public static WTValuedMap synchronizedWTValuedMap(WTValuedMap map)
map
-
public static WTCollection unmodifiableWTCollection(WTCollection collection)
collection
-
public static WTKeyedMap unmodifiableWTKeyedMap(WTKeyedMap map)
map
-
public static WTList unmodifiableWTList(WTList list)
list
-
public static WTSet unmodifiableWTSet(WTSet set)
set
-
public static WTValuedMap unmodifiableWTValuedMap(WTValuedMap map)
map
-
public static void validate(WTCollection collection, Class filter)
collection
- filter
-
ClassCastException
- If the filter is not assignable from the
class of at least one of the objects in the collectionstatic void addElement(WTCollection c, Object o)
c
- The WTCollection that is a ResultProcessoro
- The elemetn to addstatic void addElement(WTKeyedMap m, Object o)
m
- The WTKeyedMap that is a ResultProcessoro
- The elemetn to add
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |