/** * 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; }
query.setOffset(offset);
query.setOffset(offset.intValue());
query.setOffset(jQuery.getInt("offset")); } catch (JSONException e) { parsingErrorMessages.append('\n');
query.setOffset(offset.intValue());
query.setOffset(offset); try { results = query(query);