Package co.cubicode.jdbcframework

Examples of co.cubicode.jdbcframework.SQLQuery


    return findByPrimaryKey(application.toString(), objectType.toString(), operationType.toString());
  }

  public static Permission findByPrimaryKey(String application, String objectType, String operationType) throws ObjectNotFoundException {
    DatabaseFactory instance = DatabaseFactory.getInstance("rbac");
    SQLQuery sql = SQL.getSQL(Permission.class, "findByPrimaryKey");
    sql.setParameter("application", application);
    sql.setParameter("objectType", objectType);
    sql.setParameter("operationType", operationType);
    return instance.query(Permission.class, sql);
  }
View Full Code Here


public class RolePermissionBiz {

  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 class UserBiz {

  public static User findByPrimaryKey(Long id) throws ObjectNotFoundException {
    DatabaseFactory instance = DatabaseFactory.getInstance("rbac");
    SQLQuery sql = SQL.getSQL(User.class, "findByPrimaryKey");
    sql.setParameter("id", id);
    return instance.query(User.class, sql);
  }
View Full Code Here

    return instance.query(User.class, sql);
  }

  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);
  }
View Full Code Here

    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");
    Long id = (Long) instance.update(user, sql);
    if (id == null) {
      throw new DatabaseFactoryException("Ocurrio un error al obtener el id del objeto usuario");
    }
    user.setId(id);
View Full Code Here

public class RoleBiz {

  public static Role findByPrimaryKey(Integer id) throws ObjectNotFoundException {
    DatabaseFactory instance = DatabaseFactory.getInstance("rbac");
    SQLQuery sql = SQL.getSQL(Role.class, "findByPrimaryKey");
    sql.setParameter("id", id);
    return instance.query(Role.class, sql);
  }
View Full Code Here

TOP

Related Classes of co.cubicode.jdbcframework.SQLQuery

Copyright © 2018 www.massapicom. 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.