/** * Return the underlying {@link ConditionBuilder} */ public DefaultConditionBuilder getConditionBuilder() { if (condition == null) condition = Conditions.create(); else if (!(condition instanceof DefaultConditionBuilder)) condition = Conditions.wrap(condition); return (DefaultConditionBuilder) condition; }
/** * Return the underlying {@link ConditionBuilder} */ public DefaultConditionBuilder getConditionBuilder() { if (condition == null) condition = Conditions.create(); else if (!(condition instanceof DefaultConditionBuilder)) condition = Conditions.wrap(condition); return (DefaultConditionBuilder) condition; }
/** * Set the {@link Condition} of this {@link Rule} instance. */ public RuleBuilder when(final Condition condition) { if (this.condition == null) this.condition = condition; else if (condition instanceof ConditionBuilder) this.condition = ((ConditionBuilder) this.condition).and(condition); else this.condition = Conditions.wrap(this.condition).and(condition); return this; }
/** * Set the {@link Condition} of this {@link Rule} instance. */ public RuleBuilder when(final Condition condition) { if (this.condition == null) this.condition = condition; else if (condition instanceof ConditionBuilder) this.condition = ((ConditionBuilder) this.condition).and(condition); else this.condition = Conditions.wrap(this.condition).and(condition); return this; }