railo.runtime.db
Class DataSourceImpl

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

public final class DataSourceImpl
extends Object
implements Cloneable, DataSource


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()
           
 boolean equals(Object obj)
           
 Class getClazz()
           
 int getConnectionLimit()
           
 int getConnectionTimeout()
           
 String[] getCustomNames()
           
 Struct getCustoms()
           
 String getCustomValue(String key)
           
 String getDatabase()
           
 String getDsnOriginal()
           
 String getDsnTranslated()
           
 String getHost()
           
 long getMetaCacheTimeout()
           
 String getName()
           
 String getPassword()
           
 int getPort()
           
 Map<String,ProcMetaCollection> getProcedureColumnCache()
           
 TimeZone getTimeZone()
           
 String getUsername()
           
 boolean hasAllow(int allow)
           
 boolean hasSQLRestriction()
           
 boolean isBlob()
           
 boolean isClob()
           
 boolean isReadOnly()
           
 boolean isStorage()
           
 void setClazz(Class clazz)
           
 String toString()
           
 boolean validate()
           
 
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()
Specified by:
getDsnOriginal in interface DataSource
Returns:
Returns the dsn.
See Also:
DataSource.getDsnOriginal()

getDsnTranslated

public String getDsnTranslated()
Specified by:
getDsnTranslated in interface DataSource
Returns:
Returns the dsn.
See Also:
DataSource.getDsnTranslated()

getPassword

public String getPassword()
Specified by:
getPassword in interface DataSource
Returns:
Returns the password.
See Also:
DataSource.getPassword()

getUsername

public String getUsername()
Specified by:
getUsername in interface DataSource
Returns:
Returns the username.
See Also:
DataSource.getUsername()

isReadOnly

public boolean isReadOnly()
Specified by:
isReadOnly in interface DataSource
Returns:
Returns the readOnly.
See Also:
DataSource.isReadOnly()

hasAllow

public boolean hasAllow(int allow)
Specified by:
hasAllow in interface DataSource
Returns:
returns if given allow exists
See Also:
DataSource.hasAllow(int)

getClazz

public Class getClazz()
Specified by:
getClazz in interface DataSource
Returns:
Returns the clazz.
See Also:
DataSource.getClazz()

getDatabase

public String getDatabase()
Specified by:
getDatabase in interface DataSource
Returns:
Returns the database.
See Also:
DataSource.getDatabase()

getPort

public int getPort()
Specified by:
getPort in interface DataSource
Returns:
Returns the port.
See Also:
DataSource.getPort()

getHost

public String getHost()
Specified by:
getHost in interface DataSource
Returns:
Returns the host.
See Also:
DataSource.getHost()

clone

public Object clone()
Specified by:
clone in interface DataSource
Overrides:
clone in class Object
Returns:
cloned Object
See Also:
DataSource.clone()

cloneReadOnly

public DataSource cloneReadOnly()
Specified by:
cloneReadOnly in interface DataSource
Returns:
clone the DataSource as ReadOnly
See Also:
DataSource.cloneReadOnly()

isBlob

public boolean isBlob()
Specified by:
isBlob in interface DataSource
Returns:
Returns the blob.
See Also:
DataSource.isBlob()

isClob

public boolean isClob()
Specified by:
isClob in interface DataSource
Returns:
Returns the clob.
See Also:
DataSource.isClob()

getConnectionLimit

public int getConnectionLimit()
Specified by:
getConnectionLimit in interface DataSource
Returns:
Returns the connectionLimit.
See Also:
DataSource.getConnectionLimit()

getConnectionTimeout

public int getConnectionTimeout()
Specified by:
getConnectionTimeout in interface DataSource
Returns:
Returns the connectionTimeout.
See Also:
DataSource.getConnectionTimeout()

getMetaCacheTimeout

public long getMetaCacheTimeout()

getTimeZone

public TimeZone getTimeZone()

getCustomValue

public String getCustomValue(String key)
Specified by:
getCustomValue in interface DataSource
Returns:
Returns matching custom value or null if not exists.
See Also:
DataSource.getCustomValue(java.lang.String)

getCustomNames

public String[] getCustomNames()
Specified by:
getCustomNames in interface DataSource
Returns:
returns all custom names
See Also:
DataSource.getCustomNames()

getCustoms

public Struct getCustoms()
Specified by:
getCustoms in interface DataSource
Returns:
returns custom
See Also:
DataSource.getCustoms()

hasSQLRestriction

public boolean hasSQLRestriction()
Specified by:
hasSQLRestriction in interface DataSource
Returns:
returns if database has a SQL restriction
See Also:
DataSource.hasSQLRestriction()

getName

public String getName()
Specified by:
getName in interface DataSource
Returns:
Returns the name.
See Also:
DataSource.getName()

setClazz

public void setClazz(Class clazz)
Specified by:
setClazz in interface DataSource
Parameters:
clazz - The clazz to set.
See Also:
DataSource.setClazz(java.lang.Class)

toString

public String toString()
Overrides:
toString in class Object
See Also:
Object.toString()

equals

public boolean equals(Object obj)
Overrides:
equals in class Object
See Also:
Object.equals(java.lang.Object)

getProcedureColumnCache

public Map<String,ProcMetaCollection> getProcedureColumnCache()

validate

public boolean validate()

isStorage

public boolean isStorage()


Copyright © 2012 Railo