Class DataSourceConfiguration
- java.lang.Object
-
- org.opennms.netmgt.config.opennmsDataSources.DataSourceConfiguration
-
- All Implemented Interfaces:
java.io.Serializable
public class DataSourceConfiguration extends java.lang.Object implements java.io.Serializable
Top Level element for opennms-datasources.xml... a list of data sources to be used within OpenNMS.- Version:
- $Revision$ $Date$
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description DataSourceConfiguration()
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description void
addJdbcDataSource(int index, JdbcDataSource vJdbcDataSource)
void
addJdbcDataSource(JdbcDataSource vJdbcDataSource)
java.util.Enumeration<JdbcDataSource>
enumerateJdbcDataSource()
Method enumerateJdbcDataSource.boolean
equals(java.lang.Object obj)
Overrides the Object.equals method.ConnectionPool
getConnectionPool()
Returns the value of field 'connectionPool'.JdbcDataSource[]
getJdbcDataSource()
Method getJdbcDataSource.Returns the contents of the collection in an Array.JdbcDataSource
getJdbcDataSource(int index)
Method getJdbcDataSource.java.util.List<JdbcDataSource>
getJdbcDataSourceCollection()
Method getJdbcDataSourceCollection.Returns a reference to 'jdbcDataSourceList'.int
getJdbcDataSourceCount()
Method getJdbcDataSourceCount.int
hashCode()
Method hashCode.java.util.Iterator<JdbcDataSource>
iterateJdbcDataSource()
Method iterateJdbcDataSource.void
removeAllJdbcDataSource()
boolean
removeJdbcDataSource(JdbcDataSource vJdbcDataSource)
Method removeJdbcDataSource.JdbcDataSource
removeJdbcDataSourceAt(int index)
Method removeJdbcDataSourceAt.void
setConnectionPool(ConnectionPool connectionPool)
Sets the value of field 'connectionPool'.void
setJdbcDataSource(int index, JdbcDataSource vJdbcDataSource)
void
setJdbcDataSource(java.util.List<JdbcDataSource> vJdbcDataSourceList)
Sets the value of 'jdbcDataSourceList' by copying the given Vector.void
setJdbcDataSource(JdbcDataSource[] vJdbcDataSourceArray)
void
setJdbcDataSourceCollection(java.util.List<JdbcDataSource> jdbcDataSourceList)
Deprecated.
-
-
-
Method Detail
-
addJdbcDataSource
public void addJdbcDataSource(JdbcDataSource vJdbcDataSource) throws java.lang.IndexOutOfBoundsException
- Parameters:
vJdbcDataSource
-- Throws:
java.lang.IndexOutOfBoundsException
- if the index given is outside the bounds of the collection
-
addJdbcDataSource
public void addJdbcDataSource(int index, JdbcDataSource vJdbcDataSource) throws java.lang.IndexOutOfBoundsException
- Parameters:
index
-vJdbcDataSource
-- Throws:
java.lang.IndexOutOfBoundsException
- if the index given is outside the bounds of the collection
-
enumerateJdbcDataSource
public java.util.Enumeration<JdbcDataSource> enumerateJdbcDataSource()
Method enumerateJdbcDataSource.- Returns:
- an Enumeration over all possible elements of this collection
-
equals
public boolean equals(java.lang.Object obj)
Overrides the Object.equals method.- Overrides:
equals
in classjava.lang.Object
- Parameters:
obj
-- Returns:
- true if the objects are equal.
-
getConnectionPool
public ConnectionPool getConnectionPool()
Returns the value of field 'connectionPool'. The field 'connectionPool' has the following description: Database connection pool configuration.- Returns:
- the value of field 'ConnectionPool'.
-
getJdbcDataSource
public JdbcDataSource getJdbcDataSource(int index) throws java.lang.IndexOutOfBoundsException
Method getJdbcDataSource.- Parameters:
index
-- Returns:
- the value of the JdbcDataSource at the given index
- Throws:
java.lang.IndexOutOfBoundsException
- if the index given is outside the bounds of the collection
-
getJdbcDataSource
public JdbcDataSource[] getJdbcDataSource()
Method getJdbcDataSource.Returns the contents of the collection in an Array.Note: Just in case the collection contents are changing in another thread, we pass a 0-length Array of the correct type into the API call. This way we know that the Array returned is of exactly the correct length.
- Returns:
- this collection as an Array
-
getJdbcDataSourceCollection
public java.util.List<JdbcDataSource> getJdbcDataSourceCollection()
Method getJdbcDataSourceCollection.Returns a reference to 'jdbcDataSourceList'. No type checking is performed on any modifications to the Vector.- Returns:
- a reference to the Vector backing this class
-
getJdbcDataSourceCount
public int getJdbcDataSourceCount()
Method getJdbcDataSourceCount.- Returns:
- the size of this collection
-
hashCode
public int hashCode()
Method hashCode.- Overrides:
hashCode
in classjava.lang.Object
- Returns:
- a hash code value for the object.
-
iterateJdbcDataSource
public java.util.Iterator<JdbcDataSource> iterateJdbcDataSource()
Method iterateJdbcDataSource.- Returns:
- an Iterator over all possible elements in this collection
-
removeAllJdbcDataSource
public void removeAllJdbcDataSource()
-
removeJdbcDataSource
public boolean removeJdbcDataSource(JdbcDataSource vJdbcDataSource)
Method removeJdbcDataSource.- Parameters:
vJdbcDataSource
-- Returns:
- true if the object was removed from the collection.
-
removeJdbcDataSourceAt
public JdbcDataSource removeJdbcDataSourceAt(int index)
Method removeJdbcDataSourceAt.- Parameters:
index
-- Returns:
- the element removed from the collection
-
setConnectionPool
public void setConnectionPool(ConnectionPool connectionPool)
Sets the value of field 'connectionPool'. The field 'connectionPool' has the following description: Database connection pool configuration.- Parameters:
connectionPool
- the value of field 'connectionPool'.
-
setJdbcDataSource
public void setJdbcDataSource(int index, JdbcDataSource vJdbcDataSource) throws java.lang.IndexOutOfBoundsException
- Parameters:
index
-vJdbcDataSource
-- Throws:
java.lang.IndexOutOfBoundsException
- if the index given is outside the bounds of the collection
-
setJdbcDataSource
public void setJdbcDataSource(JdbcDataSource[] vJdbcDataSourceArray)
- Parameters:
vJdbcDataSourceArray
-
-
setJdbcDataSource
public void setJdbcDataSource(java.util.List<JdbcDataSource> vJdbcDataSourceList)
Sets the value of 'jdbcDataSourceList' by copying the given Vector. All elements will be checked for type safety.- Parameters:
vJdbcDataSourceList
- the Vector to copy.
-
setJdbcDataSourceCollection
public void setJdbcDataSourceCollection(java.util.List<JdbcDataSource> jdbcDataSourceList)
Deprecated.Sets the value of 'jdbcDataSourceList' by setting it to the given Vector. No type checking is performed.- Parameters:
jdbcDataSourceList
- the Vector to set.
-
-