public static interface Property.Builder
Modifier and Type | Method and Description |
---|---|
Property |
get() |
Property.Builder |
setBeanProperty(java.lang.String beanProperty)
Sets the bean name property to associate with this property
|
Property.Builder |
setDateTimeFormatPattern(java.lang.String dateTimeFormatPattern)
Sets the date/time format pattern used when presenting values
|
Property.Builder |
setDefaultValue(java.lang.Object defaultValue)
Sets the default value for this property, overrides the underlying column default value, if any
|
Property.Builder |
setDefaultValueProvider(Property.ValueProvider provider)
Sets the default value provider, use in case of dynamic default values.
|
Property.Builder |
setDescription(java.lang.String description) |
Property.Builder |
setEntityId(java.lang.String entityId) |
Property.Builder |
setFormat(java.text.Format format)
Sets the Format to use when presenting property values
|
Property.Builder |
setHidden(boolean hidden) |
Property.Builder |
setMax(double max)
Sets the maximum allowed value for this property, only applicable to numerical properties
|
Property.Builder |
setMaximumFractionDigits(int maximumFractionDigits)
Sets the maximum fraction digits to show for this property, only applicable to properties based on Types.DOUBLE.
|
Property.Builder |
setMaxLength(int maxLength)
Sets the maximum length of this property value, this applies to String (varchar) based properties
|
Property.Builder |
setMin(double min)
Only applicable to numerical properties
|
Property.Builder |
setMnemonic(java.lang.Character mnemonic)
Sets the mnemonic to use when creating a label for this property
|
Property.Builder |
setNullable(boolean nullable)
Specifies whether or not this property is nullable, in case of
properties that are parts of a ForeignKeyProperty inherit the nullable state of that property.
|
Property.Builder |
setPreferredColumnWidth(int preferredColumnWidth) |
Property.Builder |
setReadOnly(boolean readOnly) |
Property.Builder |
setUseNumberFormatGrouping(boolean useGrouping)
Specifies whether to use number grouping when presenting the value associated with this property.
|
Property get()
Property.Builder setEntityId(java.lang.String entityId)
entityId
- the id of the entity this property is associated withjava.lang.IllegalStateException
- in case the entityId has already been setProperty.Builder setBeanProperty(java.lang.String beanProperty)
beanProperty
- the bean property nameProperty.Builder setDefaultValue(java.lang.Object defaultValue)
defaultValue
- the value to use as defaultProperty.Builder setDefaultValueProvider(Property.ValueProvider provider)
provider
- the default value providerProperty.Builder setHidden(boolean hidden)
hidden
- specifies whether this property should hidden in table viewsProperty.Builder setMax(double max)
max
- the maximum allowed valueProperty.Builder setMin(double min)
min
- the minimum allowed value for this propertyProperty.Builder setMaximumFractionDigits(int maximumFractionDigits)
setFormat(Format)
.
Note that values associated with this property are automatically rounded to maximumFractionDigits
digits.maximumFractionDigits
- the maximum fraction digitsProperty.Builder setUseNumberFormatGrouping(boolean useGrouping)
setFormat
useGrouping
- if true then number grouping is usedProperty.Builder setPreferredColumnWidth(int preferredColumnWidth)
preferredColumnWidth
- the preferred column width of this property in pixels when displayed in a tableProperty.Builder setReadOnly(boolean readOnly)
readOnly
- specifies whether this property should be included during insert/update operationsProperty.Builder setNullable(boolean nullable)
nullable
- specifies whether or not this property accepts a null valueProperty.Builder setMaxLength(int maxLength)
maxLength
- the maximum lengthProperty.Builder setMnemonic(java.lang.Character mnemonic)
mnemonic
- the mnemonic characterProperty.Builder setDescription(java.lang.String description)
description
- a String describing this propertyProperty.Builder setFormat(java.text.Format format)
format
- the format to usejava.lang.NullPointerException
- in case format is nulljava.lang.IllegalArgumentException
- in case the format does not fit the property type,
f.ex. NumberFormat is expected for numerical propertiesProperty.Builder setDateTimeFormatPattern(java.lang.String dateTimeFormatPattern)
dateTimeFormatPattern
- the format patternjava.lang.IllegalArgumentException
- in case the pattern is invalid or if this property is not a date/time based one