org.apache.cayenne.merge
Class DbMerger

java.lang.Object
  extended by org.apache.cayenne.merge.DbMerger

public class DbMerger
extends Object

Traverse a DataNode and a DataMap and create a group of MergerTokens to alter the DataNode data store to match the DataMap.


Constructor Summary
DbMerger()
           
 
Method Summary
 List<MergerToken> createMergeTokens(DataNode dataNode, DataMap dataMap)
          Create and return a List of MergerTokens 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 MergerTokens 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 MergerTokens 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 MergerTokens to alter the given DataNode to match the given DataMap



Copyright © 2001-2011 Apache Cayenne. All Rights Reserved.