Class FeatureStorage


  • public class FeatureStorage
    extends java.lang.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 Detail

      • FeatureStorage

        public FeatureStorage​(FeatureDAO featureDAO)

        Constructor for FeatureStorage.

        Parameters:
        featureDAO - a FeatureDAO object.
    • Method Detail

      • createFeature

        public Feature createFeature​(Feature feature)
                              throws java.lang.Exception

        createFeature.

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

        public Feature updateFeature​(Feature feature)
                              throws java.lang.Exception

        updateFeature.

        Parameters:
        feature - a Feature object.
        Returns:
        a Feature object.
        Throws:
        java.lang.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 java.util.List<Feature> getFeatures()

        getFeatures.

        Returns:
        a List object.
      • countFeatures

        public long countFeatures()

        countFeatures.

        Returns:
        a long.