Class TPacDao


  • public class TPacDao
    extends BaseDao
    Provides a DAO for the TPac entity.
    Since:
    5.1.0
    • Constructor Detail

      • TPacDao

        public TPacDao()
    • Method Detail

      • getTPacForPK

        public TPac getTPacForPK​(Object tpacId)
        Return the TPac with the specified ID
        Parameters:
        tpacId - the OID of the TPac (required)
        Returns:
        the matching TPac, or null if not found
      • getTPacForProjectCode

        public TPac getTPacForProjectCode​(Client client,
                                          String projectCode)
        Return the TPac with the specified client and project code
        Parameters:
        client - the client (required)
        projectCode - the project code of the TPac
        Returns:
        the matching TPac, or null if not found
        Since:
        17.10.0
      • getTPacsForClient

        public List<TPac> getTPacsForClient​(Client client)
        Return the list of TPac for the given client.
        Parameters:
        client - the client (required)
        Returns:
        the list of TPac for the client
      • getActiveTPacs

        public List<TPac> getActiveTPacs​(String selectedClientId,
                                         UserAccount userAccount,
                                         String keyword)
        Return the list of TPac objects for the currently selected organization and user. If an organization is selected and the user can access the organization, only TPac objects belonging to that organization are returned. Otherwise, all TPac objects associated with clients accessible to the user are returned.
        Parameters:
        userAccount - the user (required)
        selectedClientId - the ID of the currently selected client (optional)
        keyword - the search keyword (optional)
        Returns:
        the list of active TPac objects for the applicable client(s), sorted by name