com.hyper9.vangaea.impls.beans.admin
Class UriMappingBeanImpl

java.lang.Object
  extended by com.hyper9.uvapi.impls.BeanImpl
      extended by com.hyper9.uvapi.impls.UniqueBeanImpl<java.lang.Integer>
          extended by com.hyper9.vangaea.impls.beans.admin.AdminBeanImpl
              extended by com.hyper9.vangaea.impls.beans.admin.UriMappingBeanImpl
All Implemented Interfaces:
com.hyper9.common.beans.Bean, com.hyper9.common.beans.UniqueBean<java.lang.Integer>, AdminBean, UriMappingBean, java.io.Serializable

public class UriMappingBeanImpl
extends AdminBeanImpl
implements UriMappingBean

A bean describing a row in the tbl_uri_ids table.

Author:
akutz
See Also:
Serialized Form

Field Summary
 
Fields inherited from class com.hyper9.vangaea.impls.beans.admin.AdminBeanImpl
conn, isDeleted, isDirty
 
Constructor Summary
UriMappingBeanImpl()
          The default constructor for serialization.
 
Method Summary
static UriMappingBean add(java.sql.Connection connection, java.lang.String uriID, java.lang.String objectID, int serverID)
          Adds an URI mapping for the given object.
static
<T extends com.hyper9.uvapi.types.virt.VirtBean>
UriMappingBean
add(java.sql.Connection connection, T bean, int serverID)
          Adds an URI mapping for the given object.
static java.lang.String getBeanUriID(com.hyper9.uvapi.types.virt.VirtBean bean)
          Gets a bean's URI ID.
static UriMappingBean getByObjectID(java.sql.Connection connection, java.lang.String objectID)
          Gets a URI mapping bean for the given object ID.
static UriMappingBean getByUriID(java.sql.Connection connection, java.lang.String uriID)
          Gets a URI mapping bean for the given URI ID.
 java.util.Date getCreated()
          Gets the date when this entry was created.
 java.lang.String getObjectID()
          Gets the object's ID.
 int getServerID()
          Gets the server ID.
 void setCreated(java.util.Date toSet)
          Sets the date when this entry was created.
 void setObjectID(java.lang.String toSet)
          Sets the object's ID.
 void setServerID(int toSet)
          Sets the server ID.
 
Methods inherited from class com.hyper9.vangaea.impls.beans.admin.AdminBeanImpl
getConnection, isDeleted, isDirty
 
Methods inherited from class com.hyper9.uvapi.impls.UniqueBeanImpl
getID, setID
 
Methods inherited from class com.hyper9.uvapi.impls.BeanImpl
toString, toString, toString, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface com.hyper9.vangaea.types.beans.admin.AdminBean
getConnection, isDeleted, isDirty
 
Methods inherited from interface com.hyper9.common.beans.UniqueBean
getID, setID
 
Methods inherited from interface com.hyper9.common.beans.Bean
toString, toString, toString, toString
 

Constructor Detail

UriMappingBeanImpl

public UriMappingBeanImpl()
The default constructor for serialization.

Method Detail

getCreated

public java.util.Date getCreated()
Description copied from interface: UriMappingBean
Gets the date when this entry was created.

Specified by:
getCreated in interface UriMappingBean
Returns:
The date when this entry was created.

getObjectID

public java.lang.String getObjectID()
Description copied from interface: UriMappingBean
Gets the object's ID.

Specified by:
getObjectID in interface UriMappingBean
Returns:
The object's ID.

getServerID

public int getServerID()
Description copied from interface: UriMappingBean
Gets the server ID.

Specified by:
getServerID in interface UriMappingBean
Returns:
The server ID.

setCreated

public void setCreated(java.util.Date toSet)
Description copied from interface: UriMappingBean
Sets the date when this entry was created.

Specified by:
setCreated in interface UriMappingBean
Parameters:
toSet - The date when this entry was created.

setObjectID

public void setObjectID(java.lang.String toSet)
Description copied from interface: UriMappingBean
Sets the object's ID.

Specified by:
setObjectID in interface UriMappingBean
Parameters:
toSet - The object's ID.

setServerID

public void setServerID(int toSet)
Description copied from interface: UriMappingBean
Sets the server ID.

Specified by:
setServerID in interface UriMappingBean
Parameters:
toSet - The server ID.

getByUriID

public static UriMappingBean getByUriID(java.sql.Connection connection,
                                        java.lang.String uriID)
                                 throws java.lang.Exception
Gets a URI mapping bean for the given URI ID.

Parameters:
connection - The underlying data connection.
uriID - The URI ID.
Returns:
The mapping bean.
Throws:
java.lang.Exception - When an error occurs.

getByObjectID

public static UriMappingBean getByObjectID(java.sql.Connection connection,
                                           java.lang.String objectID)
                                    throws java.lang.Exception
Gets a URI mapping bean for the given object ID.

Parameters:
connection - The underlying data connection.
objectID - object URI ID.
Returns:
The mapping bean.
Throws:
java.lang.Exception - When an error occurs.

getBeanUriID

public static java.lang.String getBeanUriID(com.hyper9.uvapi.types.virt.VirtBean bean)
Gets a bean's URI ID.

Parameters:
bean - The bean to get the URI ID for.
Returns:
The bean's URI ID.

add

public static <T extends com.hyper9.uvapi.types.virt.VirtBean> UriMappingBean add(java.sql.Connection connection,
                                                                                  T bean,
                                                                                  int serverID)
                          throws java.lang.Exception
Adds an URI mapping for the given object.

Type Parameters:
T - A type that extends VirtBean.
Parameters:
connection - The underlying data connection.
bean - The virtualization bean to add the entry for.
serverID - The ID of the server the bean belongs to.
Returns:
The URI ID bean that has been added.
Throws:
java.lang.Exception - When an error occurs.

add

public static UriMappingBean add(java.sql.Connection connection,
                                 java.lang.String uriID,
                                 java.lang.String objectID,
                                 int serverID)
                          throws java.lang.Exception
Adds an URI mapping for the given object.

Parameters:
connection - The underlying data connection.
uriID - The object's URI ID.
objectID - The object's ID.
serverID - The server ID.
Returns:
The URI ID bean that has been added.
Throws:
java.lang.Exception - When an error occurs.


Copyright © 2009 Hyper9. All Rights Reserved.