Class JdbcDataSource

  • All Implemented Interfaces:
    java.io.Serializable

    public class JdbcDataSource
    extends java.lang.Object
    implements java.io.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
      void addParam​(int index, Param vParam)  
      void addParam​(Param vParam)  
      java.util.Enumeration<Param> enumerateParam()
      Method enumerateParam.
      boolean equals​(java.lang.Object obj)
      Overrides the Object.equals method.
      java.lang.String getClassName()
      Returns the value of field 'className'.
      java.lang.String getDatabaseName()
      Returns the value of field 'databaseName'.
      java.lang.String getName()
      Returns the value of field 'name'.
      Param[] getParam()
      Method getParam.Returns the contents of the collection in an Array.
      Param getParam​(int index)
      Method getParam.
      java.util.List<Param> getParamCollection()
      Method getParamCollection.Returns a reference to 'paramList'.
      int getParamCount()
      Method getParamCount.
      java.lang.String getPassword()
      Returns the value of field 'password'.
      java.lang.String getSchemaName()
      Returns the value of field 'schemaName'.
      java.lang.String getUrl()
      Returns the value of field 'url'.
      java.lang.String getUserName()
      Returns the value of field 'userName'.
      int hashCode()
      Method hashCode.
      java.util.Iterator<Param> iterateParam()
      Method iterateParam.
      void removeAllParam()  
      boolean removeParam​(Param vParam)
      Method removeParam.
      Param removeParamAt​(int index)
      Method removeParamAt.
      void setClassName​(java.lang.String className)
      Sets the value of field 'className'.
      void setDatabaseName​(java.lang.String databaseName)
      Sets the value of field 'databaseName'.
      void setName​(java.lang.String name)
      Sets the value of field 'name'.
      void setParam​(int index, Param vParam)  
      void setParam​(java.util.List<Param> vParamList)
      Sets the value of 'paramList' by copying the given Vector.
      void setParam​(Param[] vParamArray)  
      void setParamCollection​(java.util.List<Param> paramList)
      Deprecated. 
      void setPassword​(java.lang.String password)
      Sets the value of field 'password'.
      void setSchemaName​(java.lang.String schemaName)
      Sets the value of field 'schemaName'.
      void setUrl​(java.lang.String url)
      Sets the value of field 'url'.
      void setUserName​(java.lang.String userName)
      Sets the value of field 'userName'.
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • JdbcDataSource

        public JdbcDataSource()
    • Method Detail

      • addParam

        public void addParam​(Param vParam)
                      throws java.lang.IndexOutOfBoundsException
        Parameters:
        vParam -
        Throws:
        java.lang.IndexOutOfBoundsException - if the index given is outside the bounds of the collection
      • addParam

        public void addParam​(int index,
                             Param vParam)
                      throws java.lang.IndexOutOfBoundsException
        Parameters:
        index -
        vParam -
        Throws:
        java.lang.IndexOutOfBoundsException - if the index given is outside the bounds of the collection
      • enumerateParam

        public java.util.Enumeration<Param> enumerateParam()
        Method enumerateParam.
        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 class java.lang.Object
        Parameters:
        obj -
        Returns:
        true if the objects are equal.
      • getClassName

        public java.lang.String getClassName()
        Returns the value of field 'className'.
        Returns:
        the value of field 'ClassName'.
      • getDatabaseName

        public java.lang.String getDatabaseName()
        Returns the value of field 'databaseName'.
        Returns:
        the value of field 'DatabaseName'.
      • getName

        public java.lang.String getName()
        Returns the value of field 'name'.
        Returns:
        the value of field 'Name'.
      • getParam

        public Param getParam​(int index)
                       throws java.lang.IndexOutOfBoundsException
        Method getParam.
        Parameters:
        index -
        Returns:
        the value of the org.opennms.netmgt.config.opennmsDataSources.Param at the given index
        Throws:
        java.lang.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 java.util.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 java.lang.String getPassword()
        Returns the value of field 'password'.
        Returns:
        the value of field 'Password'.
      • getSchemaName

        public java.lang.String getSchemaName()
        Returns the value of field 'schemaName'.
        Returns:
        the value of field 'SchemaName'.
      • getUrl

        public java.lang.String getUrl()
        Returns the value of field 'url'.
        Returns:
        the value of field 'Url'.
      • getUserName

        public java.lang.String getUserName()
        Returns the value of field 'userName'.
        Returns:
        the value of field 'UserName'.
      • hashCode

        public int hashCode()
        Method hashCode.
        Overrides:
        hashCode in class java.lang.Object
        Returns:
        a hash code value for the object.
      • iterateParam

        public java.util.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​(java.lang.String className)
        Sets the value of field 'className'.
        Parameters:
        className - the value of field 'className'.
      • setDatabaseName

        public void setDatabaseName​(java.lang.String databaseName)
        Sets the value of field 'databaseName'.
        Parameters:
        databaseName - the value of field 'databaseName'.
      • setName

        public void setName​(java.lang.String name)
        Sets the value of field 'name'.
        Parameters:
        name - the value of field 'name'.
      • setParam

        public void setParam​(int index,
                             Param vParam)
                      throws java.lang.IndexOutOfBoundsException
        Parameters:
        index -
        vParam -
        Throws:
        java.lang.IndexOutOfBoundsException - if the index given is outside the bounds of the collection
      • setParam

        public void setParam​(Param[] vParamArray)
        Parameters:
        vParamArray -
      • setParam

        public void setParam​(java.util.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​(java.util.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​(java.lang.String password)
        Sets the value of field 'password'.
        Parameters:
        password - the value of field 'password'.
      • setSchemaName

        public void setSchemaName​(java.lang.String schemaName)
        Sets the value of field 'schemaName'.
        Parameters:
        schemaName - the value of field 'schemaName'.
      • setUrl

        public void setUrl​(java.lang.String url)
        Sets the value of field 'url'.
        Parameters:
        url - the value of field 'url'.
      • setUserName

        public void setUserName​(java.lang.String userName)
        Sets the value of field 'userName'.
        Parameters:
        userName - the value of field 'userName'.