/** * Creates a ObjectSelect that selects objects of a given persistent class. */ public static <T> ObjectSelect<T> query(Class<T> entityType) { return new ObjectSelect<T>().entityType(entityType); }
/** * Creates a ObjectSelect that fetches data for {@link ObjEntity} determined * from provided "entityName", but fetches the result of a provided type. * This factory method is most often used with generic classes that by * themselves are not enough to resolve the entity to fetch. */ public static <T> ObjectSelect<T> query(Class<T> resultType, String entityName) { return new ObjectSelect<T>().entityName(entityName); }
/** * Creates a ObjectSelect that selects objects of a given persistent class * and uses provided expression for its qualifier. */ public static <T> ObjectSelect<T> query(Class<T> entityType, Expression expression) { return new ObjectSelect<T>().entityType(entityType).where(expression); }
/** * Creates a ObjectSelect that fetches DataRows for a {@link DbEntity} * determined from provided "dbEntityName". */ public static ObjectSelect<DataRow> dbQuery(String dbEntityName) { return new ObjectSelect<DataRow>().fetchDataRows().dbEntityName(dbEntityName); }
/** * Creates a ObjectSelect that fetches DataRows for a {@link DbEntity} * determined from provided "dbEntityName" and uses provided expression for * its qualifier. * * @return this object */ public static ObjectSelect<DataRow> dbQuery(String dbEntityName, Expression expression) { return new ObjectSelect<DataRow>().fetchDataRows().dbEntityName(dbEntityName).where(expression); }
/** * Creates a ObjectSelect that selects objects of a given persistent class * and uses provided expression for its qualifier. */ public static <T> ObjectSelect<T> query(Class<T> entityType, Expression expression, List<Ordering> orderings) { return new ObjectSelect<T>().entityType(entityType).where(expression).orderBy(orderings); }