Class ProjectRepository


  • public class ProjectRepository
    extends java.lang.Object
    repository for project entities management in mongo.
    • Constructor Detail

      • ProjectRepository

        public ProjectRepository​(MongoDbAccess mongoDbAccess,
                                 java.lang.String collectionName)
      • ProjectRepository

        public ProjectRepository​(MongoDbAccess mongoDbAccess)
    • Method Detail

      • findProjectsByTenant

        public java.util.List<ProjectModel> findProjectsByTenant​(java.lang.Integer tenant)
                                                          throws CollectInternalException
        return project according to tenant
        Parameters:
        tenant - tenant id to find
        Returns:
        Optional
        Throws:
        CollectInternalException - exception thrown in case of error
      • deleteProject

        public void deleteProject​(java.lang.String id)
        delete a project model
        Parameters:
        id - project to delete
      • searchProject

        public java.util.List<ProjectModel> searchProject​(java.lang.String searchValue,
                                                          int tenant)
                                                   throws CollectInternalException
        return projects according to criteria
        Parameters:
        searchValue - value Of search
        tenant - tenant
        Returns:
        List
        Throws:
        CollectInternalException - exception thrown in case of error