com.xmlserv.app.phonebook
Class PhoneBookChange

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

public class PhoneBookChange
extends java.lang.Object

Encapsulate a PhoneBookChange request.


Constructor Summary
PhoneBookChange(java.sql.Connection con, int phonebookid, PhoneBook.Entry newEntry)
          Create a new change reqest.
PhoneBookChange(java.sql.Connection con, java.lang.String sessionid)
          Open an existing change request.
 
Method Summary
 void accept(java.sql.Connection con)
          Accept the change request, moving data to phonebook table and removing the request.
 int getPhonebookid()
           
 java.lang.String getSessionid()
           
 void reject(java.sql.Connection con)
          Reject change request, removing it from the list of requests.
 void setChangeEntry(java.sql.Connection con, PhoneBook.Entry changeEntry)
          Set corrected data.
 void setPhonebookid(int phonebookid)
           
 void setSessionid(java.lang.String sessionid)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PhoneBookChange

public PhoneBookChange(java.sql.Connection con,
                       int phonebookid,
                       PhoneBook.Entry newEntry)
                throws XMLServException
Create a new change reqest.

PhoneBookChange

public PhoneBookChange(java.sql.Connection con,
                       java.lang.String sessionid)
                throws XMLServException
Open an existing change request.
Method Detail

reject

public void reject(java.sql.Connection con)
            throws XMLServException
Reject change request, removing it from the list of requests.

accept

public void accept(java.sql.Connection con)
            throws XMLServException
Accept the change request, moving data to phonebook table and removing the request.

setChangeEntry

public void setChangeEntry(java.sql.Connection con,
                           PhoneBook.Entry changeEntry)
                    throws XMLServException
Set corrected data. This saves data to the changerequest table only.

getSessionid

public java.lang.String getSessionid()

setSessionid

public void setSessionid(java.lang.String sessionid)

getPhonebookid

public int getPhonebookid()

setPhonebookid

public void setPhonebookid(int phonebookid)