public final class AttributeInfo
extends java.lang.Object
| Modifier and Type | Class and Description |
|---|---|
static class |
AttributeInfo.OwnerKind
Represents the kind of owner for the attribute.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(java.lang.Object o)
Returns true if the objects are equal.
|
static boolean |
exists(java.lang.String name)
Returns true if the given attribute exists.
|
static java.util.List<AttributeInfo> |
getAllAttributeInfos()
Returns all attributes from the database.
|
static java.util.Collection<java.lang.String> |
getAttributeNames()
Returns an unmodifiable list containing the NAMES of all the attribute
types that exists in the database.
|
static java.lang.String[] |
getBooleanValues(AttributeInfo attribute,
java.util.Locale locale)
Returns the translated boolean values for an attribute.
|
java.util.List<java.lang.String> |
getChoices()
Returns the accepted range values.
|
java.lang.String |
getDefault()
Returns the default value.
|
DimensionInfo |
getDimension()
Note: Dimension is a feature in Matrix 10.7+ This method will always
return null if the matrix version is below that.
|
boolean |
getHasDimension() |
static AttributeInfo |
getInstance(java.lang.String name)
Returns an AttributeInfo instance encapsulating information
about the requested attribute.
|
static AttributeInfo |
getLocalAttribute(java.lang.String owner,
AttributeInfo.OwnerKind ownerKind,
java.lang.String localName)
Returns the local attribute with the given name for the specified owner
|
static java.util.Iterator<AttributeInfo> |
getLocalAttributes() |
static java.util.Iterator<AttributeInfo> |
getLocalAttributes(java.lang.String localName) |
static java.util.Iterator<AttributeInfo> |
getLocalAttributes(java.lang.String owner,
AttributeInfo.OwnerKind ownerKind) |
java.lang.String |
getLocalName() |
int |
getMaxLength() |
java.lang.String |
getName()
Returns the name of the admin object.
|
java.lang.String |
getOwner() |
AttributeInfo.OwnerKind |
getOwnerKind() |
java.lang.String |
getSymbolicName()
Returns the symbolic attribute name.
|
int |
getType()
Returns the attribute type.
|
boolean |
getUsesProgram()
Returns whether the attribute uses a program to retrieve choices or not.
|
com.technia.tvc.core.db.model.AttributeValueType |
getValueType() |
boolean |
hasChoices() |
boolean |
hasDimension()
Deprecated.
Use
getHasDimension() instead |
int |
hashCode()
Returns the objects hash code.
|
boolean |
isHidden()
Returns whether the attribute is hidden or not.
|
boolean |
isLocal() |
boolean |
isMultiline()
Returns whether the attribute is multiline or not.
|
java.lang.String |
toString()
Returns a string representation suitable for debugging.
|
public static boolean exists(java.lang.String name)
throws TVCException
TVCExceptionpublic static java.util.Collection<java.lang.String> getAttributeNames()
throws TVCException
TVCExceptionpublic static java.util.List<AttributeInfo> getAllAttributeInfos() throws TVCException
TVCExceptionpublic static AttributeInfo getInstance(java.lang.String name) throws TVCException
name - The name of the attribute.TVCException - If unable to retrieve attribute information in case
the information has to be retrieved from the database.public java.lang.String getSymbolicName()
public int getType()
public boolean isMultiline()
public boolean isHidden()
public boolean hasChoices()
public boolean getUsesProgram()
public java.util.List<java.lang.String> getChoices()
public java.lang.String getDefault()
public DimensionInfo getDimension()
@Deprecated public boolean hasDimension()
getHasDimension() insteadpublic boolean getHasDimension()
public boolean isLocal()
public java.lang.String getOwner()
public AttributeInfo.OwnerKind getOwnerKind()
public java.lang.String getLocalName()
getName()
doespublic com.technia.tvc.core.db.model.AttributeValueType getValueType()
ValueTypepublic int getMaxLength()
public static AttributeInfo getLocalAttribute(java.lang.String owner, AttributeInfo.OwnerKind ownerKind, java.lang.String localName) throws TVCException
owner - The name of the ownerownerKind - The kind of ownerlocalName - The local nameTVCException - Upon errors to retrieve the attributes from the DBpublic static java.util.Iterator<AttributeInfo> getLocalAttributes(java.lang.String owner, AttributeInfo.OwnerKind ownerKind) throws TVCException
owner - The ownerownerKind - The owner kindAttributeInfo instances, which is
local to the specified owner. If the owner does not have any
local attributes, the iterator is empty.TVCException - Upon errors to retrieve the attributes from the DBpublic static java.util.Iterator<AttributeInfo> getLocalAttributes(java.lang.String localName) throws TVCException
localName - The local nameAttributeInfo instances, which is
local and has a local name matching the specified.TVCException - Upon errors to retrieve the attributes from the DBpublic static java.util.Iterator<AttributeInfo> getLocalAttributes() throws TVCException
TVCException - Upon errors to retrieve the attributes from the DBpublic int hashCode()
public boolean equals(java.lang.Object o)
public static java.lang.String[] getBooleanValues(AttributeInfo attribute, java.util.Locale locale)
If the attribute is null or not of type boolean, this method returns null. Otherwise, this method returns an array of length 2 were the first item is the translated value for FALSE and the second item is the translated value for TRUE.
attribute - The attributelocale - The localepublic java.lang.String getName()
getName in interface com.technia.tvc.core.db.model.SchemaInfopublic final java.lang.String toString()
toString in class java.lang.ObjectCopyright ? Technia AB. All Rights Reserved.