E - public abstract class AuditDao<E> extends BasicDao<E>
| Constructor and Description |
|---|
AuditDao(Class<?> entityClass,
Auditor auditor,
SessionConfigAbstract sessionConfig)
Default constructor.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object obj) |
int |
hashCode() |
boolean |
remove(LogicDeletable entity,
boolean logical)
Remove a entity setting the deleted attribute with true.
|
boolean |
save(Entitable entity)
Insert or update a entity
|
String |
toString() |
public AuditDao(Class<?> entityClass, Auditor auditor, SessionConfigAbstract sessionConfig)
entityClass - inform the class of the entityauditor - informs the entity that implements auditor interfacesessionConfig - set the class that implements the Hibernate session
factory configurationpublic boolean save(Entitable entity) throws org.hibernate.HibernateException, Exception
Savablepublic boolean remove(LogicDeletable entity, boolean logical) throws org.hibernate.exception.ConstraintViolationException, org.hibernate.HibernateException, Exception
Removableremove in interface Removableremove in class BasicDao<E>entity - the entity that will be removedlogical - sets true if this remove action is of the logical wayorg.hibernate.exception.ConstraintViolationExceptionorg.hibernate.HibernateExceptionExceptionCopyright © 2016. All rights reserved.