Class JPATaskExecDAO
- java.lang.Object
-
- org.apache.syncope.core.persistence.jpa.dao.AbstractDAO<TaskExec<?>>
-
- org.apache.syncope.core.persistence.jpa.dao.JPATaskExecDAO
-
- All Implemented Interfaces:
DAO<TaskExec<?>>
,TaskExecDAO
public class JPATaskExecDAO extends AbstractDAO<TaskExec<?>> implements TaskExecDAO
-
-
Field Summary
Fields Modifier and Type Field Description protected TaskDAO
taskDAO
protected TaskUtilsFactory
taskUtilsFactory
-
Fields inherited from class org.apache.syncope.core.persistence.jpa.dao.AbstractDAO
LOG
-
-
Constructor Summary
Constructors Constructor Description JPATaskExecDAO(TaskDAO taskDAO, TaskUtilsFactory taskUtilsFactory)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
count(Task<?> task, OffsetDateTime before, OffsetDateTime after)
<T extends Task<T>>
voiddelete(TaskType taskType, String key)
<T extends Task<T>>
voiddelete(TaskExec<T> execution)
Optional<TaskExec<?>>
find(String key)
<T extends Task<T>>
TaskExec<T>find(TaskType type, String key)
List<TaskExec<?>>
findAll(Task<?> task, OffsetDateTime before, OffsetDateTime after, int page, int itemsPerPage, List<OrderByClause> orderByClauses)
protected TaskExec<?>
findLatest(TaskType type, Task<?> task, String field)
TaskExec<?>
findLatestEnded(TaskType type, Task<?> task)
TaskExec<?>
findLatestStarted(TaskType type, Task<?> task)
List<TaskExec<?>>
findRecent(int max)
protected <T extends Task<T>>
List<TaskExec<T>>findRecent(TaskType type, int max)
protected StringBuilder
query(StringBuilder select, Task<?> task, OffsetDateTime before, OffsetDateTime after)
<T extends Task<T>>
TaskExec<T>save(TaskExec<T> execution)
<T extends Task<T>>
voidsaveAndAdd(TaskType taskType, String taskKey, TaskExec<T> execution)
protected String
toOrderByStatement(List<OrderByClause> orderByClauses)
-
Methods inherited from class org.apache.syncope.core.persistence.jpa.dao.AbstractDAO
detach, entityManager, entityManagerFactory, isOracle, refresh
-
-
-
-
Field Detail
-
taskDAO
protected final TaskDAO taskDAO
-
taskUtilsFactory
protected final TaskUtilsFactory taskUtilsFactory
-
-
Constructor Detail
-
JPATaskExecDAO
public JPATaskExecDAO(TaskDAO taskDAO, TaskUtilsFactory taskUtilsFactory)
-
-
Method Detail
-
find
public <T extends Task<T>> TaskExec<T> find(TaskType type, String key)
- Specified by:
find
in interfaceTaskExecDAO
-
find
public Optional<TaskExec<?>> find(String key)
- Specified by:
find
in interfaceTaskExecDAO
-
findRecent
public List<TaskExec<?>> findRecent(int max)
- Specified by:
findRecent
in interfaceTaskExecDAO
-
findLatestStarted
public TaskExec<?> findLatestStarted(TaskType type, Task<?> task)
- Specified by:
findLatestStarted
in interfaceTaskExecDAO
-
findLatestEnded
public TaskExec<?> findLatestEnded(TaskType type, Task<?> task)
- Specified by:
findLatestEnded
in interfaceTaskExecDAO
-
query
protected StringBuilder query(StringBuilder select, Task<?> task, OffsetDateTime before, OffsetDateTime after)
-
count
public int count(Task<?> task, OffsetDateTime before, OffsetDateTime after)
- Specified by:
count
in interfaceTaskExecDAO
-
toOrderByStatement
protected String toOrderByStatement(List<OrderByClause> orderByClauses)
-
findAll
public List<TaskExec<?>> findAll(Task<?> task, OffsetDateTime before, OffsetDateTime after, int page, int itemsPerPage, List<OrderByClause> orderByClauses)
- Specified by:
findAll
in interfaceTaskExecDAO
-
save
@Transactional(rollbackFor=java.lang.Throwable.class) public <T extends Task<T>> TaskExec<T> save(TaskExec<T> execution)
- Specified by:
save
in interfaceTaskExecDAO
-
saveAndAdd
@Transactional(rollbackFor=java.lang.Throwable.class) public <T extends Task<T>> void saveAndAdd(TaskType taskType, String taskKey, TaskExec<T> execution)
- Specified by:
saveAndAdd
in interfaceTaskExecDAO
-
delete
public <T extends Task<T>> void delete(TaskType taskType, String key)
- Specified by:
delete
in interfaceTaskExecDAO
-
delete
public <T extends Task<T>> void delete(TaskExec<T> execution)
- Specified by:
delete
in interfaceTaskExecDAO
-
-