public interface Persister
| Modifier and Type | Method and Description |
|---|---|
int |
delete(Class<?> beanType,
Object id,
Transaction transaction)
Delete a bean given it's type and id value.
|
void |
delete(Object entityBean,
Transaction t)
Delete the bean.
|
void |
deleteMany(Class<?> beanType,
Collection<?> ids,
Transaction transaction)
Delete multiple beans given a collection of Id values.
|
int |
deleteManyToManyAssociations(Object ownerBean,
String propertyName,
Transaction t)
Delete the associations of a ManyToMany given the owner bean and the property name of the ManyToMany.
|
int |
executeCallable(CallableSql callable,
Transaction t)
Execute the CallableSql.
|
int |
executeOrmUpdate(Update<?> update,
Transaction t)
Execute the Update.
|
int |
executeSqlUpdate(SqlUpdate update,
Transaction t)
Execute the UpdateSql.
|
void |
forceInsert(Object entityBean,
Transaction t)
Force an Insert using the given bean.
|
void |
forceUpdate(Object entityBean,
Set<String> updateProps,
Transaction t,
boolean deleteMissingChildren,
boolean updateNullProperties)
Force an Update using the given bean.
|
void |
save(Object entityBean,
Transaction t)
Insert or update the bean depending on its state.
|
void |
saveAssociation(Object parentBean,
String propertyName,
Transaction t)
Save an association (OneToMany, ManyToOne, OneToOne or ManyToMany).
|
void |
saveManyToManyAssociations(Object ownerBean,
String propertyName,
Transaction t)
Save the associations of a ManyToMany given the owner bean and the
propertyName of the ManyToMany collection.
|
void forceUpdate(Object entityBean, Set<String> updateProps, Transaction t, boolean deleteMissingChildren, boolean updateNullProperties)
void forceInsert(Object entityBean, Transaction t)
void save(Object entityBean, Transaction t)
void saveManyToManyAssociations(Object ownerBean, String propertyName, Transaction t)
void saveAssociation(Object parentBean, String propertyName, Transaction t)
parentBean - the bean that owns the association.propertyName - the name of the property to save.t - the transaction to use.int deleteManyToManyAssociations(Object ownerBean, String propertyName, Transaction t)
int delete(Class<?> beanType, Object id, Transaction transaction)
This will also cascade delete one level of children.
void delete(Object entityBean, Transaction t)
void deleteMany(Class<?> beanType, Collection<?> ids, Transaction transaction)
int executeOrmUpdate(Update<?> update, Transaction t)
int executeSqlUpdate(SqlUpdate update, Transaction t)
int executeCallable(CallableSql callable, Transaction t)
Copyright © 2014. All Rights Reserved.