| 
 | ||||||||||
| 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  List<EntityMergeListener> | listenersListeners of merge process. | 
| protected  DataMap | map | 
| protected  NamingStrategy | namingStrategyStrategy 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  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() | 
|  Collection<DbAttribute> | getMeaningfulFKs(ObjEntity objEntity)Returns a list of DbAttributes that are mapped to foreign keys. | 
|  NamingStrategy | getNamingStrategy() | 
| protected  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(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 List<EntityMergeListener> listeners
| Constructor Detail | 
|---|
public EntityMergeSupport(DataMap map)
public EntityMergeSupport(DataMap map,
                          NamingStrategy namingStrategy,
                          boolean removeMeaningfulPKs)
| Method Detail | 
|---|
public boolean synchronizeWithDbEntities(Collection<ObjEntity> objEntities)
public boolean synchronizeWithDbEntity(ObjEntity entity)
public Collection<DbAttribute> getMeaningfulFKs(ObjEntity objEntity)
protected List<DbAttribute> getAttributesToAdd(ObjEntity objEntity)
protected 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 | |||||||||