|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.ojb.broker.metadata.JdbcConnectionDescriptor
public class JdbcConnectionDescriptor
JdbcConnectionDescriptor describes all relevant parameters of JDBC Connections used by the PersistenceBroker.
Field Summary | |
---|---|
static int |
AUTO_COMMIT_IGNORE_STATE
|
static int |
AUTO_COMMIT_SET_FALSE
|
static int |
AUTO_COMMIT_SET_TRUE_AND_TEMPORARY_FALSE
|
Constructor Summary | |
---|---|
JdbcConnectionDescriptor()
Constructor declaration |
Method Summary | |
---|---|
void |
addAttribute(java.lang.String attributeName,
java.lang.String attributeValue)
Store the specified attribute and it's value. |
java.lang.String |
getAttribute(java.lang.String attributeName)
Get the value of an attribute |
java.lang.String |
getAttribute(java.lang.String attributeName,
java.lang.String defaultValue)
Get the value of an attribute |
java.lang.String[] |
getAttributeNames()
Returns an array of the names of all atributes of this descriptor. |
java.util.Map |
getAttributes()
Returns the attribute map (name, value) of this descriptor. |
boolean |
getBatchMode()
|
ConnectionPoolDescriptor |
getConnectionPoolDescriptor()
Returns the connection pool descriptor. |
javax.sql.DataSource |
getDataSource()
Returns the data source that this connection descriptor represents if any. |
java.lang.String |
getDatasourceName()
Gets the datasourceName. |
java.lang.String |
getDbAlias()
Returns the database alias name used by OJB. |
java.lang.String |
getDbms()
Returns the database platform name. |
java.lang.String |
getDriver()
Returns the driver name. |
boolean |
getEagerRelease()
|
java.lang.String |
getJcdAlias()
Get the alias name for this descriptor. |
double |
getJdbcLevel()
Gets the jdbcLevel. |
ObjectCacheDescriptor |
getObjectCacheDescriptor()
Returns the appropriate ObjectCacheDescriptor
or null if not specified. |
java.lang.String |
getPassWord()
Returns the database password. |
PBKey |
getPBKey()
Return a key to identify the connection descriptor. |
java.lang.String |
getProtocol()
Returns the database protocol. |
SequenceDescriptor |
getSequenceDescriptor()
Return the associated SequenceDescriptor
or null if not set. |
java.lang.String |
getSubProtocol()
Returns the database sub-protocol. |
int |
getUseAutoCommit()
|
java.lang.String |
getUserName()
Returns the database user name. |
boolean |
isDataSource()
|
boolean |
isDefaultConnection()
|
boolean |
isIgnoreAutoCommitExceptions()
|
void |
setBatchMode(boolean flag)
|
void |
setConnectionPoolDescriptor(ConnectionPoolDescriptor cpd)
Sets the connection pool descriptor. |
void |
setDataSource(javax.sql.DataSource dataSource)
Sets the data source that this connection descriptor represents. |
void |
setDatasourceName(java.lang.String datasourceName)
Sets the datasourceName. |
void |
setDbAlias(java.lang.String str)
Sets the database alias name. |
void |
setDbms(java.lang.String str)
Sets the database platform name. |
void |
setDefaultConnection(boolean defaultConnection)
|
void |
setDriver(java.lang.String str)
Set the database driver. |
void |
setEagerRelease(boolean flag)
|
void |
setIgnoreAutoCommitExceptions(boolean ignoreAutoCommitExceptions)
|
void |
setJcdAlias(java.lang.String jcdAlias)
Set an alias name for this descriptor. |
void |
setJdbcLevel(double jdbcLevel)
|
void |
setJdbcLevel(java.lang.String jdbcLevel)
Sets the jdbcLevel. |
void |
setObjectCacheDescriptor(ObjectCacheDescriptor objectCacheDescriptor)
Sets the ObjectCacheDescriptor for representing connection/database. |
void |
setPassWord(java.lang.String str)
Sets the database password. |
void |
setProtocol(java.lang.String str)
Sets the database protocol. |
void |
setSequenceDescriptor(SequenceDescriptor sequenceDescriptor)
Set the SequenceDescriptor for this
connection descriptor. |
void |
setSubProtocol(java.lang.String str)
Sets the database sub-protocol. |
void |
setUseAutoCommit(int useAutoCommit)
|
void |
setUserName(java.lang.String str)
Sets the database user name. |
java.lang.String |
toString()
Returns a String representation of this class. |
java.lang.String |
toXML()
returns the XML marshalled version of this instance. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final int AUTO_COMMIT_IGNORE_STATE
public static final int AUTO_COMMIT_SET_TRUE_AND_TEMPORARY_FALSE
public static final int AUTO_COMMIT_SET_FALSE
Constructor Detail |
---|
public JdbcConnectionDescriptor()
Method Detail |
---|
public ObjectCacheDescriptor getObjectCacheDescriptor()
ObjectCacheDescriptor
or null
if not specified.
public void setObjectCacheDescriptor(ObjectCacheDescriptor objectCacheDescriptor)
ObjectCacheDescriptor
for representing connection/database.
public javax.sql.DataSource getDataSource()
null
public void setDataSource(javax.sql.DataSource dataSource)
dataSource
- The data sourcepublic java.lang.String getJcdAlias()
public void setJcdAlias(java.lang.String jcdAlias)
public boolean isDefaultConnection()
public boolean isDataSource()
public void setDefaultConnection(boolean defaultConnection)
public SequenceDescriptor getSequenceDescriptor()
SequenceDescriptor
or null
if not set.
public void setSequenceDescriptor(SequenceDescriptor sequenceDescriptor)
SequenceDescriptor
for this
connection descriptor.
public ConnectionPoolDescriptor getConnectionPoolDescriptor()
public void setConnectionPoolDescriptor(ConnectionPoolDescriptor cpd)
public PBKey getPBKey()
public int getUseAutoCommit()
public void setUseAutoCommit(int useAutoCommit)
public boolean isIgnoreAutoCommitExceptions()
public void setIgnoreAutoCommitExceptions(boolean ignoreAutoCommitExceptions)
public java.lang.String getDbms()
public void setDbms(java.lang.String str)
public java.lang.String getDriver()
public void setDriver(java.lang.String str)
public java.lang.String getProtocol()
public void setProtocol(java.lang.String str)
public java.lang.String getSubProtocol()
public void setSubProtocol(java.lang.String str)
public java.lang.String getDbAlias()
public void setDbAlias(java.lang.String str)
public java.lang.String getUserName()
public void setUserName(java.lang.String str)
public java.lang.String getPassWord()
public void setPassWord(java.lang.String str)
public java.lang.String getDatasourceName()
public void setDatasourceName(java.lang.String datasourceName)
datasourceName
- The datasourceName to setpublic double getJdbcLevel()
public void setJdbcLevel(java.lang.String jdbcLevel)
jdbcLevel
- The jdbcLevel to setpublic void setJdbcLevel(double jdbcLevel)
public boolean getEagerRelease()
public void setEagerRelease(boolean flag)
public boolean getBatchMode()
public void setBatchMode(boolean flag)
public java.lang.String toString()
public java.lang.String toXML()
XmlCapable
toXML
in interface XmlCapable
public void addAttribute(java.lang.String attributeName, java.lang.String attributeValue)
AttributeContainer
addAttribute
in interface AttributeContainer
attributeName
- the name of the attribute to retrieveattributeValue
- the attribute's valueAttributeContainer.addAttribute(String, String)
public java.lang.String getAttribute(java.lang.String attributeName, java.lang.String defaultValue)
AttributeContainer
getAttribute
in interface AttributeContainer
attributeName
- the attribute to retrievedefaultValue
- the value to return if the attribute is not present
AttributeContainer.getAttribute(String, String)
public java.lang.String getAttribute(java.lang.String attributeName)
AttributeContainer
getAttribute
in interface AttributeContainer
attributeName
- the attribute to retrieve
AttributeContainer.getAttribute(String)
public java.util.Map getAttributes()
public java.lang.String[] getAttributeNames()
null
)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |