private Protein getProteinForSequence(ObjectStore os, Sequence sequence) {
public static Protein getProteinForSequence(ObjectStore os, Sequence sequence) {
    private Protein getProteinForSequence(ObjectStore os, Sequence sequence) {        Query q = new Query();        QueryClass proteinQc = new QueryClass(Protein.class);        q.addFrom(proteinQc);        q.addToSelect(proteinQc);        QueryClass sequenceQc = new QueryClass(Sequence.class);        q.addFrom(sequenceQc);        QueryReference ref = new QueryObjectReference(proteinQc, "sequence");        ConstraintSet cs = new ConstraintSet(ConstraintOp.AND);        cs.addConstraint(new ContainsConstraint(ref, ConstraintOp.CONTAINS, sequenceQc));        QueryField seqIdQf = new QueryField(sequenceQc, "id");        QueryValue seqIdQv = new QueryValue(sequence.getId());        cs.addConstraint(new SimpleConstraint(seqIdQf, ConstraintOp.EQUALS, seqIdQv));        q.setConstraint(cs);        Results results = new Results(q, os, os.getSequence());        if (results.size() == 1) {            return (Protein) ((List) results.get(0)).get(0);        } else {            return null;        }    }