@Override public boolean existsById(ID id) { Assert.notNull(id, "The given id must not be null!"); return mongoOperations.exists(getIdQuery(id), entityInformation.getJavaType(), entityInformation.getCollectionName()); }
@Override public boolean exists(String scriptName) { Assert.hasText(scriptName, "ScriptName must not be null or empty!"); return mongoOperations.exists(query(where("_id").is(scriptName)), NamedMongoScript.class, SCRIPT_COLLECTION_NAME); }
@Override public <S extends T> boolean exists(Example<S> example) { Assert.notNull(example, "Sample must not be null!"); Query q = new Query(new Criteria().alike(example)); return mongoOperations.exists(q, example.getProbeType(), entityInformation.getCollectionName()); }
@Override public boolean existsById(ID id) { Assert.notNull(id, "The given id must not be null!"); return mongoOperations.exists(getIdQuery(id), entityInformation.getJavaType(), entityInformation.getCollectionName()); }
@Override public boolean exists(String scriptName) { Assert.hasText(scriptName, "ScriptName must not be null or empty!"); return mongoOperations.exists(query(where("_id").is(scriptName)), NamedMongoScript.class, SCRIPT_COLLECTION_NAME); }
@Override public <S extends T> boolean exists(Example<S> example) { Assert.notNull(example, "Sample must not be null!"); Query q = new Query(new Criteria().alike(example)); return mongoOperations.exists(q, example.getProbeType(), entityInformation.getCollectionName()); }
/** * Checks if the provided <code>id</code> already exists. * * @param id The id that will be checked if it is already being used. * @return <code>true</code> if the id exists. <code>false</code> otherwise. */ public boolean exists(I id) { return mongoOperations.exists(getIdQuery(id), entityClass); }
public static <T> boolean exists(MongoOperations mongo, Map<String, Object> fields, Class<T> clazz) { Query query = Query.query(getCriterias(fields)); return mongo.exists(query, clazz); }
public static <T> boolean exists(MongoOperations mongo, Map<String, Object> fields, Class<T> clazz) { Query query = Query.query(getCriterias(fields)); return mongo.exists(query, clazz); }
@Override public boolean exists(Queryable filter) { Class<T> entityType = getEntityInformation().getJavaType(); Query query = QueryBuilder.newBuilder().with(filter).build(); return getMongoOperations().exists(query, entityType); }