/** * Uses the public API to clone the state of this instance to the instance provided as parameter. * * @param <C> * An implementation of the FieldQuery interface * @param copyTo * An instance to copy the state of this on. * @return The parsed instance */ public <C extends FieldQuery> C copyTo(C copyTo) { copyTo.removeAllConstraints(); copyTo.removeAllSelectedFields(); for (Entry<String,Constraint> entry : queryConstraint.entrySet()) { // we need not to copy keys or values, because everything is // immutable copyTo.setConstraint(entry.getKey(), entry.getValue()); } copyTo.addSelectedFields(selected); copyTo.setLimit(limit); copyTo.setOffset(offset); return copyTo; }
/** * Uses the public API to clone the state of this instance to the instance provided as parameter. * * @param <C> * An implementation of the FieldQuery interface * @param copyTo * An instance to copy the state of this on. * @return The parsed instance */ public <C extends FieldQuery> C copyTo(C copyTo) { copyTo.removeAllConstraints(); copyTo.removeAllSelectedFields(); for (Entry<String,Constraint> entry : queryConstraint.entrySet()) { // we need not to copy keys or values, because everything is // immutable copyTo.setConstraint(entry.getKey(), entry.getValue()); } copyTo.addSelectedFields(selected); copyTo.setLimit(limit); copyTo.setOffset(offset); return copyTo; }
case ID: query.addField(fieldMapper.getDocumentIdField()); fieldQuery.removeAllSelectedFields(); break; case QUERY:
case ID: query.addField(fieldMapper.getDocumentIdField()); fieldQuery.removeAllSelectedFields(); break; case QUERY: