Class CodesStorage

java.lang.Object
org.exoplatform.timetracker.storage.CodesStorage

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

  • Method Details

    • createActivityCode

      public ActivityCode createActivityCode(ActivityCode activityCode) throws Exception

      createActivityCode.

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

      public ActivityCode updateActivityCode(ActivityCode activityCode) throws Exception

      updateActivityCode.

      Parameters:
      activityCode - a ActivityCode object.
      Returns:
      a ActivityCode object.
      Throws:
      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 List<ActivityCode> getActivityCodes()

      getActivityCodes.

      Returns:
      a List object.
    • countActivityCodes

      public long countActivityCodes()

      countActivityCodes.

      Returns:
      a long.
    • toActivityCodeDTO

      public ActivityCode toActivityCodeDTO(ActivityCodeEntity activityCodeEntity)

      toActivityCodeDTO.

      Parameters:
      activityCodeEntity - a ActivityCodeEntity object.
      Returns:
      a ActivityCode object.
    • toActivityCodeEntity

      public ActivityCodeEntity toActivityCodeEntity(ActivityCode activityCode)

      toActivityCodeEntity.

      Parameters:
      activityCode - a ActivityCode object.
      Returns:
      a ActivityCodeEntity object.
    • createSubActivityCode

      public SubActivityCode createSubActivityCode(SubActivityCode subActivityCode) throws Exception

      createSubActivityCode.

      Parameters:
      subActivityCode - a SubActivityCode object.
      Returns:
      a SubActivityCode object.
      Throws:
      Exception - if any.
    • updateSubActivityCode

      public SubActivityCode updateSubActivityCode(SubActivityCode subActivityCode) throws Exception

      updateSubActivityCode.

      Parameters:
      subActivityCode - a SubActivityCode object.
      Returns:
      a SubActivityCode object.
      Throws:
      Exception - if any.
    • 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 List<SubActivityCode> getSubActivityCodes()

      getSubActivityCodes.

      Returns:
      a List object.
    • countSubActivityCodes

      public long countSubActivityCodes()

      countSubActivityCodes.

      Returns:
      a long.
    • toSubActivityCodeDTO

      public SubActivityCode toSubActivityCodeDTO(SubActivityCodeEntity subActivityCodeEntity)

      toSubActivityCodeDTO.

      Parameters:
      subActivityCodeEntity - a SubActivityCodeEntity object.
      Returns:
      a SubActivityCode object.
    • toSubActivityCodeEntity

      public SubActivityCodeEntity toSubActivityCodeEntity(SubActivityCode subActivityCode)

      toSubActivityCodeEntity.

      Parameters:
      subActivityCode - a SubActivityCode object.
      Returns:
      a SubActivityCodeEntity object.
    • createType

      public Type createType(Type type) throws Exception

      createType.

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

      public Type updateType(Type type) throws Exception

      updateType.

      Parameters:
      type - a Type object.
      Returns:
      a Type object.
      Throws:
      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 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 Exception

      createSubType.

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

      public SubType updateSubType(SubType subType) throws Exception

      updateSubType.

      Parameters:
      subType - a SubType object.
      Returns:
      a SubType object.
      Throws:
      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 List<SubType> getSubTypes()

      getSubTypes.

      Returns:
      a List object.
    • countSubTypes

      public long countSubTypes()

      countSubTypes.

      Returns:
      a long.
    • toSubTypeDTO

      public SubType toSubTypeDTO(SubTypeEntity subTypeEntity)

      toSubTypeDTO.

      Parameters:
      subTypeEntity - a SubTypeEntity object.
      Returns:
      a SubType object.
    • toSubTypeEntity

      public SubTypeEntity toSubTypeEntity(SubType subType)

      toSubTypeEntity.

      Parameters:
      subType - a SubType object.
      Returns:
      a SubTypeEntity object.