|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.sf.borg.model.Model
net.sf.borg.model.MemoModel
public class MemoModel
The Memo Model manages the Memo Entities. Memos are keyed by a name. Memos contain simple text and have stayed simple to be able to sync with the simple memo functionality of a Palm Pilot.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class net.sf.borg.model.Model |
---|
Model.Listener |
Method Summary | |
---|---|
void |
delete(String name,
boolean undo)
Delete a memo by name |
void |
export(Writer fw)
Export to XML |
MemoDB |
getDB()
Gets the dB. |
Memo |
getMemo(String name)
Gets a memo by name. |
Collection<Memo> |
getMemos()
Gets all memos. |
Collection<String> |
getNames()
Gets all memo names. |
static MemoModel |
getReference()
Gets the singleton. |
void |
importXml(String fileName)
Import xml. |
void |
refresh()
Refresh listeners |
void |
saveMemo(Memo memo)
Save a memo. |
void |
saveMemo(Memo memo,
boolean undo)
Save a memo. |
Collection<Memo> |
search(SearchCriteria criteria)
Return a collection of all records that match the given search criteria |
Methods inherited from class net.sf.borg.model.Model |
---|
addListener, refreshListeners, remove, removeListener, removeListeners |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static MemoModel getReference()
public MemoDB getDB()
public Collection<Memo> getMemos() throws Exception
Exception
- the exceptionpublic Collection<String> getNames() throws Exception
Exception
- the exceptionpublic void delete(String name, boolean undo)
name
- the memo nameundo
- true if we are executing an undopublic void saveMemo(Memo memo)
memo
- the memopublic void saveMemo(Memo memo, boolean undo)
memo
- the memoundo
- true if we are executing an undopublic Memo getMemo(String name) throws Exception
name
- the memo name
Exception
- the exceptionpublic void export(Writer fw) throws Exception
fw
- the writer to write XML to
Exception
- the exceptionpublic void importXml(String fileName) throws Exception
fileName
- the file name of the file containing the XML
Exception
- the exceptionpublic void refresh()
public Collection<Memo> search(SearchCriteria criteria)
Searchable
search
in interface Searchable<Memo>
criteria
- the search criteria
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |