// Path: redquerybuilder-core/src/main/java/java/sql/SQLException.java
// public class SQLException extends Exception {
//     public SQLException(String m) {
//         super(m);
//     }
// 
//     public SQLException(String m, Throwable t) {
//         super(m, t);
//     }
// 
// 
//     public int getErrorCode() {
//         return 0;
//     }
// }


import java.io.IOException;
import java.sql.Connection;
import java.sql.DatabaseMetaData;
import java.sql.DriverManager;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.ArrayList;
import java.util.List;
import java.util.PropertyResourceBundle;
import java.util.ResourceBundle;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.json.JSONArray;
import org.json.JSONException;
import org.json.JSONObject;
                            int keySeq = rs2.getInt("KEY_SEQ");

                            if (keySeq == 1) {
                                fk = new ForeignKey();
                                String name = rs2.getString("FK_NAME");
                                fk.name = name;
                                fksx.add(fk);

                                String key = "fk." + name;
                                fk.label = getLocal(key);
                                fk.reverseLabel = getLocal(key + ".reverse");

                                fk.fkTableName = rs2.getString("FKTABLE_NAME");
                            }

                            fk.fkColumnNames.add(rs2
                                    .getString("FKCOLUMN_NAME"));
                            fk.pkColumnNames.add(rs2
                                    .getString("PKCOLUMN_NAME"));
                        }
                        for (ForeignKey foo2 : fksx) {
                            fks.put(foo2.toJson());
                        }
                    }
                }
            }

            res.setContentType("application/json");

            root.write(res.getWriter());
// Path: redquerybuilder-core/src/main/java/java/sql/SQLException.java
// public class SQLException extends Exception {
//     public SQLException(String m) {
//         super(m);
//     }
// 
//     public SQLException(String m, Throwable t) {
//         super(m, t);
//     }
// 
// 
//     public int getErrorCode() {
//         return 0;
//     }
// }


// Path: redquerybuilder-jdbcsample/src/main/java/com/redspr/redquerybuilder/sample/MetaServlet.java
import java.io.IOException;
import java.sql.Connection;
import java.sql.DatabaseMetaData;
import java.sql.DriverManager;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.ArrayList;
import java.util.List;
import java.util.PropertyResourceBundle;
import java.util.ResourceBundle;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.json.JSONArray;
import org.json.JSONException;
import org.json.JSONObject;

                            int keySeq = rs2.getInt("KEY_SEQ");

                            if (keySeq == 1) {
                                fk = new ForeignKey();
                                String name = rs2.getString("FK_NAME");
                                fk.name = name;
                                fksx.add(fk);

                                String key = "fk." + name;
                                fk.label = getLocal(key);
                                fk.reverseLabel = getLocal(key + ".reverse");

                                fk.fkTableName = rs2.getString("FKTABLE_NAME");
                            }

                            fk.fkColumnNames.add(rs2
                                    .getString("FKCOLUMN_NAME"));
                            fk.pkColumnNames.add(rs2
                                    .getString("PKCOLUMN_NAME"));
                        }
                        for (ForeignKey foo2 : fksx) {
                            fks.put(foo2.toJson());
                        }
                    }
                }
            }

            res.setContentType("application/json");

            root.write(res.getWriter());
        } catch (SQLException ex) {