Class CodesStorage


  • public class CodesStorage
    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

      • createActivityCode

        public ActivityCode createActivityCode​(ActivityCode activityCode)
                                        throws java.lang.Exception

        createActivityCode.

        Parameters:
        activityCode - a ActivityCode object.
        Returns:
        a ActivityCode object.
        Throws:
        java.lang.Exception - if any.
      • updateActivityCode

        public ActivityCode updateActivityCode​(ActivityCode activityCode)
                                        throws java.lang.Exception

        updateActivityCode.

        Parameters:
        activityCode - a ActivityCode object.
        Returns:
        a ActivityCode object.
        Throws:
        java.lang.Exception - if any.
      • deleteActivityCode

        public void deleteActivityCode​(long activityCodeId)
                                throws org.gatein.api.EntityNotFoundException

        deleteActivityCode.

        Parameters:
        activityCodeId - a long.
        Throws:
        org.gatein.api.EntityNotFoundException - if any.
      • getActivityCodeById

        public ActivityCode getActivityCodeById​(long ActivityCodeId)

        getActivityCodeById.

        Parameters:
        ActivityCodeId - a long.
        Returns:
        a ActivityCode object.
      • getActivityCodes

        public java.util.List<ActivityCode> getActivityCodes()

        getActivityCodes.

        Returns:
        a List object.
      • countActivityCodes

        public long countActivityCodes()

        countActivityCodes.

        Returns:
        a long.
      • deleteSubActivityCode

        public void deleteSubActivityCode​(long subActivityCodeId)
                                   throws org.gatein.api.EntityNotFoundException

        deleteSubActivityCode.

        Parameters:
        subActivityCodeId - a long.
        Throws:
        org.gatein.api.EntityNotFoundException - if any.
      • getSubActivityCodeById

        public SubActivityCode getSubActivityCodeById​(long SubActivityCodeId)

        getSubActivityCodeById.

        Parameters:
        SubActivityCodeId - a long.
        Returns:
        a SubActivityCode object.
      • getSubActivityCodes

        public java.util.List<SubActivityCode> getSubActivityCodes()

        getSubActivityCodes.

        Returns:
        a List object.
      • countSubActivityCodes

        public long countSubActivityCodes()

        countSubActivityCodes.

        Returns:
        a long.
      • createType

        public Type createType​(Type type)
                        throws java.lang.Exception

        createType.

        Parameters:
        type - a Type object.
        Returns:
        a Type object.
        Throws:
        java.lang.Exception - if any.
      • updateType

        public Type updateType​(Type type)
                        throws java.lang.Exception

        updateType.

        Parameters:
        type - a Type object.
        Returns:
        a Type object.
        Throws:
        java.lang.Exception - if any.
      • deleteType

        public void deleteType​(long typeId)
                        throws org.gatein.api.EntityNotFoundException

        deleteType.

        Parameters:
        typeId - a long.
        Throws:
        org.gatein.api.EntityNotFoundException - if any.
      • getTypeById

        public Type getTypeById​(long TypeId)

        getTypeById.

        Parameters:
        TypeId - a long.
        Returns:
        a Type object.
      • getTypes

        public java.util.List<Type> getTypes()

        getTypes.

        Returns:
        a List object.
      • countTypes

        public long countTypes()

        countTypes.

        Returns:
        a long.
      • toTypeDTO

        public Type toTypeDTO​(TypeEntity typeEntity)

        toTypeDTO.

        Parameters:
        typeEntity - a TypeEntity object.
        Returns:
        a Type object.
      • toTypeEntity

        public TypeEntity toTypeEntity​(Type type)

        toTypeEntity.

        Parameters:
        type - a Type object.
        Returns:
        a TypeEntity object.
      • createSubType

        public SubType createSubType​(SubType subType)
                              throws java.lang.Exception

        createSubType.

        Parameters:
        subType - a SubType object.
        Returns:
        a SubType object.
        Throws:
        java.lang.Exception - if any.
      • updateSubType

        public SubType updateSubType​(SubType subType)
                              throws java.lang.Exception

        updateSubType.

        Parameters:
        subType - a SubType object.
        Returns:
        a SubType object.
        Throws:
        java.lang.Exception - if any.
      • deleteSubType

        public void deleteSubType​(long subTypeId)
                           throws org.gatein.api.EntityNotFoundException

        deleteSubType.

        Parameters:
        subTypeId - a long.
        Throws:
        org.gatein.api.EntityNotFoundException - if any.
      • getSubTypeById

        public SubType getSubTypeById​(long SubTypeId)

        getSubTypeById.

        Parameters:
        SubTypeId - a long.
        Returns:
        a SubType object.
      • getSubTypes

        public java.util.List<SubType> getSubTypes()

        getSubTypes.

        Returns:
        a List object.
      • countSubTypes

        public long countSubTypes()

        countSubTypes.

        Returns:
        a long.