org.apache.lokahi.httpd.api.server
Class Apache

java.lang.Object
  extended by org.apache.lokahi.core.common.interfaces.RestObject
      extended by org.apache.lokahi.core.common.interfaces.TMCDao<T>
          extended by org.apache.lokahi.core.common.interfaces.Application<Apache>
              extended by org.apache.lokahi.httpd.api.server.Apache
All Implemented Interfaces:
Collectable, Dao<Apache>, Restable

public class Apache
extends Application<Apache>

Version:
$Id: Apache.java,v 1.4 2006/03/07 22:05:25 drtobes Exp $
Author:
Stephen Toback

Constructor Summary
Apache()
           
Apache(int container_id, java.lang.String containerName, java.lang.String logLocation, java.lang.String envVaribles, int forkWait, java.lang.String pidfileLocation, java.lang.String restartCommand, java.lang.String startCommand, java.lang.String stopCommand, java.lang.String sysGroup, java.lang.String sysUser, java.lang.String serverRoot, int mainId)
           
 
Method Summary
 java.lang.StringBuilder buildShortXMLRepresentation()
          Builds a short xml representation of this object containing name, and primary key.
 java.lang.StringBuilder buildXMLRepresention()
          Builds a xml representation of this object
static boolean delete(Apache ap)
           
 boolean equals(java.lang.Object o)
           
 Apache fillObject(java.sql.ResultSet r)
          Creates the Dao from the passed resultset, internally calling the appriate constructor.
 Apache get(int id)
           
static Apache getApache(int id, boolean fromCache)
           
static java.util.Collection<Apache> getApaches()
           
static java.util.Collection<Apache> getApaches(java.lang.String name, boolean fromCache)
           
 java.lang.String getEnvVaribles()
           
 int getForkWait()
           
 java.lang.String getLogLocation()
           
 File getMain()
           
 int getMainId()
           
 java.lang.String getName()
          Gets the name.
 java.lang.String getPidFileLocation()
           
 int getPk()
          Gets the primary key
 java.lang.String getRestartCommand()
           
 java.lang.String getServerRoot()
           
 java.lang.String getStartCommand()
           
 java.lang.String getStopCommand()
           
 java.lang.String getSysGroup()
           
 java.lang.String getSysUser()
           
 int hashCode()
           
 void setEnvVaribles(java.lang.String envVaribles)
           
 void setForkWait(int forkWait)
           
 void setLogLocation(java.lang.String logLocation)
           
 void setMain(File main)
           
 void setMainId(int mainId)
           
 void setName(java.lang.String name)
           
 void setPidFileLocation(java.lang.String pidFileLocation)
           
 void setPk(int pk)
           
 void setRestartCommand(java.lang.String restartCommand)
           
 void setServerRoot(java.lang.String serverRoot)
           
 void setStartCommand(java.lang.String startCommand)
           
 void setStopCommand(java.lang.String stopCommand)
           
 void setSysGroup(java.lang.String sysGroup)
           
 void setSysUser(java.lang.String sysUser)
           
static Apache store(Apache ap)
           
 java.lang.String toString()
           
static void update(Apache ap)
           
 
Methods inherited from class org.apache.lokahi.core.common.interfaces.RestObject
elementBuilder, elementBuilder
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Apache

public Apache()

Apache

public Apache(int container_id,
              java.lang.String containerName,
              java.lang.String logLocation,
              java.lang.String envVaribles,
              int forkWait,
              java.lang.String pidfileLocation,
              java.lang.String restartCommand,
              java.lang.String startCommand,
              java.lang.String stopCommand,
              java.lang.String sysGroup,
              java.lang.String sysUser,
              java.lang.String serverRoot,
              int mainId)
Method Detail

getPk

public int getPk()
Description copied from interface: Collectable
Gets the primary key

Returns:
the int primary key

setPk

public void setPk(int pk)

getName

public java.lang.String getName()
Description copied from interface: Collectable
Gets the name.

Returns:
the String name.

setName

public void setName(java.lang.String name)

getServerRoot

public java.lang.String getServerRoot()

setServerRoot

public void setServerRoot(java.lang.String serverRoot)

getLogLocation

public java.lang.String getLogLocation()

setLogLocation

public void setLogLocation(java.lang.String logLocation)

getSysUser

public java.lang.String getSysUser()
Specified by:
getSysUser in class Application<Apache>

setSysUser

public void setSysUser(java.lang.String sysUser)
Specified by:
setSysUser in class Application<Apache>

getSysGroup

public java.lang.String getSysGroup()
Specified by:
getSysGroup in class Application<Apache>

setSysGroup

public void setSysGroup(java.lang.String sysGroup)
Specified by:
setSysGroup in class Application<Apache>

getStartCommand

public java.lang.String getStartCommand()

setStartCommand

public void setStartCommand(java.lang.String startCommand)

getStopCommand

public java.lang.String getStopCommand()

setStopCommand

public void setStopCommand(java.lang.String stopCommand)

getRestartCommand

public java.lang.String getRestartCommand()

setRestartCommand

public void setRestartCommand(java.lang.String restartCommand)

getForkWait

public int getForkWait()

setForkWait

public void setForkWait(int forkWait)

getEnvVaribles

public java.lang.String getEnvVaribles()

setEnvVaribles

public void setEnvVaribles(java.lang.String envVaribles)

getPidFileLocation

public java.lang.String getPidFileLocation()

setPidFileLocation

public void setPidFileLocation(java.lang.String pidFileLocation)

getMainId

public int getMainId()

setMainId

public void setMainId(int mainId)

getMain

public File getMain()

setMain

public void setMain(File main)

fillObject

public Apache fillObject(java.sql.ResultSet r)
                  throws java.sql.SQLException
Description copied from interface: Dao
Creates the Dao from the passed resultset, internally calling the appriate constructor.

Parameters:
r - the resultset from a database call, should include the entire object
Returns:
Object populated from the resultset
Throws:
java.sql.SQLException

getApache

public static Apache getApache(int id,
                               boolean fromCache)
                        throws java.sql.SQLException
Throws:
java.sql.SQLException

getApaches

public static java.util.Collection<Apache> getApaches()
                                               throws java.sql.SQLException
Throws:
java.sql.SQLException

getApaches

public static java.util.Collection<Apache> getApaches(java.lang.String name,
                                                      boolean fromCache)
                                               throws java.sql.SQLException
Throws:
java.sql.SQLException

store

public static Apache store(Apache ap)
                    throws java.sql.SQLException
Throws:
java.sql.SQLException

update

public static void update(Apache ap)
                   throws java.sql.SQLException
Throws:
java.sql.SQLException

delete

public static boolean delete(Apache ap)
                      throws java.sql.SQLException
Throws:
java.sql.SQLException

buildShortXMLRepresentation

public java.lang.StringBuilder buildShortXMLRepresentation()
Description copied from interface: Restable
Builds a short xml representation of this object containing name, and primary key.

Returns:
the xml representation

buildXMLRepresention

public java.lang.StringBuilder buildXMLRepresention()
Description copied from interface: Restable
Builds a xml representation of this object

Returns:
the xml representation

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

equals

public boolean equals(java.lang.Object o)
Overrides:
equals in class java.lang.Object

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

get

public Apache get(int id)
           throws java.sql.SQLException
Specified by:
get in class TMCDao<Apache>
Throws:
java.sql.SQLException