资 源 简 介
Lightweight, flexible Data Access Library for Java (ORM alternative).
There is no xml configuration, no SQL (or any other) scripting, just a thin layer on top of JDBC to make it more "object-oriented"
usage is as simple as:
Query:
List models = getDao().execute(new DAOQuery(new DAOQueryConstructor()
{
@Override
public Object fromDatabase(DAOStatementQuery.QueryResultSet resultSetWrapper) throws SQLException
{
ParentModel model = new ParentModel();
model.setId(resultSetWrapper.getLong(DbParent.FIELD_ID));
model.setName(resultSetWrapper.getString(DbParent.FIELD_NAME));
return model;
}
}, new DAOParameters(new DAOParameter(DbParent.FIELD_ID, 1, DAOFunction.Name.MORE_THAN)),
DbParent.Instance.getTable()
)).asList();
Up