public class AttributeStorageDefinition
extends java.lang.Object
AttributeStorage
Constructor and Description |
---|
AttributeStorageDefinition(java.lang.String... names)
Helper Constructor to use when all the attributes are Strings.
|
AttributeStorageDefinition(java.lang.String[] names,
AttributeClass[] storage)
Constructor
|
Modifier and Type | Method and Description |
---|---|
void |
addDefinition(java.lang.String name,
AttributeClass storage)
Add another attribute name, storage definition pair
|
AttributeClass[] |
getClasses() |
java.util.Iterator<java.lang.String> |
getNameIterator()
Return a Iterator through the attribute names.
|
java.lang.String[] |
getNames() |
java.lang.String |
getSelectColumns()
Gives the list of column names defined, separated by commas & ready for a select statement
|
AttributeClass |
getStorageClass(java.lang.String attrName)
Gets the storage class for an attribute and also validates
that the attribute name is recognized.
|
boolean |
hasAttribute(java.lang.String attrName)
Is there an attribute defined with this name?
|
public AttributeStorageDefinition(java.lang.String[] names, AttributeClass[] storage)
names
- The names of the attributesstorage
- How to store the attribute values. If this parameter is null, all the attributes
are assumed to be Strings.public AttributeStorageDefinition(java.lang.String... names)
names
- The names of the attributespublic AttributeClass getStorageClass(java.lang.String attrName)
attrName
- The Name of the attribute.java.lang.RuntimeException
- If attribute named doesn't exist.public boolean hasAttribute(java.lang.String attrName)
attrName
- The name of the attribute to check for.public java.util.Iterator<java.lang.String> getNameIterator()
public java.lang.String[] getNames()
public AttributeClass[] getClasses()
public void addDefinition(java.lang.String name, AttributeClass storage)
name
- Name of the attributestorage
- Storage Classpublic java.lang.String getSelectColumns()