Class EntityInheritanceTree

java.lang.Object
org.apache.cayenne.map.EntityInheritanceTree

public class EntityInheritanceTree extends Object
A tree structure representing inheritance hierarchy of an ObjEntity and its subentities.
Since:
1.1
  • Field Details

  • Constructor Details

    • EntityInheritanceTree

      public EntityInheritanceTree(ObjEntity entity)
  • Method Details

    • qualifierForEntityAndSubclasses

      public Expression qualifierForEntityAndSubclasses()
      Returns a qualifier Expression that matches root entity of this tree and all its subentities.
    • entityMatchingRow

      public ObjEntity entityMatchingRow(Map<String,?> row)
      Returns the deepest possible entity in the inheritance hierarchy that can be used to create objects from a given DataRow.
    • getDbQualifier

      public Expression getDbQualifier()
      Returns entity qualifier expressed as DB path qualifier or null if entity has no qualifier.
      Since:
      3.0
    • addChildNode

      public void addChildNode(EntityInheritanceTree node)
    • getChildrenCount

      public int getChildrenCount()
    • getChildren

      public Collection<EntityInheritanceTree> getChildren()
    • getEntity

      public ObjEntity getEntity()
    • allSubEntities

      public Collection<ObjEntity> allSubEntities()
      Returns a collection containing this inheritance tree node entity and all its subentities.
      Since:
      3.0
    • polymorphicIds

      public List<ObjectId> polymorphicIds(ObjectId id)
      Returns the ids that may identify an object with a given id in an object graph or a snapshot cache: the id itself, followed by the same id keyed by each subentity of this tree, depth-first. Objects and snapshots are keyed by the concrete entity of an object, so a lookup by an id of a superentity must check all of them.
      Parameters:
      id - an id keyed by the root entity of this tree.
      Since:
      5.0
    • allAttributes

      public Collection<ObjAttribute> allAttributes()
    • allRelationships

      public Collection<ObjRelationship> allRelationships()
    • appendDeclaredAttributes

      protected void appendDeclaredAttributes(Collection<ObjAttribute> c)
    • appendDeclaredRelationships

      protected void appendDeclaredRelationships(Collection<ObjRelationship> c)