mirror of
https://github.com/querydsl/querydsl.git
synced 2026-06-19 21:00:53 +08:00
updated version to 0.6.4
This commit is contained in:
parent
d3adf36016
commit
5530bbabf7
@ -5,7 +5,7 @@
|
||||
<parent>
|
||||
<groupId>com.mysema.querydsl</groupId>
|
||||
<artifactId>querydsl-root</artifactId>
|
||||
<version>0.6.3-SNAPSHOT</version>
|
||||
<version>0.6.4</version>
|
||||
</parent>
|
||||
|
||||
<groupId>com.mysema.querydsl</groupId>
|
||||
|
||||
@ -5,7 +5,7 @@
|
||||
<parent>
|
||||
<groupId>com.mysema.querydsl</groupId>
|
||||
<artifactId>querydsl-root</artifactId>
|
||||
<version>0.6.3-SNAPSHOT</version>
|
||||
<version>0.6.4</version>
|
||||
</parent>
|
||||
|
||||
<groupId>com.mysema.querydsl</groupId>
|
||||
|
||||
@ -0,0 +1,9 @@
|
||||
package com.mysema.query.domain.hierarchy;
|
||||
|
||||
import com.mysema.query.annotations.QueryEntity;
|
||||
|
||||
@QueryEntity
|
||||
public class Entity1 {
|
||||
|
||||
String entity1Field;
|
||||
}
|
||||
@ -0,0 +1,10 @@
|
||||
package com.mysema.query.domain.hierarchy;
|
||||
|
||||
import com.mysema.query.annotations.QueryEntity;
|
||||
|
||||
@QueryEntity
|
||||
public class Entity2 extends Supertype{
|
||||
|
||||
String entity2Field;
|
||||
|
||||
}
|
||||
@ -0,0 +1,9 @@
|
||||
package com.mysema.query.domain.hierarchy;
|
||||
|
||||
import com.mysema.query.annotations.QueryEntity;
|
||||
|
||||
@QueryEntity
|
||||
public class Entity3 extends Entity2{
|
||||
|
||||
String entity3Field;
|
||||
}
|
||||
@ -0,0 +1,10 @@
|
||||
package com.mysema.query.domain.hierarchy;
|
||||
|
||||
import com.mysema.query.annotations.QuerySupertype;
|
||||
|
||||
@QuerySupertype
|
||||
public class Supertype {
|
||||
|
||||
String supertypeField;
|
||||
|
||||
}
|
||||
@ -5,7 +5,7 @@
|
||||
<parent>
|
||||
<groupId>com.mysema.querydsl</groupId>
|
||||
<artifactId>querydsl-root</artifactId>
|
||||
<version>0.6.3-SNAPSHOT</version>
|
||||
<version>0.6.4</version>
|
||||
</parent>
|
||||
|
||||
<groupId>com.mysema.querydsl</groupId>
|
||||
|
||||
@ -94,7 +94,7 @@ public abstract class ENumber<D extends Number & Comparable<?>> extends ECompara
|
||||
* @param right
|
||||
* @return this + right
|
||||
*/
|
||||
public ENumber<D> add(Expr<D> right) {
|
||||
public <N extends Number & Comparable<?>> ENumber<D> add(Expr<N> right) {
|
||||
return ONumber.create(getType(), Ops.ADD, this, right);
|
||||
}
|
||||
|
||||
@ -169,7 +169,7 @@ public abstract class ENumber<D extends Number & Comparable<?>> extends ECompara
|
||||
* @param right
|
||||
* @return this / right
|
||||
*/
|
||||
public ENumber<Double> div(D right) {
|
||||
public <N extends Number & Comparable<?>> ENumber<Double> div(N right) {
|
||||
return ONumber.create(Double.class, Ops.DIV, this, ENumber.create(right));
|
||||
}
|
||||
|
||||
@ -177,7 +177,7 @@ public abstract class ENumber<D extends Number & Comparable<?>> extends ECompara
|
||||
* @param right
|
||||
* @return this / right
|
||||
*/
|
||||
public ENumber<Double> div(Expr<D> right) {
|
||||
public <N extends Number & Comparable<?>> ENumber<Double> div(Expr<N> right) {
|
||||
return ONumber.create(Double.class, Ops.DIV, this, right);
|
||||
}
|
||||
|
||||
@ -361,7 +361,7 @@ public abstract class ENumber<D extends Number & Comparable<?>> extends ECompara
|
||||
* @param right
|
||||
* @return this * right
|
||||
*/
|
||||
public ENumber<D> mult(Expr<D> right) {
|
||||
public <N extends Number & Comparable<?>> ENumber<D> mult(Expr<N> right) {
|
||||
return ONumber.create(getType(), Ops.MULT, this, right);
|
||||
}
|
||||
|
||||
@ -410,7 +410,7 @@ public abstract class ENumber<D extends Number & Comparable<?>> extends ECompara
|
||||
* @param right
|
||||
* @return this - right
|
||||
*/
|
||||
public ENumber<D> sub(Expr<D> right) {
|
||||
public <N extends Number & Comparable<?>> ENumber<D> sub(Expr<N> right) {
|
||||
return ONumber.create(getType(), Ops.SUB, this, right);
|
||||
}
|
||||
|
||||
|
||||
@ -63,7 +63,7 @@ public class ENumberConst<D extends Number & Comparable<?>> extends ENumber<D> i
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
@Override
|
||||
public ENumber<D> add(Expr<D> right) {
|
||||
public <N extends Number & Comparable<?>> ENumber<D> add(Expr<N> right) {
|
||||
if (right instanceof Constant){
|
||||
return add(((Constant<Number>)right).getConstant());
|
||||
}else{
|
||||
@ -78,7 +78,7 @@ public class ENumberConst<D extends Number & Comparable<?>> extends ENumber<D> i
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
@Override
|
||||
public ENumber<D> sub(Expr<D> right) {
|
||||
public <N extends Number & Comparable<?>> ENumber<D> sub(Expr<N> right) {
|
||||
if (right instanceof Constant){
|
||||
return sub(((Constant<Number>)right).getConstant());
|
||||
}else{
|
||||
|
||||
@ -5,7 +5,7 @@
|
||||
<parent>
|
||||
<groupId>com.mysema.querydsl</groupId>
|
||||
<artifactId>querydsl-root</artifactId>
|
||||
<version>0.6.3-SNAPSHOT</version>
|
||||
<version>0.6.4</version>
|
||||
</parent>
|
||||
|
||||
<groupId>com.mysema.querydsl</groupId>
|
||||
|
||||
@ -8,9 +8,16 @@ package com.mysema.query.hql;
|
||||
import org.junit.Test;
|
||||
|
||||
import com.mysema.query.hql.domain.QCat;
|
||||
import com.mysema.query.types.path.PNumber;
|
||||
|
||||
public class MathTest extends AbstractQueryTest{
|
||||
|
||||
@Test
|
||||
public void test(){
|
||||
PNumber<Integer> path = QCat.cat.bodyWeight;
|
||||
toString("(cat.bodyWeight - sum(cat.bodyWeight)) * cat.bodyWeight", path.sub(path.sum()).mult(path));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testArithmeticOperationsInFunctionalWay() {
|
||||
toString("cat.bodyWeight + :a1", cat.bodyWeight.add(10));
|
||||
|
||||
@ -5,7 +5,7 @@
|
||||
<parent>
|
||||
<groupId>com.mysema.querydsl</groupId>
|
||||
<artifactId>querydsl-root</artifactId>
|
||||
<version>0.6.3-SNAPSHOT</version>
|
||||
<version>0.6.4</version>
|
||||
</parent>
|
||||
|
||||
<groupId>com.mysema.querydsl</groupId>
|
||||
|
||||
@ -4,7 +4,7 @@
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<groupId>com.mysema.querydsl</groupId>
|
||||
<artifactId>querydsl-root</artifactId>
|
||||
<version>0.6.3-SNAPSHOT</version>
|
||||
<version>0.6.4</version>
|
||||
<name>Querydsl</name>
|
||||
<description>parent project for querydsl modules</description>
|
||||
<url>http://source.mysema.com/display/querydsl</url>
|
||||
|
||||
@ -5,7 +5,7 @@
|
||||
<parent>
|
||||
<groupId>com.mysema.querydsl</groupId>
|
||||
<artifactId>querydsl-root</artifactId>
|
||||
<version>0.6.3-SNAPSHOT</version>
|
||||
<version>0.6.4</version>
|
||||
</parent>
|
||||
|
||||
<groupId>com.mysema.querydsl</groupId>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user