Groovy Documentation

org.codehaus.groovy.grails.commons
[Java] Class DefaultGrailsDomainClassProperty

java.lang.Object
  org.codehaus.groovy.grails.commons.DefaultGrailsDomainClassProperty
All Implemented Interfaces:
GrailsDomainClassProperty

public class DefaultGrailsDomainClassProperty
extends java.lang.Object

Represents a property of a domain class and contains meta information about the properties relationships, naming conventions and type.

Authors:
Graeme Rocher
Since:
0.1


Constructor Summary
DefaultGrailsDomainClassProperty(GrailsDomainClass domainClass, java.beans.PropertyDescriptor descriptor)

Constructor.

DefaultGrailsDomainClassProperty(GrailsDomainClass domainClass, java.beans.PropertyDescriptor descriptor, java.util.Map defaultConstraints)

Constructor.

 
Method Summary
boolean equals(java.lang.Object o)

GrailsDomainClass getComponent()

GrailsDomainClass getDomainClass()

int getFetchMode()

java.lang.String getFieldName()

java.lang.String getName()

java.lang.String getNaturalName()

GrailsDomainClassProperty getOtherSide()

GrailsDomainClass getReferencedDomainClass()

java.lang.String getReferencedPropertyName()

java.lang.Class getReferencedPropertyType()

java.lang.Class getType()

java.lang.String getTypePropertyName()

boolean isAssociation()

boolean isBasicCollectionType()

boolean isBidirectional()

boolean isCircular()

boolean isDerived()

boolean isEmbedded()

boolean isEnum()

boolean isHasOne()

boolean isIdentity()

boolean isInherited()

boolean isManyToMany()

boolean isManyToOne()

boolean isOneToMany()

boolean isOneToOne()

boolean isOptional()

boolean isOwningSide()

boolean isPersistent()

void setBasicCollectionType(boolean b)

protected void setBidirectional(boolean bidirectional)

void setDerived(boolean derived)

void setEmbedded(boolean isEmbedded)

protected void setHasOne(boolean isHasOne)

void setIdentity(boolean b)

protected void setManyToMany(boolean manyToMany)

protected void setManyToOne(boolean manyToOne)

protected void setOneToMany(boolean oneToMany)

protected void setOneToOne(boolean oneToOne)

void setOtherSide(GrailsDomainClassProperty property)

void setOwningSide(boolean b)

protected void setPersistent(boolean persistent)

void setReferencePropertyName(java.lang.String name)

void setReferencedDomainClass(GrailsDomainClass referencedDomainClass)

protected void setReferencedPropertyType(java.lang.Class referencedPropertyType)

java.lang.String toString()

 
Methods inherited from class java.lang.Object
java.lang.Object#wait(), java.lang.Object#wait(long), java.lang.Object#wait(long, int), 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()
 

Constructor Detail

DefaultGrailsDomainClassProperty

public DefaultGrailsDomainClassProperty(GrailsDomainClass domainClass, java.beans.PropertyDescriptor descriptor)
Constructor.
Parameters:
domainClass
descriptor


DefaultGrailsDomainClassProperty

public DefaultGrailsDomainClassProperty(GrailsDomainClass domainClass, PropertyDescriptor descriptor, Map defaultConstraints) {
public DefaultGrailsDomainClassProperty(GrailsDomainClass domainClass, java.beans.PropertyDescriptor descriptor, java.util.Map defaultConstraints)
Constructor.
Parameters:
domainClass
descriptor


 
Method Detail

equals

if (o instanceof GrailsDomainClassProperty) {
public boolean equals(java.lang.Object o)


getComponent

public GrailsDomainClass getComponent()


getDomainClass

public GrailsDomainClass getDomainClass()


getFetchMode

public int getFetchMode()


getFieldName

public java.lang.String getFieldName()


getName

public java.lang.String getName()


getNaturalName

public java.lang.String getNaturalName()


getOtherSide

public GrailsDomainClassProperty getOtherSide()


getReferencedDomainClass

public GrailsDomainClass getReferencedDomainClass()


getReferencedPropertyName

public java.lang.String getReferencedPropertyName()


getReferencedPropertyType

return getType();
public java.lang.Class getReferencedPropertyType()


getType

* @see org.codehaus.groovy.grails.domain.GrailsDomainClassProperty#isPersistant()
public java.lang.Class getType()


getTypePropertyName

public java.lang.String getTypePropertyName()


isAssociation

public boolean isAssociation()


isBasicCollectionType

public boolean isBasicCollectionType()


isBidirectional

public boolean isBidirectional()


isCircular

}
public boolean isCircular()


isDerived

public boolean isDerived()


isEmbedded

public boolean isEmbedded()


isEnum

public boolean isEnum()


isHasOne

public boolean isHasOne()


isIdentity

public boolean isIdentity()


isInherited

public boolean isInherited()


isManyToMany

public boolean isManyToMany()


isManyToOne

public boolean isManyToOne()


isOneToMany

public boolean isOneToMany()


isOneToOne

public boolean isOneToOne()


isOptional

public boolean isOptional()


isOwningSide

public boolean isOwningSide()


isPersistent

public boolean isPersistent()


setBasicCollectionType

public void setBasicCollectionType(boolean b)


setBidirectional

protected void setBidirectional(boolean bidirectional)


setDerived

public void setDerived(boolean derived)


setEmbedded

public void setEmbedded(boolean isEmbedded)


setHasOne

protected void setHasOne(boolean isHasOne)


setIdentity

public void setIdentity(boolean b)


setManyToMany

protected void setManyToMany(boolean manyToMany)


setManyToOne

protected void setManyToOne(boolean manyToOne)


setOneToMany

protected void setOneToMany(boolean oneToMany)


setOneToOne

protected void setOneToOne(boolean oneToOne)


setOtherSide

public void setOtherSide(GrailsDomainClassProperty property)


setOwningSide

public void setOwningSide(boolean b)


setPersistent

protected void setPersistent(boolean persistent)


setReferencePropertyName

public void setReferencePropertyName(java.lang.String name)


setReferencedDomainClass

public void setReferencedDomainClass(GrailsDomainClass referencedDomainClass)


setReferencedPropertyType

protected void setReferencedPropertyType(java.lang.Class referencedPropertyType)


toString

else if (isOneToMany()) {
public java.lang.String toString()


 

Groovy Documentation