If you are defining your own custom persister, then chances are you should extend {@link BaseDataType}. See {@link DatabaseField#persisterClass()}.
272273274275276277278279
* </p> */ public Where<T, ID> exists(QueryBuilder<?, ?> subQueryBuilder) throws SQLException { // we do this to turn off the automatic addition of the ID column in the select column list subQueryBuilder.enableInnerQuery(); addClause(new Exists(new InternalQueryBuilderWrapper(subQueryBuilder))); return this; }
225226227228229230231232
/** * Add a IN clause so the column must be equal-to one of the objects from the list passed in. */ public Where<T, ID> in(String columnName, Iterable<?> objects) throws SQLException { addClause(new In(columnName, findColumnFieldType(columnName), objects)); return this; }
236237238239240241242243
*/ public Where<T, ID> in(String columnName, Object... objects) throws SQLException { if (objects.length == 1 && objects[0].getClass().isArray()) { throw new IllegalArgumentException("in(Object... objects) seems to be an array within an array"); } addClause(new In(columnName, findColumnFieldType(columnName), objects)); return this; }
257258259260261262263264265
throw new SQLException("Inner query must have only 1 select column specified instead of " + subQueryBuilder.getSelectColumnCount()); } // we do this to turn off the automatic addition of the ID column in the select column list subQueryBuilder.enableInnerQuery(); addClause(new InSubQuery(columnName, findColumnFieldType(columnName), new InternalQueryBuilderWrapper( subQueryBuilder))); return this; }
288289290291292293294295
/** * Add a 'IS NOT NULL' clause so the column must not be null. '<>' NULL does not work. */ public Where<T, ID> isNotNull(String columnName) throws SQLException { addClause(new IsNotNull(columnName, findColumnFieldType(columnName))); return this; }
280281282283284285286287
/** * Add a 'IS NULL' clause so the column must be null. '=' NULL does not work. */ public Where<T, ID> isNull(String columnName) throws SQLException { addClause(new IsNull(columnName, findColumnFieldType(columnName))); return this; }
143144145146147148149150
/** * AND operation which takes the previous clause and the next clause and AND's them together. */ public Where<T, ID> and() { addNeedsFuture(new ManyClause(pop("AND"), ManyClause.AND_OPERATION)); return this; }
161162163164165166167168
*/ public Where<T, ID> and(Where<T, ID> first, Where<T, ID> second, Where<T, ID>... others) { Clause[] clauses = buildClauseArray(others, "AND"); Clause secondClause = pop("AND"); Clause firstClause = pop("AND"); addClause(new ManyClause(firstClause, secondClause, clauses, ManyClause.AND_OPERATION)); return this; }
182183184185186187188189
} Clause[] clauses = new Clause[numClauses]; for (int i = numClauses - 1; i >= 0; i--) { clauses[i] = pop("AND"); } addClause(new ManyClause(clauses, ManyClause.AND_OPERATION)); return this; }
348349350351352353354355
/** * OR operation which takes the previous clause and the next clause and OR's them together. */ public Where<T, ID> or() { addNeedsFuture(new ManyClause(pop("OR"), ManyClause.OR_OPERATION)); return this; }