private void loadOrgAccessRole(ArrayList<OrgAccess> list){
  PreparedStatement pstmt=null;
  ResultSet rs=null;
  String sql="SELECT * FROM AD_Role_OrgAccess " + "WHERE AD_Role_ID=? AND IsActive='Y'";
  try {
    pstmt=DB.prepareStatement(sql,get_TrxName());
    pstmt.setInt(1,getAD_Role_ID());
    rs=pstmt.executeQuery();
    while (rs.next()) {
      MRoleOrgAccess oa=new MRoleOrgAccess(getCtx(),rs,get_TrxName());
      loadOrgAccessAdd(list,new OrgAccess(oa.getAD_Client_ID(),oa.getAD_Org_ID(),oa.isReadOnly()));
    }
  }
 catch (  Exception e) {
    log.log(Level.SEVERE,sql,e);
  }
 finally {
    DB.close(rs,pstmt);
  }
}

private void loadOrgAccessRole ( ArrayList < OrgAccess > list ) { PreparedStatement pstmt = null ; ResultSet rs = null ; String sql = "SELECT * FROM AD_Role_OrgAccess " + "WHERE AD_Role_ID=? AND IsActive='Y'" ; try { pstmt = DB . prepareStatement ( sql , get_TrxName ( ) ) ; pstmt . setInt ( 1 , getAD_Role_ID ( ) ) ; rs = pstmt . executeQuery ( ) ; while ( rs . next ( ) ) { MRoleOrgAccess oa = new MRoleOrgAccess ( getCtx ( ) , rs , get_TrxName ( ) ) ; loadOrgAccessAdd ( list , new OrgAccess ( oa . getAD_Client_ID ( ) , oa . getAD_Org_ID ( ) , oa . isReadOnly ( ) ) ) ; } } catch ( Exception e ) { log . log ( Level . SEVERE , sql , e ) ; } finally { DB . close ( rs , pstmt ) ; } }
load org access role
