Beispiel #1
0
 public static java.util.List getUsedColumnStub(DictMetadata dmd) {
   StubObject so;
   String colid;
   List usedColList = new ArrayList();
   if (dmd.getTableMetadata() == null) return usedColList;
   List list = dmd.getTableMetadata().getColList();
   for (int col = 0; col < list.size(); col++) {
     so = (StubObject) list.get(col);
     if (so.getInt("F_STAU", 0) == 0) continue;
     colid = so.getString("COL_ID", "");
     if ("DWZD_BH".equals(colid)) so.setString("COL_EDIT", "1");
     usedColList.add(new ColumnMetaData(so));
   }
   java.util.Collections.sort(
       usedColList,
       new Comparator() {
         public int compare(Object o1, Object o2) {
           ColumnMetaData cmd1 = (ColumnMetaData) o1;
           ColumnMetaData cmd2 = (ColumnMetaData) o2;
           int disp1 = cmd1.getColDisp();
           int disp2 = cmd2.getColDisp();
           if (disp1 == disp2) return 0;
           if (disp1 < disp2) return -1;
           return 1;
         }
       });
   return usedColList;
 }
  // ------------------------------------------------------------------------------------------------
  // 描述:
  // 设计: Skyline(2001.12.29)
  // 实现: Skyline
  // 修改:
  // ------------------------------------------------------------------------------------------------
  public void InitObject(Element PublicElement, Element PrivateElement, String OpFrom) {
    /*
        List nodelist;Element RFElement=null;Element node;int i=0;String Name="FunctionManager";
        if ( PublicElement == null ) System.out.println("PublicElement=null");
        if ( PrivateElement == null ) System.out.println("PrivateElement=null");
        RFElement = JActiveDComDM.XMLRegistry.GetElementByName(PublicElement,Name);
        if ( RFElement == null ) return;
        InitFunctionConfigXML(RFElement.getAttribute("functionconfig").getValue());
        JFunctionStub FS;
        nodelist = JActiveDComDM.XMLRegistry.BeginEnumerate(RFElement);
        while ( nodelist != null ) {
          node = JActiveDComDM.XMLRegistry.Enumerate(nodelist,i);
          if ( node == null ) break;
    //      if ( node.getNodeType() == node.ELEMENT_NODE ) {
            RFElement     = (Element)node;
            FS            = new JFunctionStub();
            FS.FunctionID = RFElement.getAttribute("id").getValue().toUpperCase();
            FS.ClassName  = RFElement.getAttribute("class").getValue();
            FunctionList.add(FS);
    //      }
          i++;
        }
        JActiveDComDM.XMLRegistry.EndEnumerate();
     */
    Element RFElement = null;
    Element node;
    int i = 0;
    String Name = "FunctionManager";
    if (PublicElement == null) System.out.println("PublicElement=null");
    if (PrivateElement == null) System.out.println("PrivateElement=null");
    RFElement = JActiveDComDM.XMLRegistry.GetElementByName(PublicElement, Name);
    if (RFElement == null) return;
    InitFunctionConfigXML(RFElement.getAttribute("functionconfig").getValue());

    java.util.List nodelist = PackageStub.getContentVector("fmisReportFunction");
    JFunctionStub FS;
    StubObject so = null;
    for (i = 0; i < nodelist.size(); i++) {
      so = (StubObject) nodelist.get(i);
      FS = new JFunctionStub();
      FS.FunctionID = so.getString("id", "");
      ;
      FS.ClassName = so.getString(OpFrom, "");
      ;
      FunctionList.add(FS);
    }
  }
Beispiel #3
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);
 }
 /**
  * @param ParamObject Object
  * @param DataObject Object
  * @param CustomObject Object
  * @param AddeitiveObject Object
  * @return Object
  */
 public Object InitObject(
     Object ParamObject, Object DataObject, Object CustomObject, Object AddeitiveObject) {
   // ��ȡ��ݿ����б�
   java.util.List dblist = PackageStub.getContentVector("databases");
   if (dblist == null) {
     return null;
   }
   StubObject SO = null;
   for (int i = 0; i < dblist.size(); i++) {
     SO = (StubObject) dblist.get(i);
     if (SO == null) {
       continue;
     }
     JDataSourceStub DSS = new JDataSourceStub();
     DSS.DataBaseType =
         SO.getString("id", null); // EAI.Registry.GetElementValue(DBElement,"DataBaseType");
     DSS.classname =
         SO.getString("class", null); // .Registry.GetElementValue(DBElement,"classname");
     DSS.dbclass =
         SO.getString("dbclass", null); // EAI.Registry.GetElementValue(DBElement,"dbclass");
     DBList.add(DSS);
   }
   return null;
 }