Class AbstractMongoSafeDeleteRepository<ID,​E extends io.foodtechlab.common.domain.entities.BaseDeleteEntity<ID>,​D extends BaseDeleteDocument,​F extends io.foodtechlab.common.domain.port.filters.DeleteFilter>

  • All Implemented Interfaces:
    com.rcore.domain.commons.port.CreateUpdateRepository<E>, com.rcore.domain.commons.port.CRUDRepository<ID,​E,​F>, com.rcore.domain.commons.port.DeleteRepository<ID>, com.rcore.domain.commons.port.ReadRepository<ID,​E,​F>, io.foodtechlab.common.domain.port.SafeDeleteCRUDRepository<ID,​E,​F>, io.foodtechlab.common.domain.port.SafeDeleteRepository<ID>, io.foodtechlab.common.domain.port.SafeReadRepository<ID,​E,​F>

    public abstract class AbstractMongoSafeDeleteRepository<ID,​E extends io.foodtechlab.common.domain.entities.BaseDeleteEntity<ID>,​D extends BaseDeleteDocument,​F extends io.foodtechlab.common.domain.port.filters.DeleteFilter>
    extends com.rcore.database.mongo.commons.port.impl.AbstractMongoRepository<ID,​E,​D,​F>
    implements io.foodtechlab.common.domain.port.SafeDeleteCRUDRepository<ID,​E,​F>
    • Constructor Detail

      • AbstractMongoSafeDeleteRepository

        public AbstractMongoSafeDeleteRepository​(Class<D> documentClass,
                                                 com.rcore.commons.mapper.ExampleDataMapper<E,​D> mapper,
                                                 org.springframework.data.mongodb.core.MongoTemplate mongoTemplate)
    • Method Detail

      • findById

        public Optional<E> findById​(ID id)
        Specified by:
        findById in interface com.rcore.domain.commons.port.ReadRepository<ID,​E extends io.foodtechlab.common.domain.entities.BaseDeleteEntity<ID>,​D extends BaseDeleteDocument>
        Overrides:
        findById in class com.rcore.database.mongo.commons.port.impl.AbstractMongoRepository<ID,​E extends io.foodtechlab.common.domain.entities.BaseDeleteEntity<ID>,​D extends BaseDeleteDocument,​F extends io.foodtechlab.common.domain.port.filters.DeleteFilter>
      • forceFindById

        public Optional<E> forceFindById​(ID id)
        Specified by:
        forceFindById in interface io.foodtechlab.common.domain.port.SafeReadRepository<ID,​E extends io.foodtechlab.common.domain.entities.BaseDeleteEntity<ID>,​D extends BaseDeleteDocument>
      • restore

        public boolean restore​(ID id)
        Specified by:
        restore in interface io.foodtechlab.common.domain.port.SafeDeleteRepository<ID>
      • delete

        public Boolean delete​(ID id)
        Specified by:
        delete in interface com.rcore.domain.commons.port.DeleteRepository<ID>
        Overrides:
        delete in class com.rcore.database.mongo.commons.port.impl.AbstractMongoRepository<ID,​E extends io.foodtechlab.common.domain.entities.BaseDeleteEntity<ID>,​D extends BaseDeleteDocument,​F extends io.foodtechlab.common.domain.port.filters.DeleteFilter>
      • permanentDelete

        public boolean permanentDelete​(ID id)
        Specified by:
        permanentDelete in interface io.foodtechlab.common.domain.port.SafeDeleteRepository<ID>