Package com.amos2020.javabackend.service
Class ScopeService
java.lang.Object
com.amos2020.javabackend.service.ScopeService
@Service
public class ScopeService
extends java.lang.Object
-
Field Summary
Fields Modifier and Type Field Description (package private) ScopeRepositoryrepository -
Constructor Summary
Constructors Constructor Description ScopeService(ScopeRepository repository) -
Method Summary
Modifier and Type Method Description voidcreateScope(int auditId, int factorCriteriaId)Create a single Scope obejct by audit id and facCrit idvoidcreateScopeByFactorCriteriaList(int auditId, java.util.List<java.lang.Integer> factorCriteriaList)Create Scope objects by a given audit id and a given List of FacCrit idsScopefindScopeItemByIds(int auditId, int facCritId)Find a Scope object by audit id and facCrit idjava.util.List<Scope>findScopeItemsByAuditId(int auditId)Find Scope objects by audit idprivate ScopesaveScope(int auditId, int factorCriteriaId, java.lang.String changeNote, boolean removed, java.lang.String note)Method to save a new or existing Scope objectScopeupdateScopeItem(int auditId, int facCritId, java.lang.String changeNote, boolean isRemoved, java.lang.String note)Update an existing Scope object
-
Field Details
-
Constructor Details
-
Method Details
-
createScopeByFactorCriteriaList
public void createScopeByFactorCriteriaList(int auditId, java.util.List<java.lang.Integer> factorCriteriaList)Create Scope objects by a given audit id and a given List of FacCrit ids- Parameters:
auditId- intfactorCriteriaList- List
-
createScope
public void createScope(int auditId, int factorCriteriaId)Create a single Scope obejct by audit id and facCrit id- Parameters:
auditId- intfactorCriteriaId- int
-
saveScope
private Scope saveScope(int auditId, int factorCriteriaId, java.lang.String changeNote, boolean removed, java.lang.String note)Method to save a new or existing Scope object- Parameters:
auditId- intfactorCriteriaId- intchangeNote- Stringremoved- boolnote- String- Returns:
- Scope
-
findScopeItemByIds
Find a Scope object by audit id and facCrit id- Parameters:
auditId- intfacCritId- int- Returns:
- Scope
-
findScopeItemsByAuditId
Find Scope objects by audit id- Parameters:
auditId- int- Returns:
- List
-
updateScopeItem
public Scope updateScopeItem(int auditId, int facCritId, java.lang.String changeNote, boolean isRemoved, java.lang.String note) throws java.lang.IllegalAccessExceptionUpdate an existing Scope object- Parameters:
auditId- intfacCritId- intchangeNote- StringisRemoved- boolnote- String- Returns:
- Updated Scope object
- Throws:
java.lang.IllegalAccessException- If Scope object has already been removed
-