Class CollectRepository


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

      • CollectRepository

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

        public CollectRepository​(MongoDbAccess mongoDbAccess)
    • Method Detail

      • createCollect

        public void createCollect​(CollectModel collectModel)
                           throws CollectException
        create a collect model
        Parameters:
        collectModel - collect model to create
        Throws:
        CollectException - exception thrown in case of error
      • replaceCollect

        public void replaceCollect​(CollectModel collectModel)
                            throws CollectException
        replace a collect model
        Parameters:
        collectModel - collect model to replace
        Throws:
        CollectException - exception thrown in case of error
      • findCollect

        public java.util.Optional<CollectModel> findCollect​(java.lang.String id)
                                                     throws CollectException
        return collection according to id
        Parameters:
        id - collect id to find
        Returns:
        Optional
        Throws:
        CollectException - exception thrown in case of error