public class TypeInfo
extends java.lang.Object
implements com.technia.tvc.core.db.model.Deriveable
Modifier | Constructor and Description |
---|---|
protected |
TypeInfo(java.lang.String name,
java.lang.String symbolicName,
boolean hidden,
java.util.List<java.lang.String> attributeNames,
java.lang.String derivedName,
java.util.List<java.lang.String> immediateDerivativeNames,
boolean abstractType,
java.util.List<java.lang.String> policyNames,
java.util.List<java.lang.String> fromRelNames,
java.util.List<java.lang.String> toRelNames,
java.util.List<java.lang.String> createPolicies)
Creates a type info using the specified properties.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object obj)
Returns true if the objects are equal.
|
static boolean |
exists(java.lang.String name)
Returns true if the given type exists.
|
java.util.List<java.lang.String> |
getAttributeNames()
Returns the attributes names.
|
java.util.List<java.lang.String> |
getCreatePolicies() |
TypeInfo |
getDerived()
Returns the
TypeInfo for the type which the current type is
derived from. |
java.lang.String |
getDerivedName()
Returns the derived type name.
|
java.util.List<java.lang.String> |
getFromRelNames()
Returns the names of the relationships available on the from side.
|
boolean |
getHasAttribute(AttributeInfo ai) |
boolean |
getHasAttribute(java.lang.String attribute) |
java.util.List<java.lang.String> |
getImmediateDerivativeNames()
Returns the immediate derivative type names.
|
protected TypeInfo |
getInfo(java.lang.String type) |
static TypeInfo |
getInstance(java.lang.String name)
Returns a TypeInfo instance encapsulating information about the
requested type.
|
java.lang.String |
getName()
Returns the name of the admin object.
|
java.util.List<java.lang.String> |
getPolicyNames()
Returns the policy names.
|
static java.util.List<java.lang.String> |
getRootTypeNames()
Returns an unmodifiable list containing the NAMES of all business types
in the database, which does not have any parents
|
java.lang.String |
getSymbolicName()
Returns the symbolic type name.
|
java.util.List<java.lang.String> |
getToRelNames()
Returns the names of the relationships available on the to side.
|
static java.util.List<java.lang.String> |
getTypeNames()
Returns an unmodifiable list containing the NAMES of all business types
in the database
|
static TreeNode |
getTypeTree(java.util.List<java.lang.String> rootTypeNames)
Returns given business types as a tree hierarchy.
|
static TreeNode |
getTypeTree(java.util.List<java.lang.String> rootTypeNames,
boolean includeHidden)
Returns given business types as a tree hierarchy.
|
static TreeNode |
getTypeTree(java.util.List<java.lang.String> rootTypeNames,
boolean includeHidden,
int levels)
Returns given business types as a tree hierarchy.
|
static TreeNode |
getTypeTree(java.lang.String rootType) |
int |
hashCode()
Returns the hash code.
|
boolean |
isAbstract()
Returns whether the type is abstract or not.
|
boolean |
isDerivedFrom(java.lang.String otherType)
Checks if this type is a sub-type of the other type.
|
boolean |
isHidden()
Returns whether the type is hidden or not.
|
java.lang.String |
toString()
Returns a string representation suitable for debugging.
|
protected TypeInfo(java.lang.String name, java.lang.String symbolicName, boolean hidden, java.util.List<java.lang.String> attributeNames, java.lang.String derivedName, java.util.List<java.lang.String> immediateDerivativeNames, boolean abstractType, java.util.List<java.lang.String> policyNames, java.util.List<java.lang.String> fromRelNames, java.util.List<java.lang.String> toRelNames, java.util.List<java.lang.String> createPolicies)
public static boolean exists(java.lang.String name) throws TVCException
TVCException
public static TreeNode getTypeTree(java.lang.String rootType) throws TVCException
TVCException
public static TreeNode getTypeTree(java.util.List<java.lang.String> rootTypeNames) throws TVCException
rootTypeNames
- A list containing the NAMES of the business types
that will be the immediate children of the returned TreeNode.TVCException
public static TreeNode getTypeTree(java.util.List<java.lang.String> rootTypeNames, boolean includeHidden) throws TVCException
rootTypeNames
- A list containing the NAMES of the businessincludeHidden
- True if to include hidden objects types that will be
the immediate children of the returned TreeNode.TVCException
public static TreeNode getTypeTree(java.util.List<java.lang.String> rootTypeNames, boolean includeHidden, int levels) throws TVCException
rootTypeNames
- A list containing the NAMES of the businessincludeHidden
- True if to include hidden objects types that will be
the immediate children of the returned TreeNode.levels
- How many levels to traverse the type hierarchy. If the
level is less than zero the entire hierarchy will be returned.TVCException
public static java.util.List<java.lang.String> getRootTypeNames() throws TVCException
TVCException
public static java.util.List<java.lang.String> getTypeNames() throws TVCException
TVCException
public static TypeInfo getInstance(java.lang.String name) throws TVCException
name
- The name of the type.TVCException
- If unable to retrieve type information in case the
information has to be retrieved from the database.public java.lang.String getSymbolicName()
public boolean isHidden()
isHidden
in interface com.technia.tvc.core.db.model.SchemaInfo
public java.util.List<java.lang.String> getAttributeNames()
public boolean getHasAttribute(java.lang.String attribute)
public java.lang.String getDerivedName()
public TypeInfo getDerived() throws TVCException
TypeInfo
for the type which the current type is
derived from. I.e., the parent type.TypeInfo
for the type which the current type
is derived from. I.e., the parent type.TVCException
- If unable to load information about the parent type.public java.util.List<java.lang.String> getImmediateDerivativeNames()
public boolean isAbstract()
public java.util.List<java.lang.String> getPolicyNames()
public java.util.List<java.lang.String> getFromRelNames()
public java.util.List<java.lang.String> getToRelNames()
public java.util.List<java.lang.String> getCreatePolicies()
public int hashCode()
public boolean equals(java.lang.Object obj)
public boolean isDerivedFrom(java.lang.String otherType) throws TVCException
isDerivedFrom
in interface com.technia.tvc.core.db.model.Deriveable
otherType
- Another type.TVCException
- If an error occurs.protected TypeInfo getInfo(java.lang.String type) throws TVCException
TVCException
public boolean getHasAttribute(AttributeInfo ai) throws TVCException
ai
- The AttributeInfo
instance.TVCException
- If some DB error occurs.public java.lang.String getName()
getName
in interface com.technia.tvc.core.db.model.SchemaInfo
public final java.lang.String toString()
toString
in class java.lang.Object
Copyright © Technia AB. All Rights Reserved.