Class FeatureStorage

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

public class FeatureStorage extends Object
Storage service to access / load and save Features. This service will be used , as well, to convert from JPA entity to DTO.
Version:
$Id: $Id
Author:
medamine
  • Constructor Details

    • FeatureStorage

      public FeatureStorage(FeatureDAO featureDAO)

      Constructor for FeatureStorage.

      Parameters:
      featureDAO - a FeatureDAO object.
  • Method Details

    • createFeature

      public Feature createFeature(Feature feature) throws Exception

      createFeature.

      Parameters:
      feature - a Feature object.
      Returns:
      a Feature object.
      Throws:
      Exception - if any.
    • updateFeature

      public Feature updateFeature(Feature feature) throws Exception

      updateFeature.

      Parameters:
      feature - a Feature object.
      Returns:
      a Feature object.
      Throws:
      Exception - if any.
    • deleteFeature

      public void deleteFeature(long featureId) throws org.gatein.api.EntityNotFoundException

      deleteFeature.

      Parameters:
      featureId - a long.
      Throws:
      org.gatein.api.EntityNotFoundException - if any.
    • getFeatureById

      public Feature getFeatureById(long FeatureId)

      getFeatureById.

      Parameters:
      FeatureId - a long.
      Returns:
      a Feature object.
    • getFeatures

      public List<Feature> getFeatures()

      getFeatures.

      Returns:
      a List object.
    • countFeatures

      public long countFeatures()

      countFeatures.

      Returns:
      a long.
    • toDTO

      public Feature toDTO(FeatureEntity featureEntity)

      toDTO.

      Parameters:
      featureEntity - a FeatureEntity object.
      Returns:
      a Feature object.
    • toEntity

      public FeatureEntity toEntity(Feature feature)

      toEntity.

      Parameters:
      feature - a Feature object.
      Returns:
      a FeatureEntity object.