Hibernate SVN: r19598 - in validator/trunk/hibernate-validator/src: main/java/org/hibernate/validator/engine and 1 other directories.
by hibernate-commits@lists.jboss.org
Author: hardy.ferentschik
Date: 2010-05-25 05:50:12 -0400 (Tue, 25 May 2010)
New Revision: 19598
Modified:
validator/trunk/hibernate-validator/src/main/java/org/hibernate/validator/cfg/ConstraintMapping.java
validator/trunk/hibernate-validator/src/main/java/org/hibernate/validator/cfg/ConstraintsForType.java
validator/trunk/hibernate-validator/src/main/java/org/hibernate/validator/engine/ValidatorFactoryImpl.java
validator/trunk/hibernate-validator/src/test/java/org/hibernate/validator/test/cfg/ConstraintMappingTest.java
Log:
HV-274 Allow for default group sequences
Modified: validator/trunk/hibernate-validator/src/main/java/org/hibernate/validator/cfg/ConstraintMapping.java
===================================================================
--- validator/trunk/hibernate-validator/src/main/java/org/hibernate/validator/cfg/ConstraintMapping.java 2010-05-24 19:18:21 UTC (rev 19597)
+++ validator/trunk/hibernate-validator/src/main/java/org/hibernate/validator/cfg/ConstraintMapping.java 2010-05-25 09:50:12 UTC (rev 19598)
@@ -19,6 +19,7 @@
import java.util.ArrayList;
import java.util.Collection;
+import java.util.Collections;
import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
@@ -26,17 +27,21 @@
import java.util.Set;
/**
+ * Top level class for programmatically configured constraints.
+ *
* @author Hardy Ferentschik
*/
public class ConstraintMapping {
private final Map<Class<?>, List<ConstraintDefinition<?>>> constraintConfig;
private final Map<Class<?>, List<CascadeDefinition>> cascadeConfig;
private final Set<Class<?>> configuredClasses;
+ private final Map<Class<?>, List<Class<?>>> defaultGroupSequences;
public ConstraintMapping() {
- constraintConfig = new HashMap<Class<?>, List<ConstraintDefinition<?>>>();
- cascadeConfig = new HashMap<Class<?>, List<CascadeDefinition>>();
- configuredClasses = new HashSet<Class<?>>();
+ this.constraintConfig = new HashMap<Class<?>, List<ConstraintDefinition<?>>>();
+ this.cascadeConfig = new HashMap<Class<?>, List<CascadeDefinition>>();
+ this.configuredClasses = new HashSet<Class<?>>();
+ this.defaultGroupSequences = new HashMap<Class<?>, List<Class<?>>>();
}
public ConstraintsForType type(Class<?> beanClass) {
@@ -69,6 +74,10 @@
}
}
+ protected void addDefaultGroupSequence(Class<?> beanClass, List<Class<?>> defaultGroupSequence) {
+ defaultGroupSequences.put( beanClass, defaultGroupSequence );
+ }
+
public Map<Class<?>, List<ConstraintDefinition<?>>> getConstraintConfig() {
return constraintConfig;
}
@@ -81,12 +90,23 @@
return configuredClasses;
}
+ public List<Class<?>> getDefaultSequence(Class<?> beanType) {
+ if ( defaultGroupSequences.containsKey( beanType ) ) {
+ return defaultGroupSequences.get( beanType );
+ }
+ else {
+ return Collections.emptyList();
+ }
+ }
+
@Override
public String toString() {
final StringBuilder sb = new StringBuilder();
sb.append( "ConstraintMapping" );
sb.append( "{cascadeConfig=" ).append( cascadeConfig );
sb.append( ", constraintConfig=" ).append( constraintConfig );
+ sb.append( ", configuredClasses=" ).append( configuredClasses );
+ sb.append( ", defaultGroupSequences=" ).append( defaultGroupSequences );
sb.append( '}' );
return sb.toString();
}
Modified: validator/trunk/hibernate-validator/src/main/java/org/hibernate/validator/cfg/ConstraintsForType.java
===================================================================
--- validator/trunk/hibernate-validator/src/main/java/org/hibernate/validator/cfg/ConstraintsForType.java 2010-05-24 19:18:21 UTC (rev 19597)
+++ validator/trunk/hibernate-validator/src/main/java/org/hibernate/validator/cfg/ConstraintsForType.java 2010-05-25 09:50:12 UTC (rev 19598)
@@ -20,6 +20,7 @@
import java.lang.annotation.Annotation;
import java.lang.annotation.ElementType;
import java.lang.reflect.Constructor;
+import java.util.Arrays;
import org.hibernate.validator.util.ReflectionHelper;
@@ -64,11 +65,17 @@
}
public ConstraintsForType valid(String property, ElementType type) {
- mapping.addCascadeConfig(new CascadeDefinition( beanClass, property, type));
+ mapping.addCascadeConfig( new CascadeDefinition( beanClass, property, type ) );
return this;
}
- public ConstraintsForType type(Class<?> type) {
+ public ConstraintsForType defaultGroupSequence(Class<?>... defaultGroupSequence) {
+ mapping.addDefaultGroupSequence( beanClass, Arrays.asList( defaultGroupSequence ) );
+ return this;
+ }
+
+ public ConstraintsForType type(Class<?> type, Class<?>... defaultGroupSequence) {
+ mapping.addDefaultGroupSequence( type, Arrays.asList( defaultGroupSequence ) );
return new ConstraintsForType( type, mapping );
}
}
Modified: validator/trunk/hibernate-validator/src/main/java/org/hibernate/validator/engine/ValidatorFactoryImpl.java
===================================================================
--- validator/trunk/hibernate-validator/src/main/java/org/hibernate/validator/engine/ValidatorFactoryImpl.java 2010-05-24 19:18:21 UTC (rev 19597)
+++ validator/trunk/hibernate-validator/src/main/java/org/hibernate/validator/engine/ValidatorFactoryImpl.java 2010-05-25 09:50:12 UTC (rev 19598)
@@ -154,11 +154,10 @@
}
}
- // TODO handle redefinition of default group
BeanMetaDataImpl<T> metaData = new BeanMetaDataImpl<T>(
beanClass,
constraintHelper,
- new ArrayList<Class<?>>(),
+ mapping.getDefaultSequence( beanClass ),
constraints,
cascadedMembers,
new AnnotationIgnores(),
Modified: validator/trunk/hibernate-validator/src/test/java/org/hibernate/validator/test/cfg/ConstraintMappingTest.java
===================================================================
--- validator/trunk/hibernate-validator/src/test/java/org/hibernate/validator/test/cfg/ConstraintMappingTest.java 2010-05-24 19:18:21 UTC (rev 19597)
+++ validator/trunk/hibernate-validator/src/test/java/org/hibernate/validator/test/cfg/ConstraintMappingTest.java 2010-05-25 09:50:12 UTC (rev 19598)
@@ -34,6 +34,7 @@
import org.hibernate.validator.cfg.ConstraintMapping;
import org.hibernate.validator.cfg.FutureDefinition;
import org.hibernate.validator.cfg.MinDefinition;
+import org.hibernate.validator.cfg.NotEmptyDefinition;
import org.hibernate.validator.cfg.NotNullDefinition;
import org.hibernate.validator.test.util.TestUtil;
import org.hibernate.validator.util.LoggerFactory;
@@ -162,6 +163,38 @@
log.debug( e.toString() );
}
}
+
+ @Test
+ public void testDefaultGroupSequence() {
+ HibernateValidatorConfiguration config = TestUtil.getConfiguration( HibernateValidator.class );
+
+ ConstraintMapping mapping = new ConstraintMapping();
+ mapping.type( Marathon.class )
+ .defaultGroupSequence( Foo.class, Marathon.class )
+ .property( "name", METHOD )
+ .constraint( NotNullDefinition.class ).groups( Foo.class )
+ .property( "runners", METHOD )
+ .constraint( NotEmptyDefinition.class );
+
+ config.addMapping( mapping );
+
+ ValidatorFactory factory = config.buildValidatorFactory();
+ Validator validator = factory.getValidator();
+
+ Marathon marathon = new Marathon();
+
+ Set<ConstraintViolation<Marathon>> violations = validator.validate( marathon );
+ assertNumberOfViolations( violations, 1 );
+ assertConstraintViolation( violations.iterator().next(), "may not be null" );
+
+ marathon.setName( "Stockholm Marathon" );
+ violations = validator.validate( marathon );
+ assertNumberOfViolations( violations, 1 );
+ assertConstraintViolation( violations.iterator().next(), "may not be empty" );
+ }
+
+ public interface Foo {
+ }
}
14 years, 7 months
Hibernate SVN: r19597 - in validator/trunk: hibernate-validator and 4 other directories.
by hibernate-commits@lists.jboss.org
Author: hardy.ferentschik
Date: 2010-05-24 15:18:21 -0400 (Mon, 24 May 2010)
New Revision: 19597
Added:
validator/trunk/hibernate-validator/src/test/java/org/hibernate/validator/test/util/HibernateTestCase.java
validator/trunk/hibernate-validator/src/test/resources/hibernate.properties
Modified:
validator/trunk/hibernate-validator-tck-runner/pom.xml
validator/trunk/hibernate-validator/pom.xml
validator/trunk/hibernate-validator/src/test/java/org/hibernate/validator/test/cfg/Runner.java
validator/trunk/pom.xml
Log:
HV-281 Added some helper classes to allow integration tests with Hibernate Core. This this particular issue there was in the end no new test case needed though. Keeping the infrastructure classes.
Modified: validator/trunk/hibernate-validator/pom.xml
===================================================================
--- validator/trunk/hibernate-validator/pom.xml 2010-05-24 10:31:09 UTC (rev 19596)
+++ validator/trunk/hibernate-validator/pom.xml 2010-05-24 19:18:21 UTC (rev 19597)
@@ -69,8 +69,8 @@
Optional dependencies
-->
<dependency>
- <groupId>org.hibernate.java-persistence</groupId>
- <artifactId>jpa-api</artifactId>
+ <groupId>org.hibernate.javax.persistence</groupId>
+ <artifactId>hibernate-jpa-2.0-api</artifactId>
<optional>true</optional>
</dependency>
@@ -86,10 +86,24 @@
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-entitymanager</artifactId>
- <version>3.5.0-Final</version>
<scope>test</scope>
</dependency>
+ <dependency>
+ <groupId>com.h2database</groupId>
+ <artifactId>h2</artifactId>
+ <scope>test</scope>
+ </dependency>
</dependencies>
+
+ <properties>
+ <db.dialect>org.hibernate.dialect.H2Dialect</db.dialect>
+ <jdbc.driver>org.h2.Driver</jdbc.driver>
+ <jdbc.url>jdbc:h2:mem:db1;DB_CLOSE_DELAY=-1</jdbc.url>
+ <jdbc.user>sa</jdbc.user>
+ <jdbc.pass/>
+ <jdbc.isolation/>
+ </properties>
+
<build>
<defaultGoal>test</defaultGoal>
<resources>
@@ -102,6 +116,16 @@
<targetPath>META-INF</targetPath>
</resource>
</resources>
+ <testResources>
+ <testResource>
+ <filtering>true</filtering>
+ <directory>src/test/resources</directory>
+ <includes>
+ <include>**/*.properties</include>
+ <include>**/*.xml</include>
+ </includes>
+ </testResource>
+ </testResources>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
Modified: validator/trunk/hibernate-validator/src/test/java/org/hibernate/validator/test/cfg/Runner.java
===================================================================
--- validator/trunk/hibernate-validator/src/test/java/org/hibernate/validator/test/cfg/Runner.java 2010-05-24 10:31:09 UTC (rev 19596)
+++ validator/trunk/hibernate-validator/src/test/java/org/hibernate/validator/test/cfg/Runner.java 2010-05-24 19:18:21 UTC (rev 19597)
@@ -1,4 +1,4 @@
-// $Id:$
+// $Id$
/*
* JBoss, Home of Professional Open Source
* Copyright 2010, Red Hat, Inc. and/or its affiliates, and individual contributors
@@ -34,7 +34,6 @@
}
public String getName() {
-
return name;
}
Added: validator/trunk/hibernate-validator/src/test/java/org/hibernate/validator/test/util/HibernateTestCase.java
===================================================================
--- validator/trunk/hibernate-validator/src/test/java/org/hibernate/validator/test/util/HibernateTestCase.java (rev 0)
+++ validator/trunk/hibernate-validator/src/test/java/org/hibernate/validator/test/util/HibernateTestCase.java 2010-05-24 19:18:21 UTC (rev 19597)
@@ -0,0 +1,119 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2010, Red Hat, Inc. and/or its affiliates, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+// $Id:$
+package org.hibernate.validator.test.util;
+
+import java.io.InputStream;
+import java.util.Properties;
+import javax.validation.ValidatorFactory;
+
+import org.testng.annotations.AfterTest;
+import org.testng.annotations.BeforeTest;
+
+import org.hibernate.SessionFactory;
+import org.hibernate.cfg.AnnotationConfiguration;
+import org.hibernate.cfg.Configuration;
+import org.hibernate.tool.hbm2ddl.SchemaExport;
+
+/**
+ * Base class for validation test which work in combination with Hibernate Core.
+ *
+ * @author Hardy Ferentschik
+ */
+public abstract class HibernateTestCase {
+ private SessionFactory sessionFactory;
+ private Configuration cfg;
+
+ @BeforeTest
+ protected void setUp() throws Exception {
+ buildSessionFactory( getAnnotatedClasses(), getAnnotatedPackages(), getXmlFiles() );
+ }
+
+ @AfterTest
+ protected void tearDown() throws Exception {
+ SchemaExport export = new SchemaExport( cfg );
+ export.drop( false, true );
+ sessionFactory = null;
+ }
+
+ public SessionFactory getSessionFactory() {
+ return sessionFactory;
+ }
+
+ private void buildSessionFactory(Class<?>[] classes, String[] packages, String[] xmlFiles) throws Exception {
+ if ( sessionFactory != null ) {
+ sessionFactory.close();
+ }
+ try {
+ setCfg( new AnnotationConfiguration() );
+ configure( cfg );
+ if ( recreateSchema() ) {
+ cfg.setProperty( org.hibernate.cfg.Environment.HBM2DDL_AUTO, "create-drop" );
+ }
+ for ( String aPackage : packages ) {
+ ( ( AnnotationConfiguration ) getCfg() ).addPackage( aPackage );
+ }
+ for ( Class<?> aClass : classes ) {
+ ( ( AnnotationConfiguration ) getCfg() ).addAnnotatedClass( aClass );
+ }
+ for ( String xmlFile : xmlFiles ) {
+ InputStream is = Thread.currentThread().getContextClassLoader().getResourceAsStream( xmlFile );
+ getCfg().addInputStream( is );
+ }
+ sessionFactory = getCfg().buildSessionFactory();
+ }
+ catch ( Exception e ) {
+ e.printStackTrace();
+ throw e;
+ }
+ }
+
+ protected void configure(Configuration cfg) {
+ Properties prop = cfg.getProperties();
+ //prop.put( "javax.persistence.validation.mode", "none" );
+ prop.put( "javax.persistence.validation.factory", getValidatorFactory() );
+ prop.put( "hibernate.current_session_context_class", "thread" );
+ }
+
+ protected abstract ValidatorFactory getValidatorFactory();
+
+ protected abstract Class<?>[] getAnnotatedClasses();
+
+ protected String[] getAnnotatedPackages() {
+ return new String[] { };
+ }
+
+ protected String[] getXmlFiles() {
+ return new String[] { };
+ }
+
+ protected boolean recreateSchema() {
+ return true;
+ }
+
+ protected void setCfg(Configuration cfg) {
+ this.cfg = cfg;
+ }
+
+ protected Configuration getCfg() {
+ return cfg;
+ }
+}
+
+
+
Property changes on: validator/trunk/hibernate-validator/src/test/java/org/hibernate/validator/test/util/HibernateTestCase.java
___________________________________________________________________
Name: svn:keywords
+ Id
Added: validator/trunk/hibernate-validator/src/test/resources/hibernate.properties
===================================================================
--- validator/trunk/hibernate-validator/src/test/resources/hibernate.properties (rev 0)
+++ validator/trunk/hibernate-validator/src/test/resources/hibernate.properties 2010-05-24 19:18:21 UTC (rev 19597)
@@ -0,0 +1,30 @@
+#
+# JBoss, Home of Professional Open Source
+# Copyright 2010, Red Hat, Inc. and/or its affiliates, and individual contributors
+# by the @authors tag. See the copyright.txt in the distribution for a
+# full listing of individual contributors.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+# http://www.apache.org/licenses/LICENSE-2.0
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+hibernate.dialect ${db.dialect}
+hibernate.connection.driver_class ${jdbc.driver}
+hibernate.connection.url ${jdbc.url}
+hibernate.connection.username ${jdbc.user}
+hibernate.connection.password ${jdbc.pass}
+hibernate.connection.isolation ${jdbc.isolation}
+
+hibernate.connection.pool_size 5
+
+hibernate.show_sql true
+hibernate.format_sql true
+
+
Modified: validator/trunk/hibernate-validator-tck-runner/pom.xml
===================================================================
--- validator/trunk/hibernate-validator-tck-runner/pom.xml 2010-05-24 10:31:09 UTC (rev 19596)
+++ validator/trunk/hibernate-validator-tck-runner/pom.xml 2010-05-24 19:18:21 UTC (rev 19597)
@@ -38,6 +38,12 @@
<dependency>
<groupId>org.jboss.test-harness</groupId>
<artifactId>jboss-test-harness-jboss-as-51</artifactId>
+ <exclusions>
+ <exclusion>
+ <groupId>org.hibernate</groupId>
+ <artifactId>hibernate-entitymanager</artifactId>
+ </exclusion>
+ </exclusions>
</dependency>
<!--
Provided dependencies.
Modified: validator/trunk/pom.xml
===================================================================
--- validator/trunk/pom.xml 2010-05-24 10:31:09 UTC (rev 19596)
+++ validator/trunk/pom.xml 2010-05-24 19:18:21 UTC (rev 19597)
@@ -69,13 +69,11 @@
<groupId>javax.xml.bind</groupId>
<artifactId>jaxb-api</artifactId>
<version>2.2</version>
- <scope>provided</scope>
</dependency>
<dependency>
<groupId>com.sun.xml.bind</groupId>
<artifactId>jaxb-impl</artifactId>
<version>2.1.12</version>
- <scope>provided</scope>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
@@ -86,7 +84,6 @@
<groupId>org.slf4j</groupId>
<artifactId>slf4j-log4j12</artifactId>
<version>1.5.6</version>
- <scope>runtime</scope>
</dependency>
<dependency>
<groupId>com.googlecode.jtype</groupId>
@@ -94,18 +91,27 @@
<version>0.1.1</version>
</dependency>
<dependency>
- <groupId>org.hibernate.java-persistence</groupId>
- <artifactId>jpa-api</artifactId>
- <version>2.0-cr-1</version>
+ <groupId>org.hibernate.javax.persistence</groupId>
+ <artifactId>hibernate-jpa-2.0-api</artifactId>
+ <version>1.0.0.Final</version>
</dependency>
<dependency>
+ <groupId>org.hibernate</groupId>
+ <artifactId>hibernate-entitymanager</artifactId>
+ <version>3.5.0-Final</version>
+ </dependency>
+ <dependency>
<groupId>org.testng</groupId>
<artifactId>testng</artifactId>
<version>5.8</version>
<classifier>jdk15</classifier>
- <scope>test</scope>
</dependency>
<dependency>
+ <groupId>com.h2database</groupId>
+ <artifactId>h2</artifactId>
+ <version>1.2.124</version>
+ </dependency>
+ <dependency>
<groupId>org.hibernate.jsr303.tck</groupId>
<artifactId>jsr303-tck</artifactId>
<version>1.0.3.GA</version>
14 years, 7 months
Hibernate SVN: r19596 - in validator/trunk/hibernate-validator/src: main/java/org/hibernate/validator/cfg and 15 other directories.
by hibernate-commits@lists.jboss.org
Author: hardy.ferentschik
Date: 2010-05-24 06:31:09 -0400 (Mon, 24 May 2010)
New Revision: 19596
Added:
validator/trunk/hibernate-validator/src/main/java/org/hibernate/validator/cfg/CreditCardNumberDefinition.java
validator/trunk/hibernate-validator/src/main/java/org/hibernate/validator/cfg/DecimalMaxDefinition.java
validator/trunk/hibernate-validator/src/main/java/org/hibernate/validator/cfg/DecimalMinDefinition.java
validator/trunk/hibernate-validator/src/main/java/org/hibernate/validator/cfg/DigitsDefinition.java
validator/trunk/hibernate-validator/src/main/java/org/hibernate/validator/cfg/EmailDefinition.java
validator/trunk/hibernate-validator/src/main/java/org/hibernate/validator/cfg/LengthDefinition.java
validator/trunk/hibernate-validator/src/main/java/org/hibernate/validator/cfg/MaxDefinition.java
validator/trunk/hibernate-validator/src/main/java/org/hibernate/validator/cfg/NotBlankDefinition.java
validator/trunk/hibernate-validator/src/main/java/org/hibernate/validator/cfg/NotEmptyDefinition.java
validator/trunk/hibernate-validator/src/main/java/org/hibernate/validator/cfg/NullDefinition.java
validator/trunk/hibernate-validator/src/main/java/org/hibernate/validator/cfg/PastDefinition.java
validator/trunk/hibernate-validator/src/main/java/org/hibernate/validator/cfg/RangeDefinition.java
validator/trunk/hibernate-validator/src/main/java/org/hibernate/validator/cfg/ScriptAssertDefinition.java
validator/trunk/hibernate-validator/src/main/java/org/hibernate/validator/cfg/URLDefinition.java
validator/trunk/hibernate-validator/src/main/java/org/hibernate/validator/cfg/package.html
Removed:
validator/trunk/hibernate-validator/src/main/javadoc/package.html
Modified:
validator/trunk/hibernate-validator/src/main/java/org/hibernate/validator/cfg/AssertFalseDefinition.java
validator/trunk/hibernate-validator/src/main/java/org/hibernate/validator/constraints/impl/package.html
validator/trunk/hibernate-validator/src/main/java/org/hibernate/validator/constraints/impl/scriptassert/package.html
validator/trunk/hibernate-validator/src/main/java/org/hibernate/validator/constraints/package.html
validator/trunk/hibernate-validator/src/main/java/org/hibernate/validator/engine/groups/package.html
validator/trunk/hibernate-validator/src/main/java/org/hibernate/validator/engine/package.html
validator/trunk/hibernate-validator/src/main/java/org/hibernate/validator/engine/resolver/package.html
validator/trunk/hibernate-validator/src/main/java/org/hibernate/validator/messageinterpolation/package.html
validator/trunk/hibernate-validator/src/main/java/org/hibernate/validator/metadata/package.html
validator/trunk/hibernate-validator/src/main/java/org/hibernate/validator/package.html
validator/trunk/hibernate-validator/src/main/java/org/hibernate/validator/resourceloading/package.html
validator/trunk/hibernate-validator/src/main/java/org/hibernate/validator/util/annotationfactory/package.html
validator/trunk/hibernate-validator/src/main/java/org/hibernate/validator/util/package.html
validator/trunk/hibernate-validator/src/main/java/org/hibernate/validator/util/privilegedactions/package.html
validator/trunk/hibernate-validator/src/main/java/org/hibernate/validator/xml/package.html
validator/trunk/hibernate-validator/src/test/java/org/hibernate/validator/test/cfg/Runner.java
validator/trunk/hibernate-validator/src/test/java/org/hibernate/validator/test/cfg/Tournament.java
Log:
HV-274 Added missing definition classes for existing constraints
Modified: validator/trunk/hibernate-validator/src/main/java/org/hibernate/validator/cfg/AssertFalseDefinition.java
===================================================================
--- validator/trunk/hibernate-validator/src/main/java/org/hibernate/validator/cfg/AssertFalseDefinition.java 2010-05-23 14:44:10 UTC (rev 19595)
+++ validator/trunk/hibernate-validator/src/main/java/org/hibernate/validator/cfg/AssertFalseDefinition.java 2010-05-24 10:31:09 UTC (rev 19596)
@@ -1,4 +1,4 @@
-// $Id: NotNullDefinition.java 19559 2010-05-19 16:20:53Z hardy.ferentschik $
+// $Id$
/*
* JBoss, Home of Professional Open Source
* Copyright 2010, Red Hat, Inc. and/or its affiliates, and individual contributors
Property changes on: validator/trunk/hibernate-validator/src/main/java/org/hibernate/validator/cfg/AssertFalseDefinition.java
___________________________________________________________________
Name: svn:keywords
+ Id
Added: validator/trunk/hibernate-validator/src/main/java/org/hibernate/validator/cfg/CreditCardNumberDefinition.java
===================================================================
--- validator/trunk/hibernate-validator/src/main/java/org/hibernate/validator/cfg/CreditCardNumberDefinition.java (rev 0)
+++ validator/trunk/hibernate-validator/src/main/java/org/hibernate/validator/cfg/CreditCardNumberDefinition.java 2010-05-24 10:31:09 UTC (rev 19596)
@@ -0,0 +1,48 @@
+// $Id$
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2010, Red Hat, Inc. and/or its affiliates, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.hibernate.validator.cfg;
+
+import java.lang.annotation.ElementType;
+import javax.validation.Payload;
+
+import org.hibernate.validator.constraints.CreditCardNumber;
+
+/**
+ * @author Hardy Ferentschik
+ */
+public class CreditCardNumberDefinition extends ConstraintDefinition<CreditCardNumber> {
+ public CreditCardNumberDefinition(Class<?> beanType, String property, ElementType elementType, ConstraintMapping mapping) {
+ super( beanType, CreditCardNumber.class, property, elementType, mapping );
+ }
+
+ public CreditCardNumberDefinition message(String message) {
+ addParameter( "message", message );
+ return this;
+ }
+
+ public CreditCardNumberDefinition groups(Class<?>... groups) {
+ addParameter( "groups", groups );
+ return this;
+ }
+
+ public CreditCardNumberDefinition payload(Class<? extends Payload>... payload) {
+ addParameter( "payload", payload );
+ return this;
+ }
+}
\ No newline at end of file
Property changes on: validator/trunk/hibernate-validator/src/main/java/org/hibernate/validator/cfg/CreditCardNumberDefinition.java
___________________________________________________________________
Name: svn:keywords
+ Id
Added: validator/trunk/hibernate-validator/src/main/java/org/hibernate/validator/cfg/DecimalMaxDefinition.java
===================================================================
--- validator/trunk/hibernate-validator/src/main/java/org/hibernate/validator/cfg/DecimalMaxDefinition.java (rev 0)
+++ validator/trunk/hibernate-validator/src/main/java/org/hibernate/validator/cfg/DecimalMaxDefinition.java 2010-05-24 10:31:09 UTC (rev 19596)
@@ -0,0 +1,53 @@
+// $Id$
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2010, Red Hat, Inc. and/or its affiliates, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.hibernate.validator.cfg;
+
+import java.lang.annotation.ElementType;
+import javax.validation.Payload;
+import javax.validation.constraints.DecimalMax;
+
+/**
+ * @author Hardy Ferentschik
+ */
+public class DecimalMaxDefinition extends ConstraintDefinition<DecimalMax> {
+
+ public DecimalMaxDefinition(Class<?> beanType, String property, ElementType elementType, ConstraintMapping mapping) {
+ super( beanType, DecimalMax.class, property, elementType, mapping );
+ }
+
+ public DecimalMaxDefinition message(String message) {
+ addParameter( "message", message );
+ return this;
+ }
+
+ public DecimalMaxDefinition groups(Class<?>... groups) {
+ addParameter( "groups", groups );
+ return this;
+ }
+
+ public DecimalMaxDefinition payload(Class<? extends Payload>... payload) {
+ addParameter( "payload", payload );
+ return this;
+ }
+
+ public DecimalMaxDefinition value(String max) {
+ addParameter( "value", max );
+ return this;
+ }
+}
\ No newline at end of file
Property changes on: validator/trunk/hibernate-validator/src/main/java/org/hibernate/validator/cfg/DecimalMaxDefinition.java
___________________________________________________________________
Name: svn:keywords
+ Id
Copied: validator/trunk/hibernate-validator/src/main/java/org/hibernate/validator/cfg/DecimalMinDefinition.java (from rev 19559, validator/trunk/hibernate-validator/src/main/java/org/hibernate/validator/cfg/MinDefinition.java)
===================================================================
--- validator/trunk/hibernate-validator/src/main/java/org/hibernate/validator/cfg/DecimalMinDefinition.java (rev 0)
+++ validator/trunk/hibernate-validator/src/main/java/org/hibernate/validator/cfg/DecimalMinDefinition.java 2010-05-24 10:31:09 UTC (rev 19596)
@@ -0,0 +1,52 @@
+// $Id$
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2010, Red Hat, Inc. and/or its affiliates, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.hibernate.validator.cfg;
+
+import java.lang.annotation.ElementType;
+import javax.validation.Payload;
+import javax.validation.constraints.DecimalMin;
+
+/**
+ * @author Hardy Ferentschik
+ */
+public class DecimalMinDefinition extends ConstraintDefinition<DecimalMin> {
+
+ public DecimalMinDefinition(Class<?> beanType, String property, ElementType elementType, ConstraintMapping mapping) {
+ super( beanType, DecimalMin.class, property, elementType, mapping );
+ }
+
+ public DecimalMinDefinition message(String message) {
+ addParameter( "message", message );
+ return this;
+ }
+
+ public DecimalMinDefinition groups(Class<?>... groups) {
+ addParameter( "groups", groups );
+ return this;
+ }
+
+ public DecimalMinDefinition payload(Class<? extends Payload>... payload) {
+ addParameter( "payload", payload );
+ return this;
+ }
+
+ public DecimalMinDefinition value(String min) {
+ addParameter( "value", min );
+ return this;
+ }
+}
\ No newline at end of file
Copied: validator/trunk/hibernate-validator/src/main/java/org/hibernate/validator/cfg/DigitsDefinition.java (from rev 19559, validator/trunk/hibernate-validator/src/main/java/org/hibernate/validator/cfg/PatternDefinition.java)
===================================================================
--- validator/trunk/hibernate-validator/src/main/java/org/hibernate/validator/cfg/DigitsDefinition.java (rev 0)
+++ validator/trunk/hibernate-validator/src/main/java/org/hibernate/validator/cfg/DigitsDefinition.java 2010-05-24 10:31:09 UTC (rev 19596)
@@ -0,0 +1,58 @@
+// $Id$
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2010, Red Hat, Inc. and/or its affiliates, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.hibernate.validator.cfg;
+
+import java.lang.annotation.ElementType;
+import javax.validation.Payload;
+import javax.validation.constraints.Digits;
+
+
+/**
+ * @author Hardy Ferentschik
+ */
+public class DigitsDefinition extends ConstraintDefinition<Digits> {
+
+ public DigitsDefinition(Class<?> beanType, String property, ElementType elementType, ConstraintMapping mapping) {
+ super( beanType, Digits.class, property, elementType, mapping );
+ }
+
+ public DigitsDefinition message(String message) {
+ addParameter( "message", message );
+ return this;
+ }
+
+ public DigitsDefinition groups(Class<?>... groups) {
+ addParameter( "groups", groups );
+ return this;
+ }
+
+ public DigitsDefinition payload(Class<? extends Payload>... payload) {
+ addParameter( "payload", payload );
+ return this;
+ }
+
+ public DigitsDefinition integer(int integer) {
+ addParameter( "integer", integer );
+ return this;
+ }
+
+ public DigitsDefinition fraction(int fraction) {
+ addParameter( "fraction", fraction );
+ return this;
+ }
+}
\ No newline at end of file
Added: validator/trunk/hibernate-validator/src/main/java/org/hibernate/validator/cfg/EmailDefinition.java
===================================================================
--- validator/trunk/hibernate-validator/src/main/java/org/hibernate/validator/cfg/EmailDefinition.java (rev 0)
+++ validator/trunk/hibernate-validator/src/main/java/org/hibernate/validator/cfg/EmailDefinition.java 2010-05-24 10:31:09 UTC (rev 19596)
@@ -0,0 +1,48 @@
+// $Id$
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2010, Red Hat, Inc. and/or its affiliates, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.hibernate.validator.cfg;
+
+import java.lang.annotation.ElementType;
+import javax.validation.Payload;
+
+import org.hibernate.validator.constraints.Email;
+
+/**
+ * @author Hardy Ferentschik
+ */
+public class EmailDefinition extends ConstraintDefinition<Email> {
+ public EmailDefinition(Class<?> beanType, String property, ElementType elementType, ConstraintMapping mapping) {
+ super( beanType, Email.class, property, elementType, mapping );
+ }
+
+ public EmailDefinition message(String message) {
+ addParameter( "message", message );
+ return this;
+ }
+
+ public EmailDefinition groups(Class<?>... groups) {
+ addParameter( "groups", groups );
+ return this;
+ }
+
+ public EmailDefinition payload(Class<? extends Payload>... payload) {
+ addParameter( "payload", payload );
+ return this;
+ }
+}
\ No newline at end of file
Property changes on: validator/trunk/hibernate-validator/src/main/java/org/hibernate/validator/cfg/EmailDefinition.java
___________________________________________________________________
Name: svn:keywords
+ Id
Copied: validator/trunk/hibernate-validator/src/main/java/org/hibernate/validator/cfg/LengthDefinition.java (from rev 19559, validator/trunk/hibernate-validator/src/main/java/org/hibernate/validator/cfg/SizeDefinition.java)
===================================================================
--- validator/trunk/hibernate-validator/src/main/java/org/hibernate/validator/cfg/LengthDefinition.java (rev 0)
+++ validator/trunk/hibernate-validator/src/main/java/org/hibernate/validator/cfg/LengthDefinition.java 2010-05-24 10:31:09 UTC (rev 19596)
@@ -0,0 +1,60 @@
+// $Id$
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2010, Red Hat, Inc. and/or its affiliates, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.hibernate.validator.cfg;
+
+import java.lang.annotation.ElementType;
+import javax.validation.Payload;
+
+import org.hibernate.validator.constraints.Length;
+
+
+/**
+ * @author Hardy Ferentschik
+ */
+public class LengthDefinition extends ConstraintDefinition<Length> {
+
+ public LengthDefinition(Class<?> beanType, String property, ElementType elementType, ConstraintMapping mapping) {
+ super( beanType, Length.class, property, elementType, mapping );
+ }
+
+ public LengthDefinition message(String message) {
+ addParameter( "message", message );
+ return this;
+ }
+
+ public LengthDefinition groups(Class<?>... groups) {
+ addParameter( "groups", groups );
+ return this;
+ }
+
+ public LengthDefinition payload(Class<? extends Payload>... payload) {
+ addParameter( "payload", payload );
+ return this;
+ }
+
+ public LengthDefinition min(int min) {
+ addParameter( "min", min );
+ return this;
+ }
+
+ public LengthDefinition max(int max) {
+ addParameter( "max", max );
+ return this;
+ }
+}
\ No newline at end of file
Copied: validator/trunk/hibernate-validator/src/main/java/org/hibernate/validator/cfg/MaxDefinition.java (from rev 19559, validator/trunk/hibernate-validator/src/main/java/org/hibernate/validator/cfg/MinDefinition.java)
===================================================================
--- validator/trunk/hibernate-validator/src/main/java/org/hibernate/validator/cfg/MaxDefinition.java (rev 0)
+++ validator/trunk/hibernate-validator/src/main/java/org/hibernate/validator/cfg/MaxDefinition.java 2010-05-24 10:31:09 UTC (rev 19596)
@@ -0,0 +1,52 @@
+// $Id$
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2010, Red Hat, Inc. and/or its affiliates, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.hibernate.validator.cfg;
+
+import java.lang.annotation.ElementType;
+import javax.validation.Payload;
+import javax.validation.constraints.Max;
+
+/**
+ * @author Hardy Ferentschik
+ */
+public class MaxDefinition extends ConstraintDefinition<Max> {
+
+ public MaxDefinition(Class<?> beanType, String property, ElementType elementType, ConstraintMapping mapping) {
+ super( beanType, Max.class, property, elementType, mapping );
+ }
+
+ public MaxDefinition message(String message) {
+ addParameter( "message", message );
+ return this;
+ }
+
+ public MaxDefinition groups(Class<?>... groups) {
+ addParameter( "groups", groups );
+ return this;
+ }
+
+ public MaxDefinition payload(Class<? extends Payload>... payload) {
+ addParameter( "payload", payload );
+ return this;
+ }
+
+ public MaxDefinition value(long max) {
+ addParameter( "value", max );
+ return this;
+ }
+}
\ No newline at end of file
Added: validator/trunk/hibernate-validator/src/main/java/org/hibernate/validator/cfg/NotBlankDefinition.java
===================================================================
--- validator/trunk/hibernate-validator/src/main/java/org/hibernate/validator/cfg/NotBlankDefinition.java (rev 0)
+++ validator/trunk/hibernate-validator/src/main/java/org/hibernate/validator/cfg/NotBlankDefinition.java 2010-05-24 10:31:09 UTC (rev 19596)
@@ -0,0 +1,47 @@
+// $Id$
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2010, Red Hat, Inc. and/or its affiliates, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.hibernate.validator.cfg;
+
+import java.lang.annotation.ElementType;
+import javax.validation.Payload;
+
+import org.hibernate.validator.constraints.NotBlank;
+
+/**
+ * @author Hardy Ferentschik
+ */
+public class NotBlankDefinition extends ConstraintDefinition<NotBlank> {
+ public NotBlankDefinition(Class<?> beanType, String property, ElementType elementType, ConstraintMapping mapping) {
+ super( beanType, NotBlank.class, property, elementType, mapping );
+ }
+
+ public NotBlankDefinition message(String message) {
+ addParameter( "message", message );
+ return this;
+ }
+
+ public NotBlankDefinition groups(Class<?>... groups) {
+ addParameter( "groups", groups );
+ return this;
+ }
+
+ public NotBlankDefinition payload(Class<? extends Payload>... payload) {
+ addParameter( "payload", payload );
+ return this;
+ }
+}
\ No newline at end of file
Property changes on: validator/trunk/hibernate-validator/src/main/java/org/hibernate/validator/cfg/NotBlankDefinition.java
___________________________________________________________________
Name: svn:keywords
+ Id
Added: validator/trunk/hibernate-validator/src/main/java/org/hibernate/validator/cfg/NotEmptyDefinition.java
===================================================================
--- validator/trunk/hibernate-validator/src/main/java/org/hibernate/validator/cfg/NotEmptyDefinition.java (rev 0)
+++ validator/trunk/hibernate-validator/src/main/java/org/hibernate/validator/cfg/NotEmptyDefinition.java 2010-05-24 10:31:09 UTC (rev 19596)
@@ -0,0 +1,47 @@
+// $Id$
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2010, Red Hat, Inc. and/or its affiliates, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.hibernate.validator.cfg;
+
+import java.lang.annotation.ElementType;
+import javax.validation.Payload;
+
+import org.hibernate.validator.constraints.NotEmpty;
+
+/**
+ * @author Hardy Ferentschik
+ */
+public class NotEmptyDefinition extends ConstraintDefinition<NotEmpty> {
+ public NotEmptyDefinition(Class<?> beanType, String property, ElementType elementType, ConstraintMapping mapping) {
+ super( beanType, NotEmpty.class, property, elementType, mapping );
+ }
+
+ public NotEmptyDefinition message(String message) {
+ addParameter( "message", message );
+ return this;
+ }
+
+ public NotEmptyDefinition groups(Class<?>... groups) {
+ addParameter( "groups", groups );
+ return this;
+ }
+
+ public NotEmptyDefinition payload(Class<? extends Payload>... payload) {
+ addParameter( "payload", payload );
+ return this;
+ }
+}
\ No newline at end of file
Property changes on: validator/trunk/hibernate-validator/src/main/java/org/hibernate/validator/cfg/NotEmptyDefinition.java
___________________________________________________________________
Name: svn:keywords
+ Id
Copied: validator/trunk/hibernate-validator/src/main/java/org/hibernate/validator/cfg/NullDefinition.java (from rev 19559, validator/trunk/hibernate-validator/src/main/java/org/hibernate/validator/cfg/NotNullDefinition.java)
===================================================================
--- validator/trunk/hibernate-validator/src/main/java/org/hibernate/validator/cfg/NullDefinition.java (rev 0)
+++ validator/trunk/hibernate-validator/src/main/java/org/hibernate/validator/cfg/NullDefinition.java 2010-05-24 10:31:09 UTC (rev 19596)
@@ -0,0 +1,46 @@
+// $Id$
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2010, Red Hat, Inc. and/or its affiliates, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.hibernate.validator.cfg;
+
+import java.lang.annotation.ElementType;
+import javax.validation.Payload;
+import javax.validation.constraints.Null;
+
+/**
+ * @author Hardy Ferentschik
+ */
+public class NullDefinition extends ConstraintDefinition<Null> {
+ public NullDefinition(Class<?> beanType, String property, ElementType elementType, ConstraintMapping mapping) {
+ super( beanType, Null.class, property, elementType, mapping );
+ }
+
+ public NullDefinition message(String message) {
+ addParameter( "message", message );
+ return this;
+ }
+
+ public NullDefinition groups(Class<?>... groups) {
+ addParameter( "groups", groups );
+ return this;
+ }
+
+ public NullDefinition payload(Class<? extends Payload>... payload) {
+ addParameter( "payload", payload );
+ return this;
+ }
+}
\ No newline at end of file
Copied: validator/trunk/hibernate-validator/src/main/java/org/hibernate/validator/cfg/PastDefinition.java (from rev 19566, validator/trunk/hibernate-validator/src/main/java/org/hibernate/validator/cfg/FutureDefinition.java)
===================================================================
--- validator/trunk/hibernate-validator/src/main/java/org/hibernate/validator/cfg/PastDefinition.java (rev 0)
+++ validator/trunk/hibernate-validator/src/main/java/org/hibernate/validator/cfg/PastDefinition.java 2010-05-24 10:31:09 UTC (rev 19596)
@@ -0,0 +1,47 @@
+// $Id$
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2010, Red Hat, Inc. and/or its affiliates, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.hibernate.validator.cfg;
+
+import java.lang.annotation.ElementType;
+import javax.validation.Payload;
+import javax.validation.constraints.Future;
+import javax.validation.constraints.Past;
+
+/**
+ * @author Hardy Ferentschik
+ */
+public class PastDefinition extends ConstraintDefinition<Past> {
+ public PastDefinition(Class<?> beanType, String property, ElementType elementType, ConstraintMapping mapping) {
+ super( beanType, Past.class, property, elementType, mapping );
+ }
+
+ public PastDefinition message(String message) {
+ addParameter( "message", message );
+ return this;
+ }
+
+ public PastDefinition groups(Class<?>... groups) {
+ addParameter( "groups", groups );
+ return this;
+ }
+
+ public PastDefinition payload(Class<? extends Payload>... payload) {
+ addParameter( "payload", payload );
+ return this;
+ }
+}
\ No newline at end of file
Added: validator/trunk/hibernate-validator/src/main/java/org/hibernate/validator/cfg/RangeDefinition.java
===================================================================
--- validator/trunk/hibernate-validator/src/main/java/org/hibernate/validator/cfg/RangeDefinition.java (rev 0)
+++ validator/trunk/hibernate-validator/src/main/java/org/hibernate/validator/cfg/RangeDefinition.java 2010-05-24 10:31:09 UTC (rev 19596)
@@ -0,0 +1,58 @@
+// $Id$
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2010, Red Hat, Inc. and/or its affiliates, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.hibernate.validator.cfg;
+
+import java.lang.annotation.ElementType;
+import javax.validation.Payload;
+
+import org.hibernate.validator.constraints.Range;
+
+/**
+ * @author Hardy Ferentschik
+ */
+public class RangeDefinition extends ConstraintDefinition<Range> {
+
+ public RangeDefinition(Class<?> beanType, String property, ElementType elementType, ConstraintMapping mapping) {
+ super( beanType, Range.class, property, elementType, mapping );
+ }
+
+ public RangeDefinition message(String message) {
+ addParameter( "message", message );
+ return this;
+ }
+
+ public RangeDefinition groups(Class<?>... groups) {
+ addParameter( "groups", groups );
+ return this;
+ }
+
+ public RangeDefinition payload(Class<? extends Payload>... payload) {
+ addParameter( "payload", payload );
+ return this;
+ }
+
+ public RangeDefinition min(long min) {
+ addParameter( "value", min );
+ return this;
+ }
+
+ public RangeDefinition max(long max) {
+ addParameter( "value", max );
+ return this;
+ }
+}
\ No newline at end of file
Property changes on: validator/trunk/hibernate-validator/src/main/java/org/hibernate/validator/cfg/RangeDefinition.java
___________________________________________________________________
Name: svn:keywords
+ Id
Added: validator/trunk/hibernate-validator/src/main/java/org/hibernate/validator/cfg/ScriptAssertDefinition.java
===================================================================
--- validator/trunk/hibernate-validator/src/main/java/org/hibernate/validator/cfg/ScriptAssertDefinition.java (rev 0)
+++ validator/trunk/hibernate-validator/src/main/java/org/hibernate/validator/cfg/ScriptAssertDefinition.java 2010-05-24 10:31:09 UTC (rev 19596)
@@ -0,0 +1,63 @@
+// $Id$
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2010, Red Hat, Inc. and/or its affiliates, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.hibernate.validator.cfg;
+
+import java.lang.annotation.ElementType;
+import javax.validation.Payload;
+
+import org.hibernate.validator.constraints.ScriptAssert;
+
+/**
+ * @author Hardy Ferentschik
+ */
+public class ScriptAssertDefinition extends ConstraintDefinition<ScriptAssert> {
+
+ public ScriptAssertDefinition(Class<?> beanType, String property, ElementType elementType, ConstraintMapping mapping) {
+ super( beanType, ScriptAssert.class, property, elementType, mapping );
+ }
+
+ public ScriptAssertDefinition message(String message) {
+ addParameter( "message", message );
+ return this;
+ }
+
+ public ScriptAssertDefinition groups(Class<?>... groups) {
+ addParameter( "groups", groups );
+ return this;
+ }
+
+ public ScriptAssertDefinition payload(Class<? extends Payload>... payload) {
+ addParameter( "payload", payload );
+ return this;
+ }
+
+ public ScriptAssertDefinition lang(String lang) {
+ addParameter( "lang", lang );
+ return this;
+ }
+
+ public ScriptAssertDefinition script(String script) {
+ addParameter( "script", script );
+ return this;
+ }
+
+ public ScriptAssertDefinition alias(String alias) {
+ addParameter( "alias", alias );
+ return this;
+ }
+}
\ No newline at end of file
Property changes on: validator/trunk/hibernate-validator/src/main/java/org/hibernate/validator/cfg/ScriptAssertDefinition.java
___________________________________________________________________
Name: svn:keywords
+ Id
Copied: validator/trunk/hibernate-validator/src/main/java/org/hibernate/validator/cfg/URLDefinition.java (from rev 19559, validator/trunk/hibernate-validator/src/main/java/org/hibernate/validator/cfg/PatternDefinition.java)
===================================================================
--- validator/trunk/hibernate-validator/src/main/java/org/hibernate/validator/cfg/URLDefinition.java (rev 0)
+++ validator/trunk/hibernate-validator/src/main/java/org/hibernate/validator/cfg/URLDefinition.java 2010-05-24 10:31:09 UTC (rev 19596)
@@ -0,0 +1,62 @@
+// $Id$
+/* JBoss, Home of Professional Open Source
+ * Copyright 2010, Red Hat, Inc. and/or its affiliates, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.hibernate.validator.cfg;
+
+import java.lang.annotation.ElementType;
+import javax.validation.Payload;
+
+import org.hibernate.validator.constraints.URL;
+
+/**
+ * @author Hardy Ferentschik
+ */
+public class URLDefinition extends ConstraintDefinition<URL> {
+
+ public URLDefinition(Class<?> beanType, String property, ElementType elementType, ConstraintMapping mapping) {
+ super( beanType, URL.class, property, elementType, mapping );
+ }
+
+ public URLDefinition message(String message) {
+ addParameter( "message", message );
+ return this;
+ }
+
+ public URLDefinition groups(Class<?>... groups) {
+ addParameter( "groups", groups );
+ return this;
+ }
+
+ public URLDefinition payload(Class<? extends Payload>... payload) {
+ addParameter( "payload", payload );
+ return this;
+ }
+
+ public URLDefinition protocol(String protocol) {
+ addParameter( "protocol", protocol );
+ return this;
+ }
+
+ public URLDefinition host(String host) {
+ addParameter( "host", host );
+ return this;
+ }
+
+ public URLDefinition port(int port) {
+ addParameter( "port", port );
+ return this;
+ }
+}
\ No newline at end of file
Copied: validator/trunk/hibernate-validator/src/main/java/org/hibernate/validator/cfg/package.html (from rev 19587, validator/trunk/hibernate-validator/src/main/java/org/hibernate/validator/constraints/package.html)
===================================================================
--- validator/trunk/hibernate-validator/src/main/java/org/hibernate/validator/cfg/package.html (rev 0)
+++ validator/trunk/hibernate-validator/src/main/java/org/hibernate/validator/cfg/package.html 2010-05-24 10:31:09 UTC (rev 19596)
@@ -0,0 +1,26 @@
+<!--
+ ~ $Id:$
+ ~
+ ~ JBoss, Home of Professional Open Source
+ ~ Copyright 2010, Red Hat, Inc. and/or its affiliates, and individual contributors
+ ~ by the @authors tag. See the copyright.txt in the distribution for a
+ ~ full listing of individual contributors.
+ ~
+ ~ Licensed under the Apache License, Version 2.0 (the "License");
+ ~ you may not use this file except in compliance with the License.
+ ~ You may obtain a copy of the License at
+ ~ http://www.apache.org/licenses/LICENSE-2.0
+ ~ Unless required by applicable law or agreed to in writing, software
+ ~ distributed under the License is distributed on an "AS IS" BASIS,
+ ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ ~ See the License for the specific language governing permissions and
+ ~ limitations under the License.
+-->
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html>
+<head>
+</head>
+<body>
+Programmatic constraint definition API with required helper classes.
+</body>
+</html>
Property changes on: validator/trunk/hibernate-validator/src/main/java/org/hibernate/validator/cfg/package.html
___________________________________________________________________
Name: svn:keywords
+ Id
Modified: validator/trunk/hibernate-validator/src/main/java/org/hibernate/validator/constraints/impl/package.html
===================================================================
--- validator/trunk/hibernate-validator/src/main/java/org/hibernate/validator/constraints/impl/package.html 2010-05-23 14:44:10 UTC (rev 19595)
+++ validator/trunk/hibernate-validator/src/main/java/org/hibernate/validator/constraints/impl/package.html 2010-05-24 10:31:09 UTC (rev 19596)
@@ -1,27 +1,26 @@
+<!--
+ ~ $Id:$
+ ~
+ ~ JBoss, Home of Professional Open Source
+ ~ Copyright 2010, Red Hat, Inc. and/or its affiliates, and individual contributors
+ ~ by the @authors tag. See the copyright.txt in the distribution for a
+ ~ full listing of individual contributors.
+ ~
+ ~ Licensed under the Apache License, Version 2.0 (the "License");
+ ~ you may not use this file except in compliance with the License.
+ ~ You may obtain a copy of the License at
+ ~ http://www.apache.org/licenses/LICENSE-2.0
+ ~ Unless required by applicable law or agreed to in writing, software
+ ~ distributed under the License is distributed on an "AS IS" BASIS,
+ ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ ~ See the License for the specific language governing permissions and
+ ~ limitations under the License.
+-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<head>
-<!--
-
- JBoss, Home of Professional Open Source
- Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
- by the @authors tag. See the copyright.txt in the distribution for a
- full listing of individual contributors.
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
- http://www.apache.org/licenses/LICENSE-2.0
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-
--->
</head>
<body>
-Implementations of the built-in as well as Hibernate Validator specific
-constraints.
+Implementations of the Bean Validation built-in as well as Hibernate Validator specific constraints.
</body>
</html>
Property changes on: validator/trunk/hibernate-validator/src/main/java/org/hibernate/validator/constraints/impl/package.html
___________________________________________________________________
Name: svn:keywords
+ Id
Modified: validator/trunk/hibernate-validator/src/main/java/org/hibernate/validator/constraints/impl/scriptassert/package.html
===================================================================
--- validator/trunk/hibernate-validator/src/main/java/org/hibernate/validator/constraints/impl/scriptassert/package.html 2010-05-23 14:44:10 UTC (rev 19595)
+++ validator/trunk/hibernate-validator/src/main/java/org/hibernate/validator/constraints/impl/scriptassert/package.html 2010-05-24 10:31:09 UTC (rev 19596)
@@ -1,24 +1,24 @@
+<!--
+ ~ $Id:$
+ ~
+ ~ JBoss, Home of Professional Open Source
+ ~ Copyright 2010, Red Hat, Inc. and/or its affiliates, and individual contributors
+ ~ by the @authors tag. See the copyright.txt in the distribution for a
+ ~ full listing of individual contributors.
+ ~
+ ~ Licensed under the Apache License, Version 2.0 (the "License");
+ ~ you may not use this file except in compliance with the License.
+ ~ You may obtain a copy of the License at
+ ~ http://www.apache.org/licenses/LICENSE-2.0
+ ~ Unless required by applicable law or agreed to in writing, software
+ ~ distributed under the License is distributed on an "AS IS" BASIS,
+ ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ ~ See the License for the specific language governing permissions and
+ ~ limitations under the License.
+-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<head>
- <!--
-
- JBoss, Home of Professional Open Source
- Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
- by the @authors tag. See the copyright.txt in the distribution for a
- full listing of individual contributors.
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
- http://www.apache.org/licenses/LICENSE-2.0
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-
--->
</head>
<body>
Classes related to the evaluation of the @ScriptAssert constraint.
Property changes on: validator/trunk/hibernate-validator/src/main/java/org/hibernate/validator/constraints/impl/scriptassert/package.html
___________________________________________________________________
Name: svn:keywords
+ Id
Modified: validator/trunk/hibernate-validator/src/main/java/org/hibernate/validator/constraints/package.html
===================================================================
--- validator/trunk/hibernate-validator/src/main/java/org/hibernate/validator/constraints/package.html 2010-05-23 14:44:10 UTC (rev 19595)
+++ validator/trunk/hibernate-validator/src/main/java/org/hibernate/validator/constraints/package.html 2010-05-24 10:31:09 UTC (rev 19596)
@@ -1,24 +1,24 @@
+<!--
+ ~ $Id:$
+ ~
+ ~ JBoss, Home of Professional Open Source
+ ~ Copyright 2010, Red Hat, Inc. and/or its affiliates, and individual contributors
+ ~ by the @authors tag. See the copyright.txt in the distribution for a
+ ~ full listing of individual contributors.
+ ~
+ ~ Licensed under the Apache License, Version 2.0 (the "License");
+ ~ you may not use this file except in compliance with the License.
+ ~ You may obtain a copy of the License at
+ ~ http://www.apache.org/licenses/LICENSE-2.0
+ ~ Unless required by applicable law or agreed to in writing, software
+ ~ distributed under the License is distributed on an "AS IS" BASIS,
+ ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ ~ See the License for the specific language governing permissions and
+ ~ limitations under the License.
+-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<head>
-<!--
-
- JBoss, Home of Professional Open Source
- Copyright 2010, Red Hat, Inc. and/or its affiliates, and individual contributors
- by the @authors tag. See the copyright.txt in the distribution for a
- full listing of individual contributors.
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
- http://www.apache.org/licenses/LICENSE-2.0
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-
--->
</head>
<body>
Hibernate Validator specific constraints. Classes in this package are part of the public Hibernate
Property changes on: validator/trunk/hibernate-validator/src/main/java/org/hibernate/validator/constraints/package.html
___________________________________________________________________
Name: svn:keywords
+ Id
Modified: validator/trunk/hibernate-validator/src/main/java/org/hibernate/validator/engine/groups/package.html
===================================================================
--- validator/trunk/hibernate-validator/src/main/java/org/hibernate/validator/engine/groups/package.html 2010-05-23 14:44:10 UTC (rev 19595)
+++ validator/trunk/hibernate-validator/src/main/java/org/hibernate/validator/engine/groups/package.html 2010-05-24 10:31:09 UTC (rev 19596)
@@ -1,24 +1,24 @@
+<!--
+ ~ $Id:$
+ ~
+ ~ JBoss, Home of Professional Open Source
+ ~ Copyright 2010, Red Hat, Inc. and/or its affiliates, and individual contributors
+ ~ by the @authors tag. See the copyright.txt in the distribution for a
+ ~ full listing of individual contributors.
+ ~
+ ~ Licensed under the Apache License, Version 2.0 (the "License");
+ ~ you may not use this file except in compliance with the License.
+ ~ You may obtain a copy of the License at
+ ~ http://www.apache.org/licenses/LICENSE-2.0
+ ~ Unless required by applicable law or agreed to in writing, software
+ ~ distributed under the License is distributed on an "AS IS" BASIS,
+ ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ ~ See the License for the specific language governing permissions and
+ ~ limitations under the License.
+-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<head>
-<!--
-
- JBoss, Home of Professional Open Source
- Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
- by the @authors tag. See the copyright.txt in the distribution for a
- full listing of individual contributors.
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
- http://www.apache.org/licenses/LICENSE-2.0
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-
--->
</head>
<body>
Helper classes for the processing of groups.
Property changes on: validator/trunk/hibernate-validator/src/main/java/org/hibernate/validator/engine/groups/package.html
___________________________________________________________________
Name: svn:keywords
+ Id
Modified: validator/trunk/hibernate-validator/src/main/java/org/hibernate/validator/engine/package.html
===================================================================
--- validator/trunk/hibernate-validator/src/main/java/org/hibernate/validator/engine/package.html 2010-05-23 14:44:10 UTC (rev 19595)
+++ validator/trunk/hibernate-validator/src/main/java/org/hibernate/validator/engine/package.html 2010-05-24 10:31:09 UTC (rev 19596)
@@ -1,24 +1,24 @@
+<!--
+ ~ $Id:$
+ ~
+ ~ JBoss, Home of Professional Open Source
+ ~ Copyright 2010, Red Hat, Inc. and/or its affiliates, and individual contributors
+ ~ by the @authors tag. See the copyright.txt in the distribution for a
+ ~ full listing of individual contributors.
+ ~
+ ~ Licensed under the Apache License, Version 2.0 (the "License");
+ ~ you may not use this file except in compliance with the License.
+ ~ You may obtain a copy of the License at
+ ~ http://www.apache.org/licenses/LICENSE-2.0
+ ~ Unless required by applicable law or agreed to in writing, software
+ ~ distributed under the License is distributed on an "AS IS" BASIS,
+ ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ ~ See the License for the specific language governing permissions and
+ ~ limitations under the License.
+-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<head>
-<!--
-
- JBoss, Home of Professional Open Source
- Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
- by the @authors tag. See the copyright.txt in the distribution for a
- full listing of individual contributors.
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
- http://www.apache.org/licenses/LICENSE-2.0
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-
--->
</head>
<body>
Implementations for the core interfaces of JSR-303.
Property changes on: validator/trunk/hibernate-validator/src/main/java/org/hibernate/validator/engine/package.html
___________________________________________________________________
Name: svn:keywords
+ Id
Modified: validator/trunk/hibernate-validator/src/main/java/org/hibernate/validator/engine/resolver/package.html
===================================================================
--- validator/trunk/hibernate-validator/src/main/java/org/hibernate/validator/engine/resolver/package.html 2010-05-23 14:44:10 UTC (rev 19595)
+++ validator/trunk/hibernate-validator/src/main/java/org/hibernate/validator/engine/resolver/package.html 2010-05-24 10:31:09 UTC (rev 19596)
@@ -1,24 +1,24 @@
+<!--
+ ~ $Id:$
+ ~
+ ~ JBoss, Home of Professional Open Source
+ ~ Copyright 2010, Red Hat, Inc. and/or its affiliates, and individual contributors
+ ~ by the @authors tag. See the copyright.txt in the distribution for a
+ ~ full listing of individual contributors.
+ ~
+ ~ Licensed under the Apache License, Version 2.0 (the "License");
+ ~ you may not use this file except in compliance with the License.
+ ~ You may obtain a copy of the License at
+ ~ http://www.apache.org/licenses/LICENSE-2.0
+ ~ Unless required by applicable law or agreed to in writing, software
+ ~ distributed under the License is distributed on an "AS IS" BASIS,
+ ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ ~ See the License for the specific language governing permissions and
+ ~ limitations under the License.
+-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<head>
-<!--
-
- JBoss, Home of Professional Open Source
- Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
- by the @authors tag. See the copyright.txt in the distribution for a
- full listing of individual contributors.
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
- http://www.apache.org/licenses/LICENSE-2.0
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-
--->
</head>
<body>
Various implementations of the TraversableResolver interface.
Property changes on: validator/trunk/hibernate-validator/src/main/java/org/hibernate/validator/engine/resolver/package.html
___________________________________________________________________
Name: svn:keywords
+ Id
Modified: validator/trunk/hibernate-validator/src/main/java/org/hibernate/validator/messageinterpolation/package.html
===================================================================
--- validator/trunk/hibernate-validator/src/main/java/org/hibernate/validator/messageinterpolation/package.html 2010-05-23 14:44:10 UTC (rev 19595)
+++ validator/trunk/hibernate-validator/src/main/java/org/hibernate/validator/messageinterpolation/package.html 2010-05-24 10:31:09 UTC (rev 19596)
@@ -15,8 +15,7 @@
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
~ See the License for the specific language governing permissions and
~ limitations under the License.
- -->
-
+-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<head>
Property changes on: validator/trunk/hibernate-validator/src/main/java/org/hibernate/validator/messageinterpolation/package.html
___________________________________________________________________
Name: svn:keywords
+ Id
Modified: validator/trunk/hibernate-validator/src/main/java/org/hibernate/validator/metadata/package.html
===================================================================
--- validator/trunk/hibernate-validator/src/main/java/org/hibernate/validator/metadata/package.html 2010-05-23 14:44:10 UTC (rev 19595)
+++ validator/trunk/hibernate-validator/src/main/java/org/hibernate/validator/metadata/package.html 2010-05-24 10:31:09 UTC (rev 19596)
@@ -1,24 +1,24 @@
+<!--
+ ~ $Id:$
+ ~
+ ~ JBoss, Home of Professional Open Source
+ ~ Copyright 2010, Red Hat, Inc. and/or its affiliates, and individual contributors
+ ~ by the @authors tag. See the copyright.txt in the distribution for a
+ ~ full listing of individual contributors.
+ ~
+ ~ Licensed under the Apache License, Version 2.0 (the "License");
+ ~ you may not use this file except in compliance with the License.
+ ~ You may obtain a copy of the License at
+ ~ http://www.apache.org/licenses/LICENSE-2.0
+ ~ Unless required by applicable law or agreed to in writing, software
+ ~ distributed under the License is distributed on an "AS IS" BASIS,
+ ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ ~ See the License for the specific language governing permissions and
+ ~ limitations under the License.
+-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<head>
-<!--
-
- JBoss, Home of Professional Open Source
- Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
- by the @authors tag. See the copyright.txt in the distribution for a
- full listing of individual contributors.
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
- http://www.apache.org/licenses/LICENSE-2.0
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-
--->
</head>
<body>
Implementations of the Bean Validation metadata interfaces as well as Hibernate Validator specific meta data classes.
Property changes on: validator/trunk/hibernate-validator/src/main/java/org/hibernate/validator/metadata/package.html
___________________________________________________________________
Name: svn:keywords
+ Id
Modified: validator/trunk/hibernate-validator/src/main/java/org/hibernate/validator/package.html
===================================================================
--- validator/trunk/hibernate-validator/src/main/java/org/hibernate/validator/package.html 2010-05-23 14:44:10 UTC (rev 19595)
+++ validator/trunk/hibernate-validator/src/main/java/org/hibernate/validator/package.html 2010-05-24 10:31:09 UTC (rev 19596)
@@ -15,14 +15,13 @@
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
~ See the License for the specific language governing permissions and
~ limitations under the License.
- -->
-
+-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<head>
</head>
<body>
-Contains the classes HibernateValidator and HibernateValidatorConfiguration. These classes are used to
-bootstrap and configure Hibernate Validator and form part of the public Hibernate Validator API.
+Bootstrap classes HibernateValidator and HibernateValidatorConfiguration which uniquely identify Hibernate Validator
+and allow to configure it. These classes form part of the public Hibernate Validator API.
</body>
</html>
Property changes on: validator/trunk/hibernate-validator/src/main/java/org/hibernate/validator/package.html
___________________________________________________________________
Name: svn:keywords
+ Id
Modified: validator/trunk/hibernate-validator/src/main/java/org/hibernate/validator/resourceloading/package.html
===================================================================
--- validator/trunk/hibernate-validator/src/main/java/org/hibernate/validator/resourceloading/package.html 2010-05-23 14:44:10 UTC (rev 19595)
+++ validator/trunk/hibernate-validator/src/main/java/org/hibernate/validator/resourceloading/package.html 2010-05-24 10:31:09 UTC (rev 19596)
@@ -1,24 +1,24 @@
+<!--
+ ~ $Id:$
+ ~
+ ~ JBoss, Home of Professional Open Source
+ ~ Copyright 2010, Red Hat, Inc. and/or its affiliates, and individual contributors
+ ~ by the @authors tag. See the copyright.txt in the distribution for a
+ ~ full listing of individual contributors.
+ ~
+ ~ Licensed under the Apache License, Version 2.0 (the "License");
+ ~ you may not use this file except in compliance with the License.
+ ~ You may obtain a copy of the License at
+ ~ http://www.apache.org/licenses/LICENSE-2.0
+ ~ Unless required by applicable law or agreed to in writing, software
+ ~ distributed under the License is distributed on an "AS IS" BASIS,
+ ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ ~ See the License for the specific language governing permissions and
+ ~ limitations under the License.
+-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<head>
- <!--
-
- JBoss, Home of Professional Open Source
- Copyright 2010, Red Hat, Inc. and/or its affiliates, and individual contributors
- by the @authors tag. See the copyright.txt in the distribution for a
- full listing of individual contributors.
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
- http://www.apache.org/licenses/LICENSE-2.0
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-
--->
</head>
<body>
ResourceBundleLocator interface and its various implementations. Part of the Hibernate Validator public API.
Property changes on: validator/trunk/hibernate-validator/src/main/java/org/hibernate/validator/resourceloading/package.html
___________________________________________________________________
Name: svn:keywords
+ Id
Modified: validator/trunk/hibernate-validator/src/main/java/org/hibernate/validator/util/annotationfactory/package.html
===================================================================
--- validator/trunk/hibernate-validator/src/main/java/org/hibernate/validator/util/annotationfactory/package.html 2010-05-23 14:44:10 UTC (rev 19595)
+++ validator/trunk/hibernate-validator/src/main/java/org/hibernate/validator/util/annotationfactory/package.html 2010-05-24 10:31:09 UTC (rev 19596)
@@ -1,24 +1,24 @@
+<!--
+ ~ $Id:$
+ ~
+ ~ JBoss, Home of Professional Open Source
+ ~ Copyright 2010, Red Hat, Inc. and/or its affiliates, and individual contributors
+ ~ by the @authors tag. See the copyright.txt in the distribution for a
+ ~ full listing of individual contributors.
+ ~
+ ~ Licensed under the Apache License, Version 2.0 (the "License");
+ ~ you may not use this file except in compliance with the License.
+ ~ You may obtain a copy of the License at
+ ~ http://www.apache.org/licenses/LICENSE-2.0
+ ~ Unless required by applicable law or agreed to in writing, software
+ ~ distributed under the License is distributed on an "AS IS" BASIS,
+ ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ ~ See the License for the specific language governing permissions and
+ ~ limitations under the License.
+-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<head>
-<!--
-
- JBoss, Home of Professional Open Source
- Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
- by the @authors tag. See the copyright.txt in the distribution for a
- full listing of individual contributors.
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
- http://www.apache.org/licenses/LICENSE-2.0
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-
--->
</head>
<body>
Annotation proxy helper.
Property changes on: validator/trunk/hibernate-validator/src/main/java/org/hibernate/validator/util/annotationfactory/package.html
___________________________________________________________________
Name: svn:keywords
+ Id
Modified: validator/trunk/hibernate-validator/src/main/java/org/hibernate/validator/util/package.html
===================================================================
--- validator/trunk/hibernate-validator/src/main/java/org/hibernate/validator/util/package.html 2010-05-23 14:44:10 UTC (rev 19595)
+++ validator/trunk/hibernate-validator/src/main/java/org/hibernate/validator/util/package.html 2010-05-24 10:31:09 UTC (rev 19596)
@@ -1,24 +1,24 @@
+<!--
+ ~ $Id:$
+ ~
+ ~ JBoss, Home of Professional Open Source
+ ~ Copyright 2010, Red Hat, Inc. and/or its affiliates, and individual contributors
+ ~ by the @authors tag. See the copyright.txt in the distribution for a
+ ~ full listing of individual contributors.
+ ~
+ ~ Licensed under the Apache License, Version 2.0 (the "License");
+ ~ you may not use this file except in compliance with the License.
+ ~ You may obtain a copy of the License at
+ ~ http://www.apache.org/licenses/LICENSE-2.0
+ ~ Unless required by applicable law or agreed to in writing, software
+ ~ distributed under the License is distributed on an "AS IS" BASIS,
+ ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ ~ See the License for the specific language governing permissions and
+ ~ limitations under the License.
+-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<head>
-<!--
-
- JBoss, Home of Professional Open Source
- Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
- by the @authors tag. See the copyright.txt in the distribution for a
- full listing of individual contributors.
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
- http://www.apache.org/licenses/LICENSE-2.0
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-
--->
</head>
<body>
Independent helper classes.
Property changes on: validator/trunk/hibernate-validator/src/main/java/org/hibernate/validator/util/package.html
___________________________________________________________________
Name: svn:keywords
+ Id
Modified: validator/trunk/hibernate-validator/src/main/java/org/hibernate/validator/util/privilegedactions/package.html
===================================================================
--- validator/trunk/hibernate-validator/src/main/java/org/hibernate/validator/util/privilegedactions/package.html 2010-05-23 14:44:10 UTC (rev 19595)
+++ validator/trunk/hibernate-validator/src/main/java/org/hibernate/validator/util/privilegedactions/package.html 2010-05-24 10:31:09 UTC (rev 19596)
@@ -1,24 +1,24 @@
+<!--
+ ~ $Id:$
+ ~
+ ~ JBoss, Home of Professional Open Source
+ ~ Copyright 2010, Red Hat, Inc. and/or its affiliates, and individual contributors
+ ~ by the @authors tag. See the copyright.txt in the distribution for a
+ ~ full listing of individual contributors.
+ ~
+ ~ Licensed under the Apache License, Version 2.0 (the "License");
+ ~ you may not use this file except in compliance with the License.
+ ~ You may obtain a copy of the License at
+ ~ http://www.apache.org/licenses/LICENSE-2.0
+ ~ Unless required by applicable law or agreed to in writing, software
+ ~ distributed under the License is distributed on an "AS IS" BASIS,
+ ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ ~ See the License for the specific language governing permissions and
+ ~ limitations under the License.
+-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<head>
- <!--
-
- JBoss, Home of Professional Open Source
- Copyright 2010, Red Hat, Inc. and/or its affiliates, and individual contributors
- by the @authors tag. See the copyright.txt in the distribution for a
- full listing of individual contributors.
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
- http://www.apache.org/licenses/LICENSE-2.0
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-
--->
</head>
<body>
Implementations of PrivilegedAction in order to execute reflection operations in a security manager.
Property changes on: validator/trunk/hibernate-validator/src/main/java/org/hibernate/validator/util/privilegedactions/package.html
___________________________________________________________________
Name: svn:keywords
+ Id
Modified: validator/trunk/hibernate-validator/src/main/java/org/hibernate/validator/xml/package.html
===================================================================
--- validator/trunk/hibernate-validator/src/main/java/org/hibernate/validator/xml/package.html 2010-05-23 14:44:10 UTC (rev 19595)
+++ validator/trunk/hibernate-validator/src/main/java/org/hibernate/validator/xml/package.html 2010-05-24 10:31:09 UTC (rev 19596)
@@ -1,24 +1,24 @@
+<!--
+ ~ $Id:$
+ ~
+ ~ JBoss, Home of Professional Open Source
+ ~ Copyright 2010, Red Hat, Inc. and/or its affiliates, and individual contributors
+ ~ by the @authors tag. See the copyright.txt in the distribution for a
+ ~ full listing of individual contributors.
+ ~
+ ~ Licensed under the Apache License, Version 2.0 (the "License");
+ ~ you may not use this file except in compliance with the License.
+ ~ You may obtain a copy of the License at
+ ~ http://www.apache.org/licenses/LICENSE-2.0
+ ~ Unless required by applicable law or agreed to in writing, software
+ ~ distributed under the License is distributed on an "AS IS" BASIS,
+ ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ ~ See the License for the specific language governing permissions and
+ ~ limitations under the License.
+-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<head>
-<!--
-
- JBoss, Home of Professional Open Source
- Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
- by the @authors tag. See the copyright.txt in the distribution for a
- full listing of individual contributors.
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
- http://www.apache.org/licenses/LICENSE-2.0
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-
--->
</head>
<body>
Classes used to parse Bean Validation XML configuration files.
Property changes on: validator/trunk/hibernate-validator/src/main/java/org/hibernate/validator/xml/package.html
___________________________________________________________________
Name: svn:keywords
+ Id
Deleted: validator/trunk/hibernate-validator/src/main/javadoc/package.html
===================================================================
--- validator/trunk/hibernate-validator/src/main/javadoc/package.html 2010-05-23 14:44:10 UTC (rev 19595)
+++ validator/trunk/hibernate-validator/src/main/javadoc/package.html 2010-05-24 10:31:09 UTC (rev 19596)
@@ -1,54 +0,0 @@
-<body>
-
-<h2>Hibernate Core (native API) JavaDocs</h2>
-
-In addition to {@link org.hibernate.SessionFactory} and {@link org.hibernate.Session}, applications using the
-Hibernate native API will often need to utilize the following interfaces:<ul>
- <li>{@link org.hibernate.cfg.Configuration}</li>
- <li>{@link org.hibernate.Hibernate}</li>
- <li>{@link org.hibernate.Transaction}</li>
- <li>{@link org.hibernate.Query}</li>
- <li>{@link org.hibernate.Criteria}</li>
- <li>{@link org.hibernate.criterion.Projection}</li>
- <li>{@link org.hibernate.criterion.Projections}</li>
- <li>{@link org.hibernate.criterion.Criterion}</li>
- <li>{@link org.hibernate.criterion.Restrictions}</li>
- <li>{@link org.hibernate.criterion.Order}</li>
- <li>{@link org.hibernate.criterion.Example}</li>
-</ul>
-These interfaces are fully intended to be exposed to application code.
-<hr/>
-
-<h3>Extensions</h3>
-Hibernate defines a number of interfaces that are completely intended to be extendable by application programmers and/or
-integrators. Listed below is a (not necessarily exhaustive) list of the most commonly utilized extension points:<ul>
- <li>{@link org.hibernate.EntityNameResolver}</li>
- <li>{@link org.hibernate.Interceptor} / {@link org.hibernate.EmptyInterceptor}</li>
- <li>{@link org.hibernate.Transaction} / {@link org.hibernate.transaction.TransactionFactory}</li>
- <li>{@link org.hibernate.context.CurrentSessionContext}</li>
- <li>{@link org.hibernate.dialect.Dialect}</li>
- <li>{@link org.hibernate.dialect.resolver.DialectResolver}</li>
- <li>{@link org.hibernate.event event listener} interfaces</li>
- <li>{@link org.hibernate.id.IdentifierGenerator}</li>
- <li>{@link org.hibernate.tuple.entity.EntityTuplizer} / {@link org.hibernate.tuple.component.ComponentTuplizer}</li>
- <li>{@link org.hibernate.type.Type} / {@link org.hibernate.usertype}</li>
-</ul>
-Note that there is a large degree of crossover between the notion of extension points and that of an integration SPI (below).
-<hr/>
-
-<h3>Integration SPI</h3>
-Hibernate provides a number of SPIs intended to integrate itself with various third party frameworks or application code to provide
-additional capabilities. The SPIs fall mainly into 2 categories:<ul>
- <li>Caching - {@link org.hibernate.cache.RegionFactory}</li>
- <li>JDBC Connection management - {@link org.hibernate.connection.ConnectionProvider}
-</ul>
-Certainly {@link org.hibernate.dialect.Dialect} could fit in here as well, though we chose to list it under extensions since application
-developers tend to provide extended dialects rather frequently for various reasons.
-<br/>
-Another SPI that is not yet exposed but is planned for such is the <em>bytecode provider</em> SPI. See {@link org.hibernate.bytecode}
-for details.
-<hr/>
-
-Complete Hibernate documentation may be found online at <a href="http://docs.jboss.org/hibernate/">http://docs.jboss.org/hibernate/</a>.
-
-</body>
\ No newline at end of file
Property changes on: validator/trunk/hibernate-validator/src/test/java/org/hibernate/validator/test/cfg/Runner.java
___________________________________________________________________
Name: svn:keywords
+ Id
Property changes on: validator/trunk/hibernate-validator/src/test/java/org/hibernate/validator/test/cfg/Tournament.java
___________________________________________________________________
Name: svn:keywords
+ Id
14 years, 7 months
Hibernate SVN: r19595 - search/tags.
by hibernate-commits@lists.jboss.org
Author: stliu
Date: 2010-05-23 10:44:10 -0400 (Sun, 23 May 2010)
New Revision: 19595
Added:
search/tags/v3_1_1_GA_CP02/
Log:
JBPAPP-4318 correct version number
Copied: search/tags/v3_1_1_GA_CP02 (from rev 19594, search/branches/v3_1_1_GA_CP)
14 years, 7 months
Hibernate SVN: r19594 - entitymanager/tags.
by hibernate-commits@lists.jboss.org
Author: stliu
Date: 2010-05-23 10:41:48 -0400 (Sun, 23 May 2010)
New Revision: 19594
Added:
entitymanager/tags/3.4.0.GA_CP02/
Log:
JBPAPP-4318 update version number
Copied: entitymanager/tags/3.4.0.GA_CP02 (from rev 19593, entitymanager/branches/v3_4_0_GA_CP)
14 years, 7 months
Hibernate SVN: r19593 - entitymanager/tags.
by hibernate-commits@lists.jboss.org
Author: stliu
Date: 2010-05-23 10:40:09 -0400 (Sun, 23 May 2010)
New Revision: 19593
Removed:
entitymanager/tags/3.4.0.GA_CP02/
Log:
JBPAPP-4318 delete to correct version number, will create later
14 years, 7 months
Hibernate SVN: r19592 - search/tags.
by hibernate-commits@lists.jboss.org
Author: stliu
Date: 2010-05-23 10:32:23 -0400 (Sun, 23 May 2010)
New Revision: 19592
Removed:
search/tags/v3_1_1_GA_CP02/
Log:
JBPAPP-4327 delete to correct version number, will recreate later
14 years, 7 months
Hibernate SVN: r19591 - in search/branches/v3_1_1_GA_CP: src/main/java/org/hibernate/search and 1 other directory.
by hibernate-commits@lists.jboss.org
Author: stliu
Date: 2010-05-23 10:30:27 -0400 (Sun, 23 May 2010)
New Revision: 19591
Removed:
search/branches/v3_1_1_GA_CP/changelog.txt
search/branches/v3_1_1_GA_CP/readme.txt
Modified:
search/branches/v3_1_1_GA_CP/pom.xml
search/branches/v3_1_1_GA_CP/src/main/java/org/hibernate/search/Version.java
Log:
JBPAPP-4327 Upgrade hibernate3-search to 3.1.1.GA_CP02
Deleted: search/branches/v3_1_1_GA_CP/changelog.txt
===================================================================
--- search/branches/v3_1_1_GA_CP/changelog.txt 2010-05-23 14:26:46 UTC (rev 19590)
+++ search/branches/v3_1_1_GA_CP/changelog.txt 2010-05-23 14:30:27 UTC (rev 19591)
@@ -1,405 +0,0 @@
-Hibernate Search Changelog
-==========================
-
-3.1.1.GA_CP01 (12-01-2010)
----------------------------
-
-
-** Bug
- * [JBPAPP-3316] - org.hibernate.search.test.engine.LazyCollectionsUpdatingTest fails on most DB by a NPE
-** Task
-
- * [JBPAPP-2923] - CLONE -Modify Annotations, Entity Manager, and Search to work with the same property settings as Core
- * [JBPAPP-3210] - Hibernate Search branch v3_1_1_GA_CP depends on core 3.3.1 which should be 3.3.2
- * [JBPAPP-3217] - enable test case on others db
-
-3.1.1.GA (28-05-2009)
----------------------
-
-** Bug
- * [HSEARCH-178] - Out of transaction work causes collection lazy loading to throw AssertionFailure
- * [HSEARCH-310] - Out of Memory on ScrollableResults
- * [HSEARCH-325] - FullTextQuery.iterate() skips last result.
- * [HSEARCH-330] - NegativeArraySizeException if you use FullTextQuery.setMaxResults(Integer.MAX_VALUE)
- * [HSEARCH-338] - ScrollableResults initial position not coherent to core Hibernate
- * [HSEARCH-339] - ScrollableResults may return unmanaged entities from it's own cache
- * [HSEARCH-342] - Delete on unindexed entities referenced by indexed entities with ContainedIn annotation failed
- * [HSEARCH-355] - FilterOptimizationHelper was improperly using method overloading
- * [HSEARCH-357] - IdBridge being applied on null entity during purgeAll()
- * [HSEARCH-360] - Hibernate Search 3.1.0GA Bugs after HSEARCH-160
-
-
-** Improvement
- * [HSEARCH-340] - ScrollableResults exploits batch loading for backwards and random order scrolling
- * [HSEARCH-369] - typos in documentation
-
-
-** Task
- * [HSEARCH-348] - Upgrade to Lucene 2.4.1
-
-
-3.1.0.GA (4-12-2008)
---------------------
-
-** Bug
- * [HSEARCH-233] - EntityNotFoundException during indexing
- * [HSEARCH-280] - Make FSSlaveAndMasterDPTest pass against postgresql
- * [HSEARCH-297] - Allow PatternTokenizerFactory to be used
- * [HSEARCH-309] - PurgeAllLuceneWork duplicates in work queue
-
-** Improvement
- * [HSEARCH-221] - Get Lucene Analyzer runtime (indexing)
- * [HSEARCH-265] - Raise warnings when an abstract class is marked @Indexed
- * [HSEARCH-285] - Refactor DocumentBuilder to support containedIn only and regular Indexed entities
- * [HSEARCH-298] - Warn for dangerous IndexWriter settings
- * [HSEARCH-299] - Use of faster Bit operations when possible to chain Filters
- * [HSEARCH-302] - Utilize pagination settings when retrieving TopDocs from the Lucene query to only retrieve required TopDocs
- * [HSEARCH-308] - getResultSize() implementation should not load documents
- * [HSEARCH-311] - Add a close() method to BackendQueueProcessorFactory
- * [HSEARCH-312] - Rename hibernate.search.filter.cache_bit_results.size to hibernate.search.filter.cache_docidresults.size
-
-** New Feature
- * [HSEARCH-160] - Truly polymorphic queries
- * [HSEARCH-268] - Apply changes to different indexes in parallel
- * [HSEARCH-296] - Expose managed entity class via a Projection constant
-
-** Task
- * [HSEARCH-303] - Review reference documentation
-
-
-3.1.0.CR1 (17-10-2008)
-------------------------
-
-** Bug
- * [HSEARCH-250] - In ReaderStrategies, ensure that the reader is current AND that the directory returned by the DirectoryProvider are the same
- * [HSEARCH-293] - AddLuceneWork is not being removed from the queue when DeleteLuceneWork is added for the same entity
- * [HSEARCH-300] - Fix documentation on use_compound_file
-
-** Improvement
- * [HSEARCH-213] - Use FieldSelector and doc(int, fieldSelector) to only select the necessary fields
- * [HSEARCH-224] - Use MultiClassesQueryLoader in ProjectionLoader
- * [HSEARCH-255] - Create a extensive Analyzer testing suite
- * [HSEARCH-266] - Do not switch to the current directory in FSSlaveDirectoryProvider if no file has been copied
- * [HSEARCH-274] - Use Lucene's new readonly IndexReader
- * [HSEARCH-281] - Work should be Work<T>
- * [HSEARCH-283] - Replace deprecated Classes and methods calls to Lucene 2.4
-
-** New Feature
- * [HSEARCH-104] - Make @DocumentId optional and rely on @Id
- * [HSEARCH-290] - Use IndexReader = readonly on Reader strategies (see Lucene 2.4)
- * [HSEARCH-294] - Rename INSTANCE_AND_BITSETRESULTS to INSTANCE_AND_DOCIDSETRESULTS
-
-** Task
- * [HSEARCH-288] - Evaluate changes in Lucene 2.4.0
- * [HSEARCH-289] - Move to new Lucene Filter DocIdSet
- * [HSEARCH-291] - improve documentation about thread safety requirements of Bridges.
-
-
-3.1.0.Beta2 (27-10-2008)
-------------------------
-
-** Bug
- * [HSEARCH-142] - Modifications on objects indexed via @IndexedEmbedded not updated when not annotated @Indexed
- * [HSEARCH-162] - NPE on queries when no entity is marked as @Indexed
- * [HSEARCH-222] - Entities not found during concurrent update
- * [HSEARCH-225] - Avoid using IndexReader.deleteDocument when index is not shared amongst several entity types
- * [HSEARCH-232] - Using SnowballPorterFilterFactory throws NoClassDefFoundError
- * [HSEARCH-237] - IdHashShardingStrategy fails on IDs having negative hashcode
- * [HSEARCH-241] - initialize methods taking Properties cannot list available properties
- * [HSEARCH-247] - Hibernate Search cannot run without apache-solr-analyzer.jar
- * [HSEARCH-253] - Inconsistent detection of EventListeners during autoregistration into Hibernate listeners
- * [HSEARCH-257] - Ignore delete operation when Core does update then delete on the same entity
- * [HSEARCH-259] - Filter were not isolated by name in the cache
- * [HSEARCH-262] - fullTextSession.purgeAll(Class<?>) does not consider subclasses
- * [HSEARCH-263] - Wrong analyzers used in IndexWriter
- * [HSEARCH-267] - Inheritance of annotations and analyzer
- * [HSEARCH-271] - wrong Similarity used when sharing index among entities
- * [HSEARCH-287] - master.xml is mistakenly copied to the distribution
-
-** Deprecation
- * [HSEARCH-279] - deprecate SharedReaderProvider replaced by SharingBufferReaderProvider as default ReaderProvider
-
-** Improvement
- * [HSEARCH-145] - Document a configuration property
- * [HSEARCH-226] - Use Lucene ability to delete by query in IndexWriter
- * [HSEARCH-240] - Generify the IndexShardingStrategy
- * [HSEARCH-245] - Add ReaderStratregy.destroy() method
- * [HSEARCH-256] - Remove CacheBitResults.YES
- * [HSEARCH-260] - Simplify the Filter Caching definition: cache=FilterCacheModeType.[MODE]
- * [HSEARCH-272] - Improve contention on DirectoryProviders in lucene backend
- * [HSEARCH-273] - Make LuceneOptions an interface
- * [HSEARCH-282] - Make the API more Generics friendly
-
-** New Feature
- * [HSEARCH-170] - Support @Boost in @Field
- * [HSEARCH-235] - provide a destroy() method in ReaderProvider
- * [HSEARCH-252] - Document Solr integration
- * [HSEARCH-258] - Add configuration option for Lucene's UseCompoundFile
-
-** Patch
- * [HSEARCH-20] - Lucene extensions
-
-** Task
- * [HSEARCH-231] - Update the getting started guide with Solr analyzers
- * [HSEARCH-236] - Find whether or not indexWriter.optimize() requires an index lock
- * [HSEARCH-244] - Abiltiy to ask SearchFactory for the scoped analyzer of a given class
- * [HSEARCH-254] - Migrate to Solr 1.3
- * [HSEARCH-276] - upgrade to Lucene 2.4
- * [HSEARCH-286] - Align to GA versions of all dependencies
- * [HSEARCH-292] - Document the new Filter caching approach
-
-
-3.1.0.Beta1 (17-07-2008)
-------------------------
-
-** Bug
- * [HSEARCH-166] - documentation error : hibernate.search.worker.batch_size vs hibernate.worker.batch_size
- * [HSEARCH-171] - Do not log missing objects when using QueryLoader
- * [HSEARCH-173] - CachingWrapperFilter loses its WeakReference making filter caching inefficient
- * [HSEARCH-194] - Inconsistent performance between hibernate search and pure lucene access
- * [HSEARCH-196] - ObjectNotFoundException not caught in FullTextSession
- * [HSEARCH-198] - Documentation out of sync with implemented/released features
- * [HSEARCH-203] - Counter of index modification operations not always incremented
- * [HSEARCH-204] - Improper calls to Session during a projection not involving THIS
- * [HSEARCH-205] - Out of Memory on copy of large indexes
- * [HSEARCH-217] - Proper errors on parsing of all numeric configuration parameters
- * [HSEARCH-227] - Criteria based fetching is not used when objects are loaded one by one (iterate())
-
-
-** Improvement
- * [HSEARCH-19] - Do not filter classes on queries when we know that all Directories only contains the targeted classes
- * [HSEARCH-156] - Retrofit FieldBridge.set lucene parameters into a LuceneOptions class
- * [HSEARCH-157] - Make explicit in FAQ and doc that query.list() followed by query.getResultSize() triggers only one query
- * [HSEARCH-163] - Enhance error messages when @FieldBridge is wrongly used (no impl or impl not implementing the right interfaces)
- * [HSEARCH-176] - Permits alignment properties to lucene default (Sanne Grinovero)
- * [HSEARCH-179] - Documentation should be explicit that @FulltextFilter filters every object, regardless which object is annotated
- * [HSEARCH-181] - Better management of file-based index directories (Sanne Grinovero)
- * [HSEARCH-189] - Thread management improvements for Master/Slave DirectoryProviders
- * [HSEARCH-197] - Move to slf4j
- * [HSEARCH-199] - Property close Search resources on SessionFactory.close()
- * [HSEARCH-202] - Avoid many maps lookup in Workspace
- * [HSEARCH-207] - Make DateBridge TwoWay to facilitate projection
- * [HSEARCH-208] - Raise exception on index and purge when the entity is not an indexed entity
- * [HSEARCH-209] - merge FullTextIndexCollectionEventListener into FullTextIndexEventListener
- * [HSEARCH-215] - Rename Search.createFTS to Search.getFTS deprecating the old method
- * [HSEARCH-223] - Use multiple criteria queries rather than ObjectLoader in most cases
- * [HSEARCH-230] - Ensure initialization safety in a multi-core machine
-
-** New Feature
- * [HSEARCH-133] - Allow overriding DefaultSimilarity for indexing and searching (Nick Vincent)
- * [HSEARCH-141] - Allow term position information to be stored in an index
- * [HSEARCH-153] - Provide the possibility to configure writer.setRAMBufferSizeMB() (Lucene 2.3)
- * [HSEARCH-154] - Provide a facility to access Lucene query explanations
- * [HSEARCH-164] - Built-in bridge to index java.lang.Class
- * [HSEARCH-165] - URI and URL built-in bridges
- * [HSEARCH-174] - Improve transparent filter caching by wrapping filters into our own CachingWrapperFilter
- * [HSEARCH-186] - Enhance analyzer to support the Solr model
- * [HSEARCH-190] - Add pom
- * [HSEARCH-191] - Make build independent of Hibernate Core structure
- * [HSEARCH-192] - Move to Hibernate Core 3.3
- * [HSEARCH-193] - Use dependency on Solr-analyzer JAR rather than the full Solr JAR
- * [HSEARCH-195] - Expose Analyzers instance by name: searchFactory.getAnalyzer(String)
- * [HSEARCH-200] - Expose IndexWriter setting MAX_FIELD_LENGTH via IndexWriterSetting
- * [HSEARCH-212] - Added ReaderProvider strategy reusing unchanged segments (using reader.reopen())
- * [HSEARCH-220] - introduce session.flushToIndexes API and deprecate batch_size
-
-
-** Task
- * [HSEARCH-169] - Migrate to Lucene 2.3.1 (index corruption possiblity in 2.3.0)
- * [HSEARCH-187] - Clarify which directories need read-write access, verify readonly behaviour on others.
- * [HSEARCH-214] - Upgrade Lucene to 2.3.2
- * [HSEARCH-229] - Deprecate FullTextQuery.BOOST
-
-
-3.0.1.GA (20-02-2008)
----------------------
-
-** Bug
- * [HSEARCH-56] - Updating a collection does not reindex
- * [HSEARCH-123] - Use mkdirs instead of mkdir to create necessary parent directory in the DirectoryProviderHelper
- * [HSEARCH-128] - Indexing embedded children's child
- * [HSEARCH-136] - CachingWrapperFilter does not cache
- * [HSEARCH-137] - Wrong class name in Exception when a FieldBridge does not implement TwoWayFieldBridge for a document id property
- * [HSEARCH-138] - JNDI Property names have first character cut off
- * [HSEARCH-140] - @IndexedEmbedded default depth is effectively 1 due to integer overflow
- * [HSEARCH-146] - ObjectLoader doesn't catch javax.persistence.EntityNotFoundException
- * [HSEARCH-149] - Default FieldBridge for enums passing wrong class to EnumBridge constructor
-
-
-** Improvement
- * [HSEARCH-125] - Add support for fields declared by interface or unmapped superclass
- * [HSEARCH-127] - Wrong prefix for worker configurations
- * [HSEARCH-129] - IndexedEmbedded for Collections Documentation
- * [HSEARCH-130] - Should provide better log infos (on the indexBase parameter for the FSDirectoryProvider)
- * [HSEARCH-144] - Keep indexer running till finished on VM shutdown
- * [HSEARCH-147] - Allow projection of Lucene DocId
-
-** New Feature
- * [HSEARCH-114] - Introduce ResultTransformer to the query API
- * [HSEARCH-150] - Migrate to Lucene 2.3
-
-** Patch
- * [HSEARCH-126] - Better diagnostic when Search index directory cannot be opened (Ian)
-
-
-3.0.0.GA (23-09-2007)
----------------------
-
-** Bug
- * [HSEARCH-116] - FullTextEntityManager acessing getDelegate() in the constructor leads to NPE in JBoss AS + Seam
- * [HSEARCH-117] - FullTextEntityManagerImpl and others should implement Serializable
-
-** Deprecation
- * [HSEARCH-122] - Remove query.setIndexProjection (replaced by query.setProjection)
-
-** Improvement
- * [HSEARCH-118] - Add ClassBridges (plural) functionality
-
-** New Feature
- * [HSEARCH-81] - Create a @ClassBridge Annotation (John Griffin)
-
-
-** Task
- * [HSEARCH-98] - Add a Getting started section to the reference documentation
-
-
-3.0.0.CR1 (4-09-2007)
----------------------
-
-** Bug
- * [HSEARCH-108] - id of embedded object is not indexed when using @IndexedEmbedded
- * [HSEARCH-109] - Lazy loaded entity could not be indexed
- * [HSEARCH-110] - ScrollableResults does not obey out of bounds rules (John Griffin)
- * [HSEARCH-112] - Unkown @FullTextFilter when attempting to associate a filter
-
-** Deprecation
- * [HSEARCH-113] - Remove @Text, @Keyword and @Unstored (old mapping annotations)
-
-** Improvement
- * [HSEARCH-107] - DirectoryProvider should have a start() method
-
-** New Feature
- * [HSEARCH-14] - introduce fetch_size for Hibernate Search scrollable resultsets (John Griffin)
- * [HSEARCH-69] - Ability to purge an index by class (John Griffin)
- * [HSEARCH-111] - Ability to disable event based indexing (for read only or batch based indexing)
-
-
-3.0.0.Beta4 (1-08-2007)
------------------------
-
-** Bug
- * [HSEARCH-88] - Unable to update 2 entity types in the same transaction if they share the same index
- * [HSEARCH-90] - Use of setFirstResult / setMaxResults can lead to a list with negative capacity (John Griffin)
- * [HSEARCH-92] - NPE for null fields on projection
- * [HSEARCH-99] - Avoid returning non initialized proxies in scroll() and iterate() (loader.load(EntityInfo))
-
-
-** Improvement
- * [HSEARCH-79] - Recommend to use FlushMode.APPLICATION on massive indexing
- * [HSEARCH-84] - Migrate to Lucene 2.2
- * [HSEARCH-91] - Avoid wrapping a Session object if the Session is already FullTextSession
- * [HSEARCH-100] - Rename fullTextSession.setIndexProjection() to fullTextSession.setProjection()
- * [HSEARCH-102] - Default index operation in @Field to TOKENIZED
- * [HSEARCH-106] - Use the shared reader strategy as the default strategy
-
-** New Feature
- * [HSEARCH-6] - Provide access to the Hit.getScore() and potentially the Document on a query
- * [HSEARCH-15] - Notion of Filtered Lucene queries (Hardy Ferentschik)
- * [HSEARCH-41] - Allow fine grained analyzers (Entity, attribute, @Field)
- * [HSEARCH-45] - Support @Fields() for multiple indexing per property (useful for sorting)
- * [HSEARCH-58] - Support named Filters (and caching)
- * [HSEARCH-67] - Expose mergeFactor, maxMergeDocs and minMergeDocs (Hardy Ferentschik)
- * [HSEARCH-73] - IncrementalOptimizerStrategy triggered on transactions or operations limits
- * [HSEARCH-74] - Ability to project Lucene meta information (Score, Boost, Document, Id, This) (John Griffin)
- * [HSEARCH-83] - Introduce OptimizerStrategy
- * [HSEARCH-86] - Index sharding: multiple Lucene indexes per entity type
- * [HSEARCH-89] - FullText wrapper for JPA APIs
- * [HSEARCH-103] - Ability to override the indexName in the FSDirectoryProviders family
-
-
-** Task
- * [HSEARCH-94] - Deprecate ContextHelper
-
-
-3.0.0.Beta3 (6-06-2007)
------------------------
-
-** Bug
- * [HSEARCH-64] - Exception Thrown If Index Directory Does Not Exist
- * [HSEARCH-66] - Some results not returned in some circumstances (Brandon Munroe)
-
-
-** Improvement
- * [HSEARCH-60] - Introduce SearchFactory / SearchFactoryImpl
- * [HSEARCH-68] - Set index copy threads as daemon
- * [HSEARCH-70] - Create the index base directory if it does not exists
-
-** New Feature
- * [HSEARCH-11] - Provide access to IndexWriter.optimize()
- * [HSEARCH-33] - hibernate.search.worker.batch_size to prevent OutOfMemoryException while inserting many objects
- * [HSEARCH-71] - Provide fullTextSession.getSearchFactory()
- * [HSEARCH-72] - searchFactory.optimize() and searchFactory.optimize(Class) (Andrew Hahn)
-
-
-3.0.0.Beta2 (31-05-2007)
-------------------------
-
-** Bug
- * [HSEARCH-37] - Verify that Serializable return type are not resolved by StringBridge built in type
- * [HSEARCH-39] - event listener declaration example is wrong
- * [HSEARCH-44] - Build the Lucene Document in the beforeComplete transaction phase
- * [HSEARCH-50] - Null Booleans lead to NPE
- * [HSEARCH-59] - Unable to index @indexEmbedded object through session.index when object is lazy and field access is used in object
-
-
-** Improvement
- * [HSEARCH-36] - Meaningful exception message when Search Listeners are not initialized
- * [HSEARCH-38] - Make the @IndexedEmbedded documentation example easier to understand
- * [HSEARCH-51] - Optimization: Use a query rather than batch-size to load objects when a single entity (hierarchy) is expected
- * [HSEARCH-63] - rename query.resultSize() to getResultSize()
-
-** New Feature
- * [HSEARCH-4] - Be able to use a Lucene Sort on queries (Hardy Ferentschik)
- * [HSEARCH-13] - Cache IndexReaders per SearchFactory
- * [HSEARCH-40] - Be able to embed collections in lucene index (@IndexedEmbeddable in collections)
- * [HSEARCH-43] - Expose resultSize and do not load object when only resultSize is retrieved
- * [HSEARCH-52] - Ability to load more efficiently an object graph from a lucene query by customizing the fetch modes
- * [HSEARCH-53] - Add support for projection (ie read the data from the index only)
- * [HSEARCH-61] - Move from MultiSearcher to MultiReader
- * [HSEARCH-62] - Support pluggable ReaderProvider strategies
-
-
-** Task
- * [HSEARCH-65] - Update to JBoss Embedded beta2
-
-
-3.0.0.Beta1 (19-03-2007)
-------------------------
-
-Initial release as a standalone product (see Hibernate Annotations changelog for previous informations)
-
-
-Release Notes - Hibernate Search - Version 3.0.0.beta1
-
-** Bug
- * [HSEARCH-7] - Ignore object found in the index but no longer present in the database (for out of date indexes)
- * [HSEARCH-21] - NPE in SearchFactory while using different threads
- * [HSEARCH-22] - Enum value Index.UN_TOKENISED is misspelled
- * [HSEARCH-24] - Potential deadlock when using multiple DirectoryProviders in a highly concurrent index update
- * [HSEARCH-25] - Class cast exception in org.hibernate.search.impl.FullTextSessionImpl<init>(FullTextSessionImpl.java:54)
- * [HSEARCH-28] - Wrong indexDir property in Apache Lucene Integration
-
-
-** Improvement
- * [HSEARCH-29] - Share the initialization state across all Search event listeners instance
- * [HSEARCH-30] - @FieldBridge now use o.h.s.a.Parameter rather than o.h.a.Parameter
- * [HSEARCH-31] - Move to Lucene 2.1.0
-
-** New Feature
- * [HSEARCH-1] - Give access to Directory providers
- * [HSEARCH-2] - Default FieldBridge for enums (Sylvain Vieujot)
- * [HSEARCH-3] - Default FieldBridge for booleans (Sylvain Vieujot)
- * [HSEARCH-9] - Introduce a worker factory and its configuration
- * [HSEARCH-16] - Cluster capability through JMS
- * [HSEARCH-23] - Support asynchronous batch worker queue
- * [HSEARCH-27] - Ability to index associated / embedded objects
Modified: search/branches/v3_1_1_GA_CP/pom.xml
===================================================================
--- search/branches/v3_1_1_GA_CP/pom.xml 2010-05-23 14:26:46 UTC (rev 19590)
+++ search/branches/v3_1_1_GA_CP/pom.xml 2010-05-23 14:30:27 UTC (rev 19591)
@@ -100,6 +100,32 @@
<build>
<defaultGoal>test</defaultGoal>
<plugins>
+ <plugin>
+ <groupId>org.jboss.maven.plugins</groupId>
+ <artifactId>maven-injection-plugin</artifactId>
+ <version>1.0.2</version>
+ <executions>
+ <execution>
+ <phase>compile</phase>
+ <goals>
+ <goal>bytecode</goal>
+ </goals>
+ </execution>
+ </executions>
+ <configuration>
+ <bytecodeInjections>
+ <bytecodeInjection>
+ <expression>${pom.version}</expression>
+ <targetMembers>
+ <constant>
+ <className>org.hibernate.search.Version</className>
+ <fieldName>VERSION</fieldName>
+ </constant>
+ </targetMembers>
+ </bytecodeInjection>
+ </bytecodeInjections>
+ </configuration>
+ </plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
Deleted: search/branches/v3_1_1_GA_CP/readme.txt
===================================================================
--- search/branches/v3_1_1_GA_CP/readme.txt 2010-05-23 14:26:46 UTC (rev 19590)
+++ search/branches/v3_1_1_GA_CP/readme.txt 2010-05-23 14:30:27 UTC (rev 19591)
@@ -1,51 +0,0 @@
-Hibernate Search
-==================================================
-Version: 3.1.1.GA_CP01, 13.01.2010
-
-Description
------------
-
-Full text search engines like Apache Lucene(tm) are a very powerful technology to
-bring free text/efficient queries to applications. If suffers several mismatches
-when dealing with a object domain model (keeping the index up to date, mismatch
-between the index structure and the domain model, ...)
-Hibernate Search indexes your domain model thanks to a few annotations, takes
-care of the index synchronization, brings you back managed objects from free text
-queries.
-Hibernate Search is using Apache Lucene(tm) under the cover.
-
-
-Hibernate Search Requires Hibernate Core 3.3 and above.
-This version runs well with Hibernate Annotations 3.4.x and Hibernate EntityManager 3.4.x
-
-
-Instructions
-------------
-
-Unzip to installation directory, read doc/reference
-
-
-Contact
-------------
-
-Latest Documentation:
-
- http://hibernate.org
-
-Bug Reports:
-
- Hibernate JIRA (preferred)
- hibernate-devel(a)lists.sourceforge.net
-
-Free Technical Support:
-
- http://forum.hibernate.org (http://forum.hibernate.org/viewforum.php?f=9)
-
-
-Notes
------------
-
-If you want to contribute, go to http://www.hibernate.org/
-
-This software and its documentation are distributed under the terms of the
-FSF Lesser Gnu Public License (see lgpl.txt).
\ No newline at end of file
Modified: search/branches/v3_1_1_GA_CP/src/main/java/org/hibernate/search/Version.java
===================================================================
--- search/branches/v3_1_1_GA_CP/src/main/java/org/hibernate/search/Version.java 2010-05-23 14:26:46 UTC (rev 19590)
+++ search/branches/v3_1_1_GA_CP/src/main/java/org/hibernate/search/Version.java 2010-05-23 14:30:27 UTC (rev 19591)
@@ -8,7 +8,7 @@
*/
public class Version {
- public static final String VERSION = "3.1.1.GA_CP01";
+ public static final String VERSION = "[WORKING]";
static {
LoggerFactory.make().info( "Hibernate Search {}", VERSION );
14 years, 7 months
Hibernate SVN: r19590 - in entitymanager/branches/v3_4_0_GA_CP: src/main/java/org/hibernate/ejb and 1 other directory.
by hibernate-commits@lists.jboss.org
Author: stliu
Date: 2010-05-23 10:26:46 -0400 (Sun, 23 May 2010)
New Revision: 19590
Removed:
entitymanager/branches/v3_4_0_GA_CP/changelog.txt
entitymanager/branches/v3_4_0_GA_CP/readme.txt
Modified:
entitymanager/branches/v3_4_0_GA_CP/pom.xml
entitymanager/branches/v3_4_0_GA_CP/src/main/java/org/hibernate/ejb/Version.java
Log:
JBPAPP-4324 Upgrade hibernate3-entitymanager to 3.4.0.GA_CP02
Deleted: entitymanager/branches/v3_4_0_GA_CP/changelog.txt
===================================================================
--- entitymanager/branches/v3_4_0_GA_CP/changelog.txt 2010-05-23 09:11:49 UTC (rev 19589)
+++ entitymanager/branches/v3_4_0_GA_CP/changelog.txt 2010-05-23 14:26:46 UTC (rev 19590)
@@ -1,399 +0,0 @@
-Hibernate EntityManager Changelog
-==================================
-
-3.4.0.GA_CP01 (13-01-2010)
-----------------------------
-
-** Bug
- * [JBPAPP-1998] - EJB-438 - Wrong exception thrown on optimistic locking failure due to deleted entity using hibernate.jdbc.batch_versioned_data=false
- * [JBPAPP-2862] - CLONE -Sybase - EntityManager - unit tests using LOBs fail
- * [JBPAPP-3314] - org.hibernate.ejb.test.callbacks.CallbackAndDirtyTest.testDirtyButNotDirty fails on PostgreSQL
- * [JBPAPP-3320] - org.hibernate.ejb.test.inheritance.InheritanceTest fails on Oracle due to the 'size' keyword
- * [JBPAPP-3377] - some EM test doesn't be tested on other DBs
-** Task
-
- * [JBPAPP-2923] - CLONE -Modify Annotations, Entity Manager, and Search to work with the same property settings as Core
- * [JBPAPP-3217] - enable test case on others db
- * [JBPAPP-3153] - change the build tool of Hibernate EM(eap 5 cp branch)
-
-
-3.4.0.GA (20-08-2008)
-----------------------
-
-** Bug
- * [EJB-375] - getSingleResult potentially generates out of memory by calling list()
-
-** Task
- * [EJB-377] - Refactor build to allow filtering of resources
-
-
-3.4.0.CR2 (01-08-2008)
-----------------------
-
-** Bug
- * [EJB-349] - EM Incorrectly throws EntityExistsException wrapping ConstraintViolationException on constraint violation during delete
-
-
-3.4.0.CR1 (27-05-2008)
-----------------------
-
-** Improvement
- * [EJB-359] - Move to slf4j
-
-** New Feature
- * [EJB-352] - Add pom
- * [EJB-353] - Make build independent of Hibernate Core structure
- * [EJB-354] - Move to Hibernate Core 3.3
-
-
-3.3.2.GA (14-03-2008)
----------------------
-
-** Bug
- * [EJB-324] - Deployed Maven POM incorrectly excludes transitive dependency
- * [EJB-342] - event listener (prepersist, preinsert) not firing
-
-
-3.3.2.CR1 (06-03-2008)
-----------------------
-
-** Bug
- * [EJB-295] - External META-INF/orm.xml not included even when explicitly requested when an internal orm.xml is already present
- * [EJB-330] - Calling configure(String) on Ejb3Configuration before addAnnotatedClass(..) breaks callbacks
- * [EJB-333] - Space in path result in error during deployment in JBoss AS
- * [EJB-334] - Space in path result in error during deployment in JBoss AS
- * [EJB-340] - onLoad() callback from Interceptor and onLoad() from Lifecycle are never invoked in an EJB3 environment
- * [EJB-341] - Trying to create unexisting named query set the transaction to rollback
-
-
-3.3.2.Beta2 (15-01-2008)
-------------------------
-
-** Bug
- * [EJB-283] - Ejb3Configuration can't read Jar file OC4J
- * [EJB-299] - JarVisitor.addElement() fails with a StringIndexOutOfBoundsException if there is a package-info.class in the default package
- * [EJB-326] - Persistence unit root in a WAR not properly handled
-
-
-** Improvement
- * [EJB-277] - allow string values for query hints
-
-** New Feature
- * [EJB-305] - New configuration option for non-shared Hibernate interceptor
- * [EJB-325] - Any PersistenceExceptions should state which persistenceunit they are from
-
-
-3.3.2.Beta1 (31-10-2007)
-------------------------
-
-** Bug
- * [EJB-284] - Scanning for META-INF/orm.xml does not work on Windows in EE mode
- * [EJB-308] - Space in path result in error during deployment in JBoss AS
- * [EJB-310] - Typo in warn message when the container lacks temporary classloader support
- * [EJB-321] - TCK enforces PERSISTENCE_PROVIDER value including the typo
-
-
-** Improvement
- * [EJB-316] - java.persistence.Persistence#PERSISTENCE_PROVIDER should be a final String
-
-
-
-** Task
- * [EJB-302] - Move away from ArchiveBrowser and use JarVisitor
-
-
-3.3.1.GA (28-03-2007)
----------------------
-
-** Bug
- * [EJB-280] - java.lang.NoSuchMethodError: Hibernate EM 3.3.0 breaks Jboss Embedded EJB3 due to method signature change
- * [EJB-281] - Version 3.3.0 is not compatible with JBoss AS 4.0.5
- * [EJB-282] - ORM.xml ignored when excludeUnlistedClass = true in container mode (EJB 3.0, Spring)
-
-
-3.3.0.GA (19-03-2007)
----------------------
-
-** Bug
- * [EJB-46] - PrePersist callback method not called if entity's primary key is null
- * [EJB-257] - EJB3Configuration should work wo having to call any of the configure(*)
- * [EJB-259] - Evaluate orm.xml files in referenced jar files
- * [EJB-261] - merge fails to update join table
- * [EJB-263] - getSingleResult() and fetch raise abusive NonUniqueResultException
- * [EJB-269] - Fail to deploy a persistence archive in Weblogic Server
- * [EJB-275] - JarVisitor fails on WAS with white space
-
-
-** Improvement
- * [EJB-242] - Be more defensive regarding exotic (aka buggy) URL protocol handler
- * [EJB-262] - Provides XML file name on parsing error
- * [EJB-271] - Raise a WARN when deployment descriptors (orm.xml) refer to an unknown property (increase usability)
- * [EJB-266] - Avoid collection loading during cascaded PERSIST (improving performance on heavily cascaded object graphs)
-
-
-3.2.1.GA (8-12-2006)
---------------------
-
-** Bug
- * [EJB-226] - JarVistor.getVisitor does not handle paths containing spaces correctly for an exploded par
- * [EJB-229] - merge fails with detached obj in 1:1 relationship
- * [EJB-237] - merge() causes version to increase
- * [EJB-240] - attribute-override and embedded in orm.xml not working
- * [EJB-244] - JarVisitor fails on exploded archives with spaces in path
- * [EJB-247] - HibernatePersistence does not play well with other PersistenceProviders
- * [EJB-252] - Clarify documentation on package use in persistence.xml <class> (and it's meaning)
- * [EJB-253] - Support Weblogic JAR URL in JavaSE mode
-
-
-** Improvement
- * [EJB-232] - Better documentation for <jar-file> and scanning outside of PU root
- * [EJB-243] - Error in Documentation: persistence.xml for typical Java SE Environment
- * [EJB-246] - Consider being in a JavaEE container when jta-datasource is used
- * [EJB-248] - Wrap StaleStateException into an OptimisticLockException during em.getTransaction().commit()
- * [EJB-254] - Allow DataSource overriding through createEntityManager(String, Map override)
- * [EJB-256] - Avoid JAR locking on Windows and Tomcat due to URLConnection caching
-
-
-3.2.0.GA (16-10-2006)
----------------------
-Same code base as 3.2.0.CR3
-
-** Task
- * [EJB-239] - Add EJB 3.0 JavaDoc to the distribution
-
-
-3.2.0.CR3 (04-10-2006)
-----------------------
-** Bug
- * [EJB-150] - JarVisitor.addElement does not close passed input streams
- * [EJB-221] - TransientObjectException with FetchType.LAZY on @ManyToOne and field access on target entity
- * [EJB-231] - Optimistic locking exception could lead to java.lang.IllegalArgumentException: id to load is required for loading
-
-
-** Improvement
- * [EJB-234] - Inefficiency during the flush operation
-
-
-3.2.0.CR2 (16-09-2006)
-----------------------
-** Bug
- * [EJB-98] - EntityManager.find() throws an org.hibernate.ObjectDeletedException if you find something deleted in the same TXA
- * [EJB-148] - Incorrect exception when @CollectionOfElement is used with @Where and FetchType is EAGER
- * [EJB-174] - Ejb3Configuration can't open EJB Jar file with persistence.xml in Oracle OC4J server (Jifeng Liu)
- * [EJB-181] - ExplodedJarVisitor and paths with white spaces
- * [EJB-185] - Some EJB3 exceptions does not support nested exceptions
- * [EJB-187] - RuntimeException raised in CallBack methods should be left as is
- * [EJB-188] - @PostUpdate can be called even if @PreUpdate is not when object is in DELETED state
- * [EJB-189] - em.getReference() should raise IllegalArgumentException if the id is of the wrong type
- * [EJB-190] - Query.setParameter() should raise an IllegalArgumentException if the parameter does not exist
- * [EJB-191] - Incoherent usage of getResultList(), executeUpdate() or getSingleResult() regarding the DML/Select style should raise an IllegalStateException
- * [EJB-194] - Removing a detached instance is not allowed
- * [EJB-195] - Wrong query should raise an IllegalArgumentException
- * [EJB-196] - referencing a transient instance while flushing an association non cascaded should raise IllegalStateException
- * [EJB-198] - On em.close(), tries to register the transaction even if the transaction is marked for rollback
- * [EJB-202] - Inaccurate exception message for setFirstResult in QueryImpl
- * [EJB-203] - exception when using top-level <access>PROPERTY</access> in orm.xml
- * [EJB-204] - ClassCastException when using <mapped-superclass> in orm.xml
- * [EJB-205] - refresh() should raise IllegalArgumentException if the entity is not managed
- * [EJB-207] - em.lock(..., WRITE) raise NPE on some DBs
- * [EJB-212] - excludeUnlistedClasses ignored in SE case
- * [EJB-214] - Native Query can not be used with parameter
- * [EJB-215] - EntityManager fails during transaction commit after it has been closed
- * [EJB-216] - Query.getSingleResult() whose state-field is null raise an EntityNotFoundException rather than returning null
- * [EJB-218] - markForRollback() should not swallow the original exception
- * [EJB-220] - Entity listener documentation contradicts EJB3 specification
- * [EJB-223] - EntityNotFoundDelegate not Serializable
-
-
-** Improvement
- * [EJB-82] - Query interface should support parameter lists for positions
- * [EJB-182] - Add Websphere proprietary jar protocol
- * [EJB-186] - Set the default cache provider to NoCache to prevent PU misuse to raise exceptions
- * [EJB-201] - Ejb3Configuration should output a warning if no persistence.xml is found
- * [EJB-210] - OptimisticLockStrategy should expose the underlying stale entity
- * [EJB-211] - JavaDoc the EJB 3 API
-
-** New Feature
- * [EJB-154] - Allow to create/configure an EJB3Configuration without building a sessionfactory
- * [EJB-160] - Push EJB3Configuration and SessionFactory into JNDI
- * [EJB-184] - Add EM property for FlushMode
-
-
-3.2.0.CR1 (13-05-2006)
-----------------------
-** Bug
- * [EJB-9] - Proxied instances should raise ENFE not LIE
- * [EJB-59] - count(*) return Integer and not Long
- * [EJB-101] - callback method overriding should avoid supermethod calls
- * [EJB-116] - The EntityManager's configuration overwites configurations from the hibernate.cfg.xml file
- * [EJB-167] - EntityManager must return null, if entity does not exist.
- * [EJB-168] - Do not register Synchronization on Transaction marked as rollback
- * [EJB-169] - MappingException thrown when META-INF/orm.xml is not found
- * [EJB-173] - Resetting joined transaction state on a closed entity manager raise an exception
- * [EJB-177] - in beforeCompletion phase, the transaction might not be returned causing an NPE
-
-
-** Improvement
- * [EJB-84] - Integrate the ClassFileTransformer and pass the appropriate entities to enhance
- * [EJB-159] - RESOURCE_LOCAL should be default in JavaSE
- * [EJB-172] - Use Hibernate abstraction of the ByteCodeEnhancer for class file transformation
- * [EJB-175] - Support for createNativeQuery.executeUpdate()
-
-** New Feature
- * [EJB-165] - Support interceptor and callback XML overriding
- * [EJB-170] - Try to find <mapping-file/> in the parsed JAR before delegating to the regular resource locator
-
-
-3.1.0.Beta8b (27-04-2006)
--------------------------
-
-** Bug
- * [EJB-121] - FileZippedJarVisitor can not handle URL with white spaces in windows XP professional.
- * [EJB-155] - assumes Map.Entry where string is returned
- * [EJB-156] - Setting a transaction factory raise an assertion failure
- * [EJB-166] - StaleObjectStaleException not wrapped into an optimisticLockException when merge is used
-
-
-
-** New Feature
- * [EJB-157] - Display the version number at init time to avoid user confusion regarding the version used
- * [EJB-164] - Support for EJB3 mapping files and META-INF/orm.xml
-
-
-3.1beta7 (27-03-2006)
----------------------
-
-** Bug
- * [EJB-37] - Check all the spec exceptions to be sure we raise the right ones
- * [EJB-80] - EMF bootstrapping doesn't work as documented
- * [EJB-96] - Spelling error in 2.4 section of reference doc
- * [EJB-114] - NPE when Persistence.createEntityManager(String) is used
- * [EJB-115] - wrong loglevel in PersistenceXmlLoader.java (line 101)
- * [EJB-118] - PersistenceXmlLoader logging a fail message
- * [EJB-119] - @EntityResult definition is not correct
- * [EJB-123] - Exception "EntityManager is closed" throwed when trying to check isOpen()
- * [EJB-125] - Can't use Hibernate's FlushMode.NEVER with an EntityManager
- * [EJB-134] - javax.persistence.OptimisticLockException not thrown
- * [EJB-139] - em.getTransaction() should raise IllegalStateException if accessed on a JTA EM
- * [EJB-145] - Support EntityManager.joinTransaction()
-
-
-** Improvement
- * [EJB-77] - Getting access to the annotationconfiguration behind a Ejb3Configuration
- * [EJB-135] - em.close() should close the API but let the EM in sync with the attached transaction
- * [EJB-147] - Validate persistence.xml file from persistence_1_0.xsd
-
-** New Feature
- * [EJB-90] - Mark transaction for Rollbacked on PersistenceException
- * [EJB-106] - EntityManager.lock( , LockModeType.WRITE)
- * [EJB-117] - extra persist() queue
- * [EJB-137] - Implements EntityExistsException
- * [EJB-138] - Implements EntityTransaction.setRollbackOnly()
- * [EJB-141] - Update EntityManagerFactory interface by removing PersistenceContextType and adding the overriding map
- * [EJB-142] - RollbackTransaction on JTA should clear the persistence context
- * [EJB-143] - Set the transaction_factory automatically from Transaction_type unless explicitly set
- * [EJB-144] - Failure of EntityTransaction.commit() should rollback();
-
-
-** Task
- * [EJB-107] - Check use of persistenceUnitInfo.getClassLoader()
-
-
-3.1beta6 (20-01-2006)
----------------------
-** Bug
- * [EJB-93] - @PrePersist callback not called on cascade
- * [EJB-110] - misnamed method in PersistenceUnitInfo
- * [EJB-111] - close() throws IllegalStateException( "transaction in progress")
-
-** New Feature
- * [EJB-50] - Entity callbacks should handle subclassing
- * [EJB-83] - PersistentUnitInfo and new persistence.xml schema as per the pfd
- * [EJB-85] - Support CUD operations out of transactions
- * [EJB-86] - EntityManager.getFlushMode()
- * [EJB-87] - EntityManager.lock( , LockModeType.READ)
- * [EJB-88] - EntityManager.clear()
- * [EJB-89] - Replace EntityNotFoundException to NoResultException for query.getSingleResult()
- * [EJB-91] - persistence.xml structure changes as per the PFD
- * [EJB-92] - Implements transactional-type
- * [EJB-104] - Flag for class file transformation
- * [EJB-108] - Support EJB3 overriding properties (provider, jta / non-jta datasource, transactionType) over persistence.xml
-
-
-** Improvement
- * [EJB-100] - Multiple lifecycle per event
- * [EJB-102] - EJB3 no longer requires to rollback the ids
-
-
-** Deprecation
- * [EJB-105] - Implicit positional parameters for EJBQL queries is no longer supported
-
-3.1beta5 (13-12-2005)
----------------------
-** Bug
- * [EJB-52] - PERSIST cascade loads unilitialized elements at flush time
- * [EJB-68] - hibernate.ejb.interceptor property in persistence.xml is ignored
- * [EJB-73] - Id is not set in @PostPersist
- * [EJB-76] - JarVisitor unqualify algorithm fails when the name ends with 'ar' and is less than 4 chars
- * [EJB-78] - default value for hibernate.transaction.flush_before_completion
-
-** New Feature
- * [EJB-58] - Support @MyAnnotation annotated with an @EntityListener
- * [EJB-71] - Support custom event listeners
-
-
-** Improvement
- * [EJB-35] - Support custom NamingStrategy as property.
- * [EJB-72] - Make setDataSource() more out of container friendly
- * [EJB-75] - Fall back to <property name="blah">blah</property> when the value attribute is empty
- * [EJB-79] - Package.getPackage() returns null on some classloaders
-
-
-3.1beta4 (07-10-2005)
----------------------
- * EJB-67 Lazy access to the stream in JarVisitor leading to a non access when filters are empty (ie no filters)
- * EJB-65 handle eclipse bundleresource url protocol during metadata search
- * EJB-66 Support all url protocols that returns zip streams for jars like http
- * EJB-62 Error during stateful session bean passivation
- * EJB-61 implicit parameter ? no longer supported
- * EJB-63 Positional parameters should start from index 1 to say sort of consistent with the spec
-
-3.1beta3 (14-09-2005)
----------------------
- * EJB-6 Support ?1, ?2 style positional parameters
- * EJB-60 Support byte code instrumentation via a ClassFileTransformer
- * EJB-55 Problems using a .par file with Tomcat
- * EJB-56 Support exploded jar files *not* ending with .xar
- * EJB-51 Support persistence.xml declaration and hibernate.cfg.xml
- * EJB-53 DELETE_ORPHAN not executed at flush time
- * EJB-52 Persist cascade loads uninitialized elements at flush time
- * EJB-43 Autodetection magic leads to duplicate imports
- * EJB-24 ByteArrayBlobType incompatible with Oracle
- * EJB-28 create an EMF through PersistenceInfo
- * EJB-44 Support Hibernate Interceptors in EJB3 imlementation as an extension
- * EJB-40 Entity callbacks should cast away access modifiers
- * EJB-48 Plug Validator framework into HEM
- * EJB-47 Validator and Jacc event listeners clashes
-
-3.1beta2 (04-08-2005)
----------------------
- * Support package names in <class></class>
- * EJB-42 Autodetection magic ignores hibernate.cfg.xml
- * EJB-45 Allow to disable autodetection in .par through a property
- * EJB-41 Short-circuit dirty checking when no callback are actually called
- * EJB-38 Standalone EM should search for package-info files
- * EJB-31 Out-of-container should search for .hbm.xml files
- * EJB-29 Lifecycle callbacks and dirty checking clash
- * EJB-36 proxied instances raise an exception in em.contains()
- * EJB-28 support injected DataSource
- * EJB-34 EMF.isOpen() is wrong
- * EJB-27 Support transaction-less operations with getEntityManager()
- * EJB-23 No lifecycle interceptor used when getCurrentSession() is called
- * EJB-20 Sync Hibernate *state* and entity on lifecycle @Callbacks
- * EJB-21 NPE in TransactionImpl.isActive() when tx is not initialized (Shane Bryzak)
- * EJB-19 <jar-file/> analysed, but the resource path is mandatory and not only the jar name
- * EJB-18 get mapped classes from .par files both exploded and regular zip
-
-3.1beta1 Preview (24-06-2005)
------------------------------
-Initial release
\ No newline at end of file
Modified: entitymanager/branches/v3_4_0_GA_CP/pom.xml
===================================================================
--- entitymanager/branches/v3_4_0_GA_CP/pom.xml 2010-05-23 09:11:49 UTC (rev 19589)
+++ entitymanager/branches/v3_4_0_GA_CP/pom.xml 2010-05-23 14:26:46 UTC (rev 19590)
@@ -98,6 +98,32 @@
</testResource>
</testResources>
<plugins>
+ <plugin>
+ <groupId>org.jboss.maven.plugins</groupId>
+ <artifactId>maven-injection-plugin</artifactId>
+ <version>1.0.2</version>
+ <executions>
+ <execution>
+ <phase>compile</phase>
+ <goals>
+ <goal>bytecode</goal>
+ </goals>
+ </execution>
+ </executions>
+ <configuration>
+ <bytecodeInjections>
+ <bytecodeInjection>
+ <expression>${pom.version}</expression>
+ <targetMembers>
+ <constant>
+ <className>org.hibernate.ejb.Version</className>
+ <fieldName>VERSION</fieldName>
+ </constant>
+ </targetMembers>
+ </bytecodeInjection>
+ </bytecodeInjections>
+ </configuration>
+ </plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId>
Deleted: entitymanager/branches/v3_4_0_GA_CP/readme.txt
===================================================================
--- entitymanager/branches/v3_4_0_GA_CP/readme.txt 2010-05-23 09:11:49 UTC (rev 19589)
+++ entitymanager/branches/v3_4_0_GA_CP/readme.txt 2010-05-23 14:26:46 UTC (rev 19590)
@@ -1,56 +0,0 @@
-Hibernate EntityManager
-==================================================
-Version: 3.4.0.GA_CP01, 13-01-2010
-
-THIS RELEASE OF HIBERNATE ENTITYMANAGER REQUIRES HIBERNATE CORE 3.3 (and above)
-
-
-Description
------------
-
-The EJB3 specification recognizes the interest and the success of
-the transparent object/relational mapping paradigm. The EJB3 specification
-standardizes the basic APIs and the metadata needed for any object/relational
-persistence mechanism.
-
-Hibernate EntityManager implements the programming interfaces and lifecycle rules
-as defined by the EJB3 persistence specification. Together with Hibernate Annotations
-this wrapper implements a complete (and standalone) EJB3 persistence solution on
-top of the mature Hibernate core. You may use a combination of all three together,
-annotations without EJB3 programming interfaces and lifecycle, or even pure native
-Hibernate, depending on the business and technical needs of your project. You can
-at all times fall back to Hibernate native APIs, or if required, even to native
-JDBC and SQL.
-
-
-Instructions
-------------
-
-Unzip to installation directory, read doc/reference
-
-
-Contact
-------------
-
-Latest Documentation:
-
- http://hibernate.org
- http://annotations.hibernate.org
-
-Bug Reports:
-
- Hibernate JIRA (preferred)
- hibernate-devel(a)lists.sourceforge.net
-
-Free Technical Support:
-
- http://forum.hibernate.org
-
-
-Notes
------------
-
-If you want to contribute, go to http://www.hibernate.org/
-
-This software and its documentation are distributed under the terms of the
-FSF Lesser Gnu Public License (see lgpl.txt).
\ No newline at end of file
Modified: entitymanager/branches/v3_4_0_GA_CP/src/main/java/org/hibernate/ejb/Version.java
===================================================================
--- entitymanager/branches/v3_4_0_GA_CP/src/main/java/org/hibernate/ejb/Version.java 2010-05-23 09:11:49 UTC (rev 19589)
+++ entitymanager/branches/v3_4_0_GA_CP/src/main/java/org/hibernate/ejb/Version.java 2010-05-23 14:26:46 UTC (rev 19590)
@@ -9,7 +9,7 @@
* @author Emmanuel Bernard
*/
public class Version {
- public static final String VERSION = "3.4.0.GA_CP01";
+ public static final String VERSION = "[WORKING]";
private static final Logger log = LoggerFactory.getLogger( Version.class );
static {
14 years, 7 months
Hibernate SVN: r19589 - in search/trunk/hibernate-search/src: main/java/org/hibernate/search/query/dsl/v2/impl and 1 other directories.
by hibernate-commits@lists.jboss.org
Author: epbernard
Date: 2010-05-23 05:11:49 -0400 (Sun, 23 May 2010)
New Revision: 19589
Added:
search/trunk/hibernate-search/src/main/java/org/hibernate/search/query/dsl/v2/RangeContext.java
search/trunk/hibernate-search/src/main/java/org/hibernate/search/query/dsl/v2/RangeMatchingContext.java
search/trunk/hibernate-search/src/main/java/org/hibernate/search/query/dsl/v2/RangeTerminationExcludable.java
search/trunk/hibernate-search/src/main/java/org/hibernate/search/query/dsl/v2/impl/ConnectedMultiFieldsRangeQueryBuilder.java
search/trunk/hibernate-search/src/main/java/org/hibernate/search/query/dsl/v2/impl/ConnectedRangeContext.java
search/trunk/hibernate-search/src/main/java/org/hibernate/search/query/dsl/v2/impl/ConnectedRangeMatchingContext.java
search/trunk/hibernate-search/src/main/java/org/hibernate/search/query/dsl/v2/impl/Helper.java
search/trunk/hibernate-search/src/main/java/org/hibernate/search/query/dsl/v2/impl/RangeQueryContext.java
search/trunk/hibernate-search/src/main/java/org/hibernate/search/query/dsl/v2/impl/TermQueryContext.java
Removed:
search/trunk/hibernate-search/src/main/java/org/hibernate/search/query/dsl/v2/impl/QueryContext.java
Modified:
search/trunk/hibernate-search/src/main/java/org/hibernate/search/query/dsl/v2/QueryBuilder.java
search/trunk/hibernate-search/src/main/java/org/hibernate/search/query/dsl/v2/impl/ConnectedFuzzyContext.java
search/trunk/hibernate-search/src/main/java/org/hibernate/search/query/dsl/v2/impl/ConnectedMultiFieldsTermQueryBuilder.java
search/trunk/hibernate-search/src/main/java/org/hibernate/search/query/dsl/v2/impl/ConnectedQueryBuilder.java
search/trunk/hibernate-search/src/main/java/org/hibernate/search/query/dsl/v2/impl/ConnectedTermContext.java
search/trunk/hibernate-search/src/main/java/org/hibernate/search/query/dsl/v2/impl/ConnectedTermMatchingContext.java
search/trunk/hibernate-search/src/main/java/org/hibernate/search/query/dsl/v2/impl/ConnectedWildcardContext.java
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/Month.java
Log:
HSEARCH-414 Add support for range query
Add support for range queries including the special case of below and above
range().onField("property").from(a).exclude().to(b).createQuery()
range().onField("property").above(a).exclude().createQuery()
Modified: search/trunk/hibernate-search/src/main/java/org/hibernate/search/query/dsl/v2/QueryBuilder.java
===================================================================
--- search/trunk/hibernate-search/src/main/java/org/hibernate/search/query/dsl/v2/QueryBuilder.java 2010-05-22 12:31:15 UTC (rev 19588)
+++ search/trunk/hibernate-search/src/main/java/org/hibernate/search/query/dsl/v2/QueryBuilder.java 2010-05-23 09:11:49 UTC (rev 19589)
@@ -31,6 +31,11 @@
BooleanJunction<BooleanJunction> bool();
/**
+ * find matching elements within a range
+ */
+ RangeContext range();
+
+ /**
* Query matching all documents
* Typically mixed with a boolean query.
*/
Added: search/trunk/hibernate-search/src/main/java/org/hibernate/search/query/dsl/v2/RangeContext.java
===================================================================
--- search/trunk/hibernate-search/src/main/java/org/hibernate/search/query/dsl/v2/RangeContext.java (rev 0)
+++ search/trunk/hibernate-search/src/main/java/org/hibernate/search/query/dsl/v2/RangeContext.java 2010-05-23 09:11:49 UTC (rev 19589)
@@ -0,0 +1,11 @@
+package org.hibernate.search.query.dsl.v2;
+
+/**
+ * @author Emmanuel Bernard
+ */
+public interface RangeContext extends QueryCustomization<RangeContext> {
+ /**
+ * field / property the term query is executed on
+ */
+ RangeMatchingContext onField(String fieldName);
+}
Added: search/trunk/hibernate-search/src/main/java/org/hibernate/search/query/dsl/v2/RangeMatchingContext.java
===================================================================
--- search/trunk/hibernate-search/src/main/java/org/hibernate/search/query/dsl/v2/RangeMatchingContext.java (rev 0)
+++ search/trunk/hibernate-search/src/main/java/org/hibernate/search/query/dsl/v2/RangeMatchingContext.java 2010-05-23 09:11:49 UTC (rev 19589)
@@ -0,0 +1,34 @@
+package org.hibernate.search.query.dsl.v2;
+
+/**
+ * @author Emmanuel Bernard
+ */
+public interface RangeMatchingContext extends FieldCustomization<RangeMatchingContext> {
+ /**
+ * field / property the term query is executed on
+ */
+ RangeMatchingContext andField(String field);
+
+ //TODO what about numeric range query, I guess we can detect it automatically based on the field bridge
+ //TODO get info on precisionStepDesc (index time info)
+ //FIXME: Is <T> correct or should we specialize to String and Numeric (or all the numeric types?
+ <T> FromRangeContext<T> from(T from);
+
+ public interface FromRangeContext<T> {
+ RangeTerminationExcludable to(T to);
+ FromRangeContext<T> exclude();
+ }
+
+ /**
+ * The field value must be below <code>below</code>
+ * You can exclude the value <code>below</code> by calling <code>.exclude()</code>
+ */
+ RangeTerminationExcludable below(Object below);
+
+ /**
+ * The field value must be above <code>above</code>
+ * You can exclude the value <code>above</code> by calling <code>.exclude()</code>
+ */
+ RangeTerminationExcludable above(Object above);
+
+}
Added: search/trunk/hibernate-search/src/main/java/org/hibernate/search/query/dsl/v2/RangeTerminationExcludable.java
===================================================================
--- search/trunk/hibernate-search/src/main/java/org/hibernate/search/query/dsl/v2/RangeTerminationExcludable.java (rev 0)
+++ search/trunk/hibernate-search/src/main/java/org/hibernate/search/query/dsl/v2/RangeTerminationExcludable.java 2010-05-23 09:11:49 UTC (rev 19589)
@@ -0,0 +1,8 @@
+package org.hibernate.search.query.dsl.v2;
+
+/**
+ * @author Emmanuel Bernard
+ */
+public interface RangeTerminationExcludable extends Termination<RangeTerminationExcludable> {
+ RangeTerminationExcludable exclude();
+}
Modified: search/trunk/hibernate-search/src/main/java/org/hibernate/search/query/dsl/v2/impl/ConnectedFuzzyContext.java
===================================================================
--- search/trunk/hibernate-search/src/main/java/org/hibernate/search/query/dsl/v2/impl/ConnectedFuzzyContext.java 2010-05-22 12:31:15 UTC (rev 19588)
+++ search/trunk/hibernate-search/src/main/java/org/hibernate/search/query/dsl/v2/impl/ConnectedFuzzyContext.java 2010-05-23 09:11:49 UTC (rev 19589)
@@ -5,7 +5,6 @@
import org.hibernate.search.SearchFactory;
import org.hibernate.search.query.dsl.v2.FuzzyContext;
-import org.hibernate.search.query.dsl.v2.TermContext;
import org.hibernate.search.query.dsl.v2.TermMatchingContext;
/**
@@ -15,13 +14,13 @@
private final SearchFactory factory;
private final Analyzer queryAnalyzer;
private final QueryCustomizer queryCustomizer;
- private final QueryContext context;
+ private final TermQueryContext context;
public ConnectedFuzzyContext(Analyzer queryAnalyzer, SearchFactory factory) {
this.factory = factory;
this.queryAnalyzer = queryAnalyzer;
this.queryCustomizer = new QueryCustomizer();
- this.context = new QueryContext( QueryContext.Approximation.FUZZY);
+ this.context = new TermQueryContext( TermQueryContext.Approximation.FUZZY);
}
public TermMatchingContext onField(String field) {
Added: search/trunk/hibernate-search/src/main/java/org/hibernate/search/query/dsl/v2/impl/ConnectedMultiFieldsRangeQueryBuilder.java
===================================================================
--- search/trunk/hibernate-search/src/main/java/org/hibernate/search/query/dsl/v2/impl/ConnectedMultiFieldsRangeQueryBuilder.java (rev 0)
+++ search/trunk/hibernate-search/src/main/java/org/hibernate/search/query/dsl/v2/impl/ConnectedMultiFieldsRangeQueryBuilder.java 2010-05-23 09:11:49 UTC (rev 19589)
@@ -0,0 +1,82 @@
+package org.hibernate.search.query.dsl.v2.impl;
+
+import java.io.IOException;
+import java.util.List;
+
+import org.apache.lucene.analysis.Analyzer;
+import org.apache.lucene.index.Term;
+import org.apache.lucene.search.BooleanClause;
+import org.apache.lucene.search.BooleanQuery;
+import org.apache.lucene.search.FuzzyQuery;
+import org.apache.lucene.search.Query;
+import org.apache.lucene.search.TermQuery;
+import org.apache.lucene.search.TermRangeQuery;
+import org.apache.lucene.search.WildcardQuery;
+
+import org.hibernate.annotations.common.AssertionFailure;
+import org.hibernate.search.SearchException;
+import org.hibernate.search.query.dsl.v2.RangeTerminationExcludable;
+
+/**
+ * @author Emmanuel Bernard
+ */
+public class ConnectedMultiFieldsRangeQueryBuilder implements RangeTerminationExcludable {
+ private final RangeQueryContext queryContext;
+ private final Analyzer queryAnalyzer;
+ private final QueryCustomizer queryCustomizer;
+ private final List<FieldContext> fieldContexts;
+
+ public ConnectedMultiFieldsRangeQueryBuilder(RangeQueryContext queryContext, Analyzer queryAnalyzer, QueryCustomizer queryCustomizer, List<FieldContext> fieldContexts) {
+ this.queryContext = queryContext;
+ this.queryAnalyzer = queryAnalyzer;
+ this.queryCustomizer = queryCustomizer;
+ this.fieldContexts = fieldContexts;
+ }
+
+ public RangeTerminationExcludable exclude() {
+ if ( queryContext.getFrom() != null && queryContext.getTo() != null ) {
+ queryContext.setExcludeTo( true );
+ }
+ else if ( queryContext.getFrom() != null ) {
+ queryContext.setExcludeTo( true );
+ }
+ else if ( queryContext.getTo() != null ) {
+ queryContext.setExcludeTo( true );
+ }
+ else {
+ throw new AssertionFailure( "Both from and to clause of a range query are null" );
+ }
+ return this;
+ }
+
+ public Query createQuery() {
+ final int size = fieldContexts.size();
+ if ( size == 1 ) {
+ return queryCustomizer.setWrappedQuery( createQuery( fieldContexts.get( 0 ) ) ).createQuery();
+ }
+ else {
+ BooleanQuery aggregatedFieldsQuery = new BooleanQuery( );
+ for ( FieldContext fieldContext : fieldContexts ) {
+ aggregatedFieldsQuery.add( createQuery( fieldContext ), BooleanClause.Occur.SHOULD );
+ }
+ return queryCustomizer.setWrappedQuery( aggregatedFieldsQuery ).createQuery();
+ }
+ }
+
+ public Query createQuery(FieldContext fieldContext) {
+ final Query perFieldQuery;
+ final String fieldName = fieldContext.getField();
+ final Object from = queryContext.getFrom();
+ final String lowerTerm = from == null ? null : Helper.getAnalyzedTerm( fieldName, from, "from", queryAnalyzer );
+ final Object to = queryContext.getTo();
+ final String upperTerm = to == null ? null : Helper.getAnalyzedTerm( fieldName, to, "to", queryAnalyzer );
+ perFieldQuery = new TermRangeQuery(
+ fieldName,
+ lowerTerm,
+ upperTerm,
+ queryContext.isExcludeFrom(),
+ queryContext.isExcludeTo()
+ );
+ return fieldContext.getFieldCustomizer().setWrappedQuery( perFieldQuery ).createQuery();
+ }
+}
Modified: search/trunk/hibernate-search/src/main/java/org/hibernate/search/query/dsl/v2/impl/ConnectedMultiFieldsTermQueryBuilder.java
===================================================================
--- search/trunk/hibernate-search/src/main/java/org/hibernate/search/query/dsl/v2/impl/ConnectedMultiFieldsTermQueryBuilder.java 2010-05-22 12:31:15 UTC (rev 19588)
+++ search/trunk/hibernate-search/src/main/java/org/hibernate/search/query/dsl/v2/impl/ConnectedMultiFieldsTermQueryBuilder.java 2010-05-23 09:11:49 UTC (rev 19589)
@@ -1,14 +1,10 @@
package org.hibernate.search.query.dsl.v2.impl;
import java.io.IOException;
-import java.io.Reader;
-import java.io.StringReader;
import java.util.ArrayList;
import java.util.List;
import org.apache.lucene.analysis.Analyzer;
-import org.apache.lucene.analysis.TokenStream;
-import org.apache.lucene.analysis.tokenattributes.TermAttribute;
import org.apache.lucene.index.Term;
import org.apache.lucene.search.BooleanClause;
import org.apache.lucene.search.BooleanQuery;
@@ -29,10 +25,10 @@
private final String text;
private final Analyzer queryAnalyzer;
private final QueryCustomizer queryCustomizer;
- private final QueryContext queryContext;
+ private final TermQueryContext queryContext;
private final List<FieldContext> fieldContexts;
- public ConnectedMultiFieldsTermQueryBuilder(QueryContext queryContext,
+ public ConnectedMultiFieldsTermQueryBuilder(TermQueryContext queryContext,
String text,
List<FieldContext> fieldContexts,
QueryCustomizer queryCustomizer,
@@ -80,8 +76,8 @@
}
else {
BooleanQuery booleanQuery = new BooleanQuery();
- for (String term : terms) {
- Query termQuery = createTermQuery(fieldContext, term);
+ for (String localTerm : terms) {
+ Query termQuery = createTermQuery(fieldContext, localTerm);
booleanQuery.add( termQuery, BooleanClause.Occur.SHOULD );
}
perFieldQuery = booleanQuery;
@@ -92,45 +88,34 @@
private Query createTermQuery(FieldContext fieldContext, String term) {
Query query;
+ final String fieldName = fieldContext.getField();
switch ( queryContext.getApproximation() ) {
case EXACT:
- query = new TermQuery( new Term( fieldContext.getField(), term ) );
+ query = new TermQuery( new Term( fieldName, term ) );
break;
case WILDCARD:
- query = new WildcardQuery( new Term( fieldContext.getField(), term ) );
+ query = new WildcardQuery( new Term( fieldName, term ) );
break;
case FUZZY:
query = new FuzzyQuery(
- new Term( fieldContext.getField(), term ),
+ new Term( fieldName, term ),
queryContext.getThreshold(),
queryContext.getPrefixLength() );
break;
default:
- throw new AssertionFailure( "Unknown approximation: " + queryContext.getApproximation());
+ throw new AssertionFailure( "Unknown approximation: " + queryContext.getApproximation() );
}
return query;
}
- private List<String> getAllTermsFromText(String fieldName, String text, Analyzer analyzer) throws IOException {
- //it's better not to apply the analyzer with windcards as * and ? can be mistakenly removed
+ private List<String> getAllTermsFromText(String fieldName, String localText, Analyzer analyzer) throws IOException {
+ //it's better not to apply the analyzer with wildcard as * and ? can be mistakenly removed
List<String> terms = new ArrayList<String>();
- if ( queryContext.getApproximation() == QueryContext.Approximation.WILDCARD ) {
- terms.add( text );
+ if ( queryContext.getApproximation() == TermQueryContext.Approximation.WILDCARD ) {
+ terms.add( localText );
}
else {
- Reader reader = new StringReader(text);
- TokenStream stream = analyzer.reusableTokenStream( fieldName, reader);
- TermAttribute attribute = (TermAttribute) stream.addAttribute( TermAttribute.class );
- stream.reset();
-
- while ( stream.incrementToken() ) {
- if ( attribute.termLength() > 0 ) {
- String term = attribute.term();
- terms.add( term );
- }
- }
- stream.end();
- stream.close();
+ terms = Helper.getAllTermsFromText( fieldName, localText, analyzer );
}
return terms;
}
Modified: search/trunk/hibernate-search/src/main/java/org/hibernate/search/query/dsl/v2/impl/ConnectedQueryBuilder.java
===================================================================
--- search/trunk/hibernate-search/src/main/java/org/hibernate/search/query/dsl/v2/impl/ConnectedQueryBuilder.java 2010-05-22 12:31:15 UTC (rev 19588)
+++ search/trunk/hibernate-search/src/main/java/org/hibernate/search/query/dsl/v2/impl/ConnectedQueryBuilder.java 2010-05-23 09:11:49 UTC (rev 19589)
@@ -7,6 +7,7 @@
import org.hibernate.search.query.dsl.v2.BooleanJunction;
import org.hibernate.search.query.dsl.v2.FuzzyContext;
import org.hibernate.search.query.dsl.v2.QueryBuilder;
+import org.hibernate.search.query.dsl.v2.RangeContext;
import org.hibernate.search.query.dsl.v2.TermContext;
import org.hibernate.search.query.dsl.v2.WildcardContext;
@@ -36,6 +37,10 @@
return new ConnectedWildcardContext(queryAnalyzer, factory);
}
+ public RangeContext range() {
+ return new ConnectedRangeContext( queryAnalyzer, factory );
+ }
+
//fixme Have to use raw types but would be nice to not have to
public BooleanJunction bool() {
return new BooleanQueryBuilder();
Added: search/trunk/hibernate-search/src/main/java/org/hibernate/search/query/dsl/v2/impl/ConnectedRangeContext.java
===================================================================
--- search/trunk/hibernate-search/src/main/java/org/hibernate/search/query/dsl/v2/impl/ConnectedRangeContext.java (rev 0)
+++ search/trunk/hibernate-search/src/main/java/org/hibernate/search/query/dsl/v2/impl/ConnectedRangeContext.java 2010-05-23 09:11:49 UTC (rev 19589)
@@ -0,0 +1,136 @@
+package org.hibernate.search.query.dsl.v2.impl;
+
+import org.apache.lucene.analysis.Analyzer;
+import org.apache.lucene.search.Filter;
+
+import org.hibernate.search.SearchFactory;
+import org.hibernate.search.query.dsl.v2.RangeContext;
+import org.hibernate.search.query.dsl.v2.RangeMatchingContext;
+
+/**
+ * @author Emmanuel Bernard
+ */
+class ConnectedRangeContext implements RangeContext {
+ private final SearchFactory factory;
+ private final Analyzer queryAnalyzer;
+ private final QueryCustomizer queryCustomizer;
+
+ public ConnectedRangeContext(Analyzer queryAnalyzer, SearchFactory factory) {
+ this.factory = factory;
+ this.queryAnalyzer = queryAnalyzer;
+ this.queryCustomizer = new QueryCustomizer();
+ }
+
+ public RangeMatchingContext onField(String fieldName) {
+ return new ConnectedRangeMatchingContext(fieldName, queryCustomizer, queryAnalyzer, factory);
+ }
+
+ public RangeContext boostedTo(float boost) {
+ queryCustomizer.boostedTo( boost );
+ return this;
+ }
+
+ public RangeContext constantScore() {
+ queryCustomizer.constantScore();
+ return this;
+ }
+
+ public RangeContext filter(Filter filter) {
+ queryCustomizer.filter(filter);
+ return this;
+ }
+
+
+//
+// public <T> FromRangeContext<T> from(T from) {
+// context.setFrom( from );
+// return new ConnectedFromRangeContext<T>(this);
+// }
+//
+//
+//
+// SearchFactory getFactory() {
+// return factory;
+// }
+//
+// Analyzer getQueryAnalyzer() {
+// return queryAnalyzer;
+// }
+//
+// QueryCustomizer getQueryCustomizer() {
+// return queryCustomizer;
+// }
+//
+// static class ConnectedFromRangeContext<T> implements FromRangeContext<T> {
+// private ConnectedRangeContext mother;
+//
+// public ConnectedFromRangeContext(ConnectedRangeContext mother) {
+// this.mother = mother;
+// }
+//
+// public ToRangeContext to(Object to) {
+// mother.getContext().setTo( to );
+// return new ConnectedToRangeContext(mother);
+// }
+//
+// public FromRangeContext<T> exclude() {
+// mother.getContext().setExcludeFrom( true );
+// return this;
+// }
+//
+// public FromRangeContext<T> boostedTo(float boost) {
+// mother.boostedTo( boost );
+// return this;
+// }
+//
+// public FromRangeContext<T> constantScore() {
+// mother.constantScore();
+// return this;
+// }
+//
+// public FromRangeContext<T> filter(Filter filter) {
+// mother.filter( filter );
+// return this;
+// }
+// }
+//
+// static class ConnectedToRangeContext implements ToRangeContext {
+// private ConnectedRangeContext mother;
+//
+// public ConnectedToRangeContext(ConnectedRangeContext mother) {
+// this.mother = mother;
+// }
+//
+// public TermMatchingContext onField(String field) {
+// return new ConnectedTermMatchingContext(
+// mother.getContext(),
+// field,
+// mother.getQueryCustomizer(),
+// mother.getQueryAnalyzer(),
+// mother.getFactory()
+// );
+// }
+//
+// public ToRangeContext exclude() {
+// mother.getContext().setExcludeTo( true );
+// return this;
+// }
+//
+// public ToRangeContext boostedTo(float boost) {
+// mother.boostedTo( boost );
+// return this;
+// }
+//
+// public ToRangeContext constantScore() {
+// mother.constantScore();
+// return this;
+// }
+//
+// public ToRangeContext filter(Filter filter) {
+// mother.filter( filter );
+// return this;
+// }
+// }
+
+
+}
Added: search/trunk/hibernate-search/src/main/java/org/hibernate/search/query/dsl/v2/impl/ConnectedRangeMatchingContext.java
===================================================================
--- search/trunk/hibernate-search/src/main/java/org/hibernate/search/query/dsl/v2/impl/ConnectedRangeMatchingContext.java (rev 0)
+++ search/trunk/hibernate-search/src/main/java/org/hibernate/search/query/dsl/v2/impl/ConnectedRangeMatchingContext.java 2010-05-23 09:11:49 UTC (rev 19589)
@@ -0,0 +1,97 @@
+package org.hibernate.search.query.dsl.v2.impl;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.apache.lucene.analysis.Analyzer;
+
+import org.hibernate.search.SearchFactory;
+import org.hibernate.search.query.dsl.v2.RangeMatchingContext;
+import org.hibernate.search.query.dsl.v2.RangeTerminationExcludable;
+
+/**
+ * @author Emmanuel Bernard
+ */
+public class ConnectedRangeMatchingContext implements RangeMatchingContext {
+ private final SearchFactory factory;
+ private final Analyzer queryAnalyzer;
+ private final QueryCustomizer queryCustomizer;
+ private final RangeQueryContext queryContext;
+ private final List<FieldContext> fieldContexts;
+ //when a varargs of fields are passed, apply the same customization for all.
+ //keep the index of the first context in this queue
+ private int firstOfContext = 0;
+
+ public ConnectedRangeMatchingContext(String fieldName,
+ QueryCustomizer queryCustomizer,
+ Analyzer queryAnalyzer,
+ SearchFactory factory) {
+ this.factory = factory;
+ this.queryAnalyzer = queryAnalyzer;
+ this.queryCustomizer = queryCustomizer;
+ this.queryContext = new RangeQueryContext();
+ this.fieldContexts = new ArrayList<FieldContext>(4);
+ this.fieldContexts.add( new FieldContext( fieldName ) );
+ }
+
+ public RangeMatchingContext andField(String field) {
+ this.fieldContexts.add( new FieldContext( field ) );
+ this.firstOfContext = fieldContexts.size() - 1;
+ return this;
+ }
+
+ public <T> FromRangeContext<T> from(T from) {
+ queryContext.setFrom( from );
+ return new ConnectedFromRangeContext<T>(this);
+ }
+
+ static class ConnectedFromRangeContext<T> implements FromRangeContext<T> {
+ private ConnectedRangeMatchingContext mother;
+
+ ConnectedFromRangeContext(ConnectedRangeMatchingContext mother) {
+ this.mother = mother;
+ }
+
+ public RangeTerminationExcludable to(T to) {
+ mother.queryContext.setTo(to);
+ return new ConnectedMultiFieldsRangeQueryBuilder(
+ mother.queryContext,
+ mother.queryAnalyzer,
+ mother.queryCustomizer,
+ mother.fieldContexts);
+ }
+
+ public FromRangeContext<T> exclude() {
+ mother.queryContext.setExcludeFrom( true );
+ return this;
+ }
+ }
+
+ public RangeTerminationExcludable below(Object below) {
+ queryContext.setTo( below );
+ return new ConnectedMultiFieldsRangeQueryBuilder(queryContext, queryAnalyzer, queryCustomizer, fieldContexts);
+ }
+
+ public RangeTerminationExcludable above(Object above) {
+ queryContext.setFrom( above );
+ return new ConnectedMultiFieldsRangeQueryBuilder(queryContext, queryAnalyzer, queryCustomizer, fieldContexts);
+ }
+
+ public RangeMatchingContext boostedTo(float boost) {
+ for ( FieldContext fieldContext : getCurrentFieldContexts() ) {
+ fieldContext.getFieldCustomizer().boostedTo( boost );
+ }
+ return this;
+ }
+
+ private List<FieldContext> getCurrentFieldContexts() {
+ return fieldContexts.subList( firstOfContext, fieldContexts.size() );
+ }
+
+ public RangeMatchingContext ignoreAnalyzer() {
+ for ( FieldContext fieldContext : getCurrentFieldContexts() ) {
+ fieldContext.setIgnoreAnalyzer( true );
+ }
+ return this;
+ }
+}
Modified: search/trunk/hibernate-search/src/main/java/org/hibernate/search/query/dsl/v2/impl/ConnectedTermContext.java
===================================================================
--- search/trunk/hibernate-search/src/main/java/org/hibernate/search/query/dsl/v2/impl/ConnectedTermContext.java 2010-05-22 12:31:15 UTC (rev 19588)
+++ search/trunk/hibernate-search/src/main/java/org/hibernate/search/query/dsl/v2/impl/ConnectedTermContext.java 2010-05-23 09:11:49 UTC (rev 19589)
@@ -14,13 +14,13 @@
private final SearchFactory factory;
private final Analyzer queryAnalyzer;
private final QueryCustomizer queryCustomizer;
- private final QueryContext context;
+ private final TermQueryContext context;
public ConnectedTermContext(Analyzer queryAnalyzer, SearchFactory factory) {
this.factory = factory;
this.queryAnalyzer = queryAnalyzer;
this.queryCustomizer = new QueryCustomizer();
- this.context = new QueryContext( QueryContext.Approximation.EXACT);
+ this.context = new TermQueryContext( TermQueryContext.Approximation.EXACT);
}
public TermMatchingContext onField(String field) {
Modified: search/trunk/hibernate-search/src/main/java/org/hibernate/search/query/dsl/v2/impl/ConnectedTermMatchingContext.java
===================================================================
--- search/trunk/hibernate-search/src/main/java/org/hibernate/search/query/dsl/v2/impl/ConnectedTermMatchingContext.java 2010-05-22 12:31:15 UTC (rev 19588)
+++ search/trunk/hibernate-search/src/main/java/org/hibernate/search/query/dsl/v2/impl/ConnectedTermMatchingContext.java 2010-05-23 09:11:49 UTC (rev 19589)
@@ -16,13 +16,13 @@
private final SearchFactory factory;
private final Analyzer queryAnalyzer;
private final QueryCustomizer queryCustomizer;
- private final QueryContext queryContext;
+ private final TermQueryContext queryContext;
private final List<FieldContext> fieldContexts;
//when a varargs of fields are passed, apply the same customization for all.
//keep the index of the first context in this queue
private int firstOfContext = 0;
- public ConnectedTermMatchingContext(QueryContext queryContext,
+ public ConnectedTermMatchingContext(TermQueryContext queryContext,
String field, QueryCustomizer queryCustomizer, Analyzer queryAnalyzer, SearchFactory factory) {
this.factory = factory;
this.queryAnalyzer = queryAnalyzer;
@@ -32,7 +32,7 @@
this.fieldContexts.add( new FieldContext( field ) );
}
- public ConnectedTermMatchingContext(QueryContext queryContext,
+ public ConnectedTermMatchingContext(TermQueryContext queryContext,
String[] fields, QueryCustomizer queryCustomizer, Analyzer queryAnalyzer, SearchFactory factory) {
this.factory = factory;
this.queryAnalyzer = queryAnalyzer;
Modified: search/trunk/hibernate-search/src/main/java/org/hibernate/search/query/dsl/v2/impl/ConnectedWildcardContext.java
===================================================================
--- search/trunk/hibernate-search/src/main/java/org/hibernate/search/query/dsl/v2/impl/ConnectedWildcardContext.java 2010-05-22 12:31:15 UTC (rev 19588)
+++ search/trunk/hibernate-search/src/main/java/org/hibernate/search/query/dsl/v2/impl/ConnectedWildcardContext.java 2010-05-23 09:11:49 UTC (rev 19589)
@@ -4,7 +4,6 @@
import org.apache.lucene.search.Filter;
import org.hibernate.search.SearchFactory;
-import org.hibernate.search.query.dsl.v2.TermContext;
import org.hibernate.search.query.dsl.v2.TermMatchingContext;
import org.hibernate.search.query.dsl.v2.WildcardContext;
@@ -15,13 +14,13 @@
private final SearchFactory factory;
private final Analyzer queryAnalyzer;
private final QueryCustomizer queryCustomizer;
- private final QueryContext context;
+ private final TermQueryContext context;
public ConnectedWildcardContext(Analyzer queryAnalyzer, SearchFactory factory) {
this.factory = factory;
this.queryAnalyzer = queryAnalyzer;
this.queryCustomizer = new QueryCustomizer();
- this.context = new QueryContext( QueryContext.Approximation.WILDCARD);
+ this.context = new TermQueryContext( TermQueryContext.Approximation.WILDCARD);
}
public TermMatchingContext onField(String field) {
Added: search/trunk/hibernate-search/src/main/java/org/hibernate/search/query/dsl/v2/impl/Helper.java
===================================================================
--- search/trunk/hibernate-search/src/main/java/org/hibernate/search/query/dsl/v2/impl/Helper.java (rev 0)
+++ search/trunk/hibernate-search/src/main/java/org/hibernate/search/query/dsl/v2/impl/Helper.java 2010-05-23 09:11:49 UTC (rev 19589)
@@ -0,0 +1,57 @@
+package org.hibernate.search.query.dsl.v2.impl;
+
+import java.io.IOException;
+import java.io.Reader;
+import java.io.StringReader;
+import java.util.ArrayList;
+import java.util.List;
+
+import org.apache.lucene.analysis.Analyzer;
+import org.apache.lucene.analysis.TokenStream;
+import org.apache.lucene.analysis.tokenattributes.TermAttribute;
+
+import org.hibernate.annotations.common.AssertionFailure;
+import org.hibernate.search.SearchException;
+
+/**
+ * @author Emmanuel Bernard
+ */
+class Helper {
+ /**
+ * return the analyzed value for a given field. If several terms are created, an exception is raised.
+ */
+ static String getAnalyzedTerm(String fieldName, Object value, String name, Analyzer queryAnalyzer) {
+ try {
+ final List<String> termsFromText = getAllTermsFromText(
+ fieldName, value.toString(), queryAnalyzer
+ );
+ if (termsFromText.size() > 1) {
+ throw new SearchException( "The " + name + " parameter leads to several terms when analyzed");
+ }
+ return termsFromText.size() == 0 ? null : termsFromText.get( 0 );
+ }
+ catch ( IOException e ) {
+ throw new AssertionFailure("IO exception while reading String stream??", e);
+ }
+ }
+
+ static List<String> getAllTermsFromText(String fieldName, String localText, Analyzer analyzer) throws IOException {
+ //it's better not to apply the analyzer with wildcard as * and ? can be mistakenly removed
+ List<String> terms = new ArrayList<String>();
+
+ Reader reader = new StringReader(localText);
+ TokenStream stream = analyzer.reusableTokenStream( fieldName, reader);
+ TermAttribute attribute = (TermAttribute) stream.addAttribute( TermAttribute.class );
+ stream.reset();
+
+ while ( stream.incrementToken() ) {
+ if ( attribute.termLength() > 0 ) {
+ String term = attribute.term();
+ terms.add( term );
+ }
+ }
+ stream.end();
+ stream.close();
+ return terms;
+ }
+}
Deleted: search/trunk/hibernate-search/src/main/java/org/hibernate/search/query/dsl/v2/impl/QueryContext.java
===================================================================
--- search/trunk/hibernate-search/src/main/java/org/hibernate/search/query/dsl/v2/impl/QueryContext.java 2010-05-22 12:31:15 UTC (rev 19588)
+++ search/trunk/hibernate-search/src/main/java/org/hibernate/search/query/dsl/v2/impl/QueryContext.java 2010-05-23 09:11:49 UTC (rev 19589)
@@ -1,40 +0,0 @@
-package org.hibernate.search.query.dsl.v2.impl;
-
-/**
-* @author Emmanuel Bernard
-*/
-public class QueryContext {
- private final Approximation approximation;
- private float threshold = .5f;
- private int prefixLength = 0;
-
- public QueryContext(Approximation approximation) {
- this.approximation = approximation;
- }
-
- public void setThreshold(float threshold) {
- this.threshold = threshold;
- }
-
- public void setPrefixLength(int prefixLength) {
- this.prefixLength = prefixLength;
- }
-
- public Approximation getApproximation() {
- return approximation;
- }
-
- public float getThreshold() {
- return threshold;
- }
-
- public int getPrefixLength() {
- return prefixLength;
- }
-
- public static enum Approximation {
- EXACT,
- WILDCARD,
- FUZZY
- }
-}
Added: search/trunk/hibernate-search/src/main/java/org/hibernate/search/query/dsl/v2/impl/RangeQueryContext.java
===================================================================
--- search/trunk/hibernate-search/src/main/java/org/hibernate/search/query/dsl/v2/impl/RangeQueryContext.java (rev 0)
+++ search/trunk/hibernate-search/src/main/java/org/hibernate/search/query/dsl/v2/impl/RangeQueryContext.java 2010-05-23 09:11:49 UTC (rev 19589)
@@ -0,0 +1,44 @@
+package org.hibernate.search.query.dsl.v2.impl;
+
+/**
+ * @author Emmanuel Bernard
+ */
+public class RangeQueryContext {
+ //RANGE
+ private Object from;
+ private Object to;
+ private boolean excludeFrom;
+ private boolean excludeTo;
+
+ public Object getFrom() {
+ return from;
+ }
+
+ public void setFrom(Object from) {
+ this.from = from;
+ }
+
+ public Object getTo() {
+ return to;
+ }
+
+ public void setTo(Object to) {
+ this.to = to;
+ }
+
+ public boolean isExcludeFrom() {
+ return excludeFrom;
+ }
+
+ public void setExcludeFrom(boolean excludeFrom) {
+ this.excludeFrom = excludeFrom;
+ }
+
+ public boolean isExcludeTo() {
+ return excludeTo;
+ }
+
+ public void setExcludeTo(boolean excludeTo) {
+ this.excludeTo = excludeTo;
+ }
+}
Copied: search/trunk/hibernate-search/src/main/java/org/hibernate/search/query/dsl/v2/impl/TermQueryContext.java (from rev 19569, search/trunk/hibernate-search/src/main/java/org/hibernate/search/query/dsl/v2/impl/QueryContext.java)
===================================================================
--- search/trunk/hibernate-search/src/main/java/org/hibernate/search/query/dsl/v2/impl/TermQueryContext.java (rev 0)
+++ search/trunk/hibernate-search/src/main/java/org/hibernate/search/query/dsl/v2/impl/TermQueryContext.java 2010-05-23 09:11:49 UTC (rev 19589)
@@ -0,0 +1,43 @@
+package org.hibernate.search.query.dsl.v2.impl;
+
+/**
+* @author Emmanuel Bernard
+*/
+class TermQueryContext {
+ private final Approximation approximation;
+ //FUZZY
+ private float threshold = .5f;
+
+ //WILDCARD
+ private int prefixLength = 0;
+
+ public TermQueryContext(Approximation approximation) {
+ this.approximation = approximation;
+ }
+
+ public void setThreshold(float threshold) {
+ this.threshold = threshold;
+ }
+
+ public void setPrefixLength(int prefixLength) {
+ this.prefixLength = prefixLength;
+ }
+
+ public Approximation getApproximation() {
+ return approximation;
+ }
+
+ public float getThreshold() {
+ return threshold;
+ }
+
+ public int getPrefixLength() {
+ return prefixLength;
+ }
+
+ public static enum Approximation {
+ EXACT,
+ WILDCARD,
+ FUZZY
+ }
+}
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-05-22 12:31:15 UTC (rev 19588)
+++ search/trunk/hibernate-search/src/test/java/org/hibernate/search/test/query/dsl/DSLTest.java 2010-05-23 09:11:49 UTC (rev 19589)
@@ -1,6 +1,11 @@
package org.hibernate.search.test.query.dsl;
+import java.text.Format;
+import java.text.SimpleDateFormat;
+import java.util.Calendar;
+import java.util.Date;
import java.util.List;
+import java.util.TimeZone;
import org.apache.lucene.search.Query;
import org.apache.solr.analysis.LowerCaseFilterFactory;
@@ -14,6 +19,7 @@
import org.hibernate.Transaction;
import org.hibernate.cfg.Configuration;
import org.hibernate.search.Environment;
+import org.hibernate.search.FullTextQuery;
import org.hibernate.search.FullTextSession;
import org.hibernate.search.Search;
import org.hibernate.search.annotations.Factory;
@@ -237,7 +243,60 @@
cleanData( fts );
}
+ public void testRangeQuery() throws Exception {
+ FullTextSession fts = initData();
+ Transaction transaction = fts.beginTransaction();
+ final QueryBuilder monthQb = fts.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);
+ Date from = calendar.getTime();
+ calendar.set(10 + 1900, 2, 12, 0, 0, 0);
+ Date to = calendar.getTime();
+ final SimpleDateFormat dateFormat = new SimpleDateFormat( "yyyyMMdd" );
+
+ Query
+
+ query = monthQb.
+ range()
+ .onField( "estimatedCreation" )
+ .andField( "justfortest" )
+ .from( dateFormat.format( from ) )
+ .to( dateFormat.format( to ) ).exclude()
+ .createQuery();
+
+ assertEquals( 1, fts.createFullTextQuery( query, Month.class ).getResultSize() );
+
+ query = monthQb.
+ range()
+ .onField( "estimatedCreation" )
+ .andField( "justfortest" )
+ .below( dateFormat.format( to ) )
+ .createQuery();
+
+ FullTextQuery hibQuery = fts.createFullTextQuery( query, Month.class );
+ assertEquals( 1, hibQuery.getResultSize() );
+ assertEquals( "January", ( (Month) hibQuery.list().get( 0 ) ).getName() );
+
+ query = monthQb.
+ range()
+ .onField( "estimatedCreation" )
+ .andField( "justfortest" )
+ .above( dateFormat.format( to ) )
+ .createQuery();
+ hibQuery = fts.createFullTextQuery( query, Month.class );
+ assertEquals( 1, hibQuery.getResultSize() );
+ assertEquals( "February", ( (Month) hibQuery.list().get( 0 ) ).getName() );
+
+ transaction.commit();
+
+ cleanData( fts );
+ }
+
+
// public void testTermQueryOnAnalyzer() throws Exception {
// FullTextSession fts = initData();
//
@@ -363,8 +422,20 @@
Session session = openSession();
FullTextSession fts = Search.getFullTextSession( session );
Transaction tx = fts.beginTransaction();
- fts.persist( new Month("January", "Month of colder and whitening", "Historically colder than any other month in the northern hemisphere") );
- fts.persist( new Month("February", "Month of snowboarding", "Historically, the month where we make babies while watching the whitening landscape") );
+ final Calendar calendar = Calendar.getInstance();
+ calendar.setTimeZone( TimeZone.getTimeZone( "UTC" ) );
+ calendar.set(0 + 1900, 2, 12, 0, 0, 0);
+ fts.persist( new Month(
+ "January",
+ "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",
+ "Month of snowboarding",
+ "Historically, the month where we make babies while watching the whitening landscape",
+ calendar.getTime() ) );
tx.commit();
fts.clear();
return fts;
Modified: search/trunk/hibernate-search/src/test/java/org/hibernate/search/test/query/dsl/Month.java
===================================================================
--- search/trunk/hibernate-search/src/test/java/org/hibernate/search/test/query/dsl/Month.java 2010-05-22 12:31:15 UTC (rev 19588)
+++ search/trunk/hibernate-search/src/test/java/org/hibernate/search/test/query/dsl/Month.java 2010-05-23 09:11:49 UTC (rev 19589)
@@ -1,13 +1,17 @@
package org.hibernate.search.test.query.dsl;
+import java.util.Date;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import org.hibernate.search.annotations.Analyzer;
+import org.hibernate.search.annotations.DateBridge;
import org.hibernate.search.annotations.Field;
import org.hibernate.search.annotations.Fields;
+import org.hibernate.search.annotations.Index;
import org.hibernate.search.annotations.Indexed;
+import org.hibernate.search.annotations.Resolution;
/**
* @author Emmanuel Bernard
@@ -17,10 +21,11 @@
public class Month {
public Month() {}
- public Month(String name, String mythology, String history) {
+ public Month(String name, String mythology, String history, Date estimatedCreation) {
this.name = name;
this.mythology = mythology;
this.history = history;
+ this.estimatedCreation = estimatedCreation;
}
@Id @GeneratedValue
@@ -47,5 +52,10 @@
public void setHistory(String history) { this.history = history; }
private String history;
+ @Field(index = Index.UN_TOKENIZED) @DateBridge(resolution = Resolution.MINUTE)
+ public Date getEstimatedCreation() { return estimatedCreation; }
+ public void setEstimatedCreation(Date estimatedCreation) { this.estimatedCreation = estimatedCreation; }
+ private Date estimatedCreation;
+
}
14 years, 7 months