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(IObject entity,
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 Details |
getDetails(Object[] state,
String[] names) |
static boolean |
idEqual(IObject arg1,
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(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(IObject iobject)
|
static boolean |
onlyPermissionsChanged(Details new_d,
Details old_d) |
public static boolean isUnloaded(Object original)
public static Long nullSafeOwnerId(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(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(IObject entity, 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(Details new_d, Details old_d)
newD
- Not null.oldD
- Not null.public static boolean idEqual(IObject arg1, IObject arg2)
public static int detailsIndex(String[] propertyNames)
protected static Collection copy(Collection c)
Version: 5.1.4-ice35-b55
Copyright © 2015 The University of Dundee & Open Microscopy Environment. All Rights Reserved.