public abstract class HibernateUtils extends Object
unloaded
entities and
nulled collections as well as determining the index of certain properties in
a dehydrated Hiberante array.Constructor and Description |
---|
HibernateUtils() |
Modifier and Type | Method and Description |
---|---|
protected static Collection |
copy(Collection c) |
protected static Map |
copy(Map m) |
static int |
detailsIndex(String[] propertyNames) |
static void |
fixNulledOrFilteredCollections(ome.model.IObject entity,
ome.model.IObject target,
org.hibernate.persister.entity.EntityPersister persister,
org.hibernate.engine.SessionImplementor source)
loads collections which have been filtered or nulled by the user
|
static ome.model.internal.Details |
getDetails(Object[] state,
String[] names) |
static boolean |
idEqual(ome.model.IObject arg1,
ome.model.IObject arg2)
returns true under the following circumstatnces:
both arguments are null, or
both arguments are identical (==), or
both arguments have the same id value(equals)
|
static int |
index(String str,
String[] propertyNames) |
static boolean |
isUnloaded(Object original) |
static Long |
nullSafeGroupId(ome.model.IObject iobject)
returns the id of the
group of this entity, or
null if: (1) the object is null, (2) the Details is null, (3) the
group is null. |
static Long |
nullSafeOwnerId(ome.model.IObject iobject)
returns the id of the
owner of this entity, or null
if: (1) the object is null, (2) the Details is null, (3) the
owner is null. |
static boolean |
onlyPermissionsChanged(ome.model.internal.Details new_d,
ome.model.internal.Details old_d) |
public static boolean isUnloaded(Object original)
public static Long nullSafeOwnerId(ome.model.IObject iobject)
owner
of this entity, or null
if: (1) the object is null, (2) the Details
is null, (3) the
owner is null.iobject
- Can be null.public static Long nullSafeGroupId(ome.model.IObject iobject)
group
of this entity, or
null if: (1) the object is null, (2) the Details
is null, (3) the
group is null.iobject
- Can be null.public static void fixNulledOrFilteredCollections(ome.model.IObject entity, ome.model.IObject target, org.hibernate.persister.entity.EntityPersister persister, org.hibernate.engine.SessionImplementor source)
entity
- IObject to have its collections reloadedid
- persistent (db) id of this entitycurrentState
- the possibly changed field data for this entitypreviousState
- the field data as seen in the dbpropertyNames
- field namestypes
- Hibernate Type
for each fielddetailsIndex
- the index of the Details
instance (perf opt)public static boolean onlyPermissionsChanged(ome.model.internal.Details new_d, ome.model.internal.Details old_d)
newD
- Not null.oldD
- Not null.public static boolean idEqual(ome.model.IObject arg1, ome.model.IObject arg2)
public static int detailsIndex(String[] propertyNames)
protected static Collection copy(Collection c)
Version: 5.1.2-ice35-b45
Copyright © 2015 The University of Dundee & Open Microscopy Environment. All Rights Reserved.