admin 管理员组

文章数量: 887083


2024年1月17日发(作者:microsoft sql server2012)

try {n(strsql);PreparedStatement pstmt = eStatement(strsql);eQuery();ResultSetMetaData rsmd = aData();int size = umnCount(); // 共有多少列colnames = new String[size];colTypes = new String[size];colSizes = new int[size];colScale = new int[size];for (int i = 0; i < umnCount(); i++) {alogName(i + 1);colnames[i] = umnName(i + 1).toLowerCase();colTypes[i] = umnTypeName(i + 1).toLowerCase();colScale[i] = le(i + 1);n(alogName(i + 1));if ("datetime".equals(colTypes[i])) {importUtil = true;}if ("image".equals(colTypes[i]) || "text".equals(colTypes[i])) {importSql = true;}if (colScale[i] > 0) {importMath = true;}colSizes[i] = cision(i + 1);}String content = parse(colnames, colTypes, colSizes);try {FileWriter fw = new FileWriter(initcap(tablename) + ".java");PrintWriter pw = new PrintWriter(fw);n(content);();();

** @param sb*/private void processAllMethod(StringBuffer sb) {for (int i = 0; i < ; i++) {("tpublic void set"+ initcap(colnames[i])+ "("+ oracleSqlType2JavaType(colTypes[i], colScale[i],colSizes[i]) + " " + colnames[i] + "){rn");("ttthis." + colnames[i] + "=" + colnames[i] + ";rn");("t}rn");("tpublic "+ oracleSqlType2JavaType(colTypes[i], colScale[i],colSizes[i]) + " get" + initcap(colnames[i])+ "(){rn");("ttreturn " + colnames[i] + ";rn");("t}rn");}}/*** 解析输出属性** @return*/private void processAllAttrs(StringBuffer sb) {("tprivate static final long serialVersionUID = 1L;rn");for (int i = 0; i < ; i++) {("tprivate "+ oracleSqlType2JavaType(colTypes[i], colScale[i],colSizes[i]) + " " + colnames[i] + ";rn");}("rn");}

} catch (SQLException e) {tackTrace();}conn = null;}}/*** @param args*/public static void main(String[] args) {GenerateJavaFileUtils t = new GenerateJavaFileUtils();oEntity("users");}}


本文标签: 输出 解析 属性