Database db;
Document doc;
Document tempdoc;
Vector books = session.getAddressBooks();
Enumeration e = books.elements();
while (e.hasMoreElements())
{
db = (Database)e.nextElement();
db.open();
if(db.isOpen())
{
DocumentCollection dc = db.getAllDocuments();
doc = dc.getFirstDocument();
while (doc != null)
{
if (doc.isValid())
{
if (doc.isDeleted())
{
JOptionPane.showMessageDialog(doc.getItemValueString("Name") + "Contact is valid but deleted", JOptionPane.INFORMATION_MESSAGE);
}
else
return doc;
}
}
tempdoc = dc.getNextDocument();
doc.recycle();
doc = tempdoc;
}
dc.recycle();
}
No comments:
Post a Comment