public interface GrailsDomainClassProperty
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
ALL_DATA_SOURCES |
static java.lang.String |
ATTACHED |
static java.lang.String |
BELONGS_TO |
static java.lang.String |
CLASS |
static java.lang.String |
CONSTRAINTS |
static java.lang.String |
DATE_CREATED |
static java.lang.String |
DEFAULT_DATA_SOURCE |
static java.lang.String |
DOMAIN_CLASS |
static java.lang.String |
EMBEDDED |
static java.lang.String |
ERRORS |
static java.lang.String |
EVANESCENT |
static int |
FETCH_EAGER |
static int |
FETCH_LAZY |
static java.lang.String |
FETCH_MODE |
static java.lang.String |
HAS_MANY |
static java.lang.String |
HAS_ONE |
static java.lang.String |
IDENTITY |
static java.lang.String |
LAST_UPDATED |
static java.lang.String |
MAPPED_BY |
static java.lang.String |
MAPPING |
static java.lang.String |
MAPPING_STRATEGY |
static java.lang.String |
META_CLASS |
static java.lang.String |
NAMED_QUERIES |
static java.lang.String |
RELATES_TO_MANY |
static java.lang.String |
SORT |
static java.lang.String |
TRANSIENT |
static java.lang.String |
VERSION |
Modifier and Type | Method and Description |
---|---|
GrailsDomainClass |
getComponent()
If #isEmbedded returns true then this method can be called to obtain a reference to the
embedded component, which implements the GrailsDomainClass interface.
|
GrailsDomainClass |
getDomainClass()
Returns the parent domain class of the property instance.
|
int |
getFetchMode()
Returns the configured fetch mode for the property
|
java.lang.String |
getFieldName()
Returns the domain field name for this property.
|
java.lang.String |
getName()
Returns the name of the property.
|
java.lang.String |
getNaturalName() |
GrailsDomainClassProperty |
getOtherSide()
Returns the other side of a bidirectional association
|
GrailsDomainClass |
getReferencedDomainClass()
Returns the GrailsDomainClass of a relationship property or null,
if the property is not a relationship property.
|
java.lang.String |
getReferencedPropertyName()
Retrieves the name of property referenced by this property if it is
an association and is known, otherwise null.
|
java.lang.Class |
getReferencedPropertyType()
Returns the referenced property type.
|
java.lang.Class |
getType()
Returns the type for the domain class
|
java.lang.String |
getTypePropertyName()
Returns the class type as a property name representation.
|
boolean |
isAssociation()
Returns true if this property is a relationship property.
|
boolean |
isBasicCollectionType()
Return whether this is a collection of basic types like String, Integer etc.
|
boolean |
isBidirectional()
Returns true if the property is a bi-directional relationship.
|
boolean |
isCircular()
Whether the relationship is cirucular.
|
boolean |
isDerived() |
boolean |
isEmbedded()
Returns true if this propert is an embedded component.
|
boolean |
isEnum()
Returns true if this properties type is an enum.
|
boolean |
isHasOne() |
boolean |
isIdentity()
Returns true of the property is an identifier.
|
boolean |
isInherited()
Whether the property is inherited from a super class.
|
boolean |
isManyToMany()
Returns true if the property is a many-to-many relationship.
|
boolean |
isManyToOne()
Returns true if the property is a many-to-one relationship.
|
boolean |
isOneToMany()
Returns true if the property is a one-to-many relationship.
|
boolean |
isOneToOne()
Returns true if the property is a one-to-one relationship.
|
boolean |
isOptional()
Returns false if the property is required.
|
boolean |
isOwningSide()
Whether this side of the association is the "owning" side.
|
boolean |
isPersistent()
Returns true if the domain class property is a persistent property.
|
void |
setDerived(boolean derived) |
void |
setOtherSide(GrailsDomainClassProperty referencedProperty)
Sets the other side of an associative property.
|
void |
setOwningSide(boolean b) |
void |
setReferencedDomainClass(GrailsDomainClass referencedGrailsDomainClass)
Sets the references domain class on the property.
|
static final java.lang.String IDENTITY
static final java.lang.String VERSION
static final java.lang.String ATTACHED
static final java.lang.String TRANSIENT
static final java.lang.String CONSTRAINTS
static final java.lang.String EVANESCENT
static final java.lang.String RELATES_TO_MANY
static final java.lang.String META_CLASS
static final java.lang.String CLASS
static final java.lang.String MAPPING_STRATEGY
static final java.lang.String MAPPED_BY
static final java.lang.String BELONGS_TO
static final java.lang.String HAS_MANY
static final java.lang.String HAS_ONE
static final java.lang.String FETCH_MODE
static final java.lang.String DATE_CREATED
static final java.lang.String MAPPING
static final java.lang.String NAMED_QUERIES
static final java.lang.String LAST_UPDATED
static final java.lang.String DOMAIN_CLASS
static final java.lang.String SORT
static final java.lang.String EMBEDDED
static final java.lang.String ERRORS
static final java.lang.String DEFAULT_DATA_SOURCE
static final java.lang.String ALL_DATA_SOURCES
static final int FETCH_EAGER
static final int FETCH_LAZY
int getFetchMode()
java.lang.String getName()
java.lang.Class getType()
java.lang.Class getReferencedPropertyType()
GrailsDomainClassProperty getOtherSide()
java.lang.String getTypePropertyName()
GrailsDomainClass getDomainClass()
boolean isPersistent()
boolean isOptional()
boolean isIdentity()
boolean isOneToMany()
boolean isManyToOne()
boolean isManyToMany()
boolean isBidirectional()
java.lang.String getFieldName()
boolean isOneToOne()
GrailsDomainClass getReferencedDomainClass()
boolean isAssociation()
boolean isEnum()
java.lang.String getNaturalName()
void setReferencedDomainClass(GrailsDomainClass referencedGrailsDomainClass)
referencedGrailsDomainClass
- void setOtherSide(GrailsDomainClassProperty referencedProperty)
referencedProperty
- boolean isInherited()
boolean isOwningSide()
boolean isCircular()
java.lang.String getReferencedPropertyName()
boolean isEmbedded()
GrailsDomainClass getComponent()
GrailsDomainClass
,
isEmbedded()
void setOwningSide(boolean b)
boolean isBasicCollectionType()
boolean isHasOne()
void setDerived(boolean derived)
boolean isDerived()