Add varargs to Restrictions.and(...) and Restrictions.or(...)
-------------------------------------------------------------
Key: HHH-6557
URL:
http://opensource.atlassian.com/projects/hibernate/browse/HHH-6557
Project: Hibernate Core
Issue Type: Improvement
Components: query-criteria
Affects Versions: 4.0.0.Beta5
Environment: any
Reporter: Lorber Sebastien
Priority: Trivial
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
Pull request on github:
https://github.com/slorber/hibernate-core/commit/7a6e3adb783c8e3f9fd00b67...
--
This message is automatically generated by JIRA.
For more information on JIRA, see:
http://www.atlassian.com/software/jira