private void processStartDbAttributePair(Attributes atts) { DbJoin join = new DbJoin(dbRelationship); join.setSourceName(atts.getValue("", "source")); join.setTargetName(atts.getValue("", "target")); dbRelationship.addJoin(join); }
private void processStartDbAttributePair(Attributes atts) { DbJoin join = new DbJoin(dbRelationship); join.setSourceName(atts.getValue("", "source")); join.setTargetName(atts.getValue("", "target")); dbRelationship.addJoin(join); }
/** * Returns a "reverse" join. Join source relationship is not set and must be * initialized by the caller. */ public DbJoin createReverseJoin() { DbJoin reverse = new DbJoin(); reverse.setTargetName(sourceName); reverse.setSourceName(targetName); return reverse; }
/** * Returns a "reverse" join. Join source relationship is not set and must be * initialized by the caller. */ public DbJoin createReverseJoin() { DbJoin reverse = new DbJoin(); reverse.setTargetName(sourceName); reverse.setSourceName(targetName); return reverse; }
DbJoin join = (DbJoin) joins.next(); if (join.getSource() == dbAttr) { join.setSourceName(newName);
public void setUpdatedValueAt(Object aValue, int row, int column) { DbJoin join = getJoin(row); if (join == null) { return; } String value = (String) aValue; if (column == SOURCE) { if (source == null || source.getAttribute(value) == null) { value = null; } join.setSourceName(value); } else if (column == TARGET) { if (target == null || target.getAttribute(value) == null) { value = null; } join.setTargetName(value); } fireTableRowsUpdated(row, row); }
join.setSourceName(columnName(attributes, sourceAttributeName));
join.setSourceName(columnName(attributes, sourceAttributeName));
DbJoin protoJoin = (DbJoin) joins.next(); DbJoin join = new DbJoin(rel); join.setSourceName(protoJoin.getSourceName()); join.setTargetName(protoJoin.getTargetName()); rel.addJoin(join);
for (DbJoin join : rel.getJoins()) { if (join.getSource() == dbAttribute) { join.setSourceName(newName);
/** * @param imported DbRelationship that is in db but not in model * @return generated tokens */ @Override Collection<MergerToken> createTokensForMissingOriginal(DbRelationship imported) { DbEntity originalDbEntity = getOriginalSourceDbEntity(imported); DbEntity targetEntity = getOriginalTargetDbEntity(imported); if (targetEntity != null) { imported.setTargetEntityName(targetEntity); } imported.setSourceEntity(originalDbEntity); // manipulate the joins to match the DbAttributes in the model for (DbJoin join : imported.getJoins()) { DbAttribute sourceAttr = findDbAttribute(originalDbEntity, join.getSourceName()); if (sourceAttr != null) { join.setSourceName(sourceAttr.getName()); } DbAttribute targetAttr = findDbAttribute(targetEntity, join.getTargetName()); if (targetAttr != null) { join.setTargetName(targetAttr.getName()); } } // Add all relationships. Tokens will decide whether or not to execute MergerToken token = getTokenFactory().createDropRelationshipToDb(originalDbEntity, imported); return Collections.singleton(token); }