Class JdbcDataSource
- java.lang.Object
-
- org.opennms.netmgt.config.opennmsDataSources.JdbcDataSource
-
- All Implemented Interfaces:
Serializable
public class JdbcDataSource extends Object implements Serializable
Top-level element for the opennms-database.xml configuration file.- Version:
- $Revision$ $Date$
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description JdbcDataSource()
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description voidaddParam(int index, Param vParam)voidaddParam(Param vParam)Enumeration<Param>enumerateParam()Method enumerateParam.booleanequals(Object obj)Overrides the Object.equals method.StringgetClassName()Returns the value of field 'className'.StringgetDatabaseName()Returns the value of field 'databaseName'.StringgetName()Returns the value of field 'name'.Param[]getParam()Method getParam.Returns the contents of the collection in an Array.ParamgetParam(int index)Method getParam.List<Param>getParamCollection()Method getParamCollection.Returns a reference to 'paramList'.intgetParamCount()Method getParamCount.StringgetPassword()Returns the value of field 'password'.StringgetSchemaName()Returns the value of field 'schemaName'.StringgetUrl()Returns the value of field 'url'.StringgetUserName()Returns the value of field 'userName'.inthashCode()Method hashCode.Iterator<Param>iterateParam()Method iterateParam.voidremoveAllParam()booleanremoveParam(Param vParam)Method removeParam.ParamremoveParamAt(int index)Method removeParamAt.voidsetClassName(String className)Sets the value of field 'className'.voidsetDatabaseName(String databaseName)Sets the value of field 'databaseName'.voidsetName(String name)Sets the value of field 'name'.voidsetParam(int index, Param vParam)voidsetParam(List<Param> vParamList)Sets the value of 'paramList' by copying the given Vector.voidsetParam(Param[] vParamArray)voidsetParamCollection(List<Param> paramList)Deprecated.voidsetPassword(String password)Sets the value of field 'password'.voidsetSchemaName(String schemaName)Sets the value of field 'schemaName'.voidsetUrl(String url)Sets the value of field 'url'.voidsetUserName(String userName)Sets the value of field 'userName'.
-
-
-
Method Detail
-
addParam
public void addParam(Param vParam) throws IndexOutOfBoundsException
- Parameters:
vParam-- Throws:
IndexOutOfBoundsException- if the index given is outside the bounds of the collection
-
addParam
public void addParam(int index, Param vParam) throws IndexOutOfBoundsException- Parameters:
index-vParam-- Throws:
IndexOutOfBoundsException- if the index given is outside the bounds of the collection
-
enumerateParam
public Enumeration<Param> enumerateParam()
Method enumerateParam.- Returns:
- an Enumeration over all possible elements of this collection
-
equals
public boolean equals(Object obj)
Overrides the Object.equals method.
-
getClassName
public String getClassName()
Returns the value of field 'className'.- Returns:
- the value of field 'ClassName'.
-
getDatabaseName
public String getDatabaseName()
Returns the value of field 'databaseName'.- Returns:
- the value of field 'DatabaseName'.
-
getName
public String getName()
Returns the value of field 'name'.- Returns:
- the value of field 'Name'.
-
getParam
public Param getParam(int index) throws IndexOutOfBoundsException
Method getParam.- Parameters:
index-- Returns:
- the value of the org.opennms.netmgt.config.opennmsDataSources.Param at the given index
- Throws:
IndexOutOfBoundsException- if the index given is outside the bounds of the collection
-
getParam
public Param[] getParam()
Method getParam.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
-
getParamCollection
public List<Param> getParamCollection()
Method getParamCollection.Returns a reference to 'paramList'. No type checking is performed on any modifications to the Vector.- Returns:
- a reference to the Vector backing this class
-
getParamCount
public int getParamCount()
Method getParamCount.- Returns:
- the size of this collection
-
getPassword
public String getPassword()
Returns the value of field 'password'.- Returns:
- the value of field 'Password'.
-
getSchemaName
public String getSchemaName()
Returns the value of field 'schemaName'.- Returns:
- the value of field 'SchemaName'.
-
getUrl
public String getUrl()
Returns the value of field 'url'.- Returns:
- the value of field 'Url'.
-
getUserName
public String getUserName()
Returns the value of field 'userName'.- Returns:
- the value of field 'UserName'.
-
hashCode
public int hashCode()
Method hashCode.
-
iterateParam
public Iterator<Param> iterateParam()
Method iterateParam.- Returns:
- an Iterator over all possible elements in this collection
-
removeAllParam
public void removeAllParam()
-
removeParam
public boolean removeParam(Param vParam)
Method removeParam.- Parameters:
vParam-- Returns:
- true if the object was removed from the collection.
-
removeParamAt
public Param removeParamAt(int index)
Method removeParamAt.- Parameters:
index-- Returns:
- the element removed from the collection
-
setClassName
public void setClassName(String className)
Sets the value of field 'className'.- Parameters:
className- the value of field 'className'.
-
setDatabaseName
public void setDatabaseName(String databaseName)
Sets the value of field 'databaseName'.- Parameters:
databaseName- the value of field 'databaseName'.
-
setName
public void setName(String name)
Sets the value of field 'name'.- Parameters:
name- the value of field 'name'.
-
setParam
public void setParam(int index, Param vParam) throws IndexOutOfBoundsException- Parameters:
index-vParam-- Throws:
IndexOutOfBoundsException- if the index given is outside the bounds of the collection
-
setParam
public void setParam(Param[] vParamArray)
- Parameters:
vParamArray-
-
setParam
public void setParam(List<Param> vParamList)
Sets the value of 'paramList' by copying the given Vector. All elements will be checked for type safety.- Parameters:
vParamList- the Vector to copy.
-
setParamCollection
public void setParamCollection(List<Param> paramList)
Deprecated.Sets the value of 'paramList' by setting it to the given Vector. No type checking is performed.- Parameters:
paramList- the Vector to set.
-
setPassword
public void setPassword(String password)
Sets the value of field 'password'.- Parameters:
password- the value of field 'password'.
-
setSchemaName
public void setSchemaName(String schemaName)
Sets the value of field 'schemaName'.- Parameters:
schemaName- the value of field 'schemaName'.
-
setUrl
public void setUrl(String url)
Sets the value of field 'url'.- Parameters:
url- the value of field 'url'.
-
setUserName
public void setUserName(String userName)
Sets the value of field 'userName'.- Parameters:
userName- the value of field 'userName'.
-
-