Hibernate SVN: r18463 - core/branches/Branch_3_3/testsuite/src/test/java/org/hibernate/test/pagination.
by hibernate-commits@lists.jboss.org
Author: stliu
Date: 2010-01-08 15:20:00 -0500 (Fri, 08 Jan 2010)
New Revision: 18463
Modified:
core/branches/Branch_3_3/testsuite/src/test/java/org/hibernate/test/pagination/PaginationTest.java
Log:
HHH-4764 org.hibernate.test.pagination.PaginationTest.testLimitOffset() fails on oracle and db2
Modified: core/branches/Branch_3_3/testsuite/src/test/java/org/hibernate/test/pagination/PaginationTest.java
===================================================================
--- core/branches/Branch_3_3/testsuite/src/test/java/org/hibernate/test/pagination/PaginationTest.java 2010-01-08 20:17:01 UTC (rev 18462)
+++ core/branches/Branch_3_3/testsuite/src/test/java/org/hibernate/test/pagination/PaginationTest.java 2010-01-08 20:20:00 UTC (rev 18463)
@@ -126,7 +126,7 @@
result = generateBaseCriteria( session )
.setFirstResult( 99 )
- .setMaxResults( Integer.MAX_VALUE )
+ .setMaxResults( Integer.MAX_VALUE - 200 )
.list();
assertEquals( 1, result.size() );
assertEquals( 99, ( ( DataPoint ) result.get( 0 ) ).getSequence() );
14 years, 11 months
Hibernate SVN: r18462 - core/branches/Branch_3_3_2_GA_CP/testsuite/src/test/java/org/hibernate/test/pagination.
by hibernate-commits@lists.jboss.org
Author: stliu
Date: 2010-01-08 15:17:01 -0500 (Fri, 08 Jan 2010)
New Revision: 18462
Modified:
core/branches/Branch_3_3_2_GA_CP/testsuite/src/test/java/org/hibernate/test/pagination/PaginationTest.java
Log:
JBPAPP-3372 HHH-4764 org.hibernate.test.pagination.PaginationTest.testLimitOffset() fails on oracle and db2
Modified: core/branches/Branch_3_3_2_GA_CP/testsuite/src/test/java/org/hibernate/test/pagination/PaginationTest.java
===================================================================
--- core/branches/Branch_3_3_2_GA_CP/testsuite/src/test/java/org/hibernate/test/pagination/PaginationTest.java 2010-01-08 20:10:19 UTC (rev 18461)
+++ core/branches/Branch_3_3_2_GA_CP/testsuite/src/test/java/org/hibernate/test/pagination/PaginationTest.java 2010-01-08 20:17:01 UTC (rev 18462)
@@ -126,7 +126,7 @@
result = generateBaseCriteria( session )
.setFirstResult( 99 )
- .setMaxResults( Integer.MAX_VALUE )
+ .setMaxResults( Integer.MAX_VALUE - 200 )
.list();
assertEquals( 1, result.size() );
assertEquals( 99, ( ( DataPoint ) result.get( 0 ) ).getSequence() );
14 years, 11 months
Hibernate SVN: r18461 - search/trunk/src/main/java/org/hibernate/search/store.
by hibernate-commits@lists.jboss.org
Author: hardy.ferentschik
Date: 2010-01-08 15:10:19 -0500 (Fri, 08 Jan 2010)
New Revision: 18461
Modified:
search/trunk/src/main/java/org/hibernate/search/store/FSSlaveDirectoryProvider.java
Log:
HSEARCH-440, HSEARCH-321
Modified: search/trunk/src/main/java/org/hibernate/search/store/FSSlaveDirectoryProvider.java
===================================================================
--- search/trunk/src/main/java/org/hibernate/search/store/FSSlaveDirectoryProvider.java 2010-01-08 19:28:01 UTC (rev 18460)
+++ search/trunk/src/main/java/org/hibernate/search/store/FSSlaveDirectoryProvider.java 2010-01-08 20:10:19 UTC (rev 18461)
@@ -115,7 +115,7 @@
//no default
log.debug( "Setting directory 1 as current" );
currentToBe = 1;
- File destinationFile = new File( indexDir, Integer.valueOf( readCurrentState ).toString() );
+ File destinationFile = new File( indexDir, Integer.valueOf( currentToBe ).toString() );
int sourceCurrent;
if ( new File( sourceIndexDir, "current1" ).exists() ) {
sourceCurrent = 1;
14 years, 11 months
Hibernate SVN: r18460 - core/branches/Branch_3_3_2_GA_CP/core/src/main/java/org/hibernate/loader.
by hibernate-commits@lists.jboss.org
Author: stliu
Date: 2010-01-08 14:28:01 -0500 (Fri, 08 Jan 2010)
New Revision: 18460
Modified:
core/branches/Branch_3_3_2_GA_CP/core/src/main/java/org/hibernate/loader/Loader.java
Log:
minor change, correct javadoc spell
Modified: core/branches/Branch_3_3_2_GA_CP/core/src/main/java/org/hibernate/loader/Loader.java
===================================================================
--- core/branches/Branch_3_3_2_GA_CP/core/src/main/java/org/hibernate/loader/Loader.java 2010-01-08 19:22:17 UTC (rev 18459)
+++ core/branches/Branch_3_3_2_GA_CP/core/src/main/java/org/hibernate/loader/Loader.java 2010-01-08 19:28:01 UTC (rev 18460)
@@ -1056,7 +1056,7 @@
/**
* If this is a collection initializer, we need to tell the session that a collection
- * is being initilized, to account for the possibility of the collection having
+ * is being initialized, to account for the possibility of the collection having
* no elements (hence no rows in the result set).
*/
private void handleEmptyCollections(
@@ -1173,7 +1173,7 @@
}
/**
- * Resolve any ids for currently loaded objects, duplications within the
+ * Resolve any IDs for currently loaded objects, duplications within the
* <tt>ResultSet</tt>, etc. Instantiate empty objects to be initialized from the
* <tt>ResultSet</tt>. Return an array of objects (a row of results) and an
* array of booleans (by side-effect) that determine whether the corresponding
@@ -1622,7 +1622,7 @@
}
/**
- * Some dialect-specific LIMIT clauses require the maximium last row number
+ * Some dialect-specific LIMIT clauses require the maximum last row number
* (aka, first_row_number + total_row_count), while others require the maximum
* returned row count (the total maximum number of rows to return).
*
@@ -1708,7 +1708,7 @@
/**
* Bind positional parameter values to the JDBC prepared statement.
* <p/>
- * Postional parameters are those specified by JDBC-style ? parameters
+ * Positional parameters are those specified by JDBC-style ? parameters
* in the source query. It is (currently) expected that these come
* before any named parameters in the source query.
*
14 years, 11 months
Hibernate SVN: r18459 - in core/branches/Branch_3_3: testsuite/src/test/java/org/hibernate/test/dialect/function and 1 other directory.
by hibernate-commits@lists.jboss.org
Author: stliu
Date: 2010-01-08 14:22:17 -0500 (Fri, 08 Jan 2010)
New Revision: 18459
Added:
core/branches/Branch_3_3/testsuite/src/test/java/org/hibernate/test/dialect/function/MySQLRoundFunctionTest.java
core/branches/Branch_3_3/testsuite/src/test/java/org/hibernate/test/dialect/function/Product.hbm.xml
core/branches/Branch_3_3/testsuite/src/test/java/org/hibernate/test/dialect/function/Product.java
Modified:
core/branches/Branch_3_3/core/src/main/java/org/hibernate/dialect/MySQLDialect.java
Log:
HHH-4769 In HQL, function ROUND always returns an Integer, it truncate the decimal part of Double number.
Modified: core/branches/Branch_3_3/core/src/main/java/org/hibernate/dialect/MySQLDialect.java
===================================================================
--- core/branches/Branch_3_3/core/src/main/java/org/hibernate/dialect/MySQLDialect.java 2010-01-08 18:43:26 UTC (rev 18458)
+++ core/branches/Branch_3_3/core/src/main/java/org/hibernate/dialect/MySQLDialect.java 2010-01-08 19:22:17 UTC (rev 18459)
@@ -112,7 +112,7 @@
registerFunction("ceiling", new StandardSQLFunction("ceiling", Hibernate.INTEGER) );
registerFunction("ceil", new StandardSQLFunction("ceil", Hibernate.INTEGER) );
registerFunction("floor", new StandardSQLFunction("floor", Hibernate.INTEGER) );
- registerFunction("round", new StandardSQLFunction("round", Hibernate.INTEGER) );
+ registerFunction("round", new StandardSQLFunction("round") );
registerFunction("datediff", new StandardSQLFunction("datediff", Hibernate.INTEGER) );
registerFunction("timediff", new StandardSQLFunction("timediff", Hibernate.TIME) );
Added: core/branches/Branch_3_3/testsuite/src/test/java/org/hibernate/test/dialect/function/MySQLRoundFunctionTest.java
===================================================================
--- core/branches/Branch_3_3/testsuite/src/test/java/org/hibernate/test/dialect/function/MySQLRoundFunctionTest.java (rev 0)
+++ core/branches/Branch_3_3/testsuite/src/test/java/org/hibernate/test/dialect/function/MySQLRoundFunctionTest.java 2010-01-08 19:22:17 UTC (rev 18459)
@@ -0,0 +1,75 @@
+/*
+ * Hibernate, Relational Persistence for Idiomatic Java
+ *
+ * Copyright (c) 2009, 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.test.dialect.function;
+
+import java.math.BigDecimal;
+
+import org.hibernate.Query;
+import org.hibernate.Session;
+import org.hibernate.Transaction;
+import org.hibernate.dialect.Dialect;
+import org.hibernate.dialect.MySQLDialect;
+import org.hibernate.junit.functional.FunctionalTestCase;
+
+/**
+ *
+ * @author Strong Liu <stliu(a)redhat.com>
+ *
+ */
+public class MySQLRoundFunctionTest extends FunctionalTestCase {
+
+ public MySQLRoundFunctionTest( String string ) {
+ super( string );
+ }
+
+ public String[] getMappings() {
+ return new String[]{"dialect/function/Product.hbm.xml"};
+ }
+
+ public void testRoundFuntion(){
+ Product product = new Product();
+ product.setLength( 100 );
+ product.setPrice( new BigDecimal( 1.298 ) );
+ Session s=openSession();
+ Transaction tx=s.beginTransaction();
+ s.save( product );
+ tx.commit();
+ s.close();
+ s=openSession();
+ tx=s.beginTransaction();
+ Query q=s.createQuery( "select round(p.price,1) from Product p" );
+ Object o=q.uniqueResult();
+ assertEquals( BigDecimal.class , o.getClass() );
+ assertEquals( BigDecimal.valueOf( 1.3 ) , o );
+ tx.commit();
+ s.close();
+
+ }
+
+ @Override
+ public boolean appliesTo( Dialect dialect ) {
+ return dialect instanceof MySQLDialect;
+ }
+
+}
Added: core/branches/Branch_3_3/testsuite/src/test/java/org/hibernate/test/dialect/function/Product.hbm.xml
===================================================================
--- core/branches/Branch_3_3/testsuite/src/test/java/org/hibernate/test/dialect/function/Product.hbm.xml (rev 0)
+++ core/branches/Branch_3_3/testsuite/src/test/java/org/hibernate/test/dialect/function/Product.hbm.xml 2010-01-08 19:22:17 UTC (rev 18459)
@@ -0,0 +1,17 @@
+<?xml version="1.0"?>
+<!DOCTYPE hibernate-mapping PUBLIC
+ "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
+ "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
+
+<hibernate-mapping package="org.hibernate.test.dialect.function">
+
+ <class name="Product" table="t_product">
+ <id name="id">
+ <generator class="native"/>
+ </id>
+ <property name="length" />
+ <property name="weight" />
+ <property name="price" />
+ </class>
+
+</hibernate-mapping>
\ No newline at end of file
Added: core/branches/Branch_3_3/testsuite/src/test/java/org/hibernate/test/dialect/function/Product.java
===================================================================
--- core/branches/Branch_3_3/testsuite/src/test/java/org/hibernate/test/dialect/function/Product.java (rev 0)
+++ core/branches/Branch_3_3/testsuite/src/test/java/org/hibernate/test/dialect/function/Product.java 2010-01-08 19:22:17 UTC (rev 18459)
@@ -0,0 +1,71 @@
+/*
+ * Hibernate, Relational Persistence for Idiomatic Java
+ *
+ * Copyright (c) 2009, 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.test.dialect.function;
+
+import java.math.BigDecimal;
+
+/**
+ *
+ * @author Strong Liu <stliu(a)redhat.com>
+ *
+ */
+public class Product {
+ private Long id;
+ private int length;
+ private long weight;
+ private BigDecimal price;
+
+ public Long getId() {
+ return id;
+ }
+
+ public void setId( Long id ) {
+ this.id = id;
+ }
+
+ public int getLength() {
+ return length;
+ }
+
+ public void setLength( int length ) {
+ this.length = length;
+ }
+
+ public long getWeight() {
+ return weight;
+ }
+
+ public void setWeight( long weight ) {
+ this.weight = weight;
+ }
+
+ public BigDecimal getPrice() {
+ return price;
+ }
+
+ public void setPrice( BigDecimal price ) {
+ this.price = price;
+ }
+
+}
14 years, 11 months
Hibernate SVN: r18458 - in core/branches/Branch_3_2_4_SP1_CP: test/org/hibernate/test and 1 other directories.
by hibernate-commits@lists.jboss.org
Author: stliu
Date: 2010-01-08 13:43:26 -0500 (Fri, 08 Jan 2010)
New Revision: 18458
Added:
core/branches/Branch_3_2_4_SP1_CP/test/org/hibernate/test/dialect/function/MySQLRoundFunctionTest.java
core/branches/Branch_3_2_4_SP1_CP/test/org/hibernate/test/dialect/function/Product.hbm.xml
core/branches/Branch_3_2_4_SP1_CP/test/org/hibernate/test/dialect/function/Product.java
Modified:
core/branches/Branch_3_2_4_SP1_CP/src/org/hibernate/dialect/MySQLDialect.java
core/branches/Branch_3_2_4_SP1_CP/test/org/hibernate/test/AllTests.java
Log:
JBPAPP-3371 HHH-4769 on MySQL, HQL function ROUND always returns an Integer, it truncate the decimal part of Double number.
Modified: core/branches/Branch_3_2_4_SP1_CP/src/org/hibernate/dialect/MySQLDialect.java
===================================================================
--- core/branches/Branch_3_2_4_SP1_CP/src/org/hibernate/dialect/MySQLDialect.java 2010-01-08 18:38:17 UTC (rev 18457)
+++ core/branches/Branch_3_2_4_SP1_CP/src/org/hibernate/dialect/MySQLDialect.java 2010-01-08 18:43:26 UTC (rev 18458)
@@ -89,7 +89,7 @@
registerFunction("ceiling", new StandardSQLFunction("ceiling", Hibernate.INTEGER) );
registerFunction("ceil", new StandardSQLFunction("ceil", Hibernate.INTEGER) );
registerFunction("floor", new StandardSQLFunction("floor", Hibernate.INTEGER) );
- registerFunction("round", new StandardSQLFunction("round", Hibernate.INTEGER) );
+ registerFunction("round", new StandardSQLFunction("round") );
registerFunction("datediff", new StandardSQLFunction("datediff", Hibernate.INTEGER) );
registerFunction("timediff", new StandardSQLFunction("timediff", Hibernate.TIME) );
Modified: core/branches/Branch_3_2_4_SP1_CP/test/org/hibernate/test/AllTests.java
===================================================================
--- core/branches/Branch_3_2_4_SP1_CP/test/org/hibernate/test/AllTests.java 2010-01-08 18:38:17 UTC (rev 18457)
+++ core/branches/Branch_3_2_4_SP1_CP/test/org/hibernate/test/AllTests.java 2010-01-08 18:43:26 UTC (rev 18458)
@@ -31,6 +31,7 @@
import org.hibernate.test.cut.CompositeUserTypeTest;
import org.hibernate.test.deletetransient.DeleteTransientEntityTest;
import org.hibernate.test.dialect.function.AnsiTrimEmulationFunctionTest;
+import org.hibernate.test.dialect.function.MySQLRoundFunctionTest;
import org.hibernate.test.dialect.functional.DialectFunctionalTestsSuite;
import org.hibernate.test.dialect.unit.DialectUnitTestsSuite;
import org.hibernate.test.discriminator.DiscriminatorTest;
@@ -308,6 +309,7 @@
suite.addTest( UserCollectionTypeSuite.suite() );
suite.addTest( KeyManyToOneSuite.suite() );
suite.addTest( AnsiTrimEmulationFunctionTest.suite() );
+ suite.addTest( MySQLRoundFunctionTest.suite() );
suite.addTest( DialectFunctionalTestsSuite.suite() );
suite.addTest( DialectUnitTestsSuite.suite() );
suite.addTest( InsertOrderingTest.suite() );
Added: core/branches/Branch_3_2_4_SP1_CP/test/org/hibernate/test/dialect/function/MySQLRoundFunctionTest.java
===================================================================
--- core/branches/Branch_3_2_4_SP1_CP/test/org/hibernate/test/dialect/function/MySQLRoundFunctionTest.java (rev 0)
+++ core/branches/Branch_3_2_4_SP1_CP/test/org/hibernate/test/dialect/function/MySQLRoundFunctionTest.java 2010-01-08 18:43:26 UTC (rev 18458)
@@ -0,0 +1,80 @@
+/*
+ * Hibernate, Relational Persistence for Idiomatic Java
+ *
+ * Copyright (c) 2009, 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.test.dialect.function;
+
+import java.math.BigDecimal;
+
+import junit.framework.Test;
+
+import org.hibernate.Query;
+import org.hibernate.Session;
+import org.hibernate.Transaction;
+import org.hibernate.dialect.Dialect;
+import org.hibernate.dialect.MySQLDialect;
+import org.hibernate.junit.functional.FunctionalTestCase;
+import org.hibernate.junit.functional.FunctionalTestClassTestSuite;
+
+/**
+ *
+ * @author Strong Liu <stliu(a)redhat.com>
+ *
+ */
+public class MySQLRoundFunctionTest extends FunctionalTestCase {
+
+ public MySQLRoundFunctionTest( String string ) {
+ super( string );
+ }
+ public static Test suite() {
+ return new FunctionalTestClassTestSuite( MySQLRoundFunctionTest.class );
+ }
+ public String[] getMappings() {
+ return new String[]{"dialect/function/Product.hbm.xml"};
+ }
+
+ public void testRoundFuntion(){
+ Product product = new Product();
+ product.setLength( 100 );
+ product.setPrice( new BigDecimal( 1.298 ) );
+ Session s=openSession();
+ Transaction tx=s.beginTransaction();
+ s.save( product );
+ tx.commit();
+ s.close();
+ s=openSession();
+ tx=s.beginTransaction();
+ Query q=s.createQuery( "select round(p.price,1) from Product p" );
+ Object o=q.uniqueResult();
+ assertEquals( BigDecimal.class , o.getClass() );
+ assertEquals( BigDecimal.valueOf( 1.3 ) , o );
+ tx.commit();
+ s.close();
+
+ }
+
+
+ public boolean appliesTo( Dialect dialect ) {
+ return dialect instanceof MySQLDialect;
+ }
+
+}
Added: core/branches/Branch_3_2_4_SP1_CP/test/org/hibernate/test/dialect/function/Product.hbm.xml
===================================================================
--- core/branches/Branch_3_2_4_SP1_CP/test/org/hibernate/test/dialect/function/Product.hbm.xml (rev 0)
+++ core/branches/Branch_3_2_4_SP1_CP/test/org/hibernate/test/dialect/function/Product.hbm.xml 2010-01-08 18:43:26 UTC (rev 18458)
@@ -0,0 +1,17 @@
+<?xml version="1.0"?>
+<!DOCTYPE hibernate-mapping PUBLIC
+ "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
+ "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
+
+<hibernate-mapping package="org.hibernate.test.dialect.function">
+
+ <class name="Product" table="t_product">
+ <id name="id">
+ <generator class="native"/>
+ </id>
+ <property name="length" />
+ <property name="weight" />
+ <property name="price" />
+ </class>
+
+</hibernate-mapping>
\ No newline at end of file
Added: core/branches/Branch_3_2_4_SP1_CP/test/org/hibernate/test/dialect/function/Product.java
===================================================================
--- core/branches/Branch_3_2_4_SP1_CP/test/org/hibernate/test/dialect/function/Product.java (rev 0)
+++ core/branches/Branch_3_2_4_SP1_CP/test/org/hibernate/test/dialect/function/Product.java 2010-01-08 18:43:26 UTC (rev 18458)
@@ -0,0 +1,71 @@
+/*
+ * Hibernate, Relational Persistence for Idiomatic Java
+ *
+ * Copyright (c) 2009, 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.test.dialect.function;
+
+import java.math.BigDecimal;
+
+/**
+ *
+ * @author Strong Liu <stliu(a)redhat.com>
+ *
+ */
+public class Product {
+ private Long id;
+ private int length;
+ private long weight;
+ private BigDecimal price;
+
+ public Long getId() {
+ return id;
+ }
+
+ public void setId( Long id ) {
+ this.id = id;
+ }
+
+ public int getLength() {
+ return length;
+ }
+
+ public void setLength( int length ) {
+ this.length = length;
+ }
+
+ public long getWeight() {
+ return weight;
+ }
+
+ public void setWeight( long weight ) {
+ this.weight = weight;
+ }
+
+ public BigDecimal getPrice() {
+ return price;
+ }
+
+ public void setPrice( BigDecimal price ) {
+ this.price = price;
+ }
+
+}
14 years, 11 months
Hibernate SVN: r18457 - in core/trunk: testsuite/src/test/java/org/hibernate/test/dialect/function and 1 other directory.
by hibernate-commits@lists.jboss.org
Author: stliu
Date: 2010-01-08 13:38:17 -0500 (Fri, 08 Jan 2010)
New Revision: 18457
Added:
core/trunk/testsuite/src/test/java/org/hibernate/test/dialect/function/MySQLRoundFunctionTest.java
core/trunk/testsuite/src/test/java/org/hibernate/test/dialect/function/Product.hbm.xml
core/trunk/testsuite/src/test/java/org/hibernate/test/dialect/function/Product.java
Modified:
core/trunk/core/src/main/java/org/hibernate/dialect/MySQLDialect.java
Log:
HHH-4769 In HQL, function ROUND always returns an Integer, it truncate the decimal part of Double number.
Modified: core/trunk/core/src/main/java/org/hibernate/dialect/MySQLDialect.java
===================================================================
--- core/trunk/core/src/main/java/org/hibernate/dialect/MySQLDialect.java 2010-01-08 18:28:31 UTC (rev 18456)
+++ core/trunk/core/src/main/java/org/hibernate/dialect/MySQLDialect.java 2010-01-08 18:38:17 UTC (rev 18457)
@@ -113,7 +113,7 @@
registerFunction("ceiling", new StandardSQLFunction("ceiling", Hibernate.INTEGER) );
registerFunction("ceil", new StandardSQLFunction("ceil", Hibernate.INTEGER) );
registerFunction("floor", new StandardSQLFunction("floor", Hibernate.INTEGER) );
- registerFunction("round", new StandardSQLFunction("round", Hibernate.INTEGER) );
+ registerFunction("round", new StandardSQLFunction("round") );
registerFunction("datediff", new StandardSQLFunction("datediff", Hibernate.INTEGER) );
registerFunction("timediff", new StandardSQLFunction("timediff", Hibernate.TIME) );
Added: core/trunk/testsuite/src/test/java/org/hibernate/test/dialect/function/MySQLRoundFunctionTest.java
===================================================================
--- core/trunk/testsuite/src/test/java/org/hibernate/test/dialect/function/MySQLRoundFunctionTest.java (rev 0)
+++ core/trunk/testsuite/src/test/java/org/hibernate/test/dialect/function/MySQLRoundFunctionTest.java 2010-01-08 18:38:17 UTC (rev 18457)
@@ -0,0 +1,75 @@
+/*
+ * Hibernate, Relational Persistence for Idiomatic Java
+ *
+ * Copyright (c) 2009, 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.test.dialect.function;
+
+import java.math.BigDecimal;
+
+import org.hibernate.Query;
+import org.hibernate.Session;
+import org.hibernate.Transaction;
+import org.hibernate.dialect.Dialect;
+import org.hibernate.dialect.MySQLDialect;
+import org.hibernate.junit.functional.FunctionalTestCase;
+
+/**
+ *
+ * @author Strong Liu <stliu(a)redhat.com>
+ *
+ */
+public class MySQLRoundFunctionTest extends FunctionalTestCase {
+
+ public MySQLRoundFunctionTest( String string ) {
+ super( string );
+ }
+
+ public String[] getMappings() {
+ return new String[]{"dialect/function/Product.hbm.xml"};
+ }
+
+ public void testRoundFuntion(){
+ Product product = new Product();
+ product.setLength( 100 );
+ product.setPrice( new BigDecimal( 1.298 ) );
+ Session s=openSession();
+ Transaction tx=s.beginTransaction();
+ s.save( product );
+ tx.commit();
+ s.close();
+ s=openSession();
+ tx=s.beginTransaction();
+ Query q=s.createQuery( "select round(p.price,1) from Product p" );
+ Object o=q.uniqueResult();
+ assertEquals( BigDecimal.class , o.getClass() );
+ assertEquals( BigDecimal.valueOf( 1.3 ) , o );
+ tx.commit();
+ s.close();
+
+ }
+
+ @Override
+ public boolean appliesTo( Dialect dialect ) {
+ return dialect instanceof MySQLDialect;
+ }
+
+}
Added: core/trunk/testsuite/src/test/java/org/hibernate/test/dialect/function/Product.hbm.xml
===================================================================
--- core/trunk/testsuite/src/test/java/org/hibernate/test/dialect/function/Product.hbm.xml (rev 0)
+++ core/trunk/testsuite/src/test/java/org/hibernate/test/dialect/function/Product.hbm.xml 2010-01-08 18:38:17 UTC (rev 18457)
@@ -0,0 +1,17 @@
+<?xml version="1.0"?>
+<!DOCTYPE hibernate-mapping PUBLIC
+ "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
+ "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
+
+<hibernate-mapping package="org.hibernate.test.dialect.function">
+
+ <class name="Product" table="t_product">
+ <id name="id">
+ <generator class="native"/>
+ </id>
+ <property name="length" />
+ <property name="weight" />
+ <property name="price" />
+ </class>
+
+</hibernate-mapping>
\ No newline at end of file
Added: core/trunk/testsuite/src/test/java/org/hibernate/test/dialect/function/Product.java
===================================================================
--- core/trunk/testsuite/src/test/java/org/hibernate/test/dialect/function/Product.java (rev 0)
+++ core/trunk/testsuite/src/test/java/org/hibernate/test/dialect/function/Product.java 2010-01-08 18:38:17 UTC (rev 18457)
@@ -0,0 +1,71 @@
+/*
+ * Hibernate, Relational Persistence for Idiomatic Java
+ *
+ * Copyright (c) 2009, 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.test.dialect.function;
+
+import java.math.BigDecimal;
+
+/**
+ *
+ * @author Strong Liu <stliu(a)redhat.com>
+ *
+ */
+public class Product {
+ private Long id;
+ private int length;
+ private long weight;
+ private BigDecimal price;
+
+ public Long getId() {
+ return id;
+ }
+
+ public void setId( Long id ) {
+ this.id = id;
+ }
+
+ public int getLength() {
+ return length;
+ }
+
+ public void setLength( int length ) {
+ this.length = length;
+ }
+
+ public long getWeight() {
+ return weight;
+ }
+
+ public void setWeight( long weight ) {
+ this.weight = weight;
+ }
+
+ public BigDecimal getPrice() {
+ return price;
+ }
+
+ public void setPrice( BigDecimal price ) {
+ this.price = price;
+ }
+
+}
14 years, 11 months
Hibernate SVN: r18456 - in core/branches/Branch_3_3_2_GA_CP: testsuite/src/test/java/org/hibernate/test/dialect/function and 1 other directory.
by hibernate-commits@lists.jboss.org
Author: stliu
Date: 2010-01-08 13:28:31 -0500 (Fri, 08 Jan 2010)
New Revision: 18456
Added:
core/branches/Branch_3_3_2_GA_CP/testsuite/src/test/java/org/hibernate/test/dialect/function/MySQLRoundFunctionTest.java
core/branches/Branch_3_3_2_GA_CP/testsuite/src/test/java/org/hibernate/test/dialect/function/Product.hbm.xml
core/branches/Branch_3_3_2_GA_CP/testsuite/src/test/java/org/hibernate/test/dialect/function/Product.java
Modified:
core/branches/Branch_3_3_2_GA_CP/core/src/main/java/org/hibernate/dialect/MySQLDialect.java
Log:
JBPAPP-3371 HHH-4769 on MySQL, HQL function ROUND always returns an Integer, it truncate the decimal part of Double number.
Modified: core/branches/Branch_3_3_2_GA_CP/core/src/main/java/org/hibernate/dialect/MySQLDialect.java
===================================================================
--- core/branches/Branch_3_3_2_GA_CP/core/src/main/java/org/hibernate/dialect/MySQLDialect.java 2010-01-08 16:58:56 UTC (rev 18455)
+++ core/branches/Branch_3_3_2_GA_CP/core/src/main/java/org/hibernate/dialect/MySQLDialect.java 2010-01-08 18:28:31 UTC (rev 18456)
@@ -112,7 +112,7 @@
registerFunction("ceiling", new StandardSQLFunction("ceiling", Hibernate.INTEGER) );
registerFunction("ceil", new StandardSQLFunction("ceil", Hibernate.INTEGER) );
registerFunction("floor", new StandardSQLFunction("floor", Hibernate.INTEGER) );
- registerFunction("round", new StandardSQLFunction("round", Hibernate.INTEGER) );
+ registerFunction("round", new StandardSQLFunction("round") );
registerFunction("datediff", new StandardSQLFunction("datediff", Hibernate.INTEGER) );
registerFunction("timediff", new StandardSQLFunction("timediff", Hibernate.TIME) );
Added: core/branches/Branch_3_3_2_GA_CP/testsuite/src/test/java/org/hibernate/test/dialect/function/MySQLRoundFunctionTest.java
===================================================================
--- core/branches/Branch_3_3_2_GA_CP/testsuite/src/test/java/org/hibernate/test/dialect/function/MySQLRoundFunctionTest.java (rev 0)
+++ core/branches/Branch_3_3_2_GA_CP/testsuite/src/test/java/org/hibernate/test/dialect/function/MySQLRoundFunctionTest.java 2010-01-08 18:28:31 UTC (rev 18456)
@@ -0,0 +1,75 @@
+/*
+ * Hibernate, Relational Persistence for Idiomatic Java
+ *
+ * Copyright (c) 2009, 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.test.dialect.function;
+
+import java.math.BigDecimal;
+
+import org.hibernate.Query;
+import org.hibernate.Session;
+import org.hibernate.Transaction;
+import org.hibernate.dialect.Dialect;
+import org.hibernate.dialect.MySQLDialect;
+import org.hibernate.junit.functional.FunctionalTestCase;
+
+/**
+ *
+ * @author Strong Liu <stliu(a)redhat.com>
+ *
+ */
+public class MySQLRoundFunctionTest extends FunctionalTestCase {
+
+ public MySQLRoundFunctionTest( String string ) {
+ super( string );
+ }
+
+ public String[] getMappings() {
+ return new String[]{"dialect/function/Product.hbm.xml"};
+ }
+
+ public void testRoundFuntion(){
+ Product product = new Product();
+ product.setLength( 100 );
+ product.setPrice( new BigDecimal( 1.298 ) );
+ Session s=openSession();
+ Transaction tx=s.beginTransaction();
+ s.save( product );
+ tx.commit();
+ s.close();
+ s=openSession();
+ tx=s.beginTransaction();
+ Query q=s.createQuery( "select round(p.price,1) from Product p" );
+ Object o=q.uniqueResult();
+ assertEquals( BigDecimal.class , o.getClass() );
+ assertEquals( BigDecimal.valueOf( 1.3 ) , o );
+ tx.commit();
+ s.close();
+
+ }
+
+ @Override
+ public boolean appliesTo( Dialect dialect ) {
+ return dialect instanceof MySQLDialect;
+ }
+
+}
Added: core/branches/Branch_3_3_2_GA_CP/testsuite/src/test/java/org/hibernate/test/dialect/function/Product.hbm.xml
===================================================================
--- core/branches/Branch_3_3_2_GA_CP/testsuite/src/test/java/org/hibernate/test/dialect/function/Product.hbm.xml (rev 0)
+++ core/branches/Branch_3_3_2_GA_CP/testsuite/src/test/java/org/hibernate/test/dialect/function/Product.hbm.xml 2010-01-08 18:28:31 UTC (rev 18456)
@@ -0,0 +1,17 @@
+<?xml version="1.0"?>
+<!DOCTYPE hibernate-mapping PUBLIC
+ "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
+ "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
+
+<hibernate-mapping package="org.hibernate.test.dialect.function">
+
+ <class name="Product" table="t_product">
+ <id name="id">
+ <generator class="native"/>
+ </id>
+ <property name="length" />
+ <property name="weight" />
+ <property name="price" />
+ </class>
+
+</hibernate-mapping>
\ No newline at end of file
Added: core/branches/Branch_3_3_2_GA_CP/testsuite/src/test/java/org/hibernate/test/dialect/function/Product.java
===================================================================
--- core/branches/Branch_3_3_2_GA_CP/testsuite/src/test/java/org/hibernate/test/dialect/function/Product.java (rev 0)
+++ core/branches/Branch_3_3_2_GA_CP/testsuite/src/test/java/org/hibernate/test/dialect/function/Product.java 2010-01-08 18:28:31 UTC (rev 18456)
@@ -0,0 +1,71 @@
+/*
+ * Hibernate, Relational Persistence for Idiomatic Java
+ *
+ * Copyright (c) 2009, 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.test.dialect.function;
+
+import java.math.BigDecimal;
+
+/**
+ *
+ * @author Strong Liu <stliu(a)redhat.com>
+ *
+ */
+public class Product {
+ private Long id;
+ private int length;
+ private long weight;
+ private BigDecimal price;
+
+ public Long getId() {
+ return id;
+ }
+
+ public void setId( Long id ) {
+ this.id = id;
+ }
+
+ public int getLength() {
+ return length;
+ }
+
+ public void setLength( int length ) {
+ this.length = length;
+ }
+
+ public long getWeight() {
+ return weight;
+ }
+
+ public void setWeight( long weight ) {
+ this.weight = weight;
+ }
+
+ public BigDecimal getPrice() {
+ return price;
+ }
+
+ public void setPrice( BigDecimal price ) {
+ this.price = price;
+ }
+
+}
14 years, 11 months
Hibernate SVN: r18455 - in core/trunk/annotations/src: main/java/org/hibernate/cfg/annotations and 1 other directories.
by hibernate-commits@lists.jboss.org
Author: epbernard
Date: 2010-01-08 11:58:56 -0500 (Fri, 08 Jan 2010)
New Revision: 18455
Modified:
core/trunk/annotations/src/main/java/org/hibernate/cfg/Ejb3JoinColumn.java
core/trunk/annotations/src/main/java/org/hibernate/cfg/annotations/CollectionBinder.java
core/trunk/annotations/src/test/java/org/hibernate/test/annotations/collectionelement/Boy.java
core/trunk/annotations/src/test/java/org/hibernate/test/annotations/collectionelement/CollectionElementTest.java
Log:
HHH-4771 @ElementCollection fk column should default to entityName_columnNameOfOwningId
Modified: core/trunk/annotations/src/main/java/org/hibernate/cfg/Ejb3JoinColumn.java
===================================================================
--- core/trunk/annotations/src/main/java/org/hibernate/cfg/Ejb3JoinColumn.java 2010-01-08 16:39:52 UTC (rev 18454)
+++ core/trunk/annotations/src/main/java/org/hibernate/cfg/Ejb3JoinColumn.java 2010-01-08 16:58:56 UTC (rev 18455)
@@ -62,7 +62,12 @@
//table name on the mapped by side if any
private String mappedByTableName;
private String mappedByEntityName;
+ private boolean JPA2ElementCollection;
+ public void setJPA2ElementCollection(boolean JPA2ElementCollection) {
+ this.JPA2ElementCollection = JPA2ElementCollection;
+ }
+
//FIXME hacky solution to get the information at property ref resolution
public String getManyToManyOwnerSideEntityName() {
return manyToManyOwnerSideEntityName;
@@ -398,10 +403,12 @@
if ( mappedBySide ) {
String unquotedMappedbyTable = StringHelper.unquote( mappedByTableName );
+ final String ownerObjectName = JPA2ElementCollection && mappedByEntityName != null ?
+ StringHelper.unqualify( mappedByEntityName ) : unquotedMappedbyTable;
columnName = getMappings().getNamingStrategy().foreignKeyColumnName(
mappedByPropertyName,
mappedByEntityName,
- unquotedMappedbyTable,
+ ownerObjectName,
unquotedLogicalReferenceColumn
);
//one element was quoted so we quote
Modified: core/trunk/annotations/src/main/java/org/hibernate/cfg/annotations/CollectionBinder.java
===================================================================
--- core/trunk/annotations/src/main/java/org/hibernate/cfg/annotations/CollectionBinder.java 2010-01-08 16:39:52 UTC (rev 18454)
+++ core/trunk/annotations/src/main/java/org/hibernate/cfg/annotations/CollectionBinder.java 2010-01-08 16:58:56 UTC (rev 18455)
@@ -36,6 +36,7 @@
import javax.persistence.Embeddable;
import javax.persistence.FetchType;
import javax.persistence.JoinColumn;
+import javax.persistence.JoinColumns;
import javax.persistence.JoinTable;
import javax.persistence.ManyToMany;
import javax.persistence.MapKey;
@@ -468,6 +469,7 @@
if (isMappedBy
&& (property.isAnnotationPresent( JoinColumn.class )
+ || property.isAnnotationPresent( JoinColumns.class )
|| property.isAnnotationPresent( JoinTable.class ) ) ) {
String message = "Associations marked as mappedBy must not define database mappings like @JoinTable or @JoinColumn: ";
message += StringHelper.qualify( propertyHolder.getPath(), propertyName );
@@ -1415,6 +1417,9 @@
joinColumns, collValue.getOwner(), collectionEntity, collValue, false, mappings
);
SimpleValue key = buildCollectionKey( collValue, joinColumns, cascadeDeleteEnabled, property, mappings );
+ if ( property.isAnnotationPresent( ElementCollection.class ) && joinColumns.length > 0 ) {
+ joinColumns[0].setJPA2ElementCollection( true );
+ }
TableBinder.bindFk( collValue.getOwner(), collectionEntity, joinColumns, key, false, mappings );
}
Modified: core/trunk/annotations/src/test/java/org/hibernate/test/annotations/collectionelement/Boy.java
===================================================================
--- core/trunk/annotations/src/test/java/org/hibernate/test/annotations/collectionelement/Boy.java 2010-01-08 16:39:52 UTC (rev 18454)
+++ core/trunk/annotations/src/test/java/org/hibernate/test/annotations/collectionelement/Boy.java 2010-01-08 16:58:56 UTC (rev 18455)
@@ -18,6 +18,7 @@
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.OrderColumn;
+import javax.persistence.Table;
import org.hibernate.annotations.CollectionOfElements;
import org.hibernate.test.annotations.collectionelement.FavoriteFood;
@@ -31,6 +32,7 @@
@AttributeOverride( name="scorePerNickName.element", column = @Column(name="fld_score") ),
@AttributeOverride( name="favoriteToys.element.brand.surname", column = @Column(name = "fld_surname"))}
)
+@Table(name="tbl_Boys")
public class Boy {
private Integer id;
private String firstName;
Modified: core/trunk/annotations/src/test/java/org/hibernate/test/annotations/collectionelement/CollectionElementTest.java
===================================================================
--- core/trunk/annotations/src/test/java/org/hibernate/test/annotations/collectionelement/CollectionElementTest.java 2010-01-08 16:39:52 UTC (rev 18454)
+++ core/trunk/annotations/src/test/java/org/hibernate/test/annotations/collectionelement/CollectionElementTest.java 2010-01-08 16:58:56 UTC (rev 18455)
@@ -218,19 +218,23 @@
public void testDefaultValueColumnForBasic() throws Exception {
isDefaultValueCollectionColumnPresent( Boy.class.getName(), "hatedNames" );
isDefaultValueCollectionColumnPresent( Boy.class.getName(), "preferredNames" );
- isValueCollectionColumnPresent( Boy.class.getName(), "nickNames", "element" );
+ isCollectionColumnPresent( Boy.class.getName(), "nickNames", "element" );
isDefaultValueCollectionColumnPresent( Boy.class.getName(), "scorePerPreferredName");
}
+ public void testDefaultFKNameForElementCollection() throws Exception {
+ isCollectionColumnPresent( Boy.class.getName(), "hatedNames", "Boy_id" );
+ }
+
private void isLegacyValueCollectionColumnPresent(String collectionHolder, String propertyName) {
}
private void isDefaultValueCollectionColumnPresent(String collectionOwner, String propertyName) {
- isValueCollectionColumnPresent( collectionOwner, propertyName, propertyName );
+ isCollectionColumnPresent( collectionOwner, propertyName, propertyName );
}
- private void isValueCollectionColumnPresent(String collectionOwner, String propertyName, String columnName) {
+ private void isCollectionColumnPresent(String collectionOwner, String propertyName, String columnName) {
final Collection collection = getCfg().getCollectionMapping( collectionOwner + "." + propertyName );
final Iterator columnIterator = collection.getCollectionTable().getColumnIterator();
boolean hasDefault = false;
14 years, 11 months
Hibernate SVN: r18454 - in search/trunk/src: main/java/org/hibernate/search/bridge/builtin and 5 other directories.
by hibernate-commits@lists.jboss.org
Author: sannegrinovero
Date: 2010-01-08 11:39:52 -0500 (Fri, 08 Jan 2010)
New Revision: 18454
Modified:
search/trunk/src/main/java/org/hibernate/search/annotations/CalendarBridge.java
search/trunk/src/main/java/org/hibernate/search/bridge/builtin/DateResolutionUtil.java
search/trunk/src/main/java/org/hibernate/search/cfg/ClassBridgeMapping.java
search/trunk/src/main/java/org/hibernate/search/impl/SearchMappingBuilder.java
search/trunk/src/main/java/org/hibernate/search/query/dsl/AbstractTermQueryBuilder.java
search/trunk/src/main/java/org/hibernate/search/query/dsl/BooleanContext.java
search/trunk/src/main/java/org/hibernate/search/query/dsl/BuildableTermQueryBuilder.java
search/trunk/src/main/java/org/hibernate/search/query/dsl/NegatableBooleanContext.java
search/trunk/src/main/java/org/hibernate/search/query/dsl/SealedQueryBuilder.java
search/trunk/src/main/java/org/hibernate/search/query/dsl/TermQueryBuilderDataStore.java
search/trunk/src/main/java/org/hibernate/search/query/dsl/UnbuildableTermQueryBuilderOnField.java
search/trunk/src/main/java/org/hibernate/search/query/dsl/UnbuildableTermQueryBuilderOnSearch.java
search/trunk/src/main/java/org/hibernate/search/sandbox/standalone/FullTextManager.java
search/trunk/src/main/java/org/hibernate/search/sandbox/standalone/FullTextQuery.java
search/trunk/src/main/java/org/hibernate/search/sandbox/standalone/InstanceTransactionContext.java
search/trunk/src/main/java/org/hibernate/search/sandbox/standalone/LuceneFullTextManager.java
search/trunk/src/test/java/org/hibernate/search/test/configuration/ProgrammaticSearchMappingFactory.java
Log:
missing copyrights, svn props, formatting sources as convention
Modified: search/trunk/src/main/java/org/hibernate/search/annotations/CalendarBridge.java
===================================================================
--- search/trunk/src/main/java/org/hibernate/search/annotations/CalendarBridge.java 2010-01-08 16:07:05 UTC (rev 18453)
+++ search/trunk/src/main/java/org/hibernate/search/annotations/CalendarBridge.java 2010-01-08 16:39:52 UTC (rev 18454)
@@ -1,8 +1,35 @@
+/* $Id$
+ *
+ * Hibernate, Relational Persistence for Idiomatic Java
+ *
+ * Copyright (c) 2009, Red Hat, Inc. and/or its affiliates or third-party contributors as
+ * indicated by the @author tags or express copyright attribution
+ * statements applied by the authors. All third-party contributions are
+ * distributed under license by Red Hat, Inc.
+ *
+ * This copyrighted material is made available to anyone wishing to use, modify,
+ * copy, or redistribute it subject to the terms and conditions of the GNU
+ * Lesser General Public License, as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+ * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
+ * for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this distribution; if not, write to:
+ * Free Software Foundation, Inc.
+ * 51 Franklin Street, Fifth Floor
+ * Boston, MA 02110-1301 USA
+ */
package org.hibernate.search.annotations;
-import java.lang.annotation.*;
+import java.lang.annotation.Documented;
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
-
/**
* Defines the temporal resolution of a given field
* Calendar are stored as String in GMT
Property changes on: search/trunk/src/main/java/org/hibernate/search/annotations/CalendarBridge.java
___________________________________________________________________
Name: svn:keywords
+ Id
Modified: search/trunk/src/main/java/org/hibernate/search/bridge/builtin/DateResolutionUtil.java
===================================================================
--- search/trunk/src/main/java/org/hibernate/search/bridge/builtin/DateResolutionUtil.java 2010-01-08 16:07:05 UTC (rev 18453)
+++ search/trunk/src/main/java/org/hibernate/search/bridge/builtin/DateResolutionUtil.java 2010-01-08 16:39:52 UTC (rev 18454)
@@ -1,3 +1,27 @@
+/* $Id$
+ *
+ * Hibernate, Relational Persistence for Idiomatic Java
+ *
+ * Copyright (c) 2009, Red Hat, Inc. and/or its affiliates or third-party contributors as
+ * indicated by the @author tags or express copyright attribution
+ * statements applied by the authors. All third-party contributions are
+ * distributed under license by Red Hat, Inc.
+ *
+ * This copyrighted material is made available to anyone wishing to use, modify,
+ * copy, or redistribute it subject to the terms and conditions of the GNU
+ * Lesser General Public License, as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+ * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
+ * for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this distribution; if not, write to:
+ * Free Software Foundation, Inc.
+ * 51 Franklin Street, Fifth Floor
+ * Boston, MA 02110-1301 USA
+ */
package org.hibernate.search.bridge.builtin;
import org.apache.lucene.document.DateTools;
Property changes on: search/trunk/src/main/java/org/hibernate/search/bridge/builtin/DateResolutionUtil.java
___________________________________________________________________
Name: svn:keywords
+ Id
Modified: search/trunk/src/main/java/org/hibernate/search/cfg/ClassBridgeMapping.java
===================================================================
--- search/trunk/src/main/java/org/hibernate/search/cfg/ClassBridgeMapping.java 2010-01-08 16:07:05 UTC (rev 18453)
+++ search/trunk/src/main/java/org/hibernate/search/cfg/ClassBridgeMapping.java 2010-01-08 16:39:52 UTC (rev 18454)
@@ -1,3 +1,27 @@
+/* $Id$
+ *
+ * Hibernate, Relational Persistence for Idiomatic Java
+ *
+ * Copyright (c) 2009, Red Hat, Inc. and/or its affiliates or third-party contributors as
+ * indicated by the @author tags or express copyright attribution
+ * statements applied by the authors. All third-party contributions are
+ * distributed under license by Red Hat, Inc.
+ *
+ * This copyrighted material is made available to anyone wishing to use, modify,
+ * copy, or redistribute it subject to the terms and conditions of the GNU
+ * Lesser General Public License, as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+ * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
+ * for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this distribution; if not, write to:
+ * Free Software Foundation, Inc.
+ * 51 Franklin Street, Fifth Floor
+ * Boston, MA 02110-1301 USA
+ */
package org.hibernate.search.cfg;
import java.lang.annotation.ElementType;
Property changes on: search/trunk/src/main/java/org/hibernate/search/cfg/ClassBridgeMapping.java
___________________________________________________________________
Name: svn:keywords
+ Id
Modified: search/trunk/src/main/java/org/hibernate/search/impl/SearchMappingBuilder.java
===================================================================
--- search/trunk/src/main/java/org/hibernate/search/impl/SearchMappingBuilder.java 2010-01-08 16:07:05 UTC (rev 18453)
+++ search/trunk/src/main/java/org/hibernate/search/impl/SearchMappingBuilder.java 2010-01-08 16:39:52 UTC (rev 18454)
@@ -1,3 +1,27 @@
+/* $Id$
+ *
+ * Hibernate, Relational Persistence for Idiomatic Java
+ *
+ * Copyright (c) 2009, Red Hat, Inc. and/or its affiliates or third-party contributors as
+ * indicated by the @author tags or express copyright attribution
+ * statements applied by the authors. All third-party contributions are
+ * distributed under license by Red Hat, Inc.
+ *
+ * This copyrighted material is made available to anyone wishing to use, modify,
+ * copy, or redistribute it subject to the terms and conditions of the GNU
+ * Lesser General Public License, as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+ * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
+ * for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this distribution; if not, write to:
+ * Free Software Foundation, Inc.
+ * 51 Franklin Street, Fifth Floor
+ * Boston, MA 02110-1301 USA
+ */
package org.hibernate.search.impl;
import java.lang.reflect.Method;
@@ -24,7 +48,7 @@
/**
* This factory method takes a SearchConfiguration object
* and returns a SearchMapping object which defines
- * the programmatic model for indexing entites and fields.
+ * the programmatic model for indexing entities and fields.
*
* Throws SearchException:
* 1) No @Factory found
Property changes on: search/trunk/src/main/java/org/hibernate/search/impl/SearchMappingBuilder.java
___________________________________________________________________
Name: svn:keywords
+ Id
Modified: search/trunk/src/main/java/org/hibernate/search/query/dsl/AbstractTermQueryBuilder.java
===================================================================
--- search/trunk/src/main/java/org/hibernate/search/query/dsl/AbstractTermQueryBuilder.java 2010-01-08 16:07:05 UTC (rev 18453)
+++ search/trunk/src/main/java/org/hibernate/search/query/dsl/AbstractTermQueryBuilder.java 2010-01-08 16:39:52 UTC (rev 18454)
@@ -1,3 +1,27 @@
+/* $Id$
+ *
+ * Hibernate, Relational Persistence for Idiomatic Java
+ *
+ * Copyright (c) 2009, Red Hat, Inc. and/or its affiliates or third-party contributors as
+ * indicated by the @author tags or express copyright attribution
+ * statements applied by the authors. All third-party contributions are
+ * distributed under license by Red Hat, Inc.
+ *
+ * This copyrighted material is made available to anyone wishing to use, modify,
+ * copy, or redistribute it subject to the terms and conditions of the GNU
+ * Lesser General Public License, as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+ * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
+ * for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this distribution; if not, write to:
+ * Free Software Foundation, Inc.
+ * 51 Franklin Street, Fifth Floor
+ * Boston, MA 02110-1301 USA
+ */
package org.hibernate.search.query.dsl;
/**
@@ -6,9 +30,8 @@
*
* @author Navin Surtani
*/
-
-
public abstract class AbstractTermQueryBuilder {
protected TermQueryBuilderDataStore dataStore;
+
}
Property changes on: search/trunk/src/main/java/org/hibernate/search/query/dsl/AbstractTermQueryBuilder.java
___________________________________________________________________
Name: svn:keywords
+ Id
Modified: search/trunk/src/main/java/org/hibernate/search/query/dsl/BooleanContext.java
===================================================================
--- search/trunk/src/main/java/org/hibernate/search/query/dsl/BooleanContext.java 2010-01-08 16:07:05 UTC (rev 18453)
+++ search/trunk/src/main/java/org/hibernate/search/query/dsl/BooleanContext.java 2010-01-08 16:39:52 UTC (rev 18454)
@@ -1,3 +1,27 @@
+/* $Id$
+ *
+ * Hibernate, Relational Persistence for Idiomatic Java
+ *
+ * Copyright (c) 2009, Red Hat, Inc. and/or its affiliates or third-party contributors as
+ * indicated by the @author tags or express copyright attribution
+ * statements applied by the authors. All third-party contributions are
+ * distributed under license by Red Hat, Inc.
+ *
+ * This copyrighted material is made available to anyone wishing to use, modify,
+ * copy, or redistribute it subject to the terms and conditions of the GNU
+ * Lesser General Public License, as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+ * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
+ * for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this distribution; if not, write to:
+ * Free Software Foundation, Inc.
+ * 51 Franklin Street, Fifth Floor
+ * Boston, MA 02110-1301 USA
+ */
package org.hibernate.search.query.dsl;
import org.apache.lucene.search.BooleanClause;
@@ -15,6 +39,7 @@
//TODO do we want a QueryCreator interface with T extends Query and T createQuery() ?
public class BooleanContext {
+
private BooleanClause.Occur occur;
// List has an allocation of 5 temporarily so that it's not created with an arbitrary one.
private final List<Query> clauses = new ArrayList<Query>(5);
@@ -24,14 +49,14 @@
}
public BooleanContext add(Query clause) {
- clauses.add(clause);
+ clauses.add( clause );
return this;
}
public Query createQuery() {
BooleanQuery boolQuery = new BooleanQuery();
- for(Query clause : clauses) {
- boolQuery.add(clause, occur);
+ for (Query clause : clauses) {
+ boolQuery.add( clause, occur );
}
return boolQuery;
}
Property changes on: search/trunk/src/main/java/org/hibernate/search/query/dsl/BooleanContext.java
___________________________________________________________________
Name: svn:keywords
+ Id
Modified: search/trunk/src/main/java/org/hibernate/search/query/dsl/BuildableTermQueryBuilder.java
===================================================================
--- search/trunk/src/main/java/org/hibernate/search/query/dsl/BuildableTermQueryBuilder.java 2010-01-08 16:07:05 UTC (rev 18453)
+++ search/trunk/src/main/java/org/hibernate/search/query/dsl/BuildableTermQueryBuilder.java 2010-01-08 16:39:52 UTC (rev 18454)
@@ -1,3 +1,27 @@
+/* $Id$
+ *
+ * Hibernate, Relational Persistence for Idiomatic Java
+ *
+ * Copyright (c) 2009, Red Hat, Inc. and/or its affiliates or third-party contributors as
+ * indicated by the @author tags or express copyright attribution
+ * statements applied by the authors. All third-party contributions are
+ * distributed under license by Red Hat, Inc.
+ *
+ * This copyrighted material is made available to anyone wishing to use, modify,
+ * copy, or redistribute it subject to the terms and conditions of the GNU
+ * Lesser General Public License, as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+ * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
+ * for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this distribution; if not, write to:
+ * Free Software Foundation, Inc.
+ * 51 Franklin Street, Fifth Floor
+ * Boston, MA 02110-1301 USA
+ */
package org.hibernate.search.query.dsl;
import org.apache.lucene.index.Term;
@@ -11,9 +35,8 @@
*
* @author Navin Surtani
*/
-
-
public class BuildableTermQueryBuilder extends AbstractTermQueryBuilder {
+
public BuildableTermQueryBuilder(TermQueryBuilderDataStore dataStore) {
this.dataStore = dataStore;
}
@@ -46,4 +69,5 @@
tq = tq.combine(termQueries);
return tq;
}
+
}
Property changes on: search/trunk/src/main/java/org/hibernate/search/query/dsl/BuildableTermQueryBuilder.java
___________________________________________________________________
Name: svn:keywords
+ Id
Modified: search/trunk/src/main/java/org/hibernate/search/query/dsl/NegatableBooleanContext.java
===================================================================
--- search/trunk/src/main/java/org/hibernate/search/query/dsl/NegatableBooleanContext.java 2010-01-08 16:07:05 UTC (rev 18453)
+++ search/trunk/src/main/java/org/hibernate/search/query/dsl/NegatableBooleanContext.java 2010-01-08 16:39:52 UTC (rev 18454)
@@ -1,3 +1,27 @@
+/* $Id$
+ *
+ * Hibernate, Relational Persistence for Idiomatic Java
+ *
+ * Copyright (c) 2009, Red Hat, Inc. and/or its affiliates or third-party contributors as
+ * indicated by the @author tags or express copyright attribution
+ * statements applied by the authors. All third-party contributions are
+ * distributed under license by Red Hat, Inc.
+ *
+ * This copyrighted material is made available to anyone wishing to use, modify,
+ * copy, or redistribute it subject to the terms and conditions of the GNU
+ * Lesser General Public License, as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+ * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
+ * for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this distribution; if not, write to:
+ * Free Software Foundation, Inc.
+ * 51 Franklin Street, Fifth Floor
+ * Boston, MA 02110-1301 USA
+ */
package org.hibernate.search.query.dsl;
import org.apache.lucene.search.BooleanClause;
@@ -8,13 +32,12 @@
*
* @author Navin Surtani
*/
-
-
public class NegatableBooleanContext {
+
private final BooleanContext delegate;
public NegatableBooleanContext(BooleanClause.Occur occur) {
- this.delegate = new BooleanContext(occur);
+ this.delegate = new BooleanContext( occur );
}
public NegatableBooleanContext not() {
@@ -32,7 +55,7 @@
delegate.setOccur(BooleanClause.Occur.MUST);
}
else {
- //asseriton failure
+ //assert failure
}
return this;
}
@@ -45,4 +68,5 @@
public Query createQuery() {
return delegate.createQuery();
}
+
}
Property changes on: search/trunk/src/main/java/org/hibernate/search/query/dsl/NegatableBooleanContext.java
___________________________________________________________________
Name: svn:keywords
+ Id
Modified: search/trunk/src/main/java/org/hibernate/search/query/dsl/SealedQueryBuilder.java
===================================================================
--- search/trunk/src/main/java/org/hibernate/search/query/dsl/SealedQueryBuilder.java 2010-01-08 16:07:05 UTC (rev 18453)
+++ search/trunk/src/main/java/org/hibernate/search/query/dsl/SealedQueryBuilder.java 2010-01-08 16:39:52 UTC (rev 18454)
@@ -1,3 +1,27 @@
+/* $Id$
+ *
+ * Hibernate, Relational Persistence for Idiomatic Java
+ *
+ * Copyright (c) 2009, Red Hat, Inc. and/or its affiliates or third-party contributors as
+ * indicated by the @author tags or express copyright attribution
+ * statements applied by the authors. All third-party contributions are
+ * distributed under license by Red Hat, Inc.
+ *
+ * This copyrighted material is made available to anyone wishing to use, modify,
+ * copy, or redistribute it subject to the terms and conditions of the GNU
+ * Lesser General Public License, as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+ * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
+ * for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this distribution; if not, write to:
+ * Free Software Foundation, Inc.
+ * 51 Franklin Street, Fifth Floor
+ * Boston, MA 02110-1301 USA
+ */
package org.hibernate.search.query.dsl;
import org.apache.lucene.search.BooleanClause;
@@ -9,8 +33,6 @@
*
* @author Navin Surtani
*/
-
-
public class SealedQueryBuilder {
public SealedQueryBuilder(){
@@ -28,4 +50,5 @@
public UnbuildableTermQueryBuilderOnField term(){
return new UnbuildableTermQueryBuilderOnField();
}
+
}
Property changes on: search/trunk/src/main/java/org/hibernate/search/query/dsl/SealedQueryBuilder.java
___________________________________________________________________
Name: svn:keywords
+ Id
Modified: search/trunk/src/main/java/org/hibernate/search/query/dsl/TermQueryBuilderDataStore.java
===================================================================
--- search/trunk/src/main/java/org/hibernate/search/query/dsl/TermQueryBuilderDataStore.java 2010-01-08 16:07:05 UTC (rev 18453)
+++ search/trunk/src/main/java/org/hibernate/search/query/dsl/TermQueryBuilderDataStore.java 2010-01-08 16:39:52 UTC (rev 18454)
@@ -1,3 +1,27 @@
+/* $Id$
+ *
+ * Hibernate, Relational Persistence for Idiomatic Java
+ *
+ * Copyright (c) 2009, Red Hat, Inc. and/or its affiliates or third-party contributors as
+ * indicated by the @author tags or express copyright attribution
+ * statements applied by the authors. All third-party contributions are
+ * distributed under license by Red Hat, Inc.
+ *
+ * This copyrighted material is made available to anyone wishing to use, modify,
+ * copy, or redistribute it subject to the terms and conditions of the GNU
+ * Lesser General Public License, as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+ * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
+ * for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this distribution; if not, write to:
+ * Free Software Foundation, Inc.
+ * 51 Franklin Street, Fifth Floor
+ * Boston, MA 02110-1301 USA
+ */
package org.hibernate.search.query.dsl;
import org.apache.lucene.index.Term;
@@ -10,8 +34,6 @@
*
* @author Navin Surtani
*/
-
-
public class TermQueryBuilderDataStore {
private List<Term> terms;
Property changes on: search/trunk/src/main/java/org/hibernate/search/query/dsl/TermQueryBuilderDataStore.java
___________________________________________________________________
Name: svn:keywords
+ Id
Modified: search/trunk/src/main/java/org/hibernate/search/query/dsl/UnbuildableTermQueryBuilderOnField.java
===================================================================
--- search/trunk/src/main/java/org/hibernate/search/query/dsl/UnbuildableTermQueryBuilderOnField.java 2010-01-08 16:07:05 UTC (rev 18453)
+++ search/trunk/src/main/java/org/hibernate/search/query/dsl/UnbuildableTermQueryBuilderOnField.java 2010-01-08 16:39:52 UTC (rev 18454)
@@ -1,3 +1,27 @@
+/* $Id$
+ *
+ * Hibernate, Relational Persistence for Idiomatic Java
+ *
+ * Copyright (c) 2009, Red Hat, Inc. and/or its affiliates or third-party contributors as
+ * indicated by the @author tags or express copyright attribution
+ * statements applied by the authors. All third-party contributions are
+ * distributed under license by Red Hat, Inc.
+ *
+ * This copyrighted material is made available to anyone wishing to use, modify,
+ * copy, or redistribute it subject to the terms and conditions of the GNU
+ * Lesser General Public License, as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+ * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
+ * for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this distribution; if not, write to:
+ * Free Software Foundation, Inc.
+ * 51 Franklin Street, Fifth Floor
+ * Boston, MA 02110-1301 USA
+ */
package org.hibernate.search.query.dsl;
/**
@@ -6,8 +30,6 @@
*
* @author Navin Surtani
*/
-
-
public class UnbuildableTermQueryBuilderOnField extends AbstractTermQueryBuilder {
public UnbuildableTermQueryBuilderOnField(){
@@ -17,4 +39,5 @@
public UnbuildableTermQueryBuilderOnSearch on(String field){
return new UnbuildableTermQueryBuilderOnSearch(dataStore, field);
}
+
}
Property changes on: search/trunk/src/main/java/org/hibernate/search/query/dsl/UnbuildableTermQueryBuilderOnField.java
___________________________________________________________________
Name: svn:keywords
+ Id
Modified: search/trunk/src/main/java/org/hibernate/search/query/dsl/UnbuildableTermQueryBuilderOnSearch.java
===================================================================
--- search/trunk/src/main/java/org/hibernate/search/query/dsl/UnbuildableTermQueryBuilderOnSearch.java 2010-01-08 16:07:05 UTC (rev 18453)
+++ search/trunk/src/main/java/org/hibernate/search/query/dsl/UnbuildableTermQueryBuilderOnSearch.java 2010-01-08 16:39:52 UTC (rev 18454)
@@ -1,3 +1,27 @@
+/* $Id$
+ *
+ * Hibernate, Relational Persistence for Idiomatic Java
+ *
+ * Copyright (c) 2009, Red Hat, Inc. and/or its affiliates or third-party contributors as
+ * indicated by the @author tags or express copyright attribution
+ * statements applied by the authors. All third-party contributions are
+ * distributed under license by Red Hat, Inc.
+ *
+ * This copyrighted material is made available to anyone wishing to use, modify,
+ * copy, or redistribute it subject to the terms and conditions of the GNU
+ * Lesser General Public License, as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+ * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
+ * for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this distribution; if not, write to:
+ * Free Software Foundation, Inc.
+ * 51 Franklin Street, Fifth Floor
+ * Boston, MA 02110-1301 USA
+ */
package org.hibernate.search.query.dsl;
import org.apache.lucene.index.Term;
@@ -9,8 +33,6 @@
*
* @author Navin Surtani
*/
-
-
public class UnbuildableTermQueryBuilderOnSearch extends AbstractTermQueryBuilder {
private String field;
@@ -28,5 +50,4 @@
return new BuildableTermQueryBuilder(dataStore);
}
-
}
Property changes on: search/trunk/src/main/java/org/hibernate/search/query/dsl/UnbuildableTermQueryBuilderOnSearch.java
___________________________________________________________________
Name: svn:keywords
+ Id
Modified: search/trunk/src/main/java/org/hibernate/search/sandbox/standalone/FullTextManager.java
===================================================================
--- search/trunk/src/main/java/org/hibernate/search/sandbox/standalone/FullTextManager.java 2010-01-08 16:07:05 UTC (rev 18453)
+++ search/trunk/src/main/java/org/hibernate/search/sandbox/standalone/FullTextManager.java 2010-01-08 16:39:52 UTC (rev 18454)
@@ -1,3 +1,27 @@
+/* $Id$
+ *
+ * Hibernate, Relational Persistence for Idiomatic Java
+ *
+ * Copyright (c) 2009, Red Hat, Inc. and/or its affiliates or third-party contributors as
+ * indicated by the @author tags or express copyright attribution
+ * statements applied by the authors. All third-party contributions are
+ * distributed under license by Red Hat, Inc.
+ *
+ * This copyrighted material is made available to anyone wishing to use, modify,
+ * copy, or redistribute it subject to the terms and conditions of the GNU
+ * Lesser General Public License, as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+ * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
+ * for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this distribution; if not, write to:
+ * Free Software Foundation, Inc.
+ * 51 Franklin Street, Fifth Floor
+ * Boston, MA 02110-1301 USA
+ */
package org.hibernate.search.sandbox.standalone;
import org.hibernate.search.*;
@@ -22,7 +46,7 @@
* @param entities List of classes for type filtering. The query result will only return entities of
* the specified types and their respective subtype. If no class is specified no type filtering will take place.
*
- * @return A <code>FullTextQuery</code> wrapping around the native Lucene wuery.
+ * @return A <code>FullTextQuery</code> wrapping around the native Lucene query.
*
* @throws IllegalArgumentException if entityType is <code>null</code> or not a class or superclass annotated with <code>@Indexed</code>.
*/
Modified: search/trunk/src/main/java/org/hibernate/search/sandbox/standalone/FullTextQuery.java
===================================================================
--- search/trunk/src/main/java/org/hibernate/search/sandbox/standalone/FullTextQuery.java 2010-01-08 16:07:05 UTC (rev 18453)
+++ search/trunk/src/main/java/org/hibernate/search/sandbox/standalone/FullTextQuery.java 2010-01-08 16:39:52 UTC (rev 18454)
@@ -1,3 +1,27 @@
+/* $Id$
+ *
+ * Hibernate, Relational Persistence for Idiomatic Java
+ *
+ * Copyright (c) 2009, Red Hat, Inc. and/or its affiliates or third-party contributors as
+ * indicated by the @author tags or express copyright attribution
+ * statements applied by the authors. All third-party contributions are
+ * distributed under license by Red Hat, Inc.
+ *
+ * This copyrighted material is made available to anyone wishing to use, modify,
+ * copy, or redistribute it subject to the terms and conditions of the GNU
+ * Lesser General Public License, as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+ * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
+ * for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this distribution; if not, write to:
+ * Free Software Foundation, Inc.
+ * 51 Franklin Street, Fifth Floor
+ * Boston, MA 02110-1301 USA
+ */
package org.hibernate.search.sandbox.standalone;
import java.util.List;
Modified: search/trunk/src/main/java/org/hibernate/search/sandbox/standalone/InstanceTransactionContext.java
===================================================================
--- search/trunk/src/main/java/org/hibernate/search/sandbox/standalone/InstanceTransactionContext.java 2010-01-08 16:07:05 UTC (rev 18453)
+++ search/trunk/src/main/java/org/hibernate/search/sandbox/standalone/InstanceTransactionContext.java 2010-01-08 16:39:52 UTC (rev 18454)
@@ -1,3 +1,27 @@
+/* $Id$
+ *
+ * Hibernate, Relational Persistence for Idiomatic Java
+ *
+ * Copyright (c) 2009, Red Hat, Inc. and/or its affiliates or third-party contributors as
+ * indicated by the @author tags or express copyright attribution
+ * statements applied by the authors. All third-party contributions are
+ * distributed under license by Red Hat, Inc.
+ *
+ * This copyrighted material is made available to anyone wishing to use, modify,
+ * copy, or redistribute it subject to the terms and conditions of the GNU
+ * Lesser General Public License, as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+ * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
+ * for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this distribution; if not, write to:
+ * Free Software Foundation, Inc.
+ * 51 Franklin Street, Fifth Floor
+ * Boston, MA 02110-1301 USA
+ */
package org.hibernate.search.sandbox.standalone;
import org.hibernate.search.backend.TransactionContext;
Modified: search/trunk/src/main/java/org/hibernate/search/sandbox/standalone/LuceneFullTextManager.java
===================================================================
--- search/trunk/src/main/java/org/hibernate/search/sandbox/standalone/LuceneFullTextManager.java 2010-01-08 16:07:05 UTC (rev 18453)
+++ search/trunk/src/main/java/org/hibernate/search/sandbox/standalone/LuceneFullTextManager.java 2010-01-08 16:39:52 UTC (rev 18454)
@@ -1,13 +1,32 @@
+/* $Id$
+ *
+ * Hibernate, Relational Persistence for Idiomatic Java
+ *
+ * Copyright (c) 2009, Red Hat, Inc. and/or its affiliates or third-party contributors as
+ * indicated by the @author tags or express copyright attribution
+ * statements applied by the authors. All third-party contributions are
+ * distributed under license by Red Hat, Inc.
+ *
+ * This copyrighted material is made available to anyone wishing to use, modify,
+ * copy, or redistribute it subject to the terms and conditions of the GNU
+ * Lesser General Public License, as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+ * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
+ * for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this distribution; if not, write to:
+ * Free Software Foundation, Inc.
+ * 51 Franklin Street, Fifth Floor
+ * Boston, MA 02110-1301 USA
+ */
package org.hibernate.search.sandbox.standalone;
import org.apache.lucene.search.Query;
-import org.apache.lucene.search.BooleanQuery;
-import org.apache.lucene.search.BooleanClause;
import org.apache.lucene.search.TermQuery;
-import org.apache.lucene.index.Term;
-import org.hibernate.search.MassIndexer;
import org.hibernate.search.SearchFactory;
-import org.hibernate.search.ProjectionConstants;
import org.hibernate.search.SearchException;
import org.hibernate.search.backend.Work;
import org.hibernate.search.backend.WorkType;
Modified: search/trunk/src/test/java/org/hibernate/search/test/configuration/ProgrammaticSearchMappingFactory.java
===================================================================
--- search/trunk/src/test/java/org/hibernate/search/test/configuration/ProgrammaticSearchMappingFactory.java 2010-01-08 16:07:05 UTC (rev 18453)
+++ search/trunk/src/test/java/org/hibernate/search/test/configuration/ProgrammaticSearchMappingFactory.java 2010-01-08 16:39:52 UTC (rev 18454)
@@ -1,3 +1,27 @@
+/* $Id$
+ *
+ * Hibernate, Relational Persistence for Idiomatic Java
+ *
+ * Copyright (c) 2009, Red Hat, Inc. and/or its affiliates or third-party contributors as
+ * indicated by the @author tags or express copyright attribution
+ * statements applied by the authors. All third-party contributions are
+ * distributed under license by Red Hat, Inc.
+ *
+ * This copyrighted material is made available to anyone wishing to use, modify,
+ * copy, or redistribute it subject to the terms and conditions of the GNU
+ * Lesser General Public License, as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+ * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
+ * for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this distribution; if not, write to:
+ * Free Software Foundation, Inc.
+ * 51 Franklin Street, Fifth Floor
+ * Boston, MA 02110-1301 USA
+ */
package org.hibernate.search.test.configuration;
import java.lang.annotation.ElementType;
Property changes on: search/trunk/src/test/java/org/hibernate/search/test/configuration/ProgrammaticSearchMappingFactory.java
___________________________________________________________________
Name: svn:keywords
+ Id
14 years, 11 months