Package com.microsoft.sqlserver.jdbc
Class SQLServerDataTable
java.lang.Object
com.microsoft.sqlserver.jdbc.SQLServerDataTable
public final class SQLServerDataTable
extends java.lang.Object
Represents the data table for SQL Server.
-
Constructor Summary
Constructors Constructor Description SQLServerDataTable()
The constant in the Java programming language, sometimes referred to as a type code, that identifies the type TVP. -
Method Summary
Modifier and Type Method Description void
addColumnMetadata(SQLServerDataColumn column)
Adds meta data for the specified column.void
addColumnMetadata(java.lang.String columnName, int sqlType)
Adds meta data for the specified column.void
addRow(java.lang.Object... values)
Adds one row of data to the data table.void
clear()
Clears this data table.boolean
equals(java.lang.Object object)
java.util.Map<java.lang.Integer,SQLServerDataColumn>
getColumnMetadata()
Returns thejava.util.Map
object type of columnMetaData for all columns where column indexes are mapped with their respectiveSQLServerDataColumn
Java object.java.util.Iterator<java.util.Map.Entry<java.lang.Integer,java.lang.Object[]>>
getIterator()
Returns an iterator on the rows of the data table.java.lang.String
getTvpName()
Returns name of TVP type set bysetTvpName(String)
.int
hashCode()
void
setTvpName(java.lang.String tvpName)
Sets the TVP Name.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
-
Constructor Details
-
SQLServerDataTable
The constant in the Java programming language, sometimes referred to as a type code, that identifies the type TVP.- Throws:
SQLServerException
- when an error occurs
-
-
Method Details
-
clear
public void clear()Clears this data table. -
getIterator
public java.util.Iterator<java.util.Map.Entry<java.lang.Integer,java.lang.Object[]>> getIterator()Returns an iterator on the rows of the data table.- Returns:
- an iterator on the rows of the data table.
-
addColumnMetadata
Adds meta data for the specified column.- Parameters:
columnName
- the name of the columnsqlType
- the sql type of the column- Throws:
SQLServerException
- when an error occurs
-
addColumnMetadata
Adds meta data for the specified column.- Parameters:
column
- the name of the column- Throws:
SQLServerException
- when an error occurs
-
addRow
Adds one row of data to the data table.- Parameters:
values
- values to be added in one row of data to the data table.- Throws:
SQLServerException
- when an error occurs
-
getColumnMetadata
Returns thejava.util.Map
object type of columnMetaData for all columns where column indexes are mapped with their respectiveSQLServerDataColumn
Java object.- Returns:
- Map
-
getTvpName
public java.lang.String getTvpName()Returns name of TVP type set bysetTvpName(String)
.- Returns:
- tvpName
-
setTvpName
public void setTvpName(java.lang.String tvpName)Sets the TVP Name.- Parameters:
tvpName
- the name of TVP
-
hashCode
public int hashCode()- Overrides:
hashCode
in classjava.lang.Object
-
equals
public boolean equals(java.lang.Object object)- Overrides:
equals
in classjava.lang.Object
-