Coverage report

  %line %branch
net.sf.mindoro.model.SystemUser
96% 
100% 

 1  
 /*
 2  
  * Created on May 13, 2005
 3  
  *
 4  
  * The system user role.
 5  
  */
 6  
 package net.sf.mindoro.model;
 7  
 
 8  
 /**
 9  
  * The system user role.
 10  
  * 
 11  
  * @author aisrael
 12  
  * @hibernate.class table="systemUser"
 13  
  */
 14  
 public class SystemUser {
 15  
 
 16  
     private Long id;
 17  
 
 18  
     private String login;
 19  
 
 20  
     private String passwordHash;
 21  
 
 22  
     private Person person;
 23  
 
 24  
     /**
 25  
      * Default constructor
 26  
      */
 27  
     public SystemUser() {
 28  2
         this(null, "", "");
 29  2
     }
 30  
 
 31  
     /**
 32  
      * Parameterized constructor
 33  
      * 
 34  
      * @param person
 35  
      *            Person
 36  
      * @param login
 37  
      *            user login name
 38  
      * @param passwordHash
 39  
      *            password hash (SHA-256)
 40  
      */
 41  5
     public SystemUser(final Person person, class="keyword">final String login, class="keyword">final String passwordHash) {
 42  5
         this.person = person;
 43  5
         this.login = login;
 44  5
         this.passwordHash = passwordHash;
 45  5
     }
 46  
 
 47  
     /**
 48  
      * @return Returns the id.
 49  
      * @hibernate.id column="id" generator-class="native"
 50  
      */
 51  
     public final Long getId() {
 52  2
         return id;
 53  
     }
 54  
 
 55  
     /**
 56  
      * @param id
 57  
      *            The id to set.
 58  
      */
 59  
     public final void setId(class="keyword">final Long id) {
 60  1
         this.id = id;
 61  1
     }
 62  
 
 63  
     /**
 64  
      * @return Returns the person.
 65  
      * @hibernate.one-to-one class="net.sf.mindoro.model.Person"
 66  
      */
 67  
     public final Person getPerson() {
 68  4
         return this.person;
 69  
     }
 70  
 
 71  
     /**
 72  
      * @param person
 73  
      *            The person to set.
 74  
      */
 75  
     public final void setPerson(class="keyword">final Person person) {
 76  1
         this.person = person;
 77  1
     }
 78  
 
 79  
     /**
 80  
      * @return Returns the login.
 81  
      * @hibernate.property column="login" length="32" unique="true"
 82  
      *                     not-null="true"
 83  
      */
 84  
     public final String getLogin() {
 85  11
         return login;
 86  
     }
 87  
 
 88  
     /**
 89  
      * @param login
 90  
      *            The login to set.
 91  
      */
 92  
     public final void setLogin(class="keyword">final String login) {
 93  2
         this.login = login;
 94  2
     }
 95  
 
 96  
     /**
 97  
      * @return Returns the passwordHash.
 98  
      * @hibernate.property column="passwordHash" length="64" not-null="true"
 99  
      */
 100  
     public final String getPasswordHash() {
 101  8
         return passwordHash;
 102  
     }
 103  
 
 104  
     /**
 105  
      * @param passwordHash
 106  
      *            The passwordHash to set.
 107  
      */
 108  
     public final void setPasswordHash(class="keyword">final String passwordHash) {
 109  2
         this.passwordHash = passwordHash;
 110  2
     }
 111  
 
 112  
     /**
 113  
      * @return Returns the displayName.
 114  
      */
 115  
     public final String getDisplayName() {
 116  1
         if (null != person) {
 117  0
             return person.getDisplayName();
 118  
         } else {
 119  1
             return null;
 120  
         }
 121  
     }
 122  
 
 123  
     /**
 124  
      * (non-Javadoc)
 125  
      * 
 126  
      * @see java.lang.Object#toString()
 127  
      */
 128  
     public final String toString() {
 129  2
         return "(SystemUser " + "(login \"" + this.login + "\")(passwordHash \"" + this.passwordHash
 130  1
                 + "\")(displayName \"" + this.getDisplayName() + "\"))";
 131  
     }
 132  
 }

This report is generated by jcoverage, Maven and Maven JCoverage Plugin.