Autopsy  4.6.0
Graphical digital forensics platform for The Sleuth Kit and other tools.
PostgresEamDbSettings.java
Go to the documentation of this file.
1 /*
2  * Central Repository
3  *
4  * Copyright 2015-2017 Basis Technology Corp.
5  * Contact: carrier <at> sleuthkit <dot> org
6  *
7  * Licensed under the Apache License, Version 2.0 (the "License");
8  * you may not use this file except in compliance with the License.
9  * You may obtain a copy of the License at
10  *
11  * http://www.apache.org/licenses/LICENSE-2.0
12  *
13  * Unless required by applicable law or agreed to in writing, software
14  * distributed under the License is distributed on an "AS IS" BASIS,
15  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16  * See the License for the specific language governing permissions and
17  * limitations under the License.
18  */
19 package org.sleuthkit.autopsy.centralrepository.datamodel;
20 
21 import java.sql.Connection;
22 import java.sql.DriverManager;
23 import java.sql.PreparedStatement;
24 import java.sql.ResultSet;
25 import java.sql.SQLException;
26 import java.sql.Statement;
27 import java.util.List;
28 import java.util.Properties;
29 import java.util.logging.Level;
30 import java.util.regex.Pattern;
35 
39 public final class PostgresEamDbSettings {
40 
41  private final static Logger LOGGER = Logger.getLogger(PostgresEamDbSettings.class.getName());
42  private final String DEFAULT_HOST = ""; // NON-NLS
43  private final int DEFAULT_PORT = 5432;
44  private final String DEFAULT_DBNAME = "central_repository"; // NON-NLS
45  private final int DEFAULT_BULK_THRESHHOLD = 1000;
46  private final String DEFAULT_USERNAME = "";
47  private final String DEFAULT_PASSWORD = "";
48  private final String VALIDATION_QUERY = "SELECT version()"; // NON-NLS
49  private final String JDBC_BASE_URI = "jdbc:postgresql://"; // NON-NLS
50  private final String JDBC_DRIVER = "org.postgresql.Driver"; // NON-NLS
51  private final String DB_NAMES_REGEX = "[a-z][a-z0-9_]*"; // only lower case
52  private final String DB_USER_NAMES_REGEX = "[a-zA-Z]\\w*";
53  private String host;
54  private int port;
55  private String dbName;
56  private int bulkThreshold;
57  private String userName;
58  private String password;
59 
61  loadSettings();
62  }
63 
64  public void loadSettings() {
65  host = ModuleSettings.getConfigSetting("CentralRepository", "db.postgresql.host"); // NON-NLS
66  if (host == null || host.isEmpty()) {
67  host = DEFAULT_HOST;
68  }
69 
70  try {
71  String portString = ModuleSettings.getConfigSetting("CentralRepository", "db.postgresql.port"); // NON-NLS
72  if (portString == null || portString.isEmpty()) {
73  port = DEFAULT_PORT;
74  } else {
75  port = Integer.parseInt(portString);
76  if (port < 0 || port > 65535) {
77  port = DEFAULT_PORT;
78  }
79  }
80  } catch (NumberFormatException ex) {
81  port = DEFAULT_PORT;
82  }
83 
84  dbName = ModuleSettings.getConfigSetting("CentralRepository", "db.postgresql.dbName"); // NON-NLS
85  if (dbName == null || dbName.isEmpty()) {
86  dbName = DEFAULT_DBNAME;
87  }
88 
89  try {
90  String bulkThresholdString = ModuleSettings.getConfigSetting("CentralRepository", "db.postgresql.bulkThreshold"); // NON-NLS
91  if (bulkThresholdString == null || bulkThresholdString.isEmpty()) {
92  this.bulkThreshold = DEFAULT_BULK_THRESHHOLD;
93  } else {
94  this.bulkThreshold = Integer.parseInt(bulkThresholdString);
95  if (getBulkThreshold() <= 0) {
96  this.bulkThreshold = DEFAULT_BULK_THRESHHOLD;
97  }
98  }
99  } catch (NumberFormatException ex) {
100  this.bulkThreshold = DEFAULT_BULK_THRESHHOLD;
101  }
102 
103  userName = ModuleSettings.getConfigSetting("CentralRepository", "db.postgresql.user"); // NON-NLS
104  if (userName == null || userName.isEmpty()) {
105  userName = DEFAULT_USERNAME;
106  }
107 
108  password = ModuleSettings.getConfigSetting("CentralRepository", "db.postgresql.password"); // NON-NLS
109  if (password == null || password.isEmpty()) {
110  password = DEFAULT_PASSWORD;
111  } else {
112  try {
113  password = TextConverter.convertHexTextToText(password);
114  } catch (TextConverterException ex) {
115  LOGGER.log(Level.WARNING, "Failed to convert password from hex text to text.", ex);
116  password = DEFAULT_PASSWORD;
117  }
118  }
119  }
120 
121  public void saveSettings() {
122  ModuleSettings.setConfigSetting("CentralRepository", "db.postgresql.host", getHost()); // NON-NLS
123  ModuleSettings.setConfigSetting("CentralRepository", "db.postgresql.port", Integer.toString(port)); // NON-NLS
124  ModuleSettings.setConfigSetting("CentralRepository", "db.postgresql.dbName", getDbName()); // NON-NLS
125  ModuleSettings.setConfigSetting("CentralRepository", "db.postgresql.bulkThreshold", Integer.toString(getBulkThreshold())); // NON-NLS
126  ModuleSettings.setConfigSetting("CentralRepository", "db.postgresql.user", getUserName()); // NON-NLS
127  try {
128  ModuleSettings.setConfigSetting("CentralRepository", "db.postgresql.password", TextConverter.convertTextToHexText(getPassword())); // NON-NLS
129  } catch (TextConverterException ex) {
130  LOGGER.log(Level.SEVERE, "Failed to convert password from text to hex text.", ex);
131  }
132  }
133 
142  public String getConnectionURL(boolean usePostgresDb) {
143  StringBuilder url = new StringBuilder();
144  url.append(getJDBCBaseURI());
145  url.append(getHost());
146  url.append("/"); // NON-NLS
147  if (usePostgresDb) {
148  url.append("postgres"); // NON-NLS
149  } else {
150  url.append(getDbName());
151  }
152 
153  return url.toString();
154  }
155 
162  private Connection getEphemeralConnection(boolean usePostgresDb) {
163  Connection conn;
164  try {
165  String url = getConnectionURL(usePostgresDb);
166  Properties props = new Properties();
167  props.setProperty("user", getUserName());
168  props.setProperty("password", getPassword());
169 
170  Class.forName(getDriver());
171  conn = DriverManager.getConnection(url, props);
172  } catch (ClassNotFoundException | SQLException ex) {
173  // TODO: Determine why a connection failure (ConnectionException) re-throws
174  // the SQLException and does not print this log message?
175  LOGGER.log(Level.SEVERE, "Failed to acquire ephemeral connection to postgresql."); // NON-NLS
176  conn = null;
177  }
178  return conn;
179  }
180 
187  public boolean verifyConnection() {
188  Connection conn = getEphemeralConnection(true);
189  if (null == conn) {
190  return false;
191  }
192 
193  boolean result = EamDbUtil.executeValidationQuery(conn, VALIDATION_QUERY);
195  return result;
196  }
197 
203  public boolean verifyDatabaseExists() {
204  Connection conn = getEphemeralConnection(true);
205  if (null == conn) {
206  return false;
207  }
208 
209  String sql = "SELECT datname FROM pg_catalog.pg_database WHERE lower(datname) = lower(?) LIMIT 1"; // NON-NLS
210  PreparedStatement ps = null;
211  ResultSet rs = null;
212  try {
213  ps = conn.prepareStatement(sql);
214  ps.setString(1, getDbName());
215  rs = ps.executeQuery();
216  if (rs.next()) {
217  return true;
218  }
219  } catch (SQLException ex) {
220  LOGGER.log(Level.SEVERE, "Failed to execute database existance query.", ex); // NON-NLS
221  return false;
222  } finally {
226  }
227  return false;
228  }
229 
236  public boolean verifyDatabaseSchema() {
237  Connection conn = getEphemeralConnection(false);
238  if (null == conn) {
239  return false;
240  }
241 
242  boolean result = EamDbUtil.schemaVersionIsSet(conn);
243 
245  return result;
246  }
247 
248  public boolean createDatabase() {
249  Connection conn = getEphemeralConnection(true);
250  if (null == conn) {
251  return false;
252  }
253 
254  String sql = "CREATE DATABASE %s OWNER %s"; // NON-NLS
255  try {
256  Statement stmt;
257  stmt = conn.createStatement();
258  stmt.execute(String.format(sql, getDbName(), getUserName()));
259  } catch (SQLException ex) {
260  LOGGER.log(Level.SEVERE, "Failed to execute create database statement.", ex); // NON-NLS
261  return false;
262  } finally {
264  }
265  return true;
266 
267  }
268 
269  public boolean deleteDatabase() {
270  Connection conn = getEphemeralConnection(true);
271  if (null == conn) {
272  return false;
273  }
274 
275  String sql = "DROP DATABASE %s"; // NON-NLS
276  try {
277  Statement stmt;
278  stmt = conn.createStatement();
279  stmt.execute(String.format(sql, getDbName()));
280  } catch (SQLException ex) {
281  LOGGER.log(Level.SEVERE, "Failed to execute drop database statement.", ex); // NON-NLS
282  return false;
283  } finally {
285  }
286  return true;
287 
288  }
289 
301  public boolean initializeDatabaseSchema() {
302  // The "id" column is an alias for the built-in 64-bit int "rowid" column.
303  // It is autoincrementing by default and must be of type "integer primary key".
304  // We've omitted the autoincrement argument because we are not currently
305  // using the id value to search for specific rows, so we do not care
306  // if a rowid is re-used after an existing rows was previously deleted.
307  StringBuilder createOrganizationsTable = new StringBuilder();
308  createOrganizationsTable.append("CREATE TABLE IF NOT EXISTS organizations (");
309  createOrganizationsTable.append("id SERIAL PRIMARY KEY,");
310  createOrganizationsTable.append("org_name text NOT NULL,");
311  createOrganizationsTable.append("poc_name text NOT NULL,");
312  createOrganizationsTable.append("poc_email text NOT NULL,");
313  createOrganizationsTable.append("poc_phone text NOT NULL,");
314  createOrganizationsTable.append("CONSTRAINT org_name_unique UNIQUE (org_name)");
315  createOrganizationsTable.append(")");
316 
317  // NOTE: The organizations will only have a small number of rows, so
318  // an index is probably not worthwhile.
319  StringBuilder createCasesTable = new StringBuilder();
320  createCasesTable.append("CREATE TABLE IF NOT EXISTS cases (");
321  createCasesTable.append("id SERIAL PRIMARY KEY,");
322  createCasesTable.append("case_uid text NOT NULL,");
323  createCasesTable.append("org_id integer,");
324  createCasesTable.append("case_name text NOT NULL,");
325  createCasesTable.append("creation_date text NOT NULL,");
326  createCasesTable.append("case_number text,");
327  createCasesTable.append("examiner_name text,");
328  createCasesTable.append("examiner_email text,");
329  createCasesTable.append("examiner_phone text,");
330  createCasesTable.append("notes text,");
331  createCasesTable.append("foreign key (org_id) references organizations(id) ON UPDATE SET NULL ON DELETE SET NULL,");
332  createCasesTable.append("CONSTRAINT case_uid_unique UNIQUE (case_uid)");
333  createCasesTable.append(")");
334 
335  // NOTE: when there are few cases in the cases table, these indices may not be worthwhile
336  String casesIdx1 = "CREATE INDEX IF NOT EXISTS cases_org_id ON cases (org_id)";
337  String casesIdx2 = "CREATE INDEX IF NOT EXISTS cases_case_uid ON cases (case_uid)";
338 
339  StringBuilder createDataSourcesTable = new StringBuilder();
340  createDataSourcesTable.append("CREATE TABLE IF NOT EXISTS data_sources (");
341  createDataSourcesTable.append("id SERIAL PRIMARY KEY,");
342  createDataSourcesTable.append("case_id integer NOT NULL,");
343  createDataSourcesTable.append("device_id text NOT NULL,");
344  createDataSourcesTable.append("name text NOT NULL,");
345  createDataSourcesTable.append("foreign key (case_id) references cases(id) ON UPDATE SET NULL ON DELETE SET NULL,");
346  createDataSourcesTable.append("CONSTRAINT datasource_unique UNIQUE (case_id, device_id, name)");
347  createDataSourcesTable.append(")");
348 
349  String dataSourceIdx1 = "CREATE INDEX IF NOT EXISTS data_sources_name ON data_sources (name)";
350 
351  StringBuilder createReferenceSetsTable = new StringBuilder();
352  createReferenceSetsTable.append("CREATE TABLE IF NOT EXISTS reference_sets (");
353  createReferenceSetsTable.append("id SERIAL PRIMARY KEY,");
354  createReferenceSetsTable.append("org_id integer NOT NULL,");
355  createReferenceSetsTable.append("set_name text NOT NULL,");
356  createReferenceSetsTable.append("version text NOT NULL,");
357  createReferenceSetsTable.append("known_status integer NOT NULL,");
358  createReferenceSetsTable.append("read_only boolean NOT NULL,");
359  createReferenceSetsTable.append("type integer NOT NULL,");
360  createReferenceSetsTable.append("import_date text NOT NULL,");
361  createReferenceSetsTable.append("foreign key (org_id) references organizations(id) ON UPDATE SET NULL ON DELETE SET NULL,");
362  createReferenceSetsTable.append("CONSTRAINT hash_set_unique UNIQUE (set_name, version)");
363  createReferenceSetsTable.append(")");
364 
365  String referenceSetsIdx1 = "CREATE INDEX IF NOT EXISTS reference_sets_org_id ON reference_sets (org_id)";
366 
367  // Each "%s" will be replaced with the relevant reference_TYPE table name.
368  StringBuilder createReferenceTypesTableTemplate = new StringBuilder();
369  createReferenceTypesTableTemplate.append("CREATE TABLE IF NOT EXISTS %s (");
370  createReferenceTypesTableTemplate.append("id SERIAL PRIMARY KEY,");
371  createReferenceTypesTableTemplate.append("reference_set_id integer,");
372  createReferenceTypesTableTemplate.append("value text NOT NULL,");
373  createReferenceTypesTableTemplate.append("known_status integer NOT NULL,");
374  createReferenceTypesTableTemplate.append("comment text,");
375  createReferenceTypesTableTemplate.append("CONSTRAINT %s_multi_unique UNIQUE (reference_set_id, value),");
376  createReferenceTypesTableTemplate.append("foreign key (reference_set_id) references reference_sets(id) ON UPDATE SET NULL ON DELETE SET NULL");
377  createReferenceTypesTableTemplate.append(")");
378 
379  // Each "%s" will be replaced with the relevant reference_TYPE table name.
380  String referenceTypesIdx1 = "CREATE INDEX IF NOT EXISTS %s_value ON %s (value)";
381  String referenceTypesIdx2 = "CREATE INDEX IF NOT EXISTS %s_value_known_status ON %s (value, known_status)";
382 
383  StringBuilder createCorrelationTypesTable = new StringBuilder();
384  createCorrelationTypesTable.append("CREATE TABLE IF NOT EXISTS correlation_types (");
385  createCorrelationTypesTable.append("id SERIAL PRIMARY KEY,");
386  createCorrelationTypesTable.append("display_name text NOT NULL,");
387  createCorrelationTypesTable.append("db_table_name text NOT NULL,");
388  createCorrelationTypesTable.append("supported integer NOT NULL,");
389  createCorrelationTypesTable.append("enabled integer NOT NULL,");
390  createCorrelationTypesTable.append("CONSTRAINT correlation_types_names UNIQUE (display_name, db_table_name)");
391  createCorrelationTypesTable.append(")");
392 
393  // Each "%s" will be replaced with the relevant TYPE_instances table name.
394  StringBuilder createArtifactInstancesTableTemplate = new StringBuilder();
395  createArtifactInstancesTableTemplate.append("CREATE TABLE IF NOT EXISTS %s (");
396  createArtifactInstancesTableTemplate.append("id SERIAL PRIMARY KEY,");
397  createArtifactInstancesTableTemplate.append("case_id integer NOT NULL,");
398  createArtifactInstancesTableTemplate.append("data_source_id integer NOT NULL,");
399  createArtifactInstancesTableTemplate.append("value text NOT NULL,");
400  createArtifactInstancesTableTemplate.append("file_path text NOT NULL,");
401  createArtifactInstancesTableTemplate.append("known_status integer NOT NULL,");
402  createArtifactInstancesTableTemplate.append("comment text,");
403  createArtifactInstancesTableTemplate.append("CONSTRAINT %s_multi_unique_ UNIQUE (data_source_id, value, file_path),");
404  createArtifactInstancesTableTemplate.append("foreign key (case_id) references cases(id) ON UPDATE SET NULL ON DELETE SET NULL,");
405  createArtifactInstancesTableTemplate.append("foreign key (data_source_id) references data_sources(id) ON UPDATE SET NULL ON DELETE SET NULL");
406  createArtifactInstancesTableTemplate.append(")");
407 
408  // Each "%s" will be replaced with the relevant TYPE_instances table name.
409  String instancesIdx1 = "CREATE INDEX IF NOT EXISTS %s_case_id ON %s (case_id)";
410  String instancesIdx2 = "CREATE INDEX IF NOT EXISTS %s_data_source_id ON %s (data_source_id)";
411  String instancesIdx3 = "CREATE INDEX IF NOT EXISTS %s_value ON %s (value)";
412  String instancesIdx4 = "CREATE INDEX IF NOT EXISTS %s_value_known_status ON %s (value, known_status)";
413 
414  StringBuilder createDbInfoTable = new StringBuilder();
415  createDbInfoTable.append("CREATE TABLE IF NOT EXISTS db_info (");
416  createDbInfoTable.append("id SERIAL PRIMARY KEY NOT NULL,");
417  createDbInfoTable.append("name text NOT NULL,");
418  createDbInfoTable.append("value text NOT NULL");
419  createDbInfoTable.append(")");
420 
421  // NOTE: the db_info table currenly only has 1 row, so having an index
422  // provides no benefit.
423  Connection conn = null;
424  try {
425  conn = getEphemeralConnection(false);
426  if (null == conn) {
427  return false;
428  }
429  Statement stmt = conn.createStatement();
430 
431  stmt.execute(createOrganizationsTable.toString());
432 
433  stmt.execute(createCasesTable.toString());
434  stmt.execute(casesIdx1);
435  stmt.execute(casesIdx2);
436 
437  stmt.execute(createDataSourcesTable.toString());
438  stmt.execute(dataSourceIdx1);
439 
440  stmt.execute(createReferenceSetsTable.toString());
441  stmt.execute(referenceSetsIdx1);
442 
443  stmt.execute(createCorrelationTypesTable.toString());
444 
445  stmt.execute(createDbInfoTable.toString());
446 
447  // Create a separate instance and reference table for each correlation type
448  List<CorrelationAttribute.Type> DEFAULT_CORRELATION_TYPES = CorrelationAttribute.getDefaultCorrelationTypes();
449 
450  String reference_type_dbname;
451  String instance_type_dbname;
452  for (CorrelationAttribute.Type type : DEFAULT_CORRELATION_TYPES) {
453  reference_type_dbname = EamDbUtil.correlationTypeToReferenceTableName(type);
454  instance_type_dbname = EamDbUtil.correlationTypeToInstanceTableName(type);
455 
456  stmt.execute(String.format(createArtifactInstancesTableTemplate.toString(), instance_type_dbname, instance_type_dbname));
457  stmt.execute(String.format(instancesIdx1, instance_type_dbname, instance_type_dbname));
458  stmt.execute(String.format(instancesIdx2, instance_type_dbname, instance_type_dbname));
459  stmt.execute(String.format(instancesIdx3, instance_type_dbname, instance_type_dbname));
460  stmt.execute(String.format(instancesIdx4, instance_type_dbname, instance_type_dbname));
461 
462  // FUTURE: allow more than the FILES type
463  if (type.getId() == CorrelationAttribute.FILES_TYPE_ID) {
464  stmt.execute(String.format(createReferenceTypesTableTemplate.toString(), reference_type_dbname, reference_type_dbname));
465  stmt.execute(String.format(referenceTypesIdx1, reference_type_dbname, reference_type_dbname));
466  stmt.execute(String.format(referenceTypesIdx2, reference_type_dbname, reference_type_dbname));
467  }
468  }
469 
470  } catch (SQLException ex) {
471  LOGGER.log(Level.SEVERE, "Error initializing db schema.", ex); // NON-NLS
472  return false;
473  } catch (EamDbException ex) {
474  LOGGER.log(Level.SEVERE, "Error getting default correlation types. Likely due to one or more Type's with an invalid db table name."); // NON-NLS
475  return false;
476  } finally {
478  }
479  return true;
480  }
481 
482  public boolean insertDefaultDatabaseContent() {
483  Connection conn = getEphemeralConnection(false);
484  if (null == conn) {
485  return false;
486  }
487 
488  boolean result = EamDbUtil.insertDefaultCorrelationTypes(conn)
489  && EamDbUtil.updateSchemaVersion(conn)
490  && EamDbUtil.insertDefaultOrganization(conn);
492 
493  return result;
494  }
495 
496  public boolean isChanged() {
497  String hostString = ModuleSettings.getConfigSetting("CentralRepository", "db.postgresql.host"); // NON-NLS
498  String portString = ModuleSettings.getConfigSetting("CentralRepository", "db.postgresql.port"); // NON-NLS
499  String dbNameString = ModuleSettings.getConfigSetting("CentralRepository", "db.postgresql.dbName"); // NON-NLS
500  String bulkThresholdString = ModuleSettings.getConfigSetting("CentralRepository", "db.postgresql.bulkThreshold"); // NON-NLS
501  String userNameString = ModuleSettings.getConfigSetting("CentralRepository", "db.postgresql.user"); // NON-NLS
502  String userPasswordString = ModuleSettings.getConfigSetting("CentralRepository", "db.postgresql.password"); // NON-NLS
503 
504  return !host.equals(hostString) || !Integer.toString(port).equals(portString)
505  || !dbName.equals(dbNameString) || !Integer.toString(bulkThreshold).equals(bulkThresholdString)
506  || !userName.equals(userNameString) || !password.equals(userPasswordString);
507  }
508 
512  public String getHost() {
513  return host;
514  }
515 
519  public void setHost(String host) throws EamDbException {
520  if (null != host && !host.isEmpty()) {
521  this.host = host;
522  } else {
523  throw new EamDbException("Invalid host name. Cannot be empty."); // NON-NLS
524  }
525  }
526 
530  public int getPort() {
531  return port;
532  }
533 
537  public void setPort(int port) throws EamDbException {
538  if (port > 0 && port < 65535) {
539  this.port = port;
540  } else {
541  throw new EamDbException("Invalid port. Must be a number greater than 0."); // NON-NLS
542  }
543  }
544 
551  public String getDbName() {
552  return dbName.toLowerCase();
553  }
554 
558  public void setDbName(String dbName) throws EamDbException {
559  if (dbName == null || dbName.isEmpty()) {
560  throw new EamDbException("Invalid database name. Cannot be empty."); // NON-NLS
561  } else if (!Pattern.matches(DB_NAMES_REGEX, dbName)) {
562  throw new EamDbException("Invalid database name. Name must start with a lowercase letter and can only contain lowercase letters, numbers, and '_'."); // NON-NLS
563  }
564 
565  this.dbName = dbName.toLowerCase();
566  }
567 
571  public int getBulkThreshold() {
572  return bulkThreshold;
573  }
574 
578  public void setBulkThreshold(int bulkThreshold) throws EamDbException {
579  if (bulkThreshold > 0) {
580  this.bulkThreshold = bulkThreshold;
581  } else {
582  throw new EamDbException("Invalid bulk threshold."); // NON-NLS
583  }
584  }
585 
589  public String getUserName() {
590  return userName;
591  }
592 
596  public void setUserName(String userName) throws EamDbException {
597  if (userName == null || userName.isEmpty()) {
598  throw new EamDbException("Invalid user name. Cannot be empty."); // NON-NLS
599  } else if (!Pattern.matches(DB_USER_NAMES_REGEX, userName)) {
600  throw new EamDbException("Invalid user name. Name must start with a letter and can only contain letters, numbers, and '_'."); // NON-NLS
601  }
602  this.userName = userName;
603  }
604 
608  public String getPassword() {
609  return password;
610  }
611 
615  public void setPassword(String password) throws EamDbException {
616  if (password == null || password.isEmpty()) {
617  throw new EamDbException("Invalid user password. Cannot be empty."); // NON-NLS
618  }
619  this.password = password;
620  }
621 
625  public String getValidationQuery() {
626  return VALIDATION_QUERY;
627  }
628 
632  public String getDriver() {
633  return JDBC_DRIVER;
634  }
635 
639  public String getJDBCBaseURI() {
640  return JDBC_BASE_URI;
641  }
642 
643 }
static boolean executeValidationQuery(Connection conn, String validationQuery)
Definition: EamDbUtil.java:321
static String correlationTypeToReferenceTableName(CorrelationAttribute.Type type)
Definition: EamDbUtil.java:360
static synchronized void setConfigSetting(String moduleName, String settingName, String settingVal)
static boolean insertDefaultCorrelationTypes(Connection conn)
Definition: EamDbUtil.java:102
static String correlationTypeToInstanceTableName(CorrelationAttribute.Type type)
Definition: EamDbUtil.java:349
static String getConfigSetting(String moduleName, String settingName)
synchronized static Logger getLogger(String name)
Definition: Logger.java:124
static String convertTextToHexText(String property)
static void closePreparedStatement(PreparedStatement preparedStatement)
Definition: EamDbUtil.java:51
static String convertHexTextToText(String property)

Copyright © 2012-2016 Basis Technology. Generated on: Mon May 7 2018
This work is licensed under a Creative Commons Attribution-Share Alike 3.0 United States License.