com.xmlserv.app.lottery
Class Lottery

java.lang.Object
  |
  +--com.xmlserv.app.lottery.Lottery

public class Lottery
extends java.lang.Object

DB abstraction class for lottery.


Inner Class Summary
static class Lottery.Answer
           
 
Constructor Summary
Lottery(java.sql.Connection con, int id)
          Open an existing Lottery.
Lottery(int rolegroup)
          Create new Lottery for the given rolegroup
 
Method Summary
 void addImage(int id)
           
 void clearImages()
           
 void delete(java.sql.Connection con)
           
 int getAdmin()
           
 java.lang.String getAnfang()
           
 java.lang.String getBegleittext()
           
 java.lang.String getEnde()
           
 int getId()
           
 int getPhonebookcategory()
           
 java.lang.String getQuestion()
           
static SecurityManager.Resource getResource(SecurityManager securityManager, int rolegroup)
           
 int getRolegroup()
           
 boolean isOpen()
           
static org.jdom.Element list(java.sql.Connection con, int rolegroup)
          List all lotteries defined for the given rolegroup.
 void save(java.sql.Connection con)
          Save to DB.
 void setAdmin(int admin)
           
 void setAnfang(java.lang.String anfang)
           
 void setBegleittext(java.lang.String begleittext)
           
 void setEnde(java.lang.String ende)
           
 void setPhonebookcategory(int phonebookcategory)
           
 void setQuestion(java.lang.String question)
           
 void setRolegroup(int rolegroup)
           
 org.jdom.Element toElement()
          Convert to an Element.
 org.jdom.Element toElement(boolean htmlFormat)
           
 org.jdom.Element toElement(java.sql.Connection con, boolean htmlFormat)
          Convert to an Element.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Lottery

public Lottery(int rolegroup)
Create new Lottery for the given rolegroup

Lottery

public Lottery(java.sql.Connection con,
               int id)
        throws XMLServException
Open an existing Lottery.
Method Detail

save

public void save(java.sql.Connection con)
          throws XMLServException
Save to DB.

delete

public void delete(java.sql.Connection con)
            throws XMLServException

toElement

public org.jdom.Element toElement()
Convert to an Element. Does not include answers to this question.

toElement

public org.jdom.Element toElement(boolean htmlFormat)
                           throws XMLServException

toElement

public org.jdom.Element toElement(java.sql.Connection con,
                                  boolean htmlFormat)
                           throws XMLServException
Convert to an Element. Includes all answers to this question.

list

public static org.jdom.Element list(java.sql.Connection con,
                                    int rolegroup)
                             throws XMLServException
List all lotteries defined for the given rolegroup.

getResource

public static SecurityManager.Resource getResource(SecurityManager securityManager,
                                                   int rolegroup)

getId

public int getId()

getRolegroup

public int getRolegroup()

setRolegroup

public void setRolegroup(int rolegroup)

getAnfang

public java.lang.String getAnfang()

setAnfang

public void setAnfang(java.lang.String anfang)

getEnde

public java.lang.String getEnde()

setEnde

public void setEnde(java.lang.String ende)

getQuestion

public java.lang.String getQuestion()

setQuestion

public void setQuestion(java.lang.String question)

getBegleittext

public java.lang.String getBegleittext()

setBegleittext

public void setBegleittext(java.lang.String begleittext)

getAdmin

public int getAdmin()

setAdmin

public void setAdmin(int admin)

getPhonebookcategory

public int getPhonebookcategory()

setPhonebookcategory

public void setPhonebookcategory(int phonebookcategory)

isOpen

public boolean isOpen()

clearImages

public void clearImages()

addImage

public void addImage(int id)