rb.templates.delete_builder_impl.erb Maven / Gradle / Ivy
<%= autogenerated %>
package <%= root_package %>.query;
import java.util.Collection;
import <%= JACK_NAMESPACE %>.queries.AbstractDeleteBuilder;
import <%= JACK_NAMESPACE %>.queries.where_operators.IWhereOperator;
import <%= JACK_NAMESPACE %>.queries.where_operators.JackMatchers;
import <%= JACK_NAMESPACE %>.queries.WhereConstraint;
import <%= root_package %>.iface.<%= model_defn.iface_name %>;
import <%= root_package %>.models.<%= model_defn.model_name %>;
public class <%= model_defn.delete_builder_name %> extends AbstractDeleteBuilder<<%=model_defn.model_name%>> {
public <%= model_defn.delete_builder_name %>(<%= model_defn.iface_name %> caller) {
super(caller);
}
public <%= model_defn.delete_builder_name %> id(Long value) {
addId(value);
return this;
}
public <%= model_defn.delete_builder_name %> idIn(Collection values) {
addIds(values);
return this;
}
<% model_defn.fields.each do |field_defn| %>
public <%= model_defn.delete_builder_name %> <%= field_defn.name.camelcase(:lower) %>(<%= field_defn.java_type(true) %> value) {
addWhereConstraint(new WhereConstraint<<%= field_defn.java_type(true) %>>(<%= model_defn.model_name %>._Fields.<%= field_defn.name %>, JackMatchers.equalTo(value)));
return this;
}
public <%= model_defn.delete_builder_name %> where<%= field_defn.name.camelcase() %>(IWhereOperator<<%= field_defn.java_type(true) %>> operator) {
addWhereConstraint(new WhereConstraint<<%= field_defn.java_type(true) %>>(<%= model_defn.model_name %>._Fields.<%= field_defn.name %>, operator));
return this;
}
<% end %>
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy