diff --git a/src/java/com/samskivert/jdbc/JORARepository.java b/src/java/com/samskivert/jdbc/JORARepository.java index 48a3f154..5f599220 100644 --- a/src/java/com/samskivert/jdbc/JORARepository.java +++ b/src/java/com/samskivert/jdbc/JORARepository.java @@ -107,6 +107,24 @@ public abstract class JORARepository extends SimpleRepository }); } + /** + * Loads all objects from the specified table that match the supplied + * query, joining with the supplied auxiliary table(s). + */ + protected ArrayList loadAll ( + final Table table, final String auxtable, final String query) + throws PersistenceException + { + return execute(new Operation>() { + public ArrayList invoke ( + Connection conn, DatabaseLiaison liaison) + throws SQLException, PersistenceException + { + return table.select(query, auxtable).toArrayList(); + } + }); + } + /** * Loads a single object from the specified table that matches the * supplied query. Note: the query should match one or zero