Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.cayenne.util
Class EntityMergeSupport

    java.lang.Object
      org.apache.cayenne.util.EntityMergeSupport

    public class EntityMergeSupport

extends java.lang.Object

Implements methods for entity merging.

Author:
  Andrus Adamchik

Field Summary
`protected DataMap` | `map`
`protected boolean` | `removeMeaningfulFKs`

Constructor Summary
`EntityMergeSupport(DataMap map)`

Method Summary
`protected java.util.List` | `getAttributesToAdd(ObjEntity objEntity)` Returns a list of attributes that exist in the DbEntity, but are missing from the ObjEntity.
`DataMap` | `getMap()`
`java.util.Collection` | `getMeaningfulFKs(ObjEntity objEntity)` Returns a list of ObjAttributes that are mapped to foreign keys.
`protected java.util.List` | `getRelationshipsToAdd(ObjEntity objEntity)`
`boolean` | `isRemoveMeaningfulFKs()`
`void` | `setMap(DataMap map)`
`void` | `setRemoveMeaningfulFKs(boolean removeMeaningfulFKs)`
`boolean` | `synchronizeWithDbEntities(java.util.Collection 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

### map

    protected DataMap map

### removeMeaningfulFKs

    protected boolean removeMeaningfulFKs

Constructor Detail

### EntityMergeSupport

    public EntityMergeSupport(DataMap map)

Method Detail

### synchronizeWithDbEntities

    public boolean synchronizeWithDbEntities(java.util.Collection objEntities)

  Updates each one of the collection of ObjEntities, adding attributes and relationships based on the current state of its DbEntity.

  Since:
    1.2 changed signature to use Collection instead of List.

### synchronizeWithDbEntity

    public boolean synchronizeWithDbEntity(ObjEntity entity)

  Updates ObjEntity attributes and relationships based on the current state of its DbEntity.

  Returns:
    true if the ObjEntity has changed as a result of synchronization.

### getMeaningfulFKs

    public java.util.Collection getMeaningfulFKs(ObjEntity objEntity)

  Returns a list of ObjAttributes that are mapped to foreign keys.

  Since:
    1.2

### getAttributesToAdd

    protected java.util.List getAttributesToAdd(ObjEntity objEntity)

  Returns a list of attributes that exist in the DbEntity, but are missing from the ObjEntity.

### getRelationshipsToAdd

    protected java.util.List getRelationshipsToAdd(ObjEntity objEntity)

### getMap

    public DataMap getMap()

### setMap

    public void setMap(DataMap map)

### isRemoveMeaningfulFKs

    public boolean isRemoveMeaningfulFKs()

  Since:
    1.2

### setRemoveMeaningfulFKs

    public void setRemoveMeaningfulFKs(boolean removeMeaningfulFKs)

  Since:
    1.2

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2001-2006 Apache.org All Rights Reserved.