[jboss-cvs] jboss-seam/examples/wiki/src/main/org/jboss/seam/wiki/core/model ...

Christian Bauer christian at hibernate.org
Thu Apr 26 01:29:17 EDT 2007


  User: cbauer  
  Date: 07/04/26 01:29:17

  Modified:    examples/wiki/src/main/org/jboss/seam/wiki/core/model   
                        Document.java Node.java File.java
  Log:
  Broken Hibernate Search integration, to debug for Emmanuel
  
  Revision  Changes    Path
  1.9       +2 -1      jboss-seam/examples/wiki/src/main/org/jboss/seam/wiki/core/model/Document.java
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: Document.java
  ===================================================================
  RCS file: /cvsroot/jboss/jboss-seam/examples/wiki/src/main/org/jboss/seam/wiki/core/model/Document.java,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -b -r1.8 -r1.9
  --- Document.java	19 Apr 2007 09:32:05 -0000	1.8
  +++ Document.java	26 Apr 2007 05:29:17 -0000	1.9
  @@ -1,16 +1,17 @@
   package org.jboss.seam.wiki.core.model;
   
   import org.hibernate.validator.Length;
  -import org.jboss.seam.annotations.security.Restrict;
   
   import javax.persistence.*;
   
   @Entity
   @DiscriminatorValue("DOCUMENT")
  + at org.hibernate.search.annotations.Indexed(index = "Document")
   public class Document extends Node {
   
       @Column(name = "CONTENT")
       @Length(min = 1, max = 32768)
  +    @org.hibernate.search.annotations.Field(index = org.hibernate.search.annotations.Index.TOKENIZED)
       private String content;
   
       @Column(name = "NAME_AS_TITLE")
  
  
  
  1.12      +1 -0      jboss-seam/examples/wiki/src/main/org/jboss/seam/wiki/core/model/Node.java
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: Node.java
  ===================================================================
  RCS file: /cvsroot/jboss/jboss-seam/examples/wiki/src/main/org/jboss/seam/wiki/core/model/Node.java,v
  retrieving revision 1.11
  retrieving revision 1.12
  diff -u -b -r1.11 -r1.12
  --- Node.java	21 Apr 2007 19:58:02 -0000	1.11
  +++ Node.java	26 Apr 2007 05:29:17 -0000	1.12
  @@ -42,6 +42,7 @@
       @Id
       @GeneratedValue(generator = "wikiSequenceGenerator")
       @Column(name = "NODE_ID")
  +    @org.hibernate.search.annotations.DocumentId(name = "id")
       protected Long nodeId;
   
       @Version
  
  
  
  1.6       +0 -13     jboss-seam/examples/wiki/src/main/org/jboss/seam/wiki/core/model/File.java
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: File.java
  ===================================================================
  RCS file: /cvsroot/jboss/jboss-seam/examples/wiki/src/main/org/jboss/seam/wiki/core/model/File.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -b -r1.5 -r1.6
  --- File.java	21 Apr 2007 08:13:50 -0000	1.5
  +++ File.java	26 Apr 2007 05:29:17 -0000	1.6
  @@ -109,17 +109,4 @@
           return getName();
       }
   
  -    public String getHumanReadableFilesize() {
  -        // TODO: Yeah, that could be done smarter..
  -        if (getFilesize() >= 1073741824) {
  -            return new BigDecimal(getFilesize() / 1024 / 1024 / 1024) + " GiB";
  -        }else if (getFilesize() >= 1048576) {
  -            return new BigDecimal(getFilesize() / 1024 / 1024) + "MiB";
  -        } else if (getFilesize() >= 1024) {
  -            return new BigDecimal(getFilesize() / 1024) + " KiB";
  -        } else {
  -            return new BigDecimal(getFilesize()) + " Bytes";
  -        }
  -    }
  -
   }
  
  
  



More information about the jboss-cvs-commits mailing list