|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.sun.mdm.index.objects.validation.FieldDescriptor
Field Summary | |
static int |
NONE
None |
static int |
REQUIRED
Nillable |
static int |
UPDATEABLE
Updatable |
Constructor Summary | |
FieldDescriptor(java.lang.String name)
Creates a new instance of Field |
|
FieldDescriptor(java.lang.String name,
int dataType)
|
|
FieldDescriptor(java.lang.String name,
int dataType,
int attributes)
|
Method Summary | |
java.lang.String |
getFieldDescription()
Get field description of this field |
java.lang.String |
getFieldName()
Get field name of this field |
int |
getFieldType()
Get field type of this field |
boolean |
isRequired()
Get Required attribute of this field |
boolean |
isUpdateable()
Get Updateable attribute of this field |
void |
setAllAttributes(int attributes)
Set all attributes of this FieldDescriptor |
void |
setAttribute(int fieldAttribute,
boolean flag)
Set an attribute of this FieldDescriptor |
void |
setFieldType(int dataType)
Set the FieldType of this FieldDescriptor |
java.lang.String |
toString()
|
void |
validate(ObjectField field,
boolean newObject)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
public static final int NONE
public static final int REQUIRED
public static final int UPDATEABLE
Constructor Detail |
public FieldDescriptor(java.lang.String name) throws ValidationException
name
- field name
ValidationException
ValidationException
- if name is nullpublic FieldDescriptor(java.lang.String name, int dataType) throws ValidationException
name
- field namedataType
- data type
ValidationException
ValidationException
- if name is nullpublic FieldDescriptor(java.lang.String name, int dataType, int attributes) throws ValidationException
name
- field namedataType
- data typeattributes
- field attributes
ValidationException
ValidationException
- if name is nullMethod Detail |
public java.lang.String getFieldDescription()
public java.lang.String getFieldName()
public int getFieldType()
public boolean isRequired()
public boolean isUpdateable()
public void setAllAttributes(int attributes)
attributes
- all attributespublic void setAttribute(int fieldAttribute, boolean flag)
fieldAttribute
- attributeflag
- true or falsepublic void setFieldType(int dataType) throws ValidationException
dataType
- field type
ValidationException
- if data type is not recognizedpublic java.lang.String toString()
public void validate(ObjectField field, boolean newObject) throws ValidationException
FieldValidator
validate
in interface FieldValidator
field
- object fieldnewObject
- a new object
ValidationException
- if the value is missing for a required field
or the spcefied filed is null
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Sun Microsystems, Inc.