Hibernate SVN: r12835 - core/branches/Branch_3_2.
by hibernate-commits@lists.jboss.org
Author: steve.ebersole(a)jboss.com
Date: 2007-07-27 08:06:55 -0400 (Fri, 27 Jul 2007)
New Revision: 12835
Modified:
core/branches/Branch_3_2/build.xml
Log:
removed some crazy character
Modified: core/branches/Branch_3_2/build.xml
===================================================================
--- core/branches/Branch_3_2/build.xml 2007-07-27 03:43:34 UTC (rev 12834)
+++ core/branches/Branch_3_2/build.xml 2007-07-27 12:06:55 UTC (rev 12835)
@@ -91,7 +91,7 @@
</path>
<!-- allows external definition of the JDBC classpath fragment -->
<property name="hibernate.test.jdbc.fs.importFile" value="doNotImport" />
- <import file="${hibernate.test.jdbc.fs.importFile}" optional="true" />
+ <import file="${hibernate.test.jdbc.fs.importFile}" optional="true" />
<!-- patternset for insturmentation-eligible resources -->
<patternset id="ps.instrument.domain">
17 years, 5 months
Hibernate SVN: r12834 - in core/trunk/core/src/main/java/org/hibernate: util and 1 other directory.
by hibernate-commits@lists.jboss.org
Author: steve.ebersole(a)jboss.com
Date: 2007-07-26 23:43:34 -0400 (Thu, 26 Jul 2007)
New Revision: 12834
Modified:
core/trunk/core/src/main/java/org/hibernate/engine/StatefulPersistenceContext.java
core/trunk/core/src/main/java/org/hibernate/util/SimpleMRUCache.java
core/trunk/core/src/main/java/org/hibernate/util/SoftLimitMRUCache.java
Log:
commons-collections cleanup
Modified: core/trunk/core/src/main/java/org/hibernate/engine/StatefulPersistenceContext.java
===================================================================
--- core/trunk/core/src/main/java/org/hibernate/engine/StatefulPersistenceContext.java 2007-07-27 03:34:52 UTC (rev 12833)
+++ core/trunk/core/src/main/java/org/hibernate/engine/StatefulPersistenceContext.java 2007-07-27 03:43:34 UTC (rev 12834)
@@ -13,7 +13,7 @@
import java.util.List;
import java.util.Map;
-import org.apache.commons.collections.ReferenceMap;
+import org.apache.commons.collections.map.ReferenceMap;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.hibernate.AssertionFailure;
Modified: core/trunk/core/src/main/java/org/hibernate/util/SimpleMRUCache.java
===================================================================
--- core/trunk/core/src/main/java/org/hibernate/util/SimpleMRUCache.java 2007-07-27 03:34:52 UTC (rev 12833)
+++ core/trunk/core/src/main/java/org/hibernate/util/SimpleMRUCache.java 2007-07-27 03:43:34 UTC (rev 12834)
@@ -1,6 +1,6 @@
package org.hibernate.util;
-import org.apache.commons.collections.LRUMap;
+import org.apache.commons.collections.map.LRUMap;
import java.io.Serializable;
import java.io.IOException;
Modified: core/trunk/core/src/main/java/org/hibernate/util/SoftLimitMRUCache.java
===================================================================
--- core/trunk/core/src/main/java/org/hibernate/util/SoftLimitMRUCache.java 2007-07-27 03:34:52 UTC (rev 12833)
+++ core/trunk/core/src/main/java/org/hibernate/util/SoftLimitMRUCache.java 2007-07-27 03:43:34 UTC (rev 12834)
@@ -1,7 +1,7 @@
package org.hibernate.util;
-import org.apache.commons.collections.ReferenceMap;
-import org.apache.commons.collections.LRUMap;
+import org.apache.commons.collections.map.ReferenceMap;
+import org.apache.commons.collections.map.LRUMap;
import java.io.Serializable;
import java.io.IOException;
17 years, 5 months
Hibernate SVN: r12833 - core/trunk/core/src/main/java/org/hibernate/util.
by hibernate-commits@lists.jboss.org
Author: steve.ebersole(a)jboss.com
Date: 2007-07-26 23:34:52 -0400 (Thu, 26 Jul 2007)
New Revision: 12833
Removed:
core/trunk/core/src/main/java/org/hibernate/util/Range.java
Log:
removed unused class
Deleted: core/trunk/core/src/main/java/org/hibernate/util/Range.java
===================================================================
--- core/trunk/core/src/main/java/org/hibernate/util/Range.java 2007-07-27 03:20:24 UTC (rev 12832)
+++ core/trunk/core/src/main/java/org/hibernate/util/Range.java 2007-07-27 03:34:52 UTC (rev 12833)
@@ -1,22 +0,0 @@
-//$Id: Range.java 3890 2004-06-03 16:31:32Z steveebersole $
-package org.hibernate.util;
-
-public final class Range {
-
- public static int[] range(int begin, int length) {
- int[] result = new int[length];
- for ( int i=0; i<length; i++ ) {
- result[i]=begin + i;
- }
- return result;
- }
-
- private Range() {}
-}
-
-
-
-
-
-
-
17 years, 5 months
Hibernate SVN: r12832 - in core/trunk/core/src/main/java/org/hibernate: engine and 7 other directories.
by hibernate-commits@lists.jboss.org
Author: steve.ebersole(a)jboss.com
Date: 2007-07-26 23:20:24 -0400 (Thu, 26 Jul 2007)
New Revision: 12832
Removed:
core/trunk/core/src/main/java/org/hibernate/util/LinkedHashCollectionHelper.java
Modified:
core/trunk/core/src/main/java/org/hibernate/cfg/HbmBinder.java
core/trunk/core/src/main/java/org/hibernate/engine/BatchFetchQueue.java
core/trunk/core/src/main/java/org/hibernate/hql/classic/QueryTranslatorImpl.java
core/trunk/core/src/main/java/org/hibernate/loader/criteria/CriteriaQueryTranslator.java
core/trunk/core/src/main/java/org/hibernate/mapping/Table.java
core/trunk/core/src/main/java/org/hibernate/sql/CaseFragment.java
core/trunk/core/src/main/java/org/hibernate/sql/Insert.java
core/trunk/core/src/main/java/org/hibernate/sql/Update.java
core/trunk/core/src/main/java/org/hibernate/tuple/EntityModeToTuplizerMapping.java
core/trunk/core/src/main/java/org/hibernate/type/OrderedMapType.java
core/trunk/core/src/main/java/org/hibernate/type/OrderedSetType.java
core/trunk/core/src/main/java/org/hibernate/util/IdentityMap.java
core/trunk/core/src/main/java/org/hibernate/util/IdentitySet.java
Log:
HHH-2748 : remove SequencedHashMap usage;
HHH-2749 : direct use of LinkedHashSet/LinkedHashMap
Modified: core/trunk/core/src/main/java/org/hibernate/cfg/HbmBinder.java
===================================================================
--- core/trunk/core/src/main/java/org/hibernate/cfg/HbmBinder.java 2007-07-27 00:36:37 UTC (rev 12831)
+++ core/trunk/core/src/main/java/org/hibernate/cfg/HbmBinder.java 2007-07-27 03:20:24 UTC (rev 12832)
@@ -9,7 +9,6 @@
import java.util.Properties;
import java.util.StringTokenizer;
-import org.apache.commons.collections.SequencedHashMap;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.dom4j.Attribute;
@@ -2610,14 +2609,11 @@
}
public static java.util.Map getParameterTypes(Element queryElem) {
- java.util.Map result = new SequencedHashMap();
+ java.util.Map result = new java.util.LinkedHashMap();
Iterator iter = queryElem.elementIterator("query-param");
while ( iter.hasNext() ) {
Element element = (Element) iter.next();
- result.put(
- element.attributeValue("name"),
- element.attributeValue("type")
- );
+ result.put( element.attributeValue("name"), element.attributeValue("type") );
}
return result;
}
Modified: core/trunk/core/src/main/java/org/hibernate/engine/BatchFetchQueue.java
===================================================================
--- core/trunk/core/src/main/java/org/hibernate/engine/BatchFetchQueue.java 2007-07-27 00:36:37 UTC (rev 12831)
+++ core/trunk/core/src/main/java/org/hibernate/engine/BatchFetchQueue.java 2007-07-27 03:20:24 UTC (rev 12832)
@@ -4,9 +4,9 @@
import java.io.Serializable;
import java.util.HashMap;
import java.util.Iterator;
+import java.util.LinkedHashMap;
import java.util.Map;
-import org.apache.commons.collections.SequencedHashMap;
import org.hibernate.EntityMode;
import org.hibernate.cache.CacheKey;
import org.hibernate.collection.PersistentCollection;
@@ -30,12 +30,12 @@
* elegible for batch-fetching.
* <p/>
* Even though this is a map, we only use the keys. A map was chosen in
- * order to utilize a {@link SequencedHashMap} to maintain sequencing
+ * order to utilize a {@link LinkedHashMap} to maintain sequencing
* as well as uniqueness.
* <p/>
* TODO : this would be better as a SequencedReferenceSet, but no such beast exists!
*/
- private final Map batchLoadableEntityKeys = new SequencedHashMap(8);
+ private final Map batchLoadableEntityKeys = new LinkedHashMap(8);
/**
* A map of {@link SubselectFetch subselect-fetch descriptors} keyed by the
Modified: core/trunk/core/src/main/java/org/hibernate/hql/classic/QueryTranslatorImpl.java
===================================================================
--- core/trunk/core/src/main/java/org/hibernate/hql/classic/QueryTranslatorImpl.java 2007-07-27 00:36:37 UTC (rev 12831)
+++ core/trunk/core/src/main/java/org/hibernate/hql/classic/QueryTranslatorImpl.java 2007-07-27 03:20:24 UTC (rev 12832)
@@ -10,11 +10,11 @@
import java.util.HashMap;
import java.util.HashSet;
import java.util.Iterator;
+import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;
import java.util.Set;
-import org.apache.commons.collections.SequencedHashMap;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
@@ -63,8 +63,8 @@
private final String queryIdentifier;
private final String queryString;
- private final Map typeMap = new SequencedHashMap();
- private final Map collections = new SequencedHashMap();
+ private final Map typeMap = new LinkedHashMap();
+ private final Map collections = new LinkedHashMap();
private List returnedTypes = new ArrayList();
private final List fromTypes = new ArrayList();
private final List scalarTypes = new ArrayList();
@@ -77,7 +77,7 @@
private final List scalarSelectTokens = new ArrayList();
private final List whereTokens = new ArrayList();
private final List havingTokens = new ArrayList();
- private final Map joins = new SequencedHashMap();
+ private final Map joins = new LinkedHashMap();
private final List orderByTokens = new ArrayList();
private final List groupByTokens = new ArrayList();
private final Set querySpaces = new HashSet();
Modified: core/trunk/core/src/main/java/org/hibernate/loader/criteria/CriteriaQueryTranslator.java
===================================================================
--- core/trunk/core/src/main/java/org/hibernate/loader/criteria/CriteriaQueryTranslator.java 2007-07-27 00:36:37 UTC (rev 12831)
+++ core/trunk/core/src/main/java/org/hibernate/loader/criteria/CriteriaQueryTranslator.java 2007-07-27 03:20:24 UTC (rev 12832)
@@ -10,8 +10,8 @@
import java.util.Map;
import java.util.Set;
import java.util.StringTokenizer;
+import java.util.LinkedHashMap;
-import org.apache.commons.collections.SequencedHashMap;
import org.hibernate.Criteria;
import org.hibernate.EntityMode;
import org.hibernate.HibernateException;
@@ -49,11 +49,11 @@
private final String rootSQLAlias;
private int aliasCount = 0;
- private final Map criteriaEntityNames = new SequencedHashMap();
+ private final Map criteriaEntityNames = new LinkedHashMap();
private final Map criteriaSQLAliasMap = new HashMap();
private final Map aliasCriteriaMap = new HashMap();
- private final Map associationPathCriteriaMap = new SequencedHashMap();
- private final Map associationPathJoinTypesMap = new SequencedHashMap();
+ private final Map associationPathCriteriaMap = new LinkedHashMap();
+ private final Map associationPathJoinTypesMap = new LinkedHashMap();
private final SessionFactoryImplementor sessionFactory;
Modified: core/trunk/core/src/main/java/org/hibernate/mapping/Table.java
===================================================================
--- core/trunk/core/src/main/java/org/hibernate/mapping/Table.java 2007-07-27 00:36:37 UTC (rev 12831)
+++ core/trunk/core/src/main/java/org/hibernate/mapping/Table.java 2007-07-27 03:20:24 UTC (rev 12832)
@@ -7,8 +7,8 @@
import java.util.Iterator;
import java.util.List;
import java.util.Map;
+import java.util.LinkedHashMap;
-import org.apache.commons.collections.SequencedHashMap;
import org.hibernate.HibernateException;
import org.hibernate.MappingException;
import org.hibernate.dialect.Dialect;
@@ -30,7 +30,7 @@
/**
* contains all columns, including the primary key
*/
- private Map columns = new SequencedHashMap();
+ private Map columns = new LinkedHashMap();
private KeyValue idValue;
private PrimaryKey primaryKey;
private Map indexes = new HashMap();
Modified: core/trunk/core/src/main/java/org/hibernate/sql/CaseFragment.java
===================================================================
--- core/trunk/core/src/main/java/org/hibernate/sql/CaseFragment.java 2007-07-27 00:36:37 UTC (rev 12831)
+++ core/trunk/core/src/main/java/org/hibernate/sql/CaseFragment.java 2007-07-27 03:20:24 UTC (rev 12832)
@@ -2,11 +2,10 @@
package org.hibernate.sql;
import java.util.Map;
+import java.util.LinkedHashMap;
import org.hibernate.util.StringHelper;
-import org.apache.commons.collections.SequencedHashMap;
-
/**
* Abstract SQL case fragment renderer
*
@@ -17,7 +16,7 @@
protected String returnColumnName;
- protected Map cases = new SequencedHashMap();
+ protected Map cases = new LinkedHashMap();
public CaseFragment setReturnColumnName(String returnColumnName) {
this.returnColumnName = returnColumnName;
Modified: core/trunk/core/src/main/java/org/hibernate/sql/Insert.java
===================================================================
--- core/trunk/core/src/main/java/org/hibernate/sql/Insert.java 2007-07-27 00:36:37 UTC (rev 12831)
+++ core/trunk/core/src/main/java/org/hibernate/sql/Insert.java 2007-07-27 03:20:24 UTC (rev 12832)
@@ -3,8 +3,8 @@
import java.util.Iterator;
import java.util.Map;
+import java.util.LinkedHashMap;
-import org.apache.commons.collections.SequencedHashMap;
import org.hibernate.dialect.Dialect;
import org.hibernate.type.LiteralType;
@@ -17,7 +17,7 @@
private Dialect dialect;
private String tableName;
private String comment;
- private Map columns = new SequencedHashMap();
+ private Map columns = new LinkedHashMap();
public Insert(Dialect dialect) {
this.dialect = dialect;
Modified: core/trunk/core/src/main/java/org/hibernate/sql/Update.java
===================================================================
--- core/trunk/core/src/main/java/org/hibernate/sql/Update.java 2007-07-27 00:36:37 UTC (rev 12831)
+++ core/trunk/core/src/main/java/org/hibernate/sql/Update.java 2007-07-27 03:20:24 UTC (rev 12832)
@@ -3,13 +3,12 @@
import java.util.Iterator;
import java.util.Map;
+import java.util.LinkedHashMap;
import org.hibernate.dialect.Dialect;
import org.hibernate.type.LiteralType;
import org.hibernate.util.StringHelper;
-import org.apache.commons.collections.SequencedHashMap;
-
/**
* An SQL <tt>UPDATE</tt> statement
*
@@ -24,8 +23,8 @@
private String assignments;
private String comment;
- private Map columns = new SequencedHashMap();
- private Map whereColumns = new SequencedHashMap();
+ private Map columns = new LinkedHashMap();
+ private Map whereColumns = new LinkedHashMap();
private Dialect dialect;
Modified: core/trunk/core/src/main/java/org/hibernate/tuple/EntityModeToTuplizerMapping.java
===================================================================
--- core/trunk/core/src/main/java/org/hibernate/tuple/EntityModeToTuplizerMapping.java 2007-07-27 00:36:37 UTC (rev 12831)
+++ core/trunk/core/src/main/java/org/hibernate/tuple/EntityModeToTuplizerMapping.java 2007-07-27 03:20:24 UTC (rev 12832)
@@ -1,13 +1,12 @@
package org.hibernate.tuple;
-import org.apache.commons.collections.SequencedHashMap;
-
import org.hibernate.EntityMode;
import org.hibernate.HibernateException;
import java.util.Map;
import java.util.Collections;
import java.util.Iterator;
+import java.util.LinkedHashMap;
import java.io.Serializable;
/**
@@ -18,7 +17,7 @@
public abstract class EntityModeToTuplizerMapping implements Serializable {
// map of EntityMode -> Tuplizer
- private final Map tuplizers = Collections.synchronizedMap( new SequencedHashMap() );
+ private final Map tuplizers = Collections.synchronizedMap( new LinkedHashMap() );
protected void addTuplizer(EntityMode entityMode, Tuplizer tuplizer) {
tuplizers.put( entityMode, tuplizer );
Modified: core/trunk/core/src/main/java/org/hibernate/type/OrderedMapType.java
===================================================================
--- core/trunk/core/src/main/java/org/hibernate/type/OrderedMapType.java 2007-07-27 00:36:37 UTC (rev 12831)
+++ core/trunk/core/src/main/java/org/hibernate/type/OrderedMapType.java 2007-07-27 03:20:24 UTC (rev 12832)
@@ -1,16 +1,30 @@
//$Id: OrderedMapType.java 10100 2006-07-10 16:31:09Z steve.ebersole(a)jboss.com $
package org.hibernate.type;
-import org.hibernate.util.LinkedHashCollectionHelper;
+import java.util.LinkedHashMap;
+/**
+ * A specialization of the map type, with (resultset-based) ordering.
+ */
public class OrderedMapType extends MapType {
+ /**
+ * Constructs a map type capable of creating ordered maps of the given
+ * role.
+ *
+ * @param role The collection role name.
+ * @param propertyRef The property ref name.
+ * @param isEmbeddedInXML Is this collection to embed itself in xml
+ */
public OrderedMapType(String role, String propertyRef, boolean isEmbeddedInXML) {
super( role, propertyRef, isEmbeddedInXML );
}
+ /**
+ * {@inheritDoc}
+ */
public Object instantiate(int anticipatedSize) {
- return LinkedHashCollectionHelper.createLinkedHashMap( anticipatedSize );
+ return new LinkedHashMap( anticipatedSize );
}
}
Modified: core/trunk/core/src/main/java/org/hibernate/type/OrderedSetType.java
===================================================================
--- core/trunk/core/src/main/java/org/hibernate/type/OrderedSetType.java 2007-07-27 00:36:37 UTC (rev 12831)
+++ core/trunk/core/src/main/java/org/hibernate/type/OrderedSetType.java 2007-07-27 03:20:24 UTC (rev 12832)
@@ -1,16 +1,30 @@
//$Id: OrderedSetType.java 10100 2006-07-10 16:31:09Z steve.ebersole(a)jboss.com $
package org.hibernate.type;
-import org.hibernate.util.LinkedHashCollectionHelper;
+import java.util.LinkedHashSet;
+/**
+ * A specialization of the set type, with (resultset-based) ordering.
+ */
public class OrderedSetType extends SetType {
+ /**
+ * Constructs a set type capable of creating ordered sets of the given
+ * role.
+ *
+ * @param role The collection role name.
+ * @param propertyRef The property ref name.
+ * @param isEmbeddedInXML Is this collection to embed itself in xml
+ */
public OrderedSetType(String role, String propertyRef, boolean isEmbeddedInXML) {
super( role, propertyRef, isEmbeddedInXML );
}
+ /**
+ * {@inheritDoc}
+ */
public Object instantiate(int anticipatedSize) {
- return LinkedHashCollectionHelper.createLinkedHashSet( anticipatedSize );
+ return new LinkedHashSet( anticipatedSize );
}
}
Modified: core/trunk/core/src/main/java/org/hibernate/util/IdentityMap.java
===================================================================
--- core/trunk/core/src/main/java/org/hibernate/util/IdentityMap.java 2007-07-27 00:36:37 UTC (rev 12831)
+++ core/trunk/core/src/main/java/org/hibernate/util/IdentityMap.java 2007-07-27 03:20:24 UTC (rev 12832)
@@ -7,12 +7,11 @@
import java.util.HashMap;
import java.util.HashSet;
import java.util.Iterator;
+import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;
import java.util.Set;
-import org.apache.commons.collections.SequencedHashMap;
-
/**
* A <tt>Map</tt> where keys are compared by object identity,
* rather than <tt>equals()</tt>.
@@ -26,22 +25,31 @@
/**
* Return a new instance of this class, with an undefined
- * iteration order
+ * iteration order.
*
+ * @param size The size of the map
* @return Map
*/
public static Map instantiate(int size) {
- return new IdentityMap( new HashMap(size) );
+ return new IdentityMap( new HashMap( size ) );
}
/**
* Return a new instance of this class, with iteration
- * order defined by the order that entries were added
+ * order defined as the order in which entries were added
+ *
+ * @param size The size of the map to create
+ * @return
*/
public static Map instantiateSequenced(int size) {
- return new IdentityMap( new SequencedHashMap(size) );
+ return new IdentityMap( new LinkedHashMap( size ) );
}
+ /**
+ * Private ctor used in serialization.
+ *
+ * @param underlyingMap The delegate map.
+ */
private IdentityMap(Map underlyingMap) {
map = underlyingMap;
dirty = true;
Modified: core/trunk/core/src/main/java/org/hibernate/util/IdentitySet.java
===================================================================
--- core/trunk/core/src/main/java/org/hibernate/util/IdentitySet.java 2007-07-27 00:36:37 UTC (rev 12831)
+++ core/trunk/core/src/main/java/org/hibernate/util/IdentitySet.java 2007-07-27 03:20:24 UTC (rev 12832)
@@ -1,25 +1,38 @@
//$Id: IdentitySet.java 8807 2005-12-09 15:27:05Z epbernard $
package org.hibernate.util;
-import java.util.Set;
import java.util.Collection;
+import java.util.IdentityHashMap;
import java.util.Iterator;
-import java.util.Map;
+import java.util.Set;
/**
- * Set implementation that use == instead of equals() as its comparison mechanism
- * that base its implementation of IdentityMap
- *
+ * Set implementation that use == instead of equals() as its comparison
+ * mechanism. This is achieved by internally using an IdentityHashMap.
+ *
* @author Emmanuel Bernard
*/
public class IdentitySet implements Set {
- private Map map;
private static final Object DUMP_VALUE = new Object();
+ private final IdentityHashMap map;
+
+ /**
+ * Create an IdentitySet with default sizing.
+ */
public IdentitySet() {
- this.map = IdentityMap.instantiate( 10 );
+ this.map = new IdentityHashMap();
}
+ /**
+ * Create an IdentitySet with the given sizing.
+ *
+ * @param sizing The sizing of the set to create.
+ */
+ public IdentitySet(int sizing) {
+ this.map = new IdentityHashMap( sizing );
+ }
+
public int size() {
return map.size();
}
@@ -41,11 +54,11 @@
}
public Object[] toArray(Object[] a) {
- return map.entrySet().toArray(a);
+ return map.entrySet().toArray( a );
}
public boolean add(Object o) {
- return map.put( o, DUMP_VALUE) == null;
+ return map.put( o, DUMP_VALUE ) == null;
}
public boolean remove(Object o) {
@@ -55,7 +68,9 @@
public boolean containsAll(Collection c) {
Iterator it = c.iterator();
while ( it.hasNext() ) {
- if ( ! map.containsKey( it.next() ) ) return false;
+ if ( !map.containsKey( it.next() ) ) {
+ return false;
+ }
}
return true;
}
@@ -64,7 +79,9 @@
Iterator it = c.iterator();
boolean changed = false;
while ( it.hasNext() ) {
- if ( this.add( it.next() ) ) changed = true;
+ if ( this.add( it.next() ) ) {
+ changed = true;
+ }
}
return changed;
}
@@ -78,7 +95,9 @@
Iterator it = c.iterator();
boolean changed = false;
while ( it.hasNext() ) {
- if ( this.remove( it.next() ) ) changed = true;
+ if ( this.remove( it.next() ) ) {
+ changed = true;
+ }
}
return changed;
}
Deleted: core/trunk/core/src/main/java/org/hibernate/util/LinkedHashCollectionHelper.java
===================================================================
--- core/trunk/core/src/main/java/org/hibernate/util/LinkedHashCollectionHelper.java 2007-07-27 00:36:37 UTC (rev 12831)
+++ core/trunk/core/src/main/java/org/hibernate/util/LinkedHashCollectionHelper.java 2007-07-27 03:20:24 UTC (rev 12832)
@@ -1,95 +0,0 @@
-//$Id: LinkedHashCollectionHelper.java 10100 2006-07-10 16:31:09Z steve.ebersole(a)jboss.com $
-package org.hibernate.util;
-
-import java.util.Map;
-import java.util.Set;
-import java.lang.reflect.Constructor;
-
-import org.hibernate.AssertionFailure;
-
-public final class LinkedHashCollectionHelper {
-
- private static final Class SET_CLASS;
- private static final Class MAP_CLASS;
- private static final Class[] CAPACITY_CTOR_SIG = new Class[] { int.class, float.class };
- private static final Constructor SET_CAPACITY_CTOR;
- private static final Constructor MAP_CAPACITY_CTOR;
- private static final float LOAD_FACTOR_V = .75f;
- private static final Float LOAD_FACTOR = new Float( LOAD_FACTOR_V );
-
- static {
- Class setClass;
- Class mapClass;
- Constructor setCtor;
- Constructor mapCtor;
- try {
- setClass = Class.forName( "java.util.LinkedHashSet" );
- mapClass = Class.forName( "java.util.LinkedHashMap" );
- setCtor = setClass.getConstructor( CAPACITY_CTOR_SIG );
- mapCtor = mapClass.getConstructor( CAPACITY_CTOR_SIG );
- }
- catch ( Throwable t ) {
- setClass = null;
- mapClass = null;
- setCtor = null;
- mapCtor = null;
- }
- SET_CLASS = setClass;
- MAP_CLASS = mapClass;
- SET_CAPACITY_CTOR = setCtor;
- MAP_CAPACITY_CTOR = mapCtor;
- }
-
- public static Set createLinkedHashSet() {
- try {
- return (Set) SET_CLASS.newInstance();
- }
- catch (Exception e) {
- throw new AssertionFailure("Could not instantiate LinkedHashSet", e);
- }
- }
-
- public static Set createLinkedHashSet(int anticipatedSize) {
- if ( anticipatedSize <= 0 ) {
- return createLinkedHashSet();
- }
- int initialCapacity = anticipatedSize + (int)( anticipatedSize * LOAD_FACTOR_V );
- try {
- return ( Set ) SET_CAPACITY_CTOR.newInstance( new Object[] { new Integer( initialCapacity ), LOAD_FACTOR } );
- }
- catch (Exception e) {
- throw new AssertionFailure("Could not instantiate LinkedHashSet", e);
- }
- }
-
- public static Map createLinkedHashMap() {
- try {
- return (Map) MAP_CLASS.newInstance();
- }
- catch (Exception e) {
- throw new AssertionFailure("Could not instantiate LinkedHashMap", e);
- }
- }
-
- public static Map createLinkedHashMap(int anticipatedSize) {
- if ( anticipatedSize <= 0 ) {
- return createLinkedHashMap();
- }
- int initialCapacity = anticipatedSize + (int)( anticipatedSize * LOAD_FACTOR_V );
- try {
- return ( Map ) MAP_CAPACITY_CTOR.newInstance( new Object[] { new Integer( initialCapacity ), LOAD_FACTOR } );
- }
- catch (Exception e) {
- throw new AssertionFailure("Could not instantiate LinkedHashMap", e);
- }
- }
-
- private LinkedHashCollectionHelper() {}
-
-}
-
-
-
-
-
-
17 years, 5 months
Hibernate SVN: r12831 - in core/trunk/core/src/main/java/org/hibernate: jdbc and 1 other directories.
by hibernate-commits@lists.jboss.org
Author: steve.ebersole(a)jboss.com
Date: 2007-07-26 20:36:37 -0400 (Thu, 26 Jul 2007)
New Revision: 12831
Removed:
core/trunk/core/src/main/java/org/hibernate/util/GetGeneratedKeysHelper.java
core/trunk/core/src/main/java/org/hibernate/util/NamedGeneratedKeysHelper.java
Modified:
core/trunk/core/src/main/java/org/hibernate/id/IdentityGenerator.java
core/trunk/core/src/main/java/org/hibernate/id/SequenceIdentityGenerator.java
core/trunk/core/src/main/java/org/hibernate/jdbc/AbstractBatcher.java
Log:
HHH-2747 : JDBC3 getGeneratedKey
Modified: core/trunk/core/src/main/java/org/hibernate/id/IdentityGenerator.java
===================================================================
--- core/trunk/core/src/main/java/org/hibernate/id/IdentityGenerator.java 2007-07-26 20:51:32 UTC (rev 12830)
+++ core/trunk/core/src/main/java/org/hibernate/id/IdentityGenerator.java 2007-07-27 00:36:37 UTC (rev 12831)
@@ -15,7 +15,6 @@
import org.hibernate.dialect.Dialect;
import org.hibernate.HibernateException;
import org.hibernate.AssertionFailure;
-import org.hibernate.util.GetGeneratedKeysHelper;
/**
@@ -72,7 +71,7 @@
public Serializable executeAndExtract(PreparedStatement insert) throws SQLException {
insert.executeUpdate();
return IdentifierGeneratorFactory.getGeneratedIdentity(
- GetGeneratedKeysHelper.getGeneratedKey( insert ),
+ insert.getGeneratedKeys(),
persister.getIdentifierType()
);
}
Modified: core/trunk/core/src/main/java/org/hibernate/id/SequenceIdentityGenerator.java
===================================================================
--- core/trunk/core/src/main/java/org/hibernate/id/SequenceIdentityGenerator.java 2007-07-26 20:51:32 UTC (rev 12830)
+++ core/trunk/core/src/main/java/org/hibernate/id/SequenceIdentityGenerator.java 2007-07-27 00:36:37 UTC (rev 12831)
@@ -7,7 +7,6 @@
import org.hibernate.HibernateException;
import org.hibernate.MappingException;
import org.hibernate.sql.Insert;
-import org.hibernate.util.NamedGeneratedKeysHelper;
import org.hibernate.type.Type;
import org.hibernate.engine.SessionImplementor;
import org.apache.commons.logging.Log;
@@ -79,7 +78,7 @@
protected Serializable executeAndExtract(PreparedStatement insert) throws SQLException {
insert.executeUpdate();
return IdentifierGeneratorFactory.getGeneratedIdentity(
- NamedGeneratedKeysHelper.getGeneratedKey( insert ),
+ insert.getGeneratedKeys(),
getPersister().getIdentifierType()
);
}
Modified: core/trunk/core/src/main/java/org/hibernate/jdbc/AbstractBatcher.java
===================================================================
--- core/trunk/core/src/main/java/org/hibernate/jdbc/AbstractBatcher.java 2007-07-26 20:51:32 UTC (rev 12830)
+++ core/trunk/core/src/main/java/org/hibernate/jdbc/AbstractBatcher.java 2007-07-27 00:36:37 UTC (rev 12831)
@@ -20,9 +20,7 @@
import org.hibernate.engine.SessionFactoryImplementor;
import org.hibernate.exception.JDBCExceptionHelper;
import org.hibernate.pretty.Formatter;
-import org.hibernate.util.GetGeneratedKeysHelper;
import org.hibernate.util.JDBCExceptionReporter;
-import org.hibernate.util.NamedGeneratedKeysHelper;
/**
* Manages prepared statements and batching.
@@ -492,10 +490,10 @@
}
}
else if ( useGetGeneratedKeys ) {
- result = GetGeneratedKeysHelper.prepareStatement( conn, sql );
+ result = conn.prepareStatement( sql, PreparedStatement.RETURN_GENERATED_KEYS );
}
else if ( namedGeneratedKeys != null ) {
- result = NamedGeneratedKeysHelper.prepareStatement( conn, sql, namedGeneratedKeys );
+ result = conn.prepareStatement( sql, namedGeneratedKeys );
}
else {
if ( callable ) {
Deleted: core/trunk/core/src/main/java/org/hibernate/util/GetGeneratedKeysHelper.java
===================================================================
--- core/trunk/core/src/main/java/org/hibernate/util/GetGeneratedKeysHelper.java 2007-07-26 20:51:32 UTC (rev 12830)
+++ core/trunk/core/src/main/java/org/hibernate/util/GetGeneratedKeysHelper.java 2007-07-27 00:36:37 UTC (rev 12831)
@@ -1,87 +0,0 @@
-//$Id: GetGeneratedKeysHelper.java 9676 2006-03-22 17:38:55Z steve.ebersole(a)jboss.com $
-package org.hibernate.util;
-
-import java.lang.reflect.InvocationTargetException;
-import java.lang.reflect.Method;
-import java.sql.Connection;
-import java.sql.PreparedStatement;
-import java.sql.ResultSet;
-import java.sql.SQLException;
-import java.sql.Statement;
-
-import org.hibernate.AssertionFailure;
-
-/**
- * @author Gavin King
- */
-public final class GetGeneratedKeysHelper {
-
- private GetGeneratedKeysHelper() {
- }
-
- private static final Integer RETURN_GENERATED_KEYS;
- private static final Method PREPARE_STATEMENT_METHOD;
- private static final Method GET_GENERATED_KEYS_METHOD;
-
- static {
- try {
- int returnGeneratedKeysEnumValue = Statement.class
- .getDeclaredField( "RETURN_GENERATED_KEYS" )
- .getInt( PreparedStatement.class );
- RETURN_GENERATED_KEYS = new Integer( returnGeneratedKeysEnumValue );
- PREPARE_STATEMENT_METHOD = Connection.class.getMethod(
- "prepareStatement",
- new Class[] { String.class, Integer.TYPE }
- );
- GET_GENERATED_KEYS_METHOD = Statement.class.getDeclaredMethod(
- "getGeneratedKeys",
- null
- );
- }
- catch ( Exception e ) {
- throw new AssertionFailure( "could not initialize getGeneratedKeys() support", e );
- }
- }
-
- public static PreparedStatement prepareStatement(Connection conn, String sql) throws SQLException {
- Object[] args = new Object[] { sql, RETURN_GENERATED_KEYS } ;
- try {
- return ( PreparedStatement ) PREPARE_STATEMENT_METHOD.invoke( conn, args );
- }
- catch ( InvocationTargetException ite ) {
- if ( ite.getTargetException() instanceof SQLException ) {
- throw ( SQLException ) ite.getTargetException();
- }
- else if ( ite.getTargetException() instanceof RuntimeException ) {
- throw ( RuntimeException ) ite.getTargetException();
- }
- else {
- throw new AssertionFailure( "InvocationTargetException preparing statement capable of returning generated keys (JDBC3)", ite );
- }
- }
- catch ( IllegalAccessException iae ) {
- throw new AssertionFailure( "IllegalAccessException preparing statement capable of returning generated keys (JDBC3)", iae );
- }
- }
-
- public static ResultSet getGeneratedKey(PreparedStatement ps) throws SQLException {
- try {
- return ( ResultSet ) GET_GENERATED_KEYS_METHOD.invoke( ps, null );
- }
- catch ( InvocationTargetException ite ) {
- if ( ite.getTargetException() instanceof SQLException ) {
- throw ( SQLException ) ite.getTargetException();
- }
- else if ( ite.getTargetException() instanceof RuntimeException ) {
- throw ( RuntimeException ) ite.getTargetException();
- }
- else {
- throw new AssertionFailure( "InvocationTargetException extracting generated keys (JDBC3)", ite );
- }
- }
- catch ( IllegalAccessException iae ) {
- throw new AssertionFailure( "IllegalAccessException extracting generated keys (JDBC3)", iae );
- }
- }
-
-}
Deleted: core/trunk/core/src/main/java/org/hibernate/util/NamedGeneratedKeysHelper.java
===================================================================
--- core/trunk/core/src/main/java/org/hibernate/util/NamedGeneratedKeysHelper.java 2007-07-26 20:51:32 UTC (rev 12830)
+++ core/trunk/core/src/main/java/org/hibernate/util/NamedGeneratedKeysHelper.java 2007-07-27 00:36:37 UTC (rev 12831)
@@ -1,79 +0,0 @@
-package org.hibernate.util;
-
-import org.hibernate.AssertionFailure;
-
-import java.lang.reflect.Method;
-import java.lang.reflect.InvocationTargetException;
-import java.sql.Connection;
-import java.sql.Statement;
-import java.sql.PreparedStatement;
-import java.sql.SQLException;
-import java.sql.ResultSet;
-
-/**
- * @author Steve Ebersole
- */
-public class NamedGeneratedKeysHelper {
- private NamedGeneratedKeysHelper() {
- }
-
- private static final Method PREPARE_STATEMENT_METHOD;
- private static final Method GET_GENERATED_KEYS_METHOD;
-
- static {
- try {
- PREPARE_STATEMENT_METHOD = Connection.class.getMethod(
- "prepareStatement",
- new Class[] { String.class, String[].class }
- );
- GET_GENERATED_KEYS_METHOD = Statement.class.getDeclaredMethod(
- "getGeneratedKeys",
- null
- );
- }
- catch ( Exception e ) {
- throw new AssertionFailure( "could not initialize getGeneratedKeys() support", e );
- }
- }
-
- public static PreparedStatement prepareStatement(Connection conn, String sql, String[] columnNames) throws SQLException {
- Object[] args = new Object[] { sql, columnNames } ;
- try {
- return ( PreparedStatement ) PREPARE_STATEMENT_METHOD.invoke( conn, args );
- }
- catch ( InvocationTargetException ite ) {
- if ( ite.getTargetException() instanceof SQLException ) {
- throw ( SQLException ) ite.getTargetException();
- }
- else if ( ite.getTargetException() instanceof RuntimeException ) {
- throw ( RuntimeException ) ite.getTargetException();
- }
- else {
- throw new AssertionFailure( "InvocationTargetException preparing statement capable of returning generated keys (JDBC3)", ite );
- }
- }
- catch ( IllegalAccessException iae ) {
- throw new AssertionFailure( "IllegalAccessException preparing statement capable of returning generated keys (JDBC3)", iae );
- }
- }
-
- public static ResultSet getGeneratedKey(PreparedStatement ps) throws SQLException {
- try {
- return ( ResultSet ) GET_GENERATED_KEYS_METHOD.invoke( ps, null );
- }
- catch ( InvocationTargetException ite ) {
- if ( ite.getTargetException() instanceof SQLException ) {
- throw ( SQLException ) ite.getTargetException();
- }
- else if ( ite.getTargetException() instanceof RuntimeException ) {
- throw ( RuntimeException ) ite.getTargetException();
- }
- else {
- throw new AssertionFailure( "InvocationTargetException extracting generated keys (JDBC3)", ite );
- }
- }
- catch ( IllegalAccessException iae ) {
- throw new AssertionFailure( "IllegalAccessException extracting generated keys (JDBC3)", iae );
- }
- }
-}
17 years, 5 months
Hibernate SVN: r12830 - in core/trunk/testsuite: src/test/profile and 11 other directories.
by hibernate-commits@lists.jboss.org
Author: steve.ebersole(a)jboss.com
Date: 2007-07-26 16:51:32 -0400 (Thu, 26 Jul 2007)
New Revision: 12830
Added:
core/trunk/testsuite/src/test/profile/h2/
core/trunk/testsuite/src/test/profile/h2/hibernate.properties
core/trunk/testsuite/src/test/profile/rh-qa/
core/trunk/testsuite/src/test/profile/rh-qa/README.txt
core/trunk/testsuite/src/test/profile/rh-qa/db2-8/
core/trunk/testsuite/src/test/profile/rh-qa/db2-8/hibernate.properties
core/trunk/testsuite/src/test/profile/rh-qa/mysql5/
core/trunk/testsuite/src/test/profile/rh-qa/mysql5/hibernate.properties
core/trunk/testsuite/src/test/profile/rh-qa/oracle10g/
core/trunk/testsuite/src/test/profile/rh-qa/oracle10g/hibernate.properties
core/trunk/testsuite/src/test/profile/rh-qa/oracle9i/
core/trunk/testsuite/src/test/profile/rh-qa/oracle9i/hibernate.properties
core/trunk/testsuite/src/test/profile/rh-qa/pgsql8/
core/trunk/testsuite/src/test/profile/rh-qa/pgsql8/hibernate.properties
core/trunk/testsuite/src/test/profile/rh-qa/sqlserver2005/
core/trunk/testsuite/src/test/profile/rh-qa/sqlserver2005/jtds/
core/trunk/testsuite/src/test/profile/rh-qa/sqlserver2005/jtds/hibernate.properties
core/trunk/testsuite/src/test/profile/rh-qa/sqlserver2005/msjdbc/
core/trunk/testsuite/src/test/profile/rh-qa/sqlserver2005/msjdbc/hibernate.properties
core/trunk/testsuite/src/test/profile/rh-qa/sybase12/
core/trunk/testsuite/src/test/profile/rh-qa/sybase12/hibernate.properties
Modified:
core/trunk/testsuite/pom.xml
Log:
use profiles for qa/qe builds
Modified: core/trunk/testsuite/pom.xml
===================================================================
--- core/trunk/testsuite/pom.xml 2007-07-26 20:37:49 UTC (rev 12829)
+++ core/trunk/testsuite/pom.xml 2007-07-26 20:51:32 UTC (rev 12830)
@@ -104,7 +104,7 @@
<plugin>
<groupId>org.jboss.maven.plugins</groupId>
<artifactId>maven-test-ext-plugin</artifactId>
- <version>1.0.3</version>
+ <version>1.1.0</version>
<executions>
<execution>
<goals>
@@ -128,9 +128,248 @@
</plugins>
</build>
- <properties>
- <test.extender.cfg>${basedir}/src/test/profile/hsqldb/hsqldb-env.xml</test.extender.cfg>
- <test.extender.env>hsqldb</test.extender.env>
- </properties>
+ <!-- Set up profiles defining test environments -->
+ <profiles>
+ <!-- HSQLDB is the default (eventually move to H2) -->
+ <profile>
+ <id>hsqldb</id>
+ <activation>
+ <activeByDefault>true</activeByDefault>
+ </activation>
+ <dependencies>
+ <dependency>
+ <groupId>hsqldb</groupId>
+ <artifactId>hsqldb</artifactId>
+ <version>1.8.0.2</version>
+ </dependency>
+ </dependencies>
+ <build>
+ <testResources>
+ <testResource>
+ <directory>${basedir}/src/test/profile/hsqldb</directory>
+ <filtering>false</filtering>
+ <includes>
+ <include>hibernate.properties</include>
+ </includes>
+ </testResource>
+ </testResources>
+ </build>
+ </profile>
+ <!-- The H2 test envionment -->
+ <profile>
+ <id>h2</id>
+ <dependencies>
+ <dependency>
+ <groupId>org.h2database</groupId>
+ <artifactId>h2database</artifactId>
+ <version>1.0.20061217</version>
+ </dependency>
+ </dependencies>
+ <build>
+ <testResources>
+ <testResource>
+ <directory>${basedir}/src/test/profile/h2</directory>
+ <filtering>false</filtering>
+ <includes>
+ <include>hibernate.properties</include>
+ </includes>
+ </testResource>
+ </testResources>
+ </build>
+ </profile>
+
+ <!--
+ Profiles naming db instances in the Red Hat QA/QE lab
+ -->
+
+ <!-- The MySQL5 test envionment -->
+ <profile>
+ <id>mysql5</id>
+ <dependencies>
+ <dependency>
+ <groupId>mysql</groupId>
+ <artifactId>mysql-connector-java</artifactId>
+ <version>5.0.5</version>
+ </dependency>
+ </dependencies>
+ <build>
+ <testResources>
+ <testResource>
+ <directory>${basedir}/src/test/profile/rh-qa/mysql5</directory>
+ <filtering>false</filtering>
+ <includes>
+ <include>hibernate.properties</include>
+ </includes>
+ </testResource>
+ </testResources>
+ </build>
+ </profile>
+
+ <!-- The PostgreSQL test envionment -->
+ <profile>
+ <id>pgsql8</id>
+ <dependencies>
+ <dependency>
+ <groupId>postgresql</groupId>
+ <artifactId>postgresql</artifactId>
+ <version>8.2-504</version>
+ <classifier>jdbc3</classifier>
+ </dependency>
+ </dependencies>
+ <build>
+ <testResources>
+ <testResource>
+ <directory>${basedir}/src/test/profile/rh-qa/pgsql8</directory>
+ <filtering>false</filtering>
+ <includes>
+ <include>hibernate.properties</include>
+ </includes>
+ </testResource>
+ </testResources>
+ </build>
+ </profile>
+
+ <!-- The Oracle9i test envionment -->
+ <profile>
+ <id>oracle9i</id>
+ <dependencies>
+ <dependency>
+ <groupId>com.oracle</groupId>
+ <artifactId>ojdbc14</artifactId>
+ <!-- use the 10g drivers which are surprisingly largely bug free -->
+ <version>10.0.2.0</version>
+ </dependency>
+ </dependencies>
+ <build>
+ <testResources>
+ <testResource>
+ <directory>${basedir}/src/test/profile/rh-qa/oracle9i</directory>
+ <filtering>false</filtering>
+ <includes>
+ <include>hibernate.properties</include>
+ </includes>
+ </testResource>
+ </testResources>
+ </build>
+ </profile>
+
+ <!-- The Oracle10g test envionment -->
+ <profile>
+ <id>oracle10g</id>
+ <dependencies>
+ <dependency>
+ <groupId>com.oracle</groupId>
+ <artifactId>ojdbc14</artifactId>
+ <!-- use the 10g drivers which are surprisingly largely bug free -->
+ <version>10.0.2.0</version>
+ </dependency>
+ </dependencies>
+ <build>
+ <testResources>
+ <testResource>
+ <directory>${basedir}/src/test/profile/rh-qa/oracle10g</directory>
+ <filtering>false</filtering>
+ <includes>
+ <include>hibernate.properties</include>
+ </includes>
+ </testResource>
+ </testResources>
+ </build>
+ </profile>
+
+ <!-- The DB2 8.x test envionment -->
+ <profile>
+ <id>db2-8</id>
+ <dependencies>
+ <dependency>
+ <groupId>com.ibm</groupId>
+ <artifactId>ojdbc14</artifactId>
+ <version>10.0.2.0</version>
+ </dependency>
+ </dependencies>
+ <build>
+ <testResources>
+ <testResource>
+ <directory>${basedir}/src/test/profile/rh-qa/db2-8</directory>
+ <filtering>false</filtering>
+ <includes>
+ <include>hibernate.properties</include>
+ </includes>
+ </testResource>
+ </testResources>
+ </build>
+ </profile>
+
+ <!-- The Sybase 12 test envionment -->
+ <profile>
+ <id>sybase12</id>
+ <dependencies>
+ <dependency>
+ <groupId>com.sybase</groupId>
+ <artifactId>jconnect</artifactId>
+ <version>6.0.5</version>
+ </dependency>
+ </dependencies>
+ <build>
+ <testResources>
+ <testResource>
+ <directory>${basedir}/src/test/profile/rh-qa/sybase12</directory>
+ <filtering>false</filtering>
+ <includes>
+ <include>hibernate.properties</include>
+ </includes>
+ </testResource>
+ </testResources>
+ </build>
+ </profile>
+
+ <!-- The SQLServer2005 (jTDS) test envionment -->
+ <profile>
+ <id>sqlserver-jtds</id>
+ <dependencies>
+ <dependency>
+ <groupId>net.sourceforge.jtds</groupId>
+ <artifactId>jtds</artifactId>
+ <version>1.2</version>
+ </dependency>
+ </dependencies>
+ <build>
+ <testResources>
+ <testResource>
+ <directory>${basedir}/src/test/profile/rh-qa/sqlserver2005/jtds</directory>
+ <filtering>false</filtering>
+ <includes>
+ <include>hibernate.properties</include>
+ </includes>
+ </testResource>
+ </testResources>
+ </build>
+ </profile>
+
+ <!-- The SQLServer2005 (MS JDBC) test envionment -->
+ <profile>
+ <id>sqlserver-msjdbc</id>
+ <dependencies>
+ <dependency>
+ <groupId>com.microsoft.sqlserver</groupId>
+ <artifactId>msjdbc</artifactId>
+ <version>1.1</version>
+ </dependency>
+ </dependencies>
+ <build>
+ <testResources>
+ <testResource>
+ <directory>${basedir}/src/test/profile/rh-qa/sqlserver2005/msjdbc</directory>
+ <filtering>false</filtering>
+ <includes>
+ <include>hibernate.properties</include>
+ </includes>
+ </testResource>
+ </testResources>
+ </build>
+ </profile>
+
+ </profiles>
+
</project>
Copied: core/trunk/testsuite/src/test/profile/h2/hibernate.properties (from rev 12794, core/trunk/testsuite/src/test/profile/hsqldb/hibernate.properties)
===================================================================
--- core/trunk/testsuite/src/test/profile/h2/hibernate.properties (rev 0)
+++ core/trunk/testsuite/src/test/profile/h2/hibernate.properties 2007-07-26 20:51:32 UTC (rev 12830)
@@ -0,0 +1,29 @@
+################################################################################
+# Copyright (c) 2007, Red Hat Middleware, LLC. All rights reserved. #
+# #
+# 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, v. 2.1. This program is distributed in the #
+# hope that it will be useful, but WITHOUT A 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, v.2.1 along with this #
+# distribution; if not, write to the Free Software Foundation, Inc., #
+# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. #
+# #
+# Red Hat Author(s): Steve Ebersole #
+################################################################################
+hibernate.dialect org.hibernate.dialect.H2Dialect
+hibernate.connection.url jdbc:h2:mem:target/test/db/h2/hibernate
+hibernate.connection.driver_class org.h2.Driver
+hibernate.connection.username sa
+hibernate.connection.password
+
+hibernate.connection.pool_size 5
+
+hibernate.format_sql true
+
+hibernate.max_fetch_depth 5
+
+hibernate.cache.region_prefix hibernate.test
+hibernate.cache.provider_class org.hibernate.cache.HashtableCacheProvider
Added: core/trunk/testsuite/src/test/profile/rh-qa/README.txt
===================================================================
--- core/trunk/testsuite/src/test/profile/rh-qa/README.txt (rev 0)
+++ core/trunk/testsuite/src/test/profile/rh-qa/README.txt 2007-07-26 20:51:32 UTC (rev 12830)
@@ -0,0 +1,3 @@
+These profiles represent databases inside the Red Hat QA labs. These machines are
+not accessible from outside the lab; they are defined here for use in the
+Continuous-Integration builds of Hibernate.
\ No newline at end of file
Added: core/trunk/testsuite/src/test/profile/rh-qa/db2-8/hibernate.properties
===================================================================
--- core/trunk/testsuite/src/test/profile/rh-qa/db2-8/hibernate.properties (rev 0)
+++ core/trunk/testsuite/src/test/profile/rh-qa/db2-8/hibernate.properties 2007-07-26 20:51:32 UTC (rev 12830)
@@ -0,0 +1,29 @@
+################################################################################
+# Copyright (c) 2007, Red Hat Middleware, LLC. All rights reserved. #
+# #
+# 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, v. 2.1. This program is distributed in the #
+# hope that it will be useful, but WITHOUT A 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, v.2.1 along with this #
+# distribution; if not, write to the Free Software Foundation, Inc., #
+# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. #
+# #
+# Red Hat Author(s): Steve Ebersole #
+################################################################################
+hibernate.dialect org.hibernate.dialect.DB2Dialect
+hibernate.connection.driver_class com.ibm.db2.jcc.DB2Driver
+hibernate.connection.url jdbc:db2://dev32.qa.atl.jboss.com:50000/jbossqa
+hibernate.connection.username hiber
+hibernate.connection.password hiber
+
+hibernate.connection.pool_size 5
+
+hibernate.format_sql true
+
+hibernate.max_fetch_depth 5
+
+hibernate.cache.region_prefix hibernate.test
+hibernate.cache.provider_class org.hibernate.cache.HashtableCacheProvider
\ No newline at end of file
Added: core/trunk/testsuite/src/test/profile/rh-qa/mysql5/hibernate.properties
===================================================================
--- core/trunk/testsuite/src/test/profile/rh-qa/mysql5/hibernate.properties (rev 0)
+++ core/trunk/testsuite/src/test/profile/rh-qa/mysql5/hibernate.properties 2007-07-26 20:51:32 UTC (rev 12830)
@@ -0,0 +1,29 @@
+################################################################################
+# Copyright (c) 2007, Red Hat Middleware, LLC. All rights reserved. #
+# #
+# 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, v. 2.1. This program is distributed in the #
+# hope that it will be useful, but WITHOUT A 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, v.2.1 along with this #
+# distribution; if not, write to the Free Software Foundation, Inc., #
+# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. #
+# #
+# Red Hat Author(s): Steve Ebersole #
+################################################################################
+hibernate.dialect org.hibernate.dialect.MySQL5InnoDBDialect
+hibernate.connection.driver_class com.mysql.jdbc.Driver
+hibernate.connection.url jdbc:mysql://dev02.qa.atl.jboss.com/cruisecontrol
+hibernate.connection.username cruisecontrol
+hibernate.connection.password cruisecontrol
+
+hibernate.connection.pool_size 5
+
+hibernate.format_sql true
+
+hibernate.max_fetch_depth 5
+
+hibernate.cache.region_prefix hibernate.test
+hibernate.cache.provider_class org.hibernate.cache.HashtableCacheProvider
\ No newline at end of file
Added: core/trunk/testsuite/src/test/profile/rh-qa/oracle10g/hibernate.properties
===================================================================
--- core/trunk/testsuite/src/test/profile/rh-qa/oracle10g/hibernate.properties (rev 0)
+++ core/trunk/testsuite/src/test/profile/rh-qa/oracle10g/hibernate.properties 2007-07-26 20:51:32 UTC (rev 12830)
@@ -0,0 +1,29 @@
+################################################################################
+# Copyright (c) 2007, Red Hat Middleware, LLC. All rights reserved. #
+# #
+# 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, v. 2.1. This program is distributed in the #
+# hope that it will be useful, but WITHOUT A 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, v.2.1 along with this #
+# distribution; if not, write to the Free Software Foundation, Inc., #
+# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. #
+# #
+# Red Hat Author(s): Steve Ebersole #
+################################################################################
+hibernate.dialect org.hibernate.dialect.Oracle10gDialect
+hibernate.connection.driver_class oracle.jdbc.driver.OracleDriver
+hibernate.connection.username cruisecontrol
+hibernate.connection.password cruisecontrol
+hibernate.connection.url jdbc:oracle:thin:@dev01.qa.atl.jboss.com:1521:qadb01
+
+hibernate.connection.pool_size 5
+
+hibernate.format_sql true
+
+hibernate.max_fetch_depth 5
+
+hibernate.cache.region_prefix hibernate.test
+hibernate.cache.provider_class org.hibernate.cache.HashtableCacheProvider
\ No newline at end of file
Copied: core/trunk/testsuite/src/test/profile/rh-qa/oracle9i/hibernate.properties (from rev 12794, core/trunk/testsuite/src/test/profile/hsqldb/hibernate.properties)
===================================================================
--- core/trunk/testsuite/src/test/profile/rh-qa/oracle9i/hibernate.properties (rev 0)
+++ core/trunk/testsuite/src/test/profile/rh-qa/oracle9i/hibernate.properties 2007-07-26 20:51:32 UTC (rev 12830)
@@ -0,0 +1,29 @@
+################################################################################
+# Copyright (c) 2007, Red Hat Middleware, LLC. All rights reserved. #
+# #
+# 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, v. 2.1. This program is distributed in the #
+# hope that it will be useful, but WITHOUT A 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, v.2.1 along with this #
+# distribution; if not, write to the Free Software Foundation, Inc., #
+# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. #
+# #
+# Red Hat Author(s): Steve Ebersole #
+################################################################################
+hibernate.dialect org.hibernate.dialect.Oracle9iDialect
+hibernate.connection.driver_class oracle.jdbc.driver.OracleDriver
+hibernate.connection.username cruisecontrol
+hibernate.connection.password cruisecontrol
+hibernate.connection.url jdbc:oracle:thin:@dev20.qa.atl.jboss.com:1521:qa
+
+hibernate.connection.pool_size 5
+
+hibernate.format_sql true
+
+hibernate.max_fetch_depth 5
+
+hibernate.cache.region_prefix hibernate.test
+hibernate.cache.provider_class org.hibernate.cache.HashtableCacheProvider
\ No newline at end of file
Added: core/trunk/testsuite/src/test/profile/rh-qa/pgsql8/hibernate.properties
===================================================================
--- core/trunk/testsuite/src/test/profile/rh-qa/pgsql8/hibernate.properties (rev 0)
+++ core/trunk/testsuite/src/test/profile/rh-qa/pgsql8/hibernate.properties 2007-07-26 20:51:32 UTC (rev 12830)
@@ -0,0 +1,29 @@
+################################################################################
+# Copyright (c) 2007, Red Hat Middleware, LLC. All rights reserved. #
+# #
+# 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, v. 2.1. This program is distributed in the #
+# hope that it will be useful, but WITHOUT A 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, v.2.1 along with this #
+# distribution; if not, write to the Free Software Foundation, Inc., #
+# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. #
+# #
+# Red Hat Author(s): Steve Ebersole #
+################################################################################
+hibernate.dialect org.hibernate.dialect.PostgreSQLDialect
+hibernate.connection.driver_class org.postgresql.Driver
+hibernate.connection.url jdbc:postgresql://dev01.qa.atl.jboss.com:5432:cruisecontrol
+hibernate.connection.username cruisecontrol
+hibernate.connection.password cruisecontrol
+
+hibernate.connection.pool_size 5
+
+hibernate.format_sql true
+
+hibernate.max_fetch_depth 5
+
+hibernate.cache.region_prefix hibernate.test
+hibernate.cache.provider_class org.hibernate.cache.HashtableCacheProvider
\ No newline at end of file
Added: core/trunk/testsuite/src/test/profile/rh-qa/sqlserver2005/jtds/hibernate.properties
===================================================================
--- core/trunk/testsuite/src/test/profile/rh-qa/sqlserver2005/jtds/hibernate.properties (rev 0)
+++ core/trunk/testsuite/src/test/profile/rh-qa/sqlserver2005/jtds/hibernate.properties 2007-07-26 20:51:32 UTC (rev 12830)
@@ -0,0 +1,38 @@
+################################################################################
+# Copyright (c) 2007, Red Hat Middleware, LLC. All rights reserved. #
+# #
+# 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, v. 2.1. This program is distributed in the #
+# hope that it will be useful, but WITHOUT A 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, v.2.1 along with this #
+# distribution; if not, write to the Free Software Foundation, Inc., #
+# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. #
+# #
+# Red Hat Author(s): Steve Ebersole #
+################################################################################
+hibernate.dialect org.hibernate.dialect.SQLServerDialect
+hibernate.connection.driver_class net.sourceforge.jtds.jdbc.Driver
+hibernate.connection.url jdbc:jtds:sqlserver://dev30.qa.atl.jboss.com:3918/cruisecontrol
+hibernate.connection.username cruisecontrol
+hibernate.connection.password cruisecontrol
+
+#hibernate.connection.isolation 4096
+
+#Isolation level is commneted because jtds 1.2 doesn't support it.
+#But hibernate requires it.
+#Workaround is to run on the sql server 2005 this:
+#ALTER DATABASE cruisecontrol SET ALLOW_SNAPSHOT_ISOLATION ON;
+#ALTER DATABASE cruisecontrol SET READ_COMMITTED_SNAPSHOT ON;
+#Tip: no other connection to the database should be in the same time
+
+hibernate.connection.pool_size 5
+
+hibernate.format_sql true
+
+hibernate.max_fetch_depth 5
+
+hibernate.cache.region_prefix hibernate.test
+hibernate.cache.provider_class org.hibernate.cache.HashtableCacheProvider
\ No newline at end of file
Added: core/trunk/testsuite/src/test/profile/rh-qa/sqlserver2005/msjdbc/hibernate.properties
===================================================================
--- core/trunk/testsuite/src/test/profile/rh-qa/sqlserver2005/msjdbc/hibernate.properties (rev 0)
+++ core/trunk/testsuite/src/test/profile/rh-qa/sqlserver2005/msjdbc/hibernate.properties 2007-07-26 20:51:32 UTC (rev 12830)
@@ -0,0 +1,30 @@
+################################################################################
+# Copyright (c) 2007, Red Hat Middleware, LLC. All rights reserved. #
+# #
+# 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, v. 2.1. This program is distributed in the #
+# hope that it will be useful, but WITHOUT A 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, v.2.1 along with this #
+# distribution; if not, write to the Free Software Foundation, Inc., #
+# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. #
+# #
+# Red Hat Author(s): Steve Ebersole #
+################################################################################
+hibernate.dialect org.hibernate.dialect.SQLServerDialect
+hibernate.connection.driver_class com.microsoft.sqlserver.jdbc.SQLServerDriver
+hibernate.connection.url jdbc:sqlserver://dev30.qa.atl.jboss.com:3918
+hibernate.connection.username cruisecontrol
+hibernate.connection.password cruisecontrol
+hibernate.connection.isolation 4096
+
+hibernate.connection.pool_size 5
+
+hibernate.format_sql true
+
+hibernate.max_fetch_depth 5
+
+hibernate.cache.region_prefix hibernate.test
+hibernate.cache.provider_class org.hibernate.cache.HashtableCacheProvider
\ No newline at end of file
Added: core/trunk/testsuite/src/test/profile/rh-qa/sybase12/hibernate.properties
===================================================================
--- core/trunk/testsuite/src/test/profile/rh-qa/sybase12/hibernate.properties (rev 0)
+++ core/trunk/testsuite/src/test/profile/rh-qa/sybase12/hibernate.properties 2007-07-26 20:51:32 UTC (rev 12830)
@@ -0,0 +1,29 @@
+################################################################################
+# Copyright (c) 2007, Red Hat Middleware, LLC. All rights reserved. #
+# #
+# 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, v. 2.1. This program is distributed in the #
+# hope that it will be useful, but WITHOUT A 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, v.2.1 along with this #
+# distribution; if not, write to the Free Software Foundation, Inc., #
+# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. #
+# #
+# Red Hat Author(s): Steve Ebersole #
+################################################################################
+hibernate.dialect org.hibernate.dialect.SybaseDialect
+hibernate.connection.driver_class com.sybase.jdbc3.jdbc.SybDriver
+hibernate.connection.url jdbc:sybase:Tds:dev01.qa.atl.jboss.com:4100/cruisecontrol
+hibernate.connection.username cruisecontrol
+hibernate.connection.password cruisecontrol
+
+hibernate.connection.pool_size 5
+
+hibernate.format_sql true
+
+hibernate.max_fetch_depth 5
+
+hibernate.cache.region_prefix hibernate.test
+hibernate.cache.provider_class org.hibernate.cache.HashtableCacheProvider
\ No newline at end of file
17 years, 5 months
Hibernate SVN: r12829 - trunk/HibernateExt/search/src/java/org/hibernate/search.
by hibernate-commits@lists.jboss.org
Author: epbernard
Date: 2007-07-26 16:37:49 -0400 (Thu, 26 Jul 2007)
New Revision: 12829
Modified:
trunk/HibernateExt/search/src/java/org/hibernate/search/Environment.java
Log:
minor
Modified: trunk/HibernateExt/search/src/java/org/hibernate/search/Environment.java
===================================================================
--- trunk/HibernateExt/search/src/java/org/hibernate/search/Environment.java 2007-07-26 20:37:28 UTC (rev 12828)
+++ trunk/HibernateExt/search/src/java/org/hibernate/search/Environment.java 2007-07-26 20:37:49 UTC (rev 12829)
@@ -10,11 +10,6 @@
* Enable listeners auto registration in Hibernate Annotations and EntityManager. Default to true.
*/
public static final String AUTOREGISTER_LISTENERS = "hibernate.search.autoregister_listeners";
-
- /**
- * Indexes base directory
- */
- public static final String INDEX_BASE_DIR = "hibernate.search.index_dir";
/**
* Lucene analyser
@@ -61,7 +56,7 @@
*/
public static final String FILTER_CACHING_STRATEGY_PREFIX = "hibernate.search.filter.cache_strategy.";
/**
- * filter caching strategy class (must have a no-arg constructor and implements FilterCachingStrateg
+ * filter caching strategy class (must have a no-arg constructor and implements FilterCachingStrategy
*/
public static final String FILTER_CACHING_STRATEGY_IMPL = "hibernate.search.filter.cache_strategy.impl";
}
17 years, 5 months
Hibernate SVN: r12828 - trunk/HibernateExt/search/src/java/org/hibernate/search/store.
by hibernate-commits@lists.jboss.org
Author: epbernard
Date: 2007-07-26 16:37:28 -0400 (Thu, 26 Jul 2007)
New Revision: 12828
Modified:
trunk/HibernateExt/search/src/java/org/hibernate/search/store/DirectoryProviderFactory.java
Log:
minor
Modified: trunk/HibernateExt/search/src/java/org/hibernate/search/store/DirectoryProviderFactory.java
===================================================================
--- trunk/HibernateExt/search/src/java/org/hibernate/search/store/DirectoryProviderFactory.java 2007-07-26 20:18:14 UTC (rev 12827)
+++ trunk/HibernateExt/search/src/java/org/hibernate/search/store/DirectoryProviderFactory.java 2007-07-26 20:37:28 UTC (rev 12828)
@@ -66,7 +66,7 @@
if ( StringHelper.isEmpty( className ) ) {
className = DEFAULT_DIRECTORY_PROVIDER;
}
- DirectoryProvider<?> provider = null;
+ DirectoryProvider<?> provider;
try {
@SuppressWarnings( "unchecked" )
Class<DirectoryProvider> directoryClass = ReflectHelper.classForName(
17 years, 5 months
Hibernate SVN: r12827 - trunk/HibernateExt/search/src/java/org/hibernate/search/backend/impl.
by hibernate-commits@lists.jboss.org
Author: epbernard
Date: 2007-07-26 16:18:14 -0400 (Thu, 26 Jul 2007)
New Revision: 12827
Modified:
trunk/HibernateExt/search/src/java/org/hibernate/search/backend/impl/TransactionalWorker.java
Log:
JavaDoc
Modified: trunk/HibernateExt/search/src/java/org/hibernate/search/backend/impl/TransactionalWorker.java
===================================================================
--- trunk/HibernateExt/search/src/java/org/hibernate/search/backend/impl/TransactionalWorker.java 2007-07-26 17:45:30 UTC (rev 12826)
+++ trunk/HibernateExt/search/src/java/org/hibernate/search/backend/impl/TransactionalWorker.java 2007-07-26 20:18:14 UTC (rev 12827)
@@ -19,7 +19,7 @@
* If out of transaction, the work is executed right away
*
* When <code>hibernate.search.worker.type</code> is set to <code>async</code>
- * the work is done in a
+ * the work is done in a separate thread (threads are pooled)
*
* @author Emmanuel Bernard
*/
17 years, 5 months
Hibernate SVN: r12826 - core/branches/Branch_3_2.
by hibernate-commits@lists.jboss.org
Author: steve.ebersole(a)jboss.com
Date: 2007-07-26 13:45:30 -0400 (Thu, 26 Jul 2007)
New Revision: 12826
Modified:
core/branches/Branch_3_2/build.xml
Log:
fork tests
Modified: core/branches/Branch_3_2/build.xml
===================================================================
--- core/branches/Branch_3_2/build.xml 2007-07-26 16:41:36 UTC (rev 12825)
+++ core/branches/Branch_3_2/build.xml 2007-07-26 17:45:30 UTC (rev 12826)
@@ -91,6 +91,7 @@
</path>
<!-- allows external definition of the JDBC classpath fragment -->
<property name="hibernate.test.jdbc.fs.importFile" value="doNotImport" />
+ <import file="${hibernate.test.jdbc.fs.importFile}" optional="true" />
<!-- patternset for insturmentation-eligible resources -->
<patternset id="ps.instrument.domain">
17 years, 5 months