mirror of
https://github.com/querydsl/querydsl.git
synced 2026-06-19 21:00:53 +08:00
Move tests #666
This commit is contained in:
parent
d5a5489d25
commit
723938d658
12
querydsl-jpa/src/test/java/com/mysema/query/jpa/Article.java
Normal file
12
querydsl-jpa/src/test/java/com/mysema/query/jpa/Article.java
Normal file
@ -0,0 +1,12 @@
|
||||
package com.mysema.query.jpa;
|
||||
|
||||
|
||||
public class Article {
|
||||
|
||||
String name;
|
||||
|
||||
Content content;
|
||||
|
||||
Person author;
|
||||
|
||||
}
|
||||
@ -0,0 +1,8 @@
|
||||
package com.mysema.query.jpa;
|
||||
|
||||
|
||||
public class Content {
|
||||
|
||||
Article article;
|
||||
|
||||
}
|
||||
@ -9,7 +9,6 @@ import org.junit.Test;
|
||||
import com.mysema.query.JoinExpression;
|
||||
import com.mysema.query.JoinType;
|
||||
import com.mysema.query.QueryMetadata;
|
||||
import com.mysema.query.domain.p9.QArticle;
|
||||
import com.mysema.query.jpa.domain.QCat;
|
||||
import com.mysema.query.jpa.domain4.QBookMark;
|
||||
import com.mysema.query.jpa.domain4.QBookVersion;
|
||||
|
||||
@ -0,0 +1,7 @@
|
||||
package com.mysema.query.jpa;
|
||||
|
||||
|
||||
public class Person {
|
||||
|
||||
String firstName, lastName;
|
||||
}
|
||||
@ -0,0 +1,54 @@
|
||||
package com.mysema.query.jpa;
|
||||
|
||||
import static com.mysema.query.types.PathMetadataFactory.*;
|
||||
|
||||
import com.mysema.query.types.path.*;
|
||||
|
||||
import com.mysema.query.types.PathMetadata;
|
||||
import javax.annotation.Generated;
|
||||
import com.mysema.query.types.Path;
|
||||
import com.mysema.query.types.path.PathInits;
|
||||
|
||||
|
||||
/**
|
||||
* QArticle is a Querydsl query type for Article
|
||||
*/
|
||||
@Generated("com.mysema.query.codegen.EntitySerializer")
|
||||
public class QArticle extends EntityPathBase<Article> {
|
||||
|
||||
private static final long serialVersionUID = 1732636838L;
|
||||
|
||||
private static final PathInits INITS = PathInits.DIRECT2;
|
||||
|
||||
public static final QArticle article = new QArticle("article");
|
||||
|
||||
public final QPerson author;
|
||||
|
||||
public final QContent content;
|
||||
|
||||
public final StringPath name = createString("name");
|
||||
|
||||
public QArticle(String variable) {
|
||||
this(Article.class, forVariable(variable), INITS);
|
||||
}
|
||||
|
||||
public QArticle(Path<? extends Article> path) {
|
||||
this(path.getType(), path.getMetadata(), path.getMetadata().isRoot() ? INITS : PathInits.DEFAULT);
|
||||
}
|
||||
|
||||
public QArticle(PathMetadata<?> metadata) {
|
||||
this(metadata, metadata.isRoot() ? INITS : PathInits.DEFAULT);
|
||||
}
|
||||
|
||||
public QArticle(PathMetadata<?> metadata, PathInits inits) {
|
||||
this(Article.class, metadata, inits);
|
||||
}
|
||||
|
||||
public QArticle(Class<? extends Article> type, PathMetadata<?> metadata, PathInits inits) {
|
||||
super(type, metadata, inits);
|
||||
this.author = inits.isInitialized("author") ? new QPerson(forProperty("author")) : null;
|
||||
this.content = inits.isInitialized("content") ? new QContent(forProperty("content"), inits.get("content")) : null;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -0,0 +1,49 @@
|
||||
package com.mysema.query.jpa;
|
||||
|
||||
import static com.mysema.query.types.PathMetadataFactory.*;
|
||||
|
||||
import com.mysema.query.types.path.*;
|
||||
|
||||
import com.mysema.query.types.PathMetadata;
|
||||
import javax.annotation.Generated;
|
||||
import com.mysema.query.types.Path;
|
||||
import com.mysema.query.types.path.PathInits;
|
||||
|
||||
|
||||
/**
|
||||
* QContent is a Querydsl query type for Content
|
||||
*/
|
||||
@Generated("com.mysema.query.codegen.EmbeddableSerializer")
|
||||
public class QContent extends BeanPath<Content> {
|
||||
|
||||
private static final long serialVersionUID = -878421975L;
|
||||
|
||||
private static final PathInits INITS = PathInits.DIRECT2;
|
||||
|
||||
public static final QContent content = new QContent("content");
|
||||
|
||||
public final QArticle article;
|
||||
|
||||
public QContent(String variable) {
|
||||
this(Content.class, forVariable(variable), INITS);
|
||||
}
|
||||
|
||||
public QContent(Path<? extends Content> path) {
|
||||
this(path.getType(), path.getMetadata(), path.getMetadata().isRoot() ? INITS : PathInits.DEFAULT);
|
||||
}
|
||||
|
||||
public QContent(PathMetadata<?> metadata) {
|
||||
this(metadata, metadata.isRoot() ? INITS : PathInits.DEFAULT);
|
||||
}
|
||||
|
||||
public QContent(PathMetadata<?> metadata, PathInits inits) {
|
||||
this(Content.class, metadata, inits);
|
||||
}
|
||||
|
||||
public QContent(Class<? extends Content> type, PathMetadata<?> metadata, PathInits inits) {
|
||||
super(type, metadata, inits);
|
||||
this.article = inits.isInitialized("article") ? new QArticle(forProperty("article"), inits.get("article")) : null;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
39
querydsl-jpa/src/test/java/com/mysema/query/jpa/QPerson.java
Normal file
39
querydsl-jpa/src/test/java/com/mysema/query/jpa/QPerson.java
Normal file
@ -0,0 +1,39 @@
|
||||
package com.mysema.query.jpa;
|
||||
|
||||
import static com.mysema.query.types.PathMetadataFactory.*;
|
||||
|
||||
import com.mysema.query.types.path.*;
|
||||
|
||||
import com.mysema.query.types.PathMetadata;
|
||||
import javax.annotation.Generated;
|
||||
import com.mysema.query.types.Path;
|
||||
|
||||
|
||||
/**
|
||||
* QPerson is a Querydsl query type for Person
|
||||
*/
|
||||
@Generated("com.mysema.query.codegen.EntitySerializer")
|
||||
public class QPerson extends EntityPathBase<Person> {
|
||||
|
||||
private static final long serialVersionUID = -219463259L;
|
||||
|
||||
public static final QPerson person = new QPerson("person");
|
||||
|
||||
public final StringPath firstName = createString("firstName");
|
||||
|
||||
public final StringPath lastName = createString("lastName");
|
||||
|
||||
public QPerson(String variable) {
|
||||
super(Person.class, forVariable(variable));
|
||||
}
|
||||
|
||||
public QPerson(Path<? extends Person> path) {
|
||||
super(path.getType(), path.getMetadata());
|
||||
}
|
||||
|
||||
public QPerson(PathMetadata<?> metadata) {
|
||||
super(Person.class, metadata);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user