Package ome.tools.hibernate
Class ExtendedMetadata.Locks
- java.lang.Object
-
- ome.tools.hibernate.ExtendedMetadata.Locks
-
- Enclosing interface:
- ExtendedMetadata
public static class ExtendedMetadata.Locks extends java.lang.Objectinner class which wraps the information (index number, path, etc) related to what fields a particular object can lock. This is fairly complicated because though the properties available are a simple array, some of those properties can actually be embedded components, meaning that the value of the property is the instance itself. In those cases (wherehasSubtypes(int)is true, special logic must be implemented to retrieve the proper values.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidfillRelationships(org.hibernate.engine.SessionFactoryImplementor sfi, java.util.Map<java.lang.String,ExtendedMetadata.Relationship> value)For each of the fields contained in thisExtendedMetadata.Locksobject, parse out the type and the field name and store those as the key and value in the "value" argument.java.lang.String[][]getLockCandidateChecks(boolean onlyWithGroups)ome.model.IObject[]getLockCandidates(ome.model.IObject o)java.lang.ObjectgetSubtypeValue(int i, int j, java.lang.Object o)uses theClassMetadatafor thisExtendedMetadata.Lockstp retrieve the component value.booleanhasSubtypes(int i)returns true if this offset points to a field which is an embedded component.booleaninclude(int i)returns true if this offset points to a field which may contain anIObjectinstanceintnumberOfSubtypes(int i)returns the number of subtypes for iterating over this secondary array.intsize()the total number of fields for this entity.booleansubtypeEquals(int i, int j, java.lang.String klass)returns true is the indexed subtype returns the same class type as the klass argument.java.lang.StringsubtypeName(int i, int j)retrieves the full Hibernate path for this component field.inttotal()as opposed tosize(), the returns the actual number of fields that will need to be checked.
-
-
-
Method Detail
-
fillRelationships
public void fillRelationships(org.hibernate.engine.SessionFactoryImplementor sfi, java.util.Map<java.lang.String,ExtendedMetadata.Relationship> value)For each of the fields contained in thisExtendedMetadata.Locksobject, parse out the type and the field name and store those as the key and value in the "value" argument.
-
getLockCandidates
public ome.model.IObject[] getLockCandidates(ome.model.IObject o)
-
getLockCandidateChecks
public java.lang.String[][] getLockCandidateChecks(boolean onlyWithGroups)
-
size
public int size()
the total number of fields for this entity. The actual number ofIObjectinstances may vary since (1) some fields (like embedded components) can possibly point to multiple instances. Seetotal()for the final size and (2) some fields do not need to be examined (Integers, e.g.). Seeinclude- Returns:
- how many fields this entity has
-
total
public int total()
as opposed tosize(), the returns the actual number of fields that will need to be checked.- Returns:
- how many fields must be checked for this entity
-
include
public boolean include(int i)
returns true if this offset points to a field which may contain anIObjectinstance
-
hasSubtypes
public boolean hasSubtypes(int i)
returns true if this offset points to a field which is an embedded component.
-
numberOfSubtypes
public int numberOfSubtypes(int i)
returns the number of subtypes for iterating over this secondary array. If there are no subtypes, this method will return zero. UsehasSubtypes(int)to differentiate the two situations.
-
getSubtypeValue
public java.lang.Object getSubtypeValue(int i, int j, java.lang.Object o)uses theClassMetadatafor thisExtendedMetadata.Lockstp retrieve the component value.
-
subtypeEquals
public boolean subtypeEquals(int i, int j, java.lang.String klass)returns true is the indexed subtype returns the same class type as the klass argument.
-
subtypeName
public java.lang.String subtypeName(int i, int j)retrieves the full Hibernate path for this component field.
-
-