railo.runtime.db
Class DataSourceImpl

java.lang.Object
  extended by railo.runtime.db.DataSourceSupport
      extended by railo.runtime.db.DataSourceImpl
All Implemented Interfaces:
Cloneable, DataSource, DataSourcePro

public final class DataSourceImpl
extends DataSourceSupport


Field Summary
 
Fields inherited from interface railo.runtime.db.DataSource
ALLOW_ALL, ALLOW_ALTER, ALLOW_CREATE, ALLOW_DELETE, ALLOW_DROP, ALLOW_GRANT, ALLOW_INSERT, ALLOW_REVOKE, ALLOW_SELECT, ALLOW_UPDATE
 
Constructor Summary
DataSourceImpl(String name, String className, String host, String dsn, String database, int port, String username, String password, int connectionLimit, int connectionTimeout, long metaCacheTimeout, boolean blob, boolean clob, int allow, Struct custom, boolean readOnly, boolean validate, boolean storage, TimeZone timezone)
          constructor of the class
 
Method Summary
 Object clone()
           
 DataSource cloneReadOnly()
           
 String getConnectionString()
           
 String getConnectionStringTranslated()
           
 String[] getCustomNames()
           
 Struct getCustoms()
           
 String getCustomValue(String key)
           
 String getDatabase()
           
 String getDsnOriginal()
           
 String getDsnTranslated()
           
 String getHost()
           
 int getPort()
           
 boolean validate()
           
 
Methods inherited from class railo.runtime.db.DataSourceSupport
equals, getClazz, getConnectionLimit, getConnectionTimeout, getMetaCacheTimeout, getName, getPassword, getProcedureColumnCache, getTimeZone, getUsername, hasAllow, hasSQLRestriction, id, isBlob, isClob, isReadOnly, isStorage, setClazz, toClass, toString
 
Methods inherited from class java.lang.Object
getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DataSourceImpl

public DataSourceImpl(String name,
                      String className,
                      String host,
                      String dsn,
                      String database,
                      int port,
                      String username,
                      String password,
                      int connectionLimit,
                      int connectionTimeout,
                      long metaCacheTimeout,
                      boolean blob,
                      boolean clob,
                      int allow,
                      Struct custom,
                      boolean readOnly,
                      boolean validate,
                      boolean storage,
                      TimeZone timezone)
               throws ClassException
constructor of the class

Parameters:
name -
clazz -
host -
dsn -
database -
port -
username -
password -
connectionLimit -
connectionTimeout -
blob -
clob -
allow -
custom -
readOnly -
Throws:
ClassException
Method Detail

getDsnOriginal

public String getDsnOriginal()
Returns:
Returns the dsn.

getConnectionString

public String getConnectionString()
Returns:
Returns the connection string with NOT replaced placeholders.

getDsnTranslated

public String getDsnTranslated()
Returns:
Returns the dsn.

getConnectionStringTranslated

public String getConnectionStringTranslated()
Returns:
Returns the connection string with replaced placeholders.

getDatabase

public String getDatabase()
Returns:
Returns the database.

getPort

public int getPort()
Returns:
Returns the port.

getHost

public String getHost()
Returns:
Returns the host.

clone

public Object clone()
Specified by:
clone in interface DataSource
Overrides:
clone in class DataSourceSupport
Returns:
cloned Object

cloneReadOnly

public DataSource cloneReadOnly()
Returns:
clone the DataSource as ReadOnly

getCustomValue

public String getCustomValue(String key)
Returns:
Returns matching custom value or null if not exist.

getCustomNames

public String[] getCustomNames()
Returns:
returns all custom names

getCustoms

public Struct getCustoms()
Returns:
returns custom

validate

public boolean validate()


Copyright © 2012 Railo