Class 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 (where hasSubtypes(int) is true, special logic must be implemented to retrieve the proper values.
    • Method Detail

      • getLockCandidateChecks

        public java.lang.String[][] getLockCandidateChecks​(boolean onlyWithGroups)
      • size

        public int size()
        the total number of fields for this entity. The actual number of IObject instances may vary since (1) some fields (like embedded components) can possibly point to multiple instances. See total() for the final size and (2) some fields do not need to be examined (Integers, e.g.). See include
        Returns:
        how many fields this entity has
      • total

        public int total()
        as opposed to size(), 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 an IObject 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. Use hasSubtypes(int) to differentiate the two situations.
      • getSubtypeValue

        public java.lang.Object getSubtypeValue​(int i,
                                                int j,
                                                java.lang.Object o)
        uses the ClassMetadata for this ExtendedMetadata.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.