|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectwt.fc.collections.CollectionsHelper
public final class CollectionsHelper
Provides utility methods for dealing with WTCollections.
Supported API: true
Extendable: false
| Method Summary | |
|---|---|
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 WTKeyedMap |
singletonWTKeyedMap(Object key,
Object value)
Returns an immutable WTKeyedMap, mapping only the specified key to the specified value. |
static WTList |
singletonWTList(Object o)
Returns an immutable WTList containing only the specified object. |
static WTSet |
singletonWTSet(Object o)
Returns an immutable WTSet containing only the specified object. |
static WTValuedMap |
singletonWTValuedMap(Object key,
Object value)
Returns an immutable WTValuedMap, mapping only the specified key to the specified value. |
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 |
| 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 -
Classes
WTExceptionwt.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 -
WTExceptionpublic 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 collectionpublic static WTSet singletonWTSet(Object o)
o - The sole object to be stored in the returned WTSet.
public static WTList singletonWTList(Object o)
o - The sole object to be stored in the returned WTList.
public static WTKeyedMap singletonWTKeyedMap(Object key,
Object value)
key - The sole key to be stored in the returned WTKeyedMap.value - The value to which the returned WTKeyedMap maps key.
public static WTValuedMap singletonWTValuedMap(Object key,
Object value)
key - The sole key to be stored in the returned WTValuedMap.value - The value to which the returned WTValuedMap maps key.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||