diff --git a/hibernate-core/src/test/java/org/hibernate/test/annotations/lob/AbstractBook.java b/hibernate-core/src/test/java/org/hibernate/test/annotations/lob/AbstractBook.java
index 555e44a587..c1a4bdb4e5 100644
--- a/hibernate-core/src/test/java/org/hibernate/test/annotations/lob/AbstractBook.java
+++ b/hibernate-core/src/test/java/org/hibernate/test/annotations/lob/AbstractBook.java
@@ -22,6 +22,7 @@
* Boston, MA 02110-1301 USA
*/
package org.hibernate.test.annotations.lob;
+
import javax.persistence.Column;
import javax.persistence.Lob;
import javax.persistence.MappedSuperclass;
diff --git a/hibernate-core/src/test/java/org/hibernate/test/annotations/lob/AbstractCompiledCode.java b/hibernate-core/src/test/java/org/hibernate/test/annotations/lob/AbstractCompiledCode.java
index d8e149693d..bbe8db7c2c 100644
--- a/hibernate-core/src/test/java/org/hibernate/test/annotations/lob/AbstractCompiledCode.java
+++ b/hibernate-core/src/test/java/org/hibernate/test/annotations/lob/AbstractCompiledCode.java
@@ -22,6 +22,7 @@
* Boston, MA 02110-1301 USA
*/
package org.hibernate.test.annotations.lob;
+
import javax.persistence.Lob;
import javax.persistence.MappedSuperclass;
diff --git a/hibernate-core/src/test/java/org/hibernate/test/annotations/lob/AbstractLobTest.java b/hibernate-core/src/test/java/org/hibernate/test/annotations/lob/AbstractLobTest.java
index 2724a503bc..2e20006804 100644
--- a/hibernate-core/src/test/java/org/hibernate/test/annotations/lob/AbstractLobTest.java
+++ b/hibernate-core/src/test/java/org/hibernate/test/annotations/lob/AbstractLobTest.java
@@ -45,7 +45,7 @@ public abstract class AbstractLobTest {
diff --git a/hibernate-core/src/test/java/org/hibernate/test/annotations/lob/CompiledCode.java b/hibernate-core/src/test/java/org/hibernate/test/annotations/lob/CompiledCode.java
index d0f6ed4dfb..f9986cc721 100644
--- a/hibernate-core/src/test/java/org/hibernate/test/annotations/lob/CompiledCode.java
+++ b/hibernate-core/src/test/java/org/hibernate/test/annotations/lob/CompiledCode.java
@@ -1,5 +1,29 @@
-//$Id$
+/*
+ * Hibernate, Relational Persistence for Idiomatic Java
+ *
+ * Copyright (c) 2008, Red Hat Middleware LLC or third-party contributors as
+ * indicated by the @author tags or express copyright attribution
+ * statements applied by the authors. All third-party contributions are
+ * distributed under license by Red Hat Middleware LLC.
+ *
+ * This copyrighted material is made available to anyone wishing to use, modify,
+ * copy, or redistribute it subject to the terms and conditions of the GNU
+ * Lesser General Public License, as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+ * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
+ * for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this distribution; if not, write to:
+ * Free Software Foundation, Inc.
+ * 51 Franklin Street, Fifth Floor
+ * Boston, MA 02110-1301 USA
+ *
+ */
package org.hibernate.test.annotations.lob;
+
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
diff --git a/hibernate-core/src/test/java/org/hibernate/test/annotations/lob/Dog.java b/hibernate-core/src/test/java/org/hibernate/test/annotations/lob/Dog.java
index 72d3eb2839..b43f0a9822 100644
--- a/hibernate-core/src/test/java/org/hibernate/test/annotations/lob/Dog.java
+++ b/hibernate-core/src/test/java/org/hibernate/test/annotations/lob/Dog.java
@@ -1,4 +1,29 @@
+/*
+ * Hibernate, Relational Persistence for Idiomatic Java
+ *
+ * Copyright (c) 2008, Red Hat Middleware LLC or third-party contributors as
+ * indicated by the @author tags or express copyright attribution
+ * statements applied by the authors. All third-party contributions are
+ * distributed under license by Red Hat Middleware LLC.
+ *
+ * This copyrighted material is made available to anyone wishing to use, modify,
+ * copy, or redistribute it subject to the terms and conditions of the GNU
+ * Lesser General Public License, as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+ * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
+ * for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this distribution; if not, write to:
+ * Free Software Foundation, Inc.
+ * 51 Franklin Street, Fifth Floor
+ * Boston, MA 02110-1301 USA
+ *
+ */
package org.hibernate.test.annotations.lob;
+
import java.io.Serializable;
public class Dog implements Serializable {
diff --git a/hibernate-core/src/test/java/org/hibernate/test/annotations/lob/Editor.java b/hibernate-core/src/test/java/org/hibernate/test/annotations/lob/Editor.java
index 4f80088100..5aa035e987 100644
--- a/hibernate-core/src/test/java/org/hibernate/test/annotations/lob/Editor.java
+++ b/hibernate-core/src/test/java/org/hibernate/test/annotations/lob/Editor.java
@@ -1,5 +1,29 @@
-//$Id$
+/*
+ * Hibernate, Relational Persistence for Idiomatic Java
+ *
+ * Copyright (c) 2008, Red Hat Middleware LLC or third-party contributors as
+ * indicated by the @author tags or express copyright attribution
+ * statements applied by the authors. All third-party contributions are
+ * distributed under license by Red Hat Middleware LLC.
+ *
+ * This copyrighted material is made available to anyone wishing to use, modify,
+ * copy, or redistribute it subject to the terms and conditions of the GNU
+ * Lesser General Public License, as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+ * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
+ * for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this distribution; if not, write to:
+ * Free Software Foundation, Inc.
+ * 51 Franklin Street, Fifth Floor
+ * Boston, MA 02110-1301 USA
+ *
+ */
package org.hibernate.test.annotations.lob;
+
import java.io.Serializable;
/**
diff --git a/hibernate-core/src/test/java/org/hibernate/test/annotations/lob/ImageHolder.java b/hibernate-core/src/test/java/org/hibernate/test/annotations/lob/ImageHolder.java
index 029ae45d07..058c9a29b2 100644
--- a/hibernate-core/src/test/java/org/hibernate/test/annotations/lob/ImageHolder.java
+++ b/hibernate-core/src/test/java/org/hibernate/test/annotations/lob/ImageHolder.java
@@ -1,4 +1,3 @@
-//$Id: $
/*
* Hibernate, Relational Persistence for Idiomatic Java
*
@@ -24,6 +23,7 @@
*
*/
package org.hibernate.test.annotations.lob;
+
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
@@ -31,8 +31,8 @@ import javax.persistence.Id;
/**
* An entity containing data that is materialized into a byte array immediately.
* The hibernate type mapped for {@link #longByteArray} determines the SQL type
- * asctually used.
- *
+ * actually used.
+ *
* @author Gail Badner
*/
@Entity
@@ -51,8 +51,8 @@ public class ImageHolder {
public void setId(Long id) {
this.id = id;
}
-
- @org.hibernate.annotations.Type(type="image")
+
+ @org.hibernate.annotations.Type(type = "image")
public byte[] getLongByteArray() {
return longByteArray;
}
@@ -60,7 +60,8 @@ public class ImageHolder {
public void setLongByteArray(byte[] longByteArray) {
this.longByteArray = longByteArray;
}
- @org.hibernate.annotations.Type(type="serializable_image")
+
+ @org.hibernate.annotations.Type(type = "serializable_image")
public Dog getDog() {
return dog;
}
@@ -68,7 +69,8 @@ public class ImageHolder {
public void setDog(Dog dog) {
this.dog = dog;
}
- @org.hibernate.annotations.Type(type="wrapped_image")
+
+ @org.hibernate.annotations.Type(type = "wrapped_image")
public Byte[] getPicByteArray() {
return picByteArray;
}
diff --git a/hibernate-core/src/test/java/org/hibernate/test/annotations/lob/ImageTest.java b/hibernate-core/src/test/java/org/hibernate/test/annotations/lob/ImageTest.java
index 2f1308f643..684666c0bd 100644
--- a/hibernate-core/src/test/java/org/hibernate/test/annotations/lob/ImageTest.java
+++ b/hibernate-core/src/test/java/org/hibernate/test/annotations/lob/ImageTest.java
@@ -42,74 +42,74 @@ import org.hibernate.testing.junit4.BaseCoreFunctionalTestCase;
*
* @author Gail Badner
*/
-@RequiresDialect( { SybaseASE15Dialect.class, SQLServerDialect.class, SybaseDialect.class, Sybase11Dialect.class })
+@RequiresDialect({ SybaseASE15Dialect.class, SQLServerDialect.class, SybaseDialect.class, Sybase11Dialect.class })
public class ImageTest extends BaseCoreFunctionalTestCase {
private static final int ARRAY_SIZE = 10000;
@Test
public void testBoundedLongByteArrayAccess() {
- byte[] original = buildRecursively(ARRAY_SIZE, true);
- byte[] changed = buildRecursively(ARRAY_SIZE, false);
+ byte[] original = buildRecursively( ARRAY_SIZE, true );
+ byte[] changed = buildRecursively( ARRAY_SIZE, false );
Session s = openSession();
s.beginTransaction();
ImageHolder entity = new ImageHolder();
- s.save(entity);
+ s.save( entity );
s.getTransaction().commit();
s.close();
s = openSession();
s.beginTransaction();
- entity = (ImageHolder) s.get(ImageHolder.class, entity.getId());
+ entity = ( ImageHolder ) s.get( ImageHolder.class, entity.getId() );
Assert.assertNull( entity.getLongByteArray() );
Assert.assertNull( entity.getDog() );
Assert.assertNull( entity.getPicByteArray() );
- entity.setLongByteArray(original);
+ entity.setLongByteArray( original );
Dog dog = new Dog();
- dog.setName("rabbit");
- entity.setDog(dog);
- entity.setPicByteArray(wrapPrimitive(original));
+ dog.setName( "rabbit" );
+ entity.setDog( dog );
+ entity.setPicByteArray( wrapPrimitive( original ) );
s.getTransaction().commit();
s.close();
s = openSession();
s.beginTransaction();
- entity = (ImageHolder) s.get(ImageHolder.class, entity.getId());
+ entity = ( ImageHolder ) s.get( ImageHolder.class, entity.getId() );
Assert.assertEquals( ARRAY_SIZE, entity.getLongByteArray().length );
- assertEquals(original, entity.getLongByteArray());
+ assertEquals( original, entity.getLongByteArray() );
Assert.assertEquals( ARRAY_SIZE, entity.getPicByteArray().length );
- assertEquals(original, unwrapNonPrimitive(entity.getPicByteArray()));
+ assertEquals( original, unwrapNonPrimitive( entity.getPicByteArray() ) );
Assert.assertNotNull( entity.getDog() );
Assert.assertEquals( dog.getName(), entity.getDog().getName() );
- entity.setLongByteArray(changed);
- entity.setPicByteArray(wrapPrimitive(changed));
- dog.setName("papa");
- entity.setDog(dog);
+ entity.setLongByteArray( changed );
+ entity.setPicByteArray( wrapPrimitive( changed ) );
+ dog.setName( "papa" );
+ entity.setDog( dog );
s.getTransaction().commit();
s.close();
s = openSession();
s.beginTransaction();
- entity = (ImageHolder) s.get(ImageHolder.class, entity.getId());
+ entity = ( ImageHolder ) s.get( ImageHolder.class, entity.getId() );
Assert.assertEquals( ARRAY_SIZE, entity.getLongByteArray().length );
- assertEquals(changed, entity.getLongByteArray());
+ assertEquals( changed, entity.getLongByteArray() );
Assert.assertEquals( ARRAY_SIZE, entity.getPicByteArray().length );
- assertEquals(changed, unwrapNonPrimitive(entity.getPicByteArray()));
+ assertEquals( changed, unwrapNonPrimitive( entity.getPicByteArray() ) );
Assert.assertNotNull( entity.getDog() );
Assert.assertEquals( dog.getName(), entity.getDog().getName() );
- entity.setLongByteArray(null);
- entity.setPicByteArray(null);
- entity.setDog(null);
+ entity.setLongByteArray( null );
+ entity.setPicByteArray( null );
+ entity.setDog( null );
s.getTransaction().commit();
s.close();
s = openSession();
s.beginTransaction();
- entity = (ImageHolder) s.get(ImageHolder.class, entity.getId());
+ entity = ( ImageHolder ) s.get( ImageHolder.class, entity.getId() );
Assert.assertNull( entity.getLongByteArray() );
Assert.assertNull( entity.getDog() );
Assert.assertNull( entity.getPicByteArray() );
- s.delete(entity);
+ s.delete( entity );
s.getTransaction().commit();
s.close();
}
@@ -117,7 +117,7 @@ public class ImageTest extends BaseCoreFunctionalTestCase {
private Byte[] wrapPrimitive(byte[] bytes) {
int length = bytes.length;
Byte[] result = new Byte[length];
- for (int index = 0; index < length; index++) {
+ for ( int index = 0; index < length; index++ ) {
result[index] = Byte.valueOf( bytes[index] );
}
return result;
@@ -126,7 +126,7 @@ public class ImageTest extends BaseCoreFunctionalTestCase {
private byte[] unwrapNonPrimitive(Byte[] bytes) {
int length = bytes.length;
byte[] result = new byte[length];
- for (int i = 0; i < length; i++) {
+ for ( int i = 0; i < length; i++ ) {
result[i] = bytes[i].byteValue();
}
return result;
@@ -134,21 +134,21 @@ public class ImageTest extends BaseCoreFunctionalTestCase {
private byte[] buildRecursively(int size, boolean on) {
byte[] data = new byte[size];
- data[0] = mask(on);
- for (int i = 0; i < size; i++) {
- data[i] = mask(on);
+ data[0] = mask( on );
+ for ( int i = 0; i < size; i++ ) {
+ data[i] = mask( on );
on = !on;
}
return data;
}
private byte mask(boolean on) {
- return on ? (byte) 1 : (byte) 0;
+ return on ? ( byte ) 1 : ( byte ) 0;
}
public static void assertEquals(byte[] val1, byte[] val2) {
- if (!ArrayHelper.isEquals( val1, val2 )) {
- throw new AssertionFailedError("byte arrays did not match");
+ if ( !ArrayHelper.isEquals( val1, val2 ) ) {
+ throw new AssertionFailedError( "byte arrays did not match" );
}
}
@@ -158,7 +158,7 @@ public class ImageTest extends BaseCoreFunctionalTestCase {
}
@Override
- public Class>[] getAnnotatedClasses() {
+ public Class>[] getAnnotatedClasses() {
return new Class[] { ImageHolder.class };
}
diff --git a/hibernate-core/src/test/java/org/hibernate/test/annotations/lob/LobTest.java b/hibernate-core/src/test/java/org/hibernate/test/annotations/lob/LobTest.java
index c83315a334..87c5b754a5 100644
--- a/hibernate-core/src/test/java/org/hibernate/test/annotations/lob/LobTest.java
+++ b/hibernate-core/src/test/java/org/hibernate/test/annotations/lob/LobTest.java
@@ -1,8 +1,7 @@
-//$Id$
/*
* Hibernate, Relational Persistence for Idiomatic Java
*
- * Copyright (c) 2010, Red Hat Inc. or third-party contributors as
+ * Copyright (c) 2008, Red Hat Inc. or third-party contributors as
* indicated by the @author tags or express copyright attribution
* statements applied by the authors. All third-party contributions are
* distributed under license by Red Hat Inc.
@@ -25,14 +24,12 @@
package org.hibernate.test.annotations.lob;
import org.hibernate.testing.DialectChecks;
-import org.hibernate.testing.FailureExpectedWithNewMetamodel;
import org.hibernate.testing.RequiresDialectFeature;
/**
* @author Emmanuel Bernard
*/
@RequiresDialectFeature(DialectChecks.SupportsExpectedLobUsagePattern.class)
-@FailureExpectedWithNewMetamodel
public class LobTest extends AbstractLobTest