org.broadleafcommerce.openadmin.server.service.persistence.datasource
Class SandBoxDataSource

java.lang.Object
  extended by org.broadleafcommerce.openadmin.server.service.persistence.datasource.SandBoxDataSource
All Implemented Interfaces:
java.sql.Wrapper, javax.sql.CommonDataSource, javax.sql.DataSource

public class SandBoxDataSource
extends java.lang.Object
implements javax.sql.DataSource


Field Summary
protected  java.lang.String address
           
static java.lang.String DEFAULTADDRESS
           
static int DEFAULTPORT
           
static java.lang.String DRIVERNAME
           
protected  int loginTimeout
           
protected  java.io.PrintWriter logWriter
           
protected  int port
           
protected  org.apache.commons.pool.impl.GenericObjectPool sandboxDataBasePool
           
static org.hsqldb.Server server
           
protected  java.lang.String uuid
           
 
Constructor Summary
SandBoxDataSource()
           
 
Method Summary
 void close()
           
 java.lang.String getAddress()
           
 java.sql.Connection getConnection()
           
 java.sql.Connection getConnection(java.lang.String username, java.lang.String password)
           
 java.lang.String getJDBCUrl()
           
 int getLoginTimeout()
           
 java.io.PrintWriter getLogWriter()
           
 int getMaxActive()
           
 int getMaxIdle()
           
 long getMaxWait()
           
 long getMinEvictableIdleTimeMillis()
           
 int getMinIdle()
           
 int getPort()
           
 long getTimeBetweenEvictionRunsMillis()
           
 byte getWhenExhaustedAction()
           
 boolean isWrapperFor(java.lang.Class<?> iface)
           
 void returnObject(java.lang.Object obj)
           
 void setAddress(java.lang.String address)
           
 void setLoginTimeout(int seconds)
           
 void setLogWriter(java.io.PrintWriter out)
           
 void setMaxActive(int maxActive)
           
 void setMaxIdle(int maxIdle)
           
 void setMaxWait(long maxWait)
           
 void setMinEvictableIdleTimeMillis(long minEvictableIdleTimeMillis)
           
 void setMinIdle(int poolSize)
           
 void setPort(int port)
           
 void setTimeBetweenEvictionRunsMillis(long timeBetweenEvictionRunsMillis)
           
 void setWhenExhaustedAction(byte whenExhaustedAction)
           
<T> T
unwrap(java.lang.Class<T> iface)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DRIVERNAME

public static final java.lang.String DRIVERNAME
See Also:
Constant Field Values

DEFAULTPORT

public static final int DEFAULTPORT
See Also:
Constant Field Values

DEFAULTADDRESS

public static final java.lang.String DEFAULTADDRESS
See Also:
Constant Field Values

server

public static org.hsqldb.Server server

logWriter

protected java.io.PrintWriter logWriter

loginTimeout

protected int loginTimeout

sandboxDataBasePool

protected org.apache.commons.pool.impl.GenericObjectPool sandboxDataBasePool

port

protected int port

address

protected java.lang.String address

uuid

protected java.lang.String uuid
Constructor Detail

SandBoxDataSource

public SandBoxDataSource()
Method Detail

close

public void close()

getPort

public int getPort()

setPort

public void setPort(int port)

getAddress

public java.lang.String getAddress()

setAddress

public void setAddress(java.lang.String address)

returnObject

public void returnObject(java.lang.Object obj)
                  throws java.lang.Exception
Throws:
java.lang.Exception

getMaxActive

public int getMaxActive()

setMaxActive

public void setMaxActive(int maxActive)

getWhenExhaustedAction

public byte getWhenExhaustedAction()

setWhenExhaustedAction

public void setWhenExhaustedAction(byte whenExhaustedAction)

getMaxWait

public long getMaxWait()

setMaxWait

public void setMaxWait(long maxWait)

getMaxIdle

public int getMaxIdle()

setMaxIdle

public void setMaxIdle(int maxIdle)

setMinIdle

public void setMinIdle(int poolSize)

getMinIdle

public int getMinIdle()

getTimeBetweenEvictionRunsMillis

public long getTimeBetweenEvictionRunsMillis()

setTimeBetweenEvictionRunsMillis

public void setTimeBetweenEvictionRunsMillis(long timeBetweenEvictionRunsMillis)

getMinEvictableIdleTimeMillis

public long getMinEvictableIdleTimeMillis()

setMinEvictableIdleTimeMillis

public void setMinEvictableIdleTimeMillis(long minEvictableIdleTimeMillis)

getLogWriter

public java.io.PrintWriter getLogWriter()
                                 throws java.sql.SQLException
Specified by:
getLogWriter in interface javax.sql.CommonDataSource
Throws:
java.sql.SQLException

setLogWriter

public void setLogWriter(java.io.PrintWriter out)
                  throws java.sql.SQLException
Specified by:
setLogWriter in interface javax.sql.CommonDataSource
Throws:
java.sql.SQLException

setLoginTimeout

public void setLoginTimeout(int seconds)
                     throws java.sql.SQLException
Specified by:
setLoginTimeout in interface javax.sql.CommonDataSource
Throws:
java.sql.SQLException

getLoginTimeout

public int getLoginTimeout()
                    throws java.sql.SQLException
Specified by:
getLoginTimeout in interface javax.sql.CommonDataSource
Throws:
java.sql.SQLException

unwrap

public <T> T unwrap(java.lang.Class<T> iface)
         throws java.sql.SQLException
Specified by:
unwrap in interface java.sql.Wrapper
Throws:
java.sql.SQLException

isWrapperFor

public boolean isWrapperFor(java.lang.Class<?> iface)
                     throws java.sql.SQLException
Specified by:
isWrapperFor in interface java.sql.Wrapper
Throws:
java.sql.SQLException

getConnection

public java.sql.Connection getConnection()
                                  throws java.sql.SQLException
Specified by:
getConnection in interface javax.sql.DataSource
Throws:
java.sql.SQLException

getConnection

public java.sql.Connection getConnection(java.lang.String username,
                                         java.lang.String password)
                                  throws java.sql.SQLException
Specified by:
getConnection in interface javax.sql.DataSource
Throws:
java.sql.SQLException

getJDBCUrl

public java.lang.String getJDBCUrl()


Copyright © 2011. All Rights Reserved.