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_NULLTEXT, COLATTR_NUMBER_GROUPSEP, COLATTR_NUMBER_TYPE, COLATTR_REGEXP, COLATTR_TITLE, COLATTR_TOOLTIP, COLATTR_TYPE
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
|
Modifier and Type | Method and Description |
---|---|
Object |
getAttribute(String name)
Returns the value of a column attribute.
|
Set<Attributes.Attribute> |
getAttributes()
Returns all metadata attributes.
|
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 |
validateValue(Object value)
Checks if the given value is a valid value for this column
If not, an exception is thrown
|
protected BeanClass beanClass
public BeanProperty(String name, DataType dataType, double size, boolean required, String controlType, boolean readOnly)
name
- the name of the propertydataType
- the type of the propertysize
- the sizerequired
- flag true if requiredcontrolType
- string indication which type of control to usereadOnly
- flag true if read-onlypublic BeanProperty(String name, DataType dataType, double size, boolean required, String controlType)
name
- the name of the propertydataType
- the type of the propertysize
- the sizerequired
- flag true if requiredcontrolType
- string indication which type of control to usepublic 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 Set<Attributes.Attribute> getAttributes()
getAttributes
in interface Column
public String getTitle()
getTitle
in interface ColumnExpr
public Options getOptions()
getOptions
in interface ColumnExpr
public Class<Enum<?>> getEnumType()
getEnumType
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.
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 validateValue(Object value)
Column
validateValue
in interface Column
value
- the value to validatepublic 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–2023 Apache Software Foundation. All rights reserved.