Search in sources :

Example 41 with MergerToken

use of org.apache.cayenne.dbsync.merge.token.MergerToken in project cayenne by apache.

the class MergerTokenTableModel method setValueAt.

public void setValueAt(Object value, int rowIndex, int columnIndex) {
    MergerToken token = getToken(rowIndex);
    switch(columnIndex) {
        case COL_SELECT:
            Boolean val = (Boolean) value;
            getController().select(token, val.booleanValue());
            break;
        case COL_DIRECTION:
            MergeDirection direction = (MergeDirection) value;
            getController().setDirection(token, direction);
            break;
    }
}
Also used : MergeDirection(org.apache.cayenne.dbsync.merge.context.MergeDirection) MergerToken(org.apache.cayenne.dbsync.merge.token.MergerToken)

Aggregations

MergerToken (org.apache.cayenne.dbsync.merge.token.MergerToken)41 Test (org.junit.Test)25 DbEntity (org.apache.cayenne.map.DbEntity)20 DataMap (org.apache.cayenne.map.DataMap)17 DbAttribute (org.apache.cayenne.map.DbAttribute)10 ObjEntity (org.apache.cayenne.map.ObjEntity)8 LinkedList (java.util.LinkedList)5 ObjAttribute (org.apache.cayenne.map.ObjAttribute)5 SetColumnTypeToDb (org.apache.cayenne.dbsync.merge.token.db.SetColumnTypeToDb)4 DbJoin (org.apache.cayenne.map.DbJoin)3 DbRelationship (org.apache.cayenne.map.DbRelationship)3 Connection (java.sql.Connection)2 SQLException (java.sql.SQLException)2 DataSource (javax.sql.DataSource)2 MergerContext (org.apache.cayenne.dbsync.merge.context.MergerContext)2 DbLoaderConfiguration (org.apache.cayenne.dbsync.reverse.dbload.DbLoaderConfiguration)2 ObjRelationship (org.apache.cayenne.map.ObjRelationship)2 ArrayList (java.util.ArrayList)1 AbstractTableModel (javax.swing.table.AbstractTableModel)1 CayenneRuntimeException (org.apache.cayenne.CayenneRuntimeException)1