Class PerexGroupsService
java.lang.Object
sk.iway.iwcm.components.perex_groups.PerexGroupsService
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic void
deletePerexGroup
(int id) Delete perex group by idstatic void
deletePerexGroupDocsByDocId
(int docId) Delete all perex group docs by docIdstatic void
deletePerexGroupDocsByPerexGroupId
(int perexGroupId) Delete all perex group docs by perexGroupIdstatic List<PerexGroupsEntity>
Get all perex groups via repostatic void
insertPerexGroupDocs
(int docId, String[] prerexGroupIds) Create multiple perex group docs, where id (docId) is same and perexGroupId is from prerexGroupIds arr.static PerexGroupsEntity
save
(PerexGroupsEntity entity, PerexGroupsRepository perexGroupsRepository) static PerexGroupsEntity
savePerexGroup
(int groupId, String groupName, String availableGroups) Greate new perex group and save itstatic void
savePerexGroupsDoc
(int docId, int[] perexGroupIds) Save perex groups for doc, detects changes and update db
-
Constructor Details
-
PerexGroupsService
public PerexGroupsService()
-
-
Method Details
-
getPerexGroups
Get all perex groups via repo- Returns:
-
savePerexGroup
public static PerexGroupsEntity savePerexGroup(int groupId, String groupName, String availableGroups) Greate new perex group and save it- Parameters:
groupId
-groupName
-availableGroups
-
-
deletePerexGroup
public static void deletePerexGroup(int id) Delete perex group by id- Parameters:
id
-
-
insertPerexGroupDocs
Create multiple perex group docs, where id (docId) is same and perexGroupId is from prerexGroupIds arr. Create number of perexGroupDocs for each perexGroupId in prerexGroupIds, IF perexGroupId is number bigger than 0.- Parameters:
docId
- - docIdprerexGroupIds
- - array of perexGroupIds
-
deletePerexGroupDocsByPerexGroupId
public static void deletePerexGroupDocsByPerexGroupId(int perexGroupId) Delete all perex group docs by perexGroupId- Parameters:
perexGroupId
-
-
deletePerexGroupDocsByDocId
public static void deletePerexGroupDocsByDocId(int docId) Delete all perex group docs by docId- Parameters:
docId
-
-
savePerexGroupsDoc
public static void savePerexGroupsDoc(int docId, int[] perexGroupIds) Save perex groups for doc, detects changes and update db- Parameters:
docId
-perexGroupIds
-
-
save
public static PerexGroupsEntity save(PerexGroupsEntity entity, PerexGroupsRepository perexGroupsRepository)
-