All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.rapleaf.jack.queries.AbstractDeleteBuilder Maven / Gradle / Ivy

There is a newer version: 1.8
Show newest version
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