T - extension instance typepublic abstract class PostgresExtension<T> extends Object implements Extension<T>, Plugin
| Modifier and Type | Field and Description |
|---|---|
protected Map<String,String> |
config |
protected Connection |
db |
| Modifier | Constructor and Description |
|---|---|
protected |
PostgresExtension(Map<String,String> configuration) |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
static void |
copyProperties(Map<String,String> src,
String keyPrefix,
Properties dest)
Each key in src that starts with keyPrefix is copied (without the prefix) and its value to dest
|
abstract void |
deleteWhereSourceId(String sourceId) |
abstract void |
flush()
Write updates to disk.
|
static Connection |
getConnection(Map<String,String> props,
String[] prefixes) |
int |
getFetchSize()
Get the configuration setting for fetchSize if configured.
|
static Timestamp |
inaccurateSqlTimestamp(DateTimeAccuracy dateTime) |
protected void |
openDatabase(String[] propertyPrefixes) |
protected abstract void |
prepareStatements() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcreateInstance, createInstance, getInstanceTypesnewInstanceprotected Connection db
public static Connection getConnection(Map<String,String> props, String[] prefixes) throws SQLException, ClassNotFoundException
SQLExceptionClassNotFoundExceptionpublic static void copyProperties(Map<String,String> src, String keyPrefix, Properties dest)
src - map containing key,value pairskeyPrefix - prefix to match src keysdest - destination propertiesprotected void openDatabase(String[] propertyPrefixes) throws ClassNotFoundException, SQLException
ClassNotFoundExceptionSQLExceptionpublic void close()
throws IOException
close in interface Pluginclose in interface Closeableclose in interface AutoCloseableIOExceptionpublic static Timestamp inaccurateSqlTimestamp(DateTimeAccuracy dateTime)
public int getFetchSize()
public abstract void flush()
close().public abstract void deleteWhereSourceId(String sourceId) throws SQLException
SQLExceptionprotected abstract void prepareStatements()
throws SQLException
SQLExceptionCopyright © 2013–2015 R.W.Majeed. All rights reserved.