org.codehaus.groovy.grails.scaffolding
Class GrailsScaffoldDomain
java.lang.Object
org.codehaus.groovy.grails.scaffolding.DefaultScaffoldDomain
org.codehaus.groovy.grails.scaffolding.GrailsScaffoldDomain
- All Implemented Interfaces:
- ScaffoldDomain
public class GrailsScaffoldDomain
- extends DefaultScaffoldDomain
- implements ScaffoldDomain
Extends the default domain to delegate to Grails specific dynamic methods
- Since:
- 23-Feb-2006
- Author:
- Graeme Rocher
Methods inherited from class org.codehaus.groovy.grails.scaffolding.DefaultScaffoldDomain |
find, find, find, find, find, find, get, getIdentityPropertyName, getName, getPersistentClass, getPluralName, getSingularName, list, list, list, list, list, newInstance, setIdentityPropertyName, setPersistentClass, setSessionFactory, setSessionFactory, setValidator |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.codehaus.groovy.grails.scaffolding.ScaffoldDomain |
find, find, find, find, find, find, get, getIdentityPropertyName, getName, getPersistentClass, getPluralName, getSingularName, list, list, list, list, list, newInstance, setIdentityPropertyName, setPersistentClass, setSessionFactory, setValidator |
GrailsScaffoldDomain
public GrailsScaffoldDomain(Class persistentClass,
org.hibernate.SessionFactory sessionFactory)
save
public boolean save(Object domainObject,
ScaffoldCallback callback)
- Description copied from interface:
ScaffoldDomain
- Saves an instance of the persistent class using the specified properties
- Specified by:
save
in interface ScaffoldDomain
- Overrides:
save
in class DefaultScaffoldDomain
- Parameters:
domainObject
- The domain object to savecallback
- Any validation errors that may have occured during saving
- Returns:
- The saved instance or null if save was unsuccessful
update
public boolean update(Object domainObject,
ScaffoldCallback callback)
- Description copied from interface:
ScaffoldDomain
- Updates an existing instance
- Specified by:
update
in interface ScaffoldDomain
- Overrides:
update
in class DefaultScaffoldDomain
- Returns:
- The updated instance
delete
public Object delete(Serializable id)
- Specified by:
delete
in interface ScaffoldDomain
- Overrides:
delete
in class DefaultScaffoldDomain
- Returns:
- The instance identified by id, if it existed
Copyright (c) 2005-2006 The Grails project