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)
AuditEvent
getLastEvent(Auditable auditable, Class<? extends AuditEventType> type)
AuditEvent
getLastEvent(Auditable auditable, Class<? extends AuditEventType> type, Collection<Class<? extends AuditEventType>> excludedTypes)
Obtain the latestAuditEvent
of 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.boolean
hasEvent(Auditable a, Class<? extends AuditEventType> type)
void
retainHavingEvent(Collection<? extends Auditable> a, Class<? extends AuditEventType> type)
void
retainLackingEvent(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:
getEvents
in interfaceAuditEventDao
- Parameters:
auditable
- auditable- Returns:
- events for the given auditable.
-
getLastEvent
public AuditEvent getLastEvent(Auditable auditable, Class<? extends AuditEventType> type)
- Specified by:
getLastEvent
in 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:AuditEventDao
Obtain the latestAuditEvent
of a specified type, excluding a certain number of types.- Specified by:
getLastEvent
in interfaceAuditEventDao
-
getLastEventsByType
public Map<Class<? extends AuditEventType>,Map<Auditable,AuditEvent>> getLastEventsByType(Collection<? extends Auditable> auditables, Collection<Class<? extends AuditEventType>> types)
- Specified by:
getLastEventsByType
in interfaceAuditEventDao
-
getNewSinceDate
public Collection<Auditable> getNewSinceDate(Date date)
Note that this only returns selected classes of auditables.- Specified by:
getNewSinceDate
in 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:
getUpdatedSinceDate
in 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:
hasEvent
in interfaceAuditEventDao
-
retainHavingEvent
public void retainHavingEvent(Collection<? extends Auditable> a, Class<? extends AuditEventType> type)
- Specified by:
retainHavingEvent
in interfaceAuditEventDao
-
retainLackingEvent
public void retainLackingEvent(Collection<? extends Auditable> a, Class<? extends AuditEventType> type)
- Specified by:
retainLackingEvent
in interfaceAuditEventDao
-
getCreateEvents
public Map<Auditable,AuditEvent> getCreateEvents(Collection<? extends Auditable> auditables)
- Specified by:
getCreateEvents
in interfaceAuditEventDao
-
-