org.liquidsite.core.data
Class DomainPeer

java.lang.Object
  extended byorg.liquidsite.core.data.AbstractPeer
      extended byorg.liquidsite.core.data.DomainPeer

public final class DomainPeer
extends AbstractPeer

A domain database peer. This class contains static methods that handles all accesses to the LS_DOMAIN table.


Method Summary
static void doDelete(DataSource src, DomainData data)
          Deletes a domain from the data source.
static void doInsert(DataSource src, DomainData data)
          Inserts a new domain into the data source.
static java.util.ArrayList doSelectAll(DataSource src)
          Returns a list of all domains in the data source.
static DomainData doSelectByName(DataSource src, java.lang.String name)
          Returns a domain with a specified name.
static void doUpdate(DataSource src, DomainData data)
          Updates a domain in the data source.
protected  AbstractData getDataObject()
          Returns a new instance of the data object.
 
Methods inherited from class org.liquidsite.core.data.AbstractPeer
count, delete, insert, select, selectList, update
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

doSelectAll

public static java.util.ArrayList doSelectAll(DataSource src)
                                       throws DataObjectException
Returns a list of all domains in the data source.

Parameters:
src - the data source to use
Returns:
a list of all domains in the database
Throws:
DataObjectException - if the data source couldn't be accessed properly

doSelectByName

public static DomainData doSelectByName(DataSource src,
                                        java.lang.String name)
                                 throws DataObjectException
Returns a domain with a specified name.

Parameters:
src - the data source to use
name - the domain name
Returns:
the domain found, or null if no matching domain existed
Throws:
DataObjectException - if the data source couldn't be accessed properly

doInsert

public static void doInsert(DataSource src,
                            DomainData data)
                     throws DataObjectException
Inserts a new domain into the data source.

Parameters:
src - the data source to use
data - the domain data object
Throws:
DataObjectException - if the data source couldn't be accessed properly

doUpdate

public static void doUpdate(DataSource src,
                            DomainData data)
                     throws DataObjectException
Updates a domain in the data source.

Parameters:
src - the data source to use
data - the domain data object
Throws:
DataObjectException - if the data source couldn't be accessed properly

doDelete

public static void doDelete(DataSource src,
                            DomainData data)
                     throws DataObjectException
Deletes a domain from the data source.

Parameters:
src - the data source to use
data - the domain data object
Throws:
DataObjectException - if the data source couldn't be accessed properly

getDataObject

protected AbstractData getDataObject()
Returns a new instance of the data object.

Specified by:
getDataObject in class AbstractPeer
Returns:
a new instance of the data object