@groovy.transform.CompileStatic @groovy.transform.builder.Builder(builderStrategy: SimpleStrategy, prefix: ) class Property extends java.lang.Object implements java.lang.Cloneable
Base class for classes returned from PropertyMapping.getMappedForm
Type | Name and description |
---|---|
javax.persistence.AccessType |
accessType
|
java.lang.String |
cascade Cascading strategy for this property. |
java.lang.String |
cascadeValidate Cascade validation for associations that are not owned by the parent entity. |
java.util.List<javax.persistence.CascadeType> |
cascades For specifying the cascade type using javax.persistence.CascadeType |
boolean |
derived
|
java.lang.String |
enumType |
java.lang.String |
enumType |
javax.persistence.FetchType |
fetchStrategy
|
java.lang.String |
formula The formula used to build the property |
java.lang.String |
generator Set the id generator name or class. |
java.util.List<java.lang.String> |
inList
|
boolean |
index
|
java.lang.Boolean |
lazy Whether to use lazy proxies for each association. |
java.lang.Boolean |
lazy |
java.lang.Comparable |
max
|
java.lang.Number |
maxSize
|
java.lang.Comparable |
min
|
java.lang.Number |
minSize
|
java.lang.String |
name |
boolean |
nullable
|
boolean |
orphanRemoval Whether an entity of an orphaned association should be removed |
boolean |
reference
|
int |
scale
|
java.lang.String |
targetName The target to map to, could be a database column, document attribute, or hash key |
boolean |
unique |
Constructor and description |
---|
Property() |
Type Params | Return Type | Name and description |
---|---|---|
|
Property |
clone() |
<T extends Property> |
static T |
configureExisting(T property, groovy.lang.Closure config) Configures an existing PropertyConfig instance |
<T extends Property> |
static T |
configureExisting(T property, java.util.Map config) Configures an existing PropertyConfig instance |
|
Property |
fetch(java.lang.String name) Configure the fetch strategy |
|
Property |
fetch(javax.persistence.FetchType type) Configure the fetch strategy |
|
java.lang.String |
getEnumType()
|
|
javax.persistence.EnumType |
getEnumTypeObject()
|
|
java.lang.Boolean |
getLazy() |
|
java.lang.String |
getName()
|
|
java.util.List<java.lang.String> |
getUniquenessGroup() |
|
java.lang.Boolean |
isLazy() |
|
boolean |
isUnique()
|
|
boolean |
isUniqueWithinGroup()
|
|
Property |
name(java.lang.String propertyName)
|
|
void |
setEnumType(javax.persistence.EnumType enumType) |
|
void |
setEnumType(java.lang.String enumType) |
|
void |
setFetch(java.lang.String name) Makes it easier to configure the fetch strategy |
|
void |
setLazy(java.lang.Boolean lazy) |
|
void |
setName(java.lang.String propertyName) |
|
void |
setRange(groovy.lang.ObjectRange range) |
|
void |
setSize(groovy.lang.IntRange maxSize) |
|
void |
setUnique(boolean unique) |
|
void |
setUnique(java.lang.String name) |
|
void |
setUnique(java.util.List<java.lang.String> names) |
|
protected void |
setUniquenessGroup(java.util.List<java.lang.String> uniquenessGroup) |
|
void |
unique(boolean unique) |
|
void |
unique(java.lang.String name) |
|
void |
unique(java.util.List<java.lang.String> names) |
Methods inherited from class | Name |
---|---|
class java.lang.Object |
java.lang.Object#wait(long, int), java.lang.Object#wait(), java.lang.Object#wait(long), java.lang.Object#equals(java.lang.Object), java.lang.Object#toString(), java.lang.Object#hashCode(), java.lang.Object#getClass(), java.lang.Object#notify(), java.lang.Object#notifyAll() |
Cascading strategy for this property. Only makes sense if the property is an association or collection.
Cascade validation for associations that are not owned by the parent entity. Only makes sense if the property is an association.
For specifying the cascade type using javax.persistence.CascadeType
The formula used to build the property
Set the id generator name or class.
generator
- name or class
Whether to use lazy proxies for each association. This has no effect if getFetchStrategy() returns FetchType.EAGER, however if FetchType is LAZY and lazy is set to true then for collection types each element of the collection will be a proxy. If lazy is false the collection will be fetched lazily, but fully initialized objects will be loaded for each element.
Whether an entity of an orphaned association should be removed
The target to map to, could be a database column, document attribute, or hash key
Configures an existing PropertyConfig instance
config
- The configurationConfigures an existing PropertyConfig instance
config
- The configurationConfigure the fetch strategy @return
name
- The name of the fetch strategyConfigure the fetch strategy @return
type
- The type of the fetch strategy
Makes it easier to configure the fetch strategy
name
- The name of the fetch strategyGroovy Documentation