示例#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;
 }