|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.cayenne.util.EntityMergeSupport
public class EntityMergeSupport
Implements methods for entity merging.
Field Summary | |
---|---|
protected java.util.List<EntityMergeListener> |
listeners
Listeners of merge process. |
protected DataMap |
map
|
protected NamingStrategy |
namingStrategy
Strategy for choosing names for entities, attributes and relationships |
protected boolean |
removeMeaningfulFKs
|
protected boolean |
removeMeaningfulPKs
|
Constructor Summary | |
---|---|
EntityMergeSupport(DataMap map)
|
|
EntityMergeSupport(DataMap map,
NamingStrategy namingStrategy,
boolean removeMeaningfulPKs)
|
Method Summary | |
---|---|
void |
addEntityMergeListener(EntityMergeListener listener)
Registers new EntityMergeListener |
protected void |
fireAttributeAdded(ObjAttribute attr)
Notifies all listeners that an ObjAttribute was added |
protected void |
fireRelationshipAdded(ObjRelationship rel)
Notifies all listeners that an ObjRelationship was added |
protected java.util.List<DbAttribute> |
getAttributesToAdd(ObjEntity objEntity)
Returns a list of attributes that exist in the DbEntity, but are missing from the ObjEntity. |
EntityMergeListener[] |
getEntityMergeListeners()
Returns registered listeners |
DataMap |
getMap()
|
java.util.Collection<DbAttribute> |
getMeaningfulFKs(ObjEntity objEntity)
Returns a list of DbAttributes that are mapped to foreign keys. |
NamingStrategy |
getNamingStrategy()
|
protected java.util.List<DbRelationship> |
getRelationshipsToAdd(ObjEntity objEntity)
|
boolean |
isRemoveMeaningfulFKs()
|
void |
removeEntityMergeListener(EntityMergeListener listener)
Unregisters an EntityMergeListener |
void |
setMap(DataMap map)
|
void |
setNamingStrategy(NamingStrategy strategy)
Sets new naming strategy for reverse engineering |
void |
setRemoveMeaningfulFKs(boolean removeMeaningfulFKs)
|
boolean |
synchronizeWithDbEntities(java.util.Collection<ObjEntity> objEntities)
Updates each one of the collection of ObjEntities, adding attributes and relationships based on the current state of its DbEntity. |
boolean |
synchronizeWithDbEntity(ObjEntity entity)
Updates ObjEntity attributes and relationships based on the current state of its DbEntity. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected DataMap map
protected boolean removeMeaningfulFKs
protected boolean removeMeaningfulPKs
protected NamingStrategy namingStrategy
protected java.util.List<EntityMergeListener> listeners
Constructor Detail |
---|
public EntityMergeSupport(DataMap map)
public EntityMergeSupport(DataMap map, NamingStrategy namingStrategy, boolean removeMeaningfulPKs)
Method Detail |
---|
public boolean synchronizeWithDbEntities(java.util.Collection<ObjEntity> objEntities)
public boolean synchronizeWithDbEntity(ObjEntity entity)
public java.util.Collection<DbAttribute> getMeaningfulFKs(ObjEntity objEntity)
protected java.util.List<DbAttribute> getAttributesToAdd(ObjEntity objEntity)
protected java.util.List<DbRelationship> getRelationshipsToAdd(ObjEntity objEntity)
public DataMap getMap()
public void setMap(DataMap map)
public boolean isRemoveMeaningfulFKs()
public void setRemoveMeaningfulFKs(boolean removeMeaningfulFKs)
public void addEntityMergeListener(EntityMergeListener listener)
public void removeEntityMergeListener(EntityMergeListener listener)
public EntityMergeListener[] getEntityMergeListeners()
protected void fireAttributeAdded(ObjAttribute attr)
protected void fireRelationshipAdded(ObjRelationship rel)
public void setNamingStrategy(NamingStrategy strategy)
public NamingStrategy getNamingStrategy()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |