|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.davesag.generica.peer.PersistablePeer
This peer manipulates Persistable s using hibernate.
| Constructor Summary | |
PersistablePeer()
|
|
| Method Summary | |
static void |
delete(Session sess,
Persistable bean)
Delete this bean. |
static boolean |
exists(Session sess,
String namefield,
String name,
String classname)
A quick tests to determine if there is a persistable object with the given name, using the supplied namefield and classname as qualifiers of the search. |
static Persistable |
load(Session sess,
String namefield,
String name,
String classname)
Load a persistable object with the given name, using the supplied namefield and classname as qualifiers of the search. |
static Long |
save(Session sess,
Persistable bean)
Save this persistable object. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public PersistablePeer()
| Method Detail |
public static Long save(Session sess,
Persistable bean)
sess - The Session to use to save the object. The session will be
flushed but not closed.bean - The persistable bean.
RuntimeException - if the params were invalid.
public static void delete(Session sess,
Persistable bean)
sess - The Session to use to delete the bean. The session will be
flushed but not closed.bean - The persistable object.
RuntimeException - if the params were invalid, or if an internal
exception was encountered.
public static boolean exists(Session sess,
String namefield,
String name,
String classname)
load method to make
sense.
sess - The Session to use to query for the persistable
object.namefield - The name of the bean property that holds the name to
test.name - The name The actual name we are looking for.classname - The fully qualified class of the persistable bean to
test for.
RuntimeException - if the params were invalid, or if there was a
HibernateException.
public static Persistable load(Session sess,
String namefield,
String name,
String classname)
namefield:name pair are unique to this class.
sess - The Session to use to query for the persistable
object.namefield - The name of the bean property that holds the name to
test.name - The name The actual name we are looking for.classname - The fully qualified class of the persistable bean to
test for.
RuntimeException - if the params were invalid, or if
HibernateException.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||