Package guru.mikelue.jdut.vendor.mssql
Class IdentityInsertOperator
- java.lang.Object
-
- guru.mikelue.jdut.vendor.mssql.IdentityInsertOperator
-
- All Implemented Interfaces:
DataRowOperator
public class IdentityInsertOperator extends Object implements DataRowOperator
Used to surroundingDataRowOperator
for supporting insertion of identity for table.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface guru.mikelue.jdut.operation.DataRowOperator
DataRowOperator.SurroundOperator
-
-
Constructor Summary
Constructors Constructor Description IdentityInsertOperator(DataRowOperator newOperator)
As function interface ofDataRowOperator.SurroundOperator
.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static boolean
hasIdentityColumn(DataRow dataRow)
Checks whether or not a data row has identity data.static boolean
identityChecked(DataRow dataRow)
Checks whether or not the table of data row has enabled identity.
If it is unknown, this method gives true value.DataRow
operate(Connection connection, DataRow dataRow)
OperatesDataRow
byConnection
.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface guru.mikelue.jdut.operation.DataRowOperator
surroundedBy, toDataGrainOperator, toDataRowsOperator
-
-
-
-
Constructor Detail
-
IdentityInsertOperator
public IdentityInsertOperator(DataRowOperator newOperator)
As function interface ofDataRowOperator.SurroundOperator
.- Parameters:
newOperator
- The operator to be surrounded- See Also:
DataRowOperator
-
-
Method Detail
-
hasIdentityColumn
public static boolean hasIdentityColumn(DataRow dataRow)
Checks whether or not a data row has identity data.- Parameters:
dataRow
- The data row to be checked- Returns:
- true if it does
-
identityChecked
public static boolean identityChecked(DataRow dataRow)
Checks whether or not the table of data row has enabled identity.
If it is unknown, this method gives true value.- Parameters:
dataRow
- The data row to be checked- Returns:
- true if it does
-
operate
public DataRow operate(Connection connection, DataRow dataRow) throws SQLException
OperatesDataRow
byConnection
.- Specified by:
operate
in interfaceDataRowOperator
- Parameters:
connection
- The connection of databasedataRow
- The data grain to be operated- Returns:
- The processed data row
- Throws:
SQLException
- The SQL exception defined by JDBC
-
-