|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface GrailsDomainClass
Represents a persistable Grails domain class
Field Summary | |
---|---|
static java.lang.String |
GORM
The name of the default ORM implementation used to map the class |
static java.lang.String |
ORM_MAPPING
|
Method Summary | |
---|---|
java.util.Map |
getAssociationMap()
Returns this classes association map |
java.util.Map |
getConstrainedProperties()
Returns a map of constraints applied to this domain class with the keys being the property name and the values being ConstrainedProperty instances |
java.lang.String |
getFieldName(java.lang.String propertyName)
Returns the field name for the given property name |
GrailsDomainClassProperty |
getIdentifier()
Returns the identifier property |
java.util.Map |
getMappedBy()
|
java.lang.String |
getMappingStrategy()
|
GrailsDomainClassProperty[] |
getPersistantProperties()
Deprecated. Use #getPersistentProperties instead |
GrailsDomainClassProperty[] |
getPersistentProperties()
Returns all of the persistant properties of the domain class |
GrailsDomainClassProperty[] |
getProperties()
Returns all of the properties of the domain class |
GrailsDomainClassProperty |
getPropertyByName(java.lang.String name)
Returns the property for the given name |
java.lang.String |
getPropertyName()
Returns the default property name of the GrailsClass. |
java.lang.Class |
getRelatedClassType(java.lang.String propertyName)
Returns the type of the related class of the given property |
java.util.Set |
getSubClasses()
Returns the sub-classes for this class if any |
org.springframework.validation.Validator |
getValidator()
Retreives the validator for this domain class |
GrailsDomainClassProperty |
getVersion()
Returns the version property |
boolean |
hasPersistentProperty(java.lang.String propertyName)
Returns true if this domain class has a persistent property for the given name |
boolean |
hasSubClasses()
Returns true if the domain classes has sub classes |
boolean |
isBidirectional(java.lang.String propertyName)
Returns true if the given property is a bi-directional relationship |
boolean |
isManyToOne(java.lang.String propertyName)
Returns true if the given property is a many to one relationship |
boolean |
isOneToMany(java.lang.String propertyName)
Returns true if the given property is a one to many relationship |
boolean |
isOwningClass(java.lang.Class domainClass)
|
boolean |
isRoot()
Whether the class is the root of a heirarchy |
void |
refreshConstraints()
Refreshes the constraint defined on a domain class |
void |
setMappingStrategy(java.lang.String strategy)
Sets the strategy to use for ORM mapping. |
void |
setValidator(org.springframework.validation.Validator validator)
Sets the validator for this domain class |
Methods inherited from interface org.codehaus.groovy.grails.commons.GrailsClass |
---|
getClazz, getFullName, getLogicalPropertyName, getMetaClass, getName, getNaturalName, getPackageName, getPropertyValue, getPropertyValue, getReference, getShortName, hasProperty, newInstance |
Field Detail |
---|
static final java.lang.String GORM
static final java.lang.String ORM_MAPPING
Method Detail |
---|
boolean isOwningClass(java.lang.Class domainClass)
domainClass
-
GrailsDomainClassProperty[] getProperties()
GrailsDomainClassProperty[] getPersistantProperties()
GrailsDomainClassProperty[] getPersistentProperties()
GrailsDomainClassProperty getIdentifier()
GrailsDomainClassProperty getVersion()
java.util.Map getAssociationMap()
GrailsDomainClassProperty getPropertyByName(java.lang.String name)
name
- The property for the name
InvalidPropertyException
java.lang.String getFieldName(java.lang.String propertyName)
propertyName
-
java.lang.String getPropertyName()
Returns the default property name of the GrailsClass. For example the property name for a class called "User" would be "user"
getPropertyName
in interface GrailsClass
boolean isOneToMany(java.lang.String propertyName)
propertyName
- The name of the property
boolean isManyToOne(java.lang.String propertyName)
propertyName
- The name of the property
boolean isBidirectional(java.lang.String propertyName)
propertyName
- The name of the property
java.lang.Class getRelatedClassType(java.lang.String propertyName)
propertyName
- The name of the property
java.util.Map getConstrainedProperties()
org.springframework.validation.Validator getValidator()
void setValidator(org.springframework.validation.Validator validator)
validator
- The domain class validator to setjava.lang.String getMappingStrategy()
boolean isRoot()
java.util.Set getSubClasses()
void refreshConstraints()
boolean hasSubClasses()
java.util.Map getMappedBy()
boolean hasPersistentProperty(java.lang.String propertyName)
propertyName
- The property name
void setMappingStrategy(java.lang.String strategy)
strategy
- The mapping strategy
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |