li.strolch.persistence.api.TxAddStrolchRootElementVisitor Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of agent Show documentation
Show all versions of agent Show documentation
Strolch Agent which is the runtime for Strolch
The newest version!
package li.strolch.persistence.api;
import li.strolch.model.Order;
import li.strolch.model.Resource;
import li.strolch.model.activity.Activity;
import li.strolch.model.visitor.StrolchRootElementVisitor;
public class TxAddStrolchRootElementVisitor implements StrolchRootElementVisitor {
private final StrolchTransaction tx;
public TxAddStrolchRootElementVisitor(StrolchTransaction tx) {
this.tx = tx;
}
@Override
public Void visitOrder(Order order) {
tx.add(order);
return null;
}
@Override
public Void visitResource(Resource resource) {
tx.add(resource);
return null;
}
@Override
public Void visitActivity(Activity activity) {
tx.add(activity);
return null;
}
}