Hibernate SVN: r18335 - core/trunk/testsuite/src/test/java/org/hibernate/test/criteria.
by hibernate-commits@lists.jboss.org
Author: stliu
Date: 2009-12-29 01:28:20 -0500 (Tue, 29 Dec 2009)
New Revision: 18335
Modified:
core/trunk/testsuite/src/test/java/org/hibernate/test/criteria/LongInElementsTest.java
Log:
HHH-2166 update testcase to skip mssql server and oracle due to HHH-1123
Modified: core/trunk/testsuite/src/test/java/org/hibernate/test/criteria/LongInElementsTest.java
===================================================================
--- core/trunk/testsuite/src/test/java/org/hibernate/test/criteria/LongInElementsTest.java 2009-12-29 06:26:18 UTC (rev 18334)
+++ core/trunk/testsuite/src/test/java/org/hibernate/test/criteria/LongInElementsTest.java 2009-12-29 06:28:20 UTC (rev 18335)
@@ -32,6 +32,9 @@
import org.hibernate.Session;
import org.hibernate.Transaction;
import org.hibernate.criterion.Restrictions;
+import org.hibernate.dialect.Dialect;
+import org.hibernate.dialect.Oracle8iDialect;
+import org.hibernate.dialect.SQLServerDialect;
import org.hibernate.junit.functional.FunctionalTestCase;
import org.hibernate.test.hql.StateProvince;
@@ -53,7 +56,7 @@
return new String[] { "criteria/Animal.hbm.xml" };
}
- //HHH-1123
+ //HHH-2166
public void testLongInElementsByHQL(){
Session session = openSession();
Transaction t = session.beginTransaction();
@@ -77,8 +80,8 @@
}
- //HHH-1123
- public void te2stLongInElementsByCriteria(){
+ //HHH-2166
+ public void testLongInElementsByCriteria(){
Session session = openSession();
Transaction t = session.beginTransaction();
@@ -101,6 +104,13 @@
}
+ @Override
+ public boolean appliesTo( Dialect dialect ) {
+ //HHH-1123
+ return !(dialect instanceof SQLServerDialect) && !(dialect instanceof Oracle8iDialect);
+
+ }
+
private List createLotsOfElements(){
List list = new ArrayList();
for ( int i = 0; i < ELEMENTS_SIZE; i++ ){
15 years
Hibernate SVN: r18334 - core/branches/Branch_3_2_4_SP1_CP/test/org/hibernate/test/criteria.
by hibernate-commits@lists.jboss.org
Author: stliu
Date: 2009-12-29 01:26:18 -0500 (Tue, 29 Dec 2009)
New Revision: 18334
Modified:
core/branches/Branch_3_2_4_SP1_CP/test/org/hibernate/test/criteria/LongInElementsTest.java
Log:
JBPAPP-3089 HHH-2166 update testcase to skip mssql server and oracle due to HHH-1123
Modified: core/branches/Branch_3_2_4_SP1_CP/test/org/hibernate/test/criteria/LongInElementsTest.java
===================================================================
--- core/branches/Branch_3_2_4_SP1_CP/test/org/hibernate/test/criteria/LongInElementsTest.java 2009-12-29 06:24:40 UTC (rev 18333)
+++ core/branches/Branch_3_2_4_SP1_CP/test/org/hibernate/test/criteria/LongInElementsTest.java 2009-12-29 06:26:18 UTC (rev 18334)
@@ -32,6 +32,9 @@
import org.hibernate.Session;
import org.hibernate.Transaction;
import org.hibernate.criterion.Restrictions;
+import org.hibernate.dialect.Dialect;
+import org.hibernate.dialect.Oracle8iDialect;
+import org.hibernate.dialect.SQLServerDialect;
import org.hibernate.junit.functional.FunctionalTestCase;
import org.hibernate.test.hql.StateProvince;
@@ -53,7 +56,7 @@
return new String[] { "criteria/Animal.hbm.xml" };
}
- //HHH-1123
+ //HHH-2166
public void testLongInElementsByHQL(){
Session session = openSession();
Transaction t = session.beginTransaction();
@@ -77,8 +80,8 @@
}
- //HHH-1123
- public void te2stLongInElementsByCriteria(){
+ //HHH-2166
+ public void testLongInElementsByCriteria(){
Session session = openSession();
Transaction t = session.beginTransaction();
@@ -101,6 +104,13 @@
}
+ @Override
+ public boolean appliesTo( Dialect dialect ) {
+ //HHH-1123
+ return !(dialect instanceof SQLServerDialect) && !(dialect instanceof Oracle8iDialect);
+
+ }
+
private List createLotsOfElements(){
List list = new ArrayList();
for ( int i = 0; i < ELEMENTS_SIZE; i++ ){
15 years
Hibernate SVN: r18333 - core/branches/Branch_3_3_2_GA_CP/testsuite/src/test/java/org/hibernate/test/criteria.
by hibernate-commits@lists.jboss.org
Author: stliu
Date: 2009-12-29 01:24:40 -0500 (Tue, 29 Dec 2009)
New Revision: 18333
Modified:
core/branches/Branch_3_3_2_GA_CP/testsuite/src/test/java/org/hibernate/test/criteria/LongInElementsTest.java
Log:
JBPAPP-3089 HHH-2166 update testcase to skip mssql server and oracle due to HHH-1123
Modified: core/branches/Branch_3_3_2_GA_CP/testsuite/src/test/java/org/hibernate/test/criteria/LongInElementsTest.java
===================================================================
--- core/branches/Branch_3_3_2_GA_CP/testsuite/src/test/java/org/hibernate/test/criteria/LongInElementsTest.java 2009-12-28 09:18:55 UTC (rev 18332)
+++ core/branches/Branch_3_3_2_GA_CP/testsuite/src/test/java/org/hibernate/test/criteria/LongInElementsTest.java 2009-12-29 06:24:40 UTC (rev 18333)
@@ -32,6 +32,9 @@
import org.hibernate.Session;
import org.hibernate.Transaction;
import org.hibernate.criterion.Restrictions;
+import org.hibernate.dialect.Dialect;
+import org.hibernate.dialect.Oracle8iDialect;
+import org.hibernate.dialect.SQLServerDialect;
import org.hibernate.junit.functional.FunctionalTestCase;
import org.hibernate.test.hql.StateProvince;
@@ -53,7 +56,7 @@
return new String[] { "criteria/Animal.hbm.xml" };
}
- //HHH-1123
+ //HHH-2166
public void testLongInElementsByHQL(){
Session session = openSession();
Transaction t = session.beginTransaction();
@@ -77,8 +80,8 @@
}
- //HHH-1123
- public void te2stLongInElementsByCriteria(){
+ //HHH-2166
+ public void testLongInElementsByCriteria(){
Session session = openSession();
Transaction t = session.beginTransaction();
@@ -101,6 +104,13 @@
}
+ @Override
+ public boolean appliesTo( Dialect dialect ) {
+ //HHH-1123
+ return !(dialect instanceof SQLServerDialect) && !(dialect instanceof Oracle8iDialect);
+
+ }
+
private List createLotsOfElements(){
List list = new ArrayList();
for ( int i = 0; i < ELEMENTS_SIZE; i++ ){
15 years
Hibernate SVN: r18332 - core/trunk/core/src/main/java/org/hibernate/persister/entity.
by hibernate-commits@lists.jboss.org
Author: stliu
Date: 2009-12-28 04:18:55 -0500 (Mon, 28 Dec 2009)
New Revision: 18332
Modified:
core/trunk/core/src/main/java/org/hibernate/persister/entity/EntityPersister.java
Log:
minor change, correct javadoc spell
Modified: core/trunk/core/src/main/java/org/hibernate/persister/entity/EntityPersister.java
===================================================================
--- core/trunk/core/src/main/java/org/hibernate/persister/entity/EntityPersister.java 2009-12-24 14:09:27 UTC (rev 18331)
+++ core/trunk/core/src/main/java/org/hibernate/persister/entity/EntityPersister.java 2009-12-28 09:18:55 UTC (rev 18332)
@@ -68,7 +68,7 @@
* Called only once per {@link org.hibernate.SessionFactory} lifecycle,
* after all entity persisters have been instantiated.
*
- * @throws org.hibernate.MappingException Indicates an issue in the metdata.
+ * @throws org.hibernate.MappingException Indicates an issue in the metadata.
*/
public void postInstantiate() throws MappingException;
@@ -172,7 +172,7 @@
/**
* Determine whether this entity has any non-none cascading.
*
- * @return True if the entity has any properties with a cscade other than NONE;
+ * @return True if the entity has any properties with a cascade other than NONE;
* false otherwise (aka, no cascading).
*/
public boolean hasCascades();
@@ -205,7 +205,7 @@
* Get the type of a particular property by name.
*
* @param propertyName The name of the property for which to retrieve
- * the typpe.
+ * the type.
* @return The type.
* @throws org.hibernate.MappingException Typically indicates an unknown
* property name.
@@ -245,10 +245,10 @@
public boolean hasIdentifierProperty();
/**
- * Determine whether detahced instances of this entity carry their own
+ * Determine whether detached instances of this entity carry their own
* identifier value.
* <p/>
- * The other option is the deperecated feature where users could supply
+ * The other option is the deprecated feature where users could supply
* the id during session calls.
*
* @return True if either (1) {@link #hasIdentifierProperty()} or
@@ -300,7 +300,7 @@
/**
* Retrieve the current state of the natural-id properties from the database.
*
- * @param id The identifier of the entity for which to retrieve the naturak-id values.
+ * @param id The identifier of the entity for which to retrieve the natural-id values.
* @param session The session from which the request originated.
* @return The natural-id snapshot.
*/
@@ -430,7 +430,7 @@
public boolean[] getPropertyVersionability();
public boolean[] getPropertyLaziness();
/**
- * Get the cascade styles of the propertes (optional operation)
+ * Get the cascade styles of the properties (optional operation)
*/
public CascadeStyle[] getPropertyCascadeStyles();
@@ -700,7 +700,7 @@
* <tt>Animal</tt> persister is being asked to return the persister specific to <tt>Cat</tt>.
* <p/>
* It is also possible that the instance is actually an <tt>Animal</tt> instance in the above example in which
- * case we would retrn <tt>this</tt> from this method.
+ * case we would return <tt>this</tt> from this method.
*
* @param instance The entity instance
* @param factory Reference to the SessionFactory
15 years
Hibernate SVN: r18331 - core/trunk/core/src/main/java/org/hibernate/dialect.
by hibernate-commits@lists.jboss.org
Author: stliu
Date: 2009-12-24 09:09:27 -0500 (Thu, 24 Dec 2009)
New Revision: 18331
Modified:
core/trunk/core/src/main/java/org/hibernate/dialect/DerbyDialect.java
Log:
HHH-2347 HHH-1918 Improvement to DerbyDialect default identy generation mode
Modified: core/trunk/core/src/main/java/org/hibernate/dialect/DerbyDialect.java
===================================================================
--- core/trunk/core/src/main/java/org/hibernate/dialect/DerbyDialect.java 2009-12-24 13:49:28 UTC (rev 18330)
+++ core/trunk/core/src/main/java/org/hibernate/dialect/DerbyDialect.java 2009-12-24 14:09:27 UTC (rev 18331)
@@ -81,12 +81,12 @@
return ", ";
}
- /**
- * This is different in Cloudscape to DB2.
- */
- public String getIdentityColumnString() {
- return "not null generated always as identity"; //$NON-NLS-1
- }
+// /**
+// * This is different in Cloudscape to DB2.
+// */
+// public String getIdentityColumnString() {
+// return "not null generated always as identity"; //$NON-NLS-1
+// }
/**
* Return the case statement modified for Cloudscape.
@@ -99,9 +99,9 @@
return true;
}
- public Class getNativeIdentifierGeneratorClass() {
- return TableHiLoGenerator.class;
- }
+// public Class getNativeIdentifierGeneratorClass() {
+// return TableHiLoGenerator.class;
+// }
public boolean supportsSequences() {
return false;
15 years
Hibernate SVN: r18330 - core/branches/Branch_3_3/core/src/main/java/org/hibernate/dialect.
by hibernate-commits@lists.jboss.org
Author: stliu
Date: 2009-12-24 08:49:28 -0500 (Thu, 24 Dec 2009)
New Revision: 18330
Modified:
core/branches/Branch_3_3/core/src/main/java/org/hibernate/dialect/DerbyDialect.java
Log:
HHH-4531 Derby dialect should not support comments
Modified: core/branches/Branch_3_3/core/src/main/java/org/hibernate/dialect/DerbyDialect.java
===================================================================
--- core/branches/Branch_3_3/core/src/main/java/org/hibernate/dialect/DerbyDialect.java 2009-12-24 13:47:11 UTC (rev 18329)
+++ core/branches/Branch_3_3/core/src/main/java/org/hibernate/dialect/DerbyDialect.java 2009-12-24 13:49:28 UTC (rev 18330)
@@ -90,6 +90,10 @@
return false;
}
+ public boolean supportsCommentOn() {
+ return false;
+ }
+
public String getQuerySequencesString() {
return null ;
}
15 years
Hibernate SVN: r18329 - in core/branches/Branch_3_3/core/src: test/java/org/hibernate and 1 other directories.
by hibernate-commits@lists.jboss.org
Author: stliu
Date: 2009-12-24 08:47:11 -0500 (Thu, 24 Dec 2009)
New Revision: 18329
Added:
core/branches/Branch_3_3/core/src/test/java/org/hibernate/connection/
core/branches/Branch_3_3/core/src/test/java/org/hibernate/connection/PropertiesTest.java
Modified:
core/branches/Branch_3_3/core/src/main/java/org/hibernate/connection/ConnectionProviderFactory.java
Log:
HHH-4574 ConnectionProviderFactory.getConnectionProperties() includes extra properties
Modified: core/branches/Branch_3_3/core/src/main/java/org/hibernate/connection/ConnectionProviderFactory.java
===================================================================
--- core/branches/Branch_3_3/core/src/main/java/org/hibernate/connection/ConnectionProviderFactory.java 2009-12-24 13:26:38 UTC (rev 18328)
+++ core/branches/Branch_3_3/core/src/main/java/org/hibernate/connection/ConnectionProviderFactory.java 2009-12-24 13:47:11 UTC (rev 18329)
@@ -145,7 +145,7 @@
* Transform JDBC connection properties.
*
* Passed in the form <tt>hibernate.connection.*</tt> to the
- * format accepted by <tt>DriverManager</tt> by triming the leading "<tt>hibernate.connection</tt>".
+ * format accepted by <tt>DriverManager</tt> by trimming the leading "<tt>hibernate.connection</tt>".
*/
public static Properties getConnectionProperties(Properties properties) {
@@ -153,7 +153,7 @@
Properties result = new Properties();
while ( iter.hasNext() ) {
String prop = (String) iter.next();
- if ( prop.indexOf(Environment.CONNECTION_PREFIX) > -1 && !SPECIAL_PROPERTIES.contains(prop) ) {
+ if ( prop.startsWith(Environment.CONNECTION_PREFIX) && !SPECIAL_PROPERTIES.contains(prop) ) {
result.setProperty(
prop.substring( Environment.CONNECTION_PREFIX.length()+1 ),
properties.getProperty(prop)
Added: core/branches/Branch_3_3/core/src/test/java/org/hibernate/connection/PropertiesTest.java
===================================================================
--- core/branches/Branch_3_3/core/src/test/java/org/hibernate/connection/PropertiesTest.java (rev 0)
+++ core/branches/Branch_3_3/core/src/test/java/org/hibernate/connection/PropertiesTest.java 2009-12-24 13:47:11 UTC (rev 18329)
@@ -0,0 +1,54 @@
+/*
+ * Hibernate, Relational Persistence for Idiomatic Java
+ *
+ * Copyright (c) 2008, Red Hat Middleware LLC or third-party contributors as
+ * indicated by the @author tags or express copyright attribution
+ * statements applied by the authors. All third-party contributions are
+ * distributed under license by Red Hat Middleware LLC.
+ *
+ * This copyrighted material is made available to anyone wishing to use, modify,
+ * copy, or redistribute it subject to the terms and conditions of the GNU
+ * Lesser General Public License, as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+ * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
+ * for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this distribution; if not, write to:
+ * Free Software Foundation, Inc.
+ * 51 Franklin Street, Fifth Floor
+ * Boston, MA 02110-1301 USA
+ *
+ */
+package org.hibernate.connection;
+
+import java.util.Properties;
+
+import junit.framework.TestCase;
+
+/**
+ * Undocumented
+ *
+ * @author kbow
+ */
+
+public class PropertiesTest extends TestCase {
+ public void testProperties() throws Exception {
+ final Properties props = new Properties();
+
+ props.put("rpt.1.hibernate.dialect", "org.hibernate.dialect.DerbyDialect");
+ props.put("rpt.2.hibernate.connection.driver_class", "org.apache.derby.jdbc.ClientDriver");
+ props.put("rpt.3.hibernate.connection.url", "jdbc:derby://localhost:1527/db/reports.db");
+ props.put("rpt.4.hibernate.connection.username", "sa");
+ props.put("rpt.5.hibernate.connection.password_enc", "76f271db3661fd50082e68d4b953fbee");
+ props.put("rpt.6.hibernate.connection.password_enc", "76f271db3661fd50082e68d4b953fbee");
+ props.put("hibernate.connection.create", "true");
+
+ final Properties outputProps = ConnectionProviderFactory.getConnectionProperties(props);
+ assertEquals(1, outputProps.size());
+ assertEquals("true", outputProps.get("create"));
+ }
+
+}
15 years
Hibernate SVN: r18328 - in core/trunk/core/src: test/java/org/hibernate and 1 other directories.
by hibernate-commits@lists.jboss.org
Author: stliu
Date: 2009-12-24 08:26:38 -0500 (Thu, 24 Dec 2009)
New Revision: 18328
Added:
core/trunk/core/src/test/java/org/hibernate/connection/
core/trunk/core/src/test/java/org/hibernate/connection/PropertiesTest.java
Modified:
core/trunk/core/src/main/java/org/hibernate/connection/ConnectionProviderFactory.java
Log:
HHH-4574 ConnectionProviderFactory.getConnectionProperties() includes extra properties
Modified: core/trunk/core/src/main/java/org/hibernate/connection/ConnectionProviderFactory.java
===================================================================
--- core/trunk/core/src/main/java/org/hibernate/connection/ConnectionProviderFactory.java 2009-12-24 11:55:08 UTC (rev 18327)
+++ core/trunk/core/src/main/java/org/hibernate/connection/ConnectionProviderFactory.java 2009-12-24 13:26:38 UTC (rev 18328)
@@ -145,7 +145,7 @@
* Transform JDBC connection properties.
*
* Passed in the form <tt>hibernate.connection.*</tt> to the
- * format accepted by <tt>DriverManager</tt> by triming the leading "<tt>hibernate.connection</tt>".
+ * format accepted by <tt>DriverManager</tt> by trimming the leading "<tt>hibernate.connection</tt>".
*/
public static Properties getConnectionProperties(Properties properties) {
@@ -153,7 +153,7 @@
Properties result = new Properties();
while ( iter.hasNext() ) {
String prop = (String) iter.next();
- if ( prop.indexOf(Environment.CONNECTION_PREFIX) > -1 && !SPECIAL_PROPERTIES.contains(prop) ) {
+ if ( prop.startsWith(Environment.CONNECTION_PREFIX) && !SPECIAL_PROPERTIES.contains(prop) ) {
result.setProperty(
prop.substring( Environment.CONNECTION_PREFIX.length()+1 ),
properties.getProperty(prop)
Added: core/trunk/core/src/test/java/org/hibernate/connection/PropertiesTest.java
===================================================================
--- core/trunk/core/src/test/java/org/hibernate/connection/PropertiesTest.java (rev 0)
+++ core/trunk/core/src/test/java/org/hibernate/connection/PropertiesTest.java 2009-12-24 13:26:38 UTC (rev 18328)
@@ -0,0 +1,54 @@
+/*
+ * Hibernate, Relational Persistence for Idiomatic Java
+ *
+ * Copyright (c) 2008, Red Hat Middleware LLC or third-party contributors as
+ * indicated by the @author tags or express copyright attribution
+ * statements applied by the authors. All third-party contributions are
+ * distributed under license by Red Hat Middleware LLC.
+ *
+ * This copyrighted material is made available to anyone wishing to use, modify,
+ * copy, or redistribute it subject to the terms and conditions of the GNU
+ * Lesser General Public License, as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+ * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
+ * for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this distribution; if not, write to:
+ * Free Software Foundation, Inc.
+ * 51 Franklin Street, Fifth Floor
+ * Boston, MA 02110-1301 USA
+ *
+ */
+package org.hibernate.connection;
+
+import java.util.Properties;
+
+import junit.framework.TestCase;
+
+/**
+ * Undocumented
+ *
+ * @author kbow
+ */
+
+public class PropertiesTest extends TestCase {
+ public void testProperties() throws Exception {
+ final Properties props = new Properties();
+
+ props.put("rpt.1.hibernate.dialect", "org.hibernate.dialect.DerbyDialect");
+ props.put("rpt.2.hibernate.connection.driver_class", "org.apache.derby.jdbc.ClientDriver");
+ props.put("rpt.3.hibernate.connection.url", "jdbc:derby://localhost:1527/db/reports.db");
+ props.put("rpt.4.hibernate.connection.username", "sa");
+ props.put("rpt.5.hibernate.connection.password_enc", "76f271db3661fd50082e68d4b953fbee");
+ props.put("rpt.6.hibernate.connection.password_enc", "76f271db3661fd50082e68d4b953fbee");
+ props.put("hibernate.connection.create", "true");
+
+ final Properties outputProps = ConnectionProviderFactory.getConnectionProperties(props);
+ assertEquals(1, outputProps.size());
+ assertEquals("true", outputProps.get("create"));
+ }
+
+}
15 years