1 package com.teamkonzept.db; 2 3 import java.sql.*; 4 import java.util.Properties ; 5 6 11 public class TKPostgreSQLConnectData extends TKConnectData { 12 public static boolean initialized = false; 13 16 protected static String jdbcSubProtocol = "postgresql://"; 17 20 protected static String jdbcDriverClass = "org.postgresql.Driver"; 21 25 protected static TKSQLTypeConverter typeConverter = null; 26 27 30 public TKPostgreSQLConnectData( Properties connectProperties ) throws SQLException 31 { 32 super( jdbcSubProtocol, connectProperties ); 33 if( !initialized ) { 34 registerDriver(jdbcDriverClass); 35 initialized = true; 36 } 37 } 38 42 public void initTypeConverter( final Connection conn ) throws SQLException 43 { 44 if ( typeConverter == null ) { 45 typeConverter = new TKSybaseSQLTypeConverter( conn ); 46 48 } 49 } 50 public TKSQLTypeConverter getTypeConverter() 51 { 52 return typeConverter; 53 } 54 } 55 56 | Popular Tags |