org.apache.cayenne.merge

## Class DbMerger

- java.lang.Object
- - org.apache.cayenne.merge.DbMerger

-     public class DbMerger
      extends Object

  Traverse a `DataNode` and a `DataMap` and create a group of `MergerToken`s to alter the `DataNode` data store to match the `DataMap`.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `DbMerger()`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `List<MergerToken>` | `createMergeTokens(DataNode dataNode, DataMap dataMap)` Create and return a `List` of `MergerToken`s to alter the given `DataNode` to match the given `DataMap`
    `List<MergerToken>` | `createMergeTokens(DbAdapter adapter, DataSource dataSource, DataMap dataMap)` Create and return a `List` of `MergerToken`s to alter the given `DataNode` to match the given `DataMap`
    `boolean` | `includeTableName(String tableName)` A method that return true if the given table name should be included.
    `void` | `setValueForNullProvider(ValueForNullProvider valueProvider)` Set a `ValueForNullProvider` that will be used to set value for null on not null columns

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### DbMerger

          public DbMerger()

  - ### Method Detail

    - #### setValueForNullProvider

          public void setValueForNullProvider(ValueForNullProvider valueProvider)

      Set a `ValueForNullProvider` that will be used to set value for null on not null columns

    - #### includeTableName

          public boolean includeTableName(String tableName)

      A method that return true if the given table name should be included. The default implementation include all tables.

    - #### createMergeTokens

          public List<MergerToken> createMergeTokens(DataNode dataNode,
                                            DataMap dataMap)

      Create and return a `List` of `MergerToken`s to alter the given `DataNode` to match the given `DataMap`

    - #### createMergeTokens

          public List<MergerToken> createMergeTokens(DbAdapter adapter,
                                            DataSource dataSource,
                                            DataMap dataMap)

      Create and return a `List` of `MergerToken`s to alter the given `DataNode` to match the given `DataMap`

Copyright © 2001–2014 Apache Cayenne. All rights reserved.