public MapperBuilder matchById() { Collection<DbAttribute> pks = entity.getDbEntity().getPrimaryKeys(); if (pks.isEmpty()) { throw new IllegalStateException("Target entity has no PKs defined: " + entity.getDbEntityName()); } for (DbAttribute pk : pks) { this.paths.add(ASTDbPath.DB_PREFIX + pk.getName()); } return this; }
Object dbEntity = dbEntityCache.get(oe.getDbEntityName()); if (dbEntity != null) { Object existingDB = dbEntityCache.get(entityClass);
private boolean shouldAddToObjEntity(ObjEntity entity, DbAttribute dbAttribute, Collection<DbRelationship> incomingRels) { if (dbAttribute.getName() == null || entity.getAttributeForDbAttribute(dbAttribute) != null) { return false; } boolean addMeaningfulPK = meaningfulPKsFilter.isIncluded(entity.getDbEntityName()); if (dbAttribute.isPrimaryKey()) { return addMeaningfulPK; } // check FK's if(isFK(dbAttribute, dbAttribute.getEntity().getRelationships(), true)) { return false; } // check incoming relationships return !isFK(dbAttribute, incomingRels, false); }
if (dbEntityToDelete.getName().equals(objEnt.getDbEntityName())) { objEnt.clearDbMapping(); } else {
if (entity.getDbEntityName() != null && entity.getSuperEntityName() != null) { addFailure( validationResult,
if (getDbEntityName() != null && getDbEntity() != null) { encoder.print(Util.encodeXmlAttribute(getDbEntityName()));
if (renamedDbEntities.containsKey(objEntity.getDbEntityName())) { objEntity.setDbEntityName(renamedDbEntities.get(objEntity .getDbEntityName()));
encoder.print(Util.encodeXmlAttribute(getDbEntityName()));