mirror of
https://github.com/querydsl/querydsl.git
synced 2026-06-30 21:08:30 +08:00
organized imports
This commit is contained in:
parent
d9f4cba477
commit
19fd8c19fd
@ -10,7 +10,6 @@ import java.util.Map;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
import javax.persistence.EntityManager;
|
||||
import javax.persistence.NoResultException;
|
||||
import javax.persistence.Query;
|
||||
|
||||
import org.slf4j.Logger;
|
||||
|
||||
@ -8,18 +8,17 @@ package com.mysema.query.jpa.domain;
|
||||
import java.io.Serializable;
|
||||
import java.util.Map;
|
||||
|
||||
import javax.persistence.ElementCollection;
|
||||
import javax.persistence.Entity;
|
||||
import javax.persistence.Id;
|
||||
|
||||
import org.hibernate.annotations.CollectionOfElements;
|
||||
|
||||
/**
|
||||
* The Class Calendar.
|
||||
*/
|
||||
@SuppressWarnings("serial")
|
||||
@Entity
|
||||
public class Calendar implements Serializable{
|
||||
@CollectionOfElements
|
||||
@ElementCollection
|
||||
Map<String, java.util.Date> holidays;
|
||||
|
||||
@Id
|
||||
|
||||
@ -7,12 +7,12 @@ package com.mysema.query.jpa.domain;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import javax.persistence.ElementCollection;
|
||||
import javax.persistence.Entity;
|
||||
import javax.persistence.Id;
|
||||
import javax.persistence.Temporal;
|
||||
import javax.persistence.TemporalType;
|
||||
|
||||
import org.hibernate.annotations.CollectionOfElements;
|
||||
import org.hibernate.annotations.IndexColumn;
|
||||
|
||||
/**
|
||||
@ -25,7 +25,7 @@ public class Foo {
|
||||
@Id
|
||||
int id;
|
||||
|
||||
@CollectionOfElements
|
||||
@ElementCollection
|
||||
@IndexColumn(name = "_index")
|
||||
List<String> names;
|
||||
|
||||
|
||||
@ -7,12 +7,11 @@ package com.mysema.query.jpa.domain;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import javax.persistence.ElementCollection;
|
||||
import javax.persistence.Id;
|
||||
import javax.persistence.Temporal;
|
||||
import javax.persistence.TemporalType;
|
||||
|
||||
import org.hibernate.annotations.CollectionOfElements;
|
||||
|
||||
import com.mysema.query.annotations.QueryProjection;
|
||||
|
||||
public class FooDTO {
|
||||
@ -21,7 +20,7 @@ public class FooDTO {
|
||||
@Id
|
||||
int id;
|
||||
|
||||
@CollectionOfElements
|
||||
@ElementCollection
|
||||
List<String> names;
|
||||
|
||||
@Temporal(TemporalType.DATE)
|
||||
|
||||
@ -7,11 +7,10 @@ package com.mysema.query.jpa.domain;
|
||||
|
||||
import java.util.Collection;
|
||||
|
||||
import javax.persistence.ElementCollection;
|
||||
import javax.persistence.Entity;
|
||||
import javax.persistence.Id;
|
||||
|
||||
import org.hibernate.annotations.CollectionOfElements;
|
||||
|
||||
/**
|
||||
* The Class NameList.
|
||||
*/
|
||||
@ -19,6 +18,6 @@ import org.hibernate.annotations.CollectionOfElements;
|
||||
public class NameList {
|
||||
@Id
|
||||
long id;
|
||||
@CollectionOfElements
|
||||
@ElementCollection
|
||||
Collection<String> names;
|
||||
}
|
||||
|
||||
@ -7,13 +7,13 @@ package com.mysema.query.jpa.domain;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import javax.persistence.ElementCollection;
|
||||
import javax.persistence.Entity;
|
||||
import javax.persistence.Id;
|
||||
import javax.persistence.ManyToOne;
|
||||
import javax.persistence.OneToMany;
|
||||
import javax.persistence.Table;
|
||||
|
||||
import org.hibernate.annotations.CollectionOfElements;
|
||||
import org.hibernate.annotations.IndexColumn;
|
||||
|
||||
/**
|
||||
@ -25,7 +25,7 @@ public class Order {
|
||||
@ManyToOne
|
||||
Customer customer;
|
||||
|
||||
@CollectionOfElements
|
||||
@ElementCollection
|
||||
@IndexColumn(name = "_index")
|
||||
List<Integer> deliveredItemIndices;
|
||||
|
||||
|
||||
@ -7,11 +7,10 @@ package com.mysema.query.jpa.domain;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import javax.persistence.ElementCollection;
|
||||
import javax.persistence.Entity;
|
||||
import javax.persistence.Id;
|
||||
|
||||
import org.hibernate.annotations.CollectionOfElements;
|
||||
|
||||
/**
|
||||
* The Class Player.
|
||||
*/
|
||||
@ -20,6 +19,6 @@ public class Player {
|
||||
@Id
|
||||
long id;
|
||||
|
||||
@CollectionOfElements
|
||||
@ElementCollection
|
||||
List<Integer> scores;
|
||||
}
|
||||
|
||||
@ -52,7 +52,7 @@ public class LuceneSerializerNotTokenizedTest {
|
||||
public void Before() throws Exception {
|
||||
serializer = new LuceneSerializer(false, false);
|
||||
idx = new RAMDirectory();
|
||||
writer = new IndexWriter(idx, new StandardAnalyzer(Version.LUCENE_CURRENT), true, MaxFieldLength.UNLIMITED);
|
||||
writer = new IndexWriter(idx, new StandardAnalyzer(Version.LUCENE_30), true, MaxFieldLength.UNLIMITED);
|
||||
|
||||
writer.addDocument(createDocument(clooney));
|
||||
writer.addDocument(createDocument(pitt));
|
||||
|
||||
@ -41,7 +41,6 @@ import com.mysema.query.types.Ops;
|
||||
import com.mysema.query.types.expr.BooleanExpression;
|
||||
import com.mysema.query.types.path.NumberPath;
|
||||
import com.mysema.query.types.path.PathBuilder;
|
||||
import com.mysema.query.types.path.SimplePath;
|
||||
import com.mysema.query.types.path.StringPath;
|
||||
|
||||
/**
|
||||
@ -116,7 +115,7 @@ public class LuceneSerializerTest {
|
||||
floatField = entityPath.getNumber("floatField", Float.class);
|
||||
|
||||
idx = new RAMDirectory();
|
||||
writer = new IndexWriter(idx, new StandardAnalyzer(Version.LUCENE_CURRENT), true, MaxFieldLength.UNLIMITED);
|
||||
writer = new IndexWriter(idx, new StandardAnalyzer(Version.LUCENE_30), true, MaxFieldLength.UNLIMITED);
|
||||
|
||||
writer.addDocument(createDocument());
|
||||
|
||||
|
||||
@ -25,12 +25,10 @@ import org.apache.lucene.document.Field;
|
||||
import org.apache.lucene.document.NumericField;
|
||||
import org.apache.lucene.document.Field.Index;
|
||||
import org.apache.lucene.document.Field.Store;
|
||||
import org.apache.lucene.index.CorruptIndexException;
|
||||
import org.apache.lucene.index.IndexWriter;
|
||||
import org.apache.lucene.index.IndexWriter.MaxFieldLength;
|
||||
import org.apache.lucene.search.IndexSearcher;
|
||||
import org.apache.lucene.search.Searcher;
|
||||
import org.apache.lucene.store.LockObtainFailedException;
|
||||
import org.apache.lucene.store.RAMDirectory;
|
||||
import org.apache.lucene.util.Version;
|
||||
import org.junit.After;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user