Class FeatureStorage
- java.lang.Object
-
- org.exoplatform.timetracker.storage.FeatureStorage
-
public class FeatureStorage extends java.lang.ObjectStorage 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 Summary
Constructors Constructor Description FeatureStorage(FeatureDAO featureDAO)Constructor for FeatureStorage.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description longcountFeatures()countFeatures.FeaturecreateFeature(Feature feature)createFeature.voiddeleteFeature(long featureId)deleteFeature.FeaturegetFeatureById(long FeatureId)getFeatureById.java.util.List<Feature>getFeatures()getFeatures.FeaturetoDTO(FeatureEntity featureEntity)toDTO.FeatureEntitytoEntity(Feature feature)toEntity.FeatureupdateFeature(Feature feature)updateFeature.
-
-
-
Constructor Detail
-
FeatureStorage
public FeatureStorage(FeatureDAO featureDAO)
Constructor for FeatureStorage.
- Parameters:
featureDAO- aFeatureDAOobject.
-
-
Method Detail
-
createFeature
public Feature createFeature(Feature feature) throws java.lang.Exception
createFeature.
-
updateFeature
public Feature updateFeature(Feature feature) throws java.lang.Exception
updateFeature.
-
deleteFeature
public void deleteFeature(long featureId) throws org.gatein.api.EntityNotFoundExceptiondeleteFeature.
- Parameters:
featureId- a long.- Throws:
org.gatein.api.EntityNotFoundException- if any.
-
getFeatureById
public Feature getFeatureById(long FeatureId)
getFeatureById.
- Parameters:
FeatureId- a long.- Returns:
- a
Featureobject.
-
getFeatures
public java.util.List<Feature> getFeatures()
getFeatures.
- Returns:
- a
Listobject.
-
countFeatures
public long countFeatures()
countFeatures.
- Returns:
- a long.
-
toDTO
public Feature toDTO(FeatureEntity featureEntity)
toDTO.
- Parameters:
featureEntity- aFeatureEntityobject.- Returns:
- a
Featureobject.
-
toEntity
public FeatureEntity toEntity(Feature feature)
toEntity.
- Parameters:
feature- aFeatureobject.- Returns:
- a
FeatureEntityobject.
-
-