Coverage Report - org.homeunix.thecave.buddi.model.impl.SourceImpl
 
Classes in this File Line Coverage Branch Coverage Complexity
SourceImpl
50%
7/14
N/A
1
 
 1  
 /*
 2  
  * Created on Jul 29, 2007 by wyatt
 3  
  */
 4  
 package org.homeunix.thecave.buddi.model.impl;
 5  
 
 6  
 import org.homeunix.thecave.buddi.model.Source;
 7  
 import org.homeunix.thecave.buddi.plugin.api.exception.InvalidValueException;
 8  
 import org.homeunix.thecave.buddi.plugin.api.util.TextFormatter;
 9  
 
 10  
 /**
 11  
  * Default implementation of a Source.  You should not create this object directly; 
 12  
  * instead, please use the ModelFactory to create it, as this will ensure that all
 13  
  * required fields are correctly set.
 14  
  * @author wyatt
 15  
  *
 16  
  */
 17  33326
 public abstract class SourceImpl extends ModelObjectImpl implements Source {
 18  
         //Source Attributes
 19  
         protected String name;
 20  
         protected boolean deleted;
 21  
         protected String notes;
 22  
         
 23  
         public String getName() {
 24  849081
                 return TextFormatter.getTranslation(name);
 25  
         }
 26  
         public String getNotes() {
 27  0
                 return notes;
 28  
         }
 29  
         public boolean isDeleted() {
 30  95151
                 return deleted;
 31  
         }
 32  
         public void setDeleted(boolean deleted) throws InvalidValueException {
 33  0
                 this.deleted = deleted;
 34  0
                 setChanged();
 35  0
         }
 36  
         public void setName(String name) throws InvalidValueException {
 37  30340
                 this.name = name;
 38  30340
                 setChanged();
 39  30340
         }
 40  
         public void setNotes(String notes) {
 41  0
                 this.notes = notes;
 42  0
                 setChanged();
 43  0
         }
 44  
         @Override
 45  
         public String toString() {
 46  34752
                 return getName() + " (" + getUid() + ")";
 47  
         }
 48  
 }