Ejemplo n.º 1
0
 @Override
 public Query<T> project(final String field, final ArraySlice slice) {
   final StringBuilder sb = new StringBuilder(field);
   validateQuery(clazz, ds.getMapper(), sb, FilterOperator.EQUAL, null, validateName, false);
   String fieldName = sb.toString();
   validateProjections(fieldName, true);
   project(fieldName, slice.toDatabase());
   return this;
 }
Ejemplo n.º 2
0
 @Override
 public Query<T> project(final Meta meta) {
   final StringBuilder sb = new StringBuilder(meta.getField());
   validateQuery(clazz, ds.getMapper(), sb, FilterOperator.EQUAL, null, false, false);
   String fieldName = sb.toString();
   validateProjections(fieldName, true);
   project(meta.toDatabase());
   return this;
 }
Ejemplo n.º 3
0
 @Override
 public Query<T> project(final String field, final boolean include) {
   final StringBuilder sb = new StringBuilder(field);
   validateQuery(clazz, ds.getMapper(), sb, FilterOperator.EQUAL, null, validateName, false);
   String fieldName = sb.toString();
   validateProjections(fieldName, include);
   project(fieldName, include ? 1 : 0);
   return this;
 }
Ejemplo n.º 4
0
 @Override
 @Deprecated
 public Query<T> retrievedFields(final boolean include, final String... list) {
   if (includeFields != null && include != includeFields) {
     throw new IllegalStateException("You cannot mix included and excluded fields together");
   }
   for (String field : list) {
     project(field, include);
   }
   return this;
 }