[hibernate-commits] Hibernate SVN: r20259 - search/trunk/hibernate-search/src/test/java/org/hibernate/search/test.
hibernate-commits at lists.jboss.org
hibernate-commits at lists.jboss.org
Wed Aug 25 06:32:57 EDT 2010
Author: hardy.ferentschik
Date: 2010-08-25 06:32:57 -0400 (Wed, 25 Aug 2010)
New Revision: 20259
Modified:
search/trunk/hibernate-search/src/test/java/org/hibernate/search/test/Document.java
search/trunk/hibernate-search/src/test/java/org/hibernate/search/test/TransactionTest.java
Log:
HSEARCH-589 Removed @Lob in Document
Modified: search/trunk/hibernate-search/src/test/java/org/hibernate/search/test/Document.java
===================================================================
--- search/trunk/hibernate-search/src/test/java/org/hibernate/search/test/Document.java 2010-08-24 17:19:03 UTC (rev 20258)
+++ search/trunk/hibernate-search/src/test/java/org/hibernate/search/test/Document.java 2010-08-25 10:32:57 UTC (rev 20259)
@@ -1,39 +1,37 @@
-/* $Id$
- *
+/*
* Hibernate, Relational Persistence for Idiomatic Java
- *
- * Copyright (c) 2009, Red Hat, Inc. and/or its affiliates or third-party contributors as
- * indicated by the @author tags or express copyright attribution
- * statements applied by the authors. All third-party contributions are
- * distributed under license by Red Hat, Inc.
- *
- * This copyrighted material is made available to anyone wishing to use, modify,
- * copy, or redistribute it subject to the terms and conditions of the GNU
- * Lesser General Public License, as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
- * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
- * for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this distribution; if not, write to:
- * Free Software Foundation, Inc.
- * 51 Franklin Street, Fifth Floor
- * Boston, MA 02110-1301 USA
+ *
+ * Copyright (c) 2010, Red Hat, Inc. and/or its affiliates or third-party contributors as
+ * indicated by the @author tags or express copyright attribution
+ * statements applied by the authors. All third-party contributions are
+ * distributed under license by Red Hat, Inc.
+ *
+ * This copyrighted material is made available to anyone wishing to use, modify,
+ * copy, or redistribute it subject to the terms and conditions of the GNU
+ * Lesser General Public License, as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+ * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
+ * for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this distribution; if not, write to:
+ * Free Software Foundation, Inc.
+ * 51 Franklin Street, Fifth Floor
+ * Boston, MA 02110-1301 USA
*/
package org.hibernate.search.test;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
-import javax.persistence.Lob;
-import org.hibernate.search.annotations.Indexed;
import org.hibernate.search.annotations.Boost;
+import org.hibernate.search.annotations.DocumentId;
import org.hibernate.search.annotations.Field;
import org.hibernate.search.annotations.Index;
-import org.hibernate.search.annotations.DocumentId;
+import org.hibernate.search.annotations.Indexed;
import org.hibernate.search.annotations.Store;
@Entity
@@ -44,9 +42,6 @@
private String summary;
private String text;
- Document() {
- }
-
public Document(String title, String summary, String text) {
super();
this.summary = summary;
@@ -56,7 +51,7 @@
@Id
@GeneratedValue
- @DocumentId
+ @DocumentId
public Long getId() {
return id;
}
@@ -65,8 +60,8 @@
this.id = id;
}
- @Field( store = Store.YES, index = Index.TOKENIZED )
- @Boost(2)
+ @Field(store = Store.YES, index = Index.TOKENIZED)
+ @Boost(2)
public String getTitle() {
return title;
}
@@ -75,8 +70,8 @@
this.title = title;
}
- @Field( name="Abstract", store = Store.NO, index = Index.TOKENIZED )
- public String getSummary() {
+ @Field(name = "Abstract", store = Store.NO, index = Index.TOKENIZED)
+ public String getSummary() {
return summary;
}
@@ -84,9 +79,8 @@
this.summary = summary;
}
- @Lob
- @Field( store = Store.NO, index = Index.TOKENIZED )
- public String getText() {
+ @Field(store = Store.NO, index = Index.TOKENIZED)
+ public String getText() {
return text;
}
Modified: search/trunk/hibernate-search/src/test/java/org/hibernate/search/test/TransactionTest.java
===================================================================
--- search/trunk/hibernate-search/src/test/java/org/hibernate/search/test/TransactionTest.java 2010-08-24 17:19:03 UTC (rev 20258)
+++ search/trunk/hibernate-search/src/test/java/org/hibernate/search/test/TransactionTest.java 2010-08-25 10:32:57 UTC (rev 20259)
@@ -1,26 +1,25 @@
-/* $Id$
- *
+/*
* Hibernate, Relational Persistence for Idiomatic Java
- *
- * Copyright (c) 2009, Red Hat, Inc. and/or its affiliates or third-party contributors as
- * indicated by the @author tags or express copyright attribution
- * statements applied by the authors. All third-party contributions are
- * distributed under license by Red Hat, Inc.
- *
- * This copyrighted material is made available to anyone wishing to use, modify,
- * copy, or redistribute it subject to the terms and conditions of the GNU
- * Lesser General Public License, as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
- * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
- * for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this distribution; if not, write to:
- * Free Software Foundation, Inc.
- * 51 Franklin Street, Fifth Floor
- * Boston, MA 02110-1301 USA
+ *
+ * Copyright (c) 2010, Red Hat, Inc. and/or its affiliates or third-party contributors as
+ * indicated by the @author tags or express copyright attribution
+ * statements applied by the authors. All third-party contributions are
+ * distributed under license by Red Hat, Inc.
+ *
+ * This copyrighted material is made available to anyone wishing to use, modify,
+ * copy, or redistribute it subject to the terms and conditions of the GNU
+ * Lesser General Public License, as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+ * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
+ * for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this distribution; if not, write to:
+ * Free Software Foundation, Inc.
+ * 51 Franklin Street, Fifth Floor
+ * Boston, MA 02110-1301 USA
*/
package org.hibernate.search.test;
@@ -64,7 +63,7 @@
s.close();
assertEquals( "rollback() should not index", 3, getDocumentNumber() );
-
+
s = getSessions().openSession();
s.connection().setAutoCommit( true ); // www.hibernate.org/403.html
s.persist(
@@ -72,7 +71,7 @@
"Java Persistence with Hibernate", "Object/relational mapping with Hibernate", "blah blah blah"
)
);
- s.flush();
+ s.flush();
s.close();
assertEquals( "no transaction should index", 4, getDocumentNumber() );
@@ -92,5 +91,4 @@
protected Class<?>[] getAnnotatedClasses() {
return new Class[] { Document.class };
}
-
}
More information about the hibernate-commits
mailing list