/** * INTERNAL: * The returns if the mapping has any constraint dependencies, such as foreign keys and join tables. */ public boolean hasConstraintDependency() { return isForeignKeyRelationship(); }
/** * INTERNAL: * Insert privately owned parts */ public void preInsert(WriteObjectQuery query) throws DatabaseException, OptimisticLockException { if (isForeignKeyRelationship()) { insert(query); } }
/** * INTERNAL: * Insert privately owned parts */ public void postInsert(WriteObjectQuery query) throws DatabaseException, OptimisticLockException { if (!isForeignKeyRelationship()) { insert(query); } }
if (outerExpression.getMapping().isObjectReferenceMapping() && ((ObjectReferenceMapping) outerExpression.getMapping()).isForeignKeyRelationship()) { sourceTable = (DatabaseTable)((DatabaseField) outerExpression.getMapping().getFields().firstElement()).getTable(); } else {
/** * INTERNAL: * Update privately owned parts */ public void preUpdate(WriteObjectQuery query) throws DatabaseException, OptimisticLockException { if (!isAttributeValueInstantiated(query.getObject())) { return; } if (isPrivateOwned()) { Object objectInDatabase = readPrivateOwnedForObject(query); if (objectInDatabase != null) { query.setProperty(this, objectInDatabase); } } if (!isForeignKeyRelationship()) { return; } update(query); }
if (outerExpression.getMapping().isObjectReferenceMapping() && ((ObjectReferenceMapping) outerExpression.getMapping()).isForeignKeyRelationship()) { sourceTable = (DatabaseTable)((DatabaseField) outerExpression.getMapping().getFields().firstElement()).getTable(); } else {
if (!isForeignKeyRelationship()) { update(query);
if (isForeignKeyRelationship()) { if (object != null) { query.removeProperty(this);
if (!isForeignKeyRelationship()) { if (objectInMemory != null) {