com.rapleaf.jack.queries.AbstractDeleteBuilder Maven / Gradle / Ivy
package com.rapleaf.jack.queries;
import java.io.IOException;
import java.util.Collection;
import com.rapleaf.jack.IModelPersistence;
import com.rapleaf.jack.ModelWithId;
public abstract class AbstractDeleteBuilder {
private ModelDelete delete;
private IModelPersistence caller;
public AbstractDeleteBuilder(IModelPersistence caller) {
this.caller = caller;
this.delete = new ModelDelete();
}
protected void addWhereConstraint(WhereConstraint whereConstraint) {
delete.addConstraint(whereConstraint);
}
protected void addIds(Collection ids) {
delete.addIds(ids);
}
protected void addId(Long id) {
delete.addId(id);
}
public boolean execute() throws IOException {
return this.caller.delete(this.delete);
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy