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) ScopeRepository repository  
  • Constructor Summary

    Constructors 
    Constructor Description
    ScopeService​(ScopeRepository repository)  
  • Method Summary

    Modifier and Type Method Description
    void createScope​(int auditId, int factorCriteriaId)
    Create a single Scope obejct by audit id and facCrit id
    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
    Scope findScopeItemByIds​(int auditId, int facCritId)
    Find a Scope object by audit id and facCrit id
    java.util.List<Scope> findScopeItemsByAuditId​(int auditId)
    Find Scope objects by audit id
    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
    Scope updateScopeItem​(int auditId, int facCritId, java.lang.String changeNote, boolean isRemoved, java.lang.String note)
    Update an existing Scope object

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • 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 - int
      factorCriteriaList - List
    • createScope

      public void createScope​(int auditId, int factorCriteriaId)
      Create a single Scope obejct by audit id and facCrit id
      Parameters:
      auditId - int
      factorCriteriaId - 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 - int
      factorCriteriaId - int
      changeNote - String
      removed - bool
      note - String
      Returns:
      Scope
    • findScopeItemByIds

      @Transactional public Scope findScopeItemByIds​(int auditId, int facCritId)
      Find a Scope object by audit id and facCrit id
      Parameters:
      auditId - int
      facCritId - int
      Returns:
      Scope
    • findScopeItemsByAuditId

      @Transactional public java.util.List<Scope> findScopeItemsByAuditId​(int auditId)
      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.IllegalAccessException
      Update an existing Scope object
      Parameters:
      auditId - int
      facCritId - int
      changeNote - String
      isRemoved - bool
      note - String
      Returns:
      Updated Scope object
      Throws:
      java.lang.IllegalAccessException - If Scope object has already been removed