java.lang.Object
org.odpi.openmetadata.adapters.connectors.resource.jdbc.properties.JDBCDataValue

public class JDBCDataValue extends Object
JDBCDataValue is used when inserting new rows into a table.
  • Constructor Details

    • JDBCDataValue

      public JDBCDataValue(Object dataValue, int targetSQLType)
      Typical constructor does not need the scaleOrLength.
      Parameters:
      dataValue - data value formatted into an appropriate SQL type
      targetSQLType - type of the data value from java.sql.Types
    • JDBCDataValue

      public JDBCDataValue(Object dataValue, int targetSQLType, int scaleOrLength)
      Constructor for numbers and streams.
      Parameters:
      dataValue - data value formatted into an appropriate SQL type
      targetSQLType - type of the data value from java.sql.Types
      scaleOrLength - for java.sql.Types.DECIMAL or java.sql.Types.NUMERIC types, this is the number of digits after the decimal point. For Java Object types InputStream and Reader, this is the length of the data in the stream or reader. For all other types, this value will be ignored.
    • JDBCDataValue

      public JDBCDataValue(JDBCDataValue template)
      Copy/clone Constructor.
      Parameters:
      template - object ot copy
  • Method Details

    • getDataValue

      public Object getDataValue()
      The value formatted into the appropriate SQL type.
      Returns:
      object
    • getTargetSQLType

      public int getTargetSQLType()
      The type of the data value using the values from java.sql.Types.
      Returns:
      int
    • getScaleOrLength

      public int getScaleOrLength()
      Return the scaleOrLength. For java.sql.Types.DECIMAL or java.sql.Types.NUMERIC types, this is the number of digits after the decimal point. For Java Object types InputStream and Reader, this is the length of the data in the stream or reader. For all other types, this value will be ignored.
      Returns:
      int
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • equals

      public boolean equals(Object objectToCompare)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object