|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object | +--com.xerox.bantam.FieldDescriptor
A FieldDescriptor is an immutable representation of a Bantam property constraint. FieldDescriptors form the body of schemas as they describe constraints on properties in a schema. Storage implementations use this information to implement schema enforcement and possibly to optimize storage and query processing.
To enable efficient Schema validation, FieldDescriptors must be immutable. This is the reason why most methods may not be overridden in subclasses. In general, subclassing FieldDescriptor is discouraged.
| Constructor Summary | |
FieldDescriptor(String name,
Class t)
Simple form constructor for required fields limited to a single value. |
|
FieldDescriptor(String n,
Class clazz,
boolean optional)
Abbreviated constructor for fields limited to a single value but possibly optional. |
|
FieldDescriptor(String n,
Class clazz,
int maxValues,
boolean optional)
Full constructor taking Class object. |
|
FieldDescriptor(String n,
String[] values,
boolean optional)
Abbreviated constructor for enumeration field limited to a single value but possibly optional. |
|
FieldDescriptor(String n,
String[] values,
int maxValues,
boolean optional)
Full constructor for enumeration field. |
|
| Method Summary | |
boolean |
equals(Object o)
|
boolean |
equalsType(FieldDescriptor other)
Restricted equivalence test that returns true if the supplied descriptor imposes the same value type restriction as this descriptor. |
Class |
getBaseType()
|
static FieldDescriptor |
getDescriptor(String name)
Retrieve the canonical instance of a descriptor by name. |
int |
getMaxValues()
|
String |
getName()
|
TypeDescriptor |
getType()
|
long |
getVersion()
Return a version stamp which is a signature value for this descriptor. |
int |
hashCode()
|
boolean |
isNegated()
|
boolean |
isOptional()
|
boolean |
isValid(Object value)
|
String |
toString()
|
| Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
public FieldDescriptor(String name,
Class t)
name - the property namet - the Class of value
public FieldDescriptor(String n,
Class clazz,
boolean optional)
n - the property nameclazz - the Class of property valuesoptional - true if property is optional
public FieldDescriptor(String n,
String[] values,
boolean optional)
n - the property namevalues - the list of legal valuesmaxValues - the maximum number of values, -1=unlimited, 0=property not permittedoptional - true if property is optional
public FieldDescriptor(String n,
Class clazz,
int maxValues,
boolean optional)
n - the property nameclazz - the Class of property valuesmaxValues - the maximum number of values, -1=unlimited, 0=property not permittedoptional - true if property is optional
public FieldDescriptor(String n,
String[] values,
int maxValues,
boolean optional)
n - the property namevalues - the list of legal valuesmaxValues - the maximum number of values, -1=unlimited, 0=property not permittedoptional - true if property is optional| Method Detail |
public final String getName()
public final TypeDescriptor getType()
public final Class getBaseType()
public final int getMaxValues()
public final boolean isOptional()
public final boolean isNegated()
public final boolean isValid(Object value)
public boolean equals(Object o)
equals in class Objectpublic boolean equalsType(FieldDescriptor other)
public int hashCode()
hashCode in class Objectpublic static FieldDescriptor getDescriptor(String name)
name - the name of the descriptor to retrievepublic long getVersion()
public final String toString()
toString in class Object
|
Project Harland | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||