org.apache.lokahi.core.api.ipaddress
Class Ip

java.lang.Object
  extended by org.apache.lokahi.core.common.interfaces.RestObject
      extended by org.apache.lokahi.core.common.interfaces.TMCDao<Ip>
          extended by org.apache.lokahi.core.api.ipaddress.Ip
All Implemented Interfaces:
Collectable, Dao<Ip>, Restable

public class Ip
extends TMCDao<Ip>

Version:
$Id: Ip.java,v 1.2 2006/03/07 20:18:48 drtobes Exp $
Author:
Stephen Toback

Constructor Summary
Ip()
           
Ip(int id, java.lang.String Ip)
           
Ip(java.lang.String Ip)
           
 
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
 boolean equals(java.lang.Object o)
           
 Ip fillObject(java.sql.ResultSet r)
          Creates the Dao from the passed resultset, internally calling the appriate constructor.
 Ip get(int id)
           
static Ip getIp(int id, boolean fromCache)
           
static Ip getIp(java.lang.String name, boolean fromCache)
           
static java.util.Collection<Ip> getIps()
           
static java.util.Collection<Ip> getIps(int Id, boolean fromCache)
           
static java.util.Collection<Ip> getIps(VirtualHost vh, boolean fromCache)
           
 java.lang.String getName()
          Gets the name.
 int getPk()
          Gets the primary key
 int hashCode()
           
 void setName(java.lang.String name)
           
 void setPk(int pk)
           
static Ip store(Ip ip)
           
 java.lang.String toString()
           
 
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

Ip

public Ip()

Ip

public Ip(java.lang.String Ip)

Ip

public Ip(int id,
          java.lang.String Ip)
Method Detail

buildXMLRepresention

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

Returns:
the xml representation

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

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)

get

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

getIp

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

getIp

public static Ip getIp(java.lang.String name,
                       boolean fromCache)
                throws java.sql.SQLException
Throws:
java.sql.SQLException

getIps

public static java.util.Collection<Ip> getIps(int Id,
                                              boolean fromCache)
                                       throws java.sql.SQLException
Throws:
java.sql.SQLException

getIps

public static java.util.Collection<Ip> getIps(VirtualHost vh,
                                              boolean fromCache)
                                       throws java.sql.SQLException
Throws:
java.sql.SQLException

getIps

public static java.util.Collection<Ip> getIps()
                                       throws java.sql.SQLException
Throws:
java.sql.SQLException

store

public static Ip store(Ip ip)
                throws java.sql.SQLException
Throws:
java.sql.SQLException

fillObject

public Ip 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

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