Hibernate SVN: r18075 - in search/trunk: src/main/java/org/hibernate/search/batchindexing and 1 other directories.
by hibernate-commits@lists.jboss.org
Author: epbernard
Date: 2009-11-27 11:44:34 -0500 (Fri, 27 Nov 2009)
New Revision: 18075
Modified:
search/trunk/pom.xml
search/trunk/src/main/java/org/hibernate/search/batchindexing/IdentifierProducer.java
search/trunk/src/main/java/org/hibernate/search/jpa/impl/FullTextEntityManagerImpl.java
search/trunk/src/main/java/org/hibernate/search/jpa/impl/FullTextQueryImpl.java
Log:
HSEARCH-423 Migrate to Hibernate Core 3.5 beta2 and JPA 2.0 CR1
Modified: search/trunk/pom.xml
===================================================================
--- search/trunk/pom.xml 2009-11-26 20:41:04 UTC (rev 18074)
+++ search/trunk/pom.xml 2009-11-27 16:44:34 UTC (rev 18075)
@@ -53,7 +53,7 @@
<properties>
<slf4jVersion>1.5.8</slf4jVersion>
<luceneVersion>2.4.1</luceneVersion>
- <hibernateVersion>3.5.0.Beta-1</hibernateVersion>
+ <hibernateVersion>3.5.0-Beta-2</hibernateVersion>
<hibernateCommonsAnnotationVersion>3.2.0.Beta1</hibernateCommonsAnnotationVersion>
</properties>
@@ -79,7 +79,7 @@
<dependency>
<groupId>org.hibernate.java-persistence</groupId>
<artifactId>jpa-api</artifactId>
- <version>2.0.Beta-20090815</version>
+ <version>2.0-cr-1</version>
</dependency>
<dependency>
<groupId>org.apache.lucene</groupId>
Modified: search/trunk/src/main/java/org/hibernate/search/batchindexing/IdentifierProducer.java
===================================================================
--- search/trunk/src/main/java/org/hibernate/search/batchindexing/IdentifierProducer.java 2009-11-26 20:41:04 UTC (rev 18074)
+++ search/trunk/src/main/java/org/hibernate/search/batchindexing/IdentifierProducer.java 2009-11-27 16:44:34 UTC (rev 18075)
@@ -111,14 +111,14 @@
}
private void loadAllIdentifiers(final StatelessSession session) throws InterruptedException {
- Integer totalCount = (Integer) session
+ Long totalCount = (Long) session
.createCriteria( indexedType )
.setProjection( Projections.count( "id" ) )
.setCacheable( false )
.uniqueResult();
if ( objectsLimit != 0 && objectsLimit < totalCount.intValue() ) {
- totalCount = objectsLimit;
+ totalCount = new Long(objectsLimit);
}
log.debug( "going to fetch {} primary keys", totalCount);
monitor.addToTotalCount( totalCount );
Modified: search/trunk/src/main/java/org/hibernate/search/jpa/impl/FullTextEntityManagerImpl.java
===================================================================
--- search/trunk/src/main/java/org/hibernate/search/jpa/impl/FullTextEntityManagerImpl.java 2009-11-26 20:41:04 UTC (rev 18074)
+++ search/trunk/src/main/java/org/hibernate/search/jpa/impl/FullTextEntityManagerImpl.java 2009-11-27 16:44:34 UTC (rev 18075)
@@ -36,7 +36,7 @@
import javax.persistence.TypedQuery;
import javax.persistence.metamodel.Metamodel;
import javax.persistence.criteria.CriteriaQuery;
-import javax.persistence.criteria.QueryBuilder;
+import javax.persistence.criteria.CriteriaBuilder;
import org.hibernate.search.jpa.FullTextEntityManager;
import org.hibernate.search.jpa.FullTextQuery;
@@ -212,10 +212,6 @@
return null; //To change body of implemented methods use File | Settings | File Templates.
}
- public Set<String> getSupportedProperties() {
- return null; //To change body of implemented methods use File | Settings | File Templates.
- }
-
public Query createQuery(String ejbqlString) {
return em.createQuery( ejbqlString );
}
@@ -276,7 +272,7 @@
return null; //To change body of implemented methods use File | Settings | File Templates.
}
- public QueryBuilder getQueryBuilder() {
+ public CriteriaBuilder getCriteriaBuilder() {
return null; //To change body of implemented methods use File | Settings | File Templates.
}
@@ -284,6 +280,7 @@
return null; //To change body of implemented methods use File | Settings | File Templates.
}
+
public MassIndexer createIndexer(Class<?>... types) {
return getFullTextSession().createIndexer( types );
}
Modified: search/trunk/src/main/java/org/hibernate/search/jpa/impl/FullTextQueryImpl.java
===================================================================
--- search/trunk/src/main/java/org/hibernate/search/jpa/impl/FullTextQueryImpl.java 2009-11-26 20:41:04 UTC (rev 18074)
+++ search/trunk/src/main/java/org/hibernate/search/jpa/impl/FullTextQueryImpl.java 2009-11-27 16:44:34 UTC (rev 18075)
@@ -278,6 +278,18 @@
return null; //To change body of implemented methods use File | Settings | File Templates.
}
+ public <T> Query setParameter(Parameter<T> tParameter, T t) {
+ return null; //To change body of implemented methods use File | Settings | File Templates.
+ }
+
+ public Query setParameter(Parameter<Calendar> calendarParameter, Calendar calendar, TemporalType temporalType) {
+ return null; //To change body of implemented methods use File | Settings | File Templates.
+ }
+
+ public Query setParameter(Parameter<Date> dateParameter, Date date, TemporalType temporalType) {
+ return null; //To change body of implemented methods use File | Settings | File Templates.
+ }
+
public Set<String> getSupportedHints() {
return null; //To change body of implemented methods use File | Settings | File Templates.
}
15 years
Hibernate SVN: r18074 - core/branches/Branch_3_2_4_SP1_CP.
by hibernate-commits@lists.jboss.org
Author: stliu
Date: 2009-11-26 15:41:04 -0500 (Thu, 26 Nov 2009)
New Revision: 18074
Modified:
core/branches/Branch_3_2_4_SP1_CP/build.xml
Log:
JBPAPP-3170 update build.xml in hibernate-core (branch_3_2_4_SP1_CP)
Modified: core/branches/Branch_3_2_4_SP1_CP/build.xml
===================================================================
--- core/branches/Branch_3_2_4_SP1_CP/build.xml 2009-11-26 20:29:18 UTC (rev 18073)
+++ core/branches/Branch_3_2_4_SP1_CP/build.xml 2009-11-26 20:41:04 UTC (rev 18074)
@@ -38,7 +38,6 @@
<property name="dir.jdbc" value="jdbc" />
<property name="dir.doc" value="doc"/>
<property name="dir.doc.api" value="${dir.doc}/api"/>
- <property name="dir.doc.ref" value="${dir.doc}/reference"/>
<property name="dir.eg" value="eg"/>
<property name="dir.props" value="${dir.etc}" />
@@ -51,8 +50,6 @@
<property name="dir.out.junit" value="${dir.build}/testout" />
<property name="dir.out.junit-reports" value="${dir.build}/test-reports" />
<property name="dir.out.perf-test" value="${dir.build}/testout-perf" />
- <property name="dir.out.clover" value="${dir.build}/cloverout" />
- <property name="dir.out.dist" value="${dir.build}/cloverout" />
<property name="dir.out.db" value="${dir.build}/db" />
<property name="dir.out.doc" value="${dir.build}/doc" />
<property name="dir.out.eg" value="${dir.build}/eg" />
@@ -65,7 +62,6 @@
<property name="javac.target" value="1.5"/>
<property name="javac.source" value="1.4"/>
<property name="jar.driver" value="${dir.jdbc}/hsqldb.jar"/>
- <property name="jar.clover" value="${ant.home}/lib/clover.jar"/>
<!-- JAR and dist file names -->
<property name="jar.name" value="${name2}"/>
@@ -143,9 +139,6 @@
<classpath refid="path.lib"/>
</taskdef>
- <taskdef resource="clovertasks"/>
-
-
<!-- ################################################################## -->
<!-- ############################ Targets ############################# -->
<!-- ################################################################## -->
@@ -341,7 +334,6 @@
<pathelement path="${dir.out.classes}"/>
<pathelement path="${dir.out.test-classes}"/>
<pathelement path="${dir.props}"/>
- <pathelement path="${jar.clover}"/>
</classpath>
<formatter type="plain"/>
<formatter type="xml"/>
@@ -369,7 +361,6 @@
<pathelement path="${dir.out.classes}"/>
<pathelement path="${dir.out.test-classes}"/>
<pathelement path="${dir.props}"/>
- <pathelement path="${jar.clover}"/>
</classpath>
<formatter type="plain"/>
<formatter type="xml"/>
@@ -391,7 +382,6 @@
<pathelement path="${dir.out.classes}"/>
<pathelement path="${dir.out.test-classes}"/>
<pathelement path="${dir.props}"/>
- <pathelement path="${jar.clover}"/>
</classpath>
<formatter type="plain"/>
<formatter type="xml"/>
@@ -414,7 +404,6 @@
<pathelement path="${dir.out.classes}"/>
<pathelement path="${dir.out.test-classes}"/>
<pathelement path="${dir.props}"/>
- <pathelement path="${jar.clover}"/>
</classpath>
<formatter type="plain"/>
<formatter type="xml"/>
@@ -433,17 +422,16 @@
<pathelement path="${dir.out.classes}"/>
<pathelement path="${dir.out.test-classes}"/>
<pathelement path="${dir.props}"/>
- <pathelement path="${jar.clover}"/>
</classpath>
<formatter type="plain"/>
- <test name="org.hibernate.test.NewPerformanceTest" todir="${dir.out.perf-test}" haltonfailure="no"/>
- <test name="org.hibernate.test.NewerPerformanceTest" todir="${dir.out.perf-test}" haltonfailure="no"/>
- <test name="org.hibernate.test.PerformanceTest" todir="${dir.out.perf-test}" haltonfailure="no"/>
+ <test name="org.hibernate.test.legacy.NewPerformanceTest" todir="${dir.out.perf-test}" haltonfailure="no"/>
+ <test name="org.hibernate.test.legacy.NewerPerformanceTest" todir="${dir.out.perf-test}" haltonfailure="no"/>
+ <test name="org.hibernate.test.legacy.PerformanceTest" todir="${dir.out.perf-test}" haltonfailure="no"/>
</junit>
</target>
<target name="eg" depends="prepare-dist" description="Compile and run the simple example">
- <!-- works only in distribution, not in CVS tree; see 'eg.inline' target -->
+ <!-- works only in distribution, not in SVN tree; see 'eg.inline' target -->
<mkdir dir="${dir.out.eg}" />
<available classname="org.eclipse.core.launcher.Main"
@@ -718,13 +706,16 @@
<exclude name="oscache.properties" />
</zipfileset>
<zipfileset prefix="${name}-${version.major_minor}-src" file="${basedir}/hibernate_logo.gif" />
+ <zipfileset prefix="${name}-${version.major_minor}-src" file="${basedir}/lgpl.txt" />
+ <zipfileset prefix="${name}-${version.major_minor}-src" file="${basedir}/JBossORG-EULA.txt" />
+ <zipfileset prefix="${name}-${version.major_minor}-src" file="${basedir}/readme.txt" />
</zip>
<checksum file="${dir.dist}/${fullname}-src.zip" algorithm="MD5" fileext=".md5.txt"/>
<delete file="${dir.dist}/build.xml"/>
</target>
- <target name="dist.complete" depends="init,versioncheck,jar,javadoc,refdoc,antlr.bnf"
+ <target name="dist.complete" depends="init,versioncheck,jar,javadoc,antlr.bnf"
description="Build and package everything, and run test suite and eg example">
<!-- perform a call to the junit target -->
@@ -770,11 +761,6 @@
<copy file="${dir.doc.api}/package.html" todir="${dir.out.doc}/api"/>
</target>
- <target name="refdoc" depends="splash" description="Generate and copy reference documentation">
- <ant dir="${dir.doc.ref}" inheritall="false" target="all.doc"/>
- </target>
-
-
<!-- miscellaneous targets -->
<target name="checkstyle" description="Check coding style">
@@ -782,29 +768,14 @@
<classpath refid="path.lib"/>
</taskdef>
<checkstyle config="checkstyle_checks.xml">
- <fileset dir="${src.dir}">
+ <fileset dir="${dir.src}">
<include name="**/*.java"/>
</fileset>
<formatter type="plain"/>
</checkstyle>
</target>
- <target name="with.clover">
- <clover-setup initString="clover_coverage.db"/>
- </target>
- <target name="cloverreport.html" depends="with.clover" description="Generate a clover report from the current clover database.">
- <clover-report>
- <current outfile="${clover.out.dir}">
- <format type="html"/>
- </current>
- </clover-report>
- </target>
-
- <target name="cloverreport"
- depends="with.clover,junitreport,cloverreport.html"
- description="Run the tests and generate a clover report" />
-
<target name="prepare-dir-up" depends="jar">
<!-- for backwards compatibility with where the tools expect to find the jar and libs -->
<property name="targetdir" value="../${name}-${version.major_minor}"/>
15 years
Hibernate SVN: r18073 - core/branches/Branch_3_2_4_SP1_CP/doc/api.
by hibernate-commits@lists.jboss.org
Author: stliu
Date: 2009-11-26 15:29:18 -0500 (Thu, 26 Nov 2009)
New Revision: 18073
Modified:
core/branches/Branch_3_2_4_SP1_CP/doc/api/package.html
Log:
JBPAPP-3169 update hibernate core javadoc
Modified: core/branches/Branch_3_2_4_SP1_CP/doc/api/package.html
===================================================================
--- core/branches/Branch_3_2_4_SP1_CP/doc/api/package.html 2009-11-26 20:28:45 UTC (rev 18072)
+++ core/branches/Branch_3_2_4_SP1_CP/doc/api/package.html 2009-11-26 20:29:18 UTC (rev 18073)
@@ -33,7 +33,4 @@
@see org.hibernate.Criteria
@see org.hibernate.ScrollableResults
@see org.hibernate.cfg.Configuration
-@see org.hibernate.expression.Expression
-@see org.hibernate.expression.Order
-@see org.hibernate.expression.Example
</body>
15 years
Hibernate SVN: r18072 - in core/branches/Branch_3_2_4_SP1_CP/src/org/hibernate: bytecode and 16 other directories.
by hibernate-commits@lists.jboss.org
Author: stliu
Date: 2009-11-26 15:28:45 -0500 (Thu, 26 Nov 2009)
New Revision: 18072
Modified:
core/branches/Branch_3_2_4_SP1_CP/src/org/hibernate/CallbackException.java
core/branches/Branch_3_2_4_SP1_CP/src/org/hibernate/SessionFactory.java
core/branches/Branch_3_2_4_SP1_CP/src/org/hibernate/bytecode/cglib/AccessOptimizerAdapter.java
core/branches/Branch_3_2_4_SP1_CP/src/org/hibernate/bytecode/cglib/InstantiationOptimizerAdapter.java
core/branches/Branch_3_2_4_SP1_CP/src/org/hibernate/bytecode/javassist/AccessOptimizerAdapter.java
core/branches/Branch_3_2_4_SP1_CP/src/org/hibernate/bytecode/javassist/InstantiationOptimizerAdapter.java
core/branches/Branch_3_2_4_SP1_CP/src/org/hibernate/bytecode/package.html
core/branches/Branch_3_2_4_SP1_CP/src/org/hibernate/bytecode/util/ByteCodeHelper.java
core/branches/Branch_3_2_4_SP1_CP/src/org/hibernate/cache/OSCacheProvider.java
core/branches/Branch_3_2_4_SP1_CP/src/org/hibernate/cache/OptimisticTreeCacheProvider.java
core/branches/Branch_3_2_4_SP1_CP/src/org/hibernate/cache/TreeCacheProvider.java
core/branches/Branch_3_2_4_SP1_CP/src/org/hibernate/connection/ConnectionProvider.java
core/branches/Branch_3_2_4_SP1_CP/src/org/hibernate/connection/ConnectionProviderFactory.java
core/branches/Branch_3_2_4_SP1_CP/src/org/hibernate/criterion/Criterion.java
core/branches/Branch_3_2_4_SP1_CP/src/org/hibernate/criterion/Restrictions.java
core/branches/Branch_3_2_4_SP1_CP/src/org/hibernate/criterion/Subqueries.java
core/branches/Branch_3_2_4_SP1_CP/src/org/hibernate/dialect/Oracle9Dialect.java
core/branches/Branch_3_2_4_SP1_CP/src/org/hibernate/dialect/Oracle9iDialect.java
core/branches/Branch_3_2_4_SP1_CP/src/org/hibernate/engine/loading/EntityLoadContext.java
core/branches/Branch_3_2_4_SP1_CP/src/org/hibernate/engine/loading/LoadContexts.java
core/branches/Branch_3_2_4_SP1_CP/src/org/hibernate/event/LoadEventListener.java
core/branches/Branch_3_2_4_SP1_CP/src/org/hibernate/exception/ExceptionUtils.java
core/branches/Branch_3_2_4_SP1_CP/src/org/hibernate/exception/SQLExceptionConverter.java
core/branches/Branch_3_2_4_SP1_CP/src/org/hibernate/exception/SQLExceptionConverterFactory.java
core/branches/Branch_3_2_4_SP1_CP/src/org/hibernate/hql/ast/util/LiteralProcessor.java
core/branches/Branch_3_2_4_SP1_CP/src/org/hibernate/loader/DefaultEntityAliases.java
core/branches/Branch_3_2_4_SP1_CP/src/org/hibernate/mapping/ForeignKey.java
core/branches/Branch_3_2_4_SP1_CP/src/org/hibernate/persister/entity/Queryable.java
core/branches/Branch_3_2_4_SP1_CP/src/org/hibernate/sql/InFragment.java
core/branches/Branch_3_2_4_SP1_CP/src/org/hibernate/type/Type.java
Log:
JBPAPP-3169 update hibernate core javadoc
Modified: core/branches/Branch_3_2_4_SP1_CP/src/org/hibernate/CallbackException.java
===================================================================
--- core/branches/Branch_3_2_4_SP1_CP/src/org/hibernate/CallbackException.java 2009-11-26 08:02:23 UTC (rev 18071)
+++ core/branches/Branch_3_2_4_SP1_CP/src/org/hibernate/CallbackException.java 2009-11-26 20:28:45 UTC (rev 18072)
@@ -6,8 +6,8 @@
* Should be thrown by persistent objects from <tt>Lifecycle</tt>
* or <tt>Interceptor</tt> callbacks.
*
- * @see Lifecycle
- * @see Interceptor
+ * @see org.hibernate.classic.Lifecycle
+ * @see org.hibernate.Interceptor
* @author Gavin King
*/
Modified: core/branches/Branch_3_2_4_SP1_CP/src/org/hibernate/SessionFactory.java
===================================================================
--- core/branches/Branch_3_2_4_SP1_CP/src/org/hibernate/SessionFactory.java 2009-11-26 08:02:23 UTC (rev 18071)
+++ core/branches/Branch_3_2_4_SP1_CP/src/org/hibernate/SessionFactory.java 2009-11-26 20:28:45 UTC (rev 18072)
@@ -14,12 +14,12 @@
import org.hibernate.engine.FilterDefinition;
/**
- * Creates <tt>Session</tt>s. Usually an application has a single <tt>SessionFactory</tt>.
+ * Creates <tt>Sessions</tt>. Usually an application has a single <tt>SessionFactory</tt>.
* Threads servicing client requests obtain <tt>Session</tt>s from the factory.<br>
* <br>
* Implementors must be threadsafe.<br>
* <br>
- * <tt>SessionFactory</tt>s are immutable. The behaviour of a <tt>SessionFactory</tt> is
+ * <tt>SessionFactorys</tt> are immutable. The behavior of a <tt>SessionFactory</tt> is
* controlled by properties supplied at configuration time. These properties are defined
* on <tt>Environment</tt>.
*
Modified: core/branches/Branch_3_2_4_SP1_CP/src/org/hibernate/bytecode/cglib/AccessOptimizerAdapter.java
===================================================================
--- core/branches/Branch_3_2_4_SP1_CP/src/org/hibernate/bytecode/cglib/AccessOptimizerAdapter.java 2009-11-26 08:02:23 UTC (rev 18071)
+++ core/branches/Branch_3_2_4_SP1_CP/src/org/hibernate/bytecode/cglib/AccessOptimizerAdapter.java 2009-11-26 20:28:45 UTC (rev 18072)
@@ -13,7 +13,7 @@
/**
* The {@link ReflectionOptimizer.AccessOptimizer} implementation for CGLIB
- * which simply acts as an adpater to the {@link BulkBean} class.
+ * which simply acts as an adapter to the {@link BulkBean} class.
*
* @author Steve Ebersole
*/
Modified: core/branches/Branch_3_2_4_SP1_CP/src/org/hibernate/bytecode/cglib/InstantiationOptimizerAdapter.java
===================================================================
--- core/branches/Branch_3_2_4_SP1_CP/src/org/hibernate/bytecode/cglib/InstantiationOptimizerAdapter.java 2009-11-26 08:02:23 UTC (rev 18071)
+++ core/branches/Branch_3_2_4_SP1_CP/src/org/hibernate/bytecode/cglib/InstantiationOptimizerAdapter.java 2009-11-26 20:28:45 UTC (rev 18072)
@@ -11,7 +11,7 @@
/**
* The {@link ReflectionOptimizer.InstantiationOptimizer} implementation for CGLIB
- * which simply acts as an adpater to the {@link FastClass} class.
+ * which simply acts as an adapter to the {@link FastClass} class.
*
* @author Steve Ebersole
*/
Modified: core/branches/Branch_3_2_4_SP1_CP/src/org/hibernate/bytecode/javassist/AccessOptimizerAdapter.java
===================================================================
--- core/branches/Branch_3_2_4_SP1_CP/src/org/hibernate/bytecode/javassist/AccessOptimizerAdapter.java 2009-11-26 08:02:23 UTC (rev 18071)
+++ core/branches/Branch_3_2_4_SP1_CP/src/org/hibernate/bytecode/javassist/AccessOptimizerAdapter.java 2009-11-26 20:28:45 UTC (rev 18072)
@@ -6,8 +6,8 @@
import java.io.Serializable;
/**
- * The {@link ReflectionOptimizer.AccessOptimizer} implementation for Javassist
- * which simply acts as an adpater to the {@link BulkAccessor} class.
+ * The {@link ReflectionOptimizer#AccessOptimizer} implementation for Javassist
+ * which simply acts as an adapter to the {@link BulkAccessor} class.
*
* @author Steve Ebersole
*/
Modified: core/branches/Branch_3_2_4_SP1_CP/src/org/hibernate/bytecode/javassist/InstantiationOptimizerAdapter.java
===================================================================
--- core/branches/Branch_3_2_4_SP1_CP/src/org/hibernate/bytecode/javassist/InstantiationOptimizerAdapter.java 2009-11-26 08:02:23 UTC (rev 18071)
+++ core/branches/Branch_3_2_4_SP1_CP/src/org/hibernate/bytecode/javassist/InstantiationOptimizerAdapter.java 2009-11-26 20:28:45 UTC (rev 18072)
@@ -6,8 +6,8 @@
import java.io.Serializable;
/**
- * The {@link ReflectionOptimizer.InstantiationOptimizer} implementation for Javassist
- * which simply acts as an adpater to the {@link FastClass} class.
+ * The {@link ReflectionOptimizer#InstantiationOptimizer} implementation for Javassist
+ * which simply acts as an adapter to the {@link FastClass} class.
*
* @author Steve Ebersole
*/
Modified: core/branches/Branch_3_2_4_SP1_CP/src/org/hibernate/bytecode/package.html
===================================================================
--- core/branches/Branch_3_2_4_SP1_CP/src/org/hibernate/bytecode/package.html 2009-11-26 08:02:23 UTC (rev 18071)
+++ core/branches/Branch_3_2_4_SP1_CP/src/org/hibernate/bytecode/package.html 2009-11-26 20:28:45 UTC (rev 18072)
@@ -24,7 +24,7 @@
Currently, both CGLIB and Javassist are supported out-of-the-box.
</p>
<p>
- Note that for field-level interception, simply plugging in a new {@link BytecodeProvider}
+ Note that for field-level interception, simply plugging in a new {@link org.hibernate.bytecode.BytecodeProvider BytecodeProvider}
is not enough for Hibernate to be able to recognize new providers. You would additionally
need to make appropriate code changes to the {@link org.hibernate.intercept.Helper}
class. This is because the detection of these enhanced classes is needed in a static
Modified: core/branches/Branch_3_2_4_SP1_CP/src/org/hibernate/bytecode/util/ByteCodeHelper.java
===================================================================
--- core/branches/Branch_3_2_4_SP1_CP/src/org/hibernate/bytecode/util/ByteCodeHelper.java 2009-11-26 08:02:23 UTC (rev 18071)
+++ core/branches/Branch_3_2_4_SP1_CP/src/org/hibernate/bytecode/util/ByteCodeHelper.java 2009-11-26 20:28:45 UTC (rev 18072)
@@ -23,7 +23,7 @@
* The stream is closed within this method!
*
* @param inputStream
- * @return
+ * @return class byte array
* @throws IOException
*/
public static byte[] readByteCode(InputStream inputStream) throws IOException {
Modified: core/branches/Branch_3_2_4_SP1_CP/src/org/hibernate/cache/OSCacheProvider.java
===================================================================
--- core/branches/Branch_3_2_4_SP1_CP/src/org/hibernate/cache/OSCacheProvider.java 2009-11-26 08:02:23 UTC (rev 18071)
+++ core/branches/Branch_3_2_4_SP1_CP/src/org/hibernate/cache/OSCacheProvider.java 2009-11-26 20:28:45 UTC (rev 18072)
@@ -39,7 +39,7 @@
*
* @param region
* @param properties
- * @return
+ * @return cache instance
* @throws CacheException
*/
public Cache buildCache(String region, Properties properties) throws CacheException {
Modified: core/branches/Branch_3_2_4_SP1_CP/src/org/hibernate/cache/OptimisticTreeCacheProvider.java
===================================================================
--- core/branches/Branch_3_2_4_SP1_CP/src/org/hibernate/cache/OptimisticTreeCacheProvider.java 2009-11-26 08:02:23 UTC (rev 18071)
+++ core/branches/Branch_3_2_4_SP1_CP/src/org/hibernate/cache/OptimisticTreeCacheProvider.java 2009-11-26 20:28:45 UTC (rev 18072)
@@ -26,7 +26,7 @@
public class OptimisticTreeCacheProvider implements CacheProvider {
/**
- * @deprecated use {@link Environment.CACHE_PROVIDER_CONFIG}
+ * @deprecated use {@link Environment#CACHE_PROVIDER_CONFIG}
*/
public static final String CONFIG_RESOURCE = "hibernate.cache.opt_tree_cache.config";
public static final String DEFAULT_CONFIG = "treecache.xml";
Modified: core/branches/Branch_3_2_4_SP1_CP/src/org/hibernate/cache/TreeCacheProvider.java
===================================================================
--- core/branches/Branch_3_2_4_SP1_CP/src/org/hibernate/cache/TreeCacheProvider.java 2009-11-26 08:02:23 UTC (rev 18071)
+++ core/branches/Branch_3_2_4_SP1_CP/src/org/hibernate/cache/TreeCacheProvider.java 2009-11-26 20:28:45 UTC (rev 18072)
@@ -20,7 +20,7 @@
public class TreeCacheProvider implements CacheProvider {
/**
- * @deprecated use {@link org.hibernate.cfg.Environment.CACHE_PROVIDER_CONFIG}
+ * @deprecated use {@link org.hibernate.cfg.Environment#CACHE_PROVIDER_CONFIG}
*/
public static final String CONFIG_RESOURCE = "hibernate.cache.tree_cache.config";
public static final String DEFAULT_CONFIG = "treecache.xml";
Modified: core/branches/Branch_3_2_4_SP1_CP/src/org/hibernate/connection/ConnectionProvider.java
===================================================================
--- core/branches/Branch_3_2_4_SP1_CP/src/org/hibernate/connection/ConnectionProvider.java 2009-11-26 08:02:23 UTC (rev 18071)
+++ core/branches/Branch_3_2_4_SP1_CP/src/org/hibernate/connection/ConnectionProvider.java 2009-11-26 20:28:45 UTC (rev 18072)
@@ -50,7 +50,7 @@
* Does this connection provider support aggressive release of JDBC
* connections and re-acquistion of those connections (if need be) later?
* <p/>
- * This is used in conjunction with {@link org.hibernate.cfg.Environment.RELEASE_CONNECTIONS}
+ * This is used in conjunction with {@link org.hibernate.cfg.Environment#RELEASE_CONNECTIONS}
* to aggressively release JDBC connections. However, the configured ConnectionProvider
* must support re-acquisition of the same underlying connection for that semantic to work.
* <p/>
Modified: core/branches/Branch_3_2_4_SP1_CP/src/org/hibernate/connection/ConnectionProviderFactory.java
===================================================================
--- core/branches/Branch_3_2_4_SP1_CP/src/org/hibernate/connection/ConnectionProviderFactory.java 2009-11-26 08:02:23 UTC (rev 18071)
+++ core/branches/Branch_3_2_4_SP1_CP/src/org/hibernate/connection/ConnectionProviderFactory.java 2009-11-26 20:28:45 UTC (rev 18072)
@@ -60,7 +60,7 @@
* Instantiate a <tt>ConnectionProvider</tt> using given properties.
* Method newConnectionProvider.
* @param properties hibernate <tt>SessionFactory</tt> properties
- * @Param connectionProviderInjectionData object to be injected in the conenction provided
+ * @param connectionProviderInjectionData object to be injected in the conenction provided
* @return ConnectionProvider
* @throws HibernateException
*/
Modified: core/branches/Branch_3_2_4_SP1_CP/src/org/hibernate/criterion/Criterion.java
===================================================================
--- core/branches/Branch_3_2_4_SP1_CP/src/org/hibernate/criterion/Criterion.java 2009-11-26 08:02:23 UTC (rev 18071)
+++ core/branches/Branch_3_2_4_SP1_CP/src/org/hibernate/criterion/Criterion.java 2009-11-26 20:28:45 UTC (rev 18072)
@@ -23,8 +23,8 @@
/**
* Render the SQL fragment
+ * @param criteria
* @param criteriaQuery
- * @param alias
* @return String
* @throws HibernateException
*/
Modified: core/branches/Branch_3_2_4_SP1_CP/src/org/hibernate/criterion/Restrictions.java
===================================================================
--- core/branches/Branch_3_2_4_SP1_CP/src/org/hibernate/criterion/Restrictions.java 2009-11-26 08:02:23 UTC (rev 18071)
+++ core/branches/Branch_3_2_4_SP1_CP/src/org/hibernate/criterion/Restrictions.java 2009-11-26 20:28:45 UTC (rev 18072)
@@ -25,7 +25,6 @@
/**
* Apply an "equal" constraint to the identifier property
- * @param propertyName
* @param value
* @return Criterion
*/
Modified: core/branches/Branch_3_2_4_SP1_CP/src/org/hibernate/criterion/Subqueries.java
===================================================================
--- core/branches/Branch_3_2_4_SP1_CP/src/org/hibernate/criterion/Subqueries.java 2009-11-26 08:02:23 UTC (rev 18071)
+++ core/branches/Branch_3_2_4_SP1_CP/src/org/hibernate/criterion/Subqueries.java 2009-11-26 20:28:45 UTC (rev 18072)
@@ -5,7 +5,7 @@
* Factory class for criterion instances that represent expressions
* involving subqueries.
*
- * @see Restriction
+ * @see org.hibernate.criterion.Restrictions
* @see Projection
* @see org.hibernate.Criteria
* @author Gavin King
Modified: core/branches/Branch_3_2_4_SP1_CP/src/org/hibernate/dialect/Oracle9Dialect.java
===================================================================
--- core/branches/Branch_3_2_4_SP1_CP/src/org/hibernate/dialect/Oracle9Dialect.java 2009-11-26 08:02:23 UTC (rev 18071)
+++ core/branches/Branch_3_2_4_SP1_CP/src/org/hibernate/dialect/Oracle9Dialect.java 2009-11-26 20:28:45 UTC (rev 18072)
@@ -25,7 +25,7 @@
/**
* An SQL dialect for Oracle 9 (uses ANSI-style syntax where possible).
*
- * @deprecated Use either Oracle9iDialect or Oracle10gDialect instead
+ * @deprecated Use either {@link Oracle9iDialect} or {@link Oracle10gDialect} instead
* @author Gavin King, David Channon
*/
public class Oracle9Dialect extends Dialect {
Modified: core/branches/Branch_3_2_4_SP1_CP/src/org/hibernate/dialect/Oracle9iDialect.java
===================================================================
--- core/branches/Branch_3_2_4_SP1_CP/src/org/hibernate/dialect/Oracle9iDialect.java 2009-11-26 08:02:23 UTC (rev 18071)
+++ core/branches/Branch_3_2_4_SP1_CP/src/org/hibernate/dialect/Oracle9iDialect.java 2009-11-26 20:28:45 UTC (rev 18072)
@@ -8,7 +8,7 @@
/**
* A dialect for Oracle 9i databases.
* <p/>
- * Unlike the older (deprecated) {@Link Oracl9Dialect), this version specifies
+ * Unlike the older {@link org.hibernate.dialect.Oracle9Dialect}, this version specifies
* to not use "ANSI join syntax" because 9i does not seem to properly
* handle it in all cases.
*
Modified: core/branches/Branch_3_2_4_SP1_CP/src/org/hibernate/engine/loading/EntityLoadContext.java
===================================================================
--- core/branches/Branch_3_2_4_SP1_CP/src/org/hibernate/engine/loading/EntityLoadContext.java 2009-11-26 08:02:23 UTC (rev 18071)
+++ core/branches/Branch_3_2_4_SP1_CP/src/org/hibernate/engine/loading/EntityLoadContext.java 2009-11-26 20:28:45 UTC (rev 18072)
@@ -8,7 +8,7 @@
import org.apache.commons.logging.LogFactory;
/**
- * {@inheritDoc}
+ *
*
* @author Steve Ebersole
*/
Modified: core/branches/Branch_3_2_4_SP1_CP/src/org/hibernate/engine/loading/LoadContexts.java
===================================================================
--- core/branches/Branch_3_2_4_SP1_CP/src/org/hibernate/engine/loading/LoadContexts.java 2009-11-26 08:02:23 UTC (rev 18071)
+++ core/branches/Branch_3_2_4_SP1_CP/src/org/hibernate/engine/loading/LoadContexts.java 2009-11-26 20:28:45 UTC (rev 18072)
@@ -25,7 +25,7 @@
* <p/>
* Implementation note: internally an {@link IdentityMap} is used to maintain
* the mappings; {@link IdentityMap} was chosen because I'd rather not be
- * dependent upon potentially bad {@link ResultSet#equals} and {ResultSet#hashCode}
+ * dependent upon potentially bad {@link ResultSet#equals} and {@link ResultSet#hashCode}
* implementations.
* <p/>
* Considering the JDBC-redesign work, would further like this contextual info
Modified: core/branches/Branch_3_2_4_SP1_CP/src/org/hibernate/event/LoadEventListener.java
===================================================================
--- core/branches/Branch_3_2_4_SP1_CP/src/org/hibernate/event/LoadEventListener.java 2009-11-26 08:02:23 UTC (rev 18071)
+++ core/branches/Branch_3_2_4_SP1_CP/src/org/hibernate/event/LoadEventListener.java 2009-11-26 20:28:45 UTC (rev 18072)
@@ -16,7 +16,6 @@
* Handle the given load event.
*
* @param event The load event to be handled.
- * @return The result (i.e., the loaded entity).
* @throws HibernateException
*/
public void onLoad(LoadEvent event, LoadType loadType) throws HibernateException;
Modified: core/branches/Branch_3_2_4_SP1_CP/src/org/hibernate/exception/ExceptionUtils.java
===================================================================
--- core/branches/Branch_3_2_4_SP1_CP/src/org/hibernate/exception/ExceptionUtils.java 2009-11-26 08:02:23 UTC (rev 18071)
+++ core/branches/Branch_3_2_4_SP1_CP/src/org/hibernate/exception/ExceptionUtils.java 2009-11-26 20:28:45 UTC (rev 18072)
@@ -147,8 +147,8 @@
* <p>The method searches for methods with specific names that return a
* <code>Throwable</code> object. This will pick up most wrapping exceptions,
* including those from JDK 1.4, and
- * {@link org.apache.commons.lang.exception.NestableException NestableException}.
- * The method names can be added to using {@link #addCauseMethodName(String)}.</p>
+ * {@link org.hibernate.exception.NestableException NestableException}.
+ * The method names can be added to using {@link ExceptionUtils#addCauseMethodName(String)}.</p>
* <p/>
* <p>The default list searched for are:</p>
* <ul>
Modified: core/branches/Branch_3_2_4_SP1_CP/src/org/hibernate/exception/SQLExceptionConverter.java
===================================================================
--- core/branches/Branch_3_2_4_SP1_CP/src/org/hibernate/exception/SQLExceptionConverter.java 2009-11-26 08:02:23 UTC (rev 18071)
+++ core/branches/Branch_3_2_4_SP1_CP/src/org/hibernate/exception/SQLExceptionConverter.java 2009-11-26 20:28:45 UTC (rev 18072)
@@ -26,7 +26,10 @@
* @param sqlException The SQLException to be converted.
* @param message An optional error message.
* @return The resulting JDBCException.
- * @see ConstraintViolationException, JDBCConnectionException, SQLGrammarException, LockAcquisitionException
+ * @see ConstraintViolationException
+ * @see JDBCConnectionException
+ * @see SQLGrammarException
+ * @see LockAcquisitionException
*/
public JDBCException convert(SQLException sqlException, String message, String sql);
}
Modified: core/branches/Branch_3_2_4_SP1_CP/src/org/hibernate/exception/SQLExceptionConverterFactory.java
===================================================================
--- core/branches/Branch_3_2_4_SP1_CP/src/org/hibernate/exception/SQLExceptionConverterFactory.java 2009-11-26 08:02:23 UTC (rev 18071)
+++ core/branches/Branch_3_2_4_SP1_CP/src/org/hibernate/exception/SQLExceptionConverterFactory.java 2009-11-26 20:28:45 UTC (rev 18072)
@@ -30,7 +30,7 @@
/**
* Build a SQLExceptionConverter instance.
* <p/>
- * First, looks for a {@link Environment.SQL_EXCEPTION_CONVERTER} property to see
+ * First, looks for a {@link Environment#SQL_EXCEPTION_CONVERTER} property to see
* if the configuration specified the class of a specific converter to use. If this
* property is set, attempt to construct an instance of that class. If not set, or
* if construction fails, the converter specific to the dialect will be used.
Modified: core/branches/Branch_3_2_4_SP1_CP/src/org/hibernate/hql/ast/util/LiteralProcessor.java
===================================================================
--- core/branches/Branch_3_2_4_SP1_CP/src/org/hibernate/hql/ast/util/LiteralProcessor.java 2009-11-26 08:02:23 UTC (rev 18071)
+++ core/branches/Branch_3_2_4_SP1_CP/src/org/hibernate/hql/ast/util/LiteralProcessor.java 2009-11-26 20:28:45 UTC (rev 18072)
@@ -49,7 +49,8 @@
/**
* In what format should Float and Double literal values be sent
* to the database?
- * @see #EXACT, #APPROXIMATE
+ * @see #EXACT
+ * @see #APPROXIMATE
*/
public static int DECIMAL_LITERAL_FORMAT = EXACT;
Modified: core/branches/Branch_3_2_4_SP1_CP/src/org/hibernate/loader/DefaultEntityAliases.java
===================================================================
--- core/branches/Branch_3_2_4_SP1_CP/src/org/hibernate/loader/DefaultEntityAliases.java 2009-11-26 08:02:23 UTC (rev 18071)
+++ core/branches/Branch_3_2_4_SP1_CP/src/org/hibernate/loader/DefaultEntityAliases.java 2009-11-26 20:28:45 UTC (rev 18072)
@@ -28,7 +28,9 @@
/**
* Calculate and cache select-clause suffixes.
- * @param map
+ * @param userProvidedAliases
+ * @param persister
+ * @param suffix
*/
public DefaultEntityAliases(Map userProvidedAliases, Loadable persister, String suffix) {
this.suffix = suffix;
Modified: core/branches/Branch_3_2_4_SP1_CP/src/org/hibernate/mapping/ForeignKey.java
===================================================================
--- core/branches/Branch_3_2_4_SP1_CP/src/org/hibernate/mapping/ForeignKey.java 2009-11-26 08:02:23 UTC (rev 18071)
+++ core/branches/Branch_3_2_4_SP1_CP/src/org/hibernate/mapping/ForeignKey.java 2009-11-26 20:28:45 UTC (rev 18072)
@@ -67,7 +67,6 @@
* Validates that columnspan of the foreignkey and the primarykey is the same.
*
* Furthermore it aligns the length of the underlying tables columns.
- * @param referencedTable
*/
public void alignColumns() {
if ( isReferenceToPrimaryKey() ) alignColumns(referencedTable);
Modified: core/branches/Branch_3_2_4_SP1_CP/src/org/hibernate/persister/entity/Queryable.java
===================================================================
--- core/branches/Branch_3_2_4_SP1_CP/src/org/hibernate/persister/entity/Queryable.java 2009-11-26 08:02:23 UTC (rev 18071)
+++ core/branches/Branch_3_2_4_SP1_CP/src/org/hibernate/persister/entity/Queryable.java 2009-11-26 20:28:45 UTC (rev 18072)
@@ -118,7 +118,7 @@
* array.
*
* @param number The index into the internal array.
- * @return
+ * @return subClass table name
*/
public String getSubclassTableName(int number);
Modified: core/branches/Branch_3_2_4_SP1_CP/src/org/hibernate/sql/InFragment.java
===================================================================
--- core/branches/Branch_3_2_4_SP1_CP/src/org/hibernate/sql/InFragment.java 2009-11-26 08:02:23 UTC (rev 18071)
+++ core/branches/Branch_3_2_4_SP1_CP/src/org/hibernate/sql/InFragment.java 2009-11-26 20:28:45 UTC (rev 18072)
@@ -23,7 +23,7 @@
private List values = new ArrayList();
/**
- * @param value, an SQL literal, NULL, or NOT_NULL
+ * @param value an SQL literal, NULL, or NOT_NULL
*/
public InFragment addValue(Object value) {
values.add(value);
Modified: core/branches/Branch_3_2_4_SP1_CP/src/org/hibernate/type/Type.java
===================================================================
--- core/branches/Branch_3_2_4_SP1_CP/src/org/hibernate/type/Type.java 2009-11-26 08:02:23 UTC (rev 18071)
+++ core/branches/Branch_3_2_4_SP1_CP/src/org/hibernate/type/Type.java 2009-11-26 20:28:45 UTC (rev 18072)
@@ -249,7 +249,6 @@
*
* @param value
* @param factory
- * @return String
* @throws HibernateException
*/
public void setToXMLNode(Node node, Object value, SessionFactoryImplementor factory)
15 years
Hibernate SVN: r18071 - in search/trunk/src: test/java/org/hibernate/search/test/configuration and 1 other directories.
by hibernate-commits@lists.jboss.org
Author: sannegrinovero
Date: 2009-11-26 03:02:23 -0500 (Thu, 26 Nov 2009)
New Revision: 18071
Modified:
search/trunk/src/main/java/org/hibernate/search/cfg/CalendarBridgeMapping.java
search/trunk/src/main/java/org/hibernate/search/cfg/ContainedInMapping.java
search/trunk/src/main/java/org/hibernate/search/cfg/DateBridgeMapping.java
search/trunk/src/main/java/org/hibernate/search/cfg/FullTextFilterDefMapping.java
search/trunk/src/main/java/org/hibernate/search/cfg/IndexEmbeddedMapping.java
search/trunk/src/main/java/org/hibernate/search/cfg/IndexedMapping.java
search/trunk/src/main/java/org/hibernate/search/cfg/ProvidedIdMapping.java
search/trunk/src/test/java/org/hibernate/search/test/configuration/Address.java
search/trunk/src/test/java/org/hibernate/search/test/configuration/BlogEntry.java
search/trunk/src/test/java/org/hibernate/search/test/configuration/Item.java
search/trunk/src/test/java/org/hibernate/search/test/configuration/ProductCatalog.java
search/trunk/src/test/java/org/hibernate/search/test/configuration/ProvidedIdEntry.java
search/trunk/src/test/java/org/hibernate/search/test/configuration/SecurityFilterFactory.java
search/trunk/src/test/java/org/hibernate/search/test/id/providedId/ManualTransactionContext.java
search/trunk/src/test/java/org/hibernate/search/test/id/providedId/ProvidedIdTest.java
search/trunk/src/test/java/org/hibernate/search/test/id/providedId/StandaloneConf.java
Log:
missing copyrights, unused imports, SVN properties
Modified: search/trunk/src/main/java/org/hibernate/search/cfg/CalendarBridgeMapping.java
===================================================================
--- search/trunk/src/main/java/org/hibernate/search/cfg/CalendarBridgeMapping.java 2009-11-26 07:48:17 UTC (rev 18070)
+++ search/trunk/src/main/java/org/hibernate/search/cfg/CalendarBridgeMapping.java 2009-11-26 08:02:23 UTC (rev 18071)
@@ -1,3 +1,27 @@
+/* $Id$
+ *
+ * Hibernate, Relational Persistence for Idiomatic Java
+ *
+ * Copyright (c) 2009, Red Hat, Inc. and/or its affiliates or third-party contributors as
+ * indicated by the @author tags or express copyright attribution
+ * statements applied by the authors. All third-party contributions are
+ * distributed under license by Red Hat, Inc.
+ *
+ * This copyrighted material is made available to anyone wishing to use, modify,
+ * copy, or redistribute it subject to the terms and conditions of the GNU
+ * Lesser General Public License, as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+ * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
+ * for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this distribution; if not, write to:
+ * Free Software Foundation, Inc.
+ * 51 Franklin Street, Fifth Floor
+ * Boston, MA 02110-1301 USA
+ */
package org.hibernate.search.cfg;
import java.lang.annotation.ElementType;
Property changes on: search/trunk/src/main/java/org/hibernate/search/cfg/CalendarBridgeMapping.java
___________________________________________________________________
Name: svn:keywords
+ Id
Modified: search/trunk/src/main/java/org/hibernate/search/cfg/ContainedInMapping.java
===================================================================
--- search/trunk/src/main/java/org/hibernate/search/cfg/ContainedInMapping.java 2009-11-26 07:48:17 UTC (rev 18070)
+++ search/trunk/src/main/java/org/hibernate/search/cfg/ContainedInMapping.java 2009-11-26 08:02:23 UTC (rev 18071)
@@ -1,3 +1,27 @@
+/* $Id$
+ *
+ * Hibernate, Relational Persistence for Idiomatic Java
+ *
+ * Copyright (c) 2009, Red Hat, Inc. and/or its affiliates or third-party contributors as
+ * indicated by the @author tags or express copyright attribution
+ * statements applied by the authors. All third-party contributions are
+ * distributed under license by Red Hat, Inc.
+ *
+ * This copyrighted material is made available to anyone wishing to use, modify,
+ * copy, or redistribute it subject to the terms and conditions of the GNU
+ * Lesser General Public License, as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+ * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
+ * for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this distribution; if not, write to:
+ * Free Software Foundation, Inc.
+ * 51 Franklin Street, Fifth Floor
+ * Boston, MA 02110-1301 USA
+ */
package org.hibernate.search.cfg;
import java.lang.annotation.ElementType;
Property changes on: search/trunk/src/main/java/org/hibernate/search/cfg/ContainedInMapping.java
___________________________________________________________________
Name: svn:keywords
+ Id
Modified: search/trunk/src/main/java/org/hibernate/search/cfg/DateBridgeMapping.java
===================================================================
--- search/trunk/src/main/java/org/hibernate/search/cfg/DateBridgeMapping.java 2009-11-26 07:48:17 UTC (rev 18070)
+++ search/trunk/src/main/java/org/hibernate/search/cfg/DateBridgeMapping.java 2009-11-26 08:02:23 UTC (rev 18071)
@@ -1,3 +1,27 @@
+/* $Id$
+ *
+ * Hibernate, Relational Persistence for Idiomatic Java
+ *
+ * Copyright (c) 2009, Red Hat, Inc. and/or its affiliates or third-party contributors as
+ * indicated by the @author tags or express copyright attribution
+ * statements applied by the authors. All third-party contributions are
+ * distributed under license by Red Hat, Inc.
+ *
+ * This copyrighted material is made available to anyone wishing to use, modify,
+ * copy, or redistribute it subject to the terms and conditions of the GNU
+ * Lesser General Public License, as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+ * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
+ * for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this distribution; if not, write to:
+ * Free Software Foundation, Inc.
+ * 51 Franklin Street, Fifth Floor
+ * Boston, MA 02110-1301 USA
+ */
package org.hibernate.search.cfg;
import java.lang.annotation.ElementType;
Property changes on: search/trunk/src/main/java/org/hibernate/search/cfg/DateBridgeMapping.java
___________________________________________________________________
Name: svn:keywords
+ Id
Modified: search/trunk/src/main/java/org/hibernate/search/cfg/FullTextFilterDefMapping.java
===================================================================
--- search/trunk/src/main/java/org/hibernate/search/cfg/FullTextFilterDefMapping.java 2009-11-26 07:48:17 UTC (rev 18070)
+++ search/trunk/src/main/java/org/hibernate/search/cfg/FullTextFilterDefMapping.java 2009-11-26 08:02:23 UTC (rev 18071)
@@ -1,3 +1,27 @@
+/* $Id$
+ *
+ * Hibernate, Relational Persistence for Idiomatic Java
+ *
+ * Copyright (c) 2009, Red Hat, Inc. and/or its affiliates or third-party contributors as
+ * indicated by the @author tags or express copyright attribution
+ * statements applied by the authors. All third-party contributions are
+ * distributed under license by Red Hat, Inc.
+ *
+ * This copyrighted material is made available to anyone wishing to use, modify,
+ * copy, or redistribute it subject to the terms and conditions of the GNU
+ * Lesser General Public License, as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+ * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
+ * for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this distribution; if not, write to:
+ * Free Software Foundation, Inc.
+ * 51 Franklin Street, Fifth Floor
+ * Boston, MA 02110-1301 USA
+ */
package org.hibernate.search.cfg;
import java.lang.annotation.ElementType;
Property changes on: search/trunk/src/main/java/org/hibernate/search/cfg/FullTextFilterDefMapping.java
___________________________________________________________________
Name: svn:keywords
+ Id
Modified: search/trunk/src/main/java/org/hibernate/search/cfg/IndexEmbeddedMapping.java
===================================================================
--- search/trunk/src/main/java/org/hibernate/search/cfg/IndexEmbeddedMapping.java 2009-11-26 07:48:17 UTC (rev 18070)
+++ search/trunk/src/main/java/org/hibernate/search/cfg/IndexEmbeddedMapping.java 2009-11-26 08:02:23 UTC (rev 18071)
@@ -1,3 +1,27 @@
+/* $Id$
+ *
+ * Hibernate, Relational Persistence for Idiomatic Java
+ *
+ * Copyright (c) 2009, Red Hat, Inc. and/or its affiliates or third-party contributors as
+ * indicated by the @author tags or express copyright attribution
+ * statements applied by the authors. All third-party contributions are
+ * distributed under license by Red Hat, Inc.
+ *
+ * This copyrighted material is made available to anyone wishing to use, modify,
+ * copy, or redistribute it subject to the terms and conditions of the GNU
+ * Lesser General Public License, as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+ * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
+ * for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this distribution; if not, write to:
+ * Free Software Foundation, Inc.
+ * 51 Franklin Street, Fifth Floor
+ * Boston, MA 02110-1301 USA
+ */
package org.hibernate.search.cfg;
import java.lang.annotation.ElementType;
@@ -12,7 +36,6 @@
private final Map<String,Object> indexEmbedded;
private EntityDescriptor entity;
private PropertyDescriptor property;
-
public IndexEmbeddedMapping(SearchMapping mapping, PropertyDescriptor property, EntityDescriptor entity) {
this.mapping = mapping;
Property changes on: search/trunk/src/main/java/org/hibernate/search/cfg/IndexEmbeddedMapping.java
___________________________________________________________________
Name: svn:keywords
+ Id
Modified: search/trunk/src/main/java/org/hibernate/search/cfg/IndexedMapping.java
===================================================================
--- search/trunk/src/main/java/org/hibernate/search/cfg/IndexedMapping.java 2009-11-26 07:48:17 UTC (rev 18070)
+++ search/trunk/src/main/java/org/hibernate/search/cfg/IndexedMapping.java 2009-11-26 08:02:23 UTC (rev 18071)
@@ -1,3 +1,27 @@
+/* $Id$
+ *
+ * Hibernate, Relational Persistence for Idiomatic Java
+ *
+ * Copyright (c) 2009, Red Hat, Inc. and/or its affiliates or third-party contributors as
+ * indicated by the @author tags or express copyright attribution
+ * statements applied by the authors. All third-party contributions are
+ * distributed under license by Red Hat, Inc.
+ *
+ * This copyrighted material is made available to anyone wishing to use, modify,
+ * copy, or redistribute it subject to the terms and conditions of the GNU
+ * Lesser General Public License, as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+ * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
+ * for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this distribution; if not, write to:
+ * Free Software Foundation, Inc.
+ * 51 Franklin Street, Fifth Floor
+ * Boston, MA 02110-1301 USA
+ */
package org.hibernate.search.cfg;
import java.lang.annotation.ElementType;
Property changes on: search/trunk/src/main/java/org/hibernate/search/cfg/IndexedMapping.java
___________________________________________________________________
Name: svn:keywords
+ Id
Modified: search/trunk/src/main/java/org/hibernate/search/cfg/ProvidedIdMapping.java
===================================================================
--- search/trunk/src/main/java/org/hibernate/search/cfg/ProvidedIdMapping.java 2009-11-26 07:48:17 UTC (rev 18070)
+++ search/trunk/src/main/java/org/hibernate/search/cfg/ProvidedIdMapping.java 2009-11-26 08:02:23 UTC (rev 18071)
@@ -1,3 +1,27 @@
+/* $Id$
+ *
+ * Hibernate, Relational Persistence for Idiomatic Java
+ *
+ * Copyright (c) 2009, Red Hat, Inc. and/or its affiliates or third-party contributors as
+ * indicated by the @author tags or express copyright attribution
+ * statements applied by the authors. All third-party contributions are
+ * distributed under license by Red Hat, Inc.
+ *
+ * This copyrighted material is made available to anyone wishing to use, modify,
+ * copy, or redistribute it subject to the terms and conditions of the GNU
+ * Lesser General Public License, as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+ * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
+ * for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this distribution; if not, write to:
+ * Free Software Foundation, Inc.
+ * 51 Franklin Street, Fifth Floor
+ * Boston, MA 02110-1301 USA
+ */
package org.hibernate.search.cfg;
import java.lang.annotation.ElementType;
Property changes on: search/trunk/src/main/java/org/hibernate/search/cfg/ProvidedIdMapping.java
___________________________________________________________________
Name: svn:keywords
+ Id
Modified: search/trunk/src/test/java/org/hibernate/search/test/configuration/Address.java
===================================================================
--- search/trunk/src/test/java/org/hibernate/search/test/configuration/Address.java 2009-11-26 07:48:17 UTC (rev 18070)
+++ search/trunk/src/test/java/org/hibernate/search/test/configuration/Address.java 2009-11-26 08:02:23 UTC (rev 18071)
@@ -32,8 +32,6 @@
import javax.persistence.Id;
import javax.persistence.ManyToOne;
-import org.hibernate.search.test.embedded.nested.Place;
-
/**
* @author Emmanuel Bernard
*/
Modified: search/trunk/src/test/java/org/hibernate/search/test/configuration/BlogEntry.java
===================================================================
--- search/trunk/src/test/java/org/hibernate/search/test/configuration/BlogEntry.java 2009-11-26 07:48:17 UTC (rev 18070)
+++ search/trunk/src/test/java/org/hibernate/search/test/configuration/BlogEntry.java 2009-11-26 08:02:23 UTC (rev 18071)
@@ -1,3 +1,27 @@
+/* $Id$
+ *
+ * Hibernate, Relational Persistence for Idiomatic Java
+ *
+ * Copyright (c) 2009, Red Hat, Inc. and/or its affiliates or third-party contributors as
+ * indicated by the @author tags or express copyright attribution
+ * statements applied by the authors. All third-party contributions are
+ * distributed under license by Red Hat, Inc.
+ *
+ * This copyrighted material is made available to anyone wishing to use, modify,
+ * copy, or redistribute it subject to the terms and conditions of the GNU
+ * Lesser General Public License, as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+ * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
+ * for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this distribution; if not, write to:
+ * Free Software Foundation, Inc.
+ * 51 Franklin Street, Fifth Floor
+ * Boston, MA 02110-1301 USA
+ */
package org.hibernate.search.test.configuration;
import java.util.Date;
Property changes on: search/trunk/src/test/java/org/hibernate/search/test/configuration/BlogEntry.java
___________________________________________________________________
Name: svn:keywords
+ Id
Modified: search/trunk/src/test/java/org/hibernate/search/test/configuration/Item.java
===================================================================
--- search/trunk/src/test/java/org/hibernate/search/test/configuration/Item.java 2009-11-26 07:48:17 UTC (rev 18070)
+++ search/trunk/src/test/java/org/hibernate/search/test/configuration/Item.java 2009-11-26 08:02:23 UTC (rev 18071)
@@ -1,3 +1,27 @@
+/* $Id$
+ *
+ * Hibernate, Relational Persistence for Idiomatic Java
+ *
+ * Copyright (c) 2009, Red Hat, Inc. and/or its affiliates or third-party contributors as
+ * indicated by the @author tags or express copyright attribution
+ * statements applied by the authors. All third-party contributions are
+ * distributed under license by Red Hat, Inc.
+ *
+ * This copyrighted material is made available to anyone wishing to use, modify,
+ * copy, or redistribute it subject to the terms and conditions of the GNU
+ * Lesser General Public License, as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+ * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
+ * for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this distribution; if not, write to:
+ * Free Software Foundation, Inc.
+ * 51 Franklin Street, Fifth Floor
+ * Boston, MA 02110-1301 USA
+ */
package org.hibernate.search.test.configuration;
import javax.persistence.CascadeType;
Property changes on: search/trunk/src/test/java/org/hibernate/search/test/configuration/Item.java
___________________________________________________________________
Name: svn:keywords
+ Id
Modified: search/trunk/src/test/java/org/hibernate/search/test/configuration/ProductCatalog.java
===================================================================
--- search/trunk/src/test/java/org/hibernate/search/test/configuration/ProductCatalog.java 2009-11-26 07:48:17 UTC (rev 18070)
+++ search/trunk/src/test/java/org/hibernate/search/test/configuration/ProductCatalog.java 2009-11-26 08:02:23 UTC (rev 18071)
@@ -1,3 +1,27 @@
+/* $Id$
+ *
+ * Hibernate, Relational Persistence for Idiomatic Java
+ *
+ * Copyright (c) 2009, Red Hat, Inc. and/or its affiliates or third-party contributors as
+ * indicated by the @author tags or express copyright attribution
+ * statements applied by the authors. All third-party contributions are
+ * distributed under license by Red Hat, Inc.
+ *
+ * This copyrighted material is made available to anyone wishing to use, modify,
+ * copy, or redistribute it subject to the terms and conditions of the GNU
+ * Lesser General Public License, as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+ * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
+ * for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this distribution; if not, write to:
+ * Free Software Foundation, Inc.
+ * 51 Franklin Street, Fifth Floor
+ * Boston, MA 02110-1301 USA
+ */
package org.hibernate.search.test.configuration;
import java.util.ArrayList;
Property changes on: search/trunk/src/test/java/org/hibernate/search/test/configuration/ProductCatalog.java
___________________________________________________________________
Name: svn:keywords
+ Id
Modified: search/trunk/src/test/java/org/hibernate/search/test/configuration/ProvidedIdEntry.java
===================================================================
--- search/trunk/src/test/java/org/hibernate/search/test/configuration/ProvidedIdEntry.java 2009-11-26 07:48:17 UTC (rev 18070)
+++ search/trunk/src/test/java/org/hibernate/search/test/configuration/ProvidedIdEntry.java 2009-11-26 08:02:23 UTC (rev 18071)
@@ -1,3 +1,27 @@
+/* $Id$
+ *
+ * Hibernate, Relational Persistence for Idiomatic Java
+ *
+ * Copyright (c) 2009, Red Hat, Inc. and/or its affiliates or third-party contributors as
+ * indicated by the @author tags or express copyright attribution
+ * statements applied by the authors. All third-party contributions are
+ * distributed under license by Red Hat, Inc.
+ *
+ * This copyrighted material is made available to anyone wishing to use, modify,
+ * copy, or redistribute it subject to the terms and conditions of the GNU
+ * Lesser General Public License, as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+ * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
+ * for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this distribution; if not, write to:
+ * Free Software Foundation, Inc.
+ * 51 Franklin Street, Fifth Floor
+ * Boston, MA 02110-1301 USA
+ */
package org.hibernate.search.test.configuration;
import java.io.Serializable;
Property changes on: search/trunk/src/test/java/org/hibernate/search/test/configuration/ProvidedIdEntry.java
___________________________________________________________________
Name: svn:keywords
+ Id
Modified: search/trunk/src/test/java/org/hibernate/search/test/configuration/SecurityFilterFactory.java
===================================================================
--- search/trunk/src/test/java/org/hibernate/search/test/configuration/SecurityFilterFactory.java 2009-11-26 07:48:17 UTC (rev 18070)
+++ search/trunk/src/test/java/org/hibernate/search/test/configuration/SecurityFilterFactory.java 2009-11-26 08:02:23 UTC (rev 18071)
@@ -1,3 +1,27 @@
+/* $Id$
+ *
+ * Hibernate, Relational Persistence for Idiomatic Java
+ *
+ * Copyright (c) 2009, Red Hat, Inc. and/or its affiliates or third-party contributors as
+ * indicated by the @author tags or express copyright attribution
+ * statements applied by the authors. All third-party contributions are
+ * distributed under license by Red Hat, Inc.
+ *
+ * This copyrighted material is made available to anyone wishing to use, modify,
+ * copy, or redistribute it subject to the terms and conditions of the GNU
+ * Lesser General Public License, as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+ * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
+ * for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this distribution; if not, write to:
+ * Free Software Foundation, Inc.
+ * 51 Franklin Street, Fifth Floor
+ * Boston, MA 02110-1301 USA
+ */
package org.hibernate.search.test.configuration;
import java.io.IOException;
@@ -8,7 +32,6 @@
import org.apache.lucene.search.CachingWrapperFilter;
import org.apache.lucene.search.DocIdSet;
import org.apache.lucene.search.Filter;
-import org.apache.lucene.search.QueryWrapperFilter;
import org.apache.lucene.util.OpenBitSet;
import org.hibernate.search.annotations.Factory;
import org.hibernate.search.annotations.Key;
Property changes on: search/trunk/src/test/java/org/hibernate/search/test/configuration/SecurityFilterFactory.java
___________________________________________________________________
Name: svn:keywords
+ Id
Modified: search/trunk/src/test/java/org/hibernate/search/test/id/providedId/ManualTransactionContext.java
===================================================================
--- search/trunk/src/test/java/org/hibernate/search/test/id/providedId/ManualTransactionContext.java 2009-11-26 07:48:17 UTC (rev 18070)
+++ search/trunk/src/test/java/org/hibernate/search/test/id/providedId/ManualTransactionContext.java 2009-11-26 08:02:23 UTC (rev 18071)
@@ -1,3 +1,27 @@
+/* $Id$
+ *
+ * Hibernate, Relational Persistence for Idiomatic Java
+ *
+ * Copyright (c) 2009, Red Hat, Inc. and/or its affiliates or third-party contributors as
+ * indicated by the @author tags or express copyright attribution
+ * statements applied by the authors. All third-party contributions are
+ * distributed under license by Red Hat, Inc.
+ *
+ * This copyrighted material is made available to anyone wishing to use, modify,
+ * copy, or redistribute it subject to the terms and conditions of the GNU
+ * Lesser General Public License, as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+ * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
+ * for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this distribution; if not, write to:
+ * Free Software Foundation, Inc.
+ * 51 Franklin Street, Fifth Floor
+ * Boston, MA 02110-1301 USA
+ */
package org.hibernate.search.test.id.providedId;
import java.util.List;
Property changes on: search/trunk/src/test/java/org/hibernate/search/test/id/providedId/ManualTransactionContext.java
___________________________________________________________________
Name: svn:keywords
+ Id
Modified: search/trunk/src/test/java/org/hibernate/search/test/id/providedId/ProvidedIdTest.java
===================================================================
--- search/trunk/src/test/java/org/hibernate/search/test/id/providedId/ProvidedIdTest.java 2009-11-26 07:48:17 UTC (rev 18070)
+++ search/trunk/src/test/java/org/hibernate/search/test/id/providedId/ProvidedIdTest.java 2009-11-26 08:02:23 UTC (rev 18071)
@@ -29,19 +29,11 @@
import org.apache.lucene.search.IndexSearcher;
import org.apache.lucene.search.Query;
import org.apache.lucene.search.TopDocs;
-
-import org.hibernate.Session;
-import org.hibernate.Transaction;
-import org.hibernate.search.FullTextSession;
-import org.hibernate.search.Search;
-import org.hibernate.search.SearchFactory;
-import org.hibernate.search.engine.SearchFactoryImplementor;
import org.hibernate.search.backend.Work;
import org.hibernate.search.backend.WorkType;
-import org.hibernate.search.cfg.SearchConfiguration;
+import org.hibernate.search.engine.SearchFactoryImplementor;
import org.hibernate.search.impl.SearchFactoryImpl;
import org.hibernate.search.store.DirectoryProvider;
-import org.hibernate.search.test.SearchTestCase;
/**
* @author Navin Surtani
@@ -89,5 +81,4 @@
searcher.close();
}
-
}
Modified: search/trunk/src/test/java/org/hibernate/search/test/id/providedId/StandaloneConf.java
===================================================================
--- search/trunk/src/test/java/org/hibernate/search/test/id/providedId/StandaloneConf.java 2009-11-26 07:48:17 UTC (rev 18070)
+++ search/trunk/src/test/java/org/hibernate/search/test/id/providedId/StandaloneConf.java 2009-11-26 08:02:23 UTC (rev 18071)
@@ -1,3 +1,27 @@
+/* $Id$
+ *
+ * Hibernate, Relational Persistence for Idiomatic Java
+ *
+ * Copyright (c) 2009, Red Hat, Inc. and/or its affiliates or third-party contributors as
+ * indicated by the @author tags or express copyright attribution
+ * statements applied by the authors. All third-party contributions are
+ * distributed under license by Red Hat, Inc.
+ *
+ * This copyrighted material is made available to anyone wishing to use, modify,
+ * copy, or redistribute it subject to the terms and conditions of the GNU
+ * Lesser General Public License, as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+ * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
+ * for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this distribution; if not, write to:
+ * Free Software Foundation, Inc.
+ * 51 Franklin Street, Fifth Floor
+ * Boston, MA 02110-1301 USA
+ */
package org.hibernate.search.test.id.providedId;
import java.util.Iterator;
@@ -2,4 +26,2 @@
import java.util.Properties;
-import java.util.List;
-import java.util.ArrayList;
import java.util.Map;
Property changes on: search/trunk/src/test/java/org/hibernate/search/test/id/providedId/StandaloneConf.java
___________________________________________________________________
Name: svn:keywords
+ Id
15 years
Hibernate SVN: r18070 - search/trunk/src/main/java/org/hibernate/search/bridge/builtin.
by hibernate-commits@lists.jboss.org
Author: sannegrinovero
Date: 2009-11-26 02:48:17 -0500 (Thu, 26 Nov 2009)
New Revision: 18070
Modified:
search/trunk/src/main/java/org/hibernate/search/bridge/builtin/CalendarBridge.java
search/trunk/src/main/java/org/hibernate/search/bridge/builtin/DateBridge.java
Log:
cosmetic changes in Calendar and Date Bridges, and SearchException vs HibernateException.
Modified: search/trunk/src/main/java/org/hibernate/search/bridge/builtin/CalendarBridge.java
===================================================================
--- search/trunk/src/main/java/org/hibernate/search/bridge/builtin/CalendarBridge.java 2009-11-25 16:44:58 UTC (rev 18069)
+++ search/trunk/src/main/java/org/hibernate/search/bridge/builtin/CalendarBridge.java 2009-11-26 07:48:17 UTC (rev 18070)
@@ -1,11 +1,34 @@
+/* $Id$
+ *
+ * Hibernate, Relational Persistence for Idiomatic Java
+ *
+ * Copyright (c) 2009, Red Hat, Inc. and/or its affiliates or third-party contributors as
+ * indicated by the @author tags or express copyright attribution
+ * statements applied by the authors. All third-party contributions are
+ * distributed under license by Red Hat, Inc.
+ *
+ * This copyrighted material is made available to anyone wishing to use, modify,
+ * copy, or redistribute it subject to the terms and conditions of the GNU
+ * Lesser General Public License, as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+ * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
+ * for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this distribution; if not, write to:
+ * Free Software Foundation, Inc.
+ * 51 Franklin Street, Fifth Floor
+ * Boston, MA 02110-1301 USA
+ */
package org.hibernate.search.bridge.builtin;
+import org.hibernate.search.SearchException;
import org.hibernate.search.annotations.Resolution;
import org.hibernate.search.bridge.ParameterizedBridge;
import org.hibernate.search.bridge.TwoWayStringBridge;
import org.hibernate.util.StringHelper;
-import org.hibernate.AssertionFailure;
-import org.hibernate.HibernateException;
import org.apache.lucene.document.DateTools;
import java.util.Date;
@@ -14,7 +37,6 @@
import java.util.Map;
import java.text.ParseException;
-
public class CalendarBridge implements TwoWayStringBridge, ParameterizedBridge {
private DateTools.Resolution resolution;
@@ -26,7 +48,6 @@
public static final TwoWayStringBridge CALENDAR_SECOND = new CalendarBridge( Resolution.SECOND );
public static final TwoWayStringBridge CALENDAR_MILLISECOND = new CalendarBridge( Resolution.MILLISECOND );
-
public CalendarBridge() {
}
@@ -46,19 +67,17 @@
resolution = DateResolutionUtil.getLuceneResolution( hibResolution );
}
-
-
public Object stringToObject(String stringValue) {
- if ( StringHelper.isEmpty( stringValue )) {
+ if ( StringHelper.isEmpty( stringValue ) ) {
return null;
}
try {
- Date date = DateTools.stringToDate(stringValue);
- Calendar calendar = Calendar.getInstance();
- calendar.setTime(date);
+ Date date = DateTools.stringToDate( stringValue );
+ Calendar calendar = Calendar.getInstance();
+ calendar.setTime( date );
return calendar;
} catch (ParseException e) {
- throw new HibernateException( "Unable to parse into calendar: " + stringValue, e );
+ throw new SearchException( "Unable to parse into calendar: " + stringValue, e );
}
}
Property changes on: search/trunk/src/main/java/org/hibernate/search/bridge/builtin/CalendarBridge.java
___________________________________________________________________
Name: svn:keywords
+ Id
Modified: search/trunk/src/main/java/org/hibernate/search/bridge/builtin/DateBridge.java
===================================================================
--- search/trunk/src/main/java/org/hibernate/search/bridge/builtin/DateBridge.java 2009-11-25 16:44:58 UTC (rev 18069)
+++ search/trunk/src/main/java/org/hibernate/search/bridge/builtin/DateBridge.java 2009-11-26 07:48:17 UTC (rev 18070)
@@ -30,8 +30,7 @@
import java.util.Map;
import org.apache.lucene.document.DateTools;
-import org.hibernate.AssertionFailure;
-import org.hibernate.HibernateException;
+import org.hibernate.search.SearchException;
import org.hibernate.search.bridge.ParameterizedBridge;
import org.hibernate.search.annotations.Resolution;
import org.hibernate.search.bridge.TwoWayStringBridge;
@@ -78,7 +77,7 @@
return DateTools.stringToDate( stringValue );
}
catch (ParseException e) {
- throw new HibernateException( "Unable to parse into date: " + stringValue, e );
+ throw new SearchException( "Unable to parse into date: " + stringValue, e );
}
}
@@ -97,8 +96,7 @@
else {
hibResolution = (Resolution) resolution;
}
- this.resolution = DateResolutionUtil.getLuceneResolution(hibResolution );
+ this.resolution = DateResolutionUtil.getLuceneResolution( hibResolution );
}
-
}
15 years
Hibernate SVN: r18069 - in core/branches/envers-hibernate-3.3: src/main/java/org/hibernate/envers/configuration and 3 other directories.
by hibernate-commits@lists.jboss.org
Author: adamw
Date: 2009-11-25 11:44:58 -0500 (Wed, 25 Nov 2009)
New Revision: 18069
Added:
core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/entities/reventity/CustomRevEntityColumnMapping.java
core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/reventity/CustomColumnMapping.java
Modified:
core/branches/envers-hibernate-3.3/pom.xml
core/branches/envers-hibernate-3.3/src/main/java/org/hibernate/envers/configuration/RevisionInfoConfiguration.java
core/branches/envers-hibernate-3.3/src/main/java/org/hibernate/envers/configuration/metadata/AuditMetadataGenerator.java
core/branches/envers-hibernate-3.3/src/main/java/org/hibernate/envers/configuration/metadata/MetadataTools.java
Log:
svn merge -r 18059:18068 https://svn.jboss.org/repos/hibernate/core/trunk/envers .
Modified: core/branches/envers-hibernate-3.3/pom.xml
===================================================================
--- core/branches/envers-hibernate-3.3/pom.xml 2009-11-25 16:32:05 UTC (rev 18068)
+++ core/branches/envers-hibernate-3.3/pom.xml 2009-11-25 16:44:58 UTC (rev 18069)
@@ -108,6 +108,12 @@
<scope>test</scope>
</dependency>
<dependency>
+ <groupId>mysql</groupId>
+ <artifactId>mysql-connector-java</artifactId>
+ <version>5.1.10</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
<groupId>cglib</groupId>
<artifactId>cglib</artifactId>
<version>2.2</version>
Modified: core/branches/envers-hibernate-3.3/src/main/java/org/hibernate/envers/configuration/RevisionInfoConfiguration.java
===================================================================
--- core/branches/envers-hibernate-3.3/src/main/java/org/hibernate/envers/configuration/RevisionInfoConfiguration.java 2009-11-25 16:32:05 UTC (rev 18068)
+++ core/branches/envers-hibernate-3.3/src/main/java/org/hibernate/envers/configuration/RevisionInfoConfiguration.java 2009-11-25 16:44:58 UTC (rev 18069)
@@ -49,6 +49,8 @@
import org.hibernate.type.LongType;
import org.hibernate.type.Type;
+import javax.persistence.Column;
+
/**
* @author Adam Warski (adam at warski dot org)
*/
@@ -59,6 +61,7 @@
private Type revisionInfoTimestampType;
private String revisionPropType;
+ private Column revisionPropColumn;
public RevisionInfoConfiguration() {
revisionInfoEntityName = "org.hibernate.envers.DefaultRevisionEntity";
@@ -90,10 +93,15 @@
private Element generateRevisionInfoRelationMapping() {
Document document = DocumentHelper.createDocument();
- Element rev_rel_mapping =document.addElement("key-many-to-one");
+ Element rev_rel_mapping = document.addElement("key-many-to-one");
rev_rel_mapping.addAttribute("type", revisionPropType);
rev_rel_mapping.addAttribute("class", revisionInfoEntityName);
+ if (revisionPropColumn != null) {
+ // Putting a fake name to make Hibernate happy. It will be replaced later anyway.
+ MetadataTools.addColumn(rev_rel_mapping, "*" , null, 0, 0, revisionPropColumn.columnDefinition());
+ }
+
return rev_rel_mapping;
}
@@ -125,6 +133,11 @@
throw new MappingException("The field annotated with @RevisionNumber must be of type " +
"int, Integer, long or Long");
}
+
+ // Getting the @Column definition of the revision number property, to later use that info to
+ // generate the same mapping for the relation from an audit table's revision number to the
+ // revision entity revision number.
+ revisionPropColumn = property.getAnnotation(Column.class);
}
if (revisionTimestamp != null) {
Modified: core/branches/envers-hibernate-3.3/src/main/java/org/hibernate/envers/configuration/metadata/AuditMetadataGenerator.java
===================================================================
--- core/branches/envers-hibernate-3.3/src/main/java/org/hibernate/envers/configuration/metadata/AuditMetadataGenerator.java 2009-11-25 16:32:05 UTC (rev 18068)
+++ core/branches/envers-hibernate-3.3/src/main/java/org/hibernate/envers/configuration/metadata/AuditMetadataGenerator.java 2009-11-25 16:44:58 UTC (rev 18069)
@@ -40,7 +40,6 @@
import org.hibernate.envers.entities.mapper.SubclassPropertyMapper;
import org.hibernate.envers.tools.StringTools;
import org.hibernate.envers.tools.Triple;
-import org.hibernate.envers.AuditTable;
import org.hibernate.MappingException;
import org.hibernate.cfg.Configuration;
@@ -90,8 +89,9 @@
void addRevisionInfoRelation(Element any_mapping) {
Element rev_mapping = (Element) revisionInfoRelationMapping.clone();
rev_mapping.addAttribute("name", verEntCfg.getRevisionFieldName());
- MetadataTools.addColumn(rev_mapping, verEntCfg.getRevisionFieldName(), null, 0, 0, null);
+ MetadataTools.addOrModifyColumn(rev_mapping, verEntCfg.getRevisionFieldName());
+
any_mapping.add(rev_mapping);
}
Modified: core/branches/envers-hibernate-3.3/src/main/java/org/hibernate/envers/configuration/metadata/MetadataTools.java
===================================================================
--- core/branches/envers-hibernate-3.3/src/main/java/org/hibernate/envers/configuration/metadata/MetadataTools.java 2009-11-25 16:32:05 UTC (rev 18068)
+++ core/branches/envers-hibernate-3.3/src/main/java/org/hibernate/envers/configuration/metadata/MetadataTools.java 2009-11-25 16:44:58 UTC (rev 18069)
@@ -68,6 +68,25 @@
return prop_mapping;
}
+ public static Element addOrModifyColumn(Element parent, String name) {
+ Element column_mapping = parent.element("column");
+
+ if (column_mapping == null) {
+ return addColumn(parent, name, null, 0, 0, null);
+ }
+
+ if (!StringTools.isEmpty(name)) {
+ Attribute nameAttribute = column_mapping.attribute("name");
+ if (nameAttribute == null) {
+ column_mapping.addAttribute("name", name);
+ } else {
+ nameAttribute.setValue(name);
+ }
+ }
+
+ return column_mapping;
+ }
+
public static Element addColumn(Element parent, String name, Integer length, Integer scale, Integer precision,
String sqlType) {
Element column_mapping = parent.addElement("column");
@@ -82,7 +101,7 @@
if (precision != 0) {
column_mapping.addAttribute("precision", Integer.toString(precision));
}
- if (sqlType != null) {
+ if (!StringTools.isEmpty(sqlType)) {
column_mapping.addAttribute("sql-type", sqlType);
}
Copied: core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/entities/reventity/CustomRevEntityColumnMapping.java (from rev 18068, core/trunk/envers/src/test/java/org/hibernate/envers/test/entities/reventity/CustomRevEntityColumnMapping.java)
===================================================================
--- core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/entities/reventity/CustomRevEntityColumnMapping.java (rev 0)
+++ core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/entities/reventity/CustomRevEntityColumnMapping.java 2009-11-25 16:44:58 UTC (rev 18069)
@@ -0,0 +1,85 @@
+/*
+ * Hibernate, Relational Persistence for Idiomatic Java
+ *
+ * Copyright (c) 2008, Red Hat Middleware LLC or third-party contributors as
+ * indicated by the @author tags or express copyright attribution
+ * statements applied by the authors. All third-party contributions are
+ * distributed under license by Red Hat Middleware LLC.
+ *
+ * This copyrighted material is made available to anyone wishing to use, modify,
+ * copy, or redistribute it subject to the terms and conditions of the GNU
+ * Lesser General Public License, as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+ * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
+ * for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this distribution; if not, write to:
+ * Free Software Foundation, Inc.
+ * 51 Franklin Street, Fifth Floor
+ * Boston, MA 02110-1301 USA
+ */
+package org.hibernate.envers.test.entities.reventity;
+
+import javax.persistence.Entity;
+import javax.persistence.GeneratedValue;
+import javax.persistence.Id;
+import javax.persistence.Column;
+
+import org.hibernate.envers.RevisionEntity;
+import org.hibernate.envers.RevisionNumber;
+import org.hibernate.envers.RevisionTimestamp;
+
+/**
+ * @author Adam Warski (adam at warski dot org)
+ */
+@Entity
+@RevisionEntity
+public class CustomRevEntityColumnMapping {
+ @Id
+ @GeneratedValue
+ @Column(columnDefinition = "int")
+ @RevisionNumber
+ private Long customId;
+
+ @RevisionTimestamp
+ private long customTimestamp;
+
+ public Long getCustomId() {
+ return customId;
+ }
+
+ public void setCustomId(Long customId) {
+ this.customId = customId;
+ }
+
+ public long getCustomTimestamp() {
+ return customTimestamp;
+ }
+
+ public void setCustomTimestamp(long customTimestamp) {
+ this.customTimestamp = customTimestamp;
+ }
+
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) return true;
+ if (o == null || getClass() != o.getClass()) return false;
+
+ CustomRevEntityColumnMapping that = (CustomRevEntityColumnMapping) o;
+
+ if (customTimestamp != that.customTimestamp) return false;
+ if (customId != null ? !customId.equals(that.customId) : that.customId != null) return false;
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ int result = customId != null ? customId.hashCode() : 0;
+ result = 31 * result + (int) (customTimestamp ^ (customTimestamp >>> 32));
+ return result;
+ }
+}
\ No newline at end of file
Copied: core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/reventity/CustomColumnMapping.java (from rev 18068, core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/reventity/CustomColumnMapping.java)
===================================================================
--- core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/reventity/CustomColumnMapping.java (rev 0)
+++ core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/reventity/CustomColumnMapping.java 2009-11-25 16:44:58 UTC (rev 18069)
@@ -0,0 +1,137 @@
+/*
+ * Hibernate, Relational Persistence for Idiomatic Java
+ *
+ * Copyright (c) 2008, Red Hat Middleware LLC or third-party contributors as
+ * indicated by the @author tags or express copyright attribution
+ * statements applied by the authors. All third-party contributions are
+ * distributed under license by Red Hat Middleware LLC.
+ *
+ * This copyrighted material is made available to anyone wishing to use, modify,
+ * copy, or redistribute it subject to the terms and conditions of the GNU
+ * Lesser General Public License, as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+ * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
+ * for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this distribution; if not, write to:
+ * Free Software Foundation, Inc.
+ * 51 Franklin Street, Fifth Floor
+ * Boston, MA 02110-1301 USA
+ */
+package org.hibernate.envers.test.integration.reventity;
+
+import java.util.Arrays;
+import java.util.Date;
+import javax.persistence.EntityManager;
+
+import org.hibernate.envers.AuditReader;
+import org.hibernate.envers.exception.RevisionDoesNotExistException;
+import org.hibernate.envers.test.AbstractEntityTest;
+import org.hibernate.envers.test.entities.StrTestEntity;
+import org.hibernate.envers.test.entities.reventity.CustomRevEntityColumnMapping;
+import org.testng.annotations.BeforeClass;
+import org.testng.annotations.Test;
+
+import org.hibernate.ejb.Ejb3Configuration;
+
+/**
+ * Test which checks if auditing when the revision number in the revision entity has a @Column annotation with
+ * a columnDefinition specified works.
+ * @author Adam Warski (adam at warski dot org)
+ */
+public class CustomColumnMapping extends AbstractEntityTest {
+ private Integer id;
+ private long timestamp1;
+ private long timestamp2;
+ private long timestamp3;
+
+ public void configure(Ejb3Configuration cfg) {
+ cfg.addAnnotatedClass(StrTestEntity.class);
+ cfg.addAnnotatedClass(CustomRevEntityColumnMapping.class);
+ }
+
+ @BeforeClass(dependsOnMethods = "init")
+ public void initData() throws InterruptedException {
+ timestamp1 = System.currentTimeMillis();
+
+ Thread.sleep(100);
+
+ // Revision 1
+ EntityManager em = getEntityManager();
+ em.getTransaction().begin();
+ StrTestEntity te = new StrTestEntity("x");
+ em.persist(te);
+ id = te.getId();
+ em.getTransaction().commit();
+
+ timestamp2 = System.currentTimeMillis();
+
+ Thread.sleep(100);
+
+ // Revision 2
+ em.getTransaction().begin();
+ te = em.find(StrTestEntity.class, id);
+ te.setStr("y");
+ em.getTransaction().commit();
+
+ timestamp3 = System.currentTimeMillis();
+ }
+
+ @Test(expectedExceptions = RevisionDoesNotExistException.class)
+ public void testTimestamps1() {
+ getAuditReader().getRevisionNumberForDate(new Date(timestamp1));
+ }
+
+ @Test
+ public void testTimestamps() {
+ assert getAuditReader().getRevisionNumberForDate(new Date(timestamp2)).intValue() == 1;
+ assert getAuditReader().getRevisionNumberForDate(new Date(timestamp3)).intValue() == 2;
+ }
+
+ @Test
+ public void testDatesForRevisions() {
+ AuditReader vr = getAuditReader();
+ assert vr.getRevisionNumberForDate(vr.getRevisionDate(1l)).intValue() == 1;
+ assert vr.getRevisionNumberForDate(vr.getRevisionDate(2l)).intValue() == 2;
+ }
+
+ @Test
+ public void testRevisionsForDates() {
+ AuditReader vr = getAuditReader();
+
+ assert vr.getRevisionDate(vr.getRevisionNumberForDate(new Date(timestamp2))).getTime() <= timestamp2;
+ assert vr.getRevisionDate(vr.getRevisionNumberForDate(new Date(timestamp2)).longValue()+1l).getTime() > timestamp2;
+
+ assert vr.getRevisionDate(vr.getRevisionNumberForDate(new Date(timestamp3))).getTime() <= timestamp3;
+ }
+
+ @Test
+ public void testFindRevision() {
+ AuditReader vr = getAuditReader();
+
+ long rev1Timestamp = vr.findRevision(CustomRevEntityColumnMapping.class, 1l).getCustomTimestamp();
+ assert rev1Timestamp > timestamp1;
+ assert rev1Timestamp <= timestamp2;
+
+ long rev2Timestamp = vr.findRevision(CustomRevEntityColumnMapping.class, 2l).getCustomTimestamp();
+ assert rev2Timestamp > timestamp2;
+ assert rev2Timestamp <= timestamp3;
+ }
+
+ @Test
+ public void testRevisionsCounts() {
+ assert Arrays.asList(1l, 2l).equals(getAuditReader().getRevisions(StrTestEntity.class, id));
+ }
+
+ @Test
+ public void testHistoryOfId1() {
+ StrTestEntity ver1 = new StrTestEntity("x", id);
+ StrTestEntity ver2 = new StrTestEntity("y", id);
+
+ assert getAuditReader().find(StrTestEntity.class, id, 1l).equals(ver1);
+ assert getAuditReader().find(StrTestEntity.class, id, 2l).equals(ver2);
+ }
+}
\ No newline at end of file
15 years
Hibernate SVN: r18068 - in core/trunk/envers: src/main/java/org/hibernate/envers/configuration and 3 other directories.
by hibernate-commits@lists.jboss.org
Author: adamw
Date: 2009-11-25 11:32:05 -0500 (Wed, 25 Nov 2009)
New Revision: 18068
Added:
core/trunk/envers/src/test/java/org/hibernate/envers/test/entities/reventity/CustomRevEntityColumnMapping.java
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/reventity/CustomColumnMapping.java
Modified:
core/trunk/envers/pom.xml
core/trunk/envers/src/main/java/org/hibernate/envers/configuration/RevisionInfoConfiguration.java
core/trunk/envers/src/main/java/org/hibernate/envers/configuration/metadata/AuditMetadataGenerator.java
core/trunk/envers/src/main/java/org/hibernate/envers/configuration/metadata/MetadataTools.java
Log:
HHH-4611:
- handling the case when the revision number in the revision entity uses a @Column(columnDefinition=): the sql-type is property is then set on the REV property of audit entities
Modified: core/trunk/envers/pom.xml
===================================================================
--- core/trunk/envers/pom.xml 2009-11-25 15:24:24 UTC (rev 18067)
+++ core/trunk/envers/pom.xml 2009-11-25 16:32:05 UTC (rev 18068)
@@ -106,6 +106,12 @@
<scope>test</scope>
</dependency>
<dependency>
+ <groupId>mysql</groupId>
+ <artifactId>mysql-connector-java</artifactId>
+ <version>5.1.10</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
<groupId>cglib</groupId>
<artifactId>cglib</artifactId>
<scope>test</scope>
Modified: core/trunk/envers/src/main/java/org/hibernate/envers/configuration/RevisionInfoConfiguration.java
===================================================================
--- core/trunk/envers/src/main/java/org/hibernate/envers/configuration/RevisionInfoConfiguration.java 2009-11-25 15:24:24 UTC (rev 18067)
+++ core/trunk/envers/src/main/java/org/hibernate/envers/configuration/RevisionInfoConfiguration.java 2009-11-25 16:32:05 UTC (rev 18068)
@@ -49,6 +49,8 @@
import org.hibernate.type.LongType;
import org.hibernate.type.Type;
+import javax.persistence.Column;
+
/**
* @author Adam Warski (adam at warski dot org)
*/
@@ -59,6 +61,7 @@
private Type revisionInfoTimestampType;
private String revisionPropType;
+ private Column revisionPropColumn;
public RevisionInfoConfiguration() {
revisionInfoEntityName = "org.hibernate.envers.DefaultRevisionEntity";
@@ -90,10 +93,15 @@
private Element generateRevisionInfoRelationMapping() {
Document document = DocumentHelper.createDocument();
- Element rev_rel_mapping =document.addElement("key-many-to-one");
+ Element rev_rel_mapping = document.addElement("key-many-to-one");
rev_rel_mapping.addAttribute("type", revisionPropType);
rev_rel_mapping.addAttribute("class", revisionInfoEntityName);
+ if (revisionPropColumn != null) {
+ // Putting a fake name to make Hibernate happy. It will be replaced later anyway.
+ MetadataTools.addColumn(rev_rel_mapping, "*" , null, 0, 0, revisionPropColumn.columnDefinition());
+ }
+
return rev_rel_mapping;
}
@@ -125,6 +133,11 @@
throw new MappingException("The field annotated with @RevisionNumber must be of type " +
"int, Integer, long or Long");
}
+
+ // Getting the @Column definition of the revision number property, to later use that info to
+ // generate the same mapping for the relation from an audit table's revision number to the
+ // revision entity revision number.
+ revisionPropColumn = property.getAnnotation(Column.class);
}
if (revisionTimestamp != null) {
Modified: core/trunk/envers/src/main/java/org/hibernate/envers/configuration/metadata/AuditMetadataGenerator.java
===================================================================
--- core/trunk/envers/src/main/java/org/hibernate/envers/configuration/metadata/AuditMetadataGenerator.java 2009-11-25 15:24:24 UTC (rev 18067)
+++ core/trunk/envers/src/main/java/org/hibernate/envers/configuration/metadata/AuditMetadataGenerator.java 2009-11-25 16:32:05 UTC (rev 18068)
@@ -40,7 +40,6 @@
import org.hibernate.envers.entities.mapper.SubclassPropertyMapper;
import org.hibernate.envers.tools.StringTools;
import org.hibernate.envers.tools.Triple;
-import org.hibernate.envers.AuditTable;
import org.hibernate.MappingException;
import org.hibernate.cfg.Configuration;
@@ -90,8 +89,9 @@
void addRevisionInfoRelation(Element any_mapping) {
Element rev_mapping = (Element) revisionInfoRelationMapping.clone();
rev_mapping.addAttribute("name", verEntCfg.getRevisionFieldName());
- MetadataTools.addColumn(rev_mapping, verEntCfg.getRevisionFieldName(), null, 0, 0, null);
+ MetadataTools.addOrModifyColumn(rev_mapping, verEntCfg.getRevisionFieldName());
+
any_mapping.add(rev_mapping);
}
Modified: core/trunk/envers/src/main/java/org/hibernate/envers/configuration/metadata/MetadataTools.java
===================================================================
--- core/trunk/envers/src/main/java/org/hibernate/envers/configuration/metadata/MetadataTools.java 2009-11-25 15:24:24 UTC (rev 18067)
+++ core/trunk/envers/src/main/java/org/hibernate/envers/configuration/metadata/MetadataTools.java 2009-11-25 16:32:05 UTC (rev 18068)
@@ -68,6 +68,25 @@
return prop_mapping;
}
+ public static Element addOrModifyColumn(Element parent, String name) {
+ Element column_mapping = parent.element("column");
+
+ if (column_mapping == null) {
+ return addColumn(parent, name, null, 0, 0, null);
+ }
+
+ if (!StringTools.isEmpty(name)) {
+ Attribute nameAttribute = column_mapping.attribute("name");
+ if (nameAttribute == null) {
+ column_mapping.addAttribute("name", name);
+ } else {
+ nameAttribute.setValue(name);
+ }
+ }
+
+ return column_mapping;
+ }
+
public static Element addColumn(Element parent, String name, Integer length, Integer scale, Integer precision,
String sqlType) {
Element column_mapping = parent.addElement("column");
@@ -82,7 +101,7 @@
if (precision != 0) {
column_mapping.addAttribute("precision", Integer.toString(precision));
}
- if (sqlType != null) {
+ if (!StringTools.isEmpty(sqlType)) {
column_mapping.addAttribute("sql-type", sqlType);
}
Copied: core/trunk/envers/src/test/java/org/hibernate/envers/test/entities/reventity/CustomRevEntityColumnMapping.java (from rev 18023, core/trunk/envers/src/test/java/org/hibernate/envers/test/entities/reventity/CustomRevEntity.java)
===================================================================
--- core/trunk/envers/src/test/java/org/hibernate/envers/test/entities/reventity/CustomRevEntityColumnMapping.java (rev 0)
+++ core/trunk/envers/src/test/java/org/hibernate/envers/test/entities/reventity/CustomRevEntityColumnMapping.java 2009-11-25 16:32:05 UTC (rev 18068)
@@ -0,0 +1,85 @@
+/*
+ * Hibernate, Relational Persistence for Idiomatic Java
+ *
+ * Copyright (c) 2008, Red Hat Middleware LLC or third-party contributors as
+ * indicated by the @author tags or express copyright attribution
+ * statements applied by the authors. All third-party contributions are
+ * distributed under license by Red Hat Middleware LLC.
+ *
+ * This copyrighted material is made available to anyone wishing to use, modify,
+ * copy, or redistribute it subject to the terms and conditions of the GNU
+ * Lesser General Public License, as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+ * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
+ * for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this distribution; if not, write to:
+ * Free Software Foundation, Inc.
+ * 51 Franklin Street, Fifth Floor
+ * Boston, MA 02110-1301 USA
+ */
+package org.hibernate.envers.test.entities.reventity;
+
+import javax.persistence.Entity;
+import javax.persistence.GeneratedValue;
+import javax.persistence.Id;
+import javax.persistence.Column;
+
+import org.hibernate.envers.RevisionEntity;
+import org.hibernate.envers.RevisionNumber;
+import org.hibernate.envers.RevisionTimestamp;
+
+/**
+ * @author Adam Warski (adam at warski dot org)
+ */
+@Entity
+@RevisionEntity
+public class CustomRevEntityColumnMapping {
+ @Id
+ @GeneratedValue
+ @Column(columnDefinition = "int")
+ @RevisionNumber
+ private Long customId;
+
+ @RevisionTimestamp
+ private long customTimestamp;
+
+ public Long getCustomId() {
+ return customId;
+ }
+
+ public void setCustomId(Long customId) {
+ this.customId = customId;
+ }
+
+ public long getCustomTimestamp() {
+ return customTimestamp;
+ }
+
+ public void setCustomTimestamp(long customTimestamp) {
+ this.customTimestamp = customTimestamp;
+ }
+
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) return true;
+ if (o == null || getClass() != o.getClass()) return false;
+
+ CustomRevEntityColumnMapping that = (CustomRevEntityColumnMapping) o;
+
+ if (customTimestamp != that.customTimestamp) return false;
+ if (customId != null ? !customId.equals(that.customId) : that.customId != null) return false;
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ int result = customId != null ? customId.hashCode() : 0;
+ result = 31 * result + (int) (customTimestamp ^ (customTimestamp >>> 32));
+ return result;
+ }
+}
\ No newline at end of file
Copied: core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/reventity/CustomColumnMapping.java (from rev 18023, core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/reventity/Custom.java)
===================================================================
--- core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/reventity/CustomColumnMapping.java (rev 0)
+++ core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/reventity/CustomColumnMapping.java 2009-11-25 16:32:05 UTC (rev 18068)
@@ -0,0 +1,137 @@
+/*
+ * Hibernate, Relational Persistence for Idiomatic Java
+ *
+ * Copyright (c) 2008, Red Hat Middleware LLC or third-party contributors as
+ * indicated by the @author tags or express copyright attribution
+ * statements applied by the authors. All third-party contributions are
+ * distributed under license by Red Hat Middleware LLC.
+ *
+ * This copyrighted material is made available to anyone wishing to use, modify,
+ * copy, or redistribute it subject to the terms and conditions of the GNU
+ * Lesser General Public License, as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+ * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
+ * for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this distribution; if not, write to:
+ * Free Software Foundation, Inc.
+ * 51 Franklin Street, Fifth Floor
+ * Boston, MA 02110-1301 USA
+ */
+package org.hibernate.envers.test.integration.reventity;
+
+import java.util.Arrays;
+import java.util.Date;
+import javax.persistence.EntityManager;
+
+import org.hibernate.envers.AuditReader;
+import org.hibernate.envers.exception.RevisionDoesNotExistException;
+import org.hibernate.envers.test.AbstractEntityTest;
+import org.hibernate.envers.test.entities.StrTestEntity;
+import org.hibernate.envers.test.entities.reventity.CustomRevEntityColumnMapping;
+import org.testng.annotations.BeforeClass;
+import org.testng.annotations.Test;
+
+import org.hibernate.ejb.Ejb3Configuration;
+
+/**
+ * Test which checks if auditing when the revision number in the revision entity has a @Column annotation with
+ * a columnDefinition specified works.
+ * @author Adam Warski (adam at warski dot org)
+ */
+public class CustomColumnMapping extends AbstractEntityTest {
+ private Integer id;
+ private long timestamp1;
+ private long timestamp2;
+ private long timestamp3;
+
+ public void configure(Ejb3Configuration cfg) {
+ cfg.addAnnotatedClass(StrTestEntity.class);
+ cfg.addAnnotatedClass(CustomRevEntityColumnMapping.class);
+ }
+
+ @BeforeClass(dependsOnMethods = "init")
+ public void initData() throws InterruptedException {
+ timestamp1 = System.currentTimeMillis();
+
+ Thread.sleep(100);
+
+ // Revision 1
+ EntityManager em = getEntityManager();
+ em.getTransaction().begin();
+ StrTestEntity te = new StrTestEntity("x");
+ em.persist(te);
+ id = te.getId();
+ em.getTransaction().commit();
+
+ timestamp2 = System.currentTimeMillis();
+
+ Thread.sleep(100);
+
+ // Revision 2
+ em.getTransaction().begin();
+ te = em.find(StrTestEntity.class, id);
+ te.setStr("y");
+ em.getTransaction().commit();
+
+ timestamp3 = System.currentTimeMillis();
+ }
+
+ @Test(expectedExceptions = RevisionDoesNotExistException.class)
+ public void testTimestamps1() {
+ getAuditReader().getRevisionNumberForDate(new Date(timestamp1));
+ }
+
+ @Test
+ public void testTimestamps() {
+ assert getAuditReader().getRevisionNumberForDate(new Date(timestamp2)).intValue() == 1;
+ assert getAuditReader().getRevisionNumberForDate(new Date(timestamp3)).intValue() == 2;
+ }
+
+ @Test
+ public void testDatesForRevisions() {
+ AuditReader vr = getAuditReader();
+ assert vr.getRevisionNumberForDate(vr.getRevisionDate(1l)).intValue() == 1;
+ assert vr.getRevisionNumberForDate(vr.getRevisionDate(2l)).intValue() == 2;
+ }
+
+ @Test
+ public void testRevisionsForDates() {
+ AuditReader vr = getAuditReader();
+
+ assert vr.getRevisionDate(vr.getRevisionNumberForDate(new Date(timestamp2))).getTime() <= timestamp2;
+ assert vr.getRevisionDate(vr.getRevisionNumberForDate(new Date(timestamp2)).longValue()+1l).getTime() > timestamp2;
+
+ assert vr.getRevisionDate(vr.getRevisionNumberForDate(new Date(timestamp3))).getTime() <= timestamp3;
+ }
+
+ @Test
+ public void testFindRevision() {
+ AuditReader vr = getAuditReader();
+
+ long rev1Timestamp = vr.findRevision(CustomRevEntityColumnMapping.class, 1l).getCustomTimestamp();
+ assert rev1Timestamp > timestamp1;
+ assert rev1Timestamp <= timestamp2;
+
+ long rev2Timestamp = vr.findRevision(CustomRevEntityColumnMapping.class, 2l).getCustomTimestamp();
+ assert rev2Timestamp > timestamp2;
+ assert rev2Timestamp <= timestamp3;
+ }
+
+ @Test
+ public void testRevisionsCounts() {
+ assert Arrays.asList(1l, 2l).equals(getAuditReader().getRevisions(StrTestEntity.class, id));
+ }
+
+ @Test
+ public void testHistoryOfId1() {
+ StrTestEntity ver1 = new StrTestEntity("x", id);
+ StrTestEntity ver2 = new StrTestEntity("y", id);
+
+ assert getAuditReader().find(StrTestEntity.class, id, 1l).equals(ver1);
+ assert getAuditReader().find(StrTestEntity.class, id, 2l).equals(ver2);
+ }
+}
\ No newline at end of file
15 years
Hibernate SVN: r18067 - core/branches/Branch_3_3_2_GA_CP/distribution/src/assembly.
by hibernate-commits@lists.jboss.org
Author: stliu
Date: 2009-11-25 10:24:24 -0500 (Wed, 25 Nov 2009)
New Revision: 18067
Modified:
core/branches/Branch_3_3_2_GA_CP/distribution/src/assembly/dist.xml
Log:
JBPAPP-3162 hibernate core distro does not contains asm
Modified: core/branches/Branch_3_3_2_GA_CP/distribution/src/assembly/dist.xml
===================================================================
--- core/branches/Branch_3_3_2_GA_CP/distribution/src/assembly/dist.xml 2009-11-25 14:46:52 UTC (rev 18066)
+++ core/branches/Branch_3_3_2_GA_CP/distribution/src/assembly/dist.xml 2009-11-25 15:24:24 UTC (rev 18067)
@@ -140,6 +140,7 @@
<outputDirectory>lib/bytecode/cglib</outputDirectory>
<includes>
<include>cglib:cglib</include>
+ <include>asm:asm</include>
</includes>
</dependencySet>
15 years