public class BasicContext extends Object implements Context
Context.KeyData| Modifier and Type | Field and Description |
|---|---|
protected Charset |
charset |
protected DecimalFormat |
currencyFormatter |
protected DateTimeFormat |
dateFormatter |
protected DecimalFormat |
decimalFormatter |
protected Context.KeyData |
keyData |
protected Map<com.impossibl.postgres.system.BasicContext.NotificationKey,NotificationListener> |
notificationListeners |
protected Protocol |
protocol |
protected Registry |
registry |
protected Version |
serverVersion |
protected Properties |
settings |
protected Map<String,Class<?>> |
targetTypeMap |
protected DateTimeFormat |
timeFormatter |
protected DateTimeFormat |
timestampFormatter |
protected TimeZone |
timeZone |
protected Map<String,com.impossibl.postgres.system.BasicContext.PreparedQuery> |
utilQueries |
| Constructor and Description |
|---|
BasicContext(SocketAddress address,
Properties settings,
Map<String,Class<?>> targetTypeMap) |
protected Registry registry
protected Charset charset
protected TimeZone timeZone
protected DateTimeFormat dateFormatter
protected DateTimeFormat timeFormatter
protected DateTimeFormat timestampFormatter
protected DecimalFormat decimalFormatter
protected DecimalFormat currencyFormatter
protected Properties settings
protected Version serverVersion
protected Context.KeyData keyData
protected Protocol protocol
protected Map<com.impossibl.postgres.system.BasicContext.NotificationKey,NotificationListener> notificationListeners
public BasicContext(SocketAddress address, Properties settings, Map<String,Class<?>> targetTypeMap) throws IOException, NoticeException
IOExceptionNoticeExceptionprotected void shutdown()
public Version getServerVersion()
public void setServerVersion(Version serverVersion)
public Registry getRegistry()
getRegistry in interface Contextpublic Protocol getProtocol()
getProtocol in interface Contextpublic Object getSetting(String name)
getSetting in interface Contextpublic <T> T getSetting(String name, Class<T> type)
getSetting in interface Contextpublic <T> T getSetting(String name, T defaultValue)
getSetting in interface Contextpublic boolean isSettingEnabled(String name)
isSettingEnabled in interface Contextpublic Class<?> lookupInstanceType(Type type)
lookupInstanceType in interface Contextpublic Charset getCharset()
getCharset in interface Contextpublic TimeZone getTimeZone()
getTimeZone in interface Contextpublic Context.KeyData getKeyData()
getKeyData in interface Contextpublic DateTimeFormat getDateFormatter()
getDateFormatter in interface Contextpublic DateTimeFormat getTimeFormatter()
getTimeFormatter in interface Contextpublic DateTimeFormat getTimestampFormatter()
getTimestampFormatter in interface Contextpublic DecimalFormat getDecimalFormatter()
getDecimalFormatter in interface Contextpublic DecimalFormat getCurrencyFormatter()
getCurrencyFormatter in interface Contextprotected void init()
throws IOException,
NoticeException
IOExceptionNoticeExceptionpublic void refreshType(int typeId)
refreshType in interface Contextpublic void refreshRelationType(int relationId)
refreshRelationType in interface Contextpublic boolean isUtilQueryPrepared(String name)
public com.impossibl.postgres.system.BasicContext.PreparedQuery prepareUtilQuery(String name, String sql, String... parameterTypeNames) throws IOException
IOExceptionpublic com.impossibl.postgres.system.BasicContext.PreparedQuery prepareUtilQuery(String name, String sql, List<Type> parameterTypes) throws IOException
IOExceptionpublic <T> List<T> queryResults(String queryTxt, Class<T> rowType, Object... params) throws IOException, NoticeException
IOExceptionNoticeExceptionpublic List<DataRow> queryResults(String queryTxt) throws IOException, NoticeException
IOExceptionNoticeExceptionpublic void query(String queryTxt) throws IOException, NoticeException
IOExceptionNoticeExceptionpublic String queryFirstResultString(String queryTxt) throws IOException, NoticeException
IOExceptionNoticeExceptionpublic QueryCommand.ResultBatch queryBatch(String queryTxt, Object... params) throws IOException, NoticeException
IOExceptionNoticeExceptionpublic void setKeyData(int processId,
int secretKey)
public void addNotificationListener(String name, String channelNameFilter, NotificationListener listener)
public void removeNotificationListener(NotificationListener listener)
public void removeNotificationListener(String listenerName)
public void reportNotification(int processId,
String channelName,
String payload)
reportNotification in interface ContextCopyright © 2013–2017 impossibl.com. All rights reserved.