| 1 | |
|
| 2 | |
|
| 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 | |
|
| 12 | |
|
| 13 | |
|
| 14 | |
|
| 15 | |
|
| 16 | |
|
| 17 | 33326 | public abstract class SourceImpl extends ModelObjectImpl implements Source { |
| 18 | |
|
| 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 | |
} |