Package ru.bgcrm.dao.process
Class ProcessDAO
java.lang.Object
ru.bgcrm.dao.CommonDAO
ru.bgcrm.dao.process.ProcessDAO
-
Nested Class Summary
Nested classes/interfaces inherited from class ru.bgcrm.dao.CommonDAO
CommonDAO.ObjectExtractor<T>, CommonDAO.RecordUpdater<T extends Id> -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Stringstatic final intstatic final Stringstatic final Stringstatic final StringFields inherited from class ru.bgcrm.dao.CommonDAO
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 Summary
ConstructorsConstructorDescriptionProcessDAO(Connection con) ProcessDAO(Connection con, boolean history) ProcessDAO(Connection con, boolean history, int userId) -
Method Summary
Modifier and TypeMethodDescriptionvoidaddDateFilter(DynActionForm form, StringBuilder wherePart, String paramPrefix, String column, Date dateFromOnEmptyValue) voidaddDateTimeFilter(DynActionForm form, StringBuilder wherePart, String paramPrefix, String paramId, FilterParam filter) voiddeleteProcess(int processId) findProcessAtAddress(int houseId, int processTypeId, List<Integer> excludedStatuses) findProcesses(int processType, Set<Integer> statuses, int limit) findProcessesAtRegexTextParam(int parameterId, @NotNull String parameterValue, @NotNull Set<Integer> typesFilter, @NotNull SearchResult<Process> result) Поиск процессов по похожему значению текстового параметраfindProcessesAtTextParam(int parameterId, @NotNull String parameterValue, @NotNull Set<Integer> typesFilter, @NotNull SearchResult<Process> result) Поиск процессов по точному значению текстового параметраfindProcessesByCreator(int processType, int userId, int statusId, int limit) findProcessesByCreator(int processType, int userId, Set<Integer> statusIds, int limit) findProcessesByDateAtDateTimeParam(int parameterId, @NotNull Date parameterValue, @NotNull Set<Integer> typesFilter, @NotNull SearchResult<Process> result) Поиск процессов по точному значению календарного параметраfindProcessesByExecutorUserId(int processType, int roleId, int userId, Set<Integer> statusIds, int limit) Поиск процессов по userId исполнителяfindProcessesByListParam(int processType, int status, int paramId, List<Integer> value) findProcessesByPhoneValue(Set<Integer> processTypes, Set<Integer> statuses, Set<Integer> paramIds, ParameterPhoneValue phoneValue) findProcessesByTypesAndStatuses(Set<Integer> processTypes, Set<Integer> statuses, @NotNull SearchResult<Process> result) getCountQuery(Queue queue, DynActionForm form) getProcess(int id) getProcessExecutors(int processId) static Processstatic ProcessgetProcessFromRs(ResultSet rs, String prefix) getProcessGroups(int processId) getProcessList(Collection<Integer> processIds) getProcessListByType(Collection<Integer> typeIds, Boolean open) voidprocessIdInvert(Process process) voidsearchProcess(SearchResult<Object[]> searchResult, List<String> aggregateValues, Queue queue, DynActionForm form) voidsearchProcessListByAddress(SearchResult<AddressSearchedObject<Process>> searchResult, Set<Integer> typeIds, Set<Integer> addressParamIdList, int houseId, String houseFlat, String houseRoom) Выбирает процессы по адресному параметру.voidsearchProcessListForMessage(SearchResult<Process> searchResult, String from, List<CommonObjectLink> links, Boolean open) Выбор списка процесс.voidsearchProcessListForUser(SearchResult<Process> searchResult, int userId, Boolean open) Выбор списка процесс.voidsearchProcessLog(ProcessType processType, int processId, SearchResult<EntityLogItem> result) voidupdateProcess(Process process) voidupdateProcessExecutors(int processId, Set<Integer> executorIds) Deprecated.voidupdateProcessExecutors(Set<ProcessExecutor> processExecutors, int processId) voidupdateProcessExecutors(Set<ProcessExecutor> processExecutors, int processId, boolean needClearGroups) voidupdateProcessGroups(Set<ProcessGroup> processGroups, int processId) voidupdateProcessGroups(Set<ProcessGroup> processGroups, int processId, boolean needDeleteOld) voidupdateProcessOrder(int processId, int newOrder) Methods inherited from class ru.bgcrm.dao.CommonDAO
buildPlaceholders, deleteById, execute, execute, execute, executeBatch, executeInsert, executeUpdate, getById, getFoundRows, getFoundRows, getGroupedIds, getGroupedIds, getIds, getIds, getLikePattern, getLikePatternEnd, getLikePatternStart, getLikePatternSub, getMySQLLimit, getPeriodSql, lastInsertId, setPeriodParamValue, setRecordCount, sqlToBgException, update, updateColumn, updateIds, updateIds
-
Field Details
-
LINKED_PROCESS
- See Also:
-
QUEUE_TIMEOUT_MESSAGE
- See Also:
-
QUEUE_TIMEOUT_MESSAGE_KEY
- See Also:
-
QUEUE_TIMEOUT_SECONDS_KEY
- See Also:
-
QUEUE_TIMEOUT_DEFAULT
public static final int QUEUE_TIMEOUT_DEFAULT- See Also:
-
-
Constructor Details
-
ProcessDAO
-
ProcessDAO
-
ProcessDAO
-
-
Method Details
-
getProcessFromRs
- Throws:
SQLException
-
getProcessFromRs
- Throws:
SQLException
-
getProcessGroups
-
getProcessExecutors
-
searchProcess
public void searchProcess(SearchResult<Object[]> searchResult, List<String> aggregateValues, Queue queue, DynActionForm form) throws BGException - Throws:
BGException
-
getCountQuery
- Throws:
BGException
-
addDateTimeFilter
public void addDateTimeFilter(DynActionForm form, StringBuilder wherePart, String paramPrefix, String paramId, FilterParam filter) -
addDateFilter
public void addDateFilter(DynActionForm form, StringBuilder wherePart, String paramPrefix, String column, Date dateFromOnEmptyValue) -
getProcess
- Throws:
BGException
-
getProcessListByType
public List<Process> getProcessListByType(Collection<Integer> typeIds, Boolean open) throws BGException - Throws:
BGException
-
getProcessList
- Throws:
BGException
-
updateProcessGroups
- Throws:
BGException
-
updateProcessGroups
public void updateProcessGroups(Set<ProcessGroup> processGroups, int processId, boolean needDeleteOld) throws BGException - Throws:
BGException
-
updateProcessExecutors
@Deprecated public void updateProcessExecutors(int processId, Set<Integer> executorIds) throws BGException Deprecated.Устаревшая функция - исполнители устанавливаются без привязки к группам, привязка восстанавливается затем по членству пользователей в группах. ИспользоватьupdateProcessExecutors(Set, int).- Throws:
BGException
-
updateProcessExecutors
public void updateProcessExecutors(Set<ProcessExecutor> processExecutors, int processId) throws BGException - Throws:
BGException
-
updateProcessExecutors
public void updateProcessExecutors(Set<ProcessExecutor> processExecutors, int processId, boolean needClearGroups) throws BGException - Throws:
BGException
-
updateProcess
- Throws:
BGException
-
deleteProcess
- Throws:
BGException
-
processIdInvert
- Throws:
BGException
-
searchProcessListByAddress
public void searchProcessListByAddress(SearchResult<AddressSearchedObject<Process>> searchResult, Set<Integer> typeIds, Set<Integer> addressParamIdList, int houseId, String houseFlat, String houseRoom) throws BGException Выбирает процессы по адресному параметру.- Parameters:
searchResult-addressParamIdList-houseId- код домаhouseFlat- квартираhouseRoom- комната- Throws:
SQLExceptionBGException
-
searchProcessListForMessage
public void searchProcessListForMessage(SearchResult<Process> searchResult, String from, List<CommonObjectLink> links, Boolean open) throws BGException Выбор списка процесс.- Parameters:
searchResult-from-- Throws:
SQLExceptionBGException
-
searchProcessListForUser
public void searchProcessListForUser(SearchResult<Process> searchResult, int userId, Boolean open) throws BGException Выбор списка процесс.- Parameters:
searchResult-- Throws:
BGException
-
searchProcessLog
public void searchProcessLog(ProcessType processType, int processId, SearchResult<EntityLogItem> result) throws BGException - Throws:
BGException
-
findProcessesByListParam
public Set<Process> findProcessesByListParam(int processType, int status, int paramId, List<Integer> value) throws BGException - Throws:
BGException
-
findProcessesByCreator
-
findProcessesByExecutorUserId
public Set<Process> findProcessesByExecutorUserId(int processType, int roleId, int userId, Set<Integer> statusIds, int limit) Поиск процессов по userId исполнителя- Parameters:
processType- тип искомых процессовroleId- роль исполнителя, в случае отрицательного значения параметр в запросе не участвуетuserId- ID пользователя исполнителяstatusIds- список допустимых ID статусовlimit- количество записей
-
findProcessesByCreator
-
findProcesses
-
findProcessAtAddress
public Set<Process> findProcessAtAddress(int houseId, int processTypeId, List<Integer> excludedStatuses) throws BGException - Throws:
BGException
-
findProcessesAtTextParam
public SearchResult<Process> findProcessesAtTextParam(int parameterId, @NotNull @NotNull String parameterValue, @NotNull @NotNull Set<Integer> typesFilter, @NotNull @NotNull SearchResult<Process> result) Поиск процессов по точному значению текстового параметра- Parameters:
parameterId- ID параметраparameterValue- предполагаемое значение параметраtypesFilter- фильтр по типам процессов, если пустой, то тип процесса будет игнорироваться
-
findProcessesAtRegexTextParam
public SearchResult<Process> findProcessesAtRegexTextParam(int parameterId, @NotNull @NotNull String parameterValue, @NotNull @NotNull Set<Integer> typesFilter, @NotNull @NotNull SearchResult<Process> result) Поиск процессов по похожему значению текстового параметра- Parameters:
parameterId- ID параметраparameterValue- предполагаемое значение параметраtypesFilter- фильтр по типам процессов, если пустой, то тип процесса будет игнорироваться
-
findProcessesByDateAtDateTimeParam
public SearchResult<Process> findProcessesByDateAtDateTimeParam(int parameterId, @NotNull @NotNull Date parameterValue, @NotNull @NotNull Set<Integer> typesFilter, @NotNull @NotNull SearchResult<Process> result) Поиск процессов по точному значению календарного параметра- Parameters:
parameterId- ID параметраparameterValue- предполагаемое значение параметраtypesFilter- фильтр по типам процессов, если пустой, то тип процесса будет игнорироваться
-
updateProcessOrder
public void updateProcessOrder(int processId, int newOrder) -
findProcessesByTypesAndStatuses
public SearchResult<Process> findProcessesByTypesAndStatuses(Set<Integer> processTypes, Set<Integer> statuses, @NotNull @NotNull SearchResult<Process> result) -
findProcessesByPhoneValue
public SearchResult<Process> findProcessesByPhoneValue(Set<Integer> processTypes, Set<Integer> statuses, Set<Integer> paramIds, ParameterPhoneValue phoneValue)
-