Setup DMT Framework
To use DMT Framework, you need following steps:
- dmt_{version}.jar
- defaultExternalizerConfig.xml
- xalan.jar ( if your project don't have it)
- Make your Domain Model implement java.io.Externalizable
and add required method by copy code below:
public void
readExternal(ObjectInput in) throws IOException, ClassNotFoundException
{
if (in instanceof DMTVisitor) {
((DMTVisitor)
in).accept(this);
return;
}
// TODO: you can add your own implementation here,
but it will only be
// used if you don't use DMTFramework
}
public void writeExternal(ObjectOutput out) throws IOException {
if (out instanceof DMTVisitor) {
((DMTVisitor)
out).accept(this);
return;
}
// TODO: you can add your own implementation here,
but it will only be
// used if you don't use DMTFramework
}
- Only super class need to be implemented.
Note: For future release of Eclipse
plug in, it will automatically anylize your code and generate this
implementation for you.
That's it!