Class ProcessTypeDAO
java.lang.Object
ru.bgcrm.dao.CommonDAO
ru.bgcrm.dao.process.ProcessTypeDAO
-
Nested Class Summary
Nested classes/interfaces inherited from class CommonDAO
CommonDAO.ObjectExtractor<T>, CommonDAO.RecordUpdater<T> -
Field Summary
Fields inherited from class CommonDAO
con, log, SQL_AND, SQL_DELETE, SQL_DELETE_FROM, SQL_DESC, SQL_DISTINCT, SQL_FROM, SQL_GROUP_BY, SQL_INNER_JOIN, SQL_INSERT_IGNORE_INTO, SQL_INSERT_INTO, SQL_LEFT_JOIN, SQL_LIMIT, SQL_ON_DUP_KEY_UPDATE, SQL_ORDER_BY, SQL_REPLACE, SQL_SELECT, SQL_SELECT_ALL_FROM, SQL_SELECT_COUNT_ROWS, SQL_SET, SQL_UNION_ALL, SQL_UPDATE, SQL_VALUES, SQL_VALUES_1, SQL_VALUES_2, SQL_VALUES_3, SQL_VALUES_4, SQL_VALUES_5, SQL_WHERE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleancheckProcessTypeForDelete(int id) booleanChecks whether the parent type already has a child with the given titlevoidcopyTypeProperties(int fromTypeId, int toTypeId) Copies process type propertiesbooleandeleteProcessType(int id) Deletes process typeReturns a list of all process types sorted by titlegetProcessType(int id) Selects process type by IDDeprecated.getSortedProcessTypeStatusList(ProcessType type, List<Integer> sortingId) Deprecated.getTypeChildren(int parentId, Set<Integer> excludeIds) voidsearchProcessType(Pageable<ProcessType> result, int parentId, String filterLike) Searches process typesvoidupdateProcessType(ProcessType processType, int userId) Updates or creates a process type entityvoidUpdates process type propertiesMethods inherited from class CommonDAO
deleteById, foundRows, getById, getGroupedIds, getGroupedIds, getIds, getIds, getPageLimit, getPeriodSql, lastInsertId, setPeriodParamValue, setRecordCount, update, updateColumn, updateIds, updateIds, updateOrInsert
-
Constructor Details
-
ProcessTypeDAO
-
-
Method Details
-
searchProcessType
public void searchProcessType(Pageable<ProcessType> result, int parentId, String filterLike) throws Exception Searches process types- Parameters:
result- the resultparentId- when greater 0 - filter by parent type idfilterLike- when notnullor empty, SQL LIKE expression to filter by ID, title, or config- Throws:
Exception
-
getProcessType
Selects process type by ID- Parameters:
id- the type ID- Returns:
- the process type, or
nullif not found - Throws:
Exception
-
getTypeChildren
-
getFullProcessTypeList
Returns a list of all process types sorted by title- Returns:
- the process type list
- Throws:
SQLException
-
getSortedProcessTypeStatusList
@Deprecated public List<Status> getSortedProcessTypeStatusList(ProcessType type, List<Integer> sortingId) Deprecated.UseProcessTypeCache -
getProcessTypeStatusList
Deprecated.UseProcessTypeCache -
updateProcessType
Updates or creates a process type entity- Parameters:
processType- the process typeuserId- the user ID- Throws:
Exception
-
updateTypeProperties
Updates process type properties- Parameters:
type- the process type
-
copyTypeProperties
-
checkProcessTypeForDelete
-
deleteProcessType
-
checkType
Checks whether the parent type already has a child with the given title- Parameters:
id- the type ID to exclude from the check (itself)parentId- the parent type IDtitle- the title- Returns:
trueif no such child exists- Throws:
Exception
-