public class PojoMapper extends Object
IObject
s into their corresponding
DataObject
s.Constructor and Description |
---|
PojoMapper() |
Modifier and Type | Method and Description |
---|---|
static <T extends DataObject> |
asCastedDataObjects(List objects)
Converts each
element of the collection into its
corresponding DataObject . |
static DataObject |
asDataObject(omero.model.IObject object)
Converts the specified
IObject into its corresponding
DataObject . |
static <K,V extends DataObject> |
asDataObjectMap(Class<K> keyKlass,
Class<V> valueKlass,
String method,
List objects)
Converts each element of the list to a pair (key, value) in the map.
|
static Set |
asDataObjects(Collection objects)
Converts each
element of the collection into its
corresponding DataObject . |
static Set |
asDataObjects(omero.model.IObject[] objects)
Converts each
element of the array into its
corresponding DataObject . |
static Set |
asDataObjects(List objects)
Converts each
element of the collection into its
corresponding DataObject . |
static Map |
asDataObjects(Map objects)
Converts each pair (key, value) of the map.
|
static List |
asDataObjectsAsList(Collection objects)
Converts each
element of the collection into its
corresponding DataObject . |
static String |
convertTypeForSearch(Class nodeType)
Converts the specified type to its corresponding type for search.
|
static String |
convertTypeForSearchByQuery(Class nodeType)
Converts the specified type to its corresponding type for search by HQL query
|
static String |
getGraphType(Class<? extends DataObject> dataType)
Returns the name of the data type which has to used for Graph actions,
see
Requests |
static Class<? extends omero.model.IObject> |
getModelType(Class pojoType)
Converts the specified POJO into the corresponding model.
|
static Class<? extends DataObject> |
getPojoType(Class<? extends omero.model.IObject> modelType) |
public static DataObject asDataObject(omero.model.IObject object)
IObject
into its corresponding
DataObject
.object
- The object to convert.IllegalArgumentException
- If the object is null or
if the type IObject
is unknown.public static Set asDataObjects(Collection objects)
element
of the collection into its
corresponding DataObject
.objects
- The set of objects to convert.DataObject
s.IllegalArgumentException
- If the set is null
, doesn't
contain IObject
or if the type IObject
is unknown.public static List asDataObjectsAsList(Collection objects)
element
of the collection into its
corresponding DataObject
.objects
- The set of objects to convert.DataObject
s.IllegalArgumentException
- If the set is null
, doesn't
contain IObject
or if the type IObject
is unknown.public static <T extends DataObject> Collection<T> asCastedDataObjects(List objects)
element
of the collection into its
corresponding DataObject
.objects
- The set of objects to convert.DataObject
s.IllegalArgumentException
- If the set is null
, doesn't
contain IObject
or if the type IObject
is unknown.public static Set asDataObjects(List objects)
element
of the collection into its
corresponding DataObject
.objects
- The set of objects to convert.DataObject
s.IllegalArgumentException
- If the set is null
, doesn't
contain IObject
or if the type IObject
is unknown.public static Set asDataObjects(omero.model.IObject[] objects)
element
of the array into its
corresponding DataObject
.objects
- The set of objects to convert.DataObject
s.IllegalArgumentException
- If the set is null
, doesn't
contain IObject
or if the type IObject
is unknown.public static <K,V extends DataObject> Map<K,V> asDataObjectMap(Class<K> keyKlass, Class<V> valueKlass, String method, List objects) throws SecurityException, NoSuchMethodException, IllegalArgumentException, IllegalAccessException, InvocationTargetException
keyKlass
- The class that will be the key for the mapvalueKlass
- The class that will be the value for the mapmethod
- The method name as a string that, using reflection,
will be used to get the key from the object.objects
- The map of objects to convert.NoSuchMethodException
SecurityException
InvocationTargetException
IllegalAccessException
IllegalArgumentException
IllegalArgumentException
- If the map is null
or if the type IObject
is unknown.public static Map asDataObjects(Map objects)
IObject
, the element is converted into its corresponding
DataObject
.objects
- The map of objects to convert.IllegalArgumentException
- If the map is null
or if the type IObject
is unknown.public static String convertTypeForSearchByQuery(Class nodeType)
nodeType
- The type to convert.public static Class<? extends DataObject> getPojoType(Class<? extends omero.model.IObject> modelType)
public static Class<? extends omero.model.IObject> getModelType(Class pojoType)
pojoType
- The POJO class.public static String getGraphType(Class<? extends DataObject> dataType)
Requests
dataType
-
Version: 5.2.0-ice35-b12
Copyright © 2015 The University of Dundee & Open Microscopy Environment. All Rights Reserved.