예제 #1
0
 public boolean isReferenceOverlappingWithSomeProperty(String reference) throws XavaException {
   Iterator it = getReferenceMapping(reference).getDetails().iterator();
   while (it.hasNext()) {
     ReferenceMappingDetail d = (ReferenceMappingDetail) it.next();
     if (containsColumn(getColumns(), d.getColumn())) {
       String property = getMappingForColumn(d.getColumn()).getProperty();
       if (!property.startsWith(reference + "_")) {
         return true;
       }
     }
   }
   return false;
 }
예제 #2
0
 /** @return Of <tt>String</tt> and not null. */
 public Collection getOverlappingPropertiesOfReference(String reference) throws XavaException {
   Collection overlappingPropertiesOfReference = new ArrayList();
   Iterator it = getReferenceMapping(reference).getDetails().iterator();
   while (it.hasNext()) {
     ReferenceMappingDetail d = (ReferenceMappingDetail) it.next();
     if (containsColumn(getColumns(), d.getColumn())) {
       String property = getMappingForColumn(d.getColumn()).getProperty();
       if (!property.startsWith(reference + "_")) {
         overlappingPropertiesOfReference.add(d.getReferencedModelProperty());
       }
     }
   }
   return overlappingPropertiesOfReference;
 }
예제 #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;
 }