コード例 #1
0
 public Collection getMetaPropertiesArguments() throws XavaException {
   StringTokenizer st = new StringTokenizer(getArguments(), ",");
   Collection result = new ArrayList();
   while (st.hasMoreTokens()) {
     String argument = st.nextToken();
     StringTokenizer argumentSt = new StringTokenizer(argument);
     String type = argumentSt.nextToken().trim();
     String name = argumentSt.nextToken().trim();
     MetaProperty p = new MetaProperty();
     p.setName(name);
     p.setTypeName(type);
     result.add(p);
   }
   return result;
 }
コード例 #2
0
ファイル: MetaTab.java プロジェクト: OpenXavaEx/OpenXavaEx
 // assert(!areAllProperties());
 private List createPropertiesNames() {
   StringTokenizer st = new StringTokenizer(removeTotalProperties(properties), ",;");
   List result = new ArrayList();
   while (st.hasMoreTokens()) {
     String name = st.nextToken().trim();
     if (name.endsWith("+")) {
       name = name.substring(0, name.length() - 1);
       if (sumPropertiesNames == null) sumPropertiesNames = new HashSet();
       sumPropertiesNames.add(name);
     }
     result.add(name);
   }
   return result;
 }
コード例 #3
0
 private String transformAgregateProperty(String property) {
   StringBuffer result = new StringBuffer();
   StringTokenizer st = new StringTokenizer(property, ".");
   String member = "";
   while (st.hasMoreTokens()) {
     String token = st.nextToken();
     result.append(token);
     if (!st.hasMoreTokens()) break;
     member = member + token;
     try {
       MetaReference ref = getMetaModel().getMetaReference(member);
       if (ref.isAggregate()) result.append('_');
       else result.append('.');
     } catch (XavaException ex) {
       result.append('.');
     }
     member = member + ".";
   }
   return result.toString();
 }