static void validate(){
  String sql="SELECT AD_Table_ID, TableName FROM AD_Table WHERE IsView='N' ORDER BY TableName";
  PreparedStatement pstmt=null;
  ResultSet rs=null;
  try {
    pstmt=DB.prepareStatement(sql,null);
    rs=pstmt.executeQuery();
    while (rs.next()) {
      validate(rs.getInt(1),rs.getString(2));
    }
  }
 catch (  Exception e) {
    log.log(Level.SEVERE,sql,e);
  }
 finally {
    DB.close(rs,pstmt);
    rs=null;
    pstmt=null;
  }
}

static void validate ( ) { String sql = "SELECT AD_Table_ID, TableName FROM AD_Table WHERE IsView='N' ORDER BY TableName" ; PreparedStatement pstmt = null ; ResultSet rs = null ; try { pstmt = DB . prepareStatement ( sql , null ) ; rs = pstmt . executeQuery ( ) ; while ( rs . next ( ) ) { validate ( rs . getInt ( 1 ) , rs . getString ( 2 ) ) ; } } catch ( Exception e ) { log . log ( Level . SEVERE , sql , e ) ; } finally { DB . close ( rs , pstmt ) ; rs = null ; pstmt = null ; } }
validate all tables for ad_table / record_id relationships
