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.
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(org.apache.calcite.avatica.proto.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. |
org.apache.calcite.avatica.proto.Common.ConnectionProperties |
toProto() |
public ConnectionPropertiesImpl()
public ConnectionPropertiesImpl(Connection conn) throws SQLException
SQLException
public ConnectionPropertiesImpl setDirty(boolean val)
public boolean isDirty()
public boolean isEmpty()
isEmpty
in interface Meta.ConnectionProperties
true
when no properties 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.ConnectionProperties
this
public Meta.ConnectionProperties setAutoCommit(boolean val)
autoCommit
status and flag as dirty.setAutoCommit
in interface Meta.ConnectionProperties
this
public Boolean isAutoCommit()
isAutoCommit
in interface Meta.ConnectionProperties
public Meta.ConnectionProperties setReadOnly(boolean val)
readOnly
status and flag as dirty.setReadOnly
in interface Meta.ConnectionProperties
this
public Boolean isReadOnly()
isReadOnly
in interface Meta.ConnectionProperties
public Meta.ConnectionProperties setTransactionIsolation(int val)
transactionIsolation
status and flag as dirty.setTransactionIsolation
in interface Meta.ConnectionProperties
this
public Integer getTransactionIsolation()
getTransactionIsolation
in interface Meta.ConnectionProperties
public Meta.ConnectionProperties setCatalog(String val)
catalog
and flag as dirty.setCatalog
in interface Meta.ConnectionProperties
this
public String getCatalog()
getCatalog
in interface Meta.ConnectionProperties
public Meta.ConnectionProperties setSchema(String val)
schema
and flag as dirty.setSchema
in interface Meta.ConnectionProperties
this
public String getSchema()
getSchema
in interface Meta.ConnectionProperties
public org.apache.calcite.avatica.proto.Common.ConnectionProperties toProto()
toProto
in interface Meta.ConnectionProperties
public static ConnectionPropertiesImpl fromProto(org.apache.calcite.avatica.proto.Common.ConnectionProperties proto)
Copyright © 2012-2024 Apache Software Foundation. All Rights Reserved.