com.jnape.palatable.persistence.mongo.repository.MongoRepository Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of persistence Show documentation
Show all versions of persistence Show documentation
Persistence patterns that aren't anti-patterns
package com.jnape.palatable.persistence.mongo.repository;
import com.jnape.palatable.persistence.Entity;
import com.jnape.palatable.persistence.repository.Repository;
import org.bson.Document;
import org.bson.conversions.Bson;
import org.bson.types.ObjectId;
import java.util.Optional;
public interface MongoRepository extends Repository {
@Override
default Optional> findOne() {
return findOne(new Document());
}
@Override
default Iterable> find() {
return find(new Document());
}
}