mirror of
https://github.com/querydsl/querydsl.git
synced 2026-07-03 21:07:49 +08:00
Merge pull request #1263 from querydsl/fix-documentation-typo
Fix documentation typo
This commit is contained in:
commit
397f972f2a
@ -13,18 +13,19 @@
|
||||
*/
|
||||
package com.querydsl.apt;
|
||||
|
||||
import java.lang.annotation.Annotation;
|
||||
import java.util.*;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
import javax.annotation.processing.ProcessingEnvironment;
|
||||
import javax.lang.model.element.ElementKind;
|
||||
import javax.lang.model.element.Modifier;
|
||||
import javax.lang.model.element.TypeElement;
|
||||
import javax.lang.model.type.*;
|
||||
import java.lang.annotation.Annotation;
|
||||
import java.util.*;
|
||||
|
||||
import com.mysema.codegen.model.*;
|
||||
import com.querydsl.core.annotations.QueryExclude;
|
||||
import com.querydsl.codegen.*;
|
||||
import com.querydsl.core.annotations.QueryExclude;
|
||||
|
||||
/**
|
||||
* ExtendedTypeFactory is a factory for APT inspection based Type creation
|
||||
@ -135,12 +136,12 @@ public final class ExtendedTypeFactory {
|
||||
}
|
||||
|
||||
@Override
|
||||
public Type visitWildcard(WildcardType wildardType, Boolean p) {
|
||||
if (wildardType.getExtendsBound() != null) {
|
||||
Type type = visit(wildardType.getExtendsBound(), p);
|
||||
public Type visitWildcard(WildcardType wildcardType, Boolean p) {
|
||||
if (wildcardType.getExtendsBound() != null) {
|
||||
Type type = visit(wildcardType.getExtendsBound(), p);
|
||||
return new TypeExtends(type);
|
||||
} else if (wildardType.getSuperBound() != null) {
|
||||
Type type = visit(wildardType.getSuperBound(), p);
|
||||
} else if (wildcardType.getSuperBound() != null) {
|
||||
Type type = visit(wildcardType.getSuperBound(), p);
|
||||
return new TypeSuper(type);
|
||||
} else {
|
||||
return null;
|
||||
|
||||
@ -46,7 +46,7 @@ public class CollectionTest {
|
||||
|
||||
Collection collection2;
|
||||
|
||||
Collection<Collection<Person>> collectionOfCOllection;
|
||||
Collection<Collection<Person>> collectionOfCollection;
|
||||
|
||||
Collection<Set<String>> collectionOfSet;
|
||||
|
||||
|
||||
@ -8,8 +8,8 @@ import javax.persistence.Id;
|
||||
import javax.persistence.TableGenerator;
|
||||
|
||||
/**
|
||||
* This is an example of using system ACL function. Note, field id is must,
|
||||
* abstract function getId must also implemented.
|
||||
* This is an example of using system ACL function. Note, field id is required,
|
||||
* abstract function getId must also be implemented.
|
||||
*/
|
||||
@Entity
|
||||
public class SecurableEntity extends AbstractSecurable<Long, Long> {
|
||||
@ -28,4 +28,4 @@ public class SecurableEntity extends AbstractSecurable<Long, Long> {
|
||||
// return getSecurableEntityId();
|
||||
// }
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@ -46,7 +46,7 @@ public class PathComparator<T, V extends Comparable<V>> implements Comparator<T>
|
||||
@Override
|
||||
public int compare(T leftBean, T rightBean) {
|
||||
if(leftBean == rightBean) {
|
||||
return 0; // Reference to the seme object should always result in '0'
|
||||
return 0; // Reference to the same object should always result in '0'
|
||||
} else if (leftBean == null) {
|
||||
return -1; // Whenever the reference varies and left is null, right is not null
|
||||
} else if (rightBean == null) {
|
||||
|
||||
@ -24,7 +24,7 @@ import com.querydsl.core.types.ParamExpression;
|
||||
import com.querydsl.core.types.Predicate;
|
||||
|
||||
/**
|
||||
* EmptyMetadata provides a immutable empty QueryMetadata instace
|
||||
* EmptyMetadata provides an immutable empty QueryMetadata instance
|
||||
*
|
||||
* @author tiwe
|
||||
*
|
||||
|
||||
@ -140,7 +140,7 @@ public class AliasFactory {
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the current thread bound expression without reseting it
|
||||
* Get the current thread bound expression without resetting it
|
||||
*
|
||||
* @param <A>
|
||||
* @return
|
||||
|
||||
@ -16,7 +16,7 @@ package com.querydsl.core.alias;
|
||||
import com.querydsl.core.types.EntityPath;
|
||||
|
||||
/**
|
||||
* MagagedObject is a tagging interface for CGLIB alias proxies
|
||||
* ManagedObject is a tagging interface for CGLIB alias proxies
|
||||
*
|
||||
*/
|
||||
public interface ManagedObject {
|
||||
|
||||
@ -37,7 +37,7 @@ import com.querydsl.core.types.query.StringSubQuery;
|
||||
import com.querydsl.core.types.query.TimeSubQuery;
|
||||
|
||||
/**
|
||||
* DetachableAdapter is an apadater implementation for the Detachable interface
|
||||
* DetachableAdapter is an adapter implementation for the Detachable interface
|
||||
*
|
||||
* @author tiwe
|
||||
*
|
||||
|
||||
@ -123,8 +123,8 @@ public class TemplateFactory {
|
||||
if (arg instanceof Constant) {
|
||||
return ConstantImpl.create(apply(arg.toString()).toString());
|
||||
} else if (arg instanceof Expression) {
|
||||
Expression<String> concated = OperationImpl.create(String.class, Ops.CONCAT, PERCENT, (Expression)arg);
|
||||
return OperationImpl.create(String.class, Ops.LOWER, concated);
|
||||
Expression<String> concatenated = OperationImpl.create(String.class, Ops.CONCAT, PERCENT, (Expression)arg);
|
||||
return OperationImpl.create(String.class, Ops.LOWER, concatenated);
|
||||
} else {
|
||||
return "%" + escapeForLike(String.valueOf(arg).toLowerCase(Locale.ENGLISH));
|
||||
}
|
||||
@ -138,8 +138,8 @@ public class TemplateFactory {
|
||||
if (arg instanceof Constant) {
|
||||
return ConstantImpl.create(apply(arg.toString()).toString());
|
||||
} else if (arg instanceof Expression) {
|
||||
Expression<String> concated = OperationImpl.create(String.class, Ops.CONCAT, PERCENT, (Expression)arg);
|
||||
return OperationImpl.create(String.class, Ops.CONCAT, concated, PERCENT);
|
||||
Expression<String> concatenated = OperationImpl.create(String.class, Ops.CONCAT, PERCENT, (Expression)arg);
|
||||
return OperationImpl.create(String.class, Ops.CONCAT, concatenated, PERCENT);
|
||||
} else {
|
||||
return "%" + escapeForLike(String.valueOf(arg)) + "%";
|
||||
}
|
||||
|
||||
@ -26,7 +26,7 @@ import com.querydsl.core.types.TemplateExpressionImpl;
|
||||
public final class Wildcard {
|
||||
|
||||
/**
|
||||
* Wilcard expression (*) for all columns
|
||||
* Wildcard expression (*) for all columns
|
||||
*/
|
||||
public static final Expression<Object[]> all = TemplateExpressionImpl.create(Object[].class, "*");
|
||||
|
||||
@ -36,12 +36,12 @@ public final class Wildcard {
|
||||
public static final NumberExpression<Long> count = NumberOperation.create(Long.class, Ops.AggOps.COUNT_ALL_AGG);
|
||||
|
||||
/**
|
||||
* Wilcard count distinct expression ((count(distinct *))
|
||||
* Wildcard count distinct expression (count(distinct *))
|
||||
*/
|
||||
public static final NumberExpression<Long> countDistinct = NumberOperation.create(Long.class, Ops.AggOps.COUNT_DISTINCT_ALL_AGG);
|
||||
|
||||
/**
|
||||
* Wilcard count distinct expression ((count(distinct *))
|
||||
* Wildcard count expression (count(*))
|
||||
*/
|
||||
public static final NumberExpression<Integer> countAsInt = NumberOperation.create(Integer.class, Ops.AggOps.COUNT_ALL_AGG);
|
||||
|
||||
|
||||
@ -65,7 +65,7 @@ public class QueryMetadaSerializationTest {
|
||||
}
|
||||
|
||||
@Test
|
||||
public void FullySerizable() {
|
||||
public void FullySerializable() {
|
||||
Set<Class<?>> checked = new HashSet<Class<?>>();
|
||||
checked.addAll(Arrays.<Class<?>>asList(Collection.class, List.class, Set.class, Map.class,
|
||||
Object.class, String.class, Class.class));
|
||||
|
||||
@ -3,7 +3,7 @@ package com.querydsl.core.types;
|
||||
import java.util.concurrent.ExecutorService;
|
||||
import java.util.concurrent.Executors;
|
||||
|
||||
public class TermplateInfiniteLoop {
|
||||
public class TemplateInfiniteLoop {
|
||||
|
||||
static String templates[] = createTemplates();
|
||||
|
||||
@ -31,7 +31,7 @@ public class MapPathTest {
|
||||
}
|
||||
|
||||
@Test
|
||||
public void GetKeytType() {
|
||||
public void GetKeyType() {
|
||||
assertEquals(String.class, mapPath.getKeyType());
|
||||
}
|
||||
|
||||
|
||||
@ -205,9 +205,9 @@ QPerson men = new QPerson("men");
|
||||
QPerson women = new QPerson("women");
|
||||
query.from(men, women).where(
|
||||
men.gender.eq(Gender.MALE),
|
||||
men.relationshipStatus.eq(RelationshipStatsu.SINGLE),
|
||||
men.relationshipStatus.eq(RelationshipStatus.SINGLE),
|
||||
women.gender.eq(Gender.FEMALE),
|
||||
women.relationshipStatsu.eq(RelationshipStatsu.SINGLE));
|
||||
women.relationshipStatus.eq(RelationshipStatus.SINGLE));
|
||||
[/code]
|
||||
|
||||
[b]Fetch joins[/b]
|
||||
@ -234,7 +234,7 @@ List<Employee> employees = query.from(employee).join(employee.address).fetch()
|
||||
[code]
|
||||
CriteriaQuery<Employee> query = builder.createQuery(Employee.class);
|
||||
Root<Employee> emp = query.from(Employee.class);
|
||||
emp.fetch(Empoyee_.phones, JoinType.LEFT);
|
||||
emp.fetch(Employee_.phones, JoinType.LEFT);
|
||||
query.select(emp).distinct(true);
|
||||
List<Employee> employees = em.createQuery( query).getResultList();
|
||||
[/code]
|
||||
@ -255,11 +255,11 @@ List<Employee> employees = query.from(employee)
|
||||
CriteriaQuery<Employee> query = builder.createQuery(Employee.class);
|
||||
Root<Employee> emp = query.from(Employee.class);
|
||||
Subquery<Project> sq = query.subquery(Project.class);
|
||||
Root<Project> projecti sq.from(Project.class);
|
||||
Join<Project,Employeee> sqEmp = project.join(Project_.employees);
|
||||
Root<Project> project sq.from(Project.class);
|
||||
Join<Project,Employee> sqEmp = project.join(Project_.employees);
|
||||
sq.select(project)
|
||||
.where(cb.equals(sqEmp, emp),
|
||||
cb.eqauls(project.get(Project_.name),
|
||||
cb.equals(project.get(Project_.name),
|
||||
cb.parameter(String.class,"project")));
|
||||
criteria.add(cb.exists());
|
||||
[/code]
|
||||
@ -276,4 +276,4 @@ query.from(employee).where(
|
||||
.where(emp.eq(employee), project.name.eq("some name"))
|
||||
.list(project).exists()
|
||||
).list(employee);
|
||||
[/code]
|
||||
[/code]
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
code highlight CSS resemblign the Eclipse IDE default color schema
|
||||
code highlight CSS resembling the Eclipse IDE default color schema
|
||||
@author Costin Leau
|
||||
*/
|
||||
|
||||
@ -36,4 +36,4 @@
|
||||
|
||||
.hl-annotation {
|
||||
font-style: normal;
|
||||
}
|
||||
}
|
||||
|
||||
@ -227,7 +227,7 @@ QBankAccount bankAccount = account.as(QBankAccount.class);
|
||||
|
||||
<title>Select literals</title>
|
||||
|
||||
<para>Literals can be selected by refering to them via Constant expressions. Here is a simple example </para>
|
||||
<para>Literals can be selected by referring to them via Constant expressions. Here is a simple example </para>
|
||||
|
||||
<programlisting language="java"><![CDATA[
|
||||
query.list(Expressions.constant(1),
|
||||
|
||||
@ -514,7 +514,7 @@ new JPADeleteClause(entityManager, customer).where(customer.level.lt(3)).execute
|
||||
<para>For Hibernate based Delete usage, use the HibernateDeleteClause instead.</para>
|
||||
|
||||
<para>DML clauses in JPA don't take JPA level cascade rules into account and don't provide
|
||||
finegrained second level cache interaction.</para>
|
||||
fine-grained second level cache interaction.</para>
|
||||
</sect2>
|
||||
|
||||
<sect2>
|
||||
@ -542,7 +542,7 @@ new JPAUpdateClause(session, customer).where(customer.name.eq("Bob"))
|
||||
<para>For Hibernate based Update usage, use the HibernateUpdateClause instead.</para>
|
||||
|
||||
<para>DML clauses in JPA don't take JPA level cascade rules into account and don't provide
|
||||
finegrained second level cache interaction.</para>
|
||||
fine-grained second level cache interaction.</para>
|
||||
|
||||
</sect2>
|
||||
|
||||
|
||||
@ -38,7 +38,7 @@ expr eq "Ben" expr === "Ben"
|
||||
expr ne "Ben" expr !== "Ben"
|
||||
expr append "X" expr + "X"
|
||||
expr isEmpty expr is empty
|
||||
expr isNotEmpoty expr not empty
|
||||
expr isNotEmpty expr not empty
|
||||
|
||||
// boolean
|
||||
left and right left && right
|
||||
|
||||
@ -126,7 +126,7 @@ Geometry point = Wkt.fromWkt("Point(2 2)");
|
||||
query.where(table.geo.distance(point).lt(5.0));
|
||||
]]></programlisting>
|
||||
|
||||
<para>In addition to straight distance between geometries spherical and spherodial distance are provided via
|
||||
<para>In addition to straight distance between geometries spherical and spheroidal distance are provided via
|
||||
distanceSphere and distanceSpheroid.</para>
|
||||
|
||||
</sect3>
|
||||
@ -183,4 +183,4 @@ NumberExpression<Double> pointX = point.x(); // x() is not available on Geometry
|
||||
|
||||
</sect2>
|
||||
|
||||
</sect1>
|
||||
</sect1>
|
||||
|
||||
@ -171,7 +171,7 @@
|
||||
</row>
|
||||
<row>
|
||||
<entry>targetFolder</entry>
|
||||
<entry>target folder where source filder should be generated</entry>
|
||||
<entry>target folder where source folder should be generated</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>namingStrategyClass</entry>
|
||||
@ -929,7 +929,7 @@ new SQLUpdateClause(conn, configuration, survey)
|
||||
<programlisting language="java"><![CDATA[
|
||||
QSurvey survey = QSurvey.survey;
|
||||
|
||||
new SQLDelecteClause(conn, configuration, survey)
|
||||
new SQLDeleteClause(conn, configuration, survey)
|
||||
.where(survey.name.eq("XXX"))
|
||||
.execute();
|
||||
|
||||
@ -938,7 +938,7 @@ new SQLDelecteClause(conn, configuration, survey)
|
||||
<para>Without where</para>
|
||||
|
||||
<programlisting language="java"><![CDATA[
|
||||
new SQLDelecteClause(conn, configuration, survey)
|
||||
new SQLDeleteClause(conn, configuration, survey)
|
||||
.execute()
|
||||
]]></programlisting>
|
||||
|
||||
@ -1129,7 +1129,7 @@ configuration.register(new UtilDateType());
|
||||
|
||||
<programlisting language="java"><![CDATA[
|
||||
Configuration configuration = new Configuration(new H2Templates());
|
||||
// declares a maping for the gender column in the person table
|
||||
// declares a mapping for the gender column in the person table
|
||||
configuration.register("person", "gender", new EnumByNameType<Gender>(Gender.class));
|
||||
]]></programlisting>
|
||||
|
||||
@ -1151,7 +1151,7 @@ configuration.registerNumeric(5,2,Float.class);
|
||||
<para>SQLListener is a listener interface that can be used to listen to queries and DML clause. SQLListener
|
||||
instances can be registered either on the configuration and on the query/clause level via the addListener method.</para>
|
||||
|
||||
<para>Use cases for listeners are data synchronization, logging, cacheing and validation.</para>
|
||||
<para>Use cases for listeners are data synchronization, logging, caching and validation.</para>
|
||||
|
||||
</sect2>
|
||||
|
||||
|
||||
@ -182,7 +182,7 @@ query
|
||||
|
||||
<title>공간(Geospatial) 쿼리</title>
|
||||
|
||||
<para>near(Douyble[]) 메서드를 이용해서 공간 검색을 할 수 있다.</para>
|
||||
<para>near(Double[]) 메서드를 이용해서 공간 검색을 할 수 있다.</para>
|
||||
|
||||
<programlisting language="java"><![CDATA[
|
||||
query
|
||||
|
||||
@ -38,7 +38,7 @@ expr eq "Ben" expr === "Ben"
|
||||
expr ne "Ben" expr !== "Ben"
|
||||
expr append "X" expr + "X"
|
||||
expr isEmpty expr is empty
|
||||
expr isNotEmpoty expr not empty
|
||||
expr isNotEmpty expr not empty
|
||||
|
||||
// boolean
|
||||
left and right left && right
|
||||
@ -171,7 +171,7 @@ exporter.export(connection.getMetaData)
|
||||
query().from(employee).select(employee.firstName, employee.lastName)
|
||||
]]></programlisting>
|
||||
|
||||
<para>다음과 같이 Employee 또는 QEmployee의 companio 객체를 사용할 수 있다.</para>
|
||||
<para>다음과 같이 Employee 또는 QEmployee의 companion 객체를 사용할 수 있다.</para>
|
||||
|
||||
<programlisting language="java"><![CDATA[
|
||||
Employee.select(_.firstName, _.lastName)
|
||||
|
||||
@ -55,7 +55,7 @@ public class Office {
|
||||
}
|
||||
|
||||
/**
|
||||
* Accessor for the roomt name
|
||||
* Accessor for the room name
|
||||
*
|
||||
* @return Returns the room name.
|
||||
*/
|
||||
|
||||
@ -29,7 +29,7 @@ public class Gym {
|
||||
private String location;
|
||||
private String name;
|
||||
|
||||
// this must be initialized in the constructor. dont change it
|
||||
// this must be initialized in the constructor. don't change it
|
||||
private Map<String, Wardrobe> wardrobes; // store Wardrobe in values
|
||||
private Map<Wardrobe, String> wardrobes2; // store Wardrobe in keys
|
||||
private Map<String, Wardrobe> wardrobesInverse; // store Wardrobe in values
|
||||
@ -53,7 +53,7 @@ public class Gym {
|
||||
private String stringValue;
|
||||
|
||||
public Gym() {
|
||||
// this must be initialized in the constructor. dont change it
|
||||
// this must be initialized in the constructor. don't change it
|
||||
wardrobes = new HashMap<String, Wardrobe>();
|
||||
equipments = new HashMap<String, GymEquipment>();
|
||||
partners = new HashMap<String, Gym>();
|
||||
|
||||
@ -25,7 +25,7 @@ import com.querydsl.core.annotations.QueryEntity;
|
||||
*/
|
||||
@QueryEntity
|
||||
public class Wardrobe {
|
||||
// this must be initialized in the constructor. dont change it
|
||||
// this must be initialized in the constructor. don't change it
|
||||
private List<Cloth> clothes;
|
||||
private String model;
|
||||
private Gym gym;
|
||||
@ -33,7 +33,7 @@ public class Wardrobe {
|
||||
private String stringValue;
|
||||
|
||||
public Wardrobe() {
|
||||
// this must be initialized in the constructor. dont change it
|
||||
// this must be initialized in the constructor. don't change it
|
||||
clothes = new ArrayList<Cloth>();
|
||||
}
|
||||
|
||||
|
||||
@ -45,10 +45,10 @@ public final class Conversions {
|
||||
if (isAggSumWithConversion(expr) || isCountAggConversion(expr)) {
|
||||
return new NumberConversion<RT>(expr);
|
||||
} else if (expr instanceof FactoryExpression) {
|
||||
FactoryExpression<RT> factorye = (FactoryExpression<RT>)expr;
|
||||
for (Expression<?> e : factorye.getArgs()) {
|
||||
FactoryExpression<RT> factoryExpr = (FactoryExpression<RT>)expr;
|
||||
for (Expression<?> e : factoryExpr.getArgs()) {
|
||||
if (isAggSumWithConversion(e) || isCountAggConversion(expr)) {
|
||||
return new NumberConversions<RT>(factorye);
|
||||
return new NumberConversions<RT>(factoryExpr);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -86,10 +86,10 @@ public final class Conversions {
|
||||
} else if (Enum.class.isAssignableFrom(expr.getType())) {
|
||||
return new EnumConversion<RT>(expr);
|
||||
} else if (expr instanceof FactoryExpression) {
|
||||
FactoryExpression<RT> factorye = (FactoryExpression<RT>)expr;
|
||||
FactoryExpression<RT> factoryExpr = (FactoryExpression<RT>)expr;
|
||||
boolean numberConversions = false;
|
||||
boolean hasEntityPath = false;
|
||||
for (Expression<?> e : factorye.getArgs()) {
|
||||
for (Expression<?> e : factoryExpr.getArgs()) {
|
||||
if (isEntityPathAndNeedsWrapping(e)) {
|
||||
hasEntityPath = true;
|
||||
} else if (Number.class.isAssignableFrom(e.getType())) {
|
||||
@ -99,12 +99,12 @@ public final class Conversions {
|
||||
}
|
||||
}
|
||||
if (hasEntityPath) {
|
||||
factorye = createEntityPathConversions(factorye);
|
||||
factoryExpr = createEntityPathConversions(factoryExpr);
|
||||
}
|
||||
if (numberConversions) {
|
||||
factorye = new NumberConversions<RT>(factorye);
|
||||
factoryExpr = new NumberConversions<RT>(factoryExpr);
|
||||
}
|
||||
return factorye;
|
||||
return factoryExpr;
|
||||
}
|
||||
return expr;
|
||||
}
|
||||
|
||||
@ -15,7 +15,6 @@ public class ExpressionSerializationTest {
|
||||
|
||||
@Test
|
||||
public void Serialize() throws Exception {
|
||||
//QAdress.adress.name.eq("test"
|
||||
Expression<?> expr = QCat.cat.name.eq("test");
|
||||
Expression<?> expr2 = serialize(expr);
|
||||
|
||||
|
||||
@ -180,7 +180,7 @@ public class JPAQueryMixinTest {
|
||||
}
|
||||
|
||||
@Test
|
||||
public void OrderBy_Embeddable_Colllection() {
|
||||
public void OrderBy_Embeddable_Collection() {
|
||||
QBookVersion bookVersion = QBookVersion.bookVersion;
|
||||
QBookMark bookMark = new QBookMark("bookVersion_definition_bookMarks");
|
||||
mixin.from(bookVersion);
|
||||
|
||||
@ -29,7 +29,7 @@ public final class MongodbExpressions {
|
||||
private MongodbExpressions() {}
|
||||
|
||||
/**
|
||||
* Finds the closest points relative to the given location and orders the results with decreasing promimity
|
||||
* Finds the closest points relative to the given location and orders the results with decreasing proximity
|
||||
*
|
||||
* @param expr
|
||||
* @param latVal latitude
|
||||
|
||||
@ -41,7 +41,7 @@ public class Point extends ArrayPath<Double[], Double> {
|
||||
}
|
||||
|
||||
/**
|
||||
* Finds the closest points relative to the given location and orders the results with decreasing promimity
|
||||
* Finds the closest points relative to the given location and orders the results with decreasing proximity
|
||||
*
|
||||
* @param latVal latitude
|
||||
* @param longVal longitude
|
||||
|
||||
@ -50,7 +50,7 @@ public class GeoSpatialQueryTest {
|
||||
@Before
|
||||
public void before() {
|
||||
ds.delete(ds.createQuery(GeoEntity.class));
|
||||
ds.getCollection(GeoEntity.class).ensureIndex(new BasicDBObject("location","2d"));;
|
||||
ds.getCollection(GeoEntity.class).ensureIndex(new BasicDBObject("location","2d"));
|
||||
}
|
||||
|
||||
@Test
|
||||
|
||||
@ -32,14 +32,14 @@ import com.mongodb.MongoException;
|
||||
import com.mongodb.ReadPreference;
|
||||
import com.querydsl.core.NonUniqueResultException;
|
||||
import com.querydsl.core.SearchResults;
|
||||
import com.querydsl.mongodb.domain.*;
|
||||
import com.querydsl.mongodb.domain.User.Gender;
|
||||
import com.querydsl.mongodb.morphia.MorphiaQuery;
|
||||
import com.querydsl.core.testutil.ExternalDB;
|
||||
import com.querydsl.core.types.EntityPath;
|
||||
import com.querydsl.core.types.OrderSpecifier;
|
||||
import com.querydsl.core.types.Predicate;
|
||||
import com.querydsl.core.types.path.StringPath;
|
||||
import com.querydsl.core.testutil.ExternalDB;
|
||||
import com.querydsl.mongodb.domain.*;
|
||||
import com.querydsl.mongodb.domain.User.Gender;
|
||||
import com.querydsl.mongodb.morphia.MorphiaQuery;
|
||||
|
||||
@Category(ExternalDB.class)
|
||||
public class MongodbQueryTest {
|
||||
@ -287,7 +287,7 @@ public class MongodbQueryTest {
|
||||
assertQuery(user.lastName.eq("Jantunen"), user.firstName.desc(), u1, u2);
|
||||
|
||||
assertQuery(user.firstName.eq("Jaana").and(user.lastName.eq("Aakkonen")), u3);
|
||||
//This shoud produce 'and' also
|
||||
//This should produce 'and' also
|
||||
assertQuery(where(user.firstName.eq("Jaana"), user.lastName.eq("Aakkonen")), u3);
|
||||
|
||||
assertQuery(user.firstName.ne("Jaana"), u2, u1);
|
||||
|
||||
@ -40,7 +40,7 @@ public abstract class JTSPolygonExpression<T extends Polygon> extends JTSSurface
|
||||
private volatile NumberExpression<Integer> numInteriorRing;
|
||||
|
||||
@Nullable
|
||||
private volatile JTSLineStringExpression<LineString> exterorRing;
|
||||
private volatile JTSLineStringExpression<LineString> exteriorRing;
|
||||
|
||||
public JTSPolygonExpression(Expression<T> mixin) {
|
||||
super(mixin);
|
||||
@ -52,10 +52,10 @@ public abstract class JTSPolygonExpression<T extends Polygon> extends JTSSurface
|
||||
* @return
|
||||
*/
|
||||
public JTSLineStringExpression<?> exteriorRing() {
|
||||
if (exterorRing == null) {
|
||||
exterorRing = JTSLineStringOperation.create(LineString.class, SpatialOps.EXTERIOR_RING, mixin);
|
||||
if (exteriorRing == null) {
|
||||
exteriorRing = JTSLineStringOperation.create(LineString.class, SpatialOps.EXTERIOR_RING, mixin);
|
||||
}
|
||||
return exterorRing;
|
||||
return exteriorRing;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@ -139,7 +139,7 @@ public class GeometryPath<T extends Geometry> extends GeometryExpression<T> impl
|
||||
return polygon;
|
||||
}
|
||||
|
||||
public PolyhedralSurfacePath<PolyHedralSurface> asPolygHedralSurface() {
|
||||
public PolyhedralSurfacePath<PolyHedralSurface> asPolyHedralSurface() {
|
||||
if (polyhedralSurface == null) {
|
||||
polyhedralSurface = new PolyhedralSurfacePath<PolyHedralSurface>(pathMixin.getMetadata());
|
||||
}
|
||||
|
||||
@ -27,6 +27,6 @@ public class GeometryPathTest {
|
||||
assertEquals(new MultiPolygonPath<MultiPolygon>("geometry"), geometry.asMultiPolygon());
|
||||
assertEquals(new PointPath<Point>("geometry"), geometry.asPoint());
|
||||
assertEquals(new PolygonPath<Polygon>("geometry"), geometry.asPolygon());
|
||||
assertEquals(new PolyhedralSurfacePath<PolyHedralSurface>("geometry"), geometry.asPolygHedralSurface());
|
||||
assertEquals(new PolyhedralSurfacePath<PolyHedralSurface>("geometry"), geometry.asPolyHedralSurface());
|
||||
}
|
||||
}
|
||||
|
||||
@ -30,7 +30,7 @@ import com.querydsl.sql.Column;
|
||||
import com.querydsl.sql.codegen.support.PrimaryKeyData;
|
||||
|
||||
/**
|
||||
* ExtendedBeanSerialzier outputs primary key based equals, hashCode and toString implementations
|
||||
* ExtendedBeanSerializer outputs primary key based equals, hashCode and toString implementations
|
||||
*
|
||||
* @author tiwe
|
||||
*
|
||||
|
||||
@ -517,7 +517,7 @@ public class MetaDataExporter {
|
||||
/**
|
||||
* Override the NamingStrategy (default: new DefaultNamingStrategy())
|
||||
*
|
||||
* @param namingStrategy namingstrategy to override (default: new DefaultNamingStrategy())
|
||||
* @param namingStrategy naming strategy to override (default: new DefaultNamingStrategy())
|
||||
*/
|
||||
public void setNamingStrategy(NamingStrategy namingStrategy) {
|
||||
module.bind(NamingStrategy.class, namingStrategy);
|
||||
|
||||
@ -106,7 +106,7 @@ public class AntMetaDataExporter extends Task {
|
||||
private String targetFolder;
|
||||
|
||||
/**
|
||||
* namingstrategy class to override (default: DefaultNamingStrategy)
|
||||
* naming strategy class to override (default: DefaultNamingStrategy)
|
||||
*/
|
||||
private String namingStrategyClass;
|
||||
|
||||
@ -638,4 +638,4 @@ public class AntMetaDataExporter extends Task {
|
||||
public void setSourceEncoding(String sourceEncoding) {
|
||||
this.sourceEncoding = sourceEncoding;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -48,7 +48,7 @@ public abstract class AbstractConverterTest {
|
||||
data.add(new LineString(createSequence(crs, (Point)data.get(i), (Point)data.get(i))));
|
||||
}
|
||||
|
||||
// polgyon
|
||||
// polygon
|
||||
// TODO
|
||||
|
||||
// multipoint
|
||||
|
||||
@ -32,7 +32,7 @@ import com.querydsl.core.types.TemplateExpression;
|
||||
import com.querydsl.core.types.Visitor;
|
||||
|
||||
/**
|
||||
* RelationalPathExtractor extracts RelationlPath instances from expressions and queries
|
||||
* RelationalPathExtractor extracts RelationalPath instances from expressions and queries
|
||||
*
|
||||
* @author tiwe
|
||||
*
|
||||
|
||||
@ -109,7 +109,7 @@ public final class SQLExpressions {
|
||||
public static final Expression<Object[]> all = Wildcard.all;
|
||||
|
||||
/**
|
||||
* Wilcard count expression
|
||||
* Wildcard count expression
|
||||
*/
|
||||
public static final Expression<Long> countAll = Wildcard.count;
|
||||
|
||||
|
||||
@ -214,7 +214,7 @@ public class SQLTemplates extends Templates {
|
||||
|
||||
private String leftJoin = "\nleft join ";
|
||||
|
||||
private String rightJoin = "\nright join ";;
|
||||
private String rightJoin = "\nright join ";
|
||||
|
||||
private String limitTemplate = "\nlimit {0}";
|
||||
|
||||
|
||||
@ -966,7 +966,7 @@ public final class Connections {
|
||||
stmt.execute("create table SURVEY(ID int auto_increment, " +
|
||||
"NAME varchar(30)," +
|
||||
"NAME2 varchar(30)," +
|
||||
"constraint suryey_pk primary key(ID))");
|
||||
"constraint survey_pk primary key(ID))");
|
||||
stmt.execute("insert into SURVEY values (1,'Hello World','Hello');");
|
||||
|
||||
// test
|
||||
@ -1195,4 +1195,4 @@ public final class Connections {
|
||||
}
|
||||
|
||||
private Connections() {}
|
||||
}
|
||||
}
|
||||
|
||||
@ -190,7 +190,7 @@ public class MergeBase extends AbstractBaseTest{
|
||||
|
||||
@Test
|
||||
@IncludeIn(H2)
|
||||
public void Merge_With_TempateExpression_In_Batch() {
|
||||
public void Merge_With_TemplateExpression_In_Batch() {
|
||||
SQLMergeClause merge = merge(survey)
|
||||
.keys(survey.id)
|
||||
.set(survey.id, 5)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user