All Libraries | This Library | Package | Class | Use | Tree | Deprecated | Index | Grand Index | Help
|  | Components |
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.sas.taglib.storage.jdbc
Class JDBCConnectionTag

    com.sas.taglib.storage.jdbc.JDBCConnectionTag

All Implemented Interfaces:
  java.io.Serializable, javax.servlet.jsp.tagext.BodyTag, javax.servlet.jsp.tagext.IterationTag, javax.servlet.jsp.tagext.JspTag, javax.servlet.jsp.tagext.Tag, javax.servlet.jsp.tagext.TryCatchFinally

    public class JDBCConnectionTag

JDBCConnectionTag is the tag handler class for the sas:JDBCConnection custom tag . JDBCConnectionTag is invoked by the JSP page to evaluate the sas:JDBCConnection custom tag during the execution of the page. Tag handler methods are called by the JSP page implementation class at various points during the evaluation of the tag. The tag handler methods in turn call methods on the underlying JDBC Connection, com.sas.storage.jdbc.JDBCConnection, to execute methods.

JSP custom tags provide an alternative to using the TransformationBeans™. Visit the Custom Tag Library Reference for additional information on the sas:JDBCConnection custom tag.

For More Information:

Visit the AppDev Studio Developer's Site to access step-by-step examples, white papers and additional usage information at http://support.sas.com/rnd/appdev/.

Examples for this class may be found on the Examples Site.

Note: A snapshot of the AppDev Studio Developers Site is installed on your local Web server when you install AppDev Studio. To access the site from webAF, select Help -> Developer Site .

See Also:
  `JDBCConnection`, Serialized Form

Field Summary
`static java.lang.String` | `RB_KEY` Localization String Key for the ConnectionTag

Fields inherited from class com.sas.taglib.BaseBodyTag
`DELIMITERS`

Constructor Summary
`JDBCConnectionTag()`

Method Summary
`protected void` | `applyAttributes()` Apply JDBCConnection properties to the underlying com.sas.storage.jdbc.JDBCConnection object
`int` | `doEndTag()` Process the end tag.
`int` | `doStartTag()` Processes the start tag for this instance.
`boolean` | `getAutoCommit()` Returns the auto-commit mode for the connection.
`java.lang.String` | `getCatalog()` Returns the connection's current catalog name.
`java.lang.String` | `getConnectionInfo()` Returns the String representing the Properties object used to get a java.sql.Connection from the DriverManager.
`java.lang.String` | `getDatabaseURL()` Returns the database url used to get a connection from the DriverManager.
`java.lang.String` | `getDriverName()` Returns the name of the JDBC Driver class to be used for the JDBC Connection.
`java.lang.String` | `getLoginCommand()` Returns the String representing the Command object to be executed before attempting to load the JDBC Driver or find a Connection.
`java.lang.String` | `getPassword()` Get the password used to get a java.sql.Connection from the DriverManager.
`int` | `getTransactionIsolation()` Returns the desired transaction isolation level for the Jdbc Connection.
`java.lang.String` | `getTypeMap()` Returns the String representing the type map that will be used for custom mapping of SQL structured types and distinct types.
`java.lang.String` | `getUsername()` Get the username used to get a java.sql.Connection from the DriverManager.
`protected void` | `initialize(boolean includeAttributes)` Initializes attributes and variables for this tag handler.
`boolean` | `isReadOnly()` Returns true if the connection is in read-only mode, false otherwise.
`void` | `setAutoCommit(boolean autoCommit)` Sets the auto-commit mode for the connection.
`void` | `setCatalog(java.lang.String catalog)` Sets a catalog name in order to select a subspace of the Connection's database in which to work.
`void` | `setConnectionInfo(java.lang.String connectionInfo)` Sets the String representing the Properties object used to get a java.sql.Connection from the DriverManager.
`void` | `setDatabaseURL(java.lang.String databaseURL)` Sets the the database url used to get a connection from the DriverManager.
`void` | `setDriverName(java.lang.String driverName)` Sets the name of the JDBC Driver class to be used for the JDBC Connection.
`void` | `setLoginCommand(java.lang.String loginCommand)` Sets the String representing the Command object to be executed before attempting to load the JDBC Driver or find a Connection.
`void` | `setPassword(java.lang.String password)` Set the password used to get a java.sql.Connection from the DriverManager.
`void` | `setReadOnly(boolean readOnly)` Puts the connection in read-only mode as a hint to enable database optimizations.
`void` | `setTransactionIsolation(int transactionIsolation)` Sets the desired transaction isolation level for the Jdbc Connection.
`void` | `setTypeMap(java.lang.String typeMap)` Sets the String representing the type map that will be used for custom mapping of SQL structured types and distinct types.
`void` | `setUsername(java.lang.String username)` Set the username used to get a java.sql.Connection from the DriverManager.

Methods inherited from class com.sas.taglib.BaseBodyTag
`doCatch, doFinally, getApplyAttributes, getBodyStrings, getCompositeComponentKey, getInstantiate, getLocale, getPageContext, getRef, getScope, getTagScope, getWrappedClassName, getWrappedObject, getWrappedObject, loadBeanInstance, newInstance, release, removeFromScope, searchContext, setApplyAttributes, setCompositeComponentKey, setInstantiate, setLocale, setRef, setScope, setTagScope, setVariableWithinScope, setWrappedClassName, setWrappedObject, validate`

Field Detail

### RB_KEY

    public static final java.lang.String RB_KEY

  Localization String Key for the ConnectionTag

  See Also:
    Constant Field Values

Constructor Detail

### JDBCConnectionTag

    public JDBCConnectionTag()

Method Detail

### initialize

    protected void initialize(boolean includeAttributes)

  Initializes attributes and variables for this tag handler.

  Overrides:
    `initialize` in class `BaseBodyTag`
  Parameters:
    `includeAttributes` - Set to true if attributes are to be set to default values.

### setConnectionInfo

    public void setConnectionInfo(java.lang.String connectionInfo)

  Sets the String representing the Properties object used to get a java.sql.Connection from the DriverManager.

  Parameters:
    `connectionInfo` - the String representing the Properties object used in obtaining a Connection
  See Also:
    `getConnectionInfo()`

### getConnectionInfo

    public java.lang.String getConnectionInfo()

  Returns the String representing the Properties object used to get a java.sql.Connection from the DriverManager.

  Returns:
    the String representing the Properties object used in obtaining a Connection
  See Also:
    `setConnectionInfo(java.lang.String)`

### setLoginCommand

    public void setLoginCommand(java.lang.String loginCommand)

  Sets the String representing the Command object to be executed before attempting to load the JDBC Driver or find a Connection.

  Parameters:
    `loginCommand` - the String representing the login command
  See Also:
    `getLoginCommand()`

### getLoginCommand

    public java.lang.String getLoginCommand()

  Returns the String representing the Command object to be executed before attempting to load the JDBC Driver or find a Connection.

  Returns:
    the String representing the login command
  See Also:
    `setLoginCommand(java.lang.String)`

### setDriverName

    public void setDriverName(java.lang.String driverName)

  Sets the name of the JDBC Driver class to be used for the JDBC Connection.

  Parameters:
    `driverName` - the name of the JDBC Driver class
  See Also:
    `getDriverName()`

### getDriverName

    public java.lang.String getDriverName()

  Returns the name of the JDBC Driver class to be used for the JDBC Connection.

  Returns:
    the name of the JDBC Driver class
  See Also:
    `setDriverName(java.lang.String)`

### setPassword

    public void setPassword(java.lang.String password)

  Set the password used to get a java.sql.Connection from the DriverManager. If the connectionInfo property has been set already, the password will not be put into it.

  Parameters:
    `password` - password
  See Also:
    `getPassword()`

### getPassword

    public java.lang.String getPassword()

  Get the password used to get a java.sql.Connection from the DriverManager.

  Returns:
    the password used to get a JDBC Connection from the DriverManager
  See Also:
    `setPassword(java.lang.String)`

### setDatabaseURL

    public void setDatabaseURL(java.lang.String databaseURL)

  Sets the the database url used to get a connection from the DriverManager.

  Parameters:
    `databaseURL` - the String representing the database url used to obtain a java.sql.Connection
  See Also:
    `getDatabaseURL()`

### getDatabaseURL

    public java.lang.String getDatabaseURL()

  Returns the database url used to get a connection from the DriverManager.

  Returns:
    the String representing the database url used to obtain a java.sql.Connection
  See Also:
    `setDatabaseURL(java.lang.String)`

### setUsername

    public void setUsername(java.lang.String username)

  Set the username used to get a java.sql.Connection from the DriverManager. If the connectionInfo property has been set already, the username will not be put into it.

  Parameters:
    `username` - username
  See Also:
    `getUsername()`

### getUsername

    public java.lang.String getUsername()

  Get the username used to get a java.sql.Connection from the DriverManager.

  Returns:
    the username used to get a java.sql.Connection from the DriverManager
  See Also:
    `setUsername(java.lang.String)`

### isReadOnly

    public boolean isReadOnly()

  Returns true if the connection is in read-only mode, false otherwise.

  Returns:
    true if the connection is in read-only mode, false otherwise.
  See Also:
    `setReadOnly(boolean)`

### setReadOnly

    public void setReadOnly(boolean readOnly)

  Puts the connection in read-only mode as a hint to enable database optimizations.

  Parameters:
    `readOnly` - indicates if the connection should be in read-only mode.
  See Also:
    `Connection.setReadOnly(boolean)`

### getCatalog

    public java.lang.String getCatalog()

  Returns the connection's current catalog name.

  Returns:
    the connection's current catalog name
  See Also:
    `setCatalog(java.lang.String)`

### setCatalog

    public void setCatalog(java.lang.String catalog)

  Sets a catalog name in order to select a subspace of the Connection's database in which to work. If the driver does not support catalogs, it will silently ignore this request.

  Parameters:
    `catalog` - the name of the catalog to select
  See Also:
    `Connection.setCatalog(java.lang.String)`

### getTypeMap

    public java.lang.String getTypeMap()

  Returns the String representing the type map that will be used for custom mapping of SQL structured types and distinct types.

  Returns:
    the String representing the type map that will be used for custom mapping of SQL structured types and distinct types
  See Also:
    `setTypeMap(java.lang.String)`

### setTypeMap

    public void setTypeMap(java.lang.String typeMap)

  Sets the String representing the type map that will be used for custom mapping of SQL structured types and distinct types.

  Parameters:
    `typeMap` - the String representing the type map used for custom mapping of SQL structured types and distinct types
  See Also:
    `Connection.setTypeMap(java.util.Map>)`

### getAutoCommit

    public boolean getAutoCommit()

  Returns the auto-commit mode for the connection.

  See Also:
    `setAutoCommit(boolean)`

### setAutoCommit

    public void setAutoCommit(boolean autoCommit)

  Sets the auto-commit mode for the connection.

  See Also:
    `Connection.setAutoCommit(boolean)`, `getAutoCommit()`

### getTransactionIsolation

    public int getTransactionIsolation()

  Returns the desired transaction isolation level for the Jdbc Connection.

  See Also:
    `setTransactionIsolation(int)`

### setTransactionIsolation

    public void setTransactionIsolation(int transactionIsolation)

  Sets the desired transaction isolation level for the Jdbc Connection. The constants defined in the java.sql.Connection interface are the possible transaction isolation levels.

  Parameters:
    `transactionIsolation` - the desired transaction isolataion level for the Jdbc Connection
  See Also:
    `Connection.setTransactionIsolation(int)`

### applyAttributes

    protected void applyAttributes()
                            throws javax.servlet.jsp.JspException

  Apply JDBCConnection properties to the underlying com.sas.storage.jdbc.JDBCConnection object

  Overrides:
    `applyAttributes` in class `BaseBodyTag`
  Throws:
    `javax.servlet.jsp.JspException` - Thrown if a JspException occurs.

### doStartTag

    public int doStartTag()
                   throws javax.servlet.jsp.JspException

  Processes the start tag for this instance. The doStartTag() method assumes that all setter methods have been invoked before. When this method is invoked, the body has not yet been invoked.

  Specified by:
    `doStartTag` in interface `javax.servlet.jsp.tagext.Tag`
  Overrides:
    `doStartTag` in class `BaseBodyTag`
  Returns:
    int designating the next course of action for the tag/jsp page.
  Throws:
    `javax.servlet.jsp.JspException` - Thrown if a JspException occurs.
  See Also:
    `BaseBodyTag.setInstantiate(boolean)`, `TagSupport.doStartTag()`

### doEndTag

    public int doEndTag()
                 throws javax.servlet.jsp.JspException

  Process the end tag. This method will be called on all Tag objects.

  Specified by:
    `doEndTag` in interface `javax.servlet.jsp.tagext.Tag`
  Overrides:
    `doEndTag` in class `javax.servlet.jsp.tagext.BodyTagSupport`
  Returns:
    int designating the next course of action for the tag/jsp page.
  Throws:
    `javax.servlet.jsp.JspException`

All Libraries | This Library | Package | Class | Use | Tree | Deprecated | Index | Grand Index | Help
|  | Components |
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2009 SAS Institute Inc. All Rights Reserved.