Package omero.gateway.util
Class Pojos
- java.lang.Object
-
- omero.gateway.util.Pojos
-
public class Pojos extends java.lang.Object
Utility methods for the PojoDataObject
s
-
-
Constructor Summary
Constructors Constructor Description Pojos()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static java.util.Collection<java.lang.Long>
extractIds(java.util.Collection<? extends DataObject> pojos)
Extract the (distinct) ids from a collection ofDataObject
sstatic boolean
hasID(DataObject obj)
Checks if a DataObject Pojo is not null and has an IDstatic <T extends DataObject>
java.util.Collection<T>relativeComplement(java.util.Collection<T> coll1, java.util.Collection<T> coll2)
Get the relative complement of coll1 in coll2
-
-
-
Method Detail
-
extractIds
public static java.util.Collection<java.lang.Long> extractIds(java.util.Collection<? extends DataObject> pojos)
Extract the (distinct) ids from a collection ofDataObject
s- Parameters:
pojos
- TheDataObject
s- Returns:
- The ids
-
relativeComplement
public static <T extends DataObject> java.util.Collection<T> relativeComplement(java.util.Collection<T> coll1, java.util.Collection<T> coll2)
Get the relative complement of coll1 in coll2- Parameters:
coll1
- The collectioncoll2
- The other collection- Returns:
- The elements of coll2 which are not part of coll1
-
hasID
public static boolean hasID(DataObject obj)
Checks if a DataObject Pojo is not null and has an ID- Parameters:
obj
- The DataObject- Returns:
- See above.
-
-