com.xenonsoft.bridgetown.aop.transaction.jdbc
Class ConnectionModeEnum

java.lang.Object
  extended byorg.apache.commons.lang.enum.Enum
      extended byorg.apache.commons.lang.enum.ValuedEnum
          extended bycom.xenonsoft.bridgetown.aop.transaction.jdbc.ConnectionModeEnum
All Implemented Interfaces:
java.lang.Comparable, java.io.Serializable

public class ConnectionModeEnum
extends org.apache.commons.lang.enum.ValuedEnum

Connection mode enumeration is a concept of the login style borrowed from Expresso Framework.

Version:
$Id: ConnectionModeEnum.java,v 1.2 2005/02/23 01:27:28 peter_pilgrim Exp $
Author:
Peter Pilgrim, 15-Nov-2004 19:13:59
See Also:
Serialized Form

Field Summary
static ConnectionModeEnum DBURL_EMBEDDED_AMPS
          Create the connection with a string like DriverManager.getConnection(dbURL + "?
static ConnectionModeEnum DBURL_EMBEDDED_SEMIS
          Create the connection with a call to DriverManager.getConnection(dbURL + "?
static ConnectionModeEnum PROPERTIES_EMBEDDED
          Create the connection by setting the login and password into a java.util.Properties object and calling DriverManager.getConnection(dbURL, props) where props is the created properties object
static ConnectionModeEnum STANDARD
          Connect to the database using the standard JDBC API Create the connection with a call to DriverManager.getConnection(dbURL, login, password) where login and password are the supplied login name and password
 
Fields inherited from class org.apache.commons.lang.enum.Enum
iToString
 
Method Summary
static ConnectionModeEnum getEnum(int transIso)
          Convert an SQL transaction isolation type into an enumerated type.
static ConnectionModeEnum getEnum(java.lang.String textValue)
          Returns the enumeration that matches the text value
static java.util.List getEnumList()
          Return a list collection of registered enumerations for this class type
static java.util.Map getEnumMap()
          Return a map collection of registered enumerations for this class type
static java.util.Iterator iterator()
          Return an iterator that can traverse the collection of registered enumerations
 
Methods inherited from class org.apache.commons.lang.enum.ValuedEnum
compareTo, getEnum, getValue, toString
 
Methods inherited from class org.apache.commons.lang.enum.Enum
equals, getEnum, getEnumClass, getEnumList, getEnumMap, getName, hashCode, iterator, readResolve
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

STANDARD

public static final ConnectionModeEnum STANDARD
Connect to the database using the standard JDBC API

Create the connection with a call to DriverManager.getConnection(dbURL, login, password) where login and password are the supplied login name and password


DBURL_EMBEDDED_SEMIS

public static final ConnectionModeEnum DBURL_EMBEDDED_SEMIS
Create the connection with a call to DriverManager.getConnection(dbURL + "?user=" + login + ";password=" + password) where login and password are the supplied login and password


PROPERTIES_EMBEDDED

public static final ConnectionModeEnum PROPERTIES_EMBEDDED
Create the connection by setting the login and password into a java.util.Properties object and calling DriverManager.getConnection(dbURL, props) where props is the created properties object


DBURL_EMBEDDED_AMPS

public static final ConnectionModeEnum DBURL_EMBEDDED_AMPS
Create the connection with a string like DriverManager.getConnection(dbURL + "?user=" + newLogin + "&password=" + newPassword)

Method Detail

getEnum

public static ConnectionModeEnum getEnum(java.lang.String textValue)
Returns the enumeration that matches the text value

Parameters:
textValue -
Returns:
the enumeration

getEnum

public static ConnectionModeEnum getEnum(int transIso)
Convert an SQL transaction isolation type into an enumerated type.

Parameters:
transIso - the transaction isolation
Returns:

getEnumMap

public static java.util.Map getEnumMap()
Return a map collection of registered enumerations for this class type

Returns:
the map collection

getEnumList

public static java.util.List getEnumList()
Return a list collection of registered enumerations for this class type

Returns:
the list collection

iterator

public static java.util.Iterator iterator()
Return an iterator that can traverse the collection of registered enumerations

Returns:
the iterator


Copyright © 2005 XeNoNSoFT.com. All Rights Reserved.