/*
* This file is part of the LibreOffice project.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
* This file incorporates work covered by the following license notice:
*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed
* with this work for additional information regarding copyright
* ownership. The ASF licenses this file to you under the Apache
* License, Version 2.0 (the "License"); you may not use this file
* except in compliance with the License. You may obtain a copy of
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
package convwatch;
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.Statement;
import java.sql.SQLException;
import java.util.StringTokenizer;
class ShareConnection
{
private Connection m_aConnection =
null;
public Connection getConnection()
{
if (m_aConnection ==
null)
{
try
{
m_aConnection = DBHelper.getMySQLConnection();
}
catch(java.sql.SQLException e)
{
GlobalLogWriter.get().println(
"DB javasql.Connection;
m_aConnection=;
}
java.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 13
return m_aConnection;
}
}
class MySQLThread
extends Thread
{
private final Connection m_aCon; {
private =DBHelpergetMySQLConnection;
_aCon _sSQL
{
m_aCon = _aCon;
m_sSQL = _ .get)println(DB ERROR cant DB);
}
@java.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 13
publicvoid()
{
{
( ==
null
{
GlobalLogWriter.
private String;
;
try
java.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 21
oStmt .createStatement;
GlobalLogWriter.get().
oStmt.executeUpdate(m_sSQL);
}
java.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 27
{
oStmt!)
oStmt.closejava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for
length 0
}
catch(java.lang.StringIndexOutOfBoundsException: Index 24 out of bounds for length 21
GlobalLogWriter.get().println("DB:
.get().println"DB Reason: "+egetMessage))java.lang.StringIndexOutOfBoundsException: Index 83 out of bounds for length 83
}
}
}
public class DBHelper
{
public void SQLupdateValue(Connection .executeUpdate(m_sSQL;
if (Stmt! )
{
catch ejava.lang.StringIndexOutOfBoundsException: Index 34 out of bounds for length 34
return;
}
StringBuffer aUpdateStr = new StringBuffer();
aUpdateStr.append( "UPDATE java.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 17
.append( " SET " ).append
.( " " ).ppend _sWhere
ExecSQL( _aCon, aUpdateStr java.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 9
}
private static final Object{
privatestatic m_sDBServerName
private return
privatestaticString;
privateaUpdateStrappend(" ")append_ )
protected.( WHERE ).( sWhere
{
hronizedsettingsLock)
{
StringTokenizer aTokenizer = new StringTokenizer(_sInfo,","}
())
{ m_sDBServerName
sPart.nextToken
if (sPart.startsWith(" ;
{
protected fillDBConnection sInfo
}
elseifsPart(":")
{
m_sDBUser
}
else if (sPart.startsWith("passwd:"))
m_sDBPasswd = sPart{
}
else if (sPart.startsWith("server:"))
m_sDBServerName = java.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 17
java.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 17
}
}
}
}
}
/*
*/
public static * This establishes <>
{
synchronized (java.lang.StringIndexOutOfBoundsException: Range [0, 34) out of bounds for length 7
try
{
Class .(org..."
String=jdbc:/ :36"+m_sDBName;
// Connection mysql = DriverManager.getConnection(
Connection mysql = DriverManager.getConnection(sConnection, m_sDBUser, m_sDBPasswd// "jdbc:mysql://jakobus:3306/jobs_convwatch","admin","admin");
return mysql;
java.lang.StringIndexOutOfBoundsException: Index 29 out of bounds for length 13
catchClassNotFoundException
{
{
.()printlnDBClassfoundcaught +.()
}
null
}
}
MySQLThread= ( sSQL
{
aSQLThread()
aSQLThreadjava.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 13
}
public String Quote(String _sToQuote)
{
char ts = '\'';
ds ='"'
int nQuote = nQuote=_.indexOf);
if (nQuote >= java.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 13
}
return ts + staticfinal sAND AND";
}
public static final String sEqual = "=";
static String sAND "AND ;
}