Beispiel #1
0
 /** 取数据字典的自定义属性列表STUBOBJECT */
 private static List getDictCST(JConnection conn, JParamObject PO, String dctid) {
   java.util.List maps = new ArrayList();
   Statement stmt = null;
   try {
     stmt = conn.createStatement();
     HashMap map = new HashMap();
     map.put("TABLE", "SYS_DCT_CST");
     map.put("WHERE", "DCT_ID = '" + dctid + "'");
     map.put("ORDER", "UNIT_ID,DCT_KEY");
     maps.add(map);
     return DBUtils.SimpleQuery(conn, PO, maps, stmt);
   } catch (Exception ex) {
     ex.printStackTrace();
   } finally {
     conn.BackStatement(stmt, null);
   }
   return null;
 }
Beispiel #2
0
 protected static void getSYS_DCT_CST(
     JConnection conn, JParamObject PO, DictMetadata dictMetadata, DCTMetaData DCTMeta)
     throws Exception {
   if (DCTMeta == null) return;
   TableMetadata tableMetadata = dictMetadata.getTableMetadata();
   String DCT_ID = tableMetadata.getString("OBJ_ID", "");
   java.util.List list = new ArrayList();
   java.util.Map SYS_DCT_CST = DCTMeta.getSYS_DCT_CST();
   if (SYS_DCT_CST == null) return;
   ;
   for (Iterator it = SYS_DCT_CST.keySet().iterator(); it.hasNext(); ) {
     Object key = it.next();
     Object val = SYS_DCT_CST.get(key);
     StubObject so = new StubObject();
     so.setString("UNIT_ID", "");
     so.setString("DCT_ID", DCT_ID);
     so.setString("DCT_KEY", (String) key);
     so.setString("DCT_VALUE", (String) val);
     list.add(so);
   }
   dictMetadata.setObject("SYS_DCT_CST", list);
 }