Class AuditEventDaoImpl
- java.lang.Object
-
- ubic.gemma.persistence.service.AbstractDao<AuditEvent>
-
- ubic.gemma.persistence.service.common.auditAndSecurity.AuditEventDaoImpl
-
- All Implemented Interfaces:
BaseDao<AuditEvent>,AuditEventDao
@Repository public class AuditEventDaoImpl extends AbstractDao<AuditEvent> implements AuditEventDao
- Author:
- pavlidis
- See Also:
AuditEvent
-
-
Field Summary
-
Fields inherited from class ubic.gemma.persistence.service.AbstractDao
elementClass, log
-
-
Constructor Summary
Constructors Constructor Description AuditEventDaoImpl(SessionFactory sessionFactory)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Map<Auditable,AuditEvent>getCreateEvents(Collection<? extends Auditable> auditables)List<AuditEvent>getEvents(Auditable auditable)AuditEventgetLastEvent(Auditable auditable, Class<? extends AuditEventType> type)AuditEventgetLastEvent(Auditable auditable, Class<? extends AuditEventType> type, Collection<Class<? extends AuditEventType>> excludedTypes)Obtain the latestAuditEventof a specified type, excluding a certain number of types.Map<Class<? extends AuditEventType>,Map<Auditable,AuditEvent>>getLastEventsByType(Collection<? extends Auditable> auditables, Collection<Class<? extends AuditEventType>> types)Collection<Auditable>getNewSinceDate(Date date)Note that this only returns selected classes of auditables.Collection<Auditable>getUpdatedSinceDate(Date date)Note that this only returns selected classes of auditables.booleanhasEvent(Auditable a, Class<? extends AuditEventType> type)voidretainHavingEvent(Collection<? extends Auditable> a, Class<? extends AuditEventType> type)voidretainLackingEvent(Collection<? extends Auditable> a, Class<? extends AuditEventType> type)-
Methods inherited from class ubic.gemma.persistence.service.AbstractDao
countAll, create, create, find, findByProperty, findByPropertyIn, findOneByProperty, findOrCreate, getBatchSize, getElementClass, getIdentifierPropertyName, getSessionFactory, load, load, loadAll, loadReference, loadReference, remove, remove, remove, save, save, update, update
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface ubic.gemma.persistence.service.BaseDao
countAll, create, create, find, findOrCreate, getElementClass, getIdentifierPropertyName, load, load, loadAll, loadReference, loadReference, remove, remove, remove, save, save, update, update
-
-
-
-
Constructor Detail
-
AuditEventDaoImpl
@Autowired public AuditEventDaoImpl(SessionFactory sessionFactory)
-
-
Method Detail
-
getEvents
public List<AuditEvent> getEvents(Auditable auditable)
- Specified by:
getEventsin interfaceAuditEventDao- Parameters:
auditable- auditable- Returns:
- events for the given auditable.
-
getLastEvent
public AuditEvent getLastEvent(Auditable auditable, Class<? extends AuditEventType> type)
- Specified by:
getLastEventin interfaceAuditEventDao- Parameters:
auditable- auditabletype- type- Returns:
- the last AuditEvent of the specified type from the given auditable.
-
getLastEvent
public AuditEvent getLastEvent(Auditable auditable, Class<? extends AuditEventType> type, Collection<Class<? extends AuditEventType>> excludedTypes)
Description copied from interface:AuditEventDaoObtain the latestAuditEventof a specified type, excluding a certain number of types.- Specified by:
getLastEventin interfaceAuditEventDao
-
getLastEventsByType
public Map<Class<? extends AuditEventType>,Map<Auditable,AuditEvent>> getLastEventsByType(Collection<? extends Auditable> auditables, Collection<Class<? extends AuditEventType>> types)
- Specified by:
getLastEventsByTypein interfaceAuditEventDao
-
getNewSinceDate
public Collection<Auditable> getNewSinceDate(Date date)
Note that this only returns selected classes of auditables.- Specified by:
getNewSinceDatein interfaceAuditEventDao- Parameters:
date- date- Returns:
- Collection of Auditables
- See Also:
AuditEventDao.getNewSinceDate(java.util.Date)
-
getUpdatedSinceDate
public Collection<Auditable> getUpdatedSinceDate(Date date)
Note that this only returns selected classes of auditables.- Specified by:
getUpdatedSinceDatein interfaceAuditEventDao- Parameters:
date- date- Returns:
- Collection of Auditables
- See Also:
AuditEventDao.getUpdatedSinceDate(Date)
-
hasEvent
public boolean hasEvent(Auditable a, Class<? extends AuditEventType> type)
- Specified by:
hasEventin interfaceAuditEventDao
-
retainHavingEvent
public void retainHavingEvent(Collection<? extends Auditable> a, Class<? extends AuditEventType> type)
- Specified by:
retainHavingEventin interfaceAuditEventDao
-
retainLackingEvent
public void retainLackingEvent(Collection<? extends Auditable> a, Class<? extends AuditEventType> type)
- Specified by:
retainLackingEventin interfaceAuditEventDao
-
getCreateEvents
public Map<Auditable,AuditEvent> getCreateEvents(Collection<? extends Auditable> auditables)
- Specified by:
getCreateEventsin interfaceAuditEventDao
-
-