|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface ScaffoldDomain
The main interface used by scaffolded controllers to access instances of persistent classes
| Method Summary | |
|---|---|
Object |
delete(Serializable id)
|
List |
find(String[] by,
Object[] q)
Finds all the persistent instances for the specified properties and query values |
List |
find(String[] by,
Object[] q,
int max)
|
List |
find(String[] by,
Object[] q,
int max,
int offset)
|
List |
find(String by,
Object q)
Finds all persistent instances for the specified property name and value |
List |
find(String by,
Object q,
int max)
|
List |
find(String by,
Object q,
int max,
int offset)
|
Object |
get(Serializable id)
Retrieves an persistent class instance for the specified id |
String |
getIdentityPropertyName()
|
String |
getName()
|
Class |
getPersistentClass()
Retrieves the scaffolded persistent class |
String |
getPluralName()
Returns the plural name of the domain |
String |
getSingularName()
Returns the singular name of the domain |
List |
list()
|
List |
list(int max)
|
List |
list(int max,
int offset)
|
List |
list(int max,
int offset,
String sort)
|
List |
list(int max,
int offset,
String sort,
String order)
|
Object |
newInstance()
|
boolean |
save(Object domainObject,
ScaffoldCallback callback)
Saves an instance of the persistent class using the specified properties |
void |
setIdentityPropertyName(String identityPropertyName)
Sets the name of the identity property so that type conversion can be performed |
void |
setPersistentClass(Class clazz)
Sets the persistent class used by the scaffold domain |
void |
setSessionFactory(Object sessionFactory)
Sets the session factory used by the persistent implementation |
void |
setValidator(Validator validator)
Sets the validator to use |
boolean |
update(Object domainObject,
ScaffoldCallback callback)
Updates an existing instance |
| Method Detail |
|---|
void setIdentityPropertyName(String identityPropertyName)
identityPropertyName - void setValidator(Validator validator)
validator - Class getPersistentClass()
List list()
List list(int max)
max - The maximum number of instances to return
List list(int max,
int offset)
max - The maximum number to returnoffset - The offset position
List list(int max,
int offset,
String sort)
max - The maximum number to return (Set to -1 for no maximum)offset - The offset position (Set to -1 for no offset)sort - The property name to sort by
List list(int max,
int offset,
String sort,
String order)
max - The maximum number to return (Set to -1 for no maximum)offset - The offset position (Set to -1 for no offset)order - either "ASC" for ascending or "DESC" for descendingsort - The property name to sort by
List find(String by,
Object q)
by - The property to find byq - The query criteria
List find(String by,
Object q,
int max)
max - The maximum number of results to returnfor description
List find(String by,
Object q,
int max,
int offset)
max - The maximum number of results to returnoffset - The offset positionfor description
List find(String[] by,
Object[] q)
by - The properties to find byq - The query values
List find(String[] by,
Object[] q,
int max)
max - The maximum number of results to returnfor description
List find(String[] by,
Object[] q,
int max,
int offset)
max - The maximum number of results to returnoffset - The offset positionfor description
boolean save(Object domainObject,
ScaffoldCallback callback)
domainObject - The domain object to savecallback - Any validation errors that may have occured during saving
boolean update(Object domainObject,
ScaffoldCallback callback)
callback - domainObject -
Object delete(Serializable id)
id -
Object get(Serializable id)
id -
String getPluralName()
String getSingularName()
String getIdentityPropertyName()
String getName()
Object newInstance()
void setPersistentClass(Class clazz)
clazz - The persistent classvoid setSessionFactory(Object sessionFactory)
sessionFactory - The session factory to use
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||