/* */ package com.arjuna.ats.internal.arjuna.objectstore.jdbc.accessors;
/* */
/* */ import com.arjuna.ats.arjuna.ArjunaNames;
/* */ import com.arjuna.ats.arjuna.exceptions.FatalError;
/* */ import com.arjuna.ats.arjuna.gandiva.ObjectName;
/* */ import com.arjuna.ats.arjuna.objectstore.jdbc.JDBCAccess;
/* */ import java.sql.Connection;
/* */ import java.sql.DriverManager;
/* */ import java.sql.SQLException;
/* */
/* */ public class accessor
/* */ implements JDBCAccess
/* */ {
/* */ private String _tableName;
/* */ private boolean _dropTable;
/* */ private String _url;
/* */
/* */ public accessor()
/* */ {
/* 59 */ this._tableName = null;
/* 60 */ this._dropTable = false;
/* 61 */ this._url = null;
/* */ }
/* */
/* */ public Connection getConnection() throws SQLException
/* */ {
/* 66 */ return DriverManager.getConnection(this._url, null);
/* */ }
/* */
/* */ public void putConnection(Connection conn)
/* */ {
/* */ }
/* */
/* */ public String tableName()
/* */ {
/* 75 */ return this._tableName;
/* */ }
/* */
/* */ public boolean dropTable()
/* */ {
/* 80 */ return this._dropTable;
/* */ }
/* */
/* */ public void initialise(ObjectName objName)
/* */ {
/* */ try
/* */ {
/* 87 */ this._url = objName.getStringAttribute(ArjunaNames.Implementation_ObjectStore_JDBC_url());
/* 88 */ this._tableName = objName.getStringAttribute(ArjunaNames.Implementation_ObjectStore_JDBC_tableName());
/* */
/* 90 */ long drop = objName.getLongAttribute(ArjunaNames.Implementation_ObjectStore_JDBC_dropTable());
/* */
/* 92 */ if (drop == 1L)
/* 93 */ this._dropTable = true;
/* */ }
/* */ catch (Exception ex)
/* */ {
/* 97 */ throw new FatalError(toString() + " : " + ex);
/* */ }
/* */
/* 100 */ if (this._url == null)
/* 101 */ throw new FatalError(toString() + " : invalid ObjectName parameter!");
/* */ }
/* */ }
/* Location: /home/mnovotny/projects/EMBEDDED_JBOSS_BETA3_COMMUNITY/embedded/output/lib/embedded-jboss/lib/jboss-embedded-all.jar
* Qualified Name: com.arjuna.ats.internal.arjuna.objectstore.jdbc.accessors.accessor
* JD-Core Version: 0.6.0
*/