Class PerexGroupsService
java.lang.Object
sk.iway.iwcm.components.perex_groups.PerexGroupsService
-
Method Summary
Modifier and TypeMethodDescriptionstatic voiddeletePerexGroup(int id) Delete perex group by idstatic voiddeletePerexGroupDocsByDocId(int docId) Delete all perex group docs by docIdstatic voiddeletePerexGroupDocsByPerexGroupId(int perexGroupId) Delete all perex group docs by perexGroupIdstatic List<PerexGroupsEntity>Get all perex groups via repo DO NOT USE IN CODE instead use DocDB.getPerexGroups() method which caches the datastatic voidinsertPerexGroupDocs(int docId, String[] prerexGroupIds) Create multiple perex group docs, where id (docId) is same and perexGroupId is from prerexGroupIds arr.static PerexGroupsEntitysave(PerexGroupsEntity entity, PerexGroupsRepository perexGroupsRepository) static PerexGroupsEntitysavePerexGroup(int groupId, String groupName, String availableGroups) Greate new perex group and save itstatic voidsavePerexGroupsDoc(int docId, int[] perexGroupIds) Save perex groups for doc, detects changes and update db
-
Method Details
-
getPerexGroups
Get all perex groups via repo DO NOT USE IN CODE instead use DocDB.getPerexGroups() method which caches the data- 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)
-