[ rubbish-db ]

ソース

RubbishDatabase dbh = new RubbishDatabase();
dbh.setLogging(true);

dbh.connect("jdbc:hsqldb:hsql://localhost", "sa", "");

Publisher[] publishers = (Publisher[]) dbh.select(Publisher.class, "ORDER BY ID", 2, 3);

for (int i = 0; i < publishers.length; i++)
    println(publishers[i]);

dbh.disconnect();

結果

connect database 'url=jdbc:hsqldb:hsql://localhost, user=sa, password='.
'SELECT * FROM PUBLISHER ORDER BY ID' (start=2, lines=3)
Publisher@{create_date=1999-07-10 17:10:00.000, id=02, name=時源出版, update_date=2005-07-10 17:10:00.000, volumes=4}
Publisher@{create_date=1999-07-10 17:10:00.000, id=03, name=曙蓬莱新聞社, update_date=2005-07-10 17:10:00.000, volumes=4}
Publisher@{create_date=1999-07-10 17:10:00.000, id=04, name=太公望書林, update_date=2005-07-10 17:10:00.000, volumes=12}
disconnect database.