|
||||||||||
| 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.ChangeEvent, 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. |
String |
getExportName()
get the root XML element name for this model's XML representation |
String |
getInfo()
return user readable information about the model |
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(InputStream is)
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, getExistingModels, refreshListeners, refreshListeners, remove, removeListener, removeListeners, sync, syncModels |
| 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 exception
public Collection<String> getNames()
throws Exception
Exception - the exception
public void delete(String name,
boolean undo)
name - the memo nameundo - true if we are executing an undopublic void saveMemo(Memo memo)
memo - the memo
public void saveMemo(Memo memo,
boolean undo)
memo - the memoundo - true if we are executing an undo
public Memo getMemo(String name)
throws Exception
name - the memo name
Exception - the exception
public void export(Writer fw)
throws Exception
export in class Modelfw - the writer to write XML to
Exception - the exception
public void importXml(InputStream is)
throws Exception
importXml in class Modelis - the input stream containing the XML
Exception - the exceptionpublic void refresh()
public Collection<Memo> search(SearchCriteria criteria)
Searchable
search in interface Searchable<Memo>criteria - the search criteria
public String getExportName()
Model
getExportName in class Model
public String getInfo()
throws Exception
Model
getInfo in class ModelException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||