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

Christian Bauer christian at hibernate.org
Mon Mar 19 22:38:14 EDT 2007


  User: cbauer  
  Date: 07/03/19 22:38:14

  Modified:    examples/wiki/src/main/org/jboss/seam/wiki/core/model  
                        Document.java Node.java
  Log:
  Implemented moving of documents and files between directories
  
  Revision  Changes    Path
  1.4       +0 -0      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.)
  
  
  
  
  1.6       +11 -4     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.5
  retrieving revision 1.6
  diff -u -b -r1.5 -r1.6
  --- Node.java	19 Mar 2007 04:53:53 -0000	1.5
  +++ Node.java	20 Mar 2007 02:38:14 -0000	1.6
  @@ -70,7 +70,7 @@
       @JoinColumn(name = "PARENT_NODE_ID", nullable = true, insertable = false, updatable = false)
       protected Node parent;
   
  -    @OneToMany(cascade = CascadeType.PERSIST, fetch = FetchType.LAZY)
  +    @OneToMany(fetch = FetchType.LAZY)
       @JoinColumn(name = "PARENT_NODE_ID", nullable = true)
       @org.hibernate.annotations.IndexColumn(name = "NODE_POSITION")
       /* Filtering fucks up the list index... big issue to work around
  @@ -112,12 +112,17 @@
   
       /**
        * Creates copy for history archiving, increments originals revision.
  +     * <p>
  +     * Does <b>NOT</b> copy the node id and object version, so the copy might as well be
  +     * considered transient and can be persisted right away. If you want to store the
  +     * copy in the audit log, call setId() manually before on the copy, passing in the
  +     * identifier value of the original.
  +     * </p>
        * @param original The node to make a copy of
        */
       public Node(Node original) {
           if (original == null) return;
           this.revision = original.revision;
  -        this.nodeId = original.nodeId;
           this.name = original.name;
           this.wikiname = original.wikiname;
           this.lastModifiedOn = original.lastModifiedOn;
  @@ -126,8 +131,6 @@
   
       // Immutable properties
   
  -    public Long getId() { return nodeId; }
  -
       public Integer getVersion() { return version; }
       public Date getCreatedOn() { return createdOn; }
       public int getRevision() { return revision; }
  @@ -135,6 +138,9 @@
   
       // Mutable properties
   
  +    public Long getId() { return nodeId; }
  +    public void setId(Long nodeId) { this.nodeId = nodeId; }
  +
       public String getName() {
            return name;
       }
  @@ -211,6 +217,7 @@
   
       public void setLastModifiedBy(User lastModifiedBy) {
           this.lastModifiedBy = lastModifiedBy;
  +        this.lastModifiedByUsername = lastModifiedBy.getUsername();
       }
   
       public String getLastModifiedByUsername() {
  
  
  



More information about the jboss-cvs-commits mailing list