Class ProjectStorage

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

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

  • Method Details

    • createProject

      public Project createProject(Project project) throws Exception

      createProject.

      Parameters:
      project - a Project object.
      Returns:
      a Project object.
      Throws:
      Exception - if any.
    • updateProject

      public Project updateProject(Project project) throws Exception

      updateProject.

      Parameters:
      project - a Project object.
      Returns:
      a Project object.
      Throws:
      Exception - if any.
    • deleteProject

      public void deleteProject(long projectId) throws org.gatein.api.EntityNotFoundException

      deleteProject.

      Parameters:
      projectId - a long.
      Throws:
      org.gatein.api.EntityNotFoundException - if any.
    • getProjectById

      public Project getProjectById(long ProjectId)

      getProjectById.

      Parameters:
      ProjectId - a long.
      Returns:
      a Project object.
    • getProjects

      public List<Project> getProjects()

      getProjects.

      Returns:
      a List object.
    • countProjects

      public long countProjects()

      countProjects.

      Returns:
      a long.
    • toDTO

      public Project toDTO(ProjectEntity projectEntity)

      toDTO.

      Parameters:
      projectEntity - a ProjectEntity object.
      Returns:
      a Project object.
    • toEntity

      public ProjectEntity toEntity(Project project)

      toEntity.

      Parameters:
      project - a Project object.
      Returns:
      a ProjectEntity object.