public class ProcessDAO extends CommonDAO
CommonDAO.ObjectExtractor<T>, CommonDAO.RecordUpdater<T extends Id>| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
LINKED_PROCESS |
static int |
QUEUE_TIMEOUT_DEFAULT |
static java.lang.String |
QUEUE_TIMEOUT_MESSAGE |
static java.lang.String |
QUEUE_TIMEOUT_MESSAGE_KEY |
static java.lang.String |
QUEUE_TIMEOUT_SECONDS_KEY |
con, dateFormat_DDMMYYYY, dateFormat_DDMMYYYY_HHMM, log, SQL_AND, SQL_DELETE, SQL_DESC, SQL_FROM, SQL_GROUP_BY, SQL_INNER_JOIN, SQL_INSERT, SQL_INSERT_IGNORE, SQL_LEFT_JOIN, SQL_LEFT_OUTER_JOIN, SQL_LIMIT, SQL_ON_DUP_KEY_UPDATE, SQL_OR, SQL_ORDER_BY, SQL_REPLACE, SQL_SELECT, SQL_SELECT_ALL_FROM, SQL_SELECT_COUNT_ROWS, SQL_SET, SQL_UPDATE, SQL_WHERE| Constructor and Description |
|---|
ProcessDAO(java.sql.Connection con) |
ProcessDAO(java.sql.Connection con,
boolean history) |
ProcessDAO(java.sql.Connection con,
boolean history,
int userId) |
| Modifier and Type | Method and Description |
|---|---|
void |
addDateFilter(DynActionForm form,
java.lang.StringBuilder wherePart,
java.lang.String paramPrefix,
java.lang.String column,
java.util.Date dateFromOnEmptyValue) |
void |
addDateTimeFilter(DynActionForm form,
java.lang.StringBuilder wherePart,
java.lang.String paramPrefix,
java.lang.String paramId,
FilterParam filter) |
void |
deleteProcess(int processId) |
java.util.Set<Process> |
findProcessAtAddress(int houseId,
int processTypeId,
java.util.List<java.lang.Integer> excludedStatuses) |
java.util.Set<Process> |
findProcesses(int processType,
java.util.Set<java.lang.Integer> statuses,
int limit) |
SearchResult<Process> |
findProcessesAtRegexTextParam(int parameterId,
java.lang.String parameterValue,
java.util.Set<java.lang.Integer> typesFilter,
SearchResult<Process> result)
Поиск процессов по похожему значению текстового параметра
|
SearchResult<Process> |
findProcessesAtTextParam(int parameterId,
java.lang.String parameterValue,
java.util.Set<java.lang.Integer> typesFilter,
SearchResult<Process> result)
Поиск процессов по точному значению текстового параметра
|
java.util.Set<Process> |
findProcessesByCreator(int processType,
int userId,
int statusId,
int limit) |
java.util.Set<Process> |
findProcessesByCreator(int processType,
int userId,
java.util.Set<java.lang.Integer> statusIds,
int limit) |
SearchResult<Process> |
findProcessesByDateAtDateTimeParam(int parameterId,
java.util.Date parameterValue,
java.util.Set<java.lang.Integer> typesFilter,
SearchResult<Process> result)
Поиск процессов по точному значению календарного параметра
|
java.util.Set<Process> |
findProcessesByExecutorUserId(int processType,
int roleId,
int userId,
java.util.Set<java.lang.Integer> statusIds,
int limit)
Поиск процессов по userId исполнителя
|
java.util.Set<Process> |
findProcessesByListParam(int processType,
int status,
int paramId,
java.util.List<java.lang.Integer> value) |
SearchResult<Process> |
findProcessesByPhoneValue(java.util.Set<java.lang.Integer> processTypes,
java.util.Set<java.lang.Integer> statuses,
java.util.Set<java.lang.Integer> paramIds,
ParameterPhoneValue phoneValue) |
SearchResult<Process> |
findProcessesByTypesAndStatuses(java.util.Set<java.lang.Integer> processTypes,
java.util.Set<java.lang.Integer> statuses,
SearchResult<Process> result) |
java.lang.String |
getCountQuery(Queue queue,
DynActionForm form) |
Process |
getProcess(int id) |
java.util.Set<ProcessExecutor> |
getProcessExecutors(int processId) |
static Process |
getProcessFromRs(java.sql.ResultSet rs) |
static Process |
getProcessFromRs(java.sql.ResultSet rs,
java.lang.String prefix) |
java.util.Set<ProcessGroup> |
getProcessGroups(int processId) |
java.util.List<Process> |
getProcessList(java.util.Collection<java.lang.Integer> processIds) |
java.util.List<Process> |
getProcessListByType(java.util.Collection<java.lang.Integer> typeIds,
java.lang.Boolean open) |
void |
processIdInvert(Process process) |
void |
searchProcess(SearchResult<java.lang.Object[]> searchResult,
java.util.List<java.lang.String> aggregateValues,
Queue queue,
DynActionForm form) |
void |
searchProcessListByAddress(SearchResult<AddressSearchedObject<Process>> searchResult,
java.util.Set<java.lang.Integer> typeIds,
java.util.Set<java.lang.Integer> addressParamIdList,
int houseId,
java.lang.String houseFlat,
java.lang.String houseRoom)
Выбирает процессы по адресному параметру.
|
void |
searchProcessListForMessage(SearchResult<Process> searchResult,
java.lang.String from,
java.util.List<CommonObjectLink> links,
java.lang.Boolean open)
Выбор списка процесс.
|
void |
searchProcessListForUser(SearchResult<Process> searchResult,
int userId,
java.lang.Boolean open)
Выбор списка процесс.
|
void |
searchProcessLog(ProcessType processType,
int processId,
SearchResult<EntityLogItem> result) |
void |
updateProcess(Process process) |
void |
updateProcessExecutors(int processId,
java.util.Set<java.lang.Integer> executorIds)
Deprecated.
|
void |
updateProcessExecutors(java.util.Set<ProcessExecutor> processExecutors,
int processId) |
void |
updateProcessExecutors(java.util.Set<ProcessExecutor> processExecutors,
int processId,
boolean needClearGroups) |
void |
updateProcessGroups(java.util.Set<ProcessGroup> processGroups,
int processId) |
void |
updateProcessGroups(java.util.Set<ProcessGroup> processGroups,
int processId,
boolean needDeleteOld) |
void |
updateProcessOrder(int processId,
int newOrder) |
deleteById, execute, execute, execute, executeInsert, executeUpdate, getById, getFoundRows, getFoundRows, getGroupedIds, getGroupedIds, getIds, getIds, getLikePattern, getLikePatternEnd, getLikePatternStart, getLikePatternSub, getMySQLLimit, getPeriodSql, lastInsertId, setPeriodParamValue, setRecordCount, sqlToBgException, update, updateColumn, updateIds, updateIdspublic static final java.lang.String LINKED_PROCESS
public static final java.lang.String QUEUE_TIMEOUT_MESSAGE
public static final java.lang.String QUEUE_TIMEOUT_MESSAGE_KEY
public static final java.lang.String QUEUE_TIMEOUT_SECONDS_KEY
public static final int QUEUE_TIMEOUT_DEFAULT
public ProcessDAO(java.sql.Connection con)
public ProcessDAO(java.sql.Connection con,
boolean history)
public ProcessDAO(java.sql.Connection con,
boolean history,
int userId)
public static Process getProcessFromRs(java.sql.ResultSet rs, java.lang.String prefix) throws java.sql.SQLException
java.sql.SQLExceptionpublic static Process getProcessFromRs(java.sql.ResultSet rs) throws java.sql.SQLException
java.sql.SQLExceptionpublic java.util.Set<ProcessGroup> getProcessGroups(int processId)
public java.util.Set<ProcessExecutor> getProcessExecutors(int processId)
public void searchProcess(SearchResult<java.lang.Object[]> searchResult, java.util.List<java.lang.String> aggregateValues, Queue queue, DynActionForm form) throws BGException
BGExceptionpublic java.lang.String getCountQuery(Queue queue, DynActionForm form) throws BGException
BGExceptionpublic void addDateTimeFilter(DynActionForm form, java.lang.StringBuilder wherePart, java.lang.String paramPrefix, java.lang.String paramId, FilterParam filter)
public void addDateFilter(DynActionForm form, java.lang.StringBuilder wherePart, java.lang.String paramPrefix, java.lang.String column, java.util.Date dateFromOnEmptyValue)
public Process getProcess(int id) throws BGException
BGExceptionpublic java.util.List<Process> getProcessListByType(java.util.Collection<java.lang.Integer> typeIds, java.lang.Boolean open) throws BGException
BGExceptionpublic java.util.List<Process> getProcessList(java.util.Collection<java.lang.Integer> processIds) throws BGException
BGExceptionpublic void updateProcessGroups(java.util.Set<ProcessGroup> processGroups, int processId) throws BGException
BGExceptionpublic void updateProcessGroups(java.util.Set<ProcessGroup> processGroups, int processId, boolean needDeleteOld) throws BGException
BGException@Deprecated
public void updateProcessExecutors(int processId,
java.util.Set<java.lang.Integer> executorIds)
throws BGException
updateProcessExecutors(Set, int).BGExceptionpublic void updateProcessExecutors(java.util.Set<ProcessExecutor> processExecutors, int processId) throws BGException
BGExceptionpublic void updateProcessExecutors(java.util.Set<ProcessExecutor> processExecutors, int processId, boolean needClearGroups) throws BGException
BGExceptionpublic void updateProcess(Process process) throws BGException
BGExceptionpublic void deleteProcess(int processId)
throws BGException
BGExceptionpublic void processIdInvert(Process process) throws BGException
BGExceptionpublic void searchProcessListByAddress(SearchResult<AddressSearchedObject<Process>> searchResult, java.util.Set<java.lang.Integer> typeIds, java.util.Set<java.lang.Integer> addressParamIdList, int houseId, java.lang.String houseFlat, java.lang.String houseRoom) throws BGException
searchResult - addressParamIdList - houseId - код домаhouseFlat - квартираhouseRoom - комнатаjava.sql.SQLExceptionBGExceptionpublic void searchProcessListForMessage(SearchResult<Process> searchResult, java.lang.String from, java.util.List<CommonObjectLink> links, java.lang.Boolean open) throws BGException
searchResult - from - java.sql.SQLExceptionBGExceptionpublic void searchProcessListForUser(SearchResult<Process> searchResult, int userId, java.lang.Boolean open) throws BGException
searchResult - BGExceptionpublic void searchProcessLog(ProcessType processType, int processId, SearchResult<EntityLogItem> result) throws BGException
BGExceptionpublic java.util.Set<Process> findProcessesByListParam(int processType, int status, int paramId, java.util.List<java.lang.Integer> value) throws BGException
BGExceptionpublic java.util.Set<Process> findProcessesByCreator(int processType, int userId, int statusId, int limit)
public java.util.Set<Process> findProcessesByExecutorUserId(int processType, int roleId, int userId, java.util.Set<java.lang.Integer> statusIds, int limit)
processType - тип искомых процессовroleId - роль исполнителя, в случае отрицательного значения параметр в запросе не участвуетuserId - ID пользователя исполнителяstatusIds - список допустимых ID статусовlimit - количество записейpublic java.util.Set<Process> findProcessesByCreator(int processType, int userId, java.util.Set<java.lang.Integer> statusIds, int limit)
public java.util.Set<Process> findProcesses(int processType, java.util.Set<java.lang.Integer> statuses, int limit)
public java.util.Set<Process> findProcessAtAddress(int houseId, int processTypeId, java.util.List<java.lang.Integer> excludedStatuses) throws BGException
BGExceptionpublic SearchResult<Process> findProcessesAtTextParam(int parameterId, java.lang.String parameterValue, java.util.Set<java.lang.Integer> typesFilter, SearchResult<Process> result)
parameterId - ID параметраparameterValue - предполагаемое значение параметраtypesFilter - фильтр по типам процессов, если пустой, то тип процесса будет игнорироватьсяpublic SearchResult<Process> findProcessesAtRegexTextParam(int parameterId, java.lang.String parameterValue, java.util.Set<java.lang.Integer> typesFilter, SearchResult<Process> result)
parameterId - ID параметраparameterValue - предполагаемое значение параметраtypesFilter - фильтр по типам процессов, если пустой, то тип процесса будет игнорироватьсяpublic SearchResult<Process> findProcessesByDateAtDateTimeParam(int parameterId, java.util.Date parameterValue, java.util.Set<java.lang.Integer> typesFilter, SearchResult<Process> result)
parameterId - ID параметраparameterValue - предполагаемое значение параметраtypesFilter - фильтр по типам процессов, если пустой, то тип процесса будет игнорироватьсяpublic void updateProcessOrder(int processId,
int newOrder)
public SearchResult<Process> findProcessesByTypesAndStatuses(java.util.Set<java.lang.Integer> processTypes, java.util.Set<java.lang.Integer> statuses, SearchResult<Process> result)
public SearchResult<Process> findProcessesByPhoneValue(java.util.Set<java.lang.Integer> processTypes, java.util.Set<java.lang.Integer> statuses, java.util.Set<java.lang.Integer> paramIds, ParameterPhoneValue phoneValue)