mirror of
https://github.com/querydsl/querydsl.git
synced 2026-06-30 21:08:30 +08:00
added support for entity maps and simple maps
added min, max and size methods import HqlParserTest from hibernate code and replaced the String queries with statically typed ones
This commit is contained in:
parent
2adbd6cf27
commit
5758897d43
@ -0,0 +1,14 @@
|
||||
package com.mysema.query.grammar.hql.domain;
|
||||
|
||||
import javax.persistence.Entity;
|
||||
|
||||
/**
|
||||
* Account provides
|
||||
*
|
||||
* @author tiwe
|
||||
* @version $Id$
|
||||
*/
|
||||
@Entity
|
||||
public class Account {
|
||||
Person owner;
|
||||
}
|
||||
@ -0,0 +1,14 @@
|
||||
package com.mysema.query.grammar.hql.domain;
|
||||
|
||||
import javax.persistence.Entity;
|
||||
|
||||
/**
|
||||
* Bar provides
|
||||
*
|
||||
* @author tiwe
|
||||
* @version $Id$
|
||||
*/
|
||||
@Entity
|
||||
public class Bar {
|
||||
java.util.Date date;
|
||||
}
|
||||
@ -0,0 +1,16 @@
|
||||
package com.mysema.query.grammar.hql.domain;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
import javax.persistence.Entity;
|
||||
|
||||
/**
|
||||
* Calendar provides
|
||||
*
|
||||
* @author tiwe
|
||||
* @version $Id$
|
||||
*/
|
||||
@Entity
|
||||
public class Calendar {
|
||||
Map<String,java.util.Date> holidays;
|
||||
}
|
||||
@ -0,0 +1,16 @@
|
||||
package com.mysema.query.grammar.hql.domain;
|
||||
|
||||
import com.mysema.query.dto.DTO;
|
||||
|
||||
/**
|
||||
* Family provides
|
||||
*
|
||||
* @author tiwe
|
||||
* @version $Id$
|
||||
*/
|
||||
@DTO(domainType=Cat.class)
|
||||
public class Family {
|
||||
public Family(Cat mother, Cat mate, Cat offspr){
|
||||
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,14 @@
|
||||
package com.mysema.query.grammar.hql.domain;
|
||||
|
||||
import javax.persistence.Entity;
|
||||
|
||||
/**
|
||||
* Foo provides
|
||||
*
|
||||
* @author tiwe
|
||||
* @version $Id$
|
||||
*/
|
||||
@Entity
|
||||
public class Foo {
|
||||
java.util.Date startDate;
|
||||
}
|
||||
@ -0,0 +1,14 @@
|
||||
package com.mysema.query.grammar.hql.domain;
|
||||
|
||||
import javax.persistence.Entity;
|
||||
|
||||
/**
|
||||
* Formula provides
|
||||
*
|
||||
* @author tiwe
|
||||
* @version $Id$
|
||||
*/
|
||||
@Entity
|
||||
public class Formula {
|
||||
Parameter parameter;
|
||||
}
|
||||
@ -0,0 +1,14 @@
|
||||
package com.mysema.query.grammar.hql.domain;
|
||||
|
||||
import javax.persistence.Entity;
|
||||
|
||||
/**
|
||||
* Nationality provides
|
||||
*
|
||||
* @author tiwe
|
||||
* @version $Id$
|
||||
*/
|
||||
@Entity
|
||||
public class Nationality {
|
||||
Calendar calendar;
|
||||
}
|
||||
@ -0,0 +1,14 @@
|
||||
package com.mysema.query.grammar.hql.domain;
|
||||
|
||||
import javax.persistence.Entity;
|
||||
|
||||
/**
|
||||
* Parameter provides
|
||||
*
|
||||
* @author tiwe
|
||||
* @version $Id$
|
||||
*/
|
||||
@Entity
|
||||
public class Parameter {
|
||||
|
||||
}
|
||||
@ -0,0 +1,16 @@
|
||||
package com.mysema.query.grammar.hql.domain;
|
||||
|
||||
import javax.persistence.Entity;
|
||||
|
||||
/**
|
||||
* Person provides
|
||||
*
|
||||
* @author tiwe
|
||||
* @version $Id$
|
||||
*/
|
||||
@Entity
|
||||
public class Person {
|
||||
PersonId id;
|
||||
Nationality nationality;
|
||||
java.util.Date birthDay;
|
||||
}
|
||||
@ -0,0 +1,15 @@
|
||||
package com.mysema.query.grammar.hql.domain;
|
||||
|
||||
import javax.persistence.Entity;
|
||||
|
||||
/**
|
||||
* PersonId provides
|
||||
*
|
||||
* @author tiwe
|
||||
* @version $Id$
|
||||
*/
|
||||
@Entity
|
||||
public class PersonId {
|
||||
String country;
|
||||
int medicareNumber;
|
||||
}
|
||||
Loading…
Reference in New Issue
Block a user