public class ConnectionPropertiesImpl extends Object implements Meta.ConnectionProperties
Meta.ConnectionProperties. Provides additional state
tracking to enable RemoteMeta to lazily push changes up to a query server.
Meta instances should probably hold authority on the isDirty
flag because AvaticaConnection instances have no way of knowing if they're local or
remote.
| Modifier and Type | Field and Description |
|---|---|
private Boolean |
autoCommit |
private String |
catalog |
private boolean |
isDirty |
private Boolean |
readOnly |
private String |
schema |
private Integer |
transactionIsolation |
| Constructor and Description |
|---|
ConnectionPropertiesImpl() |
ConnectionPropertiesImpl(Boolean autoCommit,
Boolean readOnly,
Integer transactionIsolation,
String catalog,
String schema) |
ConnectionPropertiesImpl(Connection conn) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object o) |
static ConnectionPropertiesImpl |
fromProto(Common.ConnectionProperties proto) |
String |
getCatalog() |
String |
getSchema() |
Integer |
getTransactionIsolation() |
int |
hashCode() |
Boolean |
isAutoCommit() |
boolean |
isDirty() |
boolean |
isEmpty() |
Boolean |
isReadOnly() |
ConnectionPropertiesImpl |
merge(Meta.ConnectionProperties that)
Overwrites fields in
this with any non-null fields in that. |
Meta.ConnectionProperties |
setAutoCommit(boolean val)
Sets
autoCommit status and flag as dirty. |
Meta.ConnectionProperties |
setCatalog(String val)
Sets
catalog and flag as dirty. |
ConnectionPropertiesImpl |
setDirty(boolean val) |
Meta.ConnectionProperties |
setReadOnly(boolean val)
Sets
readOnly status and flag as dirty. |
Meta.ConnectionProperties |
setSchema(String val)
Sets
schema and flag as dirty. |
Meta.ConnectionProperties |
setTransactionIsolation(int val)
Sets
transactionIsolation status and flag as dirty. |
Common.ConnectionProperties |
toProto() |
private boolean isDirty
private Boolean autoCommit
private Boolean readOnly
private Integer transactionIsolation
private String catalog
private String schema
public ConnectionPropertiesImpl()
public ConnectionPropertiesImpl(Connection conn) throws SQLException
SQLExceptionpublic ConnectionPropertiesImpl setDirty(boolean val)
public boolean isDirty()
public boolean isEmpty()
isEmpty in interface Meta.ConnectionPropertiestrue when no properies have been set, false otherwise.public ConnectionPropertiesImpl merge(Meta.ConnectionProperties that)
this with any non-null fields in that. Sets
isDirty if any fields are changed.merge in interface Meta.ConnectionPropertiesthispublic Meta.ConnectionProperties setAutoCommit(boolean val)
autoCommit status and flag as dirty.setAutoCommit in interface Meta.ConnectionPropertiesthispublic Boolean isAutoCommit()
isAutoCommit in interface Meta.ConnectionPropertiespublic Meta.ConnectionProperties setReadOnly(boolean val)
readOnly status and flag as dirty.setReadOnly in interface Meta.ConnectionPropertiesthispublic Boolean isReadOnly()
isReadOnly in interface Meta.ConnectionPropertiespublic Meta.ConnectionProperties setTransactionIsolation(int val)
transactionIsolation status and flag as dirty.setTransactionIsolation in interface Meta.ConnectionPropertiesthispublic Integer getTransactionIsolation()
getTransactionIsolation in interface Meta.ConnectionPropertiespublic Meta.ConnectionProperties setCatalog(String val)
catalog and flag as dirty.setCatalog in interface Meta.ConnectionPropertiesthispublic String getCatalog()
getCatalog in interface Meta.ConnectionPropertiespublic Meta.ConnectionProperties setSchema(String val)
schema and flag as dirty.setSchema in interface Meta.ConnectionPropertiesthispublic String getSchema()
getSchema in interface Meta.ConnectionPropertiespublic Common.ConnectionProperties toProto()
toProto in interface Meta.ConnectionPropertiespublic static ConnectionPropertiesImpl fromProto(Common.ConnectionProperties proto)
Copyright © 2012–2016 The Apache Software Foundation. All rights reserved.