public static interface Entity.Definition.Builder
Modifier and Type | Method and Description |
---|---|
Entity.Definition.Builder |
addConditionProvider(java.lang.String conditionId,
Entity.ConditionProvider conditionProvider)
Adds a
Entity.ConditionProvider which provides a dynamic query condition string. |
Entity.Definition.Builder |
setBeanClass(java.lang.Class beanClass)
Sets the bean class to associate with this entity type
|
Entity.Definition.Builder |
setCaption(java.lang.String caption)
Sets the caption for this entity type
|
Entity.Definition.Builder |
setColorProvider(Entity.ColorProvider colorProvider) |
Entity.Definition.Builder |
setComparator(java.util.Comparator<Entity> comparator)
Sets the comparator to use when comparing this entity type to other entities
|
Entity.Definition.Builder |
setGroupByClause(java.lang.String groupByClause)
Sets the group by clause for this entity type, this clause should not
include the "group by" keywords.
|
Entity.Definition.Builder |
setHavingClause(java.lang.String havingClause)
Sets the having clause for this entity type, this clause should not
include the "having" keyword.
|
Entity.Definition.Builder |
setKeyGenerator(Entity.KeyGenerator keyGenerator)
Sets the primary key generator
|
Entity.Definition.Builder |
setOrderBy(Entity.OrderBy orderBy)
Sets the order by clause for this entity type.
|
Entity.Definition.Builder |
setReadOnly(boolean readOnly)
Sets the read only value, if true then it should not be possible to
insert, update or delete entities of this type
|
Entity.Definition.Builder |
setSearchPropertyIds(java.lang.String... searchPropertyIds)
Sets the IDs of the properties to use when performing a default lookup for this entity type
|
Entity.Definition.Builder |
setSelectQuery(java.lang.String selectQuery,
boolean containsWhereClause)
Sets the select query to use when selecting entities of this type,
use with care.
|
Entity.Definition.Builder |
setSelectTableName(java.lang.String selectTableName)
Sets the name of the table to use when selecting entities of this type,
when it differs from the one used to update/insert, such as a view.
|
Entity.Definition.Builder |
setSmallDataset(boolean smallDataset)
Specifies whether or not this entity should be regarded as based on a small dataset,
which primarily means that combo box models can be based on this entity.
|
Entity.Definition.Builder |
setStaticData(boolean staticData)
Specifies whether or not this entity should be regarded as based on a static dataset, that is,
one that changes only infrequently.
|
Entity.Definition.Builder |
setStringProvider(Entity.ToString stringProvider)
Sets the string provider, that is, the object responsible for providing toString values for this entity type
|
Entity.Definition.Builder |
setValidator(Entity.Validator validator) |
Entity.Definition.Builder setValidator(Entity.Validator validator)
validator
- the validator for this entity typeEntity.Definition.Builder
instanceEntity.Definition.Builder addConditionProvider(java.lang.String conditionId, Entity.ConditionProvider conditionProvider)
Entity.ConditionProvider
which provides a dynamic query condition string.
The condition string should not include the WHERE keyword and use the ?
substitution character where values should be inserted.conditionId
- the condition idconditionProvider
- the condition providerEntity.Definition.Builder setColorProvider(Entity.ColorProvider colorProvider)
colorProvider
- the background color providerEntity.Definition.Builder
instanceEntity.Definition.Builder setCaption(java.lang.String caption)
caption
- the captionEntity.Definition.Builder
instanceEntity.Definition.Builder setBeanClass(java.lang.Class beanClass)
beanClass
- the bean classEntity.Definition.Builder
instanceEntity.Definition.Builder setSmallDataset(boolean smallDataset)
smallDataset
- true if the underlying table is small enough for displaying the contents in a combo boxEntity.Definition.Builder
instanceEntity.Definition.Builder setStaticData(boolean staticData)
staticData
- true if the underlying table data is staticEntity.Definition.Builder
instanceEntity.Definition.Builder setReadOnly(boolean readOnly)
readOnly
- true if this entity type should be read onlyEntity.Definition.Builder
instanceEntity.Definition.Builder setKeyGenerator(Entity.KeyGenerator keyGenerator)
keyGenerator
- the primary key generatorEntity.Definition.Builder
instanceEntity.Definition.Builder setOrderBy(Entity.OrderBy orderBy)
orderBy
- the order by clauseEntity.Definition.Builder
instanceEntity.Definition.Builder setHavingClause(java.lang.String havingClause)
havingClause
- the having clauseEntity.Definition.Builder
instancejava.lang.IllegalStateException
- in case a having clause has already been set,
for example automatically, based on grouping propertiesEntity.Definition.Builder setGroupByClause(java.lang.String groupByClause)
groupByClause
- the group by clauseEntity.Definition.Builder
instancejava.lang.IllegalStateException
- in case a group by clause has already been set,
for example automatically, based on grouping propertiesColumnProperty.Builder#setGroupingColumn(boolean)
Entity.Definition.Builder setSelectTableName(java.lang.String selectTableName)
selectTableName
- the name of the tableEntity.Definition.Builder
instanceEntity.Definition.Builder setSelectQuery(java.lang.String selectQuery, boolean containsWhereClause)
selectQuery
- the select query to use for this entity typecontainsWhereClause
- true if the given query contains a where clauseEntity.Definition.Builder
instanceEntity.Definition.Builder setStringProvider(Entity.ToString stringProvider)
stringProvider
- the string providerEntity.Definition.Builder
instanceEntity.Definition.Builder setComparator(java.util.Comparator<Entity> comparator)
comparator
- the comparatorEntity.Definition.Builder
instanceEntity.Definition.Builder setSearchPropertyIds(java.lang.String... searchPropertyIds)
searchPropertyIds
- the search property IDsEntity.Definition.Builder
instance