Package io.ebeaninternal.server.deploy
Class InheritInfo
- java.lang.Object
-
- io.ebeaninternal.server.deploy.InheritInfo
-
public class InheritInfo extends Object
Represents a node in the Inheritance tree. Holds information regarding Super Subclass support.
-
-
Constructor Summary
Constructors Constructor Description InheritInfo(InheritInfo r, InheritInfo parent, DeployInheritInfo deploy)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addChild(InheritInfo childInfo)
Add a child node.void
addChildrenProperties(SqlTreeProperties selectProps)
Add the local properties for each sub class below this one.void
appendCheckConstraintValues(String propertyName, Set<String> checkConstraintValues)
Append check constraint values for the entire inheritance hierarchy.EntityBean
createEntityBean()
Create an EntityBean for this type.BeanDescriptor<?>
desc()
Return the associated BeanDescriptor for this node.List<InheritInfo>
getChildren()
Return the children.String
getColumnDefn()
Return the explicit column definition.int
getColumnLength()
Return the length of the discriminator column.String
getDiscriminatorColumn()
Return the column name of the discriminator.int
getDiscriminatorType()
Return the sql type of the discriminator value.Object
getDiscriminatorValue()
IdBinder
getIdBinder()
Return the IdBinder for this type.InheritInfo
getParent()
Return the parent node.InheritInfo
getRoot()
Return the root node of the tree.Class<?>
getType()
return the type.InheritInfo
getType(String discValue)
For a discriminator get the inheritance information for this tree.String
getWhere()
Return the derived where for the discriminator.boolean
hasChildren()
Return true if this node has children.boolean
isConcrete()
Return true if this is considered a concrete type in the inheritance hierarchy.boolean
isRoot()
Return true if this is the root node.BeanProperty[]
localProperties()
Return the local properties for this node in the hierarchy.InheritInfo
readType(DbReadContext ctx)
Return the associated InheritInfo for this DB row read.InheritInfo
readType(Class<?> beanType)
Return the associated InheritInfo for this bean type.void
setDescriptor(BeanDescriptor<?> descriptor)
Set the descriptor for this node.String
toString()
void
visitChildren(InheritInfoVisitor visitor)
Visit all the children in the inheritance tree.
-
-
-
Constructor Detail
-
InheritInfo
public InheritInfo(InheritInfo r, InheritInfo parent, DeployInheritInfo deploy)
-
-
Method Detail
-
visitChildren
public void visitChildren(InheritInfoVisitor visitor)
Visit all the children in the inheritance tree.
-
appendCheckConstraintValues
public void appendCheckConstraintValues(String propertyName, Set<String> checkConstraintValues)
Append check constraint values for the entire inheritance hierarchy.
-
setDescriptor
public void setDescriptor(BeanDescriptor<?> descriptor)
Set the descriptor for this node.
-
desc
public BeanDescriptor<?> desc()
Return the associated BeanDescriptor for this node.
-
localProperties
public BeanProperty[] localProperties()
Return the local properties for this node in the hierarchy.
-
getChildren
public List<InheritInfo> getChildren()
Return the children.
-
hasChildren
public boolean hasChildren()
Return true if this node has children.When an inheritance node has no children then we don't need the discriminator column as the type is effectively known.
-
addChildrenProperties
public void addChildrenProperties(SqlTreeProperties selectProps)
Add the local properties for each sub class below this one.
-
readType
public InheritInfo readType(DbReadContext ctx) throws SQLException
Return the associated InheritInfo for this DB row read.- Throws:
SQLException
-
readType
public InheritInfo readType(Class<?> beanType)
Return the associated InheritInfo for this bean type.
-
createEntityBean
public EntityBean createEntityBean()
Create an EntityBean for this type.
-
getIdBinder
public IdBinder getIdBinder()
Return the IdBinder for this type.
-
getRoot
public InheritInfo getRoot()
Return the root node of the tree.The root has a map of discriminator values to types.
-
getParent
public InheritInfo getParent()
Return the parent node.
-
isRoot
public boolean isRoot()
Return true if this is the root node.
-
isConcrete
public boolean isConcrete()
Return true if this is considered a concrete type in the inheritance hierarchy.
-
getType
public InheritInfo getType(String discValue)
For a discriminator get the inheritance information for this tree.
-
addChild
public void addChild(InheritInfo childInfo)
Add a child node.
-
getDiscriminatorColumn
public String getDiscriminatorColumn()
Return the column name of the discriminator.
-
getDiscriminatorType
public int getDiscriminatorType()
Return the sql type of the discriminator value.
-
getColumnLength
public int getColumnLength()
Return the length of the discriminator column.
-
getColumnDefn
public String getColumnDefn()
Return the explicit column definition.
-
getDiscriminatorValue
public Object getDiscriminatorValue()
-
-