@groovy.transform.CompileStatic @groovy.transform.builder.Builder(builderStrategy: SimpleStrategy, prefix: ) class PropertyConfig extends Property
Custom mapping for a single domain property. Note that a property can have multiple columns via a component or a user type.
Type | Name and description |
---|---|
java.lang.Integer |
batchSize The batch size used for lazy loading |
CacheConfig |
cache The cache configuration |
java.util.List<ColumnConfig> |
columns The columns |
boolean |
explicitSaveUpdateCascade |
boolean |
ignoreNotFound Whether to ignore ObjectNotFoundException |
PropertyConfig |
indexColumn The column used to produce the index for index based collections (lists and maps) |
boolean |
insertable Whether or not this is column is insertable by hibernate |
JoinTable |
joinTable The join table configuration |
java.lang.String |
order The default sort order |
int |
scale |
java.lang.String |
sort The default sort property name |
java.lang.Object |
type The Hibernate type or user type of the property. |
java.util.Properties |
typeParams The parameters for the property that can be used to configure a Hibernate ParameterizedType implementation. |
boolean |
unique |
boolean |
updatable Whether or not this column is updatable by hibernate |
Constructor and description |
---|
PropertyConfig
() |
Type Params | Return Type | Name and description |
---|---|---|
|
PropertyConfig |
cache(groovy.lang.Closure cacheConfig) Define the cache config |
|
PropertyConfig |
cache(java.util.Map cacheConfig) Define the cache config |
|
protected void |
checkHasSingleColumn() |
|
PropertyConfig |
clone() |
|
PropertyConfig |
column(groovy.lang.Closure columnDef) Configure a column |
|
PropertyConfig |
column(java.util.Map columnDef) Configure a column |
|
PropertyConfig |
column(java.lang.String columnDef) Configure a column |
|
static PropertyConfig |
configureExisting(PropertyConfig property, java.util.Map config) Configures an existing PropertyConfig instance |
|
static PropertyConfig |
configureExisting(PropertyConfig property, groovy.lang.Closure config) Configures an existing PropertyConfig instance |
|
static PropertyConfig |
configureNew(groovy.lang.Closure config) Configures a new PropertyConfig instance |
|
static PropertyConfig |
configureNew(java.util.Map config) Configures a new PropertyConfig instance |
|
java.lang.String |
getColumn() Shortcut to get the column name for this property. |
|
java.lang.String |
getEnumType() |
|
org.hibernate.FetchMode |
getFetchMode()
|
|
java.lang.String |
getIndexName() Shortcut to get the index setting for this property's column. |
|
int |
getLength() Shortcut to get the length of this property's column. |
|
int |
getPrecision() Shortcut to get the precision of this property's column. |
|
int |
getScale() Shortcut to get the scale of this property's column. |
|
java.lang.String |
getSqlType() Shortcut to get the SQL type of the corresponding column. |
|
boolean |
getUpdateable() Whether or not this column is updatable by hibernate |
|
PropertyConfig |
indexColumn(groovy.lang.Closure indexColumnConfig) The column used to produce the index for index based collections (lists and maps) |
|
boolean |
isUnique() Shortcut to determine whether the property's column is configured to be unique. |
|
PropertyConfig |
joinTable(groovy.lang.Closure joinTableDef) The join table configuration |
|
PropertyConfig |
joinTable(java.lang.String tableName) The join table configuration |
|
PropertyConfig |
joinTable(java.util.Map joinTableDef) The join table configuration |
|
void |
setFetch(org.hibernate.FetchMode fetch)
|
|
void |
setScale(int scale) |
|
void |
setUnique(boolean unique) |
|
void |
setUpdateable(boolean updateable) Whether or not this column is updatable by hibernate |
|
java.lang.String |
toString() |
Methods inherited from class | Name |
---|---|
class Property |
clone, configureExisting, configureExisting, fetch, fetch, getEnumType, getEnumTypeObject, getLazy, getName, getUniquenessGroup, isLazy, isUnique, isUniqueWithinGroup, name, setEnumType, setEnumType, setFetch, setLazy, setName, setRange, setSize, setUnique, setUnique, setUnique, setUniquenessGroup, unique, unique, unique |
The batch size used for lazy loading
The cache configuration
The columns
Whether to ignore ObjectNotFoundException
The column used to produce the index for index based collections (lists and maps)
Whether or not this is column is insertable by hibernate
The join table configuration
The default sort order
The default sort property name
The Hibernate type or user type of the property. This can be a string or a class.
The parameters for the property that can be used to configure a Hibernate ParameterizedType implementation.
Whether or not this column is updatable by hibernate
Define the cache config
cacheConfig
- The cache configDefine the cache config
cacheConfig
- The cache configConfigure a column
columnDef
- The column definitionConfigure a column
columnDef
- The column definitionConfigure a column
columnDef
- The column definitionConfigures an existing PropertyConfig instance
config
- The configurationConfigures an existing PropertyConfig instance
config
- The configurationConfigures a new PropertyConfig instance
config
- The configurationConfigures a new PropertyConfig instance
config
- The configurationShortcut to get the column name for this property.
Shortcut to get the index setting for this property's column.
Shortcut to get the length of this property's column.
Shortcut to get the precision of this property's column.
Shortcut to get the scale of this property's column.
Shortcut to get the SQL type of the corresponding column.
Whether or not this column is updatable by hibernate
The column used to produce the index for index based collections (lists and maps)
Shortcut to determine whether the property's column is configured to be unique.
The join table configuration
The join table configuration
The join table configuration
fetch
- The Hibernate org.hibernate.FetchModeWhether or not this column is updatable by hibernate
Groovy Documentation