Move FactoryExpression expansion and compression to an adapter
Bug #720590 reported by
Timo Westkämper
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Querydsl |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
Currently the FactoryExpression and expansion and compression contract is bound to the FactoryExpression implementations themselves. To simplify FactoryExpression creation the expansion and compression could be moved to an decorator implementation.
summary: |
- Moved FactoryExpression expansion and compression to an adapter + Move FactoryExpression expansion and compression to an adapter |
Changed in querydsl: | |
status: | New → Fix Committed |
To post a comment you must log in.
Here is a simple example of the wrapping :
// original arguments
StringPath str1 = new StringPath("str1");
StringPath str2 = new StringPath("str2");
StringPath str3 = new StringPath("str3");
StringPath str4 = new StringPath("str3");
// orginal factory expression
Concatenation concat2 = new Concatenation(new Concatenation(str1, new Concatenation(str2, str3)), str4);
// wrapped ession< String> wrapped = FactoryExpressi onUtils. wrap(concat2) ; s(Arrays. asList( str1, str2, str3, str4), wrapped.getArgs()); s("1234" , wrapped. newInstance( "1","2" ,"3","4" ));
FactoryExpr
assertEqual
assertEqual
The FactoryExpressi onUtils. wrap(.. .) call should only be used in Query implementation to normalize a FactoryExpression