org.grails.datastore.gorm.config
Class GrailsDomainClassPersistentEntity

java.lang.Object
  extended by org.grails.datastore.gorm.config.GrailsDomainClassPersistentEntity
All Implemented Interfaces:
org.grails.datastore.mapping.model.lifecycle.Initializable, org.grails.datastore.mapping.model.PersistentEntity

public class GrailsDomainClassPersistentEntity
extends java.lang.Object
implements org.grails.datastore.mapping.model.PersistentEntity

Bridges the GrailsDomainClass interface into the PersistentEntity interface

Since:
1.0

Constructor Summary
GrailsDomainClassPersistentEntity(org.codehaus.groovy.grails.commons.GrailsDomainClass domainClass, GrailsDomainClassMappingContext mappingContext)
           
 
Method Summary
 java.util.List<org.grails.datastore.mapping.model.types.Association> getAssociations()
           
 java.lang.String getDecapitalizedName()
           
 java.lang.String getDiscriminator()
           
 org.codehaus.groovy.grails.commons.GrailsDomainClass getDomainClass()
           
 org.grails.datastore.mapping.model.PersistentProperty getIdentity()
           
 java.lang.Class getJavaClass()
           
 org.grails.datastore.mapping.model.ClassMapping getMapping()
           
 org.grails.datastore.mapping.model.MappingContext getMappingContext()
           
 java.lang.String getName()
           
 org.grails.datastore.mapping.model.PersistentEntity getParentEntity()
           
 java.util.List<org.grails.datastore.mapping.model.PersistentProperty> getPersistentProperties()
           
 java.util.List<java.lang.String> getPersistentPropertyNames()
           
 org.grails.datastore.mapping.model.PersistentProperty getPropertyByName(java.lang.String name)
           
 org.grails.datastore.mapping.model.PersistentEntity getRootEntity()
           
 org.grails.datastore.mapping.model.PersistentProperty getVersion()
           
 boolean hasProperty(java.lang.String name, java.lang.Class type)
           
 void initialize()
           
 boolean isExternal()
           
 boolean isIdentityName(java.lang.String propertyName)
           
 boolean isInitialized()
           
 boolean isInstance(java.lang.Object obj)
           
 boolean isOwningEntity(org.grails.datastore.mapping.model.PersistentEntity owner)
           
 boolean isRoot()
           
 boolean isVersioned()
           
 java.lang.Object newInstance()
           
 void setExternal(boolean external)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GrailsDomainClassPersistentEntity

public GrailsDomainClassPersistentEntity(org.codehaus.groovy.grails.commons.GrailsDomainClass domainClass,
                                         GrailsDomainClassMappingContext mappingContext)
Method Detail

getDomainClass

public org.codehaus.groovy.grails.commons.GrailsDomainClass getDomainClass()
Returns:
The wrapped GrailsDomainClass instance

isInitialized

public boolean isInitialized()
Specified by:
isInitialized in interface org.grails.datastore.mapping.model.lifecycle.Initializable

initialize

public void initialize()
Specified by:
initialize in interface org.grails.datastore.mapping.model.lifecycle.Initializable

getName

public java.lang.String getName()
Specified by:
getName in interface org.grails.datastore.mapping.model.PersistentEntity

getIdentity

public org.grails.datastore.mapping.model.PersistentProperty getIdentity()
Specified by:
getIdentity in interface org.grails.datastore.mapping.model.PersistentEntity

getVersion

public org.grails.datastore.mapping.model.PersistentProperty getVersion()
Specified by:
getVersion in interface org.grails.datastore.mapping.model.PersistentEntity

isVersioned

public boolean isVersioned()
Specified by:
isVersioned in interface org.grails.datastore.mapping.model.PersistentEntity

getPersistentProperties

public java.util.List<org.grails.datastore.mapping.model.PersistentProperty> getPersistentProperties()
Specified by:
getPersistentProperties in interface org.grails.datastore.mapping.model.PersistentEntity

getAssociations

public java.util.List<org.grails.datastore.mapping.model.types.Association> getAssociations()
Specified by:
getAssociations in interface org.grails.datastore.mapping.model.PersistentEntity

getPropertyByName

public org.grails.datastore.mapping.model.PersistentProperty getPropertyByName(java.lang.String name)
Specified by:
getPropertyByName in interface org.grails.datastore.mapping.model.PersistentEntity

getJavaClass

public java.lang.Class getJavaClass()
Specified by:
getJavaClass in interface org.grails.datastore.mapping.model.PersistentEntity

isInstance

public boolean isInstance(java.lang.Object obj)
Specified by:
isInstance in interface org.grails.datastore.mapping.model.PersistentEntity

getMapping

public org.grails.datastore.mapping.model.ClassMapping getMapping()
Specified by:
getMapping in interface org.grails.datastore.mapping.model.PersistentEntity

newInstance

public java.lang.Object newInstance()
Specified by:
newInstance in interface org.grails.datastore.mapping.model.PersistentEntity

getPersistentPropertyNames

public java.util.List<java.lang.String> getPersistentPropertyNames()
Specified by:
getPersistentPropertyNames in interface org.grails.datastore.mapping.model.PersistentEntity

getDecapitalizedName

public java.lang.String getDecapitalizedName()
Specified by:
getDecapitalizedName in interface org.grails.datastore.mapping.model.PersistentEntity

isOwningEntity

public boolean isOwningEntity(org.grails.datastore.mapping.model.PersistentEntity owner)
Specified by:
isOwningEntity in interface org.grails.datastore.mapping.model.PersistentEntity

getParentEntity

public org.grails.datastore.mapping.model.PersistentEntity getParentEntity()
Specified by:
getParentEntity in interface org.grails.datastore.mapping.model.PersistentEntity

getRootEntity

public org.grails.datastore.mapping.model.PersistentEntity getRootEntity()
Specified by:
getRootEntity in interface org.grails.datastore.mapping.model.PersistentEntity

isRoot

public boolean isRoot()
Specified by:
isRoot in interface org.grails.datastore.mapping.model.PersistentEntity

getDiscriminator

public java.lang.String getDiscriminator()
Specified by:
getDiscriminator in interface org.grails.datastore.mapping.model.PersistentEntity

getMappingContext

public org.grails.datastore.mapping.model.MappingContext getMappingContext()
Specified by:
getMappingContext in interface org.grails.datastore.mapping.model.PersistentEntity

hasProperty

public boolean hasProperty(java.lang.String name,
                           java.lang.Class type)
Specified by:
hasProperty in interface org.grails.datastore.mapping.model.PersistentEntity

isIdentityName

public boolean isIdentityName(java.lang.String propertyName)
Specified by:
isIdentityName in interface org.grails.datastore.mapping.model.PersistentEntity

isExternal

public boolean isExternal()
Specified by:
isExternal in interface org.grails.datastore.mapping.model.PersistentEntity

setExternal

public void setExternal(boolean external)
Specified by:
setExternal in interface org.grails.datastore.mapping.model.PersistentEntity