Hibernate SVN: r14649 - in core/trunk/distribution: src/assembly and 1 other directory.
by hibernate-commits@lists.jboss.org
Author: steve.ebersole(a)jboss.com
Date: 2008-05-07 14:26:17 -0400 (Wed, 07 May 2008)
New Revision: 14649
Modified:
core/trunk/distribution/pom.xml
core/trunk/distribution/src/assembly/dist.xml
Log:
HHH-3266, HHH-3267, HHH-3268 : missing deps in dist bundle
Modified: core/trunk/distribution/pom.xml
===================================================================
--- core/trunk/distribution/pom.xml 2008-05-07 18:11:38 UTC (rev 14648)
+++ core/trunk/distribution/pom.xml 2008-05-07 18:26:17 UTC (rev 14649)
@@ -112,6 +112,26 @@
<artifactId>hibernate-proxool</artifactId>
<version>${project.version}</version>
</dependency>
+
+ <!-- optional deps for bytecode providers since they are optional on core -->
+ <dependency>
+ <groupId>javassist</groupId>
+ <artifactId>javassist</artifactId>
+ <version>3.4.GA</version>
+ <optional>true</optional>
+ </dependency>
+ <dependency>
+ <groupId>cglib</groupId>
+ <artifactId>cglib</artifactId>
+ <version>2.1_3</version>
+ <optional>true</optional>
+ </dependency>
+ <dependency>
+ <groupId>asm</groupId>
+ <artifactId>asm-attrs</artifactId>
+ <version>1.5.3</version>
+ <optional>true</optional>
+ </dependency>
</dependencies>
<profiles>
Modified: core/trunk/distribution/src/assembly/dist.xml
===================================================================
--- core/trunk/distribution/src/assembly/dist.xml 2008-05-07 18:11:38 UTC (rev 14648)
+++ core/trunk/distribution/src/assembly/dist.xml 2008-05-07 18:26:17 UTC (rev 14649)
@@ -70,10 +70,6 @@
<includes>
<include>antlr:antlr</include>
- <include>cglib:cglib</include>
- <include>asm:asm</include>
- <include>asm:asm-attrs</include>
-
<include>commons-collections:commons-collections</include>
<include>dom4j:dom4j</include>
@@ -81,6 +77,8 @@
<include>javassist:javassist</include>
<include>org.slf4j:slf4j-api</include>
+
+ <include>javax.transaction:jta</include>
</includes>
</dependencySet>
@@ -137,6 +135,22 @@
<include>swarmcache:swarmcache</include>
</includes>
</dependencySet>
+
+ <dependencySet>
+ <outputDirectory>lib/bytecode/cglib</outputDirectory>
+ <includes>
+ <include>cglib:cglib</include>
+ <include>asm:asm</include>
+ <include>asm:asm-attrs</include>
+ </includes>
+ </dependencySet>
+
+ <dependencySet>
+ <outputDirectory>lib/bytecode/javassist</outputDirectory>
+ <includes>
+ <include>javassist:javassist</include>
+ </includes>
+ </dependencySet>
</dependencySets>
<fileSets>
16 years, 7 months
Hibernate SVN: r14648 - core/trunk/core/src/main/java/org/hibernate/event.
by hibernate-commits@lists.jboss.org
Author: steve.ebersole(a)jboss.com
Date: 2008-05-07 14:11:38 -0400 (Wed, 07 May 2008)
New Revision: 14648
Modified:
core/trunk/core/src/main/java/org/hibernate/event/EventListeners.java
Log:
HHH-3261 : fixed wrapping of exception from initialize/destory listeners
Modified: core/trunk/core/src/main/java/org/hibernate/event/EventListeners.java
===================================================================
--- core/trunk/core/src/main/java/org/hibernate/event/EventListeners.java 2008-05-07 14:31:16 UTC (rev 14647)
+++ core/trunk/core/src/main/java/org/hibernate/event/EventListeners.java 2008-05-07 18:11:38 UTC (rev 14648)
@@ -29,7 +29,6 @@
import java.util.HashMap;
import java.util.Map;
-import org.hibernate.AssertionFailure;
import org.hibernate.MappingException;
import org.hibernate.HibernateException;
import org.hibernate.cfg.Configuration;
@@ -162,19 +161,24 @@
private void processListeners(ListenerProcesser processer) {
Field[] fields = getClass().getDeclaredFields();
for ( int i = 0; i < fields.length; i++ ) {
+ final Object[] listeners;
try {
- final Object field = fields[i].get( this );
- if ( field instanceof Object[] ) {
- final Object[] listeners = ( Object[] ) field;
- int length = listeners.length;
- for ( int index = 0 ; index < length ; index++ ) {
- processer.processListener( listeners[index ] );
- }
+ Object fieldValue = fields[i].get(this);
+ if ( fieldValue instanceof Object[] ) {
+ listeners = ( Object[] ) fieldValue;
}
+ else {
+ continue;
+ }
}
- catch ( Exception e ) {
- throw new HibernateException( "could not process listeners", e );
+ catch ( Throwable t ) {
+ throw new HibernateException( "could not init listeners", t );
}
+
+ int length = listeners.length;
+ for ( int index = 0 ; index < length ; index++ ) {
+ processer.processListener( listeners[index ] );
+ }
}
}
@@ -201,6 +205,10 @@
}
}
+ /**
+ * Call {@link Destructible#cleanup} on any listeners that implement the
+ * {@link Destructible} interface.
+ */
public void destroyListeners() {
try {
processListeners(
16 years, 7 months
Hibernate SVN: r14647 - validator/trunk/src/java/org/hibernate/validator/interpolator.
by hibernate-commits@lists.jboss.org
Author: epbernard
Date: 2008-05-07 10:31:16 -0400 (Wed, 07 May 2008)
New Revision: 14647
Removed:
validator/trunk/src/java/org/hibernate/validator/interpolator/DefaultMessageInterpolatorAggerator.java
Log:
remove class with typo in name
Deleted: validator/trunk/src/java/org/hibernate/validator/interpolator/DefaultMessageInterpolatorAggerator.java
===================================================================
--- validator/trunk/src/java/org/hibernate/validator/interpolator/DefaultMessageInterpolatorAggerator.java 2008-05-07 07:22:26 UTC (rev 14646)
+++ validator/trunk/src/java/org/hibernate/validator/interpolator/DefaultMessageInterpolatorAggerator.java 2008-05-07 14:31:16 UTC (rev 14647)
@@ -1,57 +0,0 @@
-//$Id: $
-package org.hibernate.validator.interpolator;
-
-import java.lang.annotation.Annotation;
-import java.util.Map;
-import java.util.HashMap;
-import java.util.ResourceBundle;
-import java.io.Serializable;
-
-import org.hibernate.validator.MessageInterpolator;
-import org.hibernate.validator.Validator;
-import org.hibernate.AssertionFailure;
-
-/**
- * @author Emmanuel Bernard
- */
-public class DefaultMessageInterpolatorAggerator implements MessageInterpolator, Serializable {
- private Map<Validator, DefaultMessageInterpolator> interpolators = new HashMap<Validator, DefaultMessageInterpolator>();
- //transient but repopulated by the object owing a reference to the interpolator
- private transient ResourceBundle messageBundle;
- //transient but repopulated by the object owing a reference to the interpolator
- private transient ResourceBundle defaultMessageBundle;
-
- //not an interface method
- public void initialize(ResourceBundle messageBundle, ResourceBundle defaultMessageBundle) {
- this.messageBundle = messageBundle;
- this.defaultMessageBundle = defaultMessageBundle;
- //useful when we deserialize
- for ( DefaultMessageInterpolator interpolator : interpolators.values() ) {
- interpolator.initialize( messageBundle, defaultMessageBundle );
- }
- }
-
- public void addInterpolator(Annotation annotation, Validator validator) {
- DefaultMessageInterpolator interpolator = new DefaultMessageInterpolator();
- interpolator.initialize(messageBundle, defaultMessageBundle );
- interpolator.initialize( annotation, null );
- interpolators.put( validator, interpolator );
- }
-
- public String interpolate(String message, Validator validator, MessageInterpolator defaultInterpolator) {
- DefaultMessageInterpolator defaultMessageInterpolator = interpolators.get( validator );
- if (defaultMessageInterpolator == null) {
- return message;
- }
- else {
- return defaultMessageInterpolator.interpolate( message, validator, defaultInterpolator );
- }
- }
-
- public String getAnnotationMessage(Validator validator) {
- DefaultMessageInterpolator defaultMessageInterpolator = interpolators.get( validator );
- String message = defaultMessageInterpolator != null ? defaultMessageInterpolator.getAnnotationMessage() : null;
- if (message == null) throw new AssertionFailure("Validator not registred to the messageInterceptorAggregator");
- return message;
- }
-}
16 years, 7 months
Hibernate SVN: r14646 - in validator/trunk/src: java/org/hibernate/validator/interpolator and 1 other directories.
by hibernate-commits@lists.jboss.org
Author: epbernard
Date: 2008-05-07 03:22:26 -0400 (Wed, 07 May 2008)
New Revision: 14646
Added:
validator/trunk/src/java/org/hibernate/validator/interpolator/DefaultMessageInterpolatorAggregator.java
Modified:
validator/trunk/src/java/org/hibernate/validator/ClassValidator.java
validator/trunk/src/test/org/hibernate/validator/test/ValidatorTest.java
Log:
test serialiazibility. Make one DefaultMessageInterporatorAggregator transient, fix class typo
Modified: validator/trunk/src/java/org/hibernate/validator/ClassValidator.java
===================================================================
--- validator/trunk/src/java/org/hibernate/validator/ClassValidator.java 2008-05-07 01:30:40 UTC (rev 14645)
+++ validator/trunk/src/java/org/hibernate/validator/ClassValidator.java 2008-05-07 07:22:26 UTC (rev 14646)
@@ -39,7 +39,7 @@
import org.hibernate.annotations.common.reflection.XProperty;
import org.hibernate.annotations.common.reflection.java.JavaReflectionManager;
import org.hibernate.util.IdentitySet;
-import org.hibernate.validator.interpolator.DefaultMessageInterpolatorAggerator;
+import org.hibernate.validator.interpolator.DefaultMessageInterpolatorAggregator;
/**
@@ -77,7 +77,7 @@
private transient List<Validator> memberValidators;
private transient List<XMember> memberGetters;
private transient List<XMember> childGetters;
- private transient DefaultMessageInterpolatorAggerator defaultInterpolator;
+ private transient DefaultMessageInterpolatorAggregator defaultInterpolator;
private transient MessageInterpolator userInterpolator;
private static final Filter GET_ALL_FILTER = new Filter() {
public boolean returnStatic() {
@@ -192,7 +192,7 @@
memberValidators = new ArrayList<Validator>();
memberGetters = new ArrayList<XMember>();
childGetters = new ArrayList<XMember>();
- defaultInterpolator = new DefaultMessageInterpolatorAggerator();
+ defaultInterpolator = new DefaultMessageInterpolatorAggregator();
defaultInterpolator.initialize( messageBundle, defaultMessageBundle );
//build the class hierarchy to look for members in
Copied: validator/trunk/src/java/org/hibernate/validator/interpolator/DefaultMessageInterpolatorAggregator.java (from rev 14609, validator/trunk/src/java/org/hibernate/validator/interpolator/DefaultMessageInterpolatorAggerator.java)
===================================================================
--- validator/trunk/src/java/org/hibernate/validator/interpolator/DefaultMessageInterpolatorAggregator.java (rev 0)
+++ validator/trunk/src/java/org/hibernate/validator/interpolator/DefaultMessageInterpolatorAggregator.java 2008-05-07 07:22:26 UTC (rev 14646)
@@ -0,0 +1,57 @@
+//$Id: $
+package org.hibernate.validator.interpolator;
+
+import java.lang.annotation.Annotation;
+import java.util.Map;
+import java.util.HashMap;
+import java.util.ResourceBundle;
+import java.io.Serializable;
+
+import org.hibernate.validator.MessageInterpolator;
+import org.hibernate.validator.Validator;
+import org.hibernate.AssertionFailure;
+
+/**
+ * @author Emmanuel Bernard
+ */
+public class DefaultMessageInterpolatorAggregator implements MessageInterpolator, Serializable {
+ private transient Map<Validator, DefaultMessageInterpolator> interpolators = new HashMap<Validator, DefaultMessageInterpolator>();
+ //transient but repopulated by the object owing a reference to the interpolator
+ private transient ResourceBundle messageBundle;
+ //transient but repopulated by the object owing a reference to the interpolator
+ private transient ResourceBundle defaultMessageBundle;
+
+ //not an interface method
+ public void initialize(ResourceBundle messageBundle, ResourceBundle defaultMessageBundle) {
+ this.messageBundle = messageBundle;
+ this.defaultMessageBundle = defaultMessageBundle;
+ //useful when we deserialize
+ for ( DefaultMessageInterpolator interpolator : interpolators.values() ) {
+ interpolator.initialize( messageBundle, defaultMessageBundle );
+ }
+ }
+
+ public void addInterpolator(Annotation annotation, Validator validator) {
+ DefaultMessageInterpolator interpolator = new DefaultMessageInterpolator();
+ interpolator.initialize(messageBundle, defaultMessageBundle );
+ interpolator.initialize( annotation, null );
+ interpolators.put( validator, interpolator );
+ }
+
+ public String interpolate(String message, Validator validator, MessageInterpolator defaultInterpolator) {
+ DefaultMessageInterpolator defaultMessageInterpolator = interpolators.get( validator );
+ if (defaultMessageInterpolator == null) {
+ return message;
+ }
+ else {
+ return defaultMessageInterpolator.interpolate( message, validator, defaultInterpolator );
+ }
+ }
+
+ public String getAnnotationMessage(Validator validator) {
+ DefaultMessageInterpolator defaultMessageInterpolator = interpolators.get( validator );
+ String message = defaultMessageInterpolator != null ? defaultMessageInterpolator.getAnnotationMessage() : null;
+ if (message == null) throw new AssertionFailure("Validator not registred to the messageInterceptorAggregator");
+ return message;
+ }
+}
Modified: validator/trunk/src/test/org/hibernate/validator/test/ValidatorTest.java
===================================================================
--- validator/trunk/src/test/org/hibernate/validator/test/ValidatorTest.java 2008-05-07 01:30:40 UTC (rev 14645)
+++ validator/trunk/src/test/org/hibernate/validator/test/ValidatorTest.java 2008-05-07 07:22:26 UTC (rev 14646)
@@ -2,6 +2,11 @@
package org.hibernate.validator.test;
import java.io.Serializable;
+import java.io.ByteArrayOutputStream;
+import java.io.ObjectOutput;
+import java.io.ObjectOutputStream;
+import java.io.ByteArrayInputStream;
+import java.io.ObjectInputStream;
import java.math.BigInteger;
import java.util.Date;
import java.util.Locale;
@@ -140,6 +145,47 @@
}
}
+ public void testSerialization() throws Exception {
+
+ Tv tv = new Tv();
+ tv.serial = "FS";
+ tv.name = "TooLong";
+ tv.expDate = new Date( new Date().getTime() + 1000 * 60 * 60 * 24 * 10 );
+ ClassValidator<Tv> classValidator = new ClassValidator<Tv>( Tv.class );
+
+ ByteArrayOutputStream stream = new ByteArrayOutputStream();
+ ObjectOutput out = new ObjectOutputStream( stream );
+ out.writeObject( classValidator );
+ out.close();
+ byte[] serialized = stream.toByteArray();
+ stream.close();
+ ByteArrayInputStream byteIn = new ByteArrayInputStream( serialized );
+ ObjectInputStream in = new ObjectInputStream( byteIn );
+ classValidator = (ClassValidator<Tv>) in.readObject();
+ in.close();
+ byteIn.close();
+
+
+ InvalidValue[] invalidValues = classValidator.getInvalidValues( tv );
+ assertEquals( 1, invalidValues.length );
+ Locale loc = Locale.getDefault();
+ if ( loc.toString().startsWith( "en" ) ) {
+ assertEquals( "length must be between 0 and 2", invalidValues[0].getMessage() );
+ }
+ else if ( loc.toString().startsWith( "fr" ) ) {
+ String message = invalidValues[0].getMessage();
+ String message2 ="la longueur doit �tre entre 0 et 2";
+ assertEquals( message2, message );
+ }
+ else if ( loc.toString().startsWith( "da" ) ) {
+ assertEquals( "l�ngden skal v�re mellem 0 og 2", invalidValues[0].getMessage() );
+ }
+ else {
+ // if default not found then it must be english
+ assertEquals( "length must be between 0 and 2", invalidValues[0].getMessage() );
+ }
+ }
+
public class PrefixMessageInterpolator implements MessageInterpolator, Serializable {
private String prefix;
16 years, 7 months
Hibernate SVN: r14645 - core/branches/Branch_3_2_4_SP1_CP.
by hibernate-commits@lists.jboss.org
Author: gbadner
Date: 2008-05-06 21:30:40 -0400 (Tue, 06 May 2008)
New Revision: 14645
Modified:
core/branches/Branch_3_2_4_SP1_CP/changelog.txt
Log:
corrected release date to coincide with EAP 4.2 GA
Modified: core/branches/Branch_3_2_4_SP1_CP/changelog.txt
===================================================================
--- core/branches/Branch_3_2_4_SP1_CP/changelog.txt 2008-05-06 17:25:29 UTC (rev 14644)
+++ core/branches/Branch_3_2_4_SP1_CP/changelog.txt 2008-05-07 01:30:40 UTC (rev 14645)
@@ -19,7 +19,7 @@
* [JBPAPP-357 / HHH-2542] - NullPointerException in TypeFactory.replaceAssociations for ComponentType
-Changes in version 3.2.4.sp1.cp01 (2007-09-13)
+Changes in version 3.2.4.sp1.cp01 (2007-06-28)
-------------------------------------------
** Bug
16 years, 7 months
Hibernate SVN: r14643 - core/trunk/cache-jbosscache2.
by hibernate-commits@lists.jboss.org
Author: bstansberry(a)jboss.com
Date: 2008-05-06 11:47:22 -0400 (Tue, 06 May 2008)
New Revision: 14643
Modified:
core/trunk/cache-jbosscache2/pom.xml
Log:
[HHH-3141] Move to JBoss Cache 2.1.1.GA
Modified: core/trunk/cache-jbosscache2/pom.xml
===================================================================
--- core/trunk/cache-jbosscache2/pom.xml 2008-05-05 15:20:22 UTC (rev 14642)
+++ core/trunk/cache-jbosscache2/pom.xml 2008-05-06 15:47:22 UTC (rev 14643)
@@ -25,7 +25,7 @@
<dependency>
<groupId>org.jboss.cache</groupId>
<artifactId>jbosscache-core</artifactId>
- <version>2.1.1.CR2</version>
+ <version>2.1.1.GA</version>
</dependency>
<!-- test dependencies -->
@@ -196,4 +196,4 @@
</properties>
</profile>
</profiles>
-</project>
\ No newline at end of file
+</project>
16 years, 7 months
Hibernate SVN: r14642 - in search/trunk/src: java/org/hibernate/search/impl and 1 other directories.
by hibernate-commits@lists.jboss.org
Author: epbernard
Date: 2008-05-05 11:20:22 -0400 (Mon, 05 May 2008)
New Revision: 14642
Modified:
search/trunk/src/java/org/hibernate/search/SearchFactory.java
search/trunk/src/java/org/hibernate/search/impl/InitContext.java
search/trunk/src/java/org/hibernate/search/impl/SearchFactoryImpl.java
search/trunk/src/test/org/hibernate/search/test/embedded/doubleinsert/Contact.java
Log:
HSEARCH-195 return analyzer instances by name
Modified: search/trunk/src/java/org/hibernate/search/SearchFactory.java
===================================================================
--- search/trunk/src/java/org/hibernate/search/SearchFactory.java 2008-05-03 20:11:12 UTC (rev 14641)
+++ search/trunk/src/java/org/hibernate/search/SearchFactory.java 2008-05-05 15:20:22 UTC (rev 14642)
@@ -1,8 +1,11 @@
-//$Id: $
+//$Id$
package org.hibernate.search;
+import java.util.Map;
+
import org.hibernate.search.reader.ReaderProvider;
import org.hibernate.search.store.DirectoryProvider;
+import org.apache.lucene.analysis.Analyzer;
/**
* Provide application wide operations as well as access to the underlying Lucene resources.
@@ -33,4 +36,12 @@
* Optimize the index holding <code>entityType</code>
*/
void optimize(Class entityType);
+
+ /**
+ * Experimental API
+ * retrieve an analyzer instance by its definition name
+ *
+ * @throws SearchException if the definition name is unknown
+ */
+ Analyzer getAnalyzer(String name);
}
Modified: search/trunk/src/java/org/hibernate/search/impl/InitContext.java
===================================================================
--- search/trunk/src/java/org/hibernate/search/impl/InitContext.java 2008-05-03 20:11:12 UTC (rev 14641)
+++ search/trunk/src/java/org/hibernate/search/impl/InitContext.java 2008-05-05 15:20:22 UTC (rev 14642)
@@ -134,26 +134,34 @@
return defaultSimilarity;
}
- public void initLazyAnalyzers() {
- Map<String, Analyzer> initializedAnalizers = new HashMap<String, Analyzer>( analyzerDefs.size() );
+ public Map<String, Analyzer> initLazyAnalyzers() {
+ Map<String, Analyzer> initializedAnalyzers = new HashMap<String, Analyzer>( analyzerDefs.size() );
for (DelegateNamedAnalyzer namedAnalyzer : lazyAnalyzers) {
String name = namedAnalyzer.getName();
- if ( initializedAnalizers.containsKey( name ) ) {
- namedAnalyzer.setDelegate( initializedAnalizers.get( name ) );
+ if ( initializedAnalyzers.containsKey( name ) ) {
+ namedAnalyzer.setDelegate( initializedAnalyzers.get( name ) );
}
else {
if ( analyzerDefs.containsKey( name ) ) {
final Analyzer analyzer = buildAnalyzer( analyzerDefs.get( name ) );
namedAnalyzer.setDelegate( analyzer );
- initializedAnalizers.put( name, analyzer );
+ initializedAnalyzers.put( name, analyzer );
}
else {
- //exception
throw new SearchException("Analyzer found with an unknown definition: " + name);
}
}
}
+
+ //initialize the remaining definitions
+ for ( Map.Entry<String, AnalyzerDef> entry : analyzerDefs.entrySet() ) {
+ if ( ! initializedAnalyzers.containsKey( entry.getKey() ) ) {
+ final Analyzer analyzer = buildAnalyzer( entry.getValue() );
+ initializedAnalyzers.put( entry.getKey(), analyzer );
+ }
+ }
+ return Collections.unmodifiableMap( initializedAnalyzers );
}
private Analyzer buildAnalyzer(AnalyzerDef analyzerDef) {
Modified: search/trunk/src/java/org/hibernate/search/impl/SearchFactoryImpl.java
===================================================================
--- search/trunk/src/java/org/hibernate/search/impl/SearchFactoryImpl.java 2008-05-03 20:11:12 UTC (rev 14641)
+++ search/trunk/src/java/org/hibernate/search/impl/SearchFactoryImpl.java 2008-05-05 15:20:22 UTC (rev 14642)
@@ -43,6 +43,7 @@
import org.hibernate.search.store.DirectoryProvider;
import org.hibernate.search.store.DirectoryProviderFactory;
import org.hibernate.search.store.optimization.OptimizerStrategy;
+import org.apache.lucene.analysis.Analyzer;
/**
* @author Emmanuel Bernard
@@ -66,13 +67,14 @@
private BackendQueueProcessorFactory backendQueueProcessorFactory;
private Map<String, FilterDef> filterDefinitions = new HashMap<String, FilterDef>();
private FilterCachingStrategy filterCachingStrategy;
- private String indexingStrategy;
+ private Map<String, Analyzer> analyzers;
/**
* Each directory provider (index) can have its own performance settings.
*/
private Map<DirectoryProvider, LuceneIndexingParameters> dirProviderIndexingParams =
new HashMap<DirectoryProvider, LuceneIndexingParameters>();
+ private String indexingStrategy;
public BackendQueueProcessorFactory getBackendQueueProcessorFactory() {
@@ -256,6 +258,12 @@
getBackendQueueProcessorFactory().getProcessor( queue ).run();
}
+ public Analyzer getAnalyzer(String name) {
+ final Analyzer analyzer = analyzers.get( name );
+ if ( analyzer == null) throw new SearchException( "Unknown Analyzer definition: " + name);
+ return analyzer;
+ }
+
private void initDocumentBuilders(Configuration cfg, ReflectionManager reflectionManager, InitContext context) {
Iterator iter = cfg.getClassMappings();
DirectoryProviderFactory factory = new DirectoryProviderFactory();
@@ -281,7 +289,7 @@
}
}
}
- context.initLazyAnalyzers();
+ analyzers = context.initLazyAnalyzers();
factory.startDirectoryProviders();
}
Modified: search/trunk/src/test/org/hibernate/search/test/embedded/doubleinsert/Contact.java
===================================================================
--- search/trunk/src/test/org/hibernate/search/test/embedded/doubleinsert/Contact.java 2008-05-03 20:11:12 UTC (rev 14641)
+++ search/trunk/src/test/org/hibernate/search/test/embedded/doubleinsert/Contact.java 2008-05-05 15:20:22 UTC (rev 14642)
@@ -22,7 +22,8 @@
import org.apache.commons.collections.CollectionUtils;
import org.apache.commons.collections.Predicate;
-import org.apache.log4j.Logger;
+import org.apache.commons.logging.LogFactory;
+import org.apache.commons.logging.Log;
import org.hibernate.annotations.Type;
import org.hibernate.search.annotations.ContainedIn;
import org.hibernate.search.annotations.DocumentId;
@@ -39,7 +40,7 @@
@Indexed
public class Contact implements Serializable {
- private static Logger logger = Logger.getLogger(Contact.class);
+ private static Log logger = LogFactory.getLog(Contact.class);
private static final long serialVersionUID = 1L;
16 years, 7 months
Hibernate SVN: r14641 - core/trunk/core/src/main/java/org/hibernate/dialect.
by hibernate-commits@lists.jboss.org
Author: d.plentz
Date: 2008-05-03 16:11:12 -0400 (Sat, 03 May 2008)
New Revision: 14641
Modified:
core/trunk/core/src/main/java/org/hibernate/dialect/H2Dialect.java
Log:
[HHH-2683] "datediff" is declared as NoArgSQLFunction in H2Dialect, but actually accepts 3 arguments
Modified: core/trunk/core/src/main/java/org/hibernate/dialect/H2Dialect.java
===================================================================
--- core/trunk/core/src/main/java/org/hibernate/dialect/H2Dialect.java 2008-05-03 03:30:16 UTC (rev 14640)
+++ core/trunk/core/src/main/java/org/hibernate/dialect/H2Dialect.java 2008-05-03 20:11:12 UTC (rev 14641)
@@ -132,7 +132,7 @@
registerFunction("current_date", new NoArgSQLFunction("current_date", Hibernate.DATE));
registerFunction("current_time", new NoArgSQLFunction("current_time", Hibernate.TIME));
registerFunction("current_timestamp", new NoArgSQLFunction("current_timestamp", Hibernate.TIMESTAMP));
- registerFunction("datediff", new NoArgSQLFunction("datediff", Hibernate.INTEGER));
+ registerFunction("datediff", new StandardSQLFunction("datediff", Hibernate.INTEGER));
registerFunction("dayname", new StandardSQLFunction("dayname", Hibernate.STRING));
registerFunction("dayofmonth", new StandardSQLFunction("dayofmonth", Hibernate.INTEGER));
registerFunction("dayofweek", new StandardSQLFunction("dayofweek", Hibernate.INTEGER));
16 years, 8 months
Hibernate SVN: r14640 - in search/trunk/src/java/org/hibernate/search: impl and 1 other directory.
by hibernate-commits@lists.jboss.org
Author: epbernard
Date: 2008-05-02 23:30:16 -0400 (Fri, 02 May 2008)
New Revision: 14640
Modified:
search/trunk/src/java/org/hibernate/search/FullTextSession.java
search/trunk/src/java/org/hibernate/search/impl/FullTextSessionImpl.java
Log:
Minor Javadoc
Modified: search/trunk/src/java/org/hibernate/search/FullTextSession.java
===================================================================
--- search/trunk/src/java/org/hibernate/search/FullTextSession.java 2008-05-02 23:25:33 UTC (rev 14639)
+++ search/trunk/src/java/org/hibernate/search/FullTextSession.java 2008-05-03 03:30:16 UTC (rev 14640)
@@ -21,6 +21,9 @@
/**
* Force the (re)indexing of a given <b>managed</b> object.
* Indexation is batched per transaction
+ * Non indexable entities are ignored
+ *
+ * @param entity The entity to index - must not be <code>null</code>.
*/
void index(Object entity);
Modified: search/trunk/src/java/org/hibernate/search/impl/FullTextSessionImpl.java
===================================================================
--- search/trunk/src/java/org/hibernate/search/impl/FullTextSessionImpl.java 2008-05-02 23:25:33 UTC (rev 14639)
+++ search/trunk/src/java/org/hibernate/search/impl/FullTextSessionImpl.java 2008-05-03 03:30:16 UTC (rev 14640)
@@ -128,7 +128,7 @@
* Non indexable entities are ignored
* The entity must be associated with the session
*
- * @param entity The neity to index - must not be <code>null</code>.
+ * @param entity The entity to index - must not be <code>null</code>.
*/
public void index(Object entity) {
if (entity == null) return;
16 years, 8 months