|
Copyright © 2008 BEA Systems, Inc. All Rights Reserved | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.bea.p13n.property.AbstractPropertyDefinition
public abstract class AbstractPropertyDefinition
Default implementation of a PropertyDefinition.
| Field Summary |
|---|
| Fields inherited from interface com.bea.p13n.property.PropertyDefinition |
|---|
BOOLEAN, DATETIME, FLOAT, INTEGER, TEXT, USER_DEFINED |
| Constructor Summary | |
|---|---|
AbstractPropertyDefinition()
Default constructor |
|
AbstractPropertyDefinition(String descriptionArg,
int typeArg,
boolean multiValuedArg,
boolean restrictedArg,
Collection restrictedValuesArg,
Object defaultValueArg)
Constructor to initialize attributes |
|
| Method Summary | |
|---|---|
int |
compareTo(Object o)
Implementation of Object.compareTo(); returns 0 if the two objects are equal; attempts to determine an ordering otherwise and returns -1 if this object is less than the comparison object, and 1 if this object is greater than the comparison object. |
protected int |
determinePropertyType(Object value)
Determines if the data type of the property value is a known property type. |
boolean |
equals(Object o)
Equality operator. |
Object |
getDefaultValue()
Get the default value for this property. |
String |
getDescription()
Get the description of this property |
Collection |
getRestrictedValues()
Get the allowable values, if this property is restricted. |
int |
getType()
Get the datatype of the property |
protected String |
getTypeClassName(int type)
Get a meaningful data type for better exception on illegal type when set new property value |
int |
hashCode()
Computes a hashcode for this object based on its attributes |
boolean |
isMultiValued()
Can this property support multiple values? |
boolean |
isRestricted()
Is this property restricted to a certain list of values? |
void |
setDefaultValue(Object o)
Set the default value for this property. |
void |
setDescription(String s)
Set the description of this property |
void |
setMultiValued(boolean b)
Set if this property support multiple values? |
void |
setRestricted(boolean b)
Set if this property restricted to a certain list of values? |
void |
setRestrictedValues(Collection c)
Set the allowable values, if this property is restricted |
void |
setType(int i)
Set the datatype of the property |
String |
toString()
Basic toString method |
void |
validate(Object value)
Validates the given value against the property definition. |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public AbstractPropertyDefinition()
public AbstractPropertyDefinition(String descriptionArg,
int typeArg,
boolean multiValuedArg,
boolean restrictedArg,
Collection restrictedValuesArg,
Object defaultValueArg)
| Method Detail |
|---|
public String getDescription()
getDescription in interface PropertyDefinitionpublic void setDescription(String s)
public int getType()
getType in interface PropertyDefinitionpublic void setType(int i)
public boolean isMultiValued()
isMultiValued in interface PropertyDefinitionpublic void setMultiValued(boolean b)
public boolean isRestricted()
isRestricted in interface PropertyDefinitionpublic void setRestricted(boolean b)
public Collection getRestrictedValues()
getRestrictedValues in interface PropertyDefinitionpublic void setRestrictedValues(Collection c)
public Object getDefaultValue()
getDefaultValue in interface PropertyDefinitionpublic void setDefaultValue(Object o)
public void validate(Object value)
throws PropertyValidationException
validate in interface PropertyDefinitionPropertyValidationException - if the value is not validpublic boolean equals(Object o)
equals in class Objectpublic int hashCode()
hashCode in class Objectpublic int compareTo(Object o)
protected int determinePropertyType(Object value)
value -
int which is one of the datatype constants defined in the PropertyDefinition interfaceprotected String getTypeClassName(int type)
type - dateype constants defined in PropertyDefinition interface
PropertyDefinition interface
If more than one classes match the datatype constants, the class with higher precision is returnedpublic String toString()
toString in class Object
|
Copyright © 2008 BEA Systems, Inc. All Rights Reserved | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||