PersistJava 的 ORM 框架

联合创作 · 2023-09-30 04:17

Persist 是一个轻量级的易用而且高性能的 Java  ORM 和 DAO 框架。

示例代码:

// inserts a new customer (the class Customer is mapped to the table customer automatically)
persist.insert(customer);

// reads a customer by its primary key
Customer c = persist.readByPrimaryKey(Customer.class, 42);

// retrieves customers using a custom query (note the usage of varargs)
List list = persist.readList(Customer.class, "select * from customer where id > ?", 10);

// fetch all customers and assign the ResultSet to an Iterator
Iterator allCustomersIterator = persist.readIterator(Customer.class, "select * from customer");

浏览 11
点赞
评论
收藏
分享

手机扫一扫分享

编辑 分享
举报
评论
图片
表情
推荐
点赞
评论
收藏
分享

手机扫一扫分享

编辑 分享
举报