Search in sources :

Example 1 with NullInsertBuilder

use of io.leopard.jdbc.builder.NullInsertBuilder in project leopard by tanhaichao.

the class AdminDaoMysqlImpl method add.

@Override
public boolean add(Admin admin) {
    InsertBuilder builder = new NullInsertBuilder("admin");
    builder.setLong("adminId", admin.getAdminId());
    builder.setString("username", admin.getUsername());
    builder.setString("password", admin.getPassword());
    builder.setList("roles", admin.getRoleList());
    builder.setString("salt", admin.getSalt());
    builder.setString("name", admin.getName());
    builder.setBool("disabled", admin.isDisabled());
    builder.setDate("posttime", admin.getPosttime());
    return jdbc.insertForBoolean(builder);
}
Also used : InsertBuilder(io.leopard.jdbc.builder.InsertBuilder) NullInsertBuilder(io.leopard.jdbc.builder.NullInsertBuilder) NullInsertBuilder(io.leopard.jdbc.builder.NullInsertBuilder)

Aggregations

InsertBuilder (io.leopard.jdbc.builder.InsertBuilder)1 NullInsertBuilder (io.leopard.jdbc.builder.NullInsertBuilder)1