Package co.cubicode.jdbcframework

Examples of co.cubicode.jdbcframework.DatabaseFactory.queryForList()


  public static List<RolePermission> findByRoleAndApplication(Role role, String application) throws ObjectNotFoundException {
    DatabaseFactory instance = DatabaseFactory.getInstance("rbac");
    SQLQuery sql = SQL.getSQL(RolePermission.class, "findByRoleAndApplication");
    sql.setParameter("role", role.getId());
    sql.setParameter("application", application);
    return instance.queryForList(RolePermission.class, sql);
  }

}
View Full Code Here


  }

  public static List<User> getAll() throws ObjectNotFoundException {
    DatabaseFactory instance = DatabaseFactory.getInstance("rbac");
    SQLQuery sql = SQL.getSQL(User.class, "getAll");
    return instance.queryForList(User.class, sql);
  }
 
  public static User create(User user) throws ObjectUpdateException {
    DatabaseFactory instance = DatabaseFactory.getInstance("rbac");
    SQLQuery sql = SQL.getSQL(User.class, "create");
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.