|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.jboss.dna.connector.jdbc.JdbcRepositorySource
public class JdbcRepositorySource

A description of a JDBC resource that can be used to access database information.
| Field Summary | |
|---|---|
static int |
DEFAULT_RETRY_LIMIT
The default limit is 0 for retrying connection calls to the underlying source. |
static String |
DEFAULT_ROOT_NODE_UUID
The default UUID that is used for root nodes in a JDBC connector. |
static boolean |
DEFAULT_SUPPORTS_UPDATES
This source supports updates by default, but each instance may be configured to be
read-only or updateable. |
| Constructor Summary | |
|---|---|
JdbcRepositorySource()
default constructor |
|
| Method Summary | |
|---|---|
boolean |
equals(Object obj)
|
RepositorySourceCapabilities |
getCapabilities()
Get the capabilities for this source. |
RepositoryConnection |
getConnection()
Get a connection from this source. |
String |
getDatabaseUrl()
Gets database URL as string |
String |
getDataSourceName()
Sets data source JNDI name |
CachePolicy |
getDefaultCachePolicy()
Get the default cache policy for this source, or null if the global default cache policy should be used |
String |
getDriverClassName()
Gets JDBC driver class name |
String |
getName()
Get the name for this repository source. |
Object |
getObjectInstance(Object obj,
Name name,
Context nameCtx,
Hashtable<?,?> environment)
|
String |
getPassword()
Get user's password |
Reference |
getReference()
|
int |
getRetryLimit()
Get the maximum number of retries that may be performed on a given operation when using connections created by this source. |
String |
getRootNodeUuid()
|
boolean |
getSupportsUpdates()
Get whether this source supports updates. |
String |
getUserName()
Gets the user name |
void |
initialize(RepositoryContext context)
Initialize this source to use the supplied RepositoryContext, from which this source can obtain the
configuration defining this source,
connections to other sources, and the
execution context. |
void |
setDatabaseUrl(String databaseUrl)
Sets the database URL as string |
void |
setDataSourceName(String dataSourceName)
Sets data source JNDI name |
void |
setDefaultCachePolicy(CachePolicy defaultCachePolicy)
|
void |
setDriverClassName(String driverClassName)
Sets JDBC driver class name |
void |
setName(String name)
Set the name of this source |
void |
setPassword(String password)
Sets the user's password |
void |
setRetryLimit(int limit)
Set the maximum number of retries that may be performed on a given operation when using connections created by this source. |
void |
setRootNodeUuid(String rootNodeUuid)
|
void |
setSupportsUpdates(boolean supportsUpdates)
Set whether this source supports updates. |
void |
setUserName(String userName)
Sets the user name |
| Methods inherited from class java.lang.Object |
|---|
getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int DEFAULT_RETRY_LIMIT
connection calls to the underlying source.
public static final boolean DEFAULT_SUPPORTS_UPDATES
be
read-only or updateable.
public static final String DEFAULT_ROOT_NODE_UUID
| Constructor Detail |
|---|
public JdbcRepositorySource()
| Method Detail |
|---|
public RepositorySourceCapabilities getCapabilities()
getCapabilities in interface RepositorySourceRepositorySource.getCapabilities()
public RepositoryConnection getConnection()
throws RepositorySourceException
getConnection in interface RepositorySourceRepositorySourceException - if there is a problem obtaining a connectionRepositorySource.getConnection()public String getName()
getName in interface RepositorySourceRepositorySource.getName()public void setName(String name)
name - the name for this sourcepublic int getRetryLimit()
connections created by this source. This value does not constitute a minimum number of retries; in fact, the connection
user is not required to retry any operations.
getRetryLimit in interface RepositorySourceRepositorySource.getRetryLimit()
public void initialize(RepositoryContext context)
throws RepositorySourceException
RepositoryContext, from which this source can obtain the
configuration defining this source,
connections to other sources, and the
execution context.
This method may be called each time the configuration changes, allowing the source to update itself.
initialize in interface RepositorySourceRepositorySourceExceptionRepositorySource.initialize(org.jboss.dna.graph.connector.RepositoryContext)public void setRetryLimit(int limit)
connections created by this source. This value does not constitute a minimum number of retries; in fact, the connection
user is not required to retry any operations.
setRetryLimit in interface RepositorySourcelimit - the maximum number of allowable retries, or 0 if the source has no limitRepositorySource.setRetryLimit(int)public boolean getSupportsUpdates()
public void setSupportsUpdates(boolean supportsUpdates)
supportsUpdates - true if this source supports updating content, or false if this source only supports reading
content.public CachePolicy getDefaultCachePolicy()
public void setDefaultCachePolicy(CachePolicy defaultCachePolicy)
defaultCachePolicy - Sets defaultCachePolicy to the specified value.public String getRootNodeUuid()
public void setRootNodeUuid(String rootNodeUuid)
rootNodeUuid - Sets rootNodeUuid to the specified value.
IllegalArgumentException - if the string value cannot be converted to UUIDpublic boolean equals(Object obj)
equals in class Objectpublic String getDriverClassName()
public void setDriverClassName(String driverClassName)
driverClassName - the JDBC driver class namepublic String getDatabaseUrl()
public void setDatabaseUrl(String databaseUrl)
databaseUrl - the database URL as stringpublic String getUserName()
public void setUserName(String userName)
userName - the user namepublic String getPassword()
public void setPassword(String password)
password - the user's passwordpublic String getDataSourceName()
public void setDataSourceName(String dataSourceName)
dataSourceName - the data source JNDI namepublic Reference getReference()
getReference in interface ReferenceableReferenceable.getReference()
public Object getObjectInstance(Object obj,
Name name,
Context nameCtx,
Hashtable<?,?> environment)
throws Exception
getObjectInstance in interface ObjectFactoryExceptionObjectFactory.getObjectInstance(java.lang.Object, javax.naming.Name, javax.naming.Context,
java.util.Hashtable)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||