private QueryBuilder<T, ID> checkQueryBuilderMethod(String methodName) throws SQLException { if (statementBuilder instanceof QueryBuilder) { return (QueryBuilder<T, ID>) statementBuilder; } else { throw new SQLException( "Cannot call " + methodName + " on a statement of type " + statementBuilder.getType()); } }
/** A short-cut for calling {@link QueryBuilder#prepare()}. */ public PreparedQuery<T> prepare() throws SQLException { return statementBuilder.prepareStatement(null); }