|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.empire.data.bean.BeanProperty
public class BeanProperty
BeanObject This class defines Metadata for a single property.
Field Summary | |
---|---|
protected BeanClass |
beanClass
|
Constructor Summary | |
---|---|
BeanProperty(String name,
DataType dataType,
double size,
boolean required)
Constructs a bean property definition |
|
BeanProperty(String name,
DataType dataType,
double size,
boolean required,
String controlType,
boolean readOnly)
Constructs a bean property definition |
|
BeanProperty(String name,
DataType dataType,
double size,
DataMode dataMode,
String controlType)
Constructs a bean property definition |
Method Summary | |
---|---|
Object |
getAttribute(String name)
Returns the value of a column attribute. |
BeanClass |
getBeanClass()
returns the bean class of this property. |
String |
getBeanPropertyName()
Gets the Java bean property name. |
String |
getControlType()
Returns the columns control type. |
DataType |
getDataType()
Returns the data type of the bean property. |
String |
getName()
Returns the name of the property. |
Options |
getOptions()
Returns the list of options for this column containing all allowed field values. |
double |
getSize()
Returns the maximum size a value for this column is allowed to have. |
Column |
getSourceColumn()
Returns the column This function should return the same string as getName() |
String |
getTitle()
Returns the title attribute. |
boolean |
isAutoGenerated()
Returns whether or not the value for this column is auto-generated |
boolean |
isReadOnly()
Returns true if the values for this column are generally read only (like i.e. |
boolean |
isRequired()
Returns whether or not the value for this column must be supplied (i.e. |
void |
setAttribute(String name,
Object value)
|
void |
setControlType(String controlType)
|
void |
setOptions(Options options)
|
void |
setTitle(String title)
|
Object |
validate(Object value)
Checks if the given value is a valid value for this column If not, an exception is thrown |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected BeanClass beanClass
Constructor Detail |
---|
public BeanProperty(String name, DataType dataType, double size, DataMode dataMode, String controlType)
name
- the name of the property (case insensitive)dataType
- the data typesize
- size depending on data type. For data type TEXT the maximum number of characters.dataMode
- determines whether this property is read only, optional, required or auto-generatedcontrolType
- the control type to be used for editing this value. Depends on the client. Default is "text"public BeanProperty(String name, DataType dataType, double size, boolean required, String controlType, boolean readOnly)
name
- dataType
- size
- required
- controlType
- readOnly
- public BeanProperty(String name, DataType dataType, double size, boolean required)
name
- dataType
- size
- required
- Method Detail |
---|
public String getName()
getName
in interface ColumnExpr
public DataType getDataType()
getDataType
in interface ColumnExpr
DataType
public Object getAttribute(String name)
getAttribute
in interface ColumnExpr
name
- the attribute name
public String getTitle()
getTitle
in interface ColumnExpr
public Options getOptions()
getOptions
in interface ColumnExpr
public String getControlType()
getControlType
in interface ColumnExpr
public String getBeanPropertyName()
getBeanPropertyName
in interface ColumnExpr
public Column getSourceColumn()
getSourceColumn
in interface ColumnExpr
public double getSize()
Column
For the data type DECIMAL the size defines the scale and precision of the value.
getSize
in interface Column
public boolean isReadOnly()
Column
isReadOnly
in interface Column
public boolean isAutoGenerated()
Column
isAutoGenerated
in interface Column
public boolean isRequired()
Column
isRequired
in interface Column
public Object validate(Object value)
Column
validate
in interface Column
public BeanClass getBeanClass()
null
if BeanProperty is used 'stand alone'public void setControlType(String controlType)
public void setOptions(Options options)
public void setTitle(String title)
public void setAttribute(String name, Object value)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |