com.xmlserv.app.phonebook
Class PhoneBook

java.lang.Object
  |
  +--com.xmlserv.app.phonebook.PhoneBook

public class PhoneBook
extends java.lang.Object

Used to collect/interact with phonebook entries.


Inner Class Summary
static class PhoneBook.Category
          Abstraction of Phonebook categories.
static class PhoneBook.Entry
          Inner class for hanlding phonebook entries.
 
Constructor Summary
PhoneBook(int userid)
           
 
Method Summary
static void deleteEntry(java.sql.Connection con, int userid, int id)
          Utility method to delete a phonebook entry.
static void main(java.lang.String[] args)
           
 org.jdom.Element toElement(java.sql.Connection con)
          List phonebook for this user, sorting by lastuse , usecount and name.
 org.jdom.Element toElement(java.sql.Connection con, boolean listall)
          List phonebook for this user, sorting by lastuse , usecount and name.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PhoneBook

public PhoneBook(int userid)
Method Detail

deleteEntry

public static void deleteEntry(java.sql.Connection con,
                               int userid,
                               int id)
                        throws XMLServException
Utility method to delete a phonebook entry.

toElement

public org.jdom.Element toElement(java.sql.Connection con)
                           throws XMLServException
List phonebook for this user, sorting by lastuse , usecount and name. Does not list items marked deleted.
Parameters:
con - A DB Connection

toElement

public org.jdom.Element toElement(java.sql.Connection con,
                                  boolean listall)
                           throws XMLServException
List phonebook for this user, sorting by lastuse , usecount and name.
Parameters:
con - A DB Connection
listall - Set to true to list all entries (included those marked deleted)

main

public static void main(java.lang.String[] args)