Hibernate SVN: r20668 - beanvalidation/tck/trunk.
by hibernate-commits@lists.jboss.org
Author: hardy.ferentschik
Date: 2010-09-20 10:24:56 -0400 (Mon, 20 Sep 2010)
New Revision: 20668
Modified:
beanvalidation/tck/trunk/changelog.txt
Log:
Updated changelog
Modified: beanvalidation/tck/trunk/changelog.txt
===================================================================
--- beanvalidation/tck/trunk/changelog.txt 2010-09-20 14:22:21 UTC (rev 20667)
+++ beanvalidation/tck/trunk/changelog.txt 2010-09-20 14:24:56 UTC (rev 20668)
@@ -3,10 +3,22 @@
See also http://opensource.atlassian.com/projects/hibernate/browse/BVTCK
-1.0.2.GA (25-11-2009)
+1.0.4.GA (20-09-2010)
----------------------
+** Bug
+ * [BVTCK-7] - Update all tests within a package to use the same resource includes via @Classes
+
** Task
+ * [BVTCK-6] - Update pom to use the new distributationManagement information
+ * [BVTCK-8] - Update dependencies in pom
+ * [BVTCK-9] - Update docbook documentation
+
+
+1.0.3.GA (25-11-2009)
+----------------------
+
+** Task
* [BVTCK-5] - Provide separate signature files for Java 5 and Java 6
14 years, 2 months
Hibernate SVN: r20667 - beanvalidation/tck/trunk/src/main/java/org/hibernate/jsr303/tck/tests/xmlconfiguration.
by hibernate-commits@lists.jboss.org
Author: hardy.ferentschik
Date: 2010-09-20 10:22:21 -0400 (Mon, 20 Sep 2010)
New Revision: 20667
Modified:
beanvalidation/tck/trunk/src/main/java/org/hibernate/jsr303/tck/tests/xmlconfiguration/XmlConfigurationTest.java
Log:
Removed unused import statement
Modified: beanvalidation/tck/trunk/src/main/java/org/hibernate/jsr303/tck/tests/xmlconfiguration/XmlConfigurationTest.java
===================================================================
--- beanvalidation/tck/trunk/src/main/java/org/hibernate/jsr303/tck/tests/xmlconfiguration/XmlConfigurationTest.java 2010-09-20 14:21:47 UTC (rev 20666)
+++ beanvalidation/tck/trunk/src/main/java/org/hibernate/jsr303/tck/tests/xmlconfiguration/XmlConfigurationTest.java 2010-09-20 14:22:21 UTC (rev 20667)
@@ -23,7 +23,6 @@
import javax.validation.ConstraintViolation;
import javax.validation.Payload;
import javax.validation.Validator;
-import javax.validation.constraints.Pattern;
import javax.validation.metadata.BeanDescriptor;
import javax.validation.metadata.ConstraintDescriptor;
14 years, 2 months
Hibernate SVN: r20666 - beanvalidation/tck/trunk.
by hibernate-commits@lists.jboss.org
Author: hardy.ferentschik
Date: 2010-09-20 10:21:47 -0400 (Mon, 20 Sep 2010)
New Revision: 20666
Modified:
beanvalidation/tck/trunk/pom.xml
Log:
BVTCK-8 Updated dependecies
Modified: beanvalidation/tck/trunk/pom.xml
===================================================================
--- beanvalidation/tck/trunk/pom.xml 2010-09-20 13:44:04 UTC (rev 20665)
+++ beanvalidation/tck/trunk/pom.xml 2010-09-20 14:21:47 UTC (rev 20666)
@@ -1,5 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>org.hibernate.jsr303.tck</groupId>
<artifactId>jsr303-tck</artifactId>
@@ -54,7 +56,7 @@
<dependency>
<groupId>org.jboss.test-harness</groupId>
<artifactId>jboss-test-harness-api</artifactId>
- <version>1.0.0</version>
+ <version>1.1.0-CR6</version>
<exclusions>
<exclusion>
<groupId>log4j</groupId>
@@ -65,7 +67,7 @@
<dependency>
<groupId>org.jboss.test-harness</groupId>
<artifactId>jboss-test-harness</artifactId>
- <version>1.0.0</version>
+ <version>1.1.0-CR6</version>
<exclusions>
<exclusion>
<groupId>log4j</groupId>
@@ -97,6 +99,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
+ <version>2.2</version>
<configuration>
<archive>
<manifest>
@@ -129,13 +132,13 @@
<plugin>
<groupId>org.jboss.maven.plugins</groupId>
<artifactId>maven-jdocbook-plugin</artifactId>
- <version>2.2.0</version>
+ <version>2.2.3</version>
<extensions>true</extensions>
<dependencies>
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-jdocbook-style</artifactId>
- <version>2.0.0</version>
+ <version>2.0.1</version>
<type>jdocbook-style</type>
</dependency>
</dependencies>
@@ -147,7 +150,7 @@
<directory>${basedir}/src/main/docbook/en-US/harness</directory>
</imageResource>
<formats>
- <format>
+ <format>
<formatName>pdf</formatName>
<stylesheetResource>classpath:/xslt/org/hibernate/jdocbook/xslt/pdf.xsl</stylesheetResource>
<finalName>beanvalidation-tck.pdf</finalName>
@@ -221,6 +224,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
+ <version>2.0</version>
<executions>
<execution>
<id>copy-in-container-dependencies</id>
@@ -245,6 +249,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
+ <version>2.0.4</version>
<executions>
<execution>
<id>attach-sources</id>
@@ -262,14 +267,15 @@
<configuration>
<allowTimestampedSnapshots>true</allowTimestampedSnapshots>
<remoteTagging>true</remoteTagging>
- <goals>deploy org.jboss.maven.plugins:maven-jdocbook-plugin:2.2.0:resources
- org.jboss.maven.plugins:maven-jdocbook-plugin:2.2.0:generate assembly:assembly
+ <goals>deploy org.jboss.maven.plugins:maven-jdocbook-plugin:2.2.3:resources
+ org.jboss.maven.plugins:maven-jdocbook-plugin:2.2.3:generate assembly:assembly
</goals>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-assembly-plugin</artifactId>
+ <version>2.2-beta-2</version>
<configuration>
<descriptors>
<descriptor>src/main/assembly/assembly.xml</descriptor>
@@ -281,7 +287,7 @@
<ciManagement>
<system>Hudson</system>
- <url />
+ <url/>
</ciManagement>
<issueManagement>
@@ -343,11 +349,13 @@
<phase>process-resources</phase>
<configuration>
<tasks>
- <javac srcdir="${basedir}/src/main/java" destdir="${basedir}/target/classes" failonerror="true">
- <compilerarg value="-proc:only" />
- <compilerarg value="-AauditXml=${basedir}/src/main/resources/tck-audit.xml" />
+ <javac srcdir="${basedir}/src/main/java"
+ destdir="${basedir}/target/classes"
+ failonerror="true">
+ <compilerarg value="-proc:only"/>
+ <compilerarg value="-AauditXml=${basedir}/src/main/resources/tck-audit.xml"/>
<classpath>
- <path refid="maven.compile.classpath" />
+ <path refid="maven.compile.classpath"/>
</classpath>
</javac>
</tasks>
14 years, 2 months
Hibernate SVN: r20665 - core/trunk/documentation/quickstart/src/main/docbook/en-US/content.
by hibernate-commits@lists.jboss.org
Author: adamw
Date: 2010-09-20 09:44:04 -0400 (Mon, 20 Sep 2010)
New Revision: 20665
Modified:
core/trunk/documentation/quickstart/src/main/docbook/en-US/content/tutorial_envers.xml
Log:
Minor corrections to the tutorial
Modified: core/trunk/documentation/quickstart/src/main/docbook/en-US/content/tutorial_envers.xml
===================================================================
--- core/trunk/documentation/quickstart/src/main/docbook/en-US/content/tutorial_envers.xml 2010-09-20 10:52:52 UTC (rev 20664)
+++ core/trunk/documentation/quickstart/src/main/docbook/en-US/content/tutorial_envers.xml 2010-09-20 13:44:04 UTC (rev 20665)
@@ -25,7 +25,7 @@
<para>
This file was discussed in the <phrase>JPA</phrase> tutorial, and is largely the same here. The major
difference is the set of properties defining <firstterm><phrase>listeners</phrase></firstterm>.
- Essentially this enables envers to recieve notfications from Hibernate processing of certain
+ Essentially this enables Envers to recieve notfications from Hibernate processing of certain
<firstterm><phrase>events</phrase></firstterm> such as an entity being saved or updated.
</para>
</section>
@@ -43,7 +43,7 @@
<title>Example code</title>
<para>
Again, this tutorial makes use of the <phrase>JPA</phrase> APIs. However, the code also makes a
- revision to one of the entites and then uses the Envers API to pull back the initial revision
+ change to one of the entites and then uses the Envers API to pull back the initial revision (version)
as well as the updated revision.
</para>
<example id="hibernate-gsg-tutorial-envers-test-api">
@@ -63,7 +63,7 @@
<interfacename>javax.persistence.EntityManager</interfacename>.
</para>
<para>
- Then the <methodname>find</methodname> methid is used to retrieve specific revisions of the entity. The
+ Then the <methodname>find</methodname> method is used to retrieve specific revisions of the entity. The
first call reads "find revision number 1 of Event with id 2". The second call reads "find revision
number 2 of Event with id 2".
</para>
14 years, 2 months
Hibernate SVN: r20664 - in beanvalidation/tck/trunk/src/main/docbook/en-US: harness and 1 other directory.
by hibernate-commits@lists.jboss.org
Author: hardy.ferentschik
Date: 2010-09-20 06:52:52 -0400 (Mon, 20 Sep 2010)
New Revision: 20664
Added:
beanvalidation/tck/trunk/src/main/docbook/en-US/jsr303-tck.ent
Removed:
beanvalidation/tck/trunk/src/main/docbook/en-US/harness/Author_Group.xml
beanvalidation/tck/trunk/src/main/docbook/en-US/harness/Book_Info.xml
beanvalidation/tck/trunk/src/main/docbook/en-US/harness/Book_Preface.xml
beanvalidation/tck/trunk/src/main/docbook/en-US/harness/master.xml
Modified:
beanvalidation/tck/trunk/src/main/docbook/en-US/Author_Group.xml
beanvalidation/tck/trunk/src/main/docbook/en-US/Book_Info.xml
beanvalidation/tck/trunk/src/main/docbook/en-US/Book_Preface.xml
beanvalidation/tck/trunk/src/main/docbook/en-US/appeals-process.xml
beanvalidation/tck/trunk/src/main/docbook/en-US/configuration.xml
beanvalidation/tck/trunk/src/main/docbook/en-US/executing.xml
beanvalidation/tck/trunk/src/main/docbook/en-US/harness/configuration.xml
beanvalidation/tck/trunk/src/main/docbook/en-US/harness/executing.xml
beanvalidation/tck/trunk/src/main/docbook/en-US/harness/introduction.xml
beanvalidation/tck/trunk/src/main/docbook/en-US/installation.xml
beanvalidation/tck/trunk/src/main/docbook/en-US/introduction.xml
beanvalidation/tck/trunk/src/main/docbook/en-US/master.xml
beanvalidation/tck/trunk/src/main/docbook/en-US/part-background.xml
beanvalidation/tck/trunk/src/main/docbook/en-US/part-execution.xml
beanvalidation/tck/trunk/src/main/docbook/en-US/part-test-harness.xml
beanvalidation/tck/trunk/src/main/docbook/en-US/reporting.xml
beanvalidation/tck/trunk/src/main/docbook/en-US/sigtest.xml
Log:
BVTCK-9 updated docs
Modified: beanvalidation/tck/trunk/src/main/docbook/en-US/Author_Group.xml
===================================================================
--- beanvalidation/tck/trunk/src/main/docbook/en-US/Author_Group.xml 2010-09-18 13:47:12 UTC (rev 20663)
+++ beanvalidation/tck/trunk/src/main/docbook/en-US/Author_Group.xml 2010-09-20 10:52:52 UTC (rev 20664)
@@ -1,5 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE authorgroup PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [ ]>
+<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
+<!ENTITY % BOOK_ENTITIES SYSTEM "jsr303-tck.ent">
+%BOOK_ENTITIES;
+]>
<authorgroup>
<author>
<firstname>Emmanuel</firstname>
Modified: beanvalidation/tck/trunk/src/main/docbook/en-US/Book_Info.xml
===================================================================
--- beanvalidation/tck/trunk/src/main/docbook/en-US/Book_Info.xml 2010-09-18 13:47:12 UTC (rev 20663)
+++ beanvalidation/tck/trunk/src/main/docbook/en-US/Book_Info.xml 2010-09-20 10:52:52 UTC (rev 20664)
@@ -1,6 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE bookinfo PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
-"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">
+<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
+<!ENTITY % BOOK_ENTITIES SYSTEM "jsr303-tck.ent">
+%BOOK_ENTITIES;
+]>
<bookinfo>
<releaseinfo><literallayout>Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Modified: beanvalidation/tck/trunk/src/main/docbook/en-US/Book_Preface.xml
===================================================================
--- beanvalidation/tck/trunk/src/main/docbook/en-US/Book_Preface.xml 2010-09-18 13:47:12 UTC (rev 20663)
+++ beanvalidation/tck/trunk/src/main/docbook/en-US/Book_Preface.xml 2010-09-20 10:52:52 UTC (rev 20664)
@@ -1,6 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE preface PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
-"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">
+<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
+<!ENTITY % BOOK_ENTITIES SYSTEM "jsr303-tck.ent">
+%BOOK_ENTITIES;
+]>
<preface id="book-preface">
<title>Preface</title>
Modified: beanvalidation/tck/trunk/src/main/docbook/en-US/appeals-process.xml
===================================================================
--- beanvalidation/tck/trunk/src/main/docbook/en-US/appeals-process.xml 2010-09-18 13:47:12 UTC (rev 20663)
+++ beanvalidation/tck/trunk/src/main/docbook/en-US/appeals-process.xml 2010-09-20 10:52:52 UTC (rev 20664)
@@ -1,6 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
-"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">
+<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
+<!ENTITY % BOOK_ENTITIES SYSTEM "jsr303-tck.ent">
+%BOOK_ENTITIES;
+]>
<chapter id="appeals-process">
<title>Appeals Process</title>
Modified: beanvalidation/tck/trunk/src/main/docbook/en-US/configuration.xml
===================================================================
--- beanvalidation/tck/trunk/src/main/docbook/en-US/configuration.xml 2010-09-18 13:47:12 UTC (rev 20663)
+++ beanvalidation/tck/trunk/src/main/docbook/en-US/configuration.xml 2010-09-20 10:52:52 UTC (rev 20664)
@@ -1,6 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
-"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">
+<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
+<!ENTITY % BOOK_ENTITIES SYSTEM "jsr303-tck.ent">
+%BOOK_ENTITIES;
+]>
<chapter id="configuration">
<title>Configuration</title>
Modified: beanvalidation/tck/trunk/src/main/docbook/en-US/executing.xml
===================================================================
--- beanvalidation/tck/trunk/src/main/docbook/en-US/executing.xml 2010-09-18 13:47:12 UTC (rev 20663)
+++ beanvalidation/tck/trunk/src/main/docbook/en-US/executing.xml 2010-09-20 10:52:52 UTC (rev 20664)
@@ -1,6 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
-"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">
+<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
+<!ENTITY % BOOK_ENTITIES SYSTEM "jsr303-tck.ent">
+%BOOK_ENTITIES;
+]>
<chapter id="executing">
<title>Executing the Test Suite</title>
Deleted: beanvalidation/tck/trunk/src/main/docbook/en-US/harness/Author_Group.xml
===================================================================
--- beanvalidation/tck/trunk/src/main/docbook/en-US/harness/Author_Group.xml 2010-09-18 13:47:12 UTC (rev 20663)
+++ beanvalidation/tck/trunk/src/main/docbook/en-US/harness/Author_Group.xml 2010-09-20 10:52:52 UTC (rev 20664)
@@ -1,22 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE authorgroup PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [ ]>
-
-
-<authorgroup>
- <author>
- <firstname>Pete</firstname>
- <surname>Muir</surname>
- <affiliation>
- <jobtitle>JBoss Test Harness lead</jobtitle>
- <orgname>Red Hat Middleware LLC</orgname>
- </affiliation>
- </author>
- <author>
- <firstname>Dan</firstname>
- <surname>Allen</surname>
- <affiliation>
- <jobtitle>JBoss Test Harness developer</jobtitle>
- <orgname>Red Hat Middleware LLC</orgname>
- </affiliation>
- </author>
-</authorgroup>
Deleted: beanvalidation/tck/trunk/src/main/docbook/en-US/harness/Book_Info.xml
===================================================================
--- beanvalidation/tck/trunk/src/main/docbook/en-US/harness/Book_Info.xml 2010-09-18 13:47:12 UTC (rev 20663)
+++ beanvalidation/tck/trunk/src/main/docbook/en-US/harness/Book_Info.xml 2010-09-20 10:52:52 UTC (rev 20664)
@@ -1,15 +0,0 @@
-<?xml version='1.0' encoding='UTF-8'?>
-<!DOCTYPE bookinfo PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [ ]>
-<bookinfo>
- <copyright>
- <year>2009</year>
- <holder>
- Red Hat, Inc. and/or its affiliates, and individual contributors listed as
- authors.
- </holder>
- </copyright>
-
- <title>JBoss Test Harness Refernce Guide</title>
- <subtitle></subtitle>
- <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="Author_Group.xml" />
-</bookinfo>
Deleted: beanvalidation/tck/trunk/src/main/docbook/en-US/harness/Book_Preface.xml
===================================================================
--- beanvalidation/tck/trunk/src/main/docbook/en-US/harness/Book_Preface.xml 2010-09-18 13:47:12 UTC (rev 20663)
+++ beanvalidation/tck/trunk/src/main/docbook/en-US/harness/Book_Preface.xml 2010-09-20 10:52:52 UTC (rev 20664)
@@ -1,15 +0,0 @@
-<?xml version='1.0' encoding='UTF-8'?>
-<!DOCTYPE preface PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [ ]>
-<preface id="book-preface">
- <title>Preface</title>
-
- <section id="book-organization">
-
- <title>How This Book Is Organized</title>
-
- <para>
- Chapter 1 provides an introduction and explains the motiviations for
- and goals of the test harness.
- </para>
- </section>
-</preface>
Modified: beanvalidation/tck/trunk/src/main/docbook/en-US/harness/configuration.xml
===================================================================
--- beanvalidation/tck/trunk/src/main/docbook/en-US/harness/configuration.xml 2010-09-18 13:47:12 UTC (rev 20663)
+++ beanvalidation/tck/trunk/src/main/docbook/en-US/harness/configuration.xml 2010-09-20 10:52:52 UTC (rev 20664)
@@ -1,5 +1,8 @@
<?xml version='1.0' encoding='UTF-8'?>
-<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [ ]>
+<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
+<!ENTITY % BOOK_ENTITIES SYSTEM "../jsr303-tck.ent">
+%BOOK_ENTITIES;
+]>
<chapter id="test-harness-configuration">
<title>Configuration</title>
<para>
Modified: beanvalidation/tck/trunk/src/main/docbook/en-US/harness/executing.xml
===================================================================
--- beanvalidation/tck/trunk/src/main/docbook/en-US/harness/executing.xml 2010-09-18 13:47:12 UTC (rev 20663)
+++ beanvalidation/tck/trunk/src/main/docbook/en-US/harness/executing.xml 2010-09-20 10:52:52 UTC (rev 20664)
@@ -1,6 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
-"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">
+<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
+<!ENTITY % BOOK_ENTITIES SYSTEM "../jsr303-tck.ent">
+%BOOK_ENTITIES;
+]>
<chapter id="executing-test-harness">
<title>Executing a Test Suite</title>
@@ -27,7 +29,7 @@
<table frame="all" id="tck-runner-dependencies"
title="CDI TCK Runner dependencies">
- <title>Web Beans JBoss TCK Runner Dependencies</title>
+ <title>Bean Validation TCK Runner Dependencies</title>
<tgroup cols="3">
<colspec colname="c1" />
@@ -52,7 +54,7 @@
<entry>validation-api</entry>
- <entry>1.0.0.GA</entry>
+ <entry>&validationApi;</entry>
</row>
<row>
@@ -60,7 +62,7 @@
<entry>hibernate-validator</entry>
- <entry>4.0.1.GA</entry>
+ <entry>&referenceImplVersion;</entry>
</row>
<row>
@@ -68,7 +70,7 @@
<entry>jsr303-tck</entry>
- <entry>1.0.1.GA</entry>
+ <entry>&version;</entry>
</row>
<row>
@@ -90,9 +92,9 @@
<row>
<entry>org.jboss.test-harness</entry>
- <entry>jboss-test-harness-jboss-as-51</entry>
+ <entry>jboss-test-harness-jboss-as-60</entry>
- <entry>1.0.0</entry>
+ <entry>1.1.0-CR6</entry>
</row>
</tbody>
</tgroup>
Modified: beanvalidation/tck/trunk/src/main/docbook/en-US/harness/introduction.xml
===================================================================
--- beanvalidation/tck/trunk/src/main/docbook/en-US/harness/introduction.xml 2010-09-18 13:47:12 UTC (rev 20663)
+++ beanvalidation/tck/trunk/src/main/docbook/en-US/harness/introduction.xml 2010-09-20 10:52:52 UTC (rev 20664)
@@ -1,6 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
-"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">
+<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
+<!ENTITY % BOOK_ENTITIES SYSTEM "../jsr303-tck.ent">
+%BOOK_ENTITIES;
+]>
<chapter id="test-harness-introduction">
<title>Introduction</title>
Deleted: beanvalidation/tck/trunk/src/main/docbook/en-US/harness/master.xml
===================================================================
--- beanvalidation/tck/trunk/src/main/docbook/en-US/harness/master.xml 2010-09-18 13:47:12 UTC (rev 20663)
+++ beanvalidation/tck/trunk/src/main/docbook/en-US/harness/master.xml 2010-09-20 10:52:52 UTC (rev 20664)
@@ -1,8 +0,0 @@
-<?xml version='1.0' encoding='UTF-8'?>
-<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [ ]>
-<book lang="en">
- <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="Book_Info.xml"/>
- <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="Book_Preface.xml"/>
- <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="introduction.xml"/>
- <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="configuration.xml"/>
-</book>
Modified: beanvalidation/tck/trunk/src/main/docbook/en-US/installation.xml
===================================================================
--- beanvalidation/tck/trunk/src/main/docbook/en-US/installation.xml 2010-09-18 13:47:12 UTC (rev 20663)
+++ beanvalidation/tck/trunk/src/main/docbook/en-US/installation.xml 2010-09-20 10:52:52 UTC (rev 20664)
@@ -1,6 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
-"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">
+<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
+<!ENTITY % BOOK_ENTITIES SYSTEM "jsr303-tck.ent">
+%BOOK_ENTITIES;
+]>
<chapter id="installation">
<title>Installation</title>
Modified: beanvalidation/tck/trunk/src/main/docbook/en-US/introduction.xml
===================================================================
--- beanvalidation/tck/trunk/src/main/docbook/en-US/introduction.xml 2010-09-18 13:47:12 UTC (rev 20663)
+++ beanvalidation/tck/trunk/src/main/docbook/en-US/introduction.xml 2010-09-20 10:52:52 UTC (rev 20664)
@@ -1,6 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
-"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">
+<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
+<!ENTITY % BOOK_ENTITIES SYSTEM "jsr303-tck.ent">
+%BOOK_ENTITIES;
+]>
<chapter id="introduction">
<title>Introduction</title>
Copied: beanvalidation/tck/trunk/src/main/docbook/en-US/jsr303-tck.ent (from rev 20266, validator/trunk/hibernate-validator/src/main/docbook/en-US/hv.ent)
===================================================================
--- beanvalidation/tck/trunk/src/main/docbook/en-US/jsr303-tck.ent (rev 0)
+++ beanvalidation/tck/trunk/src/main/docbook/en-US/jsr303-tck.ent 2010-09-20 10:52:52 UTC (rev 20664)
@@ -0,0 +1,7 @@
+<!ENTITY version "WORKING">
+<!ENTITY today "TODAY">
+<!ENTITY copyrightYear "2009, 2010">
+<!ENTITY copyrightHolder "Red Hat, Inc.">
+<!ENTITY validationApi "1.0.0.GA">
+<!ENTITY referenceImplVersion "4.0.1.GA">
+
Modified: beanvalidation/tck/trunk/src/main/docbook/en-US/master.xml
===================================================================
--- beanvalidation/tck/trunk/src/main/docbook/en-US/master.xml 2010-09-18 13:47:12 UTC (rev 20663)
+++ beanvalidation/tck/trunk/src/main/docbook/en-US/master.xml 2010-09-20 10:52:52 UTC (rev 20664)
@@ -1,12 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [ ]>
+<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
+<!ENTITY % BOOK_ENTITIES SYSTEM "jsr303-tck.ent">
+%BOOK_ENTITIES;
+]>
<book lang="en">
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="Book_Info.xml"/>
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="Book_Preface.xml"/>
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="part-background.xml"/>
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="part-execution.xml"/>
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="part-test-harness.xml" />
-<!--
-vim: ts=3:sw=3:tw=80:set expandtab
--->
</book>
Modified: beanvalidation/tck/trunk/src/main/docbook/en-US/part-background.xml
===================================================================
--- beanvalidation/tck/trunk/src/main/docbook/en-US/part-background.xml 2010-09-18 13:47:12 UTC (rev 20663)
+++ beanvalidation/tck/trunk/src/main/docbook/en-US/part-background.xml 2010-09-20 10:52:52 UTC (rev 20664)
@@ -1,6 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE part PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
-"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">
+<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
+<!ENTITY % BOOK_ENTITIES SYSTEM "jsr303-tck.ent">
+%BOOK_ENTITIES;
+]>
<part>
<title>Getting Acquainted with the TCK</title>
Modified: beanvalidation/tck/trunk/src/main/docbook/en-US/part-execution.xml
===================================================================
--- beanvalidation/tck/trunk/src/main/docbook/en-US/part-execution.xml 2010-09-18 13:47:12 UTC (rev 20663)
+++ beanvalidation/tck/trunk/src/main/docbook/en-US/part-execution.xml 2010-09-20 10:52:52 UTC (rev 20664)
@@ -1,6 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE part PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
-"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">
+<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
+<!ENTITY % BOOK_ENTITIES SYSTEM "jsr303-tck.ent">
+%BOOK_ENTITIES;
+]>
<part>
<title>Executing and Debugging Tests</title>
Modified: beanvalidation/tck/trunk/src/main/docbook/en-US/part-test-harness.xml
===================================================================
--- beanvalidation/tck/trunk/src/main/docbook/en-US/part-test-harness.xml 2010-09-18 13:47:12 UTC (rev 20663)
+++ beanvalidation/tck/trunk/src/main/docbook/en-US/part-test-harness.xml 2010-09-20 10:52:52 UTC (rev 20664)
@@ -1,6 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE part PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
-"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">
+<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
+<!ENTITY % BOOK_ENTITIES SYSTEM "jsr303-tck.ent">
+%BOOK_ENTITIES;
+]>
<part id="test-harness">
<title>JBoss Test Harness</title>
Modified: beanvalidation/tck/trunk/src/main/docbook/en-US/reporting.xml
===================================================================
--- beanvalidation/tck/trunk/src/main/docbook/en-US/reporting.xml 2010-09-18 13:47:12 UTC (rev 20663)
+++ beanvalidation/tck/trunk/src/main/docbook/en-US/reporting.xml 2010-09-20 10:52:52 UTC (rev 20664)
@@ -1,6 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
-"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">
+<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
+<!ENTITY % BOOK_ENTITIES SYSTEM "jsr303-tck.ent">
+%BOOK_ENTITIES;
+]>
<chapter id="reporting">
<title>Reporting</title>
Modified: beanvalidation/tck/trunk/src/main/docbook/en-US/sigtest.xml
===================================================================
--- beanvalidation/tck/trunk/src/main/docbook/en-US/sigtest.xml 2010-09-18 13:47:12 UTC (rev 20663)
+++ beanvalidation/tck/trunk/src/main/docbook/en-US/sigtest.xml 2010-09-20 10:52:52 UTC (rev 20664)
@@ -1,6 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
-"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">
+<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
+<!ENTITY % BOOK_ENTITIES SYSTEM "jsr303-tck.ent">
+%BOOK_ENTITIES;
+]>
<chapter id="sigtest">
<title>Running the Signature Test</title>
@@ -29,7 +31,7 @@
(in the <filename>artifacts</filename> directory) which were created using
the following command (using the corresponding Java version):</para>
- <programlisting>java -jar sigtestdev.jar Setup -classpath %JAVA_HOME%/jre/lib/rt.jar:lib/validation-api-1.0.0.GA.jar -package javax.validation -filename validation-api-java6.sig</programlisting>
+ <programlisting>java -jar sigtestdev.jar Setup -classpath %JAVA_HOME%/jre/lib/rt.jar:lib/validation-api-&validationApi;.jar -package javax.validation -filename validation-api-java6.sig</programlisting>
<para>In order to pass the Bean Validation TCK you have to make sure that
your API passes the signature tests against
@@ -41,11 +43,11 @@
<para>To run the signature test use:</para>
- <programlisting>java -jar sigtest.jar Test -classpath %JAVA_HOME%/jre/lib/rt.jar:lib/validation-api-1.0.0.GA.jar -static -package javax.validation -filename validation-api-java6.sig</programlisting>
+ <programlisting>java -jar sigtest.jar Test -classpath %JAVA_HOME%/jre/lib/rt.jar:lib/validation-api-&validationApi;.jar -static -package javax.validation -filename validation-api-java6.sig</programlisting>
<para>You have to chose the right version of the signature file depending
on your Java version. In order to run against your own Bean Validation API
- replace validation-api-1.0.0.GA.jar with your own API jar. You should get
+ replace validation-api-&validationApi;.jar with your own API jar. You should get
the message <literal>"STATUS:Passed."</literal>.</para>
</section>
14 years, 2 months
Hibernate SVN: r20663 - core/trunk/testsuite/src/test/java/org/hibernate/test/annotations/indexcoll.
by hibernate-commits@lists.jboss.org
Author: stliu
Date: 2010-09-18 09:47:12 -0400 (Sat, 18 Sep 2010)
New Revision: 20663
Modified:
core/trunk/testsuite/src/test/java/org/hibernate/test/annotations/indexcoll/Atmosphere.java
Log:
HHH-5572 rollback, since this change causes org.hibernate.test.annotations.indexcoll.IndexedCollectionTest#testJPA2DefaultMapColumns to fail.
Modified: core/trunk/testsuite/src/test/java/org/hibernate/test/annotations/indexcoll/Atmosphere.java
===================================================================
--- core/trunk/testsuite/src/test/java/org/hibernate/test/annotations/indexcoll/Atmosphere.java 2010-09-17 10:31:59 UTC (rev 20662)
+++ core/trunk/testsuite/src/test/java/org/hibernate/test/annotations/indexcoll/Atmosphere.java 2010-09-18 13:47:12 UTC (rev 20663)
@@ -73,7 +73,6 @@
@ManyToMany(cascade = CascadeType.ALL)
@MapKey
@JoinTable(name="Atm_Gas_DefLeg")
- @MapKeyColumn(nullable=false)
public Map<String, Gas> gasesDefLeg = new HashMap<String, Gas>();
@ManyToMany(cascade = CascadeType.ALL)
14 years, 2 months
Hibernate SVN: r20662 - core/trunk/parent.
by hibernate-commits@lists.jboss.org
Author: stliu
Date: 2010-09-17 06:31:59 -0400 (Fri, 17 Sep 2010)
New Revision: 20662
Modified:
core/trunk/parent/pom.xml
Log:
HHH-5572 clean up Sybase job failures
Modified: core/trunk/parent/pom.xml
===================================================================
--- core/trunk/parent/pom.xml 2010-09-17 09:26:03 UTC (rev 20661)
+++ core/trunk/parent/pom.xml 2010-09-17 10:31:59 UTC (rev 20662)
@@ -916,7 +916,7 @@
<properties>
<db.dialect>org.hibernate.dialect.SybaseASE15Dialect</db.dialect>
<jdbc.driver>com.sybase.jdbc3.jdbc.SybDriver</jdbc.driver>
- <jdbc.url>jdbc:sybase:Tds:vmg07.mw.lab.eng.bos.redhat.com:5000/hibbrtru?SQLINITSTRING=set quoted_identifier on&DYNAMIC_PREPARE=true</jdbc.url>
+ <jdbc.url>jdbc:sybase:Tds:vmg07.mw.lab.eng.bos.redhat.com:5000/hibbrtru?SQLINITSTRING=set quoted_identifier on&DYNAMIC_PREPARE=true</jdbc.url>
<jdbc.user>hibbrtru</jdbc.user>
<jdbc.pass>hibbrtru</jdbc.pass>
<jdbc.isolation/>
@@ -935,7 +935,7 @@
<properties>
<db.dialect>org.hibernate.dialect.SybaseASE15Dialect</db.dialect>
<jdbc.driver>com.sybase.jdbc3.jdbc.SybDriver</jdbc.driver>
- <jdbc.url>jdbc:sybase:Tds:vmg09.mw.lab.eng.bos.redhat.com:5000/hibbrtru?SQLINITSTRING=set quoted_identifier on&DYNAMIC_PREPARE=true</jdbc.url>
+ <jdbc.url>jdbc:sybase:Tds:vmg09.mw.lab.eng.bos.redhat.com:5000/hibbrtru?SQLINITSTRING=set quoted_identifier on&DYNAMIC_PREPARE=true</jdbc.url>
<jdbc.user>hibbrtru</jdbc.user>
<jdbc.pass>hibbrtru</jdbc.pass>
<jdbc.isolation/>
14 years, 2 months
Hibernate SVN: r20661 - core/trunk/parent.
by hibernate-commits@lists.jboss.org
Author: stliu
Date: 2010-09-17 05:26:03 -0400 (Fri, 17 Sep 2010)
New Revision: 20661
Modified:
core/trunk/parent/pom.xml
Log:
HHH-5572 clean up Sybase job failures
Modified: core/trunk/parent/pom.xml
===================================================================
--- core/trunk/parent/pom.xml 2010-09-17 09:16:10 UTC (rev 20660)
+++ core/trunk/parent/pom.xml 2010-09-17 09:26:03 UTC (rev 20661)
@@ -916,7 +916,7 @@
<properties>
<db.dialect>org.hibernate.dialect.SybaseASE15Dialect</db.dialect>
<jdbc.driver>com.sybase.jdbc3.jdbc.SybDriver</jdbc.driver>
- <jdbc.url>jdbc:sybase:Tds:vmg07.mw.lab.eng.bos.redhat.com:5000/hibbrtru?SQLINITSTRING=set quoted_identifier on</jdbc.url>
+ <jdbc.url>jdbc:sybase:Tds:vmg07.mw.lab.eng.bos.redhat.com:5000/hibbrtru?SQLINITSTRING=set quoted_identifier on&DYNAMIC_PREPARE=true</jdbc.url>
<jdbc.user>hibbrtru</jdbc.user>
<jdbc.pass>hibbrtru</jdbc.pass>
<jdbc.isolation/>
@@ -935,7 +935,7 @@
<properties>
<db.dialect>org.hibernate.dialect.SybaseASE15Dialect</db.dialect>
<jdbc.driver>com.sybase.jdbc3.jdbc.SybDriver</jdbc.driver>
- <jdbc.url>jdbc:sybase:Tds:vmg09.mw.lab.eng.bos.redhat.com:5000/hibbrtru?SQLINITSTRING=set quoted_identifier on</jdbc.url>
+ <jdbc.url>jdbc:sybase:Tds:vmg09.mw.lab.eng.bos.redhat.com:5000/hibbrtru?SQLINITSTRING=set quoted_identifier on&DYNAMIC_PREPARE=true</jdbc.url>
<jdbc.user>hibbrtru</jdbc.user>
<jdbc.pass>hibbrtru</jdbc.pass>
<jdbc.isolation/>
14 years, 2 months
Hibernate SVN: r20660 - search/trunk/hibernate-search/src/test/java/org/hibernate/search/test/query/dsl.
by hibernate-commits@lists.jboss.org
Author: hardy.ferentschik
Date: 2010-09-17 05:16:10 -0400 (Fri, 17 Sep 2010)
New Revision: 20660
Modified:
search/trunk/hibernate-search/src/test/java/org/hibernate/search/test/query/dsl/DSLTest.java
Log:
HSEARCH-593 Cleanup DSL test
Modified: search/trunk/hibernate-search/src/test/java/org/hibernate/search/test/query/dsl/DSLTest.java
===================================================================
--- search/trunk/hibernate-search/src/test/java/org/hibernate/search/test/query/dsl/DSLTest.java 2010-09-17 09:15:09 UTC (rev 20659)
+++ search/trunk/hibernate-search/src/test/java/org/hibernate/search/test/query/dsl/DSLTest.java 2010-09-17 09:16:10 UTC (rev 20660)
@@ -51,120 +51,122 @@
/**
* @author Emmanuel Bernard
+ * @author Hardy Ferentschik
*/
public class DSLTest extends SearchTestCase {
- public void testUseOfFieldBridge() throws Exception {
- FullTextSession fts = initData();
+ FullTextSession fullTextSession;
- Transaction transaction = fts.beginTransaction();
- final QueryBuilder monthQb = fts.getSearchFactory()
+ public void setUp() throws Exception {
+ super.setUp();
+ Session session = openSession();
+ fullTextSession = Search.getFullTextSession( session );
+ indexTestData();
+ }
+
+ public void tearDown() throws Exception {
+ cleanUpTestData();
+ super.tearDown();
+ }
+
+
+ public void testUseOfFieldBridge() throws Exception {
+ Transaction transaction = fullTextSession.beginTransaction();
+ final QueryBuilder monthQb = fullTextSession.getSearchFactory()
.buildQueryBuilder().forEntity( Month.class ).get();
- Query
- query = monthQb.keyword().onField( "monthValue" ).matching( 2 ).createQuery();
- assertEquals( 1, fts.createFullTextQuery( query, Month.class ).getResultSize() );
+ Query query = monthQb.keyword().onField( "monthValue" ).matching( 2 ).createQuery();
+ assertEquals( 1, fullTextSession.createFullTextQuery( query, Month.class ).getResultSize() );
query = monthQb.keyword()
- .onField( "monthValue" )
- .ignoreFieldBridge()
- .matching( "2" )
- .createQuery();
- assertEquals( 1, fts.createFullTextQuery( query, Month.class ).getResultSize() );
+ .onField( "monthValue" )
+ .ignoreFieldBridge()
+ .matching( "2" )
+ .createQuery();
+ assertEquals( 1, fullTextSession.createFullTextQuery( query, Month.class ).getResultSize() );
transaction.commit();
-
- cleanData( fts );
}
public void testTermQueryOnAnalyzer() throws Exception {
- FullTextSession fts = initData();
-
- Transaction transaction = fts.beginTransaction();
- final QueryBuilder monthQb = fts.getSearchFactory()
+ Transaction transaction = fullTextSession.beginTransaction();
+ final QueryBuilder monthQb = fullTextSession.getSearchFactory()
.buildQueryBuilder().forEntity( Month.class ).get();
- Query
+
//regular term query
- query = monthQb.keyword().onField( "mythology" ).matching( "cold" ).createQuery();
+ Query query = monthQb.keyword().onField( "mythology" ).matching( "cold" ).createQuery();
- assertEquals( 0, fts.createFullTextQuery( query, Month.class ).getResultSize() );
+ assertEquals( 0, fullTextSession.createFullTextQuery( query, Month.class ).getResultSize() );
//term query based on several words
query = monthQb.keyword().onField( "mythology" ).matching( "colder darker" ).createQuery();
- assertEquals( 1, fts.createFullTextQuery( query, Month.class ).getResultSize() );
+ assertEquals( 1, fullTextSession.createFullTextQuery( query, Month.class ).getResultSize() );
//term query applying the analyzer and generating one term per word
query = monthQb.keyword().onField( "mythology_stem" ).matching( "snowboard" ).createQuery();
- assertEquals( 1, fts.createFullTextQuery( query, Month.class ).getResultSize() );
+ assertEquals( 1, fullTextSession.createFullTextQuery( query, Month.class ).getResultSize() );
//term query applying the analyzer and generating several terms per word
query = monthQb.keyword().onField( "mythology_ngram" ).matching( "snobored" ).createQuery();
- assertEquals( 1, fts.createFullTextQuery( query, Month.class ).getResultSize() );
+ assertEquals( 1, fullTextSession.createFullTextQuery( query, Month.class ).getResultSize() );
//term query not using analyzers
query = monthQb.keyword().onField( "mythology" ).ignoreAnalyzer().matching( "Month" ).createQuery();
- assertEquals( 0, fts.createFullTextQuery( query, Month.class ).getResultSize() );
+ assertEquals( 0, fullTextSession.createFullTextQuery( query, Month.class ).getResultSize() );
transaction.commit();
-
- cleanData( fts );
}
public void testFuzzyAndWildcardQuery() throws Exception {
- FullTextSession fts = initData();
-
- Transaction transaction = fts.beginTransaction();
- final QueryBuilder monthQb = fts.getSearchFactory()
+ Transaction transaction = fullTextSession.beginTransaction();
+ final QueryBuilder monthQb = fullTextSession.getSearchFactory()
.buildQueryBuilder().forEntity( Month.class ).get();
- Query
+
//fuzzy search with custom threshold and prefix
- query = monthQb
+ Query query = monthQb
.keyword()
- .fuzzy()
- .withThreshold( .8f )
- .withPrefixLength( 1 )
- .onField( "mythology" )
- .matching( "calder" )
- .createQuery();
+ .fuzzy()
+ .withThreshold( .8f )
+ .withPrefixLength( 1 )
+ .onField( "mythology" )
+ .matching( "calder" )
+ .createQuery();
- assertEquals( 1, fts.createFullTextQuery( query, Month.class ).getResultSize() );
+ assertEquals( 1, fullTextSession.createFullTextQuery( query, Month.class ).getResultSize() );
//wildcard query
query = monthQb
.keyword()
- .wildcard()
- .onField( "mythology" )
- .matching( "mon*" )
- .createQuery();
+ .wildcard()
+ .onField( "mythology" )
+ .matching( "mon*" )
+ .createQuery();
- assertEquals( 2, fts.createFullTextQuery( query, Month.class ).getResultSize() );
+ assertEquals( 2, fullTextSession.createFullTextQuery( query, Month.class ).getResultSize() );
transaction.commit();
-
- cleanData( fts );
}
+ @SuppressWarnings("unchecked")
public void testQueryCustomization() throws Exception {
- FullTextSession fts = initData();
-
- Transaction transaction = fts.beginTransaction();
- final QueryBuilder monthQb = fts.getSearchFactory()
+ Transaction transaction = fullTextSession.beginTransaction();
+ final QueryBuilder monthQb = fullTextSession.getSearchFactory()
.buildQueryBuilder().forEntity( Month.class ).get();
- Query
+
//combined query, January and february both contain whitening but February in a longer text
- query = monthQb
+ Query query = monthQb
.bool()
- .should( monthQb.keyword().onField( "mythology" ).matching( "whitening" ).createQuery() )
- .should( monthQb.keyword().onField( "history" ).matching( "whitening" ).createQuery() )
+ .should( monthQb.keyword().onField( "mythology" ).matching( "whitening" ).createQuery() )
+ .should( monthQb.keyword().onField( "history" ).matching( "whitening" ).createQuery() )
.createQuery();
- List<Month> results = fts.createFullTextQuery( query, Month.class ).list();
+ List<Month> results = fullTextSession.createFullTextQuery( query, Month.class ).list();
assertEquals( 2, results.size() );
assertEquals( "January", results.get( 0 ).getName() );
@@ -172,257 +174,244 @@
//since history is boosted, February should come first though
query = monthQb
.bool()
- .should( monthQb.keyword().onField( "mythology" ).matching( "whitening" ).createQuery() )
- .should( monthQb.keyword().onField( "history" ).boostedTo( 30 ).matching( "whitening" ).createQuery() )
+ .should( monthQb.keyword().onField( "mythology" ).matching( "whitening" ).createQuery() )
+ .should( monthQb.keyword().onField( "history" ).boostedTo( 30 ).matching( "whitening" ).createQuery() )
.createQuery();
- results = fts.createFullTextQuery( query, Month.class ).list();
+ results = fullTextSession.createFullTextQuery( query, Month.class ).list();
assertEquals( 2, results.size() );
assertEquals( "February", results.get( 0 ).getName() );
//FIXME add other method tests besides boostedTo
transaction.commit();
-
- cleanData( fts );
}
+ @SuppressWarnings("unchecked")
public void testMultipleFields() throws Exception {
- FullTextSession fts = initData();
-
- Transaction transaction = fts.beginTransaction();
- final QueryBuilder monthQb = fts.getSearchFactory()
+ Transaction transaction = fullTextSession.beginTransaction();
+ final QueryBuilder monthQb = fullTextSession.getSearchFactory()
.buildQueryBuilder().forEntity( Month.class ).get();
- Query
//combined query, January and february both contain whitening but February in a longer text
- query = monthQb.keyword()
- .onField( "mythology" )
- .andField( "history" )
- .matching( "whitening" ).createQuery();
+ Query query = monthQb.keyword()
+ .onField( "mythology" )
+ .andField( "history" )
+ .matching( "whitening" ).createQuery();
- List<Month> results = fts.createFullTextQuery( query, Month.class ).list();
+ List<Month> results = fullTextSession.createFullTextQuery( query, Month.class ).list();
assertEquals( 2, results.size() );
assertEquals( "January", results.get( 0 ).getName() );
//combined query, January and february both contain whitening but February in a longer text
query = monthQb.keyword()
- .onFields( "mythology", "history" )
- .boostedTo( 30 )
- .matching( "whitening" ).createQuery();
+ .onFields( "mythology", "history" )
+ .boostedTo( 30 )
+ .matching( "whitening" ).createQuery();
- results = fts.createFullTextQuery( query, Month.class ).list();
+ results = fullTextSession.createFullTextQuery( query, Month.class ).list();
assertEquals( 2, results.size() );
assertEquals( "January", results.get( 0 ).getName() );
//boosted query, January and february both contain whitening but February in a longer text
//since history is boosted, February should come first though
query = monthQb.keyword()
- .onField( "mythology" )
- .andField( "history" )
- .boostedTo( 30 )
- .matching( "whitening" )
- .createQuery();
+ .onField( "mythology" )
+ .andField( "history" )
+ .boostedTo( 30 )
+ .matching( "whitening" )
+ .createQuery();
- results = fts.createFullTextQuery( query, Month.class ).list();
+ results = fullTextSession.createFullTextQuery( query, Month.class ).list();
assertEquals( 2, results.size() );
assertEquals( "February", results.get( 0 ).getName() );
transaction.commit();
-
- cleanData( fts );
}
+ @SuppressWarnings("unchecked")
public void testBoolean() throws Exception {
- FullTextSession fts = initData();
-
- Transaction transaction = fts.beginTransaction();
- final QueryBuilder monthQb = fts.getSearchFactory()
+ Transaction transaction = fullTextSession.beginTransaction();
+ final QueryBuilder monthQb = fullTextSession.getSearchFactory()
.buildQueryBuilder().forEntity( Month.class ).get();
- Query
+
//must
- query = monthQb
+ Query query = monthQb
.bool()
- .must( monthQb.keyword().onField( "mythology" ).matching( "colder" ).createQuery() )
- .createQuery();
+ .must( monthQb.keyword().onField( "mythology" ).matching( "colder" ).createQuery() )
+ .createQuery();
- List<Month> results = fts.createFullTextQuery( query, Month.class ).list();
+ List<Month> results = fullTextSession.createFullTextQuery( query, Month.class ).list();
assertEquals( 1, results.size() );
assertEquals( "January", results.get( 0 ).getName() );
//must not + all
query = monthQb
.bool()
- .should( monthQb.all().createQuery() )
- .must( monthQb.keyword().onField( "mythology" ).matching( "colder" ).createQuery() )
- .not()
- .createQuery();
- results = fts.createFullTextQuery( query, Month.class ).list();
+ .should( monthQb.all().createQuery() )
+ .must( monthQb.keyword().onField( "mythology" ).matching( "colder" ).createQuery() )
+ .not()
+ .createQuery();
+
+ results = fullTextSession.createFullTextQuery( query, Month.class ).list();
assertEquals( 1, results.size() );
assertEquals( "February", results.get( 0 ).getName() );
//implicit must not + all (not recommended)
query = monthQb
.bool()
- .must( monthQb.keyword().onField( "mythology" ).matching( "colder" ).createQuery() )
- .not()
- .createQuery();
- results = fts.createFullTextQuery( query, Month.class ).list();
+ .must( monthQb.keyword().onField( "mythology" ).matching( "colder" ).createQuery() )
+ .not()
+ .createQuery();
+ results = fullTextSession.createFullTextQuery( query, Month.class ).list();
assertEquals( 1, results.size() );
assertEquals( "February", results.get( 0 ).getName() );
//all except (recommended)
query = monthQb
.all()
- .except( monthQb.keyword().onField( "mythology" ).matching( "colder" ).createQuery() )
- .createQuery();
+ .except( monthQb.keyword().onField( "mythology" ).matching( "colder" ).createQuery() )
+ .createQuery();
- results = fts.createFullTextQuery( query, Month.class ).list();
+ results = fullTextSession.createFullTextQuery( query, Month.class ).list();
assertEquals( 1, results.size() );
assertEquals( "February", results.get( 0 ).getName() );
transaction.commit();
-
- cleanData( fts );
}
public void testRangeQuery() throws Exception {
- FullTextSession fts = initData();
-
- Transaction transaction = fts.beginTransaction();
- final QueryBuilder monthQb = fts.getSearchFactory()
+ Transaction transaction = fullTextSession.beginTransaction();
+ final QueryBuilder monthQb = fullTextSession.getSearchFactory()
.buildQueryBuilder().forEntity( Month.class ).get();
final Calendar calendar = Calendar.getInstance();
calendar.setTimeZone( TimeZone.getTimeZone( "UTC" ) );
- calendar.set(0 + 1900, 2, 12, 0, 0, 0);
+ calendar.set( 0 + 1900, 2, 12, 0, 0, 0 );
Date from = calendar.getTime();
- calendar.set(10 + 1900, 2, 12, 0, 0, 0);
+ calendar.set( 10 + 1900, 2, 12, 0, 0, 0 );
Date to = calendar.getTime();
- Query
-
- query = monthQb.
+ Query query = monthQb.
range()
- .onField( "estimatedCreation" )
- .andField( "justfortest" )
- .ignoreFieldBridge().ignoreAnalyzer()
- .from( from )
- .to( to ).excludeLimit()
- .createQuery();
+ .onField( "estimatedCreation" )
+ .andField( "justfortest" )
+ .ignoreFieldBridge().ignoreAnalyzer()
+ .from( from )
+ .to( to ).excludeLimit()
+ .createQuery();
- assertEquals( 1, fts.createFullTextQuery( query, Month.class ).getResultSize() );
+ assertEquals( 1, fullTextSession.createFullTextQuery( query, Month.class ).getResultSize() );
query = monthQb.
range()
- .onField( "estimatedCreation" )
- .ignoreFieldBridge()
- .andField( "justfortest" )
- .ignoreFieldBridge().ignoreAnalyzer()
- .from( DateTools.dateToString( from, DateTools.Resolution.MINUTE ) )
- .to( DateTools.dateToString( to, DateTools.Resolution.MINUTE ) ).excludeLimit()
- .createQuery();
- assertEquals( 1, fts.createFullTextQuery( query, Month.class ).getResultSize() );
+ .onField( "estimatedCreation" )
+ .ignoreFieldBridge()
+ .andField( "justfortest" )
+ .ignoreFieldBridge().ignoreAnalyzer()
+ .from( DateTools.dateToString( from, DateTools.Resolution.MINUTE ) )
+ .to( DateTools.dateToString( to, DateTools.Resolution.MINUTE ) ).excludeLimit()
+ .createQuery();
+ assertEquals( 1, fullTextSession.createFullTextQuery( query, Month.class ).getResultSize() );
query = monthQb.
range()
- .onField( "estimatedCreation" )
- .andField( "justfortest" )
- .ignoreFieldBridge().ignoreAnalyzer()
- .below( to )
- .createQuery();
+ .onField( "estimatedCreation" )
+ .andField( "justfortest" )
+ .ignoreFieldBridge().ignoreAnalyzer()
+ .below( to )
+ .createQuery();
- FullTextQuery hibQuery = fts.createFullTextQuery( query, Month.class );
+ FullTextQuery hibQuery = fullTextSession.createFullTextQuery( query, Month.class );
assertEquals( 1, hibQuery.getResultSize() );
- assertEquals( "January", ( (Month) hibQuery.list().get( 0 ) ).getName() );
+ assertEquals( "January", ( ( Month ) hibQuery.list().get( 0 ) ).getName() );
query = monthQb.
range()
- .onField( "estimatedCreation" )
- .ignoreFieldBridge()
- .andField( "justfortest" )
- .ignoreFieldBridge().ignoreAnalyzer()
- .below( DateTools.dateToString( to, DateTools.Resolution.MINUTE ) )
- .createQuery();
+ .onField( "estimatedCreation" )
+ .ignoreFieldBridge()
+ .andField( "justfortest" )
+ .ignoreFieldBridge().ignoreAnalyzer()
+ .below( DateTools.dateToString( to, DateTools.Resolution.MINUTE ) )
+ .createQuery();
- hibQuery = fts.createFullTextQuery( query, Month.class );
+ hibQuery = fullTextSession.createFullTextQuery( query, Month.class );
assertEquals( 1, hibQuery.getResultSize() );
- assertEquals( "January", ( (Month) hibQuery.list().get( 0 ) ).getName() );
+ assertEquals( "January", ( ( Month ) hibQuery.list().get( 0 ) ).getName() );
query = monthQb.
range()
- .onField( "estimatedCreation" )
- .andField( "justfortest" )
- .ignoreFieldBridge().ignoreAnalyzer()
- .above( to )
- .createQuery();
- hibQuery = fts.createFullTextQuery( query, Month.class );
+ .onField( "estimatedCreation" )
+ .andField( "justfortest" )
+ .ignoreFieldBridge().ignoreAnalyzer()
+ .above( to )
+ .createQuery();
+ hibQuery = fullTextSession.createFullTextQuery( query, Month.class );
assertEquals( 1, hibQuery.getResultSize() );
- assertEquals( "February", ( (Month) hibQuery.list().get( 0 ) ).getName() );
+ assertEquals( "February", ( ( Month ) hibQuery.list().get( 0 ) ).getName() );
query = monthQb.
range()
- .onField( "estimatedCreation" )
- .ignoreFieldBridge()
- .andField( "justfortest" )
- .ignoreFieldBridge().ignoreAnalyzer()
- .above( DateTools.dateToString( to, DateTools.Resolution.MINUTE ) )
- .createQuery();
- hibQuery = fts.createFullTextQuery( query, Month.class );
+ .onField( "estimatedCreation" )
+ .ignoreFieldBridge()
+ .andField( "justfortest" )
+ .ignoreFieldBridge().ignoreAnalyzer()
+ .above( DateTools.dateToString( to, DateTools.Resolution.MINUTE ) )
+ .createQuery();
+ hibQuery = fullTextSession.createFullTextQuery( query, Month.class );
assertEquals( 1, hibQuery.getResultSize() );
- assertEquals( "February", ( (Month) hibQuery.list().get( 0 ) ).getName() );
+ assertEquals( "February", ( ( Month ) hibQuery.list().get( 0 ) ).getName() );
transaction.commit();
-
- cleanData( fts );
}
public void testPhraseQuery() throws Exception {
- FullTextSession fts = initData();
-
- Transaction transaction = fts.beginTransaction();
- final QueryBuilder monthQb = fts.getSearchFactory()
+ Transaction transaction = fullTextSession.beginTransaction();
+ final QueryBuilder monthQb = fullTextSession.getSearchFactory()
.buildQueryBuilder().forEntity( Month.class ).get();
- Query
-
- query = monthQb.
+ Query query = monthQb.
phrase()
- .onField( "mythology" )
- .sentence( "colder and whitening" )
- .createQuery();
+ .onField( "mythology" )
+ .sentence( "colder and whitening" )
+ .createQuery();
- assertEquals( "test exact phrase", 1, fts.createFullTextQuery( query, Month.class ).getResultSize() );
+ assertEquals(
+ "test exact phrase", 1, fullTextSession.createFullTextQuery( query, Month.class ).getResultSize()
+ );
query = monthQb.
phrase()
- .onField( "mythology" )
- .sentence( "Month whitening" )
- .createQuery();
+ .onField( "mythology" )
+ .sentence( "Month whitening" )
+ .createQuery();
- assertEquals( "test slop", 0, fts.createFullTextQuery( query, Month.class ).getResultSize() );
+ assertEquals( "test slop", 0, fullTextSession.createFullTextQuery( query, Month.class ).getResultSize() );
query = monthQb.
phrase()
- .withSlop( 3 )
- .onField( "mythology" )
- .sentence( "Month whitening" )
- .createQuery();
+ .withSlop( 3 )
+ .onField( "mythology" )
+ .sentence( "Month whitening" )
+ .createQuery();
- assertEquals( "test slop", 1, fts.createFullTextQuery( query, Month.class ).getResultSize() );
+ assertEquals( "test slop", 1, fullTextSession.createFullTextQuery( query, Month.class ).getResultSize() );
query = monthQb.
phrase()
- .onField( "mythology" )
- .sentence( "whitening" )
- .createQuery();
+ .onField( "mythology" )
+ .sentence( "whitening" )
+ .createQuery();
- assertEquals( "test one term optimization", 1, fts.createFullTextQuery( query, Month.class ).getResultSize() );
+ assertEquals(
+ "test one term optimization",
+ 1,
+ fullTextSession.createFullTextQuery( query, Month.class ).getResultSize()
+ );
-
//Does not work as the NGram filter does not seem to be skipping posiional increment between ngrams.
// query = monthQb
// .phrase()
@@ -430,58 +419,56 @@
// .sentence( "snobored" )
// .createQuery();
//
-// assertEquals( 1, fts.createFullTextQuery( query, Month.class ).getResultSize() );
+// assertEquals( 1, fullTextSession.createFullTextQuery( query, Month.class ).getResultSize() );
transaction.commit();
-
- cleanData( fts );
}
// public void testTermQueryOnAnalyzer() throws Exception {
-// FullTextSession fts = initData();
+// FullTextSession fullTextSession = indexTestData();
//
-// Transaction transaction = fts.beginTransaction();
-// final QueryBuilder monthQb = fts.getSearchFactory()
+// Transaction transaction = fullTextSession.beginTransaction();
+// final QueryBuilder monthQb = fullTextSession.getSearchFactory()
// .buildQueryBuilder().forEntity( Month.class ).get();
// Query
// //regular term query
// query = monthQb.term().on( "mythology" ).matches( "cold" ).createQuery();
//
-// assertEquals( 0, fts.createFullTextQuery( query, Month.class ).getResultSize() );
+// assertEquals( 0, fullTextSession.createFullTextQuery( query, Month.class ).getResultSize() );
//
// //term query based on several words
// query = monthQb.term().on( "mythology" ).matches( "colder darker" ).createQuery();
//
-// assertEquals( 1, fts.createFullTextQuery( query, Month.class ).getResultSize() );
+// assertEquals( 1, fullTextSession.createFullTextQuery( query, Month.class ).getResultSize() );
//
// //term query applying the analyzer and generating one term per word
// query = monthQb.term().on( "mythology_stem" ).matches( "snowboard" ).createQuery();
//
-// assertEquals( 1, fts.createFullTextQuery( query, Month.class ).getResultSize() );
+// assertEquals( 1, fullTextSession.createFullTextQuery( query, Month.class ).getResultSize() );
//
// //term query applying the analyzer and generating several terms per word
// query = monthQb.term().on( "mythology_ngram" ).matches( "snobored" ).createQuery();
//
-// assertEquals( 1, fts.createFullTextQuery( query, Month.class ).getResultSize() );
+// assertEquals( 1, fullTextSession.createFullTextQuery( query, Month.class ).getResultSize() );
//
// //term query not using analyzers
// query = monthQb.term().on( "mythology" ).matches( "Month" ).ignoreAnalyzer().createQuery();
//
-// assertEquals( 0, fts.createFullTextQuery( query, Month.class ).getResultSize() );
+// assertEquals( 0, fullTextSession.createFullTextQuery( query, Month.class ).getResultSize() );
//
// query = monthQb.term().on( "mythology" ).matches( "Month" ).createQuery();
//
// transaction.commit();
//
-// cleanData( fts );
+// cleanUpTestData( fullTextSession );
// }
//
// public void testFuzzyAndWildcardQuery() throws Exception {
-// FullTextSession fts = initData();
+// FullTextSession fullTextSession = indexTestData();
//
-// Transaction transaction = fts.beginTransaction();
-// final QueryBuilder monthQb = fts.getSearchFactory()
+// Transaction transaction = fullTextSession.beginTransaction();
+// final QueryBuilder monthQb = fullTextSession.getSearchFactory()
// .buildQueryBuilder().forEntity( Month.class ).get();
// Query
// //fuzzy search with custom threshold and prefix
@@ -492,7 +479,7 @@
// .prefixLength( 1 )
// .createQuery();
//
-// assertEquals( 1, fts.createFullTextQuery( query, Month.class ).getResultSize() );
+// assertEquals( 1, fullTextSession.createFullTextQuery( query, Month.class ).getResultSize() );
//
// //wildcard query
// query = monthQb
@@ -500,18 +487,18 @@
// .wildcard()
// .createQuery();
// System.out.println(query.toString( ));
-// assertEquals( 2, fts.createFullTextQuery( query, Month.class ).getResultSize() );
+// assertEquals( 2, fullTextSession.createFullTextQuery( query, Month.class ).getResultSize() );
//
// transaction.commit();
//
-// cleanData( fts );
+// cleanUpTestData( fullTextSession );
// }
//
// public void testQueryCustomization() throws Exception {
-// FullTextSession fts = initData();
+// FullTextSession fullTextSession = indexTestData();
//
-// Transaction transaction = fts.beginTransaction();
-// final QueryBuilder monthQb = fts.getSearchFactory()
+// Transaction transaction = fullTextSession.beginTransaction();
+// final QueryBuilder monthQb = fullTextSession.getSearchFactory()
// .buildQueryBuilder().forEntity( Month.class ).get();
// Query
//
@@ -522,7 +509,7 @@
// .should( monthQb.term().on( "history" ).matches( "whitening" ).createQuery() )
// .createQuery();
//
-// List<Month> results = fts.createFullTextQuery( query, Month.class ).list();
+// List<Month> results = fullTextSession.createFullTextQuery( query, Month.class ).list();
// assertEquals( 2, results.size() );
// assertEquals( "January", results.get( 0 ).getName() );
//
@@ -534,7 +521,7 @@
// .should( monthQb.term().on( "history" ).matches( "whitening" ).boostedTo( 30 ).createQuery() )
// .createQuery();
//
-// results = fts.createFullTextQuery( query, Month.class ).list();
+// results = fullTextSession.createFullTextQuery( query, Month.class ).list();
// assertEquals( 2, results.size() );
// assertEquals( "February", results.get( 0 ).getName() );
//
@@ -542,46 +529,53 @@
//
// transaction.commit();
//
-// cleanData( fts );
+// cleanUpTestData( fullTextSession );
// }
//FIXME add boolean tests
- private void cleanData(FullTextSession fts) {
- Transaction tx = fts.beginTransaction();
- final List<Month> results = fts.createQuery( "from " + Month.class.getName() ).list();
+ private void indexTestData() {
+ Transaction tx = fullTextSession.beginTransaction();
+ final Calendar calendar = Calendar.getInstance();
+ calendar.setTimeZone( TimeZone.getTimeZone( "UTC" ) );
+ calendar.set( 0 + 1900, 2, 12, 0, 0, 0 );
+ fullTextSession.persist(
+ new Month(
+ "January",
+ 1,
+ "Month of colder and whitening",
+ "Historically colder than any other month in the northern hemisphere",
+ calendar.getTime()
+ )
+ );
+ calendar.set( 100 + 1900, 2, 12, 0, 0, 0 );
+ fullTextSession.persist(
+ new Month(
+ "February",
+ 2,
+ "Month of snowboarding",
+ "Historically, the month where we make babies while watching the whitening landscape",
+ calendar.getTime()
+ )
+ );
+ tx.commit();
+ fullTextSession.clear();
+ }
+
+ private void cleanUpTestData() {
+ if ( !fullTextSession.isOpen() ) {
+ return;
+ }
+ Transaction tx = fullTextSession.beginTransaction();
+ final List<Month> results = fullTextSession.createQuery( "from " + Month.class.getName() ).list();
assertEquals( 2, results.size() );
- for (Month entity : results) {
- fts.delete( entity );
+ for ( Month entity : results ) {
+ fullTextSession.delete( entity );
}
- tx.commit();
- fts.close();
- }
- private FullTextSession initData() {
- Session session = openSession();
- FullTextSession fts = Search.getFullTextSession( session );
- Transaction tx = fts.beginTransaction();
- final Calendar calendar = Calendar.getInstance();
- calendar.setTimeZone( TimeZone.getTimeZone( "UTC" ) );
- calendar.set(0 + 1900, 2, 12, 0, 0, 0);
- fts.persist( new Month(
- "January",
- 1,
- "Month of colder and whitening",
- "Historically colder than any other month in the northern hemisphere",
- calendar.getTime() ) );
- calendar.set(100 + 1900, 2, 12, 0, 0, 0);
- fts.persist( new Month(
- "February",
- 2,
- "Month of snowboarding",
- "Historically, the month where we make babies while watching the whitening landscape",
- calendar.getTime() ) );
tx.commit();
- fts.clear();
- return fts;
+ fullTextSession.close();
}
@Override
@@ -599,22 +593,22 @@
public static class MappingFactory {
@Factory
- public SearchMapping build() {
- SearchMapping mapping = new SearchMapping();
+ public SearchMapping build() {
+ SearchMapping mapping = new SearchMapping();
mapping
- .analyzerDef( "stemmer", StandardTokenizerFactory.class )
+ .analyzerDef( "stemmer", StandardTokenizerFactory.class )
.filter( StandardFilterFactory.class )
.filter( LowerCaseFilterFactory.class )
.filter( StopFilterFactory.class )
.filter( SnowballPorterFilterFactory.class )
- .param( "language", "English" )
- .analyzerDef( "ngram", StandardTokenizerFactory.class )
+ .param( "language", "English" )
+ .analyzerDef( "ngram", StandardTokenizerFactory.class )
.filter( StandardFilterFactory.class )
.filter( LowerCaseFilterFactory.class )
.filter( StopFilterFactory.class )
.filter( NGramFilterFactory.class )
- .param( "minGramSize", "3" )
- .param( "maxGramSize", "3" );
+ .param( "minGramSize", "3" )
+ .param( "maxGramSize", "3" );
return mapping;
}
}
14 years, 2 months