[jboss-cvs] jboss-seam/examples/blog/src/domain ...

Emmanuel Bernard emmanuel.bernard at jboss.com
Tue Jun 26 21:56:45 EDT 2007


  User: ebernard
  Date: 07/06/26 21:56:45

  Modified:    examples/blog/src/domain  BlogEntry.java
  Log:
  Use Hibernate Search in the blog example
  
  Revision  Changes    Path
  1.3       +8 -0      jboss-seam/examples/blog/src/domain/BlogEntry.java
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: BlogEntry.java
  ===================================================================
  RCS file: /cvsroot/jboss/jboss-seam/examples/blog/src/domain/BlogEntry.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -b -r1.2 -r1.3
  --- BlogEntry.java	25 Mar 2006 17:43:13 -0000	1.2
  +++ BlogEntry.java	27 Jun 2007 01:56:45 -0000	1.3
  @@ -10,6 +10,10 @@
   import org.hibernate.annotations.CacheConcurrencyStrategy;
   import org.hibernate.validator.Length;
   import org.hibernate.validator.NotNull;
  +import org.hibernate.search.annotations.Indexed;
  +import org.hibernate.search.annotations.DocumentId;
  +import org.hibernate.search.annotations.Field;
  +import org.hibernate.search.annotations.Index;
   
   /**
    * Represents a blog entry.
  @@ -18,18 +22,22 @@
    */
   @Entity
   @Cache(usage=CacheConcurrencyStrategy.NONSTRICT_READ_WRITE)
  + at Indexed
   public class BlogEntry {
   
     @Id @Length(min=1, max=20)
  +  @DocumentId
     private String id;
     
     @NotNull @Length(max=70)
  +  @Field(index = Index.TOKENIZED)
     private String title;
     
     @Length(max=200)
     private String excerpt;
     
     @NotNull @Length(max=1400)
  +  @Field(index = Index.TOKENIZED)
     private String body;
     
     @NotNull
  
  
  



More information about the jboss-cvs-commits mailing list