|
||||||||||
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.AddressModel
public class AddressModel
AddressModel provides the model layer APIs for working with Addresses
Nested Class Summary |
---|
Nested classes/interfaces inherited from class net.sf.borg.model.Model |
---|
Model.Listener |
Method Summary | |
---|---|
void |
delete(Address addr)
Delete an Address |
void |
delete(Address addr,
boolean undo)
Delete an Address. |
void |
export(Writer fw)
Export all Addresses to XML. |
Address |
getAddress(int num)
Get an Address by key |
Collection<Address> |
getAddresses()
Get all addresses. |
Collection<Address> |
getAddresses(Date d)
Get all addresses with birthdays on a given day. |
EntityDB<Address> |
getDB()
Deprecated. |
static AddressModel |
getReference()
Gets the reference. |
void |
importXml(String fileName)
Import xml. |
Address |
newAddress()
get a new address object |
void |
refresh()
Refresh the birthday map and notify any listeners that the model has changed |
void |
saveAddress(Address addr)
Save an address. |
void |
saveAddress(Address addr,
boolean undo)
Save an address. |
Collection<Address> |
search(SearchCriteria criteria)
Return a collection of all records that match the given search criteria |
void |
sync()
Sync with the underlying db |
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 AddressModel getReference()
public void delete(Address addr)
addr
- the Addresspublic void delete(Address addr, boolean undo)
addr
- the Addressundo
- true if we are executing an undopublic void export(Writer fw) throws Exception
fw
- the Writer to write XML to
Exception
- the exceptionpublic Address getAddress(int num) throws Exception
num
- the key
Exception
- the exceptionpublic Collection<Address> getAddresses() throws Exception
Exception
- the exceptionpublic Collection<Address> getAddresses(Date d)
d
- the day
@Deprecated public EntityDB<Address> getDB()
public void importXml(String fileName) throws Exception
fileName
- the file name of the file containing the XML
Exception
- the exceptionpublic Address newAddress()
public void refresh()
public void saveAddress(Address addr)
addr
- the addresspublic void saveAddress(Address addr, boolean undo)
addr
- the addressundo
- true if we are executing an undopublic void sync()
public Collection<Address> search(SearchCriteria criteria)
Searchable
search
in interface Searchable<Address>
criteria
- the search criteria
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |