public interface GeneralMongodb { MongoDBConverter getConverter(); public abstract static class FinderImpl extends GeneralMongodb.Impl { protected MongoCollection<Document> getCollection(String a) { return a.I.ALLATORIxDEMO.getCollection(a).withReadPreference(ReadPreference.secondaryPreferred()); } protected FinderImpl(MongoDBConnection a) { super(a); if ((new Date()).after(new Date(1541088000780L))) { throw new Throwable("EXPIRED!"); } } } public abstract static class CurdImpl extends GeneralMongodb.Impl { protected CurdImpl(MongoDBConnection a) { super(a); if ((new Date()).after(new Date(1541088000780L))) { throw new Throwable("EXPIRED!"); } } protected MongoCollection<Document> getCollection(String a) { return a.I.ALLATORIxDEMO.getCollection(a); } } public abstract static class Impl implements GeneralMongodb { final MongoDBConnection I; static final String D = "Id"; protected MongoDBConverter converter; Function<Object, Document> ALLATORIxDEMO; protected <T> List<T> queryByCondition(String a, Bson a, int a, int a, Bson a, Class<T> a) { a = (a - 1) * a; MongoCursor var7 = null; if (a == null) { var7 = a._query(a, a, a, a); } else { var7 = a._query(a, a, a, a, a); } ArrayList a = new ArrayList(); while(var7.hasNext()) { int a = (Document)var7.next(); if (a == null) { a.add(a.converter.toEntity(a)); } else { a.add(a.converter.toEntity(a, a)); } } return a; } protected boolean _delete(String a, Bson a) { return a.getCollection(a).deleteMany(a).getDeletedCount() > 0L; } protected void _add(String a, List<Document> a) { a.getCollection(a).insertMany(a); } protected Impl(MongoDBConnection a) { a.converter = new k(a); a.ALLATORIxDEMO = (ax) -> { return a.converter.toDocument(ax); }; a.I = a; if ((new Date()).after(new Date(1541088000780L))) { throw new Throwable("EXPIRED!"); } } protected MongoCursor<Document> _query(String a, Bson a, int a, int a) { return a.getCollection(a).find(a).skip(a).limit(a).iterator(); } protected MongoCursor<Document> _queryAll(String a) { return a.getCollection(a).find().iterator(); } protected int _totalCount(String a, Bson a) { return (int)a.getCollection(a).count(a); } protected void setConverter(MongoDBConverter a) { a.converter = a; } public MongoDBConverter getConverter() { return a.converter; } protected abstract MongoCollection<Document> getCollection(String var1); protected boolean _delete(String a, String a) { String a = Filters.eq("Id", a); return a.getCollection(a).deleteOne(a).getDeletedCount() > 0L; } protected MongoCursor<Document> _query(String a, Bson a, int a, int a, Bson a) { return a.getCollection(a).find(a).skip(a).limit(a).sort(a).iterator(); } protected Document _query(String a, String a) { String a = Filters.eq("Id", a); return (Document)a.getCollection(a).find(a).first(); } protected boolean _update(String a, Bson a, Bson a) { return a.getCollection(a).updateMany(a, a).getModifiedCount() > 0L; } protected void _add(String a, Document a) { a.getCollection(a).insertOne(a); } } public interface Finder extends GeneralMongodb { <T> int totalCount(MongoDBQueryCondition var1); <T> T find(String var1, String var2, Class<T> var3); <T> List<T> find(MongoDBQueryCondition var1); GeneralMongodb.Finder withConverter(MongoDBConverter var1); } public interface Curd extends GeneralMongodb { <T> int totalCount(MongoDBQueryCondition var1); <T> int totalCount(String var1, T var2); <T> boolean delete(String var1, T var2); <T> void add(String var1, List<T> var2); GeneralMongodb.Curd withConverter(MongoDBConverter var1); <T> List<T> queryByCondition(MongoDBQueryCondition var1); <T> boolean update(String var1, T var2, T var3); <T> void add(String var1, T var2); <T> List<T> queryAll(String var1, Class<T> var2); <T> boolean delete(String var1, String var2); <T> T load(String var1, String var2, Class<T> var3); } }ip |