public class BeanProperty extends Object implements Column
Modifier and Type | Field and Description |
---|---|
protected BeanClass |
beanClass |
COLATTR_CURRENCY_CODE, COLATTR_DATETIMEPATTERN, COLATTR_ENUMTYPE, COLATTR_FRACTION_DIGITS, COLATTR_INTEGER_DIGITS, COLATTR_MAXVALUE, COLATTR_MINLENGTH, COLATTR_MINVALUE, COLATTR_NUMBER_GROUPSEP, COLATTR_NUMBER_TYPE, COLATTR_REGEXP, COLATTR_TITLE, COLATTR_TOOLTIP, COLATTR_TYPE
Modifier | Constructor and Description |
---|---|
|
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)
Constructs a bean property definition
|
|
BeanProperty(String name,
DataType dataType,
double size,
boolean required,
String controlType,
boolean readOnly)
Constructs a bean property definition
|
protected |
BeanProperty(String name,
DataType dataType,
double size,
DataMode dataMode,
String controlType,
boolean readOnly)
Constructs a bean property definition
|
Modifier and Type | Method and Description |
---|---|
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.
|
Class<Enum<?>> |
getEnumType()
Returns the enum type for this column
|
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. for sequence generated values).
|
boolean |
isRequired()
Returns whether or not the value for this column must be
supplied (i.e. it is mandatory) or not.
|
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
|
protected BeanClass beanClass
protected BeanProperty(String name, DataType dataType, double size, DataMode dataMode, String controlType, boolean readOnly)
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, String controlType)
name
- dataType
- size
- required
- controlType
- readOnly
- 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 namepublic String getTitle()
getTitle
in interface ColumnExpr
public Options getOptions()
getOptions
in interface ColumnExpr
public Class<Enum<?>> getEnumType()
getEnumType
in interface Column
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.
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
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)
Copyright © 2008–2022 Apache Software Foundation. All rights reserved.