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.Object
inner 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 void
fillRelationships(org.hibernate.engine.SessionFactoryImplementor sfi, java.util.Map<java.lang.String,ExtendedMetadata.Relationship> value)
For each of the fields contained in thisExtendedMetadata.Locks
object, 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.Object
getSubtypeValue(int i, int j, java.lang.Object o)
uses theClassMetadata
for thisExtendedMetadata.Locks
tp retrieve the component value.boolean
hasSubtypes(int i)
returns true if this offset points to a field which is an embedded component.boolean
include(int i)
returns true if this offset points to a field which may contain anIObject
instanceint
numberOfSubtypes(int i)
returns the number of subtypes for iterating over this secondary array.int
size()
the total number of fields for this entity.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.java.lang.String
subtypeName(int i, int j)
retrieves the full Hibernate path for this component field.int
total()
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.Locks
object, 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 ofIObject
instances 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 anIObject
instance
-
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 theClassMetadata
for thisExtendedMetadata.Locks
tp 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.
-
-