li.strolch.persistence.api.TxRemoveStrolchRootElementVisitor 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 TxRemoveStrolchRootElementVisitor implements StrolchRootElementVisitor {
private final StrolchTransaction tx;
public TxRemoveStrolchRootElementVisitor(StrolchTransaction tx) {
this.tx = tx;
}
@Override
public Void visitOrder(Order order) {
tx.remove(order);
return null;
}
@Override
public Void visitResource(Resource resource) {
tx.remove(resource);
return null;
}
@Override
public Void visitActivity(Activity activity) {
tx.remove(activity);
return null;
}
}