/** * Construct a query instance with the candidate class and candidate * Collection specified. * @param cls The class to query * @param cln The collection * @return The query * @param <T> Candidate type for the query */ public <T> Query<T> newQuery(Class<T> cls, Collection<T> cln) { Query query = newQuery(); query.setClass(cls); query.setCandidates(cln); return query; }
/** * Construct a query instance with the candidate class and candidate * Collection specified. * @param cls The class to query * @param cln The collection * @return The query */ public synchronized Query newQuery(Class cls, Collection cln) { Query query = newQuery(); query.setClass(cls); query.setCandidates(cln); return query; }
@SuppressWarnings("rawtypes") @Override public Query newQuery(Class arg0, Collection arg1, String arg2) { DBTracer.logCall(this, arg0, arg1, arg2); checkOpen(); Query q = new QueryImpl(this, arg0, arg2); q.setCandidates(arg1); return q; }
@SuppressWarnings("rawtypes") @Override public Query newQuery(Class arg0, Collection arg1) { DBTracer.logCall(this, arg0, arg1); checkOpen(); Query q = new QueryImpl(this, arg0, ""); q.setCandidates(arg1); return q; }
/** * Construct a query instance with the candidate Extent specified; the * candidate class is taken from the Extent. * @param cln The extent to query * @return The query */ public synchronized Query newQuery(Extent cln) { Query query = newQuery(); query.setClass(cln.getCandidateClass()); query.setCandidates(cln); return query; }
/** * Construct a query instance with the candidate Extent specified; the * candidate class is taken from the Extent. * @param cln The extent to query * @return The query * @param <T> Candidate type for the query */ public <T> Query<T> newQuery(Extent<T> cln) { Query query = newQuery(); query.setClass(cln.getCandidateClass()); query.setCandidates(cln); return query; }
/** * Construct a query instance with the candidate class, the candidate * Collection, and filter specified. * @param cls The class to query * @param cln A collection * @param filter A filter to apply * @return The query */ public synchronized Query newQuery(Class cls, Collection cln, String filter) { Query query = newQuery(); query.setClass(cls); query.setCandidates(cln); query.setFilter(filter); return query; }
/** * Construct a query instance with the candidate class, the candidate * Collection, and filter specified. * @param cls The class to query * @param cln A collection * @param filter A filter to apply * @return The query * @param <T> Candidate type for the query */ public <T> Query<T> newQuery(Class<T> cls, Collection<T> cln, String filter) { Query query = newQuery(); query.setClass(cls); query.setCandidates(cln); query.setFilter(filter); return query; }
/** * Construct a query instance with the candidate Extent and filter * specified. The candidate class is taken from the Extent. * @param cln The extent to query * @param filter A filter to apply * @return The query */ public synchronized Query newQuery(Extent cln, String filter) { Query query = newQuery(); query.setClass(cln.getCandidateClass()); query.setCandidates(cln); query.setFilter(filter); return query; }
/** * Construct a query instance with the candidate Extent and filter * specified. The candidate class is taken from the Extent. * @param cln The extent to query * @param filter A filter to apply * @return The query * @param <T> Candidate type for the query */ public <T> Query<T> newQuery(Extent<T> cln, String filter) { Query query = newQuery(); query.setClass(cln.getCandidateClass()); query.setCandidates(cln); query.setFilter(filter); return query; }
test.add(tc1); test.add(tc2); q.setCandidates(test); checkQuery(q, 2, tc1, tc2); checkRemoveFail(q, 2); q.setCandidates(list); checkQuery(q, 3, tc1, tc2); checkRemoveFail(q, 3);
Query q = pm.newQuery(x1); Extent<TestClass> x2 = pm.getExtent(TestClass.class); q.setCandidates(x2);