File Source: WeblogEntryTag.java

         /* 
    P/P   *  Method: void readObject(ObjectInputStream)
          * 
          *  Preconditions:
          *    Param_1 != null
          * 
          *  Presumptions:
          *    init'ed(org.apache.openjpa.enhance.PersistenceCapable.DESERIALIZED)
          * 
          *  Postconditions:
          *    Param_0.pcDetachedState == org.apache.openjpa.enhance.PersistenceCapable.DESERIALIZED
          *    (soft) init'ed(Param_0.pcDetachedState)
          */
     1  /*
     2   * Licensed to the Apache Software Foundation (ASF) under one or more
     3   *  contributor license agreements.  The ASF licenses this file to You
     4   * under the Apache License, Version 2.0 (the "License"); you may not
     5   * use this file except in compliance with the License.
     6   * You may obtain a copy of the License at
     7   *
     8   *     http://www.apache.org/licenses/LICENSE-2.0
     9   *
    10   * Unless required by applicable law or agreed to in writing, software
    11   * distributed under the License is distributed on an "AS IS" BASIS,
    12   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    13   * See the License for the specific language governing permissions and
    14   * limitations under the License.  For additional information regarding
    15   * copyright in this work, please see the NOTICE file in the top level
    16   * directory of this distribution.
    17   */
    18  
    19  package org.apache.roller.weblogger.pojos;
    20  
    21  import java.io.Serializable;
    22  import java.sql.Timestamp;
    23  import org.apache.commons.lang.builder.EqualsBuilder;
    24  import org.apache.commons.lang.builder.HashCodeBuilder;
    25  import org.apache.roller.util.UUIDGenerator;
    26  
    27  
    28  /**
    29   * Tag bean.
    30   *
    31   * @author Elias Torres
    32   */
    33  public class WeblogEntryTag implements Serializable {
    34      
    35      private static final long serialVersionUID = -2602052289337573384L;
    36      
    37      private String id = UUIDGenerator.generateUUID();
    38      private Weblog website = null;
    39      private WeblogEntry weblogEntry = null;
    40      private User user = null;
    41      private String name = null;
    42      private Timestamp time = null;
    43      
    44      
             /* 
    P/P       *  Method: void org.apache.roller.weblogger.pojos.WeblogEntryTag()
              * 
              *  Postconditions:
              *    init'ed(this.id)
              *    this.name == null
              *    this.time == null
              *    this.user == null
              *    this.weblogEntry == null
              *    this.website == null
              */
    45      public WeblogEntryTag() {
    46      }
    47      
    48      public WeblogEntryTag(String id,
    49              Weblog website,WeblogEntry weblogEntry,
    50              User user, String name,
                     /* 
    P/P               *  Method: void org.apache.roller.weblogger.pojos.WeblogEntryTag(String, Weblog, WeblogEntry, User, String, Timestamp)
                      * 
                      *  Postconditions:
                      *    init'ed(this.id)
                      *    this.name == name
                      *    init'ed(this.name)
                      *    this.time == time
                      *    init'ed(this.time)
                      *    this.user == user
                      *    init'ed(this.user)
                      *    this.weblogEntry == weblogEntry
                      *    init'ed(this.weblogEntry)
                      *    this.website == website
                      *    ...
                      */
    51              Timestamp time) {
    52          //this.id = id;
    53          this.website = website;
    54          this.weblogEntry = weblogEntry;
    55          this.user = user;
    56          this.name = name;
    57          this.time = time;
    58      }
    59      
    60      //------------------------------------------------------- Simple properties
    61      
    62      /**
    63       * Unique ID and primary key.
    64       */
    65      public String getId() {
                 /* 
    P/P           *  Method: String pcgetId()
                  * 
                  *  Preconditions:
                  *    init'ed(this.id)
                  * 
                  *  Postconditions:
                  *    return_value == this.id
                  *    init'ed(return_value)
                  */
    66          return this.id;
    67      }
    68      
    69      public void setId(String id) {
                 /* 
    P/P           *  Method: void pcsetId(String)
                  * 
                  *  Postconditions:
                  *    this.id == Param_1
                  *    init'ed(this.id)
                  */
    70          this.id = id;
    71      }
    72      
    73      
    74      /**
    75       * ID of website that this tag refers to.
    76       */
    77      public Weblog getWeblog() {
                 /* 
    P/P           *  Method: Weblog pcgetWeblog()
                  * 
                  *  Preconditions:
                  *    init'ed(this.website)
                  * 
                  *  Postconditions:
                  *    return_value == this.website
                  *    init'ed(return_value)
                  */
    78          return this.website;
    79      }
    80      
    81      public void setWeblog(Weblog website) {
                 /* 
    P/P           *  Method: void pcsetWeblog(Weblog)
                  * 
                  *  Postconditions:
                  *    this.website == Param_1
                  *    init'ed(this.website)
                  */
    82          this.website = website;
    83      }
    84      
    85      
    86      public WeblogEntry getWeblogEntry() {
                 /* 
    P/P           *  Method: WeblogEntry pcgetWeblogEntry()
                  * 
                  *  Preconditions:
                  *    init'ed(this.weblogEntry)
                  * 
                  *  Postconditions:
                  *    return_value == this.weblogEntry
                  *    init'ed(return_value)
                  */
    87          return weblogEntry;
    88      }
    89      
    90      public void setWeblogEntry(WeblogEntry data) {
                 /* 
    P/P           *  Method: void pcsetWeblogEntry(WeblogEntry)
                  * 
                  *  Postconditions:
                  *    this.weblogEntry == Param_1
                  *    init'ed(this.weblogEntry)
                  */
    91          weblogEntry = data;
    92      }
    93      
    94      
    95      public User getUser() {
                 /* 
    P/P           *  Method: User pcgetUser()
                  * 
                  *  Preconditions:
                  *    init'ed(this.user)
                  * 
                  *  Postconditions:
                  *    return_value == this.user
                  *    init'ed(return_value)
                  */
    96          return this.user;
    97      }
    98      
    99      public void setUser( User user ) {
                 /* 
    P/P           *  Method: void pcsetUser(User)
                  * 
                  *  Postconditions:
                  *    this.user == Param_1
                  *    init'ed(this.user)
                  */
   100          this.user = user;
   101      }
   102      
   103      /**
   104       * Tag value.
   105       */
   106      public String getName() {
                 /* 
    P/P           *  Method: String pcgetName()
                  * 
                  *  Preconditions:
                  *    init'ed(this.name)
                  * 
                  *  Postconditions:
                  *    return_value == this.name
                  *    init'ed(return_value)
                  */
   107          return this.name;
   108      }
   109      
   110      public void setName( String name ) {
                 /* 
    P/P           *  Method: void pcsetName(String)
                  * 
                  *  Postconditions:
                  *    this.name == Param_1
                  *    init'ed(this.name)
                  */
   111          this.name = name;
   112      }
   113      
   114      
   115      public java.sql.Timestamp getTime() {
                 /* 
    P/P           *  Method: Timestamp pcgetTime()
                  * 
                  *  Preconditions:
                  *    init'ed(this.time)
                  * 
                  *  Postconditions:
                  *    return_value == this.time
                  *    init'ed(return_value)
                  */
   116          return this.time;
   117      }
   118      
   119      public void setTime(java.sql.Timestamp tagTime) {
                 /* 
    P/P           *  Method: void pcsetTime(Timestamp)
                  * 
                  *  Postconditions:
                  *    this.time == Param_1
                  *    init'ed(this.time)
                  */
   120          this.time = tagTime;
   121      }
   122      
   123      //------------------------------------------------------- Good citizenship
   124      
   125      public String toString() {
                 /* 
    P/P           *  Method: String toString()
                  * 
                  *  Preconditions:
                  *    init'ed(this.id)
                  *    init'ed(this.name)
                  *    init'ed(this.time)
                  * 
                  *  Postconditions:
                  *    java.lang.StringBuffer:toString(...)._tainted == this.id._tainted | this.name._tainted
                  *    init'ed(java.lang.StringBuffer:toString(...)._tainted)
                  *    return_value == &java.lang.StringBuffer:toString(...)
                  */
   126          StringBuffer buf = new StringBuffer();
   127          buf.append("{");
   128          buf.append(this.id);
   129          buf.append(", ").append(this.name);
   130          buf.append(", ").append(this.time);
   131          buf.append("}");
   132          return buf.toString();
   133      }
   134      
   135      public boolean equals(Object other) {
                 /* 
    P/P           *  Method: bool equals(Object)
                  * 
                  *  Preconditions:
                  *    (soft) init'ed(other.name)
                  *    (soft) init'ed(other.pcStateManager)
                  *    (soft) init'ed(other.weblogEntry)
                  *    (soft) pcInheritedFieldCount <= 232-6
                  *    (soft) init'ed(this.name)
                  *    (soft) init'ed(this.pcStateManager)
                  *    (soft) init'ed(this.weblogEntry)
                  * 
                  *  Presumptions:
                  *    org.apache.commons.lang.builder.EqualsBuilder:append(...)@139 != null
                  * 
                  *  Postconditions:
                  *    init'ed(return_value)
                  * 
                  *  Test Vectors:
                  *    other == this: {0}, {1}
                  */
   136          if (other == this) return true;
   137          if (other instanceof WeblogEntryTag != true) return false;
   138          WeblogEntryTag o = (WeblogEntryTag)other;
   139          return new EqualsBuilder()
   140          .append(getName(), o.getName())
   141          .append(getWeblogEntry(), o.getWeblogEntry())
   142          .isEquals();
   143      }
   144      
   145      public int hashCode() {
                 /* 
    P/P           *  Method: int hashCode()
                  * 
                  *  Preconditions:
                  *    init'ed(this.name)
                  *    init'ed(this.pcStateManager)
                  *    init'ed(this.weblogEntry)
                  *    (soft) pcInheritedFieldCount <= 232-6
                  * 
                  *  Presumptions:
                  *    org.apache.commons.lang.builder.HashCodeBuilder:append(...)@146 != null
                  * 
                  *  Postconditions:
                  *    init'ed(return_value)
                  */
   146          return new HashCodeBuilder()
   147          .append(getName())
   148          .append(getWeblogEntry())
   149          .toHashCode();
   150      }
   151      
   152  }
+  153  Other Messages








SofCheck Inspector Build Version : 2.18479
WeblogEntryTag.java 2009-Jan-02 14:25:02
WeblogEntryTag.class 2009-Sep-04 03:12:38