|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.util.Observable
addbk.JAddressBook.AddressDataBase
public final class AddressDataBase
Use the singleton design pattern to make sure that there is one and only one instance of the class.
Method Summary | |
---|---|
void |
addRecord(AddressRecord abr)
|
void |
addRecord(java.lang.String s,
DelimiterBean db)
Add s, assuming it contains one records and is parsed using db. |
void |
addRecords(java.util.Vector vector)
|
void |
clearDataBase()
|
void |
combineDuplicates()
|
void |
deleteCurrentRecord()
|
void |
deleteRecord(AddressRecord abr)
|
static boolean |
equal(AddressRecord ar1,
AddressRecord ar2)
|
void |
exportCsv(DelimiterBean db)
|
AddressRecord |
find(FindBean findBean)
Use the findBean to locate an address record. |
void |
findLetter(java.lang.String text)
Search the database until you find the letter or the letter just previous to it. |
void |
findRecordAndSetToCurrent(AddressRecord value)
|
void |
findRecordAndSetToCurrentNoUpdate(AddressRecord value)
|
java.util.Vector |
getAddressVector()
|
AddressRecord |
getCurrentRecord()
|
AddressRecord |
getNextRecord()
|
AddressRecord[] |
getNextRecords(int n)
getN records from addressbook. |
AddressRecord |
getPreviousRecord()
|
AddressRecord |
getRecordAt(int recNumber)
|
int |
getRecordNumber()
|
java.lang.String |
getSaveFileName()
|
int |
getSize()
|
void |
gotoFirstRecord()
|
static boolean |
isFieldsEmpty(AddressRecord ar)
|
boolean |
isModifiedButNotSaved()
|
void |
mergeAdb()
|
void |
mergeUsingDelimiters(DelimiterBean db)
|
void |
mergeXml()
|
void |
mergeXml(java.lang.String xmlString)
|
void |
next(int numberOfRows)
|
void |
openEncryptedGzDb()
|
void |
openGzDb(CipherBean cb,
java.io.File f)
|
void |
openGzDb(java.lang.String readFileName)
|
void |
previous(int numberOfRows)
|
void |
print()
|
AddressRecord |
readRecord()
|
void |
recoverSerialData(java.lang.String readFileName)
|
void |
removeDuplicates()
|
void |
replaceCurrentRecord(AddressRecord ar)
|
static AddressDataBase |
restore()
|
void |
save()
|
void |
saveAsXml()
|
void |
saveEncryptedGzDb()
|
void |
saveGzDb()
Uses the preferences and a gui to update the output file. |
void |
saveGzDb(CipherBean cb)
|
void |
saveGzDb(CipherBean cb,
java.io.File writeFile)
|
void |
saveGzDb(java.io.File writeFile)
Does not update the preferences with the new output file. |
void |
saveGzDb(java.lang.String uidPw)
|
void |
saveGzippedDb()
|
void |
setAddressVector(java.util.Vector addressVector)
|
void |
setRecordNumber(int recordNumber)
|
void |
sort()
|
void |
top()
|
java.lang.String |
toString()
|
static void |
trim(AddressRecord ar)
|
void |
undoDelete()
|
void |
update()
|
Methods inherited from class java.util.Observable |
---|
addObserver, countObservers, deleteObserver, deleteObservers, hasChanged, notifyObservers, notifyObservers |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Method Detail |
---|
public static AddressDataBase restore()
public void update()
public void mergeUsingDelimiters(DelimiterBean db)
public void addRecord(java.lang.String s, DelimiterBean db)
s
- string with recorddb
- has field and line delimiterspublic void saveAsXml()
public java.lang.String toString()
toString
in class java.lang.Object
public void sort()
public AddressRecord readRecord()
public AddressRecord getRecordAt(int recNumber)
public void undoDelete()
public void addRecord(AddressRecord abr)
public void deleteRecord(AddressRecord abr)
public int getSize()
public void deleteCurrentRecord()
public void saveGzippedDb()
public void mergeAdb()
public static void trim(AddressRecord ar)
public void combineDuplicates()
public static boolean isFieldsEmpty(AddressRecord ar)
public void removeDuplicates()
public static boolean equal(AddressRecord ar1, AddressRecord ar2)
public void addRecords(java.util.Vector vector)
public void openGzDb(java.lang.String readFileName) throws java.io.IOException
java.io.IOException
public void recoverSerialData(java.lang.String readFileName) throws java.io.IOException
java.io.IOException
public void openEncryptedGzDb()
public void openGzDb(CipherBean cb, java.io.File f) throws java.io.IOException, java.security.InvalidKeyException
java.io.IOException
java.security.InvalidKeyException
public void saveGzDb() throws java.io.IOException
java.io.IOException
public void saveEncryptedGzDb()
public void saveGzDb(java.lang.String uidPw) throws java.io.IOException, java.security.InvalidKeyException, java.security.NoSuchAlgorithmException, javax.crypto.NoSuchPaddingException
java.io.IOException
java.security.InvalidKeyException
java.security.NoSuchAlgorithmException
javax.crypto.NoSuchPaddingException
public void saveGzDb(CipherBean cb) throws java.io.IOException, java.security.InvalidKeyException
java.io.IOException
java.security.InvalidKeyException
public void saveGzDb(CipherBean cb, java.io.File writeFile) throws java.io.IOException, java.security.InvalidKeyException
java.io.IOException
java.security.InvalidKeyException
public void saveGzDb(java.io.File writeFile) throws java.io.IOException
writeFile
-
java.io.IOException
public AddressRecord getCurrentRecord()
public AddressRecord getPreviousRecord()
public AddressRecord getNextRecord()
public void exportCsv(DelimiterBean db)
public AddressRecord find(FindBean findBean)
public void clearDataBase()
public void top()
public void replaceCurrentRecord(AddressRecord ar)
public void findRecordAndSetToCurrentNoUpdate(AddressRecord value)
public void findRecordAndSetToCurrent(AddressRecord value)
public java.util.Vector getAddressVector()
public void setAddressVector(java.util.Vector addressVector)
public int getRecordNumber()
public void setRecordNumber(int recordNumber)
public void mergeXml()
public void mergeXml(java.lang.String xmlString)
public void print()
public AddressRecord[] getNextRecords(int n)
public void findLetter(java.lang.String text)
public void previous(int numberOfRows)
public void next(int numberOfRows)
public void save() throws java.io.IOException
java.io.IOException
public java.lang.String getSaveFileName()
public boolean isModifiedButNotSaved()
public void gotoFirstRecord()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |