Example #1
1
 private boolean containsColumn(Collection columns, String column) {
   if (columns.contains(column)) return true;
   for (Iterator it = columns.iterator(); it.hasNext(); ) {
     if (((String) it.next()).equalsIgnoreCase(column)) return true;
   }
   return false;
 }
Example #2
0
 public Collection getPropertyMappingsNotInModel() throws XavaException {
   Collection names = new ArrayList(getModelProperties());
   names.removeAll(getMetaModel().getPropertiesNames());
   if (names.isEmpty()) return Collections.EMPTY_LIST;
   Collection result = new ArrayList();
   for (Iterator it = names.iterator(); it.hasNext(); ) {
     String name = (String) it.next();
     if (name.indexOf('_') < 0) {
       result.add(getPropertyMapping(name));
     }
   }
   return result;
 }
Example #3
0
 public Collection getReferenceMappingsWithConverter() {
   if (referenceMappingsWithConverter == null) {
     referenceMappingsWithConverter = new ArrayList();
     Iterator it = getReferenceMappings().iterator();
     while (it.hasNext()) {
       ReferenceMapping referenceMapping = (ReferenceMapping) it.next();
       Collection mrd = referenceMapping.getDetails();
       Iterator itd = mrd.iterator();
       while (itd.hasNext()) {
         ReferenceMappingDetail referenceMappingDetail = (ReferenceMappingDetail) itd.next();
         if (referenceMappingDetail.hasConverter()) {
           referenceMappingsWithConverter.add(referenceMapping);
         }
       }
     }
   }
   return referenceMappingsWithConverter;
 }