예제 #1
0
 private Collection getTableColumns(Collection propertyNames) throws XavaException {
   Collection tableColumns = new ArrayList();
   Iterator it = propertyNames.iterator();
   while (it.hasNext()) {
     String name = (String) it.next();
     try {
       tableColumns.add(getMapping().getQualifiedColumn(name));
     } catch (ElementNotFoundException ex) {
       tableColumns.add("0"); // It will be replaced
     }
   }
   return tableColumns;
 }
예제 #2
0
 /** @return Not null, read only and of type <tt>MetaProperty</tt>. */
 public Collection getMetaPropertiesHiddenCalculated() throws XavaException {
   if (metaPropertiesHiddenCalculated == null) {
     metaPropertiesHiddenCalculated = new ArrayList();
     Iterator it = getMetaPropertiesHidden().iterator();
     while (it.hasNext()) {
       MetaProperty metaProperty = (MetaProperty) it.next();
       if (metaProperty.isCalculated()) {
         metaPropertiesHiddenCalculated.add(metaProperty);
       }
     }
   }
   return metaPropertiesHiddenCalculated;
 }
예제 #3
0
 // 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;
 }
예제 #4
0
 public Collection getCmpFieldsColumnsInMultipleProperties() throws XavaException {
   Collection cmpFieldsColumnsInMultipleProperties = new ArrayList();
   Iterator it = getMetaProperties().iterator();
   String table = getMapping().getTableToQualifyColumn();
   while (it.hasNext()) {
     MetaProperty p = (MetaProperty) it.next();
     PropertyMapping mapping = p.getMapping();
     if (mapping != null) {
       if (mapping.hasMultipleConverter()) {
         Iterator itFields = mapping.getCmpFields().iterator();
         while (itFields.hasNext()) {
           CmpField field = (CmpField) itFields.next();
           cmpFieldsColumnsInMultipleProperties.add(table + "." + field.getColumn());
         }
       }
     }
   }
   return cmpFieldsColumnsInMultipleProperties;
 }
예제 #5
0
 public void addMetaRowStyle(MetaRowStyle style) {
   if (rowStyles == null) rowStyles = new ArrayList();
   rowStyles.add(style);
 }