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)
Deprecated.
Use
convertToDataObjects(Collection) instead |
static Set |
asDataObjects(omero.model.IObject[] objects)
Deprecated.
Use
convertToDataObjects(Collection) instead |
static Set |
asDataObjects(List objects)
Deprecated.
Use
convertToDataObjects(Collection) instead |
static Map |
asDataObjects(Map objects)
Converts each pair (key, value) of the map.
|
static List |
asDataObjectsAsList(Collection objects)
Deprecated.
Use
convertToDataObjects(Collection) instead |
static <T extends DataObject> |
convertToDataObjects(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)
Deprecated.
Not used.
|
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<? extends DataObject> pojoType)
Converts the specified POJO into the corresponding model class.
|
static Class<? extends omero.model.IObject> |
getModelType(String pojoType)
Converts the specified POJO into the corresponding model class,
see
getModelType(Class) |
static Class<? extends DataObject> |
getPojoType(Class<? extends omero.model.IObject> modelType)
Get the pojo type for a an
IObject class
(Reverse of getModelType(Class) ) |
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)
convertToDataObjects(Collection)
insteadelement
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> convertToDataObjects(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)
convertToDataObjects(Collection)
insteadelement
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)
convertToDataObjects(Collection)
insteadelement
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)
convertToDataObjects(Collection)
insteadelement
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)
IObject
class
(Reverse of getModelType(Class)
)modelType
- The IObject
public static Class<? extends omero.model.IObject> getModelType(String pojoType)
getModelType(Class)
pojoType
- The POJO class (Either the simple or the full
class name, e. g. omero.gateway.model.DatasetData or
DatasetData)IObject
class.public static Class<? extends omero.model.IObject> getModelType(Class<? extends DataObject> pojoType)
getPojoType(Class)
)pojoType
- The POJO class.IObject
class.public static String getGraphType(Class<? extends DataObject> dataType)
Requests
dataType
- The pojo type
Version: 5.3.3-ice35-b63
Copyright © 2017 The University of Dundee & Open Microscopy Environment. All Rights Reserved.