tbrugz.sqldiff.model.ColumnDiffAdapter Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of sqldump Show documentation
Show all versions of sqldump Show documentation
Utility to dump schema and data from a RDBMS
package tbrugz.sqldiff.model;
import javax.xml.bind.annotation.adapters.XmlAdapter;
import tbrugz.sqldiff.model.adapted.TCDiff;
public class ColumnDiffAdapter extends XmlAdapter {
@Override
public ColumnDiff unmarshal(TCDiff v) throws Exception {
return new ColumnDiff(v.changeType, v.schemaName, v.tableName, v.previousColumn, v.column);
}
@Override
public TCDiff marshal(ColumnDiff v) throws Exception {
TCDiff adapted = new TCDiff();
adapted.changeType = v.getChangeType();
adapted.schemaName = v.schemaName;
adapted.tableName = v.tableName;
adapted.column = v.column;
adapted.previousColumn = v.previousColumn;
return adapted;
}
}