コード例 #1
0
ファイル: MetaTab.java プロジェクト: OpenXavaEx/OpenXavaEx
 private List createAllPropertiesNames() throws XavaException {
   List result = new ArrayList();
   // First the properties from a possible @EmbeddedId
   for (Iterator itRef = getMetaModel().getMetaReferencesKey().iterator(); itRef.hasNext(); ) {
     MetaReference ref = (MetaReference) itRef.next();
     if (ref.isAggregate()) {
       for (Iterator itKey =
               ref.getMetaModelReferenced()
                   .getPropertiesNamesWithoutHiddenNorTransient()
                   .iterator();
           itKey.hasNext(); ) {
         result.add(ref.getName() + "." + itKey.next());
       }
     }
   }
   // Now the plain properties
   result.addAll(getMetaModel().getPropertiesNamesWithoutHiddenNorTransient());
   return result;
 }
コード例 #2
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();
 }
コード例 #3
0
 public boolean hasReferenceMapping(MetaReference metaReference) {
   if (referenceMappings == null) return false;
   return referenceMappings.containsKey(metaReference.getName());
 }