Class SettingsStorage


  • public class SettingsStorage
    extends java.lang.Object
    Storage service to access / load and save Codes. This service will be used , as well, to convert from JPA entity to DTO.
    Version:
    $Id: $Id
    Author:
    medamine
    • Method Detail

      • createWorkTime

        public WorkTime createWorkTime​(WorkTime workTime)
                                throws java.lang.Exception

        createWorkTime.

        Parameters:
        workTime - a WorkTime object.
        Returns:
        a WorkTime object.
        Throws:
        java.lang.Exception - if any.
      • updateWorkTime

        public WorkTime updateWorkTime​(WorkTime workTime)
                                throws java.lang.Exception

        updateWorkTime.

        Parameters:
        workTime - a WorkTime object.
        Returns:
        a WorkTime object.
        Throws:
        java.lang.Exception - if any.
      • deleteWorkTime

        public void deleteWorkTime​(long workTimeId)
                            throws org.gatein.api.EntityNotFoundException

        deleteWorkTime.

        Parameters:
        workTimeId - a long.
        Throws:
        org.gatein.api.EntityNotFoundException - if any.
      • getWorkTimeById

        public WorkTime getWorkTimeById​(long WorkTimeId)

        getWorkTimeById.

        Parameters:
        WorkTimeId - a long.
        Returns:
        a WorkTime object.
      • getWorkTimes

        public java.util.List<WorkTime> getWorkTimes()

        getWorkTimes.

        Returns:
        a List object.
      • countWorkTimes

        public long countWorkTimes()

        countWorkTimes.

        Returns:
        a long.
      • createLocation

        public Location createLocation​(Location location)
                                throws java.lang.Exception

        createLocation.

        Parameters:
        location - a Location object.
        Returns:
        a Location object.
        Throws:
        java.lang.Exception - if any.
      • updateLocation

        public Location updateLocation​(Location location)
                                throws java.lang.Exception

        updateLocation.

        Parameters:
        location - a Location object.
        Returns:
        a Location object.
        Throws:
        java.lang.Exception - if any.
      • deleteLocation

        public void deleteLocation​(java.lang.String code)
                            throws org.gatein.api.EntityNotFoundException

        deleteLocation.

        Parameters:
        code - a String.
        Throws:
        org.gatein.api.EntityNotFoundException - if any.
      • getLocationByCode

        public Location getLocationByCode​(java.lang.String code)

        getLocationById.

        Parameters:
        code - a String.
        Returns:
        a Location object.
      • getLocations

        public java.util.List<Location> getLocations()

        getLocations.

        Returns:
        a List object.
      • countLocations

        public long countLocations()

        countLocations.

        Returns:
        a long.
      • createOffice

        public Office createOffice​(Office office)
                            throws java.lang.Exception

        createOffice.

        Parameters:
        office - a Office object.
        Returns:
        a Office object.
        Throws:
        java.lang.Exception - if any.
      • updateOffice

        public Office updateOffice​(Office office)
                            throws java.lang.Exception

        updateOffice.

        Parameters:
        office - a Office object.
        Returns:
        a Office object.
        Throws:
        java.lang.Exception - if any.
      • deleteOffice

        public void deleteOffice​(java.lang.String code)
                          throws org.gatein.api.EntityNotFoundException

        deleteOffice.

        Parameters:
        code - a String.
        Throws:
        org.gatein.api.EntityNotFoundException - if any.
      • getOfficeByCode

        public Office getOfficeByCode​(java.lang.String code)

        getOfficeById.

        Parameters:
        code - a long.
        Returns:
        a Office object.
      • getOffices

        public java.util.List<Office> getOffices()

        getOffices.

        Returns:
        a List object.
      • countOffices

        public long countOffices()

        countOffices.

        Returns:
        a long.