Hibernate SVN: r12764 - trunk/HibernateExt/search/src/java/org/hibernate/search/util.
by hibernate-commits@lists.jboss.org
Author: epbernard
Date: 2007-07-13 14:44:05 -0400 (Fri, 13 Jul 2007)
New Revision: 12764
Modified:
trunk/HibernateExt/search/src/java/org/hibernate/search/util/ContextHelper.java
Log:
HSEARCH-94 Deprecate contextHelper
Modified: trunk/HibernateExt/search/src/java/org/hibernate/search/util/ContextHelper.java
===================================================================
--- trunk/HibernateExt/search/src/java/org/hibernate/search/util/ContextHelper.java 2007-07-13 04:14:38 UTC (rev 12763)
+++ trunk/HibernateExt/search/src/java/org/hibernate/search/util/ContextHelper.java 2007-07-13 18:44:05 UTC (rev 12764)
@@ -10,6 +10,7 @@
/**
* @author Emmanuel Bernard
+ * @deprecated Use fullTextSession.getSearchFactory() instead
*/
public abstract class ContextHelper {
17 years, 6 months
Hibernate SVN: r12763 - in core/trunk/documentation/manual: es-ES/src/main/docbook/modules and 5 other directories.
by hibernate-commits@lists.jboss.org
Author: d.plentz
Date: 2007-07-13 00:14:38 -0400 (Fri, 13 Jul 2007)
New Revision: 12763
Modified:
core/trunk/documentation/manual/en-US/src/main/docbook/modules/query_sql.xml
core/trunk/documentation/manual/es-ES/src/main/docbook/modules/query_sql.xml
core/trunk/documentation/manual/fr-FR/src/main/docbook/modules/query_sql.xml
core/trunk/documentation/manual/ja-JP/src/main/docbook/modules/query_sql.xml
core/trunk/documentation/manual/ko-KR/src/main/docbook/modules/query_sql.xml
core/trunk/documentation/manual/pt-BR/src/main/docbook/modules/query_sql.xml
core/trunk/documentation/manual/zh-CN/src/main/docbook/modules/query_sql.xml
Log:
[HHH-2719] adddress --> address
Modified: core/trunk/documentation/manual/en-US/src/main/docbook/modules/query_sql.xml
===================================================================
--- core/trunk/documentation/manual/en-US/src/main/docbook/modules/query_sql.xml 2007-07-12 23:17:46 UTC (rev 12762)
+++ core/trunk/documentation/manual/en-US/src/main/docbook/modules/query_sql.xml 2007-07-13 04:14:38 UTC (rev 12763)
@@ -425,12 +425,12 @@
SELECT person.NAME AS {person.name},
person.AGE AS {person.age},
person.SEX AS {person.sex},
- adddress.STREET AS {address.street},
- adddress.CITY AS {address.city},
- adddress.STATE AS {address.state},
- adddress.ZIP AS {address.zip}
+ address.STREET AS {address.street},
+ address.CITY AS {address.city},
+ address.STATE AS {address.state},
+ address.ZIP AS {address.zip}
FROM PERSON person
- JOIN ADDRESS adddress
+ JOIN ADDRESS address
ON person.ID = address.PERSON_ID AND address.TYPE='MAILING'
WHERE person.NAME LIKE :namePattern
</sql-query>]]></programlisting>
@@ -461,12 +461,12 @@
SELECT person.NAME AS {person.name},
person.AGE AS {person.age},
person.SEX AS {person.sex},
- adddress.STREET AS {address.street},
- adddress.CITY AS {address.city},
- adddress.STATE AS {address.state},
- adddress.ZIP AS {address.zip}
+ address.STREET AS {address.street},
+ address.CITY AS {address.city},
+ address.STATE AS {address.state},
+ address.ZIP AS {address.zip}
FROM PERSON person
- JOIN ADDRESS adddress
+ JOIN ADDRESS address
ON person.ID = address.PERSON_ID AND address.TYPE='MAILING'
WHERE person.NAME LIKE :namePattern
</sql-query>]]></programlisting>
Modified: core/trunk/documentation/manual/es-ES/src/main/docbook/modules/query_sql.xml
===================================================================
--- core/trunk/documentation/manual/es-ES/src/main/docbook/modules/query_sql.xml 2007-07-12 23:17:46 UTC (rev 12762)
+++ core/trunk/documentation/manual/es-ES/src/main/docbook/modules/query_sql.xml 2007-07-13 04:14:38 UTC (rev 12763)
@@ -139,12 +139,12 @@
SELECT person.NAME AS {person.name},
person.AGE AS {person.age},
person.SEX AS {person.sex},
- adddress.STREET AS {address.street},
- adddress.CITY AS {address.city},
- adddress.STATE AS {address.state},
- adddress.ZIP AS {address.zip}
+ address.STREET AS {address.street},
+ address.CITY AS {address.city},
+ address.STATE AS {address.state},
+ address.ZIP AS {address.zip}
FROM PERSON person
- JOIN ADDRESS adddress
+ JOIN ADDRESS address
ON person.ID = address.PERSON_ID AND address.TYPE='MAILING'
WHERE person.NAME LIKE :namePattern
</sql-query>]]></programlisting>
Modified: core/trunk/documentation/manual/fr-FR/src/main/docbook/modules/query_sql.xml
===================================================================
--- core/trunk/documentation/manual/fr-FR/src/main/docbook/modules/query_sql.xml 2007-07-12 23:17:46 UTC (rev 12762)
+++ core/trunk/documentation/manual/fr-FR/src/main/docbook/modules/query_sql.xml 2007-07-13 04:14:38 UTC (rev 12763)
@@ -276,12 +276,12 @@
SELECT person.NAME AS {person.name},
person.AGE AS {person.age},
person.SEX AS {person.sex},
- adddress.STREET AS {address.street},
- adddress.CITY AS {address.city},
- adddress.STATE AS {address.state},
- adddress.ZIP AS {address.zip}
+ address.STREET AS {address.street},
+ address.CITY AS {address.city},
+ address.STATE AS {address.state},
+ address.ZIP AS {address.zip}
FROM PERSON person
- JOIN ADDRESS adddress
+ JOIN ADDRESS address
ON person.ID = address.PERSON_ID AND address.TYPE='MAILING'
WHERE person.NAME LIKE :namePattern
</sql-query></programlisting>
@@ -315,12 +315,12 @@
SELECT person.NAME AS {person.name},
person.AGE AS {person.age},
person.SEX AS {person.sex},
- adddress.STREET AS {address.street},
- adddress.CITY AS {address.city},
- adddress.STATE AS {address.state},
- adddress.ZIP AS {address.zip}
+ address.STREET AS {address.street},
+ address.CITY AS {address.city},
+ address.STATE AS {address.state},
+ address.ZIP AS {address.zip}
FROM PERSON person
- JOIN ADDRESS adddress
+ JOIN ADDRESS address
ON person.ID = address.PERSON_ID AND address.TYPE='MAILING'
WHERE person.NAME LIKE :namePattern
</sql-query></programlisting>
Modified: core/trunk/documentation/manual/ja-JP/src/main/docbook/modules/query_sql.xml
===================================================================
--- core/trunk/documentation/manual/ja-JP/src/main/docbook/modules/query_sql.xml 2007-07-12 23:17:46 UTC (rev 12762)
+++ core/trunk/documentation/manual/ja-JP/src/main/docbook/modules/query_sql.xml 2007-07-13 04:14:38 UTC (rev 12763)
@@ -391,12 +391,12 @@
SELECT person.NAME AS {person.name},
person.AGE AS {person.age},
person.SEX AS {person.sex},
- adddress.STREET AS {address.street},
- adddress.CITY AS {address.city},
- adddress.STATE AS {address.state},
- adddress.ZIP AS {address.zip}
+ address.STREET AS {address.street},
+ address.CITY AS {address.city},
+ address.STATE AS {address.state},
+ address.ZIP AS {address.zip}
FROM PERSON person
- JOIN ADDRESS adddress
+ JOIN ADDRESS address
ON person.ID = address.PERSON_ID AND address.TYPE='MAILING'
WHERE person.NAME LIKE :namePattern
</sql-query>]]></programlisting>
@@ -429,12 +429,12 @@
SELECT person.NAME AS {person.name},
person.AGE AS {person.age},
person.SEX AS {person.sex},
- adddress.STREET AS {address.street},
- adddress.CITY AS {address.city},
- adddress.STATE AS {address.state},
- adddress.ZIP AS {address.zip}
+ address.STREET AS {address.street},
+ address.CITY AS {address.city},
+ address.STATE AS {address.state},
+ address.ZIP AS {address.zip}
FROM PERSON person
- JOIN ADDRESS adddress
+ JOIN ADDRESS address
ON person.ID = address.PERSON_ID AND address.TYPE='MAILING'
WHERE person.NAME LIKE :namePattern
</sql-query>]]></programlisting>
Modified: core/trunk/documentation/manual/ko-KR/src/main/docbook/modules/query_sql.xml
===================================================================
--- core/trunk/documentation/manual/ko-KR/src/main/docbook/modules/query_sql.xml 2007-07-12 23:17:46 UTC (rev 12762)
+++ core/trunk/documentation/manual/ko-KR/src/main/docbook/modules/query_sql.xml 2007-07-13 04:14:38 UTC (rev 12763)
@@ -394,12 +394,12 @@
SELECT person.NAME AS {person.name},
person.AGE AS {person.age},
person.SEX AS {person.sex},
- adddress.STREET AS {address.street},
- adddress.CITY AS {address.city},
- adddress.STATE AS {address.state},
- adddress.ZIP AS {address.zip}
+ address.STREET AS {address.street},
+ address.CITY AS {address.city},
+ address.STATE AS {address.state},
+ address.ZIP AS {address.zip}
FROM PERSON person
- JOIN ADDRESS adddress
+ JOIN ADDRESS address
ON person.ID = address.PERSON_ID AND address.TYPE='MAILING'
WHERE person.NAME LIKE :namePattern
</sql-query>]]></programlisting>
@@ -428,12 +428,12 @@
SELECT person.NAME AS {person.name},
person.AGE AS {person.age},
person.SEX AS {person.sex},
- adddress.STREET AS {address.street},
- adddress.CITY AS {address.city},
- adddress.STATE AS {address.state},
- adddress.ZIP AS {address.zip}
+ address.STREET AS {address.street},
+ address.CITY AS {address.city},
+ address.STATE AS {address.state},
+ address.ZIP AS {address.zip}
FROM PERSON person
- JOIN ADDRESS adddress
+ JOIN ADDRESS address
ON person.ID = address.PERSON_ID AND address.TYPE='MAILING'
WHERE person.NAME LIKE :namePattern
</sql-query>]]></programlisting>
Modified: core/trunk/documentation/manual/pt-BR/src/main/docbook/modules/query_sql.xml
===================================================================
--- core/trunk/documentation/manual/pt-BR/src/main/docbook/modules/query_sql.xml 2007-07-12 23:17:46 UTC (rev 12762)
+++ core/trunk/documentation/manual/pt-BR/src/main/docbook/modules/query_sql.xml 2007-07-13 04:14:38 UTC (rev 12763)
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="ISO-8859-1"?>
+<?xml version="1.0" encoding="ISO-8859-1"?>
<chapter id="querysql" revision="2">
<title>Native SQL</title>
@@ -425,12 +425,12 @@
SELECT person.NAME AS {person.name},
person.AGE AS {person.age},
person.SEX AS {person.sex},
- adddress.STREET AS {address.street},
- adddress.CITY AS {address.city},
- adddress.STATE AS {address.state},
- adddress.ZIP AS {address.zip}
+ address.STREET AS {address.street},
+ address.CITY AS {address.city},
+ address.STATE AS {address.state},
+ address.ZIP AS {address.zip}
FROM PERSON person
- JOIN ADDRESS adddress
+ JOIN ADDRESS address
ON person.ID = address.PERSON_ID AND address.TYPE='MAILING'
WHERE person.NAME LIKE :namePattern
</sql-query>]]></programlisting>
@@ -461,12 +461,12 @@
SELECT person.NAME AS {person.name},
person.AGE AS {person.age},
person.SEX AS {person.sex},
- adddress.STREET AS {address.street},
- adddress.CITY AS {address.city},
- adddress.STATE AS {address.state},
- adddress.ZIP AS {address.zip}
+ address.STREET AS {address.street},
+ address.CITY AS {address.city},
+ address.STATE AS {address.state},
+ address.ZIP AS {address.zip}
FROM PERSON person
- JOIN ADDRESS adddress
+ JOIN ADDRESS address
ON person.ID = address.PERSON_ID AND address.TYPE='MAILING'
WHERE person.NAME LIKE :namePattern
</sql-query>]]></programlisting>
@@ -601,10 +601,10 @@
<itemizedlist spacing="compact">
<listitem>
<para>
- A funçãp deve retornar um result set. O primeiro parâmetro da procedure
- dever ser uma <literal>SAÍDA</literal> que retorne um result set. Isto é feito
- usando o tipo a <literal>SYS_REFCURSOR</literal> no Oracle 9 ou 10. No Oracle é
- necessário definir o tipo <literal>REF CURSOR</literal>, veja a documentação do Oracle.
+ A fun��p deve retornar um result set. O primeiro par�metro da procedure
+ dever ser uma <literal>SA�DA</literal> que retorne um result set. Isto � feito
+ usando o tipo a <literal>SYS_REFCURSOR</literal> no Oracle 9 ou 10. No Oracle �
+ necess�rio definir o tipo <literal>REF CURSOR</literal>, veja a documenta��o do Oracle.
</para>
</listitem>
</itemizedlist>
@@ -615,16 +615,16 @@
<listitem>
<para>
A procedure deve retornar um result set. Veja que este servidor pode retornar
- múltiplos result sets e update counts. O Hibernate ira iterar os resultados e
- pegar o primeiro resultado que é o valor de retorno do result set.
- O resto será descartado.
+ m�ltiplos result sets e update counts. O Hibernate ira iterar os resultados e
+ pegar o primeiro resultado que � o valor de retorno do result set.
+ O resto ser� descartado.
</para>
</listitem>
<listitem>
<para>
- Se você habilitar <literal>SET NOCOUNT ON</literal> na sua procedure, ela
- provavelmente será mais eficiente. Mas, isto não é obrigatório</para>
+ Se voc� habilitar <literal>SET NOCOUNT ON</literal> na sua procedure, ela
+ provavelmente ser� mais eficiente. Mas, isto n�o � obrigat�rio</para>
</listitem>
</itemizedlist>
</sect3>
@@ -642,9 +642,9 @@
<literal><sql-delete></literal>, and
<literal><sql-update></literal> override these strings:
- Hibernate3 pode usar SQL customizado para operações de create, update e delete.
- A persistência de classe e collection no hibernate já contem alguma strings
- de configurações (insertsql, deletesql, updatesql etc.).
+ Hibernate3 pode usar SQL customizado para opera��es de create, update e delete.
+ A persist�ncia de classe e collection no hibernate j� contem alguma strings
+ de configura��es (insertsql, deletesql, updatesql etc.).
O mapaemento das tags
<literal><sql-insert></literal>,
<literal><sql-delete></literal>, e
@@ -663,13 +663,13 @@
</class>]]></programlisting>
<para>
- O SQL é executado diretamente no seu banco de dados, então você pode usar qualquer
+ O SQL � executado diretamente no seu banco de dados, ent�o voc� pode usar qualquer
linguagem que quiser. Isto com certeza reduzira a portabilidade do seu mapeamento se
- você utilizar um SQL para um banco de dados especifico.
+ voc� utilizar um SQL para um banco de dados especifico.
</para>
<para>
- Stored Procedures são suportadas se o atributo the
+ Stored Procedures s�o suportadas se o atributo the
<literal>callable</literal> estiver ativado:
</para>
@@ -684,22 +684,22 @@
</class>]]></programlisting>
<para>
- A ordem de posições dos parâmetros são vitais, pois eles devem estar na mesma seqüência
+ A ordem de posi��es dos par�metros s�o vitais, pois eles devem estar na mesma seq��ncia
esperada pelo Hibernate.
</para>
- <para>Você pode ver a ordem esperada ativando o debug logging no nível
- <literal>org.hibernate.persister.entity</literal>. Com este nível ativado, o Hibernate
- irá imprimir o SQL estático que foi usado para create, update, delete, etc.
- Entidades. (Para ver a seqüência esperada, lembre-se de não incluir seu SQL
- customizado no arquivo de mapeamento, pois ele irá sobreecreve o SQL
- estático gerado pelo Hibernate).
+ <para>Voc� pode ver a ordem esperada ativando o debug logging no n�vel
+ <literal>org.hibernate.persister.entity</literal>. Com este n�vel ativado, o Hibernate
+ ir� imprimir o SQL est�tico que foi usado para create, update, delete, etc.
+ Entidades. (Para ver a seq��ncia esperada, lembre-se de n�o incluir seu SQL
+ customizado no arquivo de mapeamento, pois ele ir� sobreecreve o SQL
+ est�tico gerado pelo Hibernate).
</para>
- <para>As stored procedures são na maioria dos casos (leia: melhor não fazer) requeridas para
+ <para>As stored procedures s�o na maioria dos casos (leia: melhor n�o fazer) requeridas para
retornar o numero de linhas inseridas/atualizadas/deletadas. O hibernate tem algumas
- verificações em tempo de execução para o sucesso da declaração. Hibernate sempre registra
- o primeiro parâmetro da declaração como uma saída numérica para operações CRUD.
+ verifica��es em tempo de execu��o para o sucesso da declara��o. Hibernate sempre registra
+ o primeiro par�metro da declara��o como uma sa�da num�rica para opera��es CRUD.
</para>
<programlisting><![CDATA[CREATE OR REPLACE FUNCTION updatePerson (uid IN NUMBER, uname IN VARCHAR2)
@@ -723,7 +723,7 @@
<title>SQL customizado para carga</title>
<para>
- Você pode declarar sua própria query SQL (ou HQL) para iniciar entidades:
+ Voc� pode declarar sua pr�pria query SQL (ou HQL) para iniciar entidades:
</para>
<programlisting><![CDATA[<sql-query name="person">
@@ -735,8 +735,8 @@
</sql-query>]]></programlisting>
<para>
- Este é apenas uma declaração de query com nome, como discutido anteriormente.
- Você pode referenciar esta query com nome em um mapeamento de classe:
+ Este � apenas uma declara��o de query com nome, como discutido anteriormente.
+ Voc� pode referenciar esta query com nome em um mapeamento de classe:
</para>
<programlisting><![CDATA[<class name="Person">
@@ -747,10 +747,10 @@
<loader query-ref="person"/>
</class>]]></programlisting>
- <para>Isto também funciona com stored procedures.
+ <para>Isto tamb�m funciona com stored procedures.
</para>
- <para>Você pode tembém definir uma query para iniciar collection:
+ <para>Voc� pode temb�m definir uma query para iniciar collection:
</para>
<programlisting><![CDATA[<set name="employments" inverse="true">
Modified: core/trunk/documentation/manual/zh-CN/src/main/docbook/modules/query_sql.xml
===================================================================
--- core/trunk/documentation/manual/zh-CN/src/main/docbook/modules/query_sql.xml 2007-07-12 23:17:46 UTC (rev 12762)
+++ core/trunk/documentation/manual/zh-CN/src/main/docbook/modules/query_sql.xml 2007-07-13 04:14:38 UTC (rev 12763)
@@ -377,12 +377,12 @@
SELECT person.NAME AS {person.name},
person.AGE AS {person.age},
person.SEX AS {person.sex},
- adddress.STREET AS {address.street},
- adddress.CITY AS {address.city},
- adddress.STATE AS {address.state},
- adddress.ZIP AS {address.zip}
+ address.STREET AS {address.street},
+ address.CITY AS {address.city},
+ address.STATE AS {address.state},
+ address.ZIP AS {address.zip}
FROM PERSON person
- JOIN ADDRESS adddress
+ JOIN ADDRESS address
ON person.ID = address.PERSON_ID AND address.TYPE='MAILING'
WHERE person.NAME LIKE :namePattern
</sql-query>]]></programlisting>
@@ -417,12 +417,12 @@
SELECT person.NAME AS {person.name},
person.AGE AS {person.age},
person.SEX AS {person.sex},
- adddress.STREET AS {address.street},
- adddress.CITY AS {address.city},
- adddress.STATE AS {address.state},
- adddress.ZIP AS {address.zip}
+ address.STREET AS {address.street},
+ address.CITY AS {address.city},
+ address.STATE AS {address.state},
+ address.ZIP AS {address.zip}
FROM PERSON person
- JOIN ADDRESS adddress
+ JOIN ADDRESS address
ON person.ID = address.PERSON_ID AND address.TYPE='MAILING'
WHERE person.NAME LIKE :namePattern
</sql-query>]]></programlisting>
17 years, 6 months
Hibernate SVN: r12762 - in trunk/HibernateExt/annotations/src: test/org/hibernate/test/annotations/cid and 1 other directory.
by hibernate-commits@lists.jboss.org
Author: epbernard
Date: 2007-07-12 19:17:46 -0400 (Thu, 12 Jul 2007)
New Revision: 12762
Added:
trunk/HibernateExt/annotations/src/test/org/hibernate/test/annotations/cid/A.java
trunk/HibernateExt/annotations/src/test/org/hibernate/test/annotations/cid/AId.java
trunk/HibernateExt/annotations/src/test/org/hibernate/test/annotations/cid/B.java
trunk/HibernateExt/annotations/src/test/org/hibernate/test/annotations/cid/C.java
Modified:
trunk/HibernateExt/annotations/src/java/org/hibernate/cfg/AnnotationBinder.java
trunk/HibernateExt/annotations/src/test/org/hibernate/test/annotations/cid/CompositeIdTest.java
Log:
ANN-619 @OneToOne in PK is never a trueOneToOne
Modified: trunk/HibernateExt/annotations/src/java/org/hibernate/cfg/AnnotationBinder.java
===================================================================
--- trunk/HibernateExt/annotations/src/java/org/hibernate/cfg/AnnotationBinder.java 2007-07-12 22:53:23 UTC (rev 12761)
+++ trunk/HibernateExt/annotations/src/java/org/hibernate/cfg/AnnotationBinder.java 2007-07-12 23:17:46 UTC (rev 12762)
@@ -121,6 +121,7 @@
import org.hibernate.mapping.Subclass;
import org.hibernate.mapping.ToOne;
import org.hibernate.mapping.UnionSubclass;
+import org.hibernate.mapping.KeyValue;
import org.hibernate.persister.entity.JoinedSubclassEntityPersister;
import org.hibernate.persister.entity.SingleTableEntityPersister;
import org.hibernate.persister.entity.UnionSubclassEntityPersister;
@@ -1977,18 +1978,26 @@
boolean mapToPK = true;
if ( !trueOneToOne ) {
//try to find a hidden true one to one (FK == PK columns)
- Iterator idColumns = propertyHolder.getIdentifier().getColumnIterator();
- List<String> idColumnNames = new ArrayList<String>();
- org.hibernate.mapping.Column currentColumn;
- while ( idColumns.hasNext() ) {
- currentColumn = (org.hibernate.mapping.Column) idColumns.next();
- idColumnNames.add( currentColumn.getName() );
+ KeyValue identifier = propertyHolder.getIdentifier();
+ if (identifier == null) {
+ //this is a @OneToOne in a @EmbeddedId (the persistentClass.identifier is not set yet, it's being built)
+ //by definition the PK cannot refers to itself so it cannot map to itself
+ mapToPK = false;
}
- for ( Ejb3JoinColumn col : joinColumns ) {
- if ( !idColumnNames.contains( col.getMappingColumn().getName() ) ) {
- mapToPK = false;
- break;
+ else {
+ Iterator idColumns = identifier.getColumnIterator();
+ List<String> idColumnNames = new ArrayList<String>();
+ org.hibernate.mapping.Column currentColumn;
+ while ( idColumns.hasNext() ) {
+ currentColumn = (org.hibernate.mapping.Column) idColumns.next();
+ idColumnNames.add( currentColumn.getName() );
}
+ for ( Ejb3JoinColumn col : joinColumns ) {
+ if ( !idColumnNames.contains( col.getMappingColumn().getName() ) ) {
+ mapToPK = false;
+ break;
+ }
+ }
}
}
if ( trueOneToOne || mapToPK || !BinderHelper.isDefault( mappedBy ) ) {
Added: trunk/HibernateExt/annotations/src/test/org/hibernate/test/annotations/cid/A.java
===================================================================
--- trunk/HibernateExt/annotations/src/test/org/hibernate/test/annotations/cid/A.java (rev 0)
+++ trunk/HibernateExt/annotations/src/test/org/hibernate/test/annotations/cid/A.java 2007-07-12 23:17:46 UTC (rev 12762)
@@ -0,0 +1,27 @@
+//$Id$
+package org.hibernate.test.annotations.cid;
+
+import java.io.Serializable;
+
+import javax.persistence.EmbeddedId;
+import javax.persistence.Entity;
+
+
+/**
+ * @author Artur Legan
+ *
+ */
+@Entity
+public class A implements Serializable{
+
+ @EmbeddedId
+ private AId aId;
+
+ public AId getAId() {
+ return aId;
+ }
+
+ public void setAId(AId aId) {
+ this.aId = aId;
+ }
+}
Added: trunk/HibernateExt/annotations/src/test/org/hibernate/test/annotations/cid/AId.java
===================================================================
--- trunk/HibernateExt/annotations/src/test/org/hibernate/test/annotations/cid/AId.java (rev 0)
+++ trunk/HibernateExt/annotations/src/test/org/hibernate/test/annotations/cid/AId.java 2007-07-12 23:17:46 UTC (rev 12762)
@@ -0,0 +1,40 @@
+//$Id$
+package org.hibernate.test.annotations.cid;
+
+import java.io.Serializable;
+import javax.persistence.Embeddable;
+import javax.persistence.JoinColumn;
+import javax.persistence.OneToOne;
+
+
+/**
+ * @author Artur Legan
+ */
+@Embeddable
+public class AId implements Serializable {
+
+ @OneToOne
+ @JoinColumn( name = "bid" )
+ private B b;
+
+ @OneToOne
+ @JoinColumn( name = "cid" )
+ private C c;
+
+
+ public B getB() {
+ return b;
+ }
+
+ public void setB(B b) {
+ this.b = b;
+ }
+
+ public C getC() {
+ return c;
+ }
+
+ public void setC(C c) {
+ this.c = c;
+ }
+}
Added: trunk/HibernateExt/annotations/src/test/org/hibernate/test/annotations/cid/B.java
===================================================================
--- trunk/HibernateExt/annotations/src/test/org/hibernate/test/annotations/cid/B.java (rev 0)
+++ trunk/HibernateExt/annotations/src/test/org/hibernate/test/annotations/cid/B.java 2007-07-12 23:17:46 UTC (rev 12762)
@@ -0,0 +1,27 @@
+//$Id$
+package org.hibernate.test.annotations.cid;
+
+import javax.persistence.Entity;
+import javax.persistence.GeneratedValue;
+import javax.persistence.Id;
+
+
+/**
+ * @author Artur Legan
+ */
+@Entity
+public class B {
+
+ @Id
+ @GeneratedValue
+ private Long id;
+
+
+ public Long getId() {
+ return id;
+ }
+
+ public void setId(Long id) {
+ this.id = id;
+ }
+}
\ No newline at end of file
Added: trunk/HibernateExt/annotations/src/test/org/hibernate/test/annotations/cid/C.java
===================================================================
--- trunk/HibernateExt/annotations/src/test/org/hibernate/test/annotations/cid/C.java (rev 0)
+++ trunk/HibernateExt/annotations/src/test/org/hibernate/test/annotations/cid/C.java 2007-07-12 23:17:46 UTC (rev 12762)
@@ -0,0 +1,27 @@
+//$Id$
+package org.hibernate.test.annotations.cid;
+
+import javax.persistence.Entity;
+import javax.persistence.GeneratedValue;
+import javax.persistence.Id;
+
+
+/**
+ * @author Artur Legan
+ */
+@Entity
+public class C {
+
+ @Id
+ @GeneratedValue
+ private Long id;
+
+
+ public Long getId() {
+ return id;
+ }
+
+ public void setId(Long id) {
+ this.id = id;
+ }
+}
Modified: trunk/HibernateExt/annotations/src/test/org/hibernate/test/annotations/cid/CompositeIdTest.java
===================================================================
--- trunk/HibernateExt/annotations/src/test/org/hibernate/test/annotations/cid/CompositeIdTest.java 2007-07-12 22:53:23 UTC (rev 12761)
+++ trunk/HibernateExt/annotations/src/test/org/hibernate/test/annotations/cid/CompositeIdTest.java 2007-07-12 23:17:46 UTC (rev 12762)
@@ -19,6 +19,31 @@
super( x );
}
+ public void testOneToOneInCompositePk() throws Exception {
+ Session s;
+ Transaction tx;
+ s = openSession();
+ tx = s.beginTransaction();
+ B b = new B();
+ C c = new C();
+ s.persist( b );
+ s.persist( c );
+ A a = new A();
+ a.setAId( new AId() );
+ a.getAId().setB( b );
+ a.getAId().setC( c );
+ s.persist( a );
+ s.flush();
+ s.clear();
+
+ a = (A) s.get(A.class, a.getAId() );
+ assertEquals( b.getId(), a.getAId().getB().getId() );
+
+ tx.rollback();
+ s.close();
+ }
+
+
/**
* This feature is not supported by the EJB3
* this is an hibernate extension
@@ -246,7 +271,10 @@
Product.class,
OrderLine.class,
OrderLinePk.class,
- LittleGenius.class
+ LittleGenius.class,
+ A.class,
+ B.class,
+ C.class
};
}
}
17 years, 6 months
Hibernate SVN: r12761 - trunk/HibernateExt/annotations/src/test/org/hibernate/test/annotations/access.
by hibernate-commits@lists.jboss.org
Author: epbernard
Date: 2007-07-12 18:53:23 -0400 (Thu, 12 Jul 2007)
New Revision: 12761
Added:
trunk/HibernateExt/annotations/src/test/org/hibernate/test/annotations/access/Gardenshed.java
Modified:
trunk/HibernateExt/annotations/src/test/org/hibernate/test/annotations/access/AccessTest.java
Log:
ANN-618 more access test
Modified: trunk/HibernateExt/annotations/src/test/org/hibernate/test/annotations/access/AccessTest.java
===================================================================
--- trunk/HibernateExt/annotations/src/test/org/hibernate/test/annotations/access/AccessTest.java 2007-07-12 20:21:25 UTC (rev 12760)
+++ trunk/HibernateExt/annotations/src/test/org/hibernate/test/annotations/access/AccessTest.java 2007-07-12 22:53:23 UTC (rev 12761)
@@ -98,12 +98,31 @@
}
+ public void testFieldsOverriding() throws Exception {
+ Gardenshed gs = new Gardenshed();
+ gs.floors = 4;
+ Session s = openSession();
+ s.persist( gs );
+ Transaction tx = s.beginTransaction();
+ tx.commit();
+ s.clear();
+ tx = s.beginTransaction();
+ gs = (Gardenshed) s.get( Gardenshed.class, gs.getId() );
+ assertEquals( 4, gs.floors );
+ assertEquals( 6, gs.getFloors() );
+ s.delete( gs );
+ tx.commit();
+ s.close();
+
+ }
+
protected Class[] getMappings() {
return new Class[]{
Bed.class,
Chair.class,
Furniture.class,
- BigBed.class
+ BigBed.class,
+ Gardenshed.class
};
}
}
Added: trunk/HibernateExt/annotations/src/test/org/hibernate/test/annotations/access/Gardenshed.java
===================================================================
--- trunk/HibernateExt/annotations/src/test/org/hibernate/test/annotations/access/Gardenshed.java (rev 0)
+++ trunk/HibernateExt/annotations/src/test/org/hibernate/test/annotations/access/Gardenshed.java 2007-07-12 22:53:23 UTC (rev 12761)
@@ -0,0 +1,55 @@
+//$Id: Furniture.java 9795 2006-04-26 06:41:18Z epbernard $
+package org.hibernate.test.annotations.access;
+
+import javax.persistence.Entity;
+import javax.persistence.GeneratedValue;
+import javax.persistence.Id;
+import javax.persistence.Transient;
+
+import org.hibernate.annotations.AccessType;
+
+/**
+ * This is the opposite of the Furniture test, as this tries to override the class AccessType("property") with
+ * the property AccessType("field").
+ *
+ * @author Dennis Fleurbaaij
+ * @since 2007-05-31
+ */
+@Entity
+@AccessType( "property" )
+public class Gardenshed
+ extends
+ Woody {
+ private Integer id;
+ private String brand;
+ public long floors;
+
+ @Transient
+ public String getBrand() {
+ return brand;
+ }
+
+ public void setBrand(String brand) {
+ this.brand = brand;
+ }
+
+ @Id
+ @GeneratedValue
+ public Integer getId() {
+ return id;
+ }
+
+ public void setId(Integer id) {
+ this.id = id;
+ }
+
+ // These 2 functions should not return in Hibernate, but the value should come from the field "floors"
+ @AccessType( "field" )
+ public long getFloors() {
+ return this.floors + 2;
+ }
+
+ public void setFloors(long floors) {
+ this.floors = floors + 2;
+ }
+}
\ No newline at end of file
17 years, 6 months
Hibernate SVN: r12760 - in trunk/HibernateExt/annotations/src: test/org/hibernate/test/annotations/onetomany and 1 other directory.
by hibernate-commits@lists.jboss.org
Author: epbernard
Date: 2007-07-12 16:21:25 -0400 (Thu, 12 Jul 2007)
New Revision: 12760
Added:
trunk/HibernateExt/annotations/src/test/org/hibernate/test/annotations/onetomany/Order.java
trunk/HibernateExt/annotations/src/test/org/hibernate/test/annotations/onetomany/OrderByTest.java
trunk/HibernateExt/annotations/src/test/org/hibernate/test/annotations/onetomany/OrderID.java
trunk/HibernateExt/annotations/src/test/org/hibernate/test/annotations/onetomany/OrderItem.java
trunk/HibernateExt/annotations/src/test/org/hibernate/test/annotations/onetomany/OrderItemID.java
Modified:
trunk/HibernateExt/annotations/src/java/org/hibernate/cfg/annotations/CollectionBinder.java
Log:
ANN-617 @OrderBy was not handled properly on properties from @IdClass or @EmbeddedId
Modified: trunk/HibernateExt/annotations/src/java/org/hibernate/cfg/annotations/CollectionBinder.java
===================================================================
--- trunk/HibernateExt/annotations/src/java/org/hibernate/cfg/annotations/CollectionBinder.java 2007-07-12 16:04:21 UTC (rev 12759)
+++ trunk/HibernateExt/annotations/src/java/org/hibernate/cfg/annotations/CollectionBinder.java 2007-07-12 20:21:25 UTC (rev 12760)
@@ -847,7 +847,13 @@
}
PersistentClass pc = p.getPersistentClass();
String table;
- if (pc != associatedClass) {
+ if (pc == null) {
+ //we are touching a @IdClass property, the pc is not set
+ //this means pc == associatedClass
+ //TODO check whether @ManyToOne @JoinTable in @IdClass used for @OrderBy works: doh!
+ table = "";
+ }
+ else if (pc != associatedClass) {
table = pc.getTable().getQuotedName() + ".";
}
else {
Added: trunk/HibernateExt/annotations/src/test/org/hibernate/test/annotations/onetomany/Order.java
===================================================================
--- trunk/HibernateExt/annotations/src/test/org/hibernate/test/annotations/onetomany/Order.java (rev 0)
+++ trunk/HibernateExt/annotations/src/test/org/hibernate/test/annotations/onetomany/Order.java 2007-07-12 20:21:25 UTC (rev 12760)
@@ -0,0 +1,70 @@
+//$Id$
+package org.hibernate.test.annotations.onetomany;
+
+import java.util.LinkedHashSet;
+import java.util.Set;
+import java.util.List;
+import java.util.ArrayList;
+import javax.persistence.Entity;
+import javax.persistence.Id;
+import javax.persistence.IdClass;
+import javax.persistence.OneToMany;
+import javax.persistence.OrderBy;
+import javax.persistence.Table;
+
+@Entity
+@Table( name = "Order_tbl" )
+@IdClass( OrderID.class )
+public class Order {
+ private String schoolId;
+ private Integer schoolIdSort;
+ private Integer academicYear;
+
+ private List<OrderItem> itemList = new ArrayList<OrderItem>();
+
+ public boolean equals(Object obj) {
+ return super.equals( obj );
+ }
+
+ public int hashCode() {
+ return 10;
+ }
+
+ @Id
+ public Integer getAcademicYear() {
+ return this.academicYear;
+ }
+
+ protected void setAcademicYear(Integer academicYear) {
+ this.academicYear = academicYear;
+ }
+
+ @Id
+ public String getSchoolId() {
+ return this.schoolId;
+ }
+
+ protected void setSchoolId(String schoolId) {
+ this.schoolId = schoolId;
+ }
+
+ @OneToMany( mappedBy = "order" )
+ @OrderBy( "dayNo desc" )
+ public List<OrderItem> getItemList() {
+ return this.itemList;
+ }
+
+ public void setItemList(List<OrderItem> itemList) {
+ this.itemList = itemList;
+ }
+
+ public Integer getSchoolIdSort() {
+ return this.schoolIdSort;
+ }
+
+ public void setSchoolIdSort(Integer schoolIdSort) {
+ this.schoolIdSort = schoolIdSort;
+ }
+
+
+}
\ No newline at end of file
Added: trunk/HibernateExt/annotations/src/test/org/hibernate/test/annotations/onetomany/OrderByTest.java
===================================================================
--- trunk/HibernateExt/annotations/src/test/org/hibernate/test/annotations/onetomany/OrderByTest.java (rev 0)
+++ trunk/HibernateExt/annotations/src/test/org/hibernate/test/annotations/onetomany/OrderByTest.java 2007-07-12 20:21:25 UTC (rev 12760)
@@ -0,0 +1,52 @@
+//$Id$
+package org.hibernate.test.annotations.onetomany;
+
+import org.hibernate.test.annotations.TestCase;
+import org.hibernate.Session;
+
+/**
+ * @author Emmanuel Bernard
+ */
+public class OrderByTest extends TestCase {
+ public void testOrderByOnIdClassProperties() throws Exception {
+ Session s = openSession( );
+ s.getTransaction().begin();
+ Order o = new Order();
+ o.setAcademicYear( 2000 );
+ o.setSchoolId( "Supelec" );
+ o.setSchoolIdSort( 1 );
+ s.persist( o );
+ OrderItem oi1 = new OrderItem();
+ oi1.setAcademicYear( 2000 );
+ oi1.setDayName( "Monday" );
+ oi1.setSchoolId( "Supelec" );
+ oi1.setOrder( o );
+ oi1.setDayNo( 23 );
+ s.persist( oi1 );
+ OrderItem oi2 = new OrderItem();
+ oi2.setAcademicYear( 2000 );
+ oi2.setDayName( "Tuesday" );
+ oi2.setSchoolId( "Supelec" );
+ oi2.setOrder( o );
+ oi2.setDayNo( 30 );
+ s.persist( oi2 );
+ s.flush();
+ s.clear();
+
+ OrderID oid = new OrderID();
+ oid.setAcademicYear( 2000 );
+ oid.setSchoolId( "Supelec" );
+ o = (Order) s.get( Order.class, oid );
+ assertEquals( 30, o.getItemList().get( 0 ).getDayNo().intValue() );
+
+ s.getTransaction().rollback();
+ s.close();
+ }
+
+ protected Class[] getMappings() {
+ return new Class[] {
+ Order.class,
+ OrderItem.class
+ };
+ }
+}
Added: trunk/HibernateExt/annotations/src/test/org/hibernate/test/annotations/onetomany/OrderID.java
===================================================================
--- trunk/HibernateExt/annotations/src/test/org/hibernate/test/annotations/onetomany/OrderID.java (rev 0)
+++ trunk/HibernateExt/annotations/src/test/org/hibernate/test/annotations/onetomany/OrderID.java 2007-07-12 20:21:25 UTC (rev 12760)
@@ -0,0 +1,31 @@
+//$Id$
+package org.hibernate.test.annotations.onetomany;
+
+import java.io.Serializable;
+import javax.persistence.Column;
+
+/**
+ * @author Emmanuel Bernard
+ */
+public class OrderID implements Serializable {
+ private String schoolId;
+ private Integer academicYear;
+
+ @Column( name = "Academic_Yr" )
+ public Integer getAcademicYear() {
+ return this.academicYear;
+ }
+
+ public void setAcademicYear(Integer academicYear) {
+ this.academicYear = academicYear;
+ }
+
+ @Column( name = "School_Id" )
+ public String getSchoolId() {
+ return this.schoolId;
+ }
+
+ public void setSchoolId(String schoolId) {
+ this.schoolId = schoolId;
+ }
+}
\ No newline at end of file
Added: trunk/HibernateExt/annotations/src/test/org/hibernate/test/annotations/onetomany/OrderItem.java
===================================================================
--- trunk/HibernateExt/annotations/src/test/org/hibernate/test/annotations/onetomany/OrderItem.java (rev 0)
+++ trunk/HibernateExt/annotations/src/test/org/hibernate/test/annotations/onetomany/OrderItem.java 2007-07-12 20:21:25 UTC (rev 12760)
@@ -0,0 +1,73 @@
+//$Id$
+package org.hibernate.test.annotations.onetomany;
+
+import javax.persistence.Column;
+import javax.persistence.Entity;
+import javax.persistence.FetchType;
+import javax.persistence.Id;
+import javax.persistence.IdClass;
+import javax.persistence.JoinColumn;
+import javax.persistence.JoinColumns;
+import javax.persistence.ManyToOne;
+import javax.persistence.Table;
+
+@Entity
+@Table( name = "OrderItem_tbl" )
+@IdClass( OrderItemID.class )
+public class OrderItem {
+ String schoolId;
+ Integer academicYear;
+ Integer dayNo;
+ String dayName;
+ private Order order;
+
+ @Id
+ public Integer getDayNo() {
+ return dayNo;
+ }
+
+ public void setDayNo(Integer dayNo) {
+ this.dayNo = dayNo;
+ }
+
+ @Id
+ public String getSchoolId() {
+ return schoolId;
+ }
+
+ public void setSchoolId(String schoolId) {
+ this.schoolId = schoolId;
+ }
+
+ @Id
+ public Integer getAcademicYear() {
+ return academicYear;
+ }
+
+ public void setAcademicYear(Integer academicYear) {
+ this.academicYear = academicYear;
+ }
+
+ @Column( name = "Day_Name" )
+ public String getDayName() {
+ return dayName;
+ }
+
+ public void setDayName(String dayName) {
+ this.dayName = dayName;
+ }
+
+ @ManyToOne( fetch = FetchType.LAZY )
+ @JoinColumns( {
+ @JoinColumn( name = "School_Id", referencedColumnName = "School_Id", insertable = false, updatable = false ),
+ @JoinColumn( name = "Academic_Yr", referencedColumnName = "Academic_Yr", insertable = false, updatable = false )
+ } )
+ public Order getOrder() {
+ return this.order;
+ }
+
+ public void setOrder(Order order) {
+ this.order = order;
+ }
+
+}
Added: trunk/HibernateExt/annotations/src/test/org/hibernate/test/annotations/onetomany/OrderItemID.java
===================================================================
--- trunk/HibernateExt/annotations/src/test/org/hibernate/test/annotations/onetomany/OrderItemID.java (rev 0)
+++ trunk/HibernateExt/annotations/src/test/org/hibernate/test/annotations/onetomany/OrderItemID.java 2007-07-12 20:21:25 UTC (rev 12760)
@@ -0,0 +1,41 @@
+//$Id$
+package org.hibernate.test.annotations.onetomany;
+
+import java.io.Serializable;
+import javax.persistence.Column;
+
+/**
+ * @author Emmanuel Bernard
+ */
+public class OrderItemID implements Serializable {
+ String schoolId;
+ Integer academicYear;
+ Integer dayNo;
+
+ @Column( name = "Academic_Yr" )
+ public Integer getAcademicYear() {
+ return this.academicYear;
+ }
+
+ public void setAcademicYear(Integer academicYear) {
+ this.academicYear = academicYear;
+ }
+
+ @Column( name = "Day_No" )
+ public Integer getDayNo() {
+ return this.dayNo;
+ }
+
+ public void setDayNo(Integer dayNo) {
+ this.dayNo = dayNo;
+ }
+
+ @Column( name = "School_Id" )
+ public String getSchoolId() {
+ return this.schoolId;
+ }
+
+ public void setSchoolId(String schoolId) {
+ this.schoolId = schoolId;
+ }
+}
17 years, 6 months
Hibernate SVN: r12759 - in trunk/HibernateExt/annotations/src: test/org/hibernate/test/annotations and 1 other directories.
by hibernate-commits@lists.jboss.org
Author: epbernard
Date: 2007-07-12 12:04:21 -0400 (Thu, 12 Jul 2007)
New Revision: 12759
Added:
trunk/HibernateExt/annotations/src/test/org/hibernate/test/annotations/configuration/
trunk/HibernateExt/annotations/src/test/org/hibernate/test/annotations/configuration/ConfigurationTest.java
trunk/HibernateExt/annotations/src/test/org/hibernate/test/annotations/configuration/orm.xml
trunk/HibernateExt/annotations/src/test/org/hibernate/test/annotations/configuration/package-info.java
Modified:
trunk/HibernateExt/annotations/src/java/org/hibernate/cfg/annotations/reflection/EJB3OverridenAnnotationReader.java
Log:
ANN-608 Fix NPE in Ejb3OverriddenAnnotationReader initialization
Modified: trunk/HibernateExt/annotations/src/java/org/hibernate/cfg/annotations/reflection/EJB3OverridenAnnotationReader.java
===================================================================
--- trunk/HibernateExt/annotations/src/java/org/hibernate/cfg/annotations/reflection/EJB3OverridenAnnotationReader.java 2007-07-12 05:37:04 UTC (rev 12758)
+++ trunk/HibernateExt/annotations/src/java/org/hibernate/cfg/annotations/reflection/EJB3OverridenAnnotationReader.java 2007-07-12 16:04:21 UTC (rev 12759)
@@ -356,7 +356,8 @@
}
else {
this.annotations = getJavaAnnotations();
- for (Annotation ann : this.annotations) {
+ annotationsMap = new HashMap<Class, Annotation>( annotations.length + 5 );
+ for (Annotation ann : this.annotations) {
annotationsMap.put( ann.annotationType(), ann );
}
}
Added: trunk/HibernateExt/annotations/src/test/org/hibernate/test/annotations/configuration/ConfigurationTest.java
===================================================================
--- trunk/HibernateExt/annotations/src/test/org/hibernate/test/annotations/configuration/ConfigurationTest.java (rev 0)
+++ trunk/HibernateExt/annotations/src/test/org/hibernate/test/annotations/configuration/ConfigurationTest.java 2007-07-12 16:04:21 UTC (rev 12759)
@@ -0,0 +1,21 @@
+//$Id$
+package org.hibernate.test.annotations.configuration;
+
+import junit.framework.TestCase;
+import org.hibernate.cfg.AnnotationConfiguration;
+
+/**
+ * @author Emmanuel Bernard
+ */
+public class ConfigurationTest extends TestCase {
+ public void testMixPackageAndResourceOrdering() throws Exception {
+ try {
+ AnnotationConfiguration config = new AnnotationConfiguration();
+ config.addResource( "org/hibernate/test/annotations/configuration/orm.xml" );
+ config.addPackage( "org.hibernate.test.annotations.configuration" );
+ }
+ catch( Exception e ) {
+ fail("Processing package first when ORM.xml is used should not fail");
+ }
+ }
+}
Added: trunk/HibernateExt/annotations/src/test/org/hibernate/test/annotations/configuration/orm.xml
===================================================================
--- trunk/HibernateExt/annotations/src/test/org/hibernate/test/annotations/configuration/orm.xml (rev 0)
+++ trunk/HibernateExt/annotations/src/test/org/hibernate/test/annotations/configuration/orm.xml 2007-07-12 16:04:21 UTC (rev 12759)
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<entity-mappings
+ xmlns="http://java.sun.com/xml/ns/persistence/orm"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/persistence/orm orm_1_0.xsd"
+ version="1.0">
+</entity-mappings>
Added: trunk/HibernateExt/annotations/src/test/org/hibernate/test/annotations/configuration/package-info.java
===================================================================
--- trunk/HibernateExt/annotations/src/test/org/hibernate/test/annotations/configuration/package-info.java (rev 0)
+++ trunk/HibernateExt/annotations/src/test/org/hibernate/test/annotations/configuration/package-info.java 2007-07-12 16:04:21 UTC (rev 12759)
@@ -0,0 +1,4 @@
+@GenericGenerator(name = "myGenerator", strategy = "sequence")
+package org.hibernate.test.annotations.configuration;
+
+import org.hibernate.annotations.GenericGenerator;
17 years, 6 months
Hibernate SVN: r12758 - in shards/trunk/src: test/org/hibernate/shards/integration/model and 1 other directory.
by hibernate-commits@lists.jboss.org
Author: max.ross
Date: 2007-07-12 01:37:04 -0400 (Thu, 12 Jul 2007)
New Revision: 12758
Modified:
shards/trunk/src/java/org/hibernate/shards/session/ShardedSessionImpl.java
shards/trunk/src/test/org/hibernate/shards/integration/model/ModelQueryPermutedIntegrationTest.java
Log:
HSHARDS-30
Implement ShardedSessionImpl.createFilter()
Modified: shards/trunk/src/java/org/hibernate/shards/session/ShardedSessionImpl.java
===================================================================
--- shards/trunk/src/java/org/hibernate/shards/session/ShardedSessionImpl.java 2007-07-12 04:26:31 UTC (rev 12757)
+++ shards/trunk/src/java/org/hibernate/shards/session/ShardedSessionImpl.java 2007-07-12 05:37:04 UTC (rev 12758)
@@ -37,6 +37,7 @@
import org.hibernate.UnresolvableObjectException;
import org.hibernate.classic.Session;
import org.hibernate.engine.SessionFactoryImplementor;
+import org.hibernate.engine.SessionImplementor;
import org.hibernate.id.IdentifierGenerator;
import org.hibernate.metadata.ClassMetadata;
import org.hibernate.proxy.HibernateProxy;
@@ -1150,11 +1151,29 @@
}
/**
- * Unsupported. This is a scope decision, not a technical decision.
+ * The {@link org.hibernate.impl.SessionImpl#createFilter(Object, String)} implementation
+ * requires that the collection that is passed in is a persistent collection.
+ * Since we don't support cross-shard relationships, if we receive a persistent
+ * collection that collection is guaranteed to be associated with a single
+ * shard. If we can figure out which shard the collection is associated with
+ * we can just delegate this operation to that shard.
*/
public Query createFilter(Object collection, String queryString)
throws HibernateException {
- throw new UnsupportedOperationException();
+ Shard shard = getShardForCollection(collection, shards);
+ Session session;
+ if(shard == null) {
+ // collection not associated with any of our shards, so just delegate to
+ // a random shard. We'll end up failing, but we'll fail with the
+ // error that users typically get.
+ session = getSomeSession();
+ if (session == null) {
+ session = shards.get(0).establishSession();
+ }
+ } else {
+ session = shard.establishSession();
+ }
+ return session.createFilter(collection, queryString);
}
public Query getNamedQuery(String queryName) throws HibernateException {
@@ -1511,6 +1530,18 @@
return getShardIdForObject(obj, shards);
}
+ private Shard getShardForCollection(Object coll, List<Shard> shardsToConsider) {
+ for(Shard shard : shardsToConsider) {
+ if(shard.getSession() != null) {
+ SessionImplementor si = ((SessionImplementor)shard.getSession());
+ if(si.getPersistenceContext().getCollectionEntryOrNull(coll) != null) {
+ return shard;
+ }
+ }
+ }
+ return null;
+ }
+
List<ShardId> selectShardIdsFromShardResolutionStrategyData(ShardResolutionStrategyData srsd) {
IdentifierGenerator idGenerator = shardedSessionFactory.getIdentifierGenerator(srsd.getEntityName());
if ((idGenerator instanceof ShardEncodingIdentifierGenerator) &&
Modified: shards/trunk/src/test/org/hibernate/shards/integration/model/ModelQueryPermutedIntegrationTest.java
===================================================================
--- shards/trunk/src/test/org/hibernate/shards/integration/model/ModelQueryPermutedIntegrationTest.java 2007-07-12 04:26:31 UTC (rev 12757)
+++ shards/trunk/src/test/org/hibernate/shards/integration/model/ModelQueryPermutedIntegrationTest.java 2007-07-12 05:37:04 UTC (rev 12758)
@@ -19,11 +19,14 @@
package org.hibernate.shards.integration.model;
import org.hibernate.Query;
+import org.hibernate.QueryException;
import org.hibernate.shards.integration.BaseShardingIntegrationTestCase;
import org.hibernate.shards.model.Building;
import org.hibernate.shards.model.Floor;
import org.hibernate.shards.model.Office;
+import org.hibernate.shards.util.Lists;
+import java.util.Collection;
import java.util.List;
/**
@@ -85,48 +88,53 @@
super.tearDown();
}
- public void testLoadAllBuildings() throws Exception {
+ public void testLoadAllBuildings() {
String queryString = "from Building";
Query query = session.createQuery(queryString);
+ @SuppressWarnings("unchecked")
List<Building> buildings = query.list();
assertEquals(2, buildings.size());
assertTrue(buildings.contains(b1));
assertTrue(buildings.contains(b2));
}
- public void testLoadBuildingByName() throws Exception {
+ public void testLoadBuildingByName() {
String queryString = "from Building as b where b.name=:name";
Query query = session.createQuery(queryString).setString("name", "b2");
Building b2Reloaded = (Building) query.uniqueResult();
assertEquals(b2.getBuildingId(), b2Reloaded.getBuildingId());
}
- public void testLoadBuildingsByLikeName() throws Exception {
+ public void testLoadBuildingsByLikeName() {
String queryString = "from Building as b where b.name like :name";
Query query = session.createQuery(queryString).setString("name", "b%");
+ @SuppressWarnings("unchecked")
List<Building> buildings = query.list();
assertEquals(2, buildings.size());
assertTrue(buildings.contains(b1));
assertTrue(buildings.contains(b2));
}
- public void testLoadHighFloors() throws Exception {
+ public void testLoadHighFloors() {
String queryString = "from Floor as f where f.number >= 3";
Query query = session.createQuery(queryString);
+ @SuppressWarnings("unchecked")
List<Floor> floors = query.list();
assertEquals(1, floors.size());
}
- public void testLoadBuildingsWithHighFloors() throws Exception {
+ public void testLoadBuildingsWithHighFloors() {
String queryString = "from Floor as f where f.number >= 3";
Query query = session.createQuery(queryString);
+ @SuppressWarnings("unchecked")
List<Floor> floors = query.list();
assertEquals(1, floors.size());
}
- public void testLoadBuildingsWithHighFloorsAndLargeOffices() throws Exception {
+ public void testLoadBuildingsWithHighFloorsAndLargeOffices() {
String queryString = "from Building b join b.floors floor join floor.offices office where office.label = 'LAHGE'";
Query query = session.createQuery(queryString);
+ @SuppressWarnings("unchecked")
List<Building> buildings = query.list();
assertEquals(2, buildings.size());
}
@@ -134,6 +142,7 @@
public void testNamedQuery() {
Query query = session.getNamedQuery("SelectFloorsHigherThan");
query.setInteger("lowestFloor", 3);
+ @SuppressWarnings("unchecked")
List<Floor> floors = query.list();
assertEquals(1, floors.size());
}
@@ -141,6 +150,7 @@
public void testSetMaxResults() {
String queryString = "from Floor";
Query query = session.createQuery(queryString).setMaxResults(1);
+ @SuppressWarnings("unchecked")
List<Floor> floors = query.list();
assertEquals(1, floors.size());
}
@@ -148,16 +158,47 @@
public void testSetFirstResultQuery() {
String queryString = "from Floor";
Query query = session.createQuery(queryString).setFirstResult(2);
+ @SuppressWarnings("unchecked")
List<Floor> floors = query.list();
assertEquals(2, floors.size());
}
- public void xtestAggregating() throws Exception {
+ public void xtestAggregating() {
//TODO(maulik) make this test work
String queryString = "min(floor.number) from Floor floor";
Query query = session.createQuery(queryString);
+ @SuppressWarnings("unchecked")
List<Building> buildings = query.list();
assertEquals(2, buildings.size());
}
+ public void testCreateSimpleFilter() {
+ Building b = (Building) session.get(Building.class, b1.getBuildingId());
+ assertNotNull(b);
+ Collection<Floor> coll = b.getFloors();
+ Query query = session.createFilter(coll, "");
+ @SuppressWarnings("unchecked")
+ List<Floor> filteredFloors = query.list();
+ assertEquals(3, filteredFloors.size());
+ }
+
+ public void testCreateFancyFilter() {
+ Building b = (Building) session.get(Building.class, b1.getBuildingId());
+ assertNotNull(b);
+ Collection<Floor> coll = b.getFloors();
+ Query query = session.createFilter(coll, "where number > 2");
+ @SuppressWarnings("unchecked")
+ List<Floor> filteredFloors = query.list();
+ assertEquals(1, filteredFloors.size());
+ }
+
+ public void testCreateFilterForUnattachedCollection() {
+ List<Floor> floors = Lists.newArrayList();
+ try {
+ session.createFilter(floors, "");
+ fail("expected query exception");
+ } catch (QueryException qe) {
+ // good
+ }
+ }
}
17 years, 6 months
Hibernate SVN: r12757 - shards/trunk/doc/reference/en/modules.
by hibernate-commits@lists.jboss.org
Author: max.ross
Date: 2007-07-12 00:26:31 -0400 (Thu, 12 Jul 2007)
New Revision: 12757
Modified:
shards/trunk/doc/reference/en/modules/configuration.xml
Log:
HSHARDS-36
Docs describe how to use Shards with Annotations
Modified: shards/trunk/doc/reference/en/modules/configuration.xml
===================================================================
--- shards/trunk/doc/reference/en/modules/configuration.xml 2007-07-12 04:17:22 UTC (rev 12756)
+++ shards/trunk/doc/reference/en/modules/configuration.xml 2007-07-12 04:26:31 UTC (rev 12757)
@@ -169,13 +169,16 @@
<listitem>
<para>connection.password</para>
</listitem>
+ <listitem>
+ <para>connection.datasource</para>
+ </listitem>
<listitem>
- <para>connection.datasource</para>
+ <para>cache.region_prefix</para>
</listitem>
</itemizedlist>
The three <classname>ShardConfiguration</classname> objects we're loading (lines 5 - 7) will be consulted for the
- shard-specific database url, database user, database password, datasource identifier, and that's all. (For a discussion
- of what these properties are and how they are used, please consult the Hibernate Core documentation.)
+ shard-specific database url, database user, database password, datasource identifier, cache region prefix, and that's all.
+ (For a discussion of what these properties are and how they are used, please consult the Hibernate Core documentation.)
This means that if you change the
connection pool parameters in shard1.hibernate.cfg.xml, those parameters will be ignored. If you add another
mapping file to the <classname>Configuration</classname>
@@ -276,12 +279,85 @@
shard-aware id generator. We'll cover id generation in more detail in the chapter on Shard Strategies.
</para>
</sect1>
+ <sect1 id="shards-configuration-anno" revision="1">
+ <title>Using Hibernate Annotations With Shards</title>
+ <para>
+ In the above example we're using Hibernate mapping files (hbm.xml)
+ to specify our mappings, but it's just as easy to use Hibernate
+ Annotations. We can annotate our <classname>WeatherReport</classname>
+ class as follows:
+ <programlisting><![CDATA[
+@Entity
+@Table(name="WEATHER_REPORT")
+public class WeatherReport {
+
+ @Id @GeneratedValue(generator="WeatherReportIdGenerator")
+ @GenericGenerator(name="WeatherReportIdGenerator", strategy="org.hibernate.shards.id.ShardedUUIDGenerator")
+ @Column(name="REPORT_ID")
+ private Integer reportId;
+
+ @Column(name="CONTINENT")
+ private String continent;
+
+ @Column(name="LATITUDE")
+ private BigDecimal latitude;
+
+ @Column(name="LONGITUDE")
+ private BigDecimal longitude;
+
+ @Column(name="TEMPERATURE")
+ private int temperature;
+
+ @Column(name="REPORT_TIME")
+ private Date reportTime;
+
+ ... // getters and setters
+}
+]]></programlisting>
+ This is a pretty standard use of Hibernate Annotations. The only
+ thing here that's particularly noteworthy is the use of the
+ <classname>GenericGenerator</classname> annotation, which is part
+ of Hibernate Annotations but not JPA. We need this to specify our
+ shard-aware id generator.
+ </para>
+ <para>
+ The changes we now need to make to the <code>createSessionFactory()</code>
+ method we implemented above are actually quite small:
+ <programlisting><![CDATA[
+ 1 public SessionFactory createSessionFactory() {
+ 2 AnnotationConfiguration prototypeConfig = new AnnotationConfiguration().configure("shard0.hibernate.cfg.xml");
+ 3 prototypeConfig.addAnnotatedClass(WeatherReport.class);
+ 4 List<ShardConfiguration> shardConfigs = new ArrayList<ShardConfiguration>();
+ 5 shardConfigs.add(buildShardConfig("shard0.hibernate.cfg.xml"));
+ 6 shardConfigs.add(buildShardConfig("shard1.hibernate.cfg.xml"));
+ 7 shardConfigs.add(buildShardConfig("shard2.hibernate.cfg.xml"));
+ 8 ShardStrategyFactory shardStrategyFactory = buildShardStrategyFactory();
+ 9 ShardedConfiguration shardedConfig = new ShardedConfiguration(
+ 10 prototypeConfig,
+ 11 shardConfigs,
+ 12 shardStrategyFactory);
+ 13 return shardedConfig.buildShardedSessionFactory();
+ 14 }
+ ]]></programlisting>
+ The only changes between this method and the non-annotated versions
+ are on lines 2 and 3. On line 2 we're declaring and instantiating an
+ <classname>AnnotationConfiguration</classname> instead of a
+ <classname>Configuration</classname>, and on line 3 we're adding
+ an annotated class to the configuration instead of an xml mapping file.
+ That's it!
+ </para>
+ <para>
+ Please note that while Hibernate Shards works with Hibernate Annotations,
+ Hibernate Shards does not ship with Hibernate Annotations. You'll need
+ to download Hibernate Annotations and its dependencies separately.
+ </para>
+ </sect1>
<sect1 id="shards-configuration-limitations" revision="1">
<title>Configuration Limitations</title>
<para>
Many of you will quickly realize that the configuration mechanism we've provided won't work if you're
configuring your <classname>SessionFactory</classname>
- via JPA or Hibernate Annotations. It's true. We expect these deficiencies to be addressed shortly.
+ via JPA. It's true. We expect this deficiency to be addressed shortly.
</para>
</sect1>
</chapter>
17 years, 6 months
Hibernate SVN: r12756 - in shards/trunk/src: java/org/hibernate/shards/criteria and 22 other directories.
by hibernate-commits@lists.jboss.org
Author: buurzgoth
Date: 2007-07-12 00:17:22 -0400 (Thu, 12 Jul 2007)
New Revision: 12756
Modified:
shards/trunk/src/java/org/hibernate/shards/ShardImpl.java
shards/trunk/src/java/org/hibernate/shards/ShardedTransaction.java
shards/trunk/src/java/org/hibernate/shards/criteria/ExitOperationsCriteriaCollector.java
shards/trunk/src/java/org/hibernate/shards/criteria/ShardedCriteriaImpl.java
shards/trunk/src/java/org/hibernate/shards/criteria/ShardedSubcriteriaImpl.java
shards/trunk/src/java/org/hibernate/shards/engine/ShardedSessionFactoryImplementor.java
shards/trunk/src/java/org/hibernate/shards/engine/ShardedSessionImplementor.java
shards/trunk/src/java/org/hibernate/shards/id/ShardEncodingIdentifierGenerator.java
shards/trunk/src/java/org/hibernate/shards/id/ShardedTableHiLoGenerator.java
shards/trunk/src/java/org/hibernate/shards/query/ExitOperationsQueryCollector.java
shards/trunk/src/java/org/hibernate/shards/query/QueryFactory.java
shards/trunk/src/java/org/hibernate/shards/query/SetBigDecimalEvent.java
shards/trunk/src/java/org/hibernate/shards/query/SetBigIntegerEvent.java
shards/trunk/src/java/org/hibernate/shards/query/SetBinaryEvent.java
shards/trunk/src/java/org/hibernate/shards/query/SetBooleanEvent.java
shards/trunk/src/java/org/hibernate/shards/query/SetByteEvent.java
shards/trunk/src/java/org/hibernate/shards/query/SetCacheModeEvent.java
shards/trunk/src/java/org/hibernate/shards/query/SetCalendarDateEvent.java
shards/trunk/src/java/org/hibernate/shards/query/SetCalendarEvent.java
shards/trunk/src/java/org/hibernate/shards/query/SetCharacterEvent.java
shards/trunk/src/java/org/hibernate/shards/query/SetDateEvent.java
shards/trunk/src/java/org/hibernate/shards/query/SetDoubleEvent.java
shards/trunk/src/java/org/hibernate/shards/query/SetEntityEvent.java
shards/trunk/src/java/org/hibernate/shards/query/SetFloatEvent.java
shards/trunk/src/java/org/hibernate/shards/query/SetFlushModeEvent.java
shards/trunk/src/java/org/hibernate/shards/query/SetIntegerEvent.java
shards/trunk/src/java/org/hibernate/shards/query/SetLocaleEvent.java
shards/trunk/src/java/org/hibernate/shards/query/SetLockModeEvent.java
shards/trunk/src/java/org/hibernate/shards/query/SetLongEvent.java
shards/trunk/src/java/org/hibernate/shards/query/SetParameterEvent.java
shards/trunk/src/java/org/hibernate/shards/query/SetParameterListEvent.java
shards/trunk/src/java/org/hibernate/shards/query/SetPropertiesEvent.java
shards/trunk/src/java/org/hibernate/shards/query/SetSerializableEvent.java
shards/trunk/src/java/org/hibernate/shards/query/SetShortEvent.java
shards/trunk/src/java/org/hibernate/shards/query/SetStringEvent.java
shards/trunk/src/java/org/hibernate/shards/query/SetTextEvent.java
shards/trunk/src/java/org/hibernate/shards/query/SetTimeEvent.java
shards/trunk/src/java/org/hibernate/shards/query/SetTimestampEvent.java
shards/trunk/src/java/org/hibernate/shards/query/ShardedQueryImpl.java
shards/trunk/src/java/org/hibernate/shards/session/CrossShardRelationshipDetectingInterceptorDecorator.java
shards/trunk/src/java/org/hibernate/shards/session/SetupTransactionOpenSessionEvent.java
shards/trunk/src/java/org/hibernate/shards/session/ShardIdResolver.java
shards/trunk/src/java/org/hibernate/shards/session/ShardedSession.java
shards/trunk/src/java/org/hibernate/shards/session/ShardedSessionFactoryImpl.java
shards/trunk/src/java/org/hibernate/shards/session/ShardedSessionImpl.java
shards/trunk/src/java/org/hibernate/shards/session/SubsetShardedSessionFactoryImpl.java
shards/trunk/src/java/org/hibernate/shards/strategy/access/ParallelShardOperationCallable.java
shards/trunk/src/java/org/hibernate/shards/strategy/access/StartAwareFutureTask.java
shards/trunk/src/java/org/hibernate/shards/strategy/exit/AggregateExitOperation.java
shards/trunk/src/java/org/hibernate/shards/strategy/exit/CountExitOperation.java
shards/trunk/src/java/org/hibernate/shards/strategy/exit/DistinctExitOperation.java
shards/trunk/src/java/org/hibernate/shards/strategy/exit/FirstResultExitOperation.java
shards/trunk/src/java/org/hibernate/shards/strategy/exit/OrderExitOperation.java
shards/trunk/src/java/org/hibernate/shards/strategy/exit/RowCountExitOperation.java
shards/trunk/src/java/org/hibernate/shards/strategy/exit/ShardedAvgExitOperation.java
shards/trunk/src/java/org/hibernate/shards/transaction/ShardedTransactionImpl.java
shards/trunk/src/java/org/hibernate/shards/util/InterceptorDecorator.java
shards/trunk/src/test/org/hibernate/shards/NonPermutedTests.java
shards/trunk/src/test/org/hibernate/shards/ShardImplTest.java
shards/trunk/src/test/org/hibernate/shards/ShardedConfigurationTest.java
shards/trunk/src/test/org/hibernate/shards/ShardedSessionFactoryDefaultMock.java
shards/trunk/src/test/org/hibernate/shards/ShardedTransactionDefaultMock.java
shards/trunk/src/test/org/hibernate/shards/criteria/CreateSubcriteriaEventTest.java
shards/trunk/src/test/org/hibernate/shards/criteria/ShardedCriteriaDefaultMock.java
shards/trunk/src/test/org/hibernate/shards/criteria/ShardedSubcriteriaImplTest.java
shards/trunk/src/test/org/hibernate/shards/defaultmock/ClassMetadataDefaultMock.java
shards/trunk/src/test/org/hibernate/shards/defaultmock/CriteriaDefaultMock.java
shards/trunk/src/test/org/hibernate/shards/defaultmock/EntityPersisterDefaultMock.java
shards/trunk/src/test/org/hibernate/shards/defaultmock/QueryDefaultMock.java
shards/trunk/src/test/org/hibernate/shards/defaultmock/SessionFactoryDefaultMock.java
shards/trunk/src/test/org/hibernate/shards/defaultmock/SessionImplementorDefaultMock.java
shards/trunk/src/test/org/hibernate/shards/defaultmock/TypeDefaultMock.java
shards/trunk/src/test/org/hibernate/shards/engine/ShardedSessionImplementorDefaultMock.java
shards/trunk/src/test/org/hibernate/shards/id/ShardedTableHiLoGeneratorTest.java
shards/trunk/src/test/org/hibernate/shards/id/ShardedUUIDGeneratorTest.java
shards/trunk/src/test/org/hibernate/shards/integration/BaseShardingIntegrationTestCase.java
shards/trunk/src/test/org/hibernate/shards/integration/MemoryLeakPlugger.java
shards/trunk/src/test/org/hibernate/shards/integration/PermutedIntegrationTests.java
shards/trunk/src/test/org/hibernate/shards/integration/id/IdGeneratorPermutedIntegrationTest.java
shards/trunk/src/test/org/hibernate/shards/integration/model/InterceptorBehaviorPermutedIntegrationTest.java
shards/trunk/src/test/org/hibernate/shards/integration/model/MemoryLeakTest.java
shards/trunk/src/test/org/hibernate/shards/integration/model/ModelCriteriaPermutedIntegrationTest.java
shards/trunk/src/test/org/hibernate/shards/integration/model/ModelDataFactory.java
shards/trunk/src/test/org/hibernate/shards/integration/model/ModelPermutedIntegrationTest.java
shards/trunk/src/test/org/hibernate/shards/integration/model/ModelQueryPermutedIntegrationTest.java
shards/trunk/src/test/org/hibernate/shards/query/SetBigDecimalEventTest.java
shards/trunk/src/test/org/hibernate/shards/query/SetBigIntegerEventTest.java
shards/trunk/src/test/org/hibernate/shards/query/SetBinaryEventTest.java
shards/trunk/src/test/org/hibernate/shards/query/SetBooleanEventTest.java
shards/trunk/src/test/org/hibernate/shards/query/SetByteEventTest.java
shards/trunk/src/test/org/hibernate/shards/query/SetCacheModeEventTest.java
shards/trunk/src/test/org/hibernate/shards/query/SetCacheRegionEventTest.java
shards/trunk/src/test/org/hibernate/shards/query/SetCacheableEventTest.java
shards/trunk/src/test/org/hibernate/shards/query/SetCalendarDateEventTest.java
shards/trunk/src/test/org/hibernate/shards/query/SetCalendarEventTest.java
shards/trunk/src/test/org/hibernate/shards/query/SetCharacterEventTest.java
shards/trunk/src/test/org/hibernate/shards/query/SetCommentEventTest.java
shards/trunk/src/test/org/hibernate/shards/query/SetDateEventTest.java
shards/trunk/src/test/org/hibernate/shards/query/SetDoubleEventTest.java
shards/trunk/src/test/org/hibernate/shards/query/SetEntityEventTest.java
shards/trunk/src/test/org/hibernate/shards/query/SetFetchSizeEventTest.java
shards/trunk/src/test/org/hibernate/shards/query/SetFirstResultEventTest.java
shards/trunk/src/test/org/hibernate/shards/query/SetFloatEventTest.java
shards/trunk/src/test/org/hibernate/shards/query/SetFlushModeEventTest.java
shards/trunk/src/test/org/hibernate/shards/query/SetIntegerEventTest.java
shards/trunk/src/test/org/hibernate/shards/query/SetLocaleEventTest.java
shards/trunk/src/test/org/hibernate/shards/query/SetLockModeEventTest.java
shards/trunk/src/test/org/hibernate/shards/query/SetLongEventTest.java
shards/trunk/src/test/org/hibernate/shards/query/SetMaxResultsEventTest.java
shards/trunk/src/test/org/hibernate/shards/query/SetParameterEventTest.java
shards/trunk/src/test/org/hibernate/shards/query/SetParameterListEventTest.java
shards/trunk/src/test/org/hibernate/shards/query/SetParametersEventTest.java
shards/trunk/src/test/org/hibernate/shards/query/SetPropertiesEventTest.java
shards/trunk/src/test/org/hibernate/shards/query/SetReadOnlyEventTest.java
shards/trunk/src/test/org/hibernate/shards/query/SetResultTransformerEventTest.java
shards/trunk/src/test/org/hibernate/shards/query/SetSerializableEventTest.java
shards/trunk/src/test/org/hibernate/shards/query/SetShortEventTest.java
shards/trunk/src/test/org/hibernate/shards/query/SetStringEventTest.java
shards/trunk/src/test/org/hibernate/shards/query/SetTextEventTest.java
shards/trunk/src/test/org/hibernate/shards/query/SetTimeEventTest.java
shards/trunk/src/test/org/hibernate/shards/query/SetTimeoutEventTest.java
shards/trunk/src/test/org/hibernate/shards/query/SetTimestampEventTest.java
shards/trunk/src/test/org/hibernate/shards/query/ShardedQueryDefaultMock.java
shards/trunk/src/test/org/hibernate/shards/session/CrossShardRelationshipDetectingInterceptorDecoratorTest.java
shards/trunk/src/test/org/hibernate/shards/session/CrossShardRelationshipDetectingInterceptorTest.java
shards/trunk/src/test/org/hibernate/shards/session/ShardIdResolverDefaultMock.java
shards/trunk/src/test/org/hibernate/shards/session/ShardedSessionFactoryImplTest.java
shards/trunk/src/test/org/hibernate/shards/session/ShardedSessionImplTest.java
shards/trunk/src/test/org/hibernate/shards/strategy/access/ParallelShardOperationCallableTest.java
shards/trunk/src/test/org/hibernate/shards/strategy/access/StartAwareFutureTaskTest.java
shards/trunk/src/test/org/hibernate/shards/strategy/exit/AggregateExitOperationTest.java
shards/trunk/src/test/org/hibernate/shards/strategy/exit/FirstNonNullResultExitStrategyTest.java
shards/trunk/src/test/org/hibernate/shards/strategy/exit/FirstResultExitOperationTest.java
shards/trunk/src/test/org/hibernate/shards/strategy/exit/MaxResultExitOperationTest.java
shards/trunk/src/test/org/hibernate/shards/strategy/exit/OrderExitOperationTest.java
shards/trunk/src/test/org/hibernate/shards/strategy/exit/ProjectionExitOperationFactoryTest.java
shards/trunk/src/test/org/hibernate/shards/strategy/exit/RowCountExitOperationTest.java
shards/trunk/src/test/org/hibernate/shards/transaction/ShardedTransactionImplTest.java
shards/trunk/src/test/org/hibernate/shards/util/JdbcUtil.java
Log:
Fix imports.
Modified: shards/trunk/src/java/org/hibernate/shards/ShardImpl.java
===================================================================
--- shards/trunk/src/java/org/hibernate/shards/ShardImpl.java 2007-07-11 23:03:33 UTC (rev 12755)
+++ shards/trunk/src/java/org/hibernate/shards/ShardImpl.java 2007-07-12 04:17:22 UTC (rev 12756)
@@ -35,7 +35,11 @@
import org.hibernate.shards.util.Preconditions;
import org.hibernate.shards.util.Sets;
-import java.util.*;
+import java.util.Collections;
+import java.util.LinkedList;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
/**
* Concrete implementation of the {@link Shard} interface.
Modified: shards/trunk/src/java/org/hibernate/shards/ShardedTransaction.java
===================================================================
--- shards/trunk/src/java/org/hibernate/shards/ShardedTransaction.java 2007-07-11 23:03:33 UTC (rev 12755)
+++ shards/trunk/src/java/org/hibernate/shards/ShardedTransaction.java 2007-07-12 04:17:22 UTC (rev 12756)
@@ -18,8 +18,8 @@
package org.hibernate.shards;
+import org.hibernate.Session;
import org.hibernate.Transaction;
-import org.hibernate.Session;
/**
* Simple interface to represent a shard-aware {@link Transaction}.
Modified: shards/trunk/src/java/org/hibernate/shards/criteria/ExitOperationsCriteriaCollector.java
===================================================================
--- shards/trunk/src/java/org/hibernate/shards/criteria/ExitOperationsCriteriaCollector.java 2007-07-11 23:03:33 UTC (rev 12755)
+++ shards/trunk/src/java/org/hibernate/shards/criteria/ExitOperationsCriteriaCollector.java 2007-07-12 04:17:22 UTC (rev 12756)
@@ -18,14 +18,6 @@
package org.hibernate.shards.criteria;
-import org.hibernate.shards.strategy.exit.DistinctExitOperation;
-import org.hibernate.shards.strategy.exit.ExitOperationsCollector;
-import org.hibernate.shards.strategy.exit.FirstResultExitOperation;
-import org.hibernate.shards.strategy.exit.MaxResultsExitOperation;
-import org.hibernate.shards.strategy.exit.OrderExitOperation;
-import org.hibernate.shards.strategy.exit.ProjectionExitOperationFactory;
-import org.hibernate.shards.util.Lists;
-
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.hibernate.criterion.AggregateProjection;
@@ -34,6 +26,13 @@
import org.hibernate.criterion.Projection;
import org.hibernate.criterion.RowCountProjection;
import org.hibernate.engine.SessionFactoryImplementor;
+import org.hibernate.shards.strategy.exit.DistinctExitOperation;
+import org.hibernate.shards.strategy.exit.ExitOperationsCollector;
+import org.hibernate.shards.strategy.exit.FirstResultExitOperation;
+import org.hibernate.shards.strategy.exit.MaxResultsExitOperation;
+import org.hibernate.shards.strategy.exit.OrderExitOperation;
+import org.hibernate.shards.strategy.exit.ProjectionExitOperationFactory;
+import org.hibernate.shards.util.Lists;
import java.util.List;
Modified: shards/trunk/src/java/org/hibernate/shards/criteria/ShardedCriteriaImpl.java
===================================================================
--- shards/trunk/src/java/org/hibernate/shards/criteria/ShardedCriteriaImpl.java 2007-07-11 23:03:33 UTC (rev 12755)
+++ shards/trunk/src/java/org/hibernate/shards/criteria/ShardedCriteriaImpl.java 2007-07-12 04:17:22 UTC (rev 12756)
@@ -18,7 +18,14 @@
package org.hibernate.shards.criteria;
-import org.hibernate.*;
+import org.hibernate.CacheMode;
+import org.hibernate.Criteria;
+import org.hibernate.FetchMode;
+import org.hibernate.FlushMode;
+import org.hibernate.HibernateException;
+import org.hibernate.LockMode;
+import org.hibernate.ScrollMode;
+import org.hibernate.ScrollableResults;
import org.hibernate.criterion.Criterion;
import org.hibernate.criterion.Order;
import org.hibernate.criterion.Projection;
Modified: shards/trunk/src/java/org/hibernate/shards/criteria/ShardedSubcriteriaImpl.java
===================================================================
--- shards/trunk/src/java/org/hibernate/shards/criteria/ShardedSubcriteriaImpl.java 2007-07-11 23:03:33 UTC (rev 12755)
+++ shards/trunk/src/java/org/hibernate/shards/criteria/ShardedSubcriteriaImpl.java 2007-07-12 04:17:22 UTC (rev 12756)
@@ -18,11 +18,6 @@
package org.hibernate.shards.criteria;
-import org.hibernate.shards.Shard;
-import org.hibernate.shards.util.Lists;
-import org.hibernate.shards.util.Maps;
-import org.hibernate.shards.util.Preconditions;
-
import org.hibernate.CacheMode;
import org.hibernate.Criteria;
import org.hibernate.FetchMode;
@@ -31,10 +26,14 @@
import org.hibernate.LockMode;
import org.hibernate.ScrollMode;
import org.hibernate.ScrollableResults;
-import org.hibernate.impl.CriteriaImpl;
import org.hibernate.criterion.Criterion;
import org.hibernate.criterion.Order;
import org.hibernate.criterion.Projection;
+import org.hibernate.impl.CriteriaImpl;
+import org.hibernate.shards.Shard;
+import org.hibernate.shards.util.Lists;
+import org.hibernate.shards.util.Maps;
+import org.hibernate.shards.util.Preconditions;
import org.hibernate.transform.ResultTransformer;
import java.util.List;
Modified: shards/trunk/src/java/org/hibernate/shards/engine/ShardedSessionFactoryImplementor.java
===================================================================
--- shards/trunk/src/java/org/hibernate/shards/engine/ShardedSessionFactoryImplementor.java 2007-07-11 23:03:33 UTC (rev 12755)
+++ shards/trunk/src/java/org/hibernate/shards/engine/ShardedSessionFactoryImplementor.java 2007-07-12 04:17:22 UTC (rev 12756)
@@ -18,11 +18,10 @@
package org.hibernate.shards.engine;
+import org.hibernate.engine.SessionFactoryImplementor;
import org.hibernate.shards.ShardId;
import org.hibernate.shards.session.ShardedSessionFactory;
-import org.hibernate.engine.SessionFactoryImplementor;
-
import java.util.Map;
import java.util.Set;
Modified: shards/trunk/src/java/org/hibernate/shards/engine/ShardedSessionImplementor.java
===================================================================
--- shards/trunk/src/java/org/hibernate/shards/engine/ShardedSessionImplementor.java 2007-07-11 23:03:33 UTC (rev 12755)
+++ shards/trunk/src/java/org/hibernate/shards/engine/ShardedSessionImplementor.java 2007-07-12 04:17:22 UTC (rev 12756)
@@ -18,8 +18,8 @@
package org.hibernate.shards.engine;
+import org.hibernate.shards.Shard;
import org.hibernate.shards.session.ShardedSession;
-import org.hibernate.shards.Shard;
import java.util.List;
Modified: shards/trunk/src/java/org/hibernate/shards/id/ShardEncodingIdentifierGenerator.java
===================================================================
--- shards/trunk/src/java/org/hibernate/shards/id/ShardEncodingIdentifierGenerator.java 2007-07-11 23:03:33 UTC (rev 12755)
+++ shards/trunk/src/java/org/hibernate/shards/id/ShardEncodingIdentifierGenerator.java 2007-07-12 04:17:22 UTC (rev 12756)
@@ -18,10 +18,9 @@
package org.hibernate.shards.id;
+import org.hibernate.id.IdentifierGenerator;
import org.hibernate.shards.ShardId;
-import org.hibernate.id.IdentifierGenerator;
-
import java.io.Serializable;
/**
Modified: shards/trunk/src/java/org/hibernate/shards/id/ShardedTableHiLoGenerator.java
===================================================================
--- shards/trunk/src/java/org/hibernate/shards/id/ShardedTableHiLoGenerator.java 2007-07-11 23:03:33 UTC (rev 12755)
+++ shards/trunk/src/java/org/hibernate/shards/id/ShardedTableHiLoGenerator.java 2007-07-12 04:17:22 UTC (rev 12756)
@@ -18,12 +18,11 @@
package org.hibernate.shards.id;
-import org.hibernate.shards.session.ControlSessionProvider;
-
import org.hibernate.HibernateException;
import org.hibernate.Session;
import org.hibernate.engine.SessionImplementor;
import org.hibernate.id.TableHiLoGenerator;
+import org.hibernate.shards.session.ControlSessionProvider;
import java.io.Serializable;
Modified: shards/trunk/src/java/org/hibernate/shards/query/ExitOperationsQueryCollector.java
===================================================================
--- shards/trunk/src/java/org/hibernate/shards/query/ExitOperationsQueryCollector.java 2007-07-11 23:03:33 UTC (rev 12755)
+++ shards/trunk/src/java/org/hibernate/shards/query/ExitOperationsQueryCollector.java 2007-07-12 04:17:22 UTC (rev 12756)
@@ -18,12 +18,11 @@
package org.hibernate.shards.query;
+import org.hibernate.engine.SessionFactoryImplementor;
import org.hibernate.shards.strategy.exit.ExitOperationsCollector;
import org.hibernate.shards.strategy.exit.FirstResultExitOperation;
import org.hibernate.shards.strategy.exit.MaxResultsExitOperation;
-import org.hibernate.engine.SessionFactoryImplementor;
-
import java.util.List;
/**
Modified: shards/trunk/src/java/org/hibernate/shards/query/QueryFactory.java
===================================================================
--- shards/trunk/src/java/org/hibernate/shards/query/QueryFactory.java 2007-07-11 23:03:33 UTC (rev 12755)
+++ shards/trunk/src/java/org/hibernate/shards/query/QueryFactory.java 2007-07-12 04:17:22 UTC (rev 12756)
@@ -18,8 +18,8 @@
package org.hibernate.shards.query;
+import org.hibernate.Query;
import org.hibernate.Session;
-import org.hibernate.Query;
/**
* @author maulik(a)google.com (Maulik Shah)
Modified: shards/trunk/src/java/org/hibernate/shards/query/SetBigDecimalEvent.java
===================================================================
--- shards/trunk/src/java/org/hibernate/shards/query/SetBigDecimalEvent.java 2007-07-11 23:03:33 UTC (rev 12755)
+++ shards/trunk/src/java/org/hibernate/shards/query/SetBigDecimalEvent.java 2007-07-12 04:17:22 UTC (rev 12756)
@@ -18,10 +18,9 @@
package org.hibernate.shards.query;
+import org.hibernate.Query;
import org.hibernate.shards.session.ShardedSessionException;
-import org.hibernate.Query;
-
import java.math.BigDecimal;
/**
Modified: shards/trunk/src/java/org/hibernate/shards/query/SetBigIntegerEvent.java
===================================================================
--- shards/trunk/src/java/org/hibernate/shards/query/SetBigIntegerEvent.java 2007-07-11 23:03:33 UTC (rev 12755)
+++ shards/trunk/src/java/org/hibernate/shards/query/SetBigIntegerEvent.java 2007-07-12 04:17:22 UTC (rev 12756)
@@ -18,10 +18,9 @@
package org.hibernate.shards.query;
+import org.hibernate.Query;
import org.hibernate.shards.session.ShardedSessionException;
-import org.hibernate.Query;
-
import java.math.BigInteger;
/**
Modified: shards/trunk/src/java/org/hibernate/shards/query/SetBinaryEvent.java
===================================================================
--- shards/trunk/src/java/org/hibernate/shards/query/SetBinaryEvent.java 2007-07-11 23:03:33 UTC (rev 12755)
+++ shards/trunk/src/java/org/hibernate/shards/query/SetBinaryEvent.java 2007-07-12 04:17:22 UTC (rev 12756)
@@ -18,10 +18,9 @@
package org.hibernate.shards.query;
+import org.hibernate.Query;
import org.hibernate.shards.session.ShardedSessionException;
-import org.hibernate.Query;
-
/**
* @author maulik(a)google.com (Maulik Shah)
*/
Modified: shards/trunk/src/java/org/hibernate/shards/query/SetBooleanEvent.java
===================================================================
--- shards/trunk/src/java/org/hibernate/shards/query/SetBooleanEvent.java 2007-07-11 23:03:33 UTC (rev 12755)
+++ shards/trunk/src/java/org/hibernate/shards/query/SetBooleanEvent.java 2007-07-12 04:17:22 UTC (rev 12756)
@@ -18,10 +18,9 @@
package org.hibernate.shards.query;
+import org.hibernate.Query;
import org.hibernate.shards.session.ShardedSessionException;
-import org.hibernate.Query;
-
/**
* @author maulik(a)google.com (Maulik Shah)
*/
Modified: shards/trunk/src/java/org/hibernate/shards/query/SetByteEvent.java
===================================================================
--- shards/trunk/src/java/org/hibernate/shards/query/SetByteEvent.java 2007-07-11 23:03:33 UTC (rev 12755)
+++ shards/trunk/src/java/org/hibernate/shards/query/SetByteEvent.java 2007-07-12 04:17:22 UTC (rev 12756)
@@ -18,10 +18,9 @@
package org.hibernate.shards.query;
+import org.hibernate.Query;
import org.hibernate.shards.session.ShardedSessionException;
-import org.hibernate.Query;
-
/**
* @author maulik(a)google.com (Maulik Shah)
*/
Modified: shards/trunk/src/java/org/hibernate/shards/query/SetCacheModeEvent.java
===================================================================
--- shards/trunk/src/java/org/hibernate/shards/query/SetCacheModeEvent.java 2007-07-11 23:03:33 UTC (rev 12755)
+++ shards/trunk/src/java/org/hibernate/shards/query/SetCacheModeEvent.java 2007-07-12 04:17:22 UTC (rev 12756)
@@ -18,8 +18,8 @@
package org.hibernate.shards.query;
+import org.hibernate.CacheMode;
import org.hibernate.Query;
-import org.hibernate.CacheMode;
/**
* @author maulik(a)google.com (Maulik Shah)
Modified: shards/trunk/src/java/org/hibernate/shards/query/SetCalendarDateEvent.java
===================================================================
--- shards/trunk/src/java/org/hibernate/shards/query/SetCalendarDateEvent.java 2007-07-11 23:03:33 UTC (rev 12755)
+++ shards/trunk/src/java/org/hibernate/shards/query/SetCalendarDateEvent.java 2007-07-12 04:17:22 UTC (rev 12756)
@@ -18,10 +18,9 @@
package org.hibernate.shards.query;
+import org.hibernate.Query;
import org.hibernate.shards.session.ShardedSessionException;
-import org.hibernate.Query;
-
import java.util.Calendar;
/**
Modified: shards/trunk/src/java/org/hibernate/shards/query/SetCalendarEvent.java
===================================================================
--- shards/trunk/src/java/org/hibernate/shards/query/SetCalendarEvent.java 2007-07-11 23:03:33 UTC (rev 12755)
+++ shards/trunk/src/java/org/hibernate/shards/query/SetCalendarEvent.java 2007-07-12 04:17:22 UTC (rev 12756)
@@ -18,10 +18,9 @@
package org.hibernate.shards.query;
+import org.hibernate.Query;
import org.hibernate.shards.session.ShardedSessionException;
-import org.hibernate.Query;
-
import java.util.Calendar;
/**
Modified: shards/trunk/src/java/org/hibernate/shards/query/SetCharacterEvent.java
===================================================================
--- shards/trunk/src/java/org/hibernate/shards/query/SetCharacterEvent.java 2007-07-11 23:03:33 UTC (rev 12755)
+++ shards/trunk/src/java/org/hibernate/shards/query/SetCharacterEvent.java 2007-07-12 04:17:22 UTC (rev 12756)
@@ -18,10 +18,9 @@
package org.hibernate.shards.query;
+import org.hibernate.Query;
import org.hibernate.shards.session.ShardedSessionException;
-import org.hibernate.Query;
-
/**
* @author maulik(a)google.com (Maulik Shah)
*/
Modified: shards/trunk/src/java/org/hibernate/shards/query/SetDateEvent.java
===================================================================
--- shards/trunk/src/java/org/hibernate/shards/query/SetDateEvent.java 2007-07-11 23:03:33 UTC (rev 12755)
+++ shards/trunk/src/java/org/hibernate/shards/query/SetDateEvent.java 2007-07-12 04:17:22 UTC (rev 12756)
@@ -18,10 +18,9 @@
package org.hibernate.shards.query;
+import org.hibernate.Query;
import org.hibernate.shards.session.ShardedSessionException;
-import org.hibernate.Query;
-
import java.util.Date;
/**
Modified: shards/trunk/src/java/org/hibernate/shards/query/SetDoubleEvent.java
===================================================================
--- shards/trunk/src/java/org/hibernate/shards/query/SetDoubleEvent.java 2007-07-11 23:03:33 UTC (rev 12755)
+++ shards/trunk/src/java/org/hibernate/shards/query/SetDoubleEvent.java 2007-07-12 04:17:22 UTC (rev 12756)
@@ -18,10 +18,9 @@
package org.hibernate.shards.query;
+import org.hibernate.Query;
import org.hibernate.shards.session.ShardedSessionException;
-import org.hibernate.Query;
-
/**
* @author maulik(a)google.com (Maulik Shah)
*/
Modified: shards/trunk/src/java/org/hibernate/shards/query/SetEntityEvent.java
===================================================================
--- shards/trunk/src/java/org/hibernate/shards/query/SetEntityEvent.java 2007-07-11 23:03:33 UTC (rev 12755)
+++ shards/trunk/src/java/org/hibernate/shards/query/SetEntityEvent.java 2007-07-12 04:17:22 UTC (rev 12756)
@@ -18,11 +18,10 @@
package org.hibernate.shards.query;
+import org.hibernate.Query;
import org.hibernate.shards.session.ShardedSessionException;
-import org.hibernate.Query;
-
/**
* @author maulik(a)google.com (Maulik Shah)
*/
Modified: shards/trunk/src/java/org/hibernate/shards/query/SetFloatEvent.java
===================================================================
--- shards/trunk/src/java/org/hibernate/shards/query/SetFloatEvent.java 2007-07-11 23:03:33 UTC (rev 12755)
+++ shards/trunk/src/java/org/hibernate/shards/query/SetFloatEvent.java 2007-07-12 04:17:22 UTC (rev 12756)
@@ -18,10 +18,9 @@
package org.hibernate.shards.query;
+import org.hibernate.Query;
import org.hibernate.shards.session.ShardedSessionException;
-import org.hibernate.Query;
-
/**
* @author maulik(a)google.com (Maulik Shah)
*/
Modified: shards/trunk/src/java/org/hibernate/shards/query/SetFlushModeEvent.java
===================================================================
--- shards/trunk/src/java/org/hibernate/shards/query/SetFlushModeEvent.java 2007-07-11 23:03:33 UTC (rev 12755)
+++ shards/trunk/src/java/org/hibernate/shards/query/SetFlushModeEvent.java 2007-07-12 04:17:22 UTC (rev 12756)
@@ -18,8 +18,8 @@
package org.hibernate.shards.query;
+import org.hibernate.FlushMode;
import org.hibernate.Query;
-import org.hibernate.FlushMode;
/**
* @author maulik(a)google.com (Maulik Shah)
Modified: shards/trunk/src/java/org/hibernate/shards/query/SetIntegerEvent.java
===================================================================
--- shards/trunk/src/java/org/hibernate/shards/query/SetIntegerEvent.java 2007-07-11 23:03:33 UTC (rev 12755)
+++ shards/trunk/src/java/org/hibernate/shards/query/SetIntegerEvent.java 2007-07-12 04:17:22 UTC (rev 12756)
@@ -18,10 +18,9 @@
package org.hibernate.shards.query;
+import org.hibernate.Query;
import org.hibernate.shards.session.ShardedSessionException;
-import org.hibernate.Query;
-
/**
* @author maulik(a)google.com (Maulik Shah)
*/
Modified: shards/trunk/src/java/org/hibernate/shards/query/SetLocaleEvent.java
===================================================================
--- shards/trunk/src/java/org/hibernate/shards/query/SetLocaleEvent.java 2007-07-11 23:03:33 UTC (rev 12755)
+++ shards/trunk/src/java/org/hibernate/shards/query/SetLocaleEvent.java 2007-07-12 04:17:22 UTC (rev 12756)
@@ -18,10 +18,9 @@
package org.hibernate.shards.query;
+import org.hibernate.Query;
import org.hibernate.shards.session.ShardedSessionException;
-import org.hibernate.Query;
-
import java.util.Locale;
/**
Modified: shards/trunk/src/java/org/hibernate/shards/query/SetLockModeEvent.java
===================================================================
--- shards/trunk/src/java/org/hibernate/shards/query/SetLockModeEvent.java 2007-07-11 23:03:33 UTC (rev 12755)
+++ shards/trunk/src/java/org/hibernate/shards/query/SetLockModeEvent.java 2007-07-12 04:17:22 UTC (rev 12756)
@@ -18,8 +18,8 @@
package org.hibernate.shards.query;
+import org.hibernate.LockMode;
import org.hibernate.Query;
-import org.hibernate.LockMode;
/**
* @author maulik(a)google.com (Maulik Shah)
Modified: shards/trunk/src/java/org/hibernate/shards/query/SetLongEvent.java
===================================================================
--- shards/trunk/src/java/org/hibernate/shards/query/SetLongEvent.java 2007-07-11 23:03:33 UTC (rev 12755)
+++ shards/trunk/src/java/org/hibernate/shards/query/SetLongEvent.java 2007-07-12 04:17:22 UTC (rev 12756)
@@ -18,10 +18,9 @@
package org.hibernate.shards.query;
+import org.hibernate.Query;
import org.hibernate.shards.session.ShardedSessionException;
-import org.hibernate.Query;
-
/**
* @author maulik(a)google.com (Maulik Shah)
*/
Modified: shards/trunk/src/java/org/hibernate/shards/query/SetParameterEvent.java
===================================================================
--- shards/trunk/src/java/org/hibernate/shards/query/SetParameterEvent.java 2007-07-11 23:03:33 UTC (rev 12755)
+++ shards/trunk/src/java/org/hibernate/shards/query/SetParameterEvent.java 2007-07-12 04:17:22 UTC (rev 12756)
@@ -18,9 +18,8 @@
package org.hibernate.shards.query;
-import org.hibernate.shards.session.ShardedSessionException;
-
import org.hibernate.Query;
+import org.hibernate.shards.session.ShardedSessionException;
import org.hibernate.type.Type;
/**
Modified: shards/trunk/src/java/org/hibernate/shards/query/SetParameterListEvent.java
===================================================================
--- shards/trunk/src/java/org/hibernate/shards/query/SetParameterListEvent.java 2007-07-11 23:03:33 UTC (rev 12755)
+++ shards/trunk/src/java/org/hibernate/shards/query/SetParameterListEvent.java 2007-07-12 04:17:22 UTC (rev 12756)
@@ -18,9 +18,8 @@
package org.hibernate.shards.query;
-import org.hibernate.shards.session.ShardedSessionException;
-
import org.hibernate.Query;
+import org.hibernate.shards.session.ShardedSessionException;
import org.hibernate.type.Type;
import java.util.Collection;
Modified: shards/trunk/src/java/org/hibernate/shards/query/SetPropertiesEvent.java
===================================================================
--- shards/trunk/src/java/org/hibernate/shards/query/SetPropertiesEvent.java 2007-07-11 23:03:33 UTC (rev 12755)
+++ shards/trunk/src/java/org/hibernate/shards/query/SetPropertiesEvent.java 2007-07-12 04:17:22 UTC (rev 12756)
@@ -18,10 +18,9 @@
package org.hibernate.shards.query;
+import org.hibernate.Query;
import org.hibernate.shards.session.ShardedSessionException;
-import org.hibernate.Query;
-
import java.util.Map;
/**
Modified: shards/trunk/src/java/org/hibernate/shards/query/SetSerializableEvent.java
===================================================================
--- shards/trunk/src/java/org/hibernate/shards/query/SetSerializableEvent.java 2007-07-11 23:03:33 UTC (rev 12755)
+++ shards/trunk/src/java/org/hibernate/shards/query/SetSerializableEvent.java 2007-07-12 04:17:22 UTC (rev 12756)
@@ -18,10 +18,9 @@
package org.hibernate.shards.query;
+import org.hibernate.Query;
import org.hibernate.shards.session.ShardedSessionException;
-import org.hibernate.Query;
-
import java.io.Serializable;
/**
Modified: shards/trunk/src/java/org/hibernate/shards/query/SetShortEvent.java
===================================================================
--- shards/trunk/src/java/org/hibernate/shards/query/SetShortEvent.java 2007-07-11 23:03:33 UTC (rev 12755)
+++ shards/trunk/src/java/org/hibernate/shards/query/SetShortEvent.java 2007-07-12 04:17:22 UTC (rev 12756)
@@ -18,10 +18,9 @@
package org.hibernate.shards.query;
+import org.hibernate.Query;
import org.hibernate.shards.session.ShardedSessionException;
-import org.hibernate.Query;
-
/**
* @author maulik(a)google.com (Maulik Shah)
*/
Modified: shards/trunk/src/java/org/hibernate/shards/query/SetStringEvent.java
===================================================================
--- shards/trunk/src/java/org/hibernate/shards/query/SetStringEvent.java 2007-07-11 23:03:33 UTC (rev 12755)
+++ shards/trunk/src/java/org/hibernate/shards/query/SetStringEvent.java 2007-07-12 04:17:22 UTC (rev 12756)
@@ -18,10 +18,9 @@
package org.hibernate.shards.query;
+import org.hibernate.Query;
import org.hibernate.shards.session.ShardedSessionException;
-import org.hibernate.Query;
-
/**
* @author maulik(a)google.com (Maulik Shah)
*/
Modified: shards/trunk/src/java/org/hibernate/shards/query/SetTextEvent.java
===================================================================
--- shards/trunk/src/java/org/hibernate/shards/query/SetTextEvent.java 2007-07-11 23:03:33 UTC (rev 12755)
+++ shards/trunk/src/java/org/hibernate/shards/query/SetTextEvent.java 2007-07-12 04:17:22 UTC (rev 12756)
@@ -18,10 +18,9 @@
package org.hibernate.shards.query;
+import org.hibernate.Query;
import org.hibernate.shards.session.ShardedSessionException;
-import org.hibernate.Query;
-
/**
* @author maulik(a)google.com (Maulik Shah)
*/
Modified: shards/trunk/src/java/org/hibernate/shards/query/SetTimeEvent.java
===================================================================
--- shards/trunk/src/java/org/hibernate/shards/query/SetTimeEvent.java 2007-07-11 23:03:33 UTC (rev 12755)
+++ shards/trunk/src/java/org/hibernate/shards/query/SetTimeEvent.java 2007-07-12 04:17:22 UTC (rev 12756)
@@ -18,10 +18,9 @@
package org.hibernate.shards.query;
+import org.hibernate.Query;
import org.hibernate.shards.session.ShardedSessionException;
-import org.hibernate.Query;
-
import java.util.Date;
/**
Modified: shards/trunk/src/java/org/hibernate/shards/query/SetTimestampEvent.java
===================================================================
--- shards/trunk/src/java/org/hibernate/shards/query/SetTimestampEvent.java 2007-07-11 23:03:33 UTC (rev 12755)
+++ shards/trunk/src/java/org/hibernate/shards/query/SetTimestampEvent.java 2007-07-12 04:17:22 UTC (rev 12756)
@@ -18,10 +18,9 @@
package org.hibernate.shards.query;
+import org.hibernate.Query;
import org.hibernate.shards.session.ShardedSessionException;
-import org.hibernate.Query;
-
import java.util.Date;
/**
Modified: shards/trunk/src/java/org/hibernate/shards/query/ShardedQueryImpl.java
===================================================================
--- shards/trunk/src/java/org/hibernate/shards/query/ShardedQueryImpl.java 2007-07-11 23:03:33 UTC (rev 12755)
+++ shards/trunk/src/java/org/hibernate/shards/query/ShardedQueryImpl.java 2007-07-12 04:17:22 UTC (rev 12756)
@@ -18,13 +18,6 @@
package org.hibernate.shards.query;
-import org.hibernate.shards.Shard;
-import org.hibernate.shards.ShardOperation;
-import org.hibernate.shards.strategy.access.ShardAccessStrategy;
-import org.hibernate.shards.strategy.exit.ConcatenateListsExitStrategy;
-import org.hibernate.shards.strategy.exit.FirstNonNullResultExitStrategy;
-import org.hibernate.shards.util.Preconditions;
-
import org.hibernate.CacheMode;
import org.hibernate.FlushMode;
import org.hibernate.HibernateException;
@@ -32,6 +25,12 @@
import org.hibernate.Query;
import org.hibernate.ScrollMode;
import org.hibernate.ScrollableResults;
+import org.hibernate.shards.Shard;
+import org.hibernate.shards.ShardOperation;
+import org.hibernate.shards.strategy.access.ShardAccessStrategy;
+import org.hibernate.shards.strategy.exit.ConcatenateListsExitStrategy;
+import org.hibernate.shards.strategy.exit.FirstNonNullResultExitStrategy;
+import org.hibernate.shards.util.Preconditions;
import org.hibernate.transform.ResultTransformer;
import org.hibernate.type.Type;
Modified: shards/trunk/src/java/org/hibernate/shards/session/CrossShardRelationshipDetectingInterceptorDecorator.java
===================================================================
--- shards/trunk/src/java/org/hibernate/shards/session/CrossShardRelationshipDetectingInterceptorDecorator.java 2007-07-11 23:03:33 UTC (rev 12755)
+++ shards/trunk/src/java/org/hibernate/shards/session/CrossShardRelationshipDetectingInterceptorDecorator.java 2007-07-12 04:17:22 UTC (rev 12756)
@@ -18,10 +18,9 @@
package org.hibernate.shards.session;
-import org.hibernate.shards.util.InterceptorDecorator;
-
import org.hibernate.CallbackException;
import org.hibernate.Interceptor;
+import org.hibernate.shards.util.InterceptorDecorator;
import org.hibernate.type.Type;
import java.io.Serializable;
Modified: shards/trunk/src/java/org/hibernate/shards/session/SetupTransactionOpenSessionEvent.java
===================================================================
--- shards/trunk/src/java/org/hibernate/shards/session/SetupTransactionOpenSessionEvent.java 2007-07-11 23:03:33 UTC (rev 12755)
+++ shards/trunk/src/java/org/hibernate/shards/session/SetupTransactionOpenSessionEvent.java 2007-07-12 04:17:22 UTC (rev 12756)
@@ -18,10 +18,9 @@
package org.hibernate.shards.session;
+import org.hibernate.Session;
import org.hibernate.shards.ShardedTransaction;
-import org.hibernate.Session;
-
/**
* OpenSessionEvent which adds newly opened session to the specified
* ShardedTransaction.
Modified: shards/trunk/src/java/org/hibernate/shards/session/ShardIdResolver.java
===================================================================
--- shards/trunk/src/java/org/hibernate/shards/session/ShardIdResolver.java 2007-07-11 23:03:33 UTC (rev 12755)
+++ shards/trunk/src/java/org/hibernate/shards/session/ShardIdResolver.java 2007-07-12 04:17:22 UTC (rev 12756)
@@ -18,8 +18,8 @@
package org.hibernate.shards.session;
+import org.hibernate.shards.Shard;
import org.hibernate.shards.ShardId;
-import org.hibernate.shards.Shard;
import java.util.List;
Modified: shards/trunk/src/java/org/hibernate/shards/session/ShardedSession.java
===================================================================
--- shards/trunk/src/java/org/hibernate/shards/session/ShardedSession.java 2007-07-11 23:03:33 UTC (rev 12755)
+++ shards/trunk/src/java/org/hibernate/shards/session/ShardedSession.java 2007-07-12 04:17:22 UTC (rev 12756)
@@ -18,11 +18,10 @@
package org.hibernate.shards.session;
+import org.hibernate.classic.Session;
import org.hibernate.shards.ShardId;
-import org.hibernate.classic.Session;
-
/**
* The main runtime inteface between Java application and Hibernate Shards.<br>
* ShardedSession represents a logical transaction that might be spanning
Modified: shards/trunk/src/java/org/hibernate/shards/session/ShardedSessionFactoryImpl.java
===================================================================
--- shards/trunk/src/java/org/hibernate/shards/session/ShardedSessionFactoryImpl.java 2007-07-11 23:03:33 UTC (rev 12755)
+++ shards/trunk/src/java/org/hibernate/shards/session/ShardedSessionFactoryImpl.java 2007-07-12 04:17:22 UTC (rev 12756)
@@ -20,7 +20,12 @@
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
-import org.hibernate.*;
+import org.hibernate.ConnectionReleaseMode;
+import org.hibernate.HibernateException;
+import org.hibernate.Interceptor;
+import org.hibernate.MappingException;
+import org.hibernate.SessionFactory;
+import org.hibernate.StatelessSession;
import org.hibernate.cache.Cache;
import org.hibernate.cache.QueryCache;
import org.hibernate.cache.UpdateTimestampsCache;
@@ -29,7 +34,12 @@
import org.hibernate.connection.ConnectionProvider;
import org.hibernate.dialect.Dialect;
import org.hibernate.dialect.function.SQLFunctionRegistry;
-import org.hibernate.engine.*;
+import org.hibernate.engine.FilterDefinition;
+import org.hibernate.engine.NamedQueryDefinition;
+import org.hibernate.engine.NamedSQLQueryDefinition;
+import org.hibernate.engine.ResultSetMappingDefinition;
+import org.hibernate.engine.SessionFactoryImplementor;
+import org.hibernate.engine.SessionImplementor;
import org.hibernate.engine.query.QueryPlanCache;
import org.hibernate.exception.SQLExceptionConverter;
import org.hibernate.id.IdentifierGenerator;
@@ -43,7 +53,11 @@
import org.hibernate.shards.id.GeneratorRequiringControlSessionProvider;
import org.hibernate.shards.strategy.ShardStrategy;
import org.hibernate.shards.strategy.ShardStrategyFactory;
-import org.hibernate.shards.util.*;
+import org.hibernate.shards.util.Iterables;
+import org.hibernate.shards.util.Lists;
+import org.hibernate.shards.util.Maps;
+import org.hibernate.shards.util.Preconditions;
+import org.hibernate.shards.util.Sets;
import org.hibernate.stat.Statistics;
import org.hibernate.stat.StatisticsImpl;
import org.hibernate.stat.StatisticsImplementor;
Modified: shards/trunk/src/java/org/hibernate/shards/session/ShardedSessionImpl.java
===================================================================
--- shards/trunk/src/java/org/hibernate/shards/session/ShardedSessionImpl.java 2007-07-11 23:03:33 UTC (rev 12755)
+++ shards/trunk/src/java/org/hibernate/shards/session/ShardedSessionImpl.java 2007-07-12 04:17:22 UTC (rev 12756)
@@ -20,33 +20,66 @@
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
-import org.hibernate.*;
+import org.hibernate.CacheMode;
+import org.hibernate.Criteria;
+import org.hibernate.EntityMode;
+import org.hibernate.Filter;
+import org.hibernate.FlushMode;
+import org.hibernate.HibernateException;
+import org.hibernate.Interceptor;
+import org.hibernate.LockMode;
+import org.hibernate.Query;
+import org.hibernate.ReplicationMode;
+import org.hibernate.SQLQuery;
+import org.hibernate.SessionException;
+import org.hibernate.Transaction;
+import org.hibernate.TransientObjectException;
+import org.hibernate.UnresolvableObjectException;
import org.hibernate.classic.Session;
import org.hibernate.engine.SessionFactoryImplementor;
import org.hibernate.id.IdentifierGenerator;
import org.hibernate.metadata.ClassMetadata;
import org.hibernate.proxy.HibernateProxy;
-import org.hibernate.shards.*;
+import org.hibernate.shards.CrossShardAssociationException;
+import org.hibernate.shards.Shard;
+import org.hibernate.shards.ShardId;
+import org.hibernate.shards.ShardImpl;
+import org.hibernate.shards.ShardOperation;
+import org.hibernate.shards.ShardedTransaction;
import org.hibernate.shards.criteria.CriteriaFactoryImpl;
import org.hibernate.shards.criteria.CriteriaId;
import org.hibernate.shards.criteria.ShardedCriteriaImpl;
import org.hibernate.shards.engine.ShardedSessionFactoryImplementor;
import org.hibernate.shards.engine.ShardedSessionImplementor;
import org.hibernate.shards.id.ShardEncodingIdentifierGenerator;
-import org.hibernate.shards.query.*;
+import org.hibernate.shards.query.AdHocQueryFactoryImpl;
+import org.hibernate.shards.query.ExitOperationsQueryCollector;
+import org.hibernate.shards.query.NamedQueryFactoryImpl;
+import org.hibernate.shards.query.QueryId;
+import org.hibernate.shards.query.ShardedQueryImpl;
import org.hibernate.shards.stat.ShardedSessionStatistics;
import org.hibernate.shards.strategy.ShardStrategy;
import org.hibernate.shards.strategy.exit.FirstNonNullResultExitStrategy;
import org.hibernate.shards.strategy.selection.ShardResolutionStrategyData;
import org.hibernate.shards.strategy.selection.ShardResolutionStrategyDataImpl;
import org.hibernate.shards.transaction.ShardedTransactionImpl;
-import org.hibernate.shards.util.*;
+import org.hibernate.shards.util.Iterables;
+import org.hibernate.shards.util.Lists;
+import org.hibernate.shards.util.Maps;
+import org.hibernate.shards.util.Pair;
+import org.hibernate.shards.util.Preconditions;
+import org.hibernate.shards.util.Sets;
import org.hibernate.stat.SessionStatistics;
import org.hibernate.type.Type;
import java.io.Serializable;
import java.sql.Connection;
-import java.util.*;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
/**
* Concrete implementation of a ShardedSession, and also the central component of
Modified: shards/trunk/src/java/org/hibernate/shards/session/SubsetShardedSessionFactoryImpl.java
===================================================================
--- shards/trunk/src/java/org/hibernate/shards/session/SubsetShardedSessionFactoryImpl.java 2007-07-11 23:03:33 UTC (rev 12755)
+++ shards/trunk/src/java/org/hibernate/shards/session/SubsetShardedSessionFactoryImpl.java 2007-07-12 04:17:22 UTC (rev 12756)
@@ -18,15 +18,14 @@
package org.hibernate.shards.session;
+import org.hibernate.HibernateException;
+import org.hibernate.engine.SessionFactoryImplementor;
import org.hibernate.shards.ShardId;
import org.hibernate.shards.strategy.ShardStrategyFactory;
-import org.hibernate.engine.SessionFactoryImplementor;
-import org.hibernate.HibernateException;
-
import java.util.List;
-import java.util.Set;
import java.util.Map;
+import java.util.Set;
/**
* This class extends ShardedSessionFactoryImpl and is constructed by supplying
Modified: shards/trunk/src/java/org/hibernate/shards/strategy/access/ParallelShardOperationCallable.java
===================================================================
--- shards/trunk/src/java/org/hibernate/shards/strategy/access/ParallelShardOperationCallable.java 2007-07-11 23:03:33 UTC (rev 12755)
+++ shards/trunk/src/java/org/hibernate/shards/strategy/access/ParallelShardOperationCallable.java 2007-07-12 04:17:22 UTC (rev 12756)
@@ -18,14 +18,13 @@
package org.hibernate.shards.strategy.access;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.hibernate.HibernateException;
import org.hibernate.shards.Shard;
import org.hibernate.shards.ShardOperation;
import org.hibernate.shards.strategy.exit.ExitStrategy;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.hibernate.HibernateException;
-
import java.util.List;
import java.util.concurrent.Callable;
import java.util.concurrent.CountDownLatch;
Modified: shards/trunk/src/java/org/hibernate/shards/strategy/access/StartAwareFutureTask.java
===================================================================
--- shards/trunk/src/java/org/hibernate/shards/strategy/access/StartAwareFutureTask.java 2007-07-11 23:03:33 UTC (rev 12755)
+++ shards/trunk/src/java/org/hibernate/shards/strategy/access/StartAwareFutureTask.java 2007-07-12 04:17:22 UTC (rev 12756)
@@ -21,8 +21,8 @@
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
+import java.util.concurrent.Callable;
import java.util.concurrent.FutureTask;
-import java.util.concurrent.Callable;
/**
* Extension of FutureTask that provides slightly different cancel()
Modified: shards/trunk/src/java/org/hibernate/shards/strategy/exit/AggregateExitOperation.java
===================================================================
--- shards/trunk/src/java/org/hibernate/shards/strategy/exit/AggregateExitOperation.java 2007-07-11 23:03:33 UTC (rev 12755)
+++ shards/trunk/src/java/org/hibernate/shards/strategy/exit/AggregateExitOperation.java 2007-07-12 04:17:22 UTC (rev 12756)
@@ -18,12 +18,11 @@
package org.hibernate.shards.strategy.exit;
-import org.hibernate.shards.util.Preconditions;
-
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.hibernate.criterion.AggregateProjection;
import org.hibernate.engine.SessionFactoryImplementor;
+import org.hibernate.shards.util.Preconditions;
import java.math.BigDecimal;
import java.util.Collections;
Modified: shards/trunk/src/java/org/hibernate/shards/strategy/exit/CountExitOperation.java
===================================================================
--- shards/trunk/src/java/org/hibernate/shards/strategy/exit/CountExitOperation.java 2007-07-11 23:03:33 UTC (rev 12755)
+++ shards/trunk/src/java/org/hibernate/shards/strategy/exit/CountExitOperation.java 2007-07-12 04:17:22 UTC (rev 12756)
@@ -18,12 +18,11 @@
package org.hibernate.shards.strategy.exit;
-import org.hibernate.shards.util.Preconditions;
-
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.hibernate.criterion.CountProjection;
import org.hibernate.criterion.Projection;
+import org.hibernate.shards.util.Preconditions;
import java.util.List;
Modified: shards/trunk/src/java/org/hibernate/shards/strategy/exit/DistinctExitOperation.java
===================================================================
--- shards/trunk/src/java/org/hibernate/shards/strategy/exit/DistinctExitOperation.java 2007-07-11 23:03:33 UTC (rev 12755)
+++ shards/trunk/src/java/org/hibernate/shards/strategy/exit/DistinctExitOperation.java 2007-07-12 04:17:22 UTC (rev 12756)
@@ -18,11 +18,10 @@
package org.hibernate.shards.strategy.exit;
+import org.hibernate.criterion.Projection;
import org.hibernate.shards.util.Lists;
import org.hibernate.shards.util.Sets;
-import org.hibernate.criterion.Projection;
-
import java.util.List;
import java.util.Set;
Modified: shards/trunk/src/java/org/hibernate/shards/strategy/exit/FirstResultExitOperation.java
===================================================================
--- shards/trunk/src/java/org/hibernate/shards/strategy/exit/FirstResultExitOperation.java 2007-07-11 23:03:33 UTC (rev 12755)
+++ shards/trunk/src/java/org/hibernate/shards/strategy/exit/FirstResultExitOperation.java 2007-07-12 04:17:22 UTC (rev 12756)
@@ -18,8 +18,8 @@
package org.hibernate.shards.strategy.exit;
+import java.util.Collections;
import java.util.List;
-import java.util.Collections;
/**
* @author maulik(a)google.com (Maulik Shah)
Modified: shards/trunk/src/java/org/hibernate/shards/strategy/exit/OrderExitOperation.java
===================================================================
--- shards/trunk/src/java/org/hibernate/shards/strategy/exit/OrderExitOperation.java 2007-07-11 23:03:33 UTC (rev 12755)
+++ shards/trunk/src/java/org/hibernate/shards/strategy/exit/OrderExitOperation.java 2007-07-12 04:17:22 UTC (rev 12756)
@@ -18,10 +18,9 @@
package org.hibernate.shards.strategy.exit;
-import org.hibernate.shards.util.Preconditions;
-
import org.hibernate.criterion.Order;
import org.hibernate.engine.SessionFactoryImplementor;
+import org.hibernate.shards.util.Preconditions;
import java.util.Collections;
import java.util.Comparator;
Modified: shards/trunk/src/java/org/hibernate/shards/strategy/exit/RowCountExitOperation.java
===================================================================
--- shards/trunk/src/java/org/hibernate/shards/strategy/exit/RowCountExitOperation.java 2007-07-11 23:03:33 UTC (rev 12755)
+++ shards/trunk/src/java/org/hibernate/shards/strategy/exit/RowCountExitOperation.java 2007-07-12 04:17:22 UTC (rev 12756)
@@ -18,10 +18,9 @@
package org.hibernate.shards.strategy.exit;
-import org.hibernate.shards.util.Preconditions;
-
import org.hibernate.criterion.Projection;
import org.hibernate.criterion.RowCountProjection;
+import org.hibernate.shards.util.Preconditions;
import java.util.Collections;
import java.util.List;
Modified: shards/trunk/src/java/org/hibernate/shards/strategy/exit/ShardedAvgExitOperation.java
===================================================================
--- shards/trunk/src/java/org/hibernate/shards/strategy/exit/ShardedAvgExitOperation.java 2007-07-11 23:03:33 UTC (rev 12755)
+++ shards/trunk/src/java/org/hibernate/shards/strategy/exit/ShardedAvgExitOperation.java 2007-07-12 04:17:22 UTC (rev 12756)
@@ -18,12 +18,11 @@
package org.hibernate.shards.strategy.exit;
-import org.hibernate.shards.util.Lists;
-import org.hibernate.shards.util.Pair;
-
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.hibernate.criterion.Projection;
+import org.hibernate.shards.util.Lists;
+import org.hibernate.shards.util.Pair;
import java.math.BigDecimal;
import java.util.List;
Modified: shards/trunk/src/java/org/hibernate/shards/transaction/ShardedTransactionImpl.java
===================================================================
--- shards/trunk/src/java/org/hibernate/shards/transaction/ShardedTransactionImpl.java 2007-07-11 23:03:33 UTC (rev 12755)
+++ shards/trunk/src/java/org/hibernate/shards/transaction/ShardedTransactionImpl.java 2007-07-12 04:17:22 UTC (rev 12756)
@@ -31,13 +31,12 @@
import org.hibernate.shards.session.SetupTransactionOpenSessionEvent;
import org.hibernate.shards.util.Lists;
+import javax.transaction.Status;
+import javax.transaction.Synchronization;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
-import javax.transaction.Status;
-import javax.transaction.Synchronization;
-
/**
* @author tomislav(a)google.com (Tomislav Nad)
*/
Modified: shards/trunk/src/java/org/hibernate/shards/util/InterceptorDecorator.java
===================================================================
--- shards/trunk/src/java/org/hibernate/shards/util/InterceptorDecorator.java 2007-07-11 23:03:33 UTC (rev 12755)
+++ shards/trunk/src/java/org/hibernate/shards/util/InterceptorDecorator.java 2007-07-12 04:17:22 UTC (rev 12756)
@@ -18,9 +18,9 @@
package org.hibernate.shards.util;
-import org.hibernate.Interceptor;
import org.hibernate.CallbackException;
import org.hibernate.EntityMode;
+import org.hibernate.Interceptor;
import org.hibernate.Transaction;
import org.hibernate.type.Type;
Modified: shards/trunk/src/test/org/hibernate/shards/NonPermutedTests.java
===================================================================
--- shards/trunk/src/test/org/hibernate/shards/NonPermutedTests.java 2007-07-11 23:03:33 UTC (rev 12755)
+++ shards/trunk/src/test/org/hibernate/shards/NonPermutedTests.java 2007-07-12 04:17:22 UTC (rev 12756)
@@ -18,7 +18,6 @@
package org.hibernate.shards;
import junit.framework.TestCase;
-
import org.hibernate.shards.util.Lists;
import java.util.Collections;
Modified: shards/trunk/src/test/org/hibernate/shards/ShardImplTest.java
===================================================================
--- shards/trunk/src/test/org/hibernate/shards/ShardImplTest.java 2007-07-11 23:03:33 UTC (rev 12755)
+++ shards/trunk/src/test/org/hibernate/shards/ShardImplTest.java 2007-07-12 04:17:22 UTC (rev 12756)
@@ -19,10 +19,28 @@
package org.hibernate.shards;
import junit.framework.TestCase;
-import org.hibernate.*;
-import org.hibernate.shards.criteria.*;
-import org.hibernate.shards.defaultmock.*;
-import org.hibernate.shards.query.*;
+import org.hibernate.Criteria;
+import org.hibernate.HibernateException;
+import org.hibernate.Interceptor;
+import org.hibernate.Query;
+import org.hibernate.Session;
+import org.hibernate.shards.criteria.CriteriaEvent;
+import org.hibernate.shards.criteria.CriteriaEventDefaultMock;
+import org.hibernate.shards.criteria.CriteriaFactory;
+import org.hibernate.shards.criteria.CriteriaFactoryDefaultMock;
+import org.hibernate.shards.criteria.CriteriaId;
+import org.hibernate.shards.criteria.ShardedCriteriaDefaultMock;
+import org.hibernate.shards.defaultmock.CriteriaDefaultMock;
+import org.hibernate.shards.defaultmock.InterceptorDefaultMock;
+import org.hibernate.shards.defaultmock.QueryDefaultMock;
+import org.hibernate.shards.defaultmock.SessionDefaultMock;
+import org.hibernate.shards.defaultmock.SessionFactoryDefaultMock;
+import org.hibernate.shards.query.QueryEvent;
+import org.hibernate.shards.query.QueryEventDefaultMock;
+import org.hibernate.shards.query.QueryFactory;
+import org.hibernate.shards.query.QueryFactoryDefaultMock;
+import org.hibernate.shards.query.QueryId;
+import org.hibernate.shards.query.ShardedQueryDefaultMock;
import org.hibernate.shards.session.OpenSessionEvent;
import org.hibernate.shards.session.OpenSessionEventDefaultMock;
import org.hibernate.shards.util.Sets;
Modified: shards/trunk/src/test/org/hibernate/shards/ShardedConfigurationTest.java
===================================================================
--- shards/trunk/src/test/org/hibernate/shards/ShardedConfigurationTest.java 2007-07-11 23:03:33 UTC (rev 12755)
+++ shards/trunk/src/test/org/hibernate/shards/ShardedConfigurationTest.java 2007-07-12 04:17:22 UTC (rev 12756)
@@ -19,7 +19,6 @@
package org.hibernate.shards;
import junit.framework.TestCase;
-
import org.hibernate.SessionFactory;
import org.hibernate.cfg.Configuration;
import org.hibernate.cfg.Environment;
Modified: shards/trunk/src/test/org/hibernate/shards/ShardedSessionFactoryDefaultMock.java
===================================================================
--- shards/trunk/src/test/org/hibernate/shards/ShardedSessionFactoryDefaultMock.java 2007-07-11 23:03:33 UTC (rev 12755)
+++ shards/trunk/src/test/org/hibernate/shards/ShardedSessionFactoryDefaultMock.java 2007-07-12 04:17:22 UTC (rev 12756)
@@ -18,7 +18,12 @@
package org.hibernate.shards;
-import org.hibernate.*;
+import org.hibernate.ConnectionReleaseMode;
+import org.hibernate.HibernateException;
+import org.hibernate.Interceptor;
+import org.hibernate.MappingException;
+import org.hibernate.SessionFactory;
+import org.hibernate.StatelessSession;
import org.hibernate.cache.Cache;
import org.hibernate.cache.QueryCache;
import org.hibernate.cache.UpdateTimestampsCache;
@@ -27,7 +32,12 @@
import org.hibernate.connection.ConnectionProvider;
import org.hibernate.dialect.Dialect;
import org.hibernate.dialect.function.SQLFunctionRegistry;
-import org.hibernate.engine.*;
+import org.hibernate.engine.FilterDefinition;
+import org.hibernate.engine.NamedQueryDefinition;
+import org.hibernate.engine.NamedSQLQueryDefinition;
+import org.hibernate.engine.ResultSetMappingDefinition;
+import org.hibernate.engine.SessionFactoryImplementor;
+import org.hibernate.engine.SessionImplementor;
import org.hibernate.engine.query.QueryPlanCache;
import org.hibernate.exception.SQLExceptionConverter;
import org.hibernate.id.IdentifierGenerator;
Modified: shards/trunk/src/test/org/hibernate/shards/ShardedTransactionDefaultMock.java
===================================================================
--- shards/trunk/src/test/org/hibernate/shards/ShardedTransactionDefaultMock.java 2007-07-11 23:03:33 UTC (rev 12755)
+++ shards/trunk/src/test/org/hibernate/shards/ShardedTransactionDefaultMock.java 2007-07-12 04:17:22 UTC (rev 12756)
@@ -18,8 +18,8 @@
package org.hibernate.shards;
+import org.hibernate.HibernateException;
import org.hibernate.Session;
-import org.hibernate.HibernateException;
import javax.transaction.Synchronization;
Modified: shards/trunk/src/test/org/hibernate/shards/criteria/CreateSubcriteriaEventTest.java
===================================================================
--- shards/trunk/src/test/org/hibernate/shards/criteria/CreateSubcriteriaEventTest.java 2007-07-11 23:03:33 UTC (rev 12755)
+++ shards/trunk/src/test/org/hibernate/shards/criteria/CreateSubcriteriaEventTest.java 2007-07-12 04:17:22 UTC (rev 12756)
@@ -19,7 +19,6 @@
package org.hibernate.shards.criteria;
import junit.framework.TestCase;
-
import org.hibernate.Criteria;
import org.hibernate.shards.defaultmock.CriteriaDefaultMock;
Modified: shards/trunk/src/test/org/hibernate/shards/criteria/ShardedCriteriaDefaultMock.java
===================================================================
--- shards/trunk/src/test/org/hibernate/shards/criteria/ShardedCriteriaDefaultMock.java 2007-07-11 23:03:33 UTC (rev 12755)
+++ shards/trunk/src/test/org/hibernate/shards/criteria/ShardedCriteriaDefaultMock.java 2007-07-12 04:17:22 UTC (rev 12756)
@@ -18,7 +18,14 @@
package org.hibernate.shards.criteria;
-import org.hibernate.*;
+import org.hibernate.CacheMode;
+import org.hibernate.Criteria;
+import org.hibernate.FetchMode;
+import org.hibernate.FlushMode;
+import org.hibernate.HibernateException;
+import org.hibernate.LockMode;
+import org.hibernate.ScrollMode;
+import org.hibernate.ScrollableResults;
import org.hibernate.criterion.Criterion;
import org.hibernate.criterion.Order;
import org.hibernate.criterion.Projection;
Modified: shards/trunk/src/test/org/hibernate/shards/criteria/ShardedSubcriteriaImplTest.java
===================================================================
--- shards/trunk/src/test/org/hibernate/shards/criteria/ShardedSubcriteriaImplTest.java 2007-07-11 23:03:33 UTC (rev 12755)
+++ shards/trunk/src/test/org/hibernate/shards/criteria/ShardedSubcriteriaImplTest.java 2007-07-12 04:17:22 UTC (rev 12756)
@@ -18,19 +18,17 @@
package org.hibernate.shards.criteria;
-import org.hibernate.shards.defaultmock.CriteriaDefaultMock;
-import org.hibernate.shards.Shard;
-import org.hibernate.shards.ShardDefaultMock;
-import org.hibernate.shards.ShardId;
-import org.hibernate.shards.util.Sets;
-import org.hibernate.shards.util.Lists;
-
import junit.framework.TestCase;
-
import org.hibernate.Criteria;
import org.hibernate.HibernateException;
import org.hibernate.ScrollMode;
import org.hibernate.ScrollableResults;
+import org.hibernate.shards.Shard;
+import org.hibernate.shards.ShardDefaultMock;
+import org.hibernate.shards.ShardId;
+import org.hibernate.shards.defaultmock.CriteriaDefaultMock;
+import org.hibernate.shards.util.Lists;
+import org.hibernate.shards.util.Sets;
import java.util.List;
import java.util.Set;
Modified: shards/trunk/src/test/org/hibernate/shards/defaultmock/ClassMetadataDefaultMock.java
===================================================================
--- shards/trunk/src/test/org/hibernate/shards/defaultmock/ClassMetadataDefaultMock.java 2007-07-11 23:03:33 UTC (rev 12755)
+++ shards/trunk/src/test/org/hibernate/shards/defaultmock/ClassMetadataDefaultMock.java 2007-07-12 04:17:22 UTC (rev 12756)
@@ -18,14 +18,14 @@
package org.hibernate.shards.defaultmock;
+import org.hibernate.EntityMode;
+import org.hibernate.HibernateException;
+import org.hibernate.engine.SessionImplementor;
import org.hibernate.metadata.ClassMetadata;
import org.hibernate.type.Type;
-import org.hibernate.HibernateException;
-import org.hibernate.EntityMode;
-import org.hibernate.engine.SessionImplementor;
+import java.io.Serializable;
import java.util.Map;
-import java.io.Serializable;
/**
* @author maxr(a)google.com (Max Ross)
Modified: shards/trunk/src/test/org/hibernate/shards/defaultmock/CriteriaDefaultMock.java
===================================================================
--- shards/trunk/src/test/org/hibernate/shards/defaultmock/CriteriaDefaultMock.java 2007-07-11 23:03:33 UTC (rev 12755)
+++ shards/trunk/src/test/org/hibernate/shards/defaultmock/CriteriaDefaultMock.java 2007-07-12 04:17:22 UTC (rev 12756)
@@ -18,7 +18,14 @@
package org.hibernate.shards.defaultmock;
-import org.hibernate.*;
+import org.hibernate.CacheMode;
+import org.hibernate.Criteria;
+import org.hibernate.FetchMode;
+import org.hibernate.FlushMode;
+import org.hibernate.HibernateException;
+import org.hibernate.LockMode;
+import org.hibernate.ScrollMode;
+import org.hibernate.ScrollableResults;
import org.hibernate.criterion.Criterion;
import org.hibernate.criterion.Order;
import org.hibernate.criterion.Projection;
Modified: shards/trunk/src/test/org/hibernate/shards/defaultmock/EntityPersisterDefaultMock.java
===================================================================
--- shards/trunk/src/test/org/hibernate/shards/defaultmock/EntityPersisterDefaultMock.java 2007-07-11 23:03:33 UTC (rev 12755)
+++ shards/trunk/src/test/org/hibernate/shards/defaultmock/EntityPersisterDefaultMock.java 2007-07-12 04:17:22 UTC (rev 12756)
@@ -18,26 +18,26 @@
package org.hibernate.shards.defaultmock;
-import org.hibernate.persister.entity.EntityPersister;
-import org.hibernate.MappingException;
+import org.hibernate.EntityMode;
import org.hibernate.HibernateException;
import org.hibernate.LockMode;
-import org.hibernate.EntityMode;
-import org.hibernate.tuple.entity.EntityMetamodel;
-import org.hibernate.metadata.ClassMetadata;
+import org.hibernate.MappingException;
import org.hibernate.cache.CacheConcurrencyStrategy;
import org.hibernate.cache.entry.CacheEntryStructure;
+import org.hibernate.engine.CascadeStyle;
+import org.hibernate.engine.SessionFactoryImplementor;
+import org.hibernate.engine.SessionImplementor;
+import org.hibernate.engine.ValueInclusion;
import org.hibernate.id.IdentifierGenerator;
+import org.hibernate.metadata.ClassMetadata;
+import org.hibernate.persister.entity.EntityPersister;
+import org.hibernate.tuple.entity.EntityMetamodel;
import org.hibernate.type.Type;
import org.hibernate.type.VersionType;
-import org.hibernate.engine.SessionFactoryImplementor;
-import org.hibernate.engine.SessionImplementor;
-import org.hibernate.engine.CascadeStyle;
-import org.hibernate.engine.ValueInclusion;
import java.io.Serializable;
+import java.util.Comparator;
import java.util.Map;
-import java.util.Comparator;
/**
* @author maulik(a)google.com (Maulik Shah)
Modified: shards/trunk/src/test/org/hibernate/shards/defaultmock/QueryDefaultMock.java
===================================================================
--- shards/trunk/src/test/org/hibernate/shards/defaultmock/QueryDefaultMock.java 2007-07-11 23:03:33 UTC (rev 12755)
+++ shards/trunk/src/test/org/hibernate/shards/defaultmock/QueryDefaultMock.java 2007-07-12 04:17:22 UTC (rev 12756)
@@ -18,14 +18,26 @@
package org.hibernate.shards.defaultmock;
-import org.hibernate.*;
+import org.hibernate.CacheMode;
+import org.hibernate.FlushMode;
+import org.hibernate.HibernateException;
+import org.hibernate.LockMode;
+import org.hibernate.Query;
+import org.hibernate.ScrollMode;
+import org.hibernate.ScrollableResults;
import org.hibernate.transform.ResultTransformer;
import org.hibernate.type.Type;
-import java.util.*;
import java.io.Serializable;
import java.math.BigDecimal;
import java.math.BigInteger;
+import java.util.Calendar;
+import java.util.Collection;
+import java.util.Date;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Locale;
+import java.util.Map;
/**
* @author maulik(a)google.com (Maulik Shah)
Modified: shards/trunk/src/test/org/hibernate/shards/defaultmock/SessionFactoryDefaultMock.java
===================================================================
--- shards/trunk/src/test/org/hibernate/shards/defaultmock/SessionFactoryDefaultMock.java 2007-07-11 23:03:33 UTC (rev 12755)
+++ shards/trunk/src/test/org/hibernate/shards/defaultmock/SessionFactoryDefaultMock.java 2007-07-12 04:17:22 UTC (rev 12756)
@@ -18,7 +18,11 @@
package org.hibernate.shards.defaultmock;
-import org.hibernate.*;
+import org.hibernate.ConnectionReleaseMode;
+import org.hibernate.HibernateException;
+import org.hibernate.Interceptor;
+import org.hibernate.MappingException;
+import org.hibernate.StatelessSession;
import org.hibernate.cache.Cache;
import org.hibernate.cache.QueryCache;
import org.hibernate.cache.UpdateTimestampsCache;
@@ -27,7 +31,11 @@
import org.hibernate.connection.ConnectionProvider;
import org.hibernate.dialect.Dialect;
import org.hibernate.dialect.function.SQLFunctionRegistry;
-import org.hibernate.engine.*;
+import org.hibernate.engine.FilterDefinition;
+import org.hibernate.engine.NamedQueryDefinition;
+import org.hibernate.engine.NamedSQLQueryDefinition;
+import org.hibernate.engine.ResultSetMappingDefinition;
+import org.hibernate.engine.SessionFactoryImplementor;
import org.hibernate.engine.query.QueryPlanCache;
import org.hibernate.exception.SQLExceptionConverter;
import org.hibernate.id.IdentifierGenerator;
Modified: shards/trunk/src/test/org/hibernate/shards/defaultmock/SessionImplementorDefaultMock.java
===================================================================
--- shards/trunk/src/test/org/hibernate/shards/defaultmock/SessionImplementorDefaultMock.java 2007-07-11 23:03:33 UTC (rev 12755)
+++ shards/trunk/src/test/org/hibernate/shards/defaultmock/SessionImplementorDefaultMock.java 2007-07-12 04:17:22 UTC (rev 12756)
@@ -18,35 +18,35 @@
package org.hibernate.shards.defaultmock;
-import org.hibernate.engine.SessionImplementor;
-import org.hibernate.engine.SessionFactoryImplementor;
-import org.hibernate.engine.QueryParameters;
+import org.hibernate.CacheMode;
+import org.hibernate.EntityMode;
+import org.hibernate.FlushMode;
+import org.hibernate.HibernateException;
+import org.hibernate.Interceptor;
+import org.hibernate.Query;
+import org.hibernate.ScrollMode;
+import org.hibernate.ScrollableResults;
+import org.hibernate.Transaction;
+import org.hibernate.collection.PersistentCollection;
import org.hibernate.engine.EntityKey;
import org.hibernate.engine.PersistenceContext;
+import org.hibernate.engine.QueryParameters;
+import org.hibernate.engine.SessionFactoryImplementor;
+import org.hibernate.engine.SessionImplementor;
import org.hibernate.engine.query.sql.NativeSQLQuerySpecification;
-import org.hibernate.Interceptor;
-import org.hibernate.HibernateException;
-import org.hibernate.ScrollableResults;
-import org.hibernate.ScrollMode;
-import org.hibernate.Transaction;
-import org.hibernate.EntityMode;
-import org.hibernate.CacheMode;
-import org.hibernate.FlushMode;
-import org.hibernate.Query;
import org.hibernate.event.EventListeners;
-import org.hibernate.type.Type;
-import org.hibernate.loader.custom.CustomQuery;
-import org.hibernate.persister.entity.EntityPersister;
import org.hibernate.impl.CriteriaImpl;
import org.hibernate.jdbc.Batcher;
import org.hibernate.jdbc.JDBCContext;
-import org.hibernate.collection.PersistentCollection;
+import org.hibernate.loader.custom.CustomQuery;
+import org.hibernate.persister.entity.EntityPersister;
+import org.hibernate.type.Type;
import java.io.Serializable;
+import java.sql.Connection;
+import java.util.Iterator;
import java.util.List;
-import java.util.Iterator;
import java.util.Map;
-import java.sql.Connection;
/**
* @author maxr(a)google.com (Max Ross)
Modified: shards/trunk/src/test/org/hibernate/shards/defaultmock/TypeDefaultMock.java
===================================================================
--- shards/trunk/src/test/org/hibernate/shards/defaultmock/TypeDefaultMock.java 2007-07-11 23:03:33 UTC (rev 12755)
+++ shards/trunk/src/test/org/hibernate/shards/defaultmock/TypeDefaultMock.java 2007-07-12 04:17:22 UTC (rev 12756)
@@ -18,20 +18,20 @@
package org.hibernate.shards.defaultmock;
-import org.hibernate.type.Type;
-import org.hibernate.type.ForeignKeyDirection;
+import org.dom4j.Node;
+import org.hibernate.EntityMode;
+import org.hibernate.HibernateException;
+import org.hibernate.MappingException;
import org.hibernate.engine.Mapping;
import org.hibernate.engine.SessionFactoryImplementor;
import org.hibernate.engine.SessionImplementor;
-import org.hibernate.MappingException;
-import org.hibernate.EntityMode;
-import org.hibernate.HibernateException;
-import org.dom4j.Node;
+import org.hibernate.type.ForeignKeyDirection;
+import org.hibernate.type.Type;
+import java.io.Serializable;
+import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;
-import java.sql.PreparedStatement;
-import java.io.Serializable;
import java.util.Map;
/**
Modified: shards/trunk/src/test/org/hibernate/shards/engine/ShardedSessionImplementorDefaultMock.java
===================================================================
--- shards/trunk/src/test/org/hibernate/shards/engine/ShardedSessionImplementorDefaultMock.java 2007-07-11 23:03:33 UTC (rev 12755)
+++ shards/trunk/src/test/org/hibernate/shards/engine/ShardedSessionImplementorDefaultMock.java 2007-07-12 04:17:22 UTC (rev 12756)
@@ -18,30 +18,29 @@
package org.hibernate.shards.engine;
-import org.hibernate.shards.Shard;
-import org.hibernate.shards.ShardId;
-
-import org.hibernate.HibernateException;
-import org.hibernate.Query;
+import org.hibernate.CacheMode;
+import org.hibernate.Criteria;
import org.hibernate.EntityMode;
+import org.hibernate.Filter;
import org.hibernate.FlushMode;
-import org.hibernate.CacheMode;
-import org.hibernate.SessionFactory;
+import org.hibernate.HibernateException;
import org.hibernate.LockMode;
+import org.hibernate.Query;
import org.hibernate.ReplicationMode;
-import org.hibernate.Transaction;
-import org.hibernate.Criteria;
import org.hibernate.SQLQuery;
-import org.hibernate.Filter;
+import org.hibernate.SessionFactory;
+import org.hibernate.Transaction;
import org.hibernate.classic.Session;
+import org.hibernate.shards.Shard;
+import org.hibernate.shards.ShardId;
import org.hibernate.stat.SessionStatistics;
import org.hibernate.type.Type;
-import java.util.List;
-import java.util.Iterator;
-import java.util.Collection;
import java.io.Serializable;
import java.sql.Connection;
+import java.util.Collection;
+import java.util.Iterator;
+import java.util.List;
/**
* @author tomislav(a)google.com (Tomislav Nad)
Modified: shards/trunk/src/test/org/hibernate/shards/id/ShardedTableHiLoGeneratorTest.java
===================================================================
--- shards/trunk/src/test/org/hibernate/shards/id/ShardedTableHiLoGeneratorTest.java 2007-07-11 23:03:33 UTC (rev 12755)
+++ shards/trunk/src/test/org/hibernate/shards/id/ShardedTableHiLoGeneratorTest.java 2007-07-12 04:17:22 UTC (rev 12756)
@@ -18,12 +18,7 @@
package org.hibernate.shards.id;
-import org.hibernate.shards.defaultmock.SessionDefaultMock;
-import org.hibernate.shards.defaultmock.SessionImplementorDefaultMock;
-import org.hibernate.shards.session.ControlSessionProvider;
-
import junit.framework.TestCase;
-
import org.hibernate.HibernateException;
import org.hibernate.Interceptor;
import org.hibernate.Query;
@@ -43,13 +38,16 @@
import org.hibernate.jdbc.JDBCContext;
import org.hibernate.loader.custom.CustomQuery;
import org.hibernate.persister.entity.EntityPersister;
+import org.hibernate.shards.defaultmock.SessionDefaultMock;
+import org.hibernate.shards.defaultmock.SessionImplementorDefaultMock;
+import org.hibernate.shards.session.ControlSessionProvider;
import org.hibernate.type.Type;
import java.io.Serializable;
+import java.sql.Connection;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
-import java.sql.Connection;
/**
* @author maxr(a)google.com (Max Ross)
Modified: shards/trunk/src/test/org/hibernate/shards/id/ShardedUUIDGeneratorTest.java
===================================================================
--- shards/trunk/src/test/org/hibernate/shards/id/ShardedUUIDGeneratorTest.java 2007-07-11 23:03:33 UTC (rev 12755)
+++ shards/trunk/src/test/org/hibernate/shards/id/ShardedUUIDGeneratorTest.java 2007-07-12 04:17:22 UTC (rev 12756)
@@ -18,11 +18,10 @@
package org.hibernate.shards.id;
+import junit.framework.TestCase;
import org.hibernate.shards.ShardId;
import org.hibernate.shards.session.ShardedSessionImpl;
-import junit.framework.TestCase;
-
import java.io.Serializable;
import java.util.Properties;
Modified: shards/trunk/src/test/org/hibernate/shards/integration/BaseShardingIntegrationTestCase.java
===================================================================
--- shards/trunk/src/test/org/hibernate/shards/integration/BaseShardingIntegrationTestCase.java 2007-07-11 23:03:33 UTC (rev 12755)
+++ shards/trunk/src/test/org/hibernate/shards/integration/BaseShardingIntegrationTestCase.java 2007-07-12 04:17:22 UTC (rev 12756)
@@ -19,7 +19,6 @@
package org.hibernate.shards.integration;
import junit.framework.TestCase;
-
import org.hibernate.Session;
import org.hibernate.cfg.Configuration;
import org.hibernate.shards.ShardId;
Modified: shards/trunk/src/test/org/hibernate/shards/integration/MemoryLeakPlugger.java
===================================================================
--- shards/trunk/src/test/org/hibernate/shards/integration/MemoryLeakPlugger.java 2007-07-11 23:03:33 UTC (rev 12755)
+++ shards/trunk/src/test/org/hibernate/shards/integration/MemoryLeakPlugger.java 2007-07-12 04:17:22 UTC (rev 12756)
@@ -19,7 +19,6 @@
package org.hibernate.shards.integration;
import net.sf.cglib.proxy.Callback;
-
import org.hibernate.engine.StatefulPersistenceContext;
import org.hibernate.impl.SessionImpl;
import org.hibernate.shards.Shard;
Modified: shards/trunk/src/test/org/hibernate/shards/integration/PermutedIntegrationTests.java
===================================================================
--- shards/trunk/src/test/org/hibernate/shards/integration/PermutedIntegrationTests.java 2007-07-11 23:03:33 UTC (rev 12755)
+++ shards/trunk/src/test/org/hibernate/shards/integration/PermutedIntegrationTests.java 2007-07-12 04:17:22 UTC (rev 12756)
@@ -18,6 +18,9 @@
package org.hibernate.shards.integration;
+import junit.framework.Test;
+import junit.framework.TestCase;
+import junit.framework.TestSuite;
import org.hibernate.shards.integration.id.IdGeneratorPermutedIntegrationTest;
import org.hibernate.shards.integration.model.InterceptorBehaviorPermutedIntegrationTest;
import org.hibernate.shards.integration.model.ModelCriteriaPermutedIntegrationTest;
@@ -25,10 +28,6 @@
import org.hibernate.shards.integration.model.ModelQueryPermutedIntegrationTest;
import org.hibernate.shards.util.Lists;
-import junit.framework.Test;
-import junit.framework.TestCase;
-import junit.framework.TestSuite;
-
import java.util.ArrayList;
import java.util.Collections;
import java.util.Enumeration;
Modified: shards/trunk/src/test/org/hibernate/shards/integration/id/IdGeneratorPermutedIntegrationTest.java
===================================================================
--- shards/trunk/src/test/org/hibernate/shards/integration/id/IdGeneratorPermutedIntegrationTest.java 2007-07-11 23:03:33 UTC (rev 12755)
+++ shards/trunk/src/test/org/hibernate/shards/integration/id/IdGeneratorPermutedIntegrationTest.java 2007-07-12 04:17:22 UTC (rev 12756)
@@ -23,7 +23,6 @@
import org.hibernate.shards.model.Building;
import org.hibernate.shards.util.Lists;
-
import java.util.List;
/**
Modified: shards/trunk/src/test/org/hibernate/shards/integration/model/InterceptorBehaviorPermutedIntegrationTest.java
===================================================================
--- shards/trunk/src/test/org/hibernate/shards/integration/model/InterceptorBehaviorPermutedIntegrationTest.java 2007-07-11 23:03:33 UTC (rev 12755)
+++ shards/trunk/src/test/org/hibernate/shards/integration/model/InterceptorBehaviorPermutedIntegrationTest.java 2007-07-12 04:17:22 UTC (rev 12756)
@@ -18,19 +18,18 @@
package org.hibernate.shards.integration.model;
-import org.hibernate.shards.integration.BaseShardingIntegrationTestCase;
-import org.hibernate.shards.model.Building;
-import org.hibernate.shards.session.BaseStatefulInterceptorFactory;
-import org.hibernate.shards.session.ShardedSession;
-import org.hibernate.shards.session.RequiresSession;
-import org.hibernate.shards.util.Lists;
-
import org.hibernate.CallbackException;
import org.hibernate.EmptyInterceptor;
import org.hibernate.Interceptor;
-import org.hibernate.TransactionException;
import org.hibernate.Session;
+import org.hibernate.TransactionException;
import org.hibernate.impl.SessionImpl;
+import org.hibernate.shards.integration.BaseShardingIntegrationTestCase;
+import org.hibernate.shards.model.Building;
+import org.hibernate.shards.session.BaseStatefulInterceptorFactory;
+import org.hibernate.shards.session.RequiresSession;
+import org.hibernate.shards.session.ShardedSession;
+import org.hibernate.shards.util.Lists;
import org.hibernate.type.Type;
import java.io.Serializable;
Modified: shards/trunk/src/test/org/hibernate/shards/integration/model/MemoryLeakTest.java
===================================================================
--- shards/trunk/src/test/org/hibernate/shards/integration/model/MemoryLeakTest.java 2007-07-11 23:03:33 UTC (rev 12755)
+++ shards/trunk/src/test/org/hibernate/shards/integration/model/MemoryLeakTest.java 2007-07-12 04:17:22 UTC (rev 12756)
@@ -18,6 +18,12 @@
package org.hibernate.shards.integration.model;
+import junit.framework.TestCase;
+import org.hibernate.Session;
+import org.hibernate.SessionFactory;
+import org.hibernate.cfg.Configuration;
+import org.hibernate.engine.StatefulPersistenceContext;
+import org.hibernate.impl.SessionImpl;
import org.hibernate.shards.integration.IdGenType;
import org.hibernate.shards.integration.MemoryLeakPlugger;
import static org.hibernate.shards.integration.model.ModelDataFactory.person;
@@ -29,14 +35,6 @@
import org.hibernate.shards.util.JdbcUtil;
import org.hibernate.shards.util.Lists;
-import junit.framework.TestCase;
-
-import org.hibernate.Session;
-import org.hibernate.SessionFactory;
-import org.hibernate.cfg.Configuration;
-import org.hibernate.engine.StatefulPersistenceContext;
-import org.hibernate.impl.SessionImpl;
-
import java.lang.reflect.Field;
import java.lang.reflect.InvocationTargetException;
import java.sql.Connection;
Modified: shards/trunk/src/test/org/hibernate/shards/integration/model/ModelCriteriaPermutedIntegrationTest.java
===================================================================
--- shards/trunk/src/test/org/hibernate/shards/integration/model/ModelCriteriaPermutedIntegrationTest.java 2007-07-11 23:03:33 UTC (rev 12755)
+++ shards/trunk/src/test/org/hibernate/shards/integration/model/ModelCriteriaPermutedIntegrationTest.java 2007-07-12 04:17:22 UTC (rev 12756)
@@ -19,18 +19,16 @@
package org.hibernate.shards.integration.model;
+import org.hibernate.Criteria;
+import org.hibernate.criterion.Order;
+import org.hibernate.criterion.Projections;
+import org.hibernate.criterion.Restrictions;
import org.hibernate.shards.integration.BaseShardingIntegrationTestCase;
import org.hibernate.shards.model.Building;
import org.hibernate.shards.model.Floor;
import org.hibernate.shards.model.Office;
import org.hibernate.shards.util.Lists;
-
-import org.hibernate.Criteria;
-import org.hibernate.criterion.Order;
-import org.hibernate.criterion.Projections;
-import org.hibernate.criterion.Restrictions;
-
import java.math.BigDecimal;
import java.util.List;
Modified: shards/trunk/src/test/org/hibernate/shards/integration/model/ModelDataFactory.java
===================================================================
--- shards/trunk/src/test/org/hibernate/shards/integration/model/ModelDataFactory.java 2007-07-11 23:03:33 UTC (rev 12755)
+++ shards/trunk/src/test/org/hibernate/shards/integration/model/ModelDataFactory.java 2007-07-12 04:17:22 UTC (rev 12756)
@@ -22,9 +22,9 @@
import org.hibernate.shards.model.Elevator;
import org.hibernate.shards.model.Escalator;
import org.hibernate.shards.model.Floor;
+import org.hibernate.shards.model.Office;
+import org.hibernate.shards.model.Person;
import org.hibernate.shards.model.Tenant;
-import org.hibernate.shards.model.Person;
-import org.hibernate.shards.model.Office;
import org.hibernate.shards.model.Window;
import java.util.List;
Modified: shards/trunk/src/test/org/hibernate/shards/integration/model/ModelPermutedIntegrationTest.java
===================================================================
--- shards/trunk/src/test/org/hibernate/shards/integration/model/ModelPermutedIntegrationTest.java 2007-07-11 23:03:33 UTC (rev 12755)
+++ shards/trunk/src/test/org/hibernate/shards/integration/model/ModelPermutedIntegrationTest.java 2007-07-12 04:17:22 UTC (rev 12756)
@@ -18,15 +18,32 @@
package org.hibernate.shards.integration.model;
-import org.hibernate.*;
+import org.hibernate.HibernateException;
+import org.hibernate.LockMode;
+import org.hibernate.ReplicationMode;
+import org.hibernate.SessionFactory;
+import org.hibernate.TransactionException;
import org.hibernate.classic.Session;
import org.hibernate.criterion.Projections;
import org.hibernate.proxy.HibernateProxy;
import org.hibernate.shards.ShardId;
import org.hibernate.shards.integration.BaseShardingIntegrationTestCase;
import org.hibernate.shards.integration.MemoryLeakPlugger;
-import static org.hibernate.shards.integration.model.ModelDataFactory.*;
-import org.hibernate.shards.model.*;
+import static org.hibernate.shards.integration.model.ModelDataFactory.building;
+import static org.hibernate.shards.integration.model.ModelDataFactory.elevator;
+import static org.hibernate.shards.integration.model.ModelDataFactory.escalator;
+import static org.hibernate.shards.integration.model.ModelDataFactory.floor;
+import static org.hibernate.shards.integration.model.ModelDataFactory.office;
+import static org.hibernate.shards.integration.model.ModelDataFactory.person;
+import static org.hibernate.shards.integration.model.ModelDataFactory.tenant;
+import static org.hibernate.shards.integration.model.ModelDataFactory.window;
+import org.hibernate.shards.model.Building;
+import org.hibernate.shards.model.Escalator;
+import org.hibernate.shards.model.Floor;
+import org.hibernate.shards.model.Office;
+import org.hibernate.shards.model.Person;
+import org.hibernate.shards.model.Tenant;
+import org.hibernate.shards.model.Window;
import org.hibernate.shards.session.ShardedSessionFactory;
import org.hibernate.shards.session.ShardedSessionImpl;
import org.hibernate.shards.session.SubsetShardedSessionFactoryImpl;
Modified: shards/trunk/src/test/org/hibernate/shards/integration/model/ModelQueryPermutedIntegrationTest.java
===================================================================
--- shards/trunk/src/test/org/hibernate/shards/integration/model/ModelQueryPermutedIntegrationTest.java 2007-07-11 23:03:33 UTC (rev 12755)
+++ shards/trunk/src/test/org/hibernate/shards/integration/model/ModelQueryPermutedIntegrationTest.java 2007-07-12 04:17:22 UTC (rev 12756)
@@ -18,13 +18,12 @@
package org.hibernate.shards.integration.model;
+import org.hibernate.Query;
import org.hibernate.shards.integration.BaseShardingIntegrationTestCase;
import org.hibernate.shards.model.Building;
import org.hibernate.shards.model.Floor;
import org.hibernate.shards.model.Office;
-import org.hibernate.Query;
-
import java.util.List;
/**
Modified: shards/trunk/src/test/org/hibernate/shards/query/SetBigDecimalEventTest.java
===================================================================
--- shards/trunk/src/test/org/hibernate/shards/query/SetBigDecimalEventTest.java 2007-07-11 23:03:33 UTC (rev 12755)
+++ shards/trunk/src/test/org/hibernate/shards/query/SetBigDecimalEventTest.java 2007-07-12 04:17:22 UTC (rev 12756)
@@ -18,9 +18,9 @@
package org.hibernate.shards.query;
-import org.hibernate.shards.defaultmock.QueryDefaultMock;
import junit.framework.TestCase;
import org.hibernate.Query;
+import org.hibernate.shards.defaultmock.QueryDefaultMock;
import java.math.BigDecimal;
Modified: shards/trunk/src/test/org/hibernate/shards/query/SetBigIntegerEventTest.java
===================================================================
--- shards/trunk/src/test/org/hibernate/shards/query/SetBigIntegerEventTest.java 2007-07-11 23:03:33 UTC (rev 12755)
+++ shards/trunk/src/test/org/hibernate/shards/query/SetBigIntegerEventTest.java 2007-07-12 04:17:22 UTC (rev 12756)
@@ -19,7 +19,6 @@
package org.hibernate.shards.query;
import junit.framework.TestCase;
-
import org.hibernate.Query;
import org.hibernate.shards.defaultmock.QueryDefaultMock;
Modified: shards/trunk/src/test/org/hibernate/shards/query/SetBinaryEventTest.java
===================================================================
--- shards/trunk/src/test/org/hibernate/shards/query/SetBinaryEventTest.java 2007-07-11 23:03:33 UTC (rev 12755)
+++ shards/trunk/src/test/org/hibernate/shards/query/SetBinaryEventTest.java 2007-07-12 04:17:22 UTC (rev 12756)
@@ -18,9 +18,10 @@
package org.hibernate.shards.query;
-import org.hibernate.shards.defaultmock.QueryDefaultMock;
import junit.framework.TestCase;
import org.hibernate.Query;
+import org.hibernate.shards.defaultmock.QueryDefaultMock;
+
/**
* @author maulik(a)google.com (Maulik Shah)
*/
Modified: shards/trunk/src/test/org/hibernate/shards/query/SetBooleanEventTest.java
===================================================================
--- shards/trunk/src/test/org/hibernate/shards/query/SetBooleanEventTest.java 2007-07-11 23:03:33 UTC (rev 12755)
+++ shards/trunk/src/test/org/hibernate/shards/query/SetBooleanEventTest.java 2007-07-12 04:17:22 UTC (rev 12756)
@@ -18,10 +18,10 @@
package org.hibernate.shards.query;
+import junit.framework.TestCase;
+import org.hibernate.Query;
import org.hibernate.shards.defaultmock.QueryDefaultMock;
-import junit.framework.TestCase;
-import org.hibernate.Query;
/**
* @author maulik(a)google.com (Maulik Shah)
*/
Modified: shards/trunk/src/test/org/hibernate/shards/query/SetByteEventTest.java
===================================================================
--- shards/trunk/src/test/org/hibernate/shards/query/SetByteEventTest.java 2007-07-11 23:03:33 UTC (rev 12755)
+++ shards/trunk/src/test/org/hibernate/shards/query/SetByteEventTest.java 2007-07-12 04:17:22 UTC (rev 12756)
@@ -18,10 +18,10 @@
package org.hibernate.shards.query;
+import junit.framework.TestCase;
+import org.hibernate.Query;
import org.hibernate.shards.defaultmock.QueryDefaultMock;
-import junit.framework.TestCase;
-import org.hibernate.Query;
/**
* @author maulik(a)google.com (Maulik Shah)
*/
Modified: shards/trunk/src/test/org/hibernate/shards/query/SetCacheModeEventTest.java
===================================================================
--- shards/trunk/src/test/org/hibernate/shards/query/SetCacheModeEventTest.java 2007-07-11 23:03:33 UTC (rev 12755)
+++ shards/trunk/src/test/org/hibernate/shards/query/SetCacheModeEventTest.java 2007-07-12 04:17:22 UTC (rev 12756)
@@ -18,11 +18,10 @@
package org.hibernate.shards.query;
-import org.hibernate.shards.defaultmock.QueryDefaultMock;
-
import junit.framework.TestCase;
-import org.hibernate.Query;
import org.hibernate.CacheMode;
+import org.hibernate.Query;
+import org.hibernate.shards.defaultmock.QueryDefaultMock;
/**
* @author maulik(a)google.com (Maulik Shah)
Modified: shards/trunk/src/test/org/hibernate/shards/query/SetCacheRegionEventTest.java
===================================================================
--- shards/trunk/src/test/org/hibernate/shards/query/SetCacheRegionEventTest.java 2007-07-11 23:03:33 UTC (rev 12755)
+++ shards/trunk/src/test/org/hibernate/shards/query/SetCacheRegionEventTest.java 2007-07-12 04:17:22 UTC (rev 12756)
@@ -18,10 +18,10 @@
package org.hibernate.shards.query;
+import junit.framework.TestCase;
+import org.hibernate.Query;
import org.hibernate.shards.defaultmock.QueryDefaultMock;
-import junit.framework.TestCase;
-import org.hibernate.Query;
/**
* @author maulik(a)google.com (Maulik Shah)
*/
Modified: shards/trunk/src/test/org/hibernate/shards/query/SetCacheableEventTest.java
===================================================================
--- shards/trunk/src/test/org/hibernate/shards/query/SetCacheableEventTest.java 2007-07-11 23:03:33 UTC (rev 12755)
+++ shards/trunk/src/test/org/hibernate/shards/query/SetCacheableEventTest.java 2007-07-12 04:17:22 UTC (rev 12756)
@@ -18,10 +18,10 @@
package org.hibernate.shards.query;
+import junit.framework.TestCase;
+import org.hibernate.Query;
import org.hibernate.shards.defaultmock.QueryDefaultMock;
-import junit.framework.TestCase;
-import org.hibernate.Query;
/**
* @author maulik(a)google.com (Maulik Shah)
*/
Modified: shards/trunk/src/test/org/hibernate/shards/query/SetCalendarDateEventTest.java
===================================================================
--- shards/trunk/src/test/org/hibernate/shards/query/SetCalendarDateEventTest.java 2007-07-11 23:03:33 UTC (rev 12755)
+++ shards/trunk/src/test/org/hibernate/shards/query/SetCalendarDateEventTest.java 2007-07-12 04:17:22 UTC (rev 12756)
@@ -18,10 +18,9 @@
package org.hibernate.shards.query;
-import org.hibernate.shards.defaultmock.QueryDefaultMock;
-
import junit.framework.TestCase;
import org.hibernate.Query;
+import org.hibernate.shards.defaultmock.QueryDefaultMock;
import java.util.Calendar;
Modified: shards/trunk/src/test/org/hibernate/shards/query/SetCalendarEventTest.java
===================================================================
--- shards/trunk/src/test/org/hibernate/shards/query/SetCalendarEventTest.java 2007-07-11 23:03:33 UTC (rev 12755)
+++ shards/trunk/src/test/org/hibernate/shards/query/SetCalendarEventTest.java 2007-07-12 04:17:22 UTC (rev 12756)
@@ -18,9 +18,9 @@
package org.hibernate.shards.query;
-import org.hibernate.shards.defaultmock.QueryDefaultMock;
import junit.framework.TestCase;
import org.hibernate.Query;
+import org.hibernate.shards.defaultmock.QueryDefaultMock;
import java.util.Calendar;
Modified: shards/trunk/src/test/org/hibernate/shards/query/SetCharacterEventTest.java
===================================================================
--- shards/trunk/src/test/org/hibernate/shards/query/SetCharacterEventTest.java 2007-07-11 23:03:33 UTC (rev 12755)
+++ shards/trunk/src/test/org/hibernate/shards/query/SetCharacterEventTest.java 2007-07-12 04:17:22 UTC (rev 12756)
@@ -18,10 +18,10 @@
package org.hibernate.shards.query;
+import junit.framework.TestCase;
+import org.hibernate.Query;
import org.hibernate.shards.defaultmock.QueryDefaultMock;
-import junit.framework.TestCase;
-import org.hibernate.Query;
/**
* @author maulik(a)google.com (Maulik Shah)
*/
Modified: shards/trunk/src/test/org/hibernate/shards/query/SetCommentEventTest.java
===================================================================
--- shards/trunk/src/test/org/hibernate/shards/query/SetCommentEventTest.java 2007-07-11 23:03:33 UTC (rev 12755)
+++ shards/trunk/src/test/org/hibernate/shards/query/SetCommentEventTest.java 2007-07-12 04:17:22 UTC (rev 12756)
@@ -18,9 +18,10 @@
package org.hibernate.shards.query;
-import org.hibernate.shards.defaultmock.QueryDefaultMock;
import junit.framework.TestCase;
import org.hibernate.Query;
+import org.hibernate.shards.defaultmock.QueryDefaultMock;
+
/**
* @author maulik(a)google.com (Maulik Shah)
*/
Modified: shards/trunk/src/test/org/hibernate/shards/query/SetDateEventTest.java
===================================================================
--- shards/trunk/src/test/org/hibernate/shards/query/SetDateEventTest.java 2007-07-11 23:03:33 UTC (rev 12755)
+++ shards/trunk/src/test/org/hibernate/shards/query/SetDateEventTest.java 2007-07-12 04:17:22 UTC (rev 12756)
@@ -18,9 +18,9 @@
package org.hibernate.shards.query;
-import org.hibernate.shards.defaultmock.QueryDefaultMock;
import junit.framework.TestCase;
import org.hibernate.Query;
+import org.hibernate.shards.defaultmock.QueryDefaultMock;
import java.util.Date;
Modified: shards/trunk/src/test/org/hibernate/shards/query/SetDoubleEventTest.java
===================================================================
--- shards/trunk/src/test/org/hibernate/shards/query/SetDoubleEventTest.java 2007-07-11 23:03:33 UTC (rev 12755)
+++ shards/trunk/src/test/org/hibernate/shards/query/SetDoubleEventTest.java 2007-07-12 04:17:22 UTC (rev 12756)
@@ -18,10 +18,10 @@
package org.hibernate.shards.query;
+import junit.framework.TestCase;
+import org.hibernate.Query;
import org.hibernate.shards.defaultmock.QueryDefaultMock;
-import junit.framework.TestCase;
-import org.hibernate.Query;
/**
* @author maulik(a)google.com (Maulik Shah)
*/
Modified: shards/trunk/src/test/org/hibernate/shards/query/SetEntityEventTest.java
===================================================================
--- shards/trunk/src/test/org/hibernate/shards/query/SetEntityEventTest.java 2007-07-11 23:03:33 UTC (rev 12755)
+++ shards/trunk/src/test/org/hibernate/shards/query/SetEntityEventTest.java 2007-07-12 04:17:22 UTC (rev 12756)
@@ -18,10 +18,10 @@
package org.hibernate.shards.query;
+import junit.framework.TestCase;
+import org.hibernate.Query;
import org.hibernate.shards.defaultmock.QueryDefaultMock;
-import junit.framework.TestCase;
-import org.hibernate.Query;
/**
* @author maulik(a)google.com (Maulik Shah)
*/
Modified: shards/trunk/src/test/org/hibernate/shards/query/SetFetchSizeEventTest.java
===================================================================
--- shards/trunk/src/test/org/hibernate/shards/query/SetFetchSizeEventTest.java 2007-07-11 23:03:33 UTC (rev 12755)
+++ shards/trunk/src/test/org/hibernate/shards/query/SetFetchSizeEventTest.java 2007-07-12 04:17:22 UTC (rev 12756)
@@ -18,10 +18,10 @@
package org.hibernate.shards.query;
+import junit.framework.TestCase;
+import org.hibernate.Query;
import org.hibernate.shards.defaultmock.QueryDefaultMock;
-import junit.framework.TestCase;
-import org.hibernate.Query;
/**
* @author maulik(a)google.com (Maulik Shah)
*/
Modified: shards/trunk/src/test/org/hibernate/shards/query/SetFirstResultEventTest.java
===================================================================
--- shards/trunk/src/test/org/hibernate/shards/query/SetFirstResultEventTest.java 2007-07-11 23:03:33 UTC (rev 12755)
+++ shards/trunk/src/test/org/hibernate/shards/query/SetFirstResultEventTest.java 2007-07-12 04:17:22 UTC (rev 12756)
@@ -19,9 +19,9 @@
package org.hibernate.shards.query;
import junit.framework.TestCase;
-
import org.hibernate.Query;
import org.hibernate.shards.defaultmock.QueryDefaultMock;
+
/**
* @author maulik(a)google.com (Maulik Shah)
*/
Modified: shards/trunk/src/test/org/hibernate/shards/query/SetFloatEventTest.java
===================================================================
--- shards/trunk/src/test/org/hibernate/shards/query/SetFloatEventTest.java 2007-07-11 23:03:33 UTC (rev 12755)
+++ shards/trunk/src/test/org/hibernate/shards/query/SetFloatEventTest.java 2007-07-12 04:17:22 UTC (rev 12756)
@@ -19,9 +19,9 @@
package org.hibernate.shards.query;
import junit.framework.TestCase;
-
import org.hibernate.Query;
import org.hibernate.shards.defaultmock.QueryDefaultMock;
+
/**
* @author maulik(a)google.com (Maulik Shah)
*/
Modified: shards/trunk/src/test/org/hibernate/shards/query/SetFlushModeEventTest.java
===================================================================
--- shards/trunk/src/test/org/hibernate/shards/query/SetFlushModeEventTest.java 2007-07-11 23:03:33 UTC (rev 12755)
+++ shards/trunk/src/test/org/hibernate/shards/query/SetFlushModeEventTest.java 2007-07-12 04:17:22 UTC (rev 12756)
@@ -18,10 +18,10 @@
package org.hibernate.shards.query;
-import org.hibernate.shards.defaultmock.QueryDefaultMock;
import junit.framework.TestCase;
+import org.hibernate.FlushMode;
import org.hibernate.Query;
-import org.hibernate.FlushMode;
+import org.hibernate.shards.defaultmock.QueryDefaultMock;
/**
* @author maulik(a)google.com (Maulik Shah)
Modified: shards/trunk/src/test/org/hibernate/shards/query/SetIntegerEventTest.java
===================================================================
--- shards/trunk/src/test/org/hibernate/shards/query/SetIntegerEventTest.java 2007-07-11 23:03:33 UTC (rev 12755)
+++ shards/trunk/src/test/org/hibernate/shards/query/SetIntegerEventTest.java 2007-07-12 04:17:22 UTC (rev 12756)
@@ -18,10 +18,10 @@
package org.hibernate.shards.query;
+import junit.framework.TestCase;
+import org.hibernate.Query;
import org.hibernate.shards.defaultmock.QueryDefaultMock;
-import junit.framework.TestCase;
-import org.hibernate.Query;
/**
* @author maulik(a)google.com (Maulik Shah)
*/
Modified: shards/trunk/src/test/org/hibernate/shards/query/SetLocaleEventTest.java
===================================================================
--- shards/trunk/src/test/org/hibernate/shards/query/SetLocaleEventTest.java 2007-07-11 23:03:33 UTC (rev 12755)
+++ shards/trunk/src/test/org/hibernate/shards/query/SetLocaleEventTest.java 2007-07-12 04:17:22 UTC (rev 12756)
@@ -18,9 +18,9 @@
package org.hibernate.shards.query;
-import org.hibernate.shards.defaultmock.QueryDefaultMock;
import junit.framework.TestCase;
import org.hibernate.Query;
+import org.hibernate.shards.defaultmock.QueryDefaultMock;
import java.util.Locale;
Modified: shards/trunk/src/test/org/hibernate/shards/query/SetLockModeEventTest.java
===================================================================
--- shards/trunk/src/test/org/hibernate/shards/query/SetLockModeEventTest.java 2007-07-11 23:03:33 UTC (rev 12755)
+++ shards/trunk/src/test/org/hibernate/shards/query/SetLockModeEventTest.java 2007-07-12 04:17:22 UTC (rev 12756)
@@ -18,10 +18,10 @@
package org.hibernate.shards.query;
-import org.hibernate.shards.defaultmock.QueryDefaultMock;
import junit.framework.TestCase;
+import org.hibernate.LockMode;
import org.hibernate.Query;
-import org.hibernate.LockMode;
+import org.hibernate.shards.defaultmock.QueryDefaultMock;
/**
* @author maulik(a)google.com (Maulik Shah)
Modified: shards/trunk/src/test/org/hibernate/shards/query/SetLongEventTest.java
===================================================================
--- shards/trunk/src/test/org/hibernate/shards/query/SetLongEventTest.java 2007-07-11 23:03:33 UTC (rev 12755)
+++ shards/trunk/src/test/org/hibernate/shards/query/SetLongEventTest.java 2007-07-12 04:17:22 UTC (rev 12756)
@@ -18,10 +18,10 @@
package org.hibernate.shards.query;
+import junit.framework.TestCase;
+import org.hibernate.Query;
import org.hibernate.shards.defaultmock.QueryDefaultMock;
-import junit.framework.TestCase;
-import org.hibernate.Query;
/**
* @author maulik(a)google.com (Maulik Shah)
*/
Modified: shards/trunk/src/test/org/hibernate/shards/query/SetMaxResultsEventTest.java
===================================================================
--- shards/trunk/src/test/org/hibernate/shards/query/SetMaxResultsEventTest.java 2007-07-11 23:03:33 UTC (rev 12755)
+++ shards/trunk/src/test/org/hibernate/shards/query/SetMaxResultsEventTest.java 2007-07-12 04:17:22 UTC (rev 12756)
@@ -18,9 +18,10 @@
package org.hibernate.shards.query;
-import org.hibernate.shards.defaultmock.QueryDefaultMock;
import junit.framework.TestCase;
import org.hibernate.Query;
+import org.hibernate.shards.defaultmock.QueryDefaultMock;
+
/**
* @author maulik(a)google.com (Maulik Shah)
*/
Modified: shards/trunk/src/test/org/hibernate/shards/query/SetParameterEventTest.java
===================================================================
--- shards/trunk/src/test/org/hibernate/shards/query/SetParameterEventTest.java 2007-07-11 23:03:33 UTC (rev 12755)
+++ shards/trunk/src/test/org/hibernate/shards/query/SetParameterEventTest.java 2007-07-12 04:17:22 UTC (rev 12756)
@@ -18,9 +18,9 @@
package org.hibernate.shards.query;
-import org.hibernate.shards.defaultmock.QueryDefaultMock;
import junit.framework.TestCase;
import org.hibernate.Query;
+import org.hibernate.shards.defaultmock.QueryDefaultMock;
import org.hibernate.type.Type;
/**
Modified: shards/trunk/src/test/org/hibernate/shards/query/SetParameterListEventTest.java
===================================================================
--- shards/trunk/src/test/org/hibernate/shards/query/SetParameterListEventTest.java 2007-07-11 23:03:33 UTC (rev 12755)
+++ shards/trunk/src/test/org/hibernate/shards/query/SetParameterListEventTest.java 2007-07-12 04:17:22 UTC (rev 12756)
@@ -18,11 +18,10 @@
package org.hibernate.shards.query;
-import org.hibernate.shards.defaultmock.QueryDefaultMock;
-import org.hibernate.shards.util.Lists;
-
import junit.framework.TestCase;
import org.hibernate.Query;
+import org.hibernate.shards.defaultmock.QueryDefaultMock;
+import org.hibernate.shards.util.Lists;
import org.hibernate.type.Type;
import java.util.Collection;
Modified: shards/trunk/src/test/org/hibernate/shards/query/SetParametersEventTest.java
===================================================================
--- shards/trunk/src/test/org/hibernate/shards/query/SetParametersEventTest.java 2007-07-11 23:03:33 UTC (rev 12755)
+++ shards/trunk/src/test/org/hibernate/shards/query/SetParametersEventTest.java 2007-07-12 04:17:22 UTC (rev 12756)
@@ -18,9 +18,9 @@
package org.hibernate.shards.query;
-import org.hibernate.shards.defaultmock.QueryDefaultMock;
import junit.framework.TestCase;
import org.hibernate.Query;
+import org.hibernate.shards.defaultmock.QueryDefaultMock;
import org.hibernate.type.Type;
/**
Modified: shards/trunk/src/test/org/hibernate/shards/query/SetPropertiesEventTest.java
===================================================================
--- shards/trunk/src/test/org/hibernate/shards/query/SetPropertiesEventTest.java 2007-07-11 23:03:33 UTC (rev 12755)
+++ shards/trunk/src/test/org/hibernate/shards/query/SetPropertiesEventTest.java 2007-07-12 04:17:22 UTC (rev 12756)
@@ -18,12 +18,12 @@
package org.hibernate.shards.query;
-import org.hibernate.shards.defaultmock.QueryDefaultMock;
import junit.framework.TestCase;
import org.hibernate.Query;
+import org.hibernate.shards.defaultmock.QueryDefaultMock;
+import java.util.Collections;
import java.util.Map;
-import java.util.Collections;
/**
* @author maulik(a)google.com (Maulik Shah)
Modified: shards/trunk/src/test/org/hibernate/shards/query/SetReadOnlyEventTest.java
===================================================================
--- shards/trunk/src/test/org/hibernate/shards/query/SetReadOnlyEventTest.java 2007-07-11 23:03:33 UTC (rev 12755)
+++ shards/trunk/src/test/org/hibernate/shards/query/SetReadOnlyEventTest.java 2007-07-12 04:17:22 UTC (rev 12756)
@@ -18,9 +18,10 @@
package org.hibernate.shards.query;
-import org.hibernate.shards.defaultmock.QueryDefaultMock;
import junit.framework.TestCase;
import org.hibernate.Query;
+import org.hibernate.shards.defaultmock.QueryDefaultMock;
+
/**
* @author maulik(a)google.com (Maulik Shah)
*/
Modified: shards/trunk/src/test/org/hibernate/shards/query/SetResultTransformerEventTest.java
===================================================================
--- shards/trunk/src/test/org/hibernate/shards/query/SetResultTransformerEventTest.java 2007-07-11 23:03:33 UTC (rev 12755)
+++ shards/trunk/src/test/org/hibernate/shards/query/SetResultTransformerEventTest.java 2007-07-12 04:17:22 UTC (rev 12756)
@@ -18,10 +18,9 @@
package org.hibernate.shards.query;
-import org.hibernate.shards.defaultmock.QueryDefaultMock;
-
import junit.framework.TestCase;
import org.hibernate.Query;
+import org.hibernate.shards.defaultmock.QueryDefaultMock;
import org.hibernate.transform.ResultTransformer;
/**
Modified: shards/trunk/src/test/org/hibernate/shards/query/SetSerializableEventTest.java
===================================================================
--- shards/trunk/src/test/org/hibernate/shards/query/SetSerializableEventTest.java 2007-07-11 23:03:33 UTC (rev 12755)
+++ shards/trunk/src/test/org/hibernate/shards/query/SetSerializableEventTest.java 2007-07-12 04:17:22 UTC (rev 12756)
@@ -18,9 +18,9 @@
package org.hibernate.shards.query;
-import org.hibernate.shards.defaultmock.QueryDefaultMock;
import junit.framework.TestCase;
import org.hibernate.Query;
+import org.hibernate.shards.defaultmock.QueryDefaultMock;
import java.io.Serializable;
Modified: shards/trunk/src/test/org/hibernate/shards/query/SetShortEventTest.java
===================================================================
--- shards/trunk/src/test/org/hibernate/shards/query/SetShortEventTest.java 2007-07-11 23:03:33 UTC (rev 12755)
+++ shards/trunk/src/test/org/hibernate/shards/query/SetShortEventTest.java 2007-07-12 04:17:22 UTC (rev 12756)
@@ -18,10 +18,10 @@
package org.hibernate.shards.query;
+import junit.framework.TestCase;
+import org.hibernate.Query;
import org.hibernate.shards.defaultmock.QueryDefaultMock;
-import junit.framework.TestCase;
-import org.hibernate.Query;
/**
* @author maulik(a)google.com (Maulik Shah)
*/
Modified: shards/trunk/src/test/org/hibernate/shards/query/SetStringEventTest.java
===================================================================
--- shards/trunk/src/test/org/hibernate/shards/query/SetStringEventTest.java 2007-07-11 23:03:33 UTC (rev 12755)
+++ shards/trunk/src/test/org/hibernate/shards/query/SetStringEventTest.java 2007-07-12 04:17:22 UTC (rev 12756)
@@ -18,9 +18,10 @@
package org.hibernate.shards.query;
-import org.hibernate.shards.defaultmock.QueryDefaultMock;
import junit.framework.TestCase;
import org.hibernate.Query;
+import org.hibernate.shards.defaultmock.QueryDefaultMock;
+
/**
* @author maulik(a)google.com (Maulik Shah)
*/
Modified: shards/trunk/src/test/org/hibernate/shards/query/SetTextEventTest.java
===================================================================
--- shards/trunk/src/test/org/hibernate/shards/query/SetTextEventTest.java 2007-07-11 23:03:33 UTC (rev 12755)
+++ shards/trunk/src/test/org/hibernate/shards/query/SetTextEventTest.java 2007-07-12 04:17:22 UTC (rev 12756)
@@ -18,10 +18,10 @@
package org.hibernate.shards.query;
+import junit.framework.TestCase;
+import org.hibernate.Query;
import org.hibernate.shards.defaultmock.QueryDefaultMock;
-import junit.framework.TestCase;
-import org.hibernate.Query;
/**
* @author maulik(a)google.com (Maulik Shah)
*/
Modified: shards/trunk/src/test/org/hibernate/shards/query/SetTimeEventTest.java
===================================================================
--- shards/trunk/src/test/org/hibernate/shards/query/SetTimeEventTest.java 2007-07-11 23:03:33 UTC (rev 12755)
+++ shards/trunk/src/test/org/hibernate/shards/query/SetTimeEventTest.java 2007-07-12 04:17:22 UTC (rev 12756)
@@ -18,10 +18,9 @@
package org.hibernate.shards.query;
-import org.hibernate.shards.defaultmock.QueryDefaultMock;
-
import junit.framework.TestCase;
import org.hibernate.Query;
+import org.hibernate.shards.defaultmock.QueryDefaultMock;
import java.util.Date;
Modified: shards/trunk/src/test/org/hibernate/shards/query/SetTimeoutEventTest.java
===================================================================
--- shards/trunk/src/test/org/hibernate/shards/query/SetTimeoutEventTest.java 2007-07-11 23:03:33 UTC (rev 12755)
+++ shards/trunk/src/test/org/hibernate/shards/query/SetTimeoutEventTest.java 2007-07-12 04:17:22 UTC (rev 12756)
@@ -18,9 +18,10 @@
package org.hibernate.shards.query;
-import org.hibernate.shards.defaultmock.QueryDefaultMock;
import junit.framework.TestCase;
import org.hibernate.Query;
+import org.hibernate.shards.defaultmock.QueryDefaultMock;
+
/**
* @author maulik(a)google.com (Maulik Shah)
*/
Modified: shards/trunk/src/test/org/hibernate/shards/query/SetTimestampEventTest.java
===================================================================
--- shards/trunk/src/test/org/hibernate/shards/query/SetTimestampEventTest.java 2007-07-11 23:03:33 UTC (rev 12755)
+++ shards/trunk/src/test/org/hibernate/shards/query/SetTimestampEventTest.java 2007-07-12 04:17:22 UTC (rev 12756)
@@ -18,10 +18,9 @@
package org.hibernate.shards.query;
-import org.hibernate.shards.defaultmock.QueryDefaultMock;
-
import junit.framework.TestCase;
import org.hibernate.Query;
+import org.hibernate.shards.defaultmock.QueryDefaultMock;
import java.util.Date;
Modified: shards/trunk/src/test/org/hibernate/shards/query/ShardedQueryDefaultMock.java
===================================================================
--- shards/trunk/src/test/org/hibernate/shards/query/ShardedQueryDefaultMock.java 2007-07-11 23:03:33 UTC (rev 12755)
+++ shards/trunk/src/test/org/hibernate/shards/query/ShardedQueryDefaultMock.java 2007-07-12 04:17:22 UTC (rev 12756)
@@ -18,14 +18,26 @@
package org.hibernate.shards.query;
+import org.hibernate.CacheMode;
+import org.hibernate.FlushMode;
+import org.hibernate.HibernateException;
+import org.hibernate.LockMode;
+import org.hibernate.Query;
+import org.hibernate.ScrollMode;
+import org.hibernate.ScrollableResults;
+import org.hibernate.transform.ResultTransformer;
import org.hibernate.type.Type;
-import org.hibernate.*;
-import org.hibernate.transform.ResultTransformer;
-import java.util.*;
import java.io.Serializable;
import java.math.BigDecimal;
import java.math.BigInteger;
+import java.util.Calendar;
+import java.util.Collection;
+import java.util.Date;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Locale;
+import java.util.Map;
/**
* @author maulik(a)google.com (Maulik Shah)
Modified: shards/trunk/src/test/org/hibernate/shards/session/CrossShardRelationshipDetectingInterceptorDecoratorTest.java
===================================================================
--- shards/trunk/src/test/org/hibernate/shards/session/CrossShardRelationshipDetectingInterceptorDecoratorTest.java 2007-07-11 23:03:33 UTC (rev 12755)
+++ shards/trunk/src/test/org/hibernate/shards/session/CrossShardRelationshipDetectingInterceptorDecoratorTest.java 2007-07-12 04:17:22 UTC (rev 12756)
@@ -18,13 +18,11 @@
package org.hibernate.shards.session;
-import org.hibernate.shards.defaultmock.InterceptorDefaultMock;
-import org.hibernate.shards.ShardId;
-
import junit.framework.TestCase;
-
-import org.hibernate.Interceptor;
import org.hibernate.CallbackException;
+import org.hibernate.Interceptor;
+import org.hibernate.shards.ShardId;
+import org.hibernate.shards.defaultmock.InterceptorDefaultMock;
import org.hibernate.type.Type;
import java.io.Serializable;
Modified: shards/trunk/src/test/org/hibernate/shards/session/CrossShardRelationshipDetectingInterceptorTest.java
===================================================================
--- shards/trunk/src/test/org/hibernate/shards/session/CrossShardRelationshipDetectingInterceptorTest.java 2007-07-11 23:03:33 UTC (rev 12755)
+++ shards/trunk/src/test/org/hibernate/shards/session/CrossShardRelationshipDetectingInterceptorTest.java 2007-07-12 04:17:22 UTC (rev 12756)
@@ -18,13 +18,11 @@
package org.hibernate.shards.session;
-import org.hibernate.shards.defaultmock.TypeDefaultMock;
+import junit.framework.TestCase;
import org.hibernate.shards.CrossShardAssociationException;
import org.hibernate.shards.ShardId;
+import org.hibernate.shards.defaultmock.TypeDefaultMock;
import org.hibernate.shards.util.Pair;
-
-import junit.framework.TestCase;
-
import org.hibernate.type.Type;
import java.util.List;
Modified: shards/trunk/src/test/org/hibernate/shards/session/ShardIdResolverDefaultMock.java
===================================================================
--- shards/trunk/src/test/org/hibernate/shards/session/ShardIdResolverDefaultMock.java 2007-07-11 23:03:33 UTC (rev 12755)
+++ shards/trunk/src/test/org/hibernate/shards/session/ShardIdResolverDefaultMock.java 2007-07-12 04:17:22 UTC (rev 12756)
@@ -18,8 +18,8 @@
package org.hibernate.shards.session;
+import org.hibernate.shards.Shard;
import org.hibernate.shards.ShardId;
-import org.hibernate.shards.Shard;
import java.util.List;
Modified: shards/trunk/src/test/org/hibernate/shards/session/ShardedSessionFactoryImplTest.java
===================================================================
--- shards/trunk/src/test/org/hibernate/shards/session/ShardedSessionFactoryImplTest.java 2007-07-11 23:03:33 UTC (rev 12755)
+++ shards/trunk/src/test/org/hibernate/shards/session/ShardedSessionFactoryImplTest.java 2007-07-12 04:17:22 UTC (rev 12756)
@@ -36,7 +36,11 @@
import javax.naming.NamingException;
import java.sql.Connection;
-import java.util.*;
+import java.util.Collections;
+import java.util.List;
+import java.util.Map;
+import java.util.Properties;
+import java.util.Set;
/**
* @author maxr(a)google.com (Max Ross)
Modified: shards/trunk/src/test/org/hibernate/shards/session/ShardedSessionImplTest.java
===================================================================
--- shards/trunk/src/test/org/hibernate/shards/session/ShardedSessionImplTest.java 2007-07-11 23:03:33 UTC (rev 12755)
+++ shards/trunk/src/test/org/hibernate/shards/session/ShardedSessionImplTest.java 2007-07-12 04:17:22 UTC (rev 12756)
@@ -25,7 +25,11 @@
import org.hibernate.Session;
import org.hibernate.engine.SessionFactoryImplementor;
import org.hibernate.metadata.ClassMetadata;
-import org.hibernate.shards.*;
+import org.hibernate.shards.Shard;
+import org.hibernate.shards.ShardDefaultMock;
+import org.hibernate.shards.ShardId;
+import org.hibernate.shards.ShardImpl;
+import org.hibernate.shards.ShardedSessionFactoryDefaultMock;
import org.hibernate.shards.defaultmock.ClassMetadataDefaultMock;
import org.hibernate.shards.defaultmock.InterceptorDefaultMock;
import org.hibernate.shards.defaultmock.SessionFactoryDefaultMock;
Modified: shards/trunk/src/test/org/hibernate/shards/strategy/access/ParallelShardOperationCallableTest.java
===================================================================
--- shards/trunk/src/test/org/hibernate/shards/strategy/access/ParallelShardOperationCallableTest.java 2007-07-11 23:03:33 UTC (rev 12755)
+++ shards/trunk/src/test/org/hibernate/shards/strategy/access/ParallelShardOperationCallableTest.java 2007-07-12 04:17:22 UTC (rev 12756)
@@ -18,6 +18,7 @@
package org.hibernate.shards.strategy.access;
+import junit.framework.TestCase;
import org.hibernate.shards.Shard;
import org.hibernate.shards.ShardDefaultMock;
import org.hibernate.shards.ShardId;
@@ -28,12 +29,10 @@
import org.hibernate.shards.util.Lists;
import org.hibernate.shards.util.Sets;
-import junit.framework.TestCase;
-
import java.util.List;
import java.util.Set;
-import java.util.concurrent.CountDownLatch;
import java.util.concurrent.Callable;
+import java.util.concurrent.CountDownLatch;
/**
* @author maxr(a)google.com (Max Ross)
Modified: shards/trunk/src/test/org/hibernate/shards/strategy/access/StartAwareFutureTaskTest.java
===================================================================
--- shards/trunk/src/test/org/hibernate/shards/strategy/access/StartAwareFutureTaskTest.java 2007-07-11 23:03:33 UTC (rev 12755)
+++ shards/trunk/src/test/org/hibernate/shards/strategy/access/StartAwareFutureTaskTest.java 2007-07-12 04:17:22 UTC (rev 12756)
@@ -20,8 +20,8 @@
import junit.framework.TestCase;
+import java.util.concurrent.Callable;
import java.util.concurrent.FutureTask;
-import java.util.concurrent.Callable;
/**
* @author maxr(a)google.com (Max Ross)
Modified: shards/trunk/src/test/org/hibernate/shards/strategy/exit/AggregateExitOperationTest.java
===================================================================
--- shards/trunk/src/test/org/hibernate/shards/strategy/exit/AggregateExitOperationTest.java 2007-07-11 23:03:33 UTC (rev 12755)
+++ shards/trunk/src/test/org/hibernate/shards/strategy/exit/AggregateExitOperationTest.java 2007-07-12 04:17:22 UTC (rev 12756)
@@ -18,14 +18,7 @@
package org.hibernate.shards.strategy.exit;
-import org.hibernate.shards.defaultmock.EntityPersisterDefaultMock;
-import org.hibernate.shards.defaultmock.SessionFactoryDefaultMock;
-import org.hibernate.shards.defaultmock.ClassMetadataDefaultMock;
-import org.hibernate.shards.util.Lists;
-import org.hibernate.shards.util.StringUtil;
-
import junit.framework.TestCase;
-
import org.hibernate.EntityMode;
import org.hibernate.HibernateException;
import org.hibernate.MappingException;
@@ -33,6 +26,11 @@
import org.hibernate.criterion.Projections;
import org.hibernate.metadata.ClassMetadata;
import org.hibernate.persister.entity.EntityPersister;
+import org.hibernate.shards.defaultmock.ClassMetadataDefaultMock;
+import org.hibernate.shards.defaultmock.EntityPersisterDefaultMock;
+import org.hibernate.shards.defaultmock.SessionFactoryDefaultMock;
+import org.hibernate.shards.util.Lists;
+import org.hibernate.shards.util.StringUtil;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
Modified: shards/trunk/src/test/org/hibernate/shards/strategy/exit/FirstNonNullResultExitStrategyTest.java
===================================================================
--- shards/trunk/src/test/org/hibernate/shards/strategy/exit/FirstNonNullResultExitStrategyTest.java 2007-07-11 23:03:33 UTC (rev 12755)
+++ shards/trunk/src/test/org/hibernate/shards/strategy/exit/FirstNonNullResultExitStrategyTest.java 2007-07-12 04:17:22 UTC (rev 12756)
@@ -18,7 +18,6 @@
package org.hibernate.shards.strategy.exit;
import junit.framework.TestCase;
-
import org.hibernate.shards.Shard;
import org.hibernate.shards.ShardDefaultMock;
Modified: shards/trunk/src/test/org/hibernate/shards/strategy/exit/FirstResultExitOperationTest.java
===================================================================
--- shards/trunk/src/test/org/hibernate/shards/strategy/exit/FirstResultExitOperationTest.java 2007-07-11 23:03:33 UTC (rev 12755)
+++ shards/trunk/src/test/org/hibernate/shards/strategy/exit/FirstResultExitOperationTest.java 2007-07-12 04:17:22 UTC (rev 12756)
@@ -19,10 +19,9 @@
package org.hibernate.shards.strategy.exit;
+import junit.framework.TestCase;
import org.hibernate.shards.util.Lists;
-import junit.framework.TestCase;
-
import java.util.List;
/**
Modified: shards/trunk/src/test/org/hibernate/shards/strategy/exit/MaxResultExitOperationTest.java
===================================================================
--- shards/trunk/src/test/org/hibernate/shards/strategy/exit/MaxResultExitOperationTest.java 2007-07-11 23:03:33 UTC (rev 12755)
+++ shards/trunk/src/test/org/hibernate/shards/strategy/exit/MaxResultExitOperationTest.java 2007-07-12 04:17:22 UTC (rev 12756)
@@ -19,10 +19,9 @@
package org.hibernate.shards.strategy.exit;
+import junit.framework.TestCase;
import org.hibernate.shards.util.Lists;
-import junit.framework.TestCase;
-
import java.util.List;
/**
Modified: shards/trunk/src/test/org/hibernate/shards/strategy/exit/OrderExitOperationTest.java
===================================================================
--- shards/trunk/src/test/org/hibernate/shards/strategy/exit/OrderExitOperationTest.java 2007-07-11 23:03:33 UTC (rev 12755)
+++ shards/trunk/src/test/org/hibernate/shards/strategy/exit/OrderExitOperationTest.java 2007-07-12 04:17:22 UTC (rev 12756)
@@ -18,20 +18,18 @@
package org.hibernate.shards.strategy.exit;
-import org.hibernate.shards.defaultmock.ClassMetadataDefaultMock;
-import org.hibernate.shards.defaultmock.EntityPersisterDefaultMock;
-import org.hibernate.shards.defaultmock.SessionFactoryDefaultMock;
-import org.hibernate.shards.util.Lists;
-import org.hibernate.shards.util.StringUtil;
-
import junit.framework.TestCase;
-
import org.hibernate.EntityMode;
import org.hibernate.HibernateException;
import org.hibernate.MappingException;
import org.hibernate.criterion.Order;
import org.hibernate.metadata.ClassMetadata;
import org.hibernate.persister.entity.EntityPersister;
+import org.hibernate.shards.defaultmock.ClassMetadataDefaultMock;
+import org.hibernate.shards.defaultmock.EntityPersisterDefaultMock;
+import org.hibernate.shards.defaultmock.SessionFactoryDefaultMock;
+import org.hibernate.shards.util.Lists;
+import org.hibernate.shards.util.StringUtil;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
Modified: shards/trunk/src/test/org/hibernate/shards/strategy/exit/ProjectionExitOperationFactoryTest.java
===================================================================
--- shards/trunk/src/test/org/hibernate/shards/strategy/exit/ProjectionExitOperationFactoryTest.java 2007-07-11 23:03:33 UTC (rev 12755)
+++ shards/trunk/src/test/org/hibernate/shards/strategy/exit/ProjectionExitOperationFactoryTest.java 2007-07-12 04:17:22 UTC (rev 12756)
@@ -18,18 +18,16 @@
package org.hibernate.shards.strategy.exit;
-import org.hibernate.shards.defaultmock.EntityPersisterDefaultMock;
-import org.hibernate.shards.defaultmock.SessionFactoryDefaultMock;
-import org.hibernate.shards.util.StringUtil;
-
import junit.framework.TestCase;
-
import org.hibernate.EntityMode;
import org.hibernate.HibernateException;
import org.hibernate.MappingException;
import org.hibernate.criterion.Projections;
import org.hibernate.metadata.ClassMetadata;
import org.hibernate.persister.entity.EntityPersister;
+import org.hibernate.shards.defaultmock.EntityPersisterDefaultMock;
+import org.hibernate.shards.defaultmock.SessionFactoryDefaultMock;
+import org.hibernate.shards.util.StringUtil;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
Modified: shards/trunk/src/test/org/hibernate/shards/strategy/exit/RowCountExitOperationTest.java
===================================================================
--- shards/trunk/src/test/org/hibernate/shards/strategy/exit/RowCountExitOperationTest.java 2007-07-11 23:03:33 UTC (rev 12755)
+++ shards/trunk/src/test/org/hibernate/shards/strategy/exit/RowCountExitOperationTest.java 2007-07-12 04:17:22 UTC (rev 12756)
@@ -18,11 +18,9 @@
package org.hibernate.shards.strategy.exit;
-import org.hibernate.shards.util.Lists;
-
import junit.framework.TestCase;
-
import org.hibernate.criterion.Projections;
+import org.hibernate.shards.util.Lists;
import java.util.List;
Modified: shards/trunk/src/test/org/hibernate/shards/transaction/ShardedTransactionImplTest.java
===================================================================
--- shards/trunk/src/test/org/hibernate/shards/transaction/ShardedTransactionImplTest.java 2007-07-11 23:03:33 UTC (rev 12755)
+++ shards/trunk/src/test/org/hibernate/shards/transaction/ShardedTransactionImplTest.java 2007-07-12 04:17:22 UTC (rev 12756)
@@ -19,7 +19,6 @@
package org.hibernate.shards.transaction;
import junit.framework.TestCase;
-
import org.hibernate.HibernateException;
import org.hibernate.Transaction;
import org.hibernate.TransactionException;
@@ -31,10 +30,9 @@
import org.hibernate.shards.engine.ShardedSessionImplementorDefaultMock;
import org.hibernate.shards.util.Lists;
+import javax.transaction.Synchronization;
import java.util.List;
-import javax.transaction.Synchronization;
-
/**
* @author tomislav(a)google.com (Tomislav Nad)
*/
Modified: shards/trunk/src/test/org/hibernate/shards/util/JdbcUtil.java
===================================================================
--- shards/trunk/src/test/org/hibernate/shards/util/JdbcUtil.java 2007-07-11 23:03:33 UTC (rev 12755)
+++ shards/trunk/src/test/org/hibernate/shards/util/JdbcUtil.java 2007-07-12 04:17:22 UTC (rev 12756)
@@ -21,7 +21,11 @@
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
-import java.sql.*;
+import java.sql.Connection;
+import java.sql.PreparedStatement;
+import java.sql.ResultSet;
+import java.sql.SQLException;
+import java.sql.Statement;
/**
* Helper methods for Jdbc
17 years, 6 months
Hibernate SVN: r12755 - in trunk/HibernateExt/annotations: src/java/org/hibernate/cfg/annotations and 1 other directory.
by hibernate-commits@lists.jboss.org
Author: epbernard
Date: 2007-07-11 19:03:33 -0400 (Wed, 11 Jul 2007)
New Revision: 12755
Modified:
trunk/HibernateExt/annotations/doc/reference/en/modules/entity.xml
trunk/HibernateExt/annotations/src/java/org/hibernate/cfg/annotations/EntityBinder.java
Log:
ANN-606 Warn when @Immutable is used on a sub entity
Modified: trunk/HibernateExt/annotations/doc/reference/en/modules/entity.xml
===================================================================
--- trunk/HibernateExt/annotations/doc/reference/en/modules/entity.xml 2007-07-11 22:20:24 UTC (rev 12754)
+++ trunk/HibernateExt/annotations/doc/reference/en/modules/entity.xml 2007-07-11 23:03:33 UTC (rev 12755)
@@ -2244,7 +2244,7 @@
<classname>org.hibernate.annotations</classname> package contains all
these annotations extensions.</para>
- <sect2 id="entity-hibspec-entity" revision="3">
+ <sect2 id="entity-hibspec-entity" revision="4">
<title>Entity</title>
<para>You can fine tune some of the actions done by Hibernate on
@@ -2362,7 +2362,8 @@
<para><literal>@Immutable</literal> marks an entity as immutable. The
entity may not be updated or deleted by the application. This allows
- Hibernate to make some minor performance optimizations.</para>
+ Hibernate to make some minor performance optimizations.
+ <literal>@Immutable</literal> must be use on root entities only.</para>
<para><literal>@Persister</literal> lets you define your own custom
persistence strategy. You may, for example, specify your own subclass of
Modified: trunk/HibernateExt/annotations/src/java/org/hibernate/cfg/annotations/EntityBinder.java
===================================================================
--- trunk/HibernateExt/annotations/src/java/org/hibernate/cfg/annotations/EntityBinder.java 2007-07-11 22:20:24 UTC (rev 12754)
+++ trunk/HibernateExt/annotations/src/java/org/hibernate/cfg/annotations/EntityBinder.java 2007-07-11 23:03:33 UTC (rev 12755)
@@ -196,6 +196,10 @@
log.warn( "@org.hibernate.annotations.Entity used on a non root entity: ignored for "
+ annotatedClass.getName() );
}
+ if ( annotatedClass.isAnnotationPresent( Immutable.class ) ) {
+ log.warn( "@Immutable used on a non root entity: ignored for "
+ + annotatedClass.getName() );
+ }
}
persistentClass.setOptimisticLockMode( getVersioning( optimisticLockType ) );
persistentClass.setSelectBeforeUpdate( selectBeforeUpdate );
17 years, 6 months