tbrugz.sqldiff.model.TableDiffAdapter 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.TDiff;
public class TableDiffAdapter extends XmlAdapter {
@Override
public TableDiff unmarshal(TDiff v) throws Exception {
return new TableDiff(v.changeType, v.table, v.renameFromSchema, v.renameFromName, v.previousRemarks);
}
@Override
public TDiff marshal(TableDiff v) throws Exception {
TDiff adapted = new TDiff();
adapted.changeType = v.getChangeType();
adapted.table = v.table;
adapted.renameFromSchema = v.renameFromSchema;
adapted.renameFromName = v.renameFromName;
adapted.previousRemarks = v.previousRemarks;
return adapted;
}
}