New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add varargs to Restrictions.and(c1,c2) and Restrictions.or(c1,c2) #148

Closed
wants to merge 1 commit into
base: master
from

Conversation

Projects
None yet
2 participants
@slorber

slorber commented Aug 5, 2011

This becomes more userfriendly to create a large list of AND / OR restrictions, without the pain of instantiating and filling a (con/dis)junction

Note that the old methods are returning LogicalExpression (and not Criterion) and should be kept for retrocompatibility.
As Java uses varargs in last resort in the case of an overload, callind and(c1,c2) will still call the old methods so it doesn't break the compatibility for people that uses the return type as a LogicalExpression and not as a Criterion

Add varargs to Restrictions.and(c1,c2) and Restrictions.or(c1,c2)
This becomes more userfriendly to create a large list of AND / OR restrictions, without the pain or instantiating and filling a (con/dis)junction

Note that the old methods returning LogicalExpression (and not Criterion) should be kept for retrocompatibility.
As Java uses varargs in last resort in the case of an overload, callind and(c1,c2) will still call the old methods so it doesn't break the compatibility for people that uses the return type as a LogicalExpression and not a Criterion

@sebersole sebersole closed this Mar 29, 2012

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment