@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; }
@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; }
@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; }