public class SQLServerBulkCopyOptions extends Object
| Constructor and Description |
|---|
SQLServerBulkCopyOptions()
Initializes an instance of the SQLServerBulkCopySettings class using defaults for all of the settings.
|
| Modifier and Type | Method and Description |
|---|---|
int |
getBatchSize()
Gets the number of rows in each batch.
|
int |
getBulkCopyTimeout()
Gets the number of seconds for the operation to complete before it times out.
|
boolean |
isAllowEncryptedValueModifications() |
boolean |
isCheckConstraints()
Indicates whether constraints are to be checked while data is being inserted or not.
|
boolean |
isFireTriggers()
Indicates if the server should fire insert triggers for rows being inserted into the database.
|
boolean |
isKeepIdentity()
Indicates whether or not to preserve any source identity values.
|
boolean |
isKeepNulls()
Indicates whether to preserve null values in the destination table regardless of the settings for default values,
or if they should be replaced by default values (where applicable).
|
boolean |
isTableLock()
Indicates whether SQLServerBulkCopy should obtain a bulk update lock for the duration of the bulk copy operation.
|
boolean |
isUseInternalTransaction()
Indicates whether each batch of the bulk-copy operation will occur within a transaction or not.
|
void |
setAllowEncryptedValueModifications(boolean allowEncryptedValueModifications) |
void |
setBatchSize(int batchSize)
Sets the number of rows in each batch.
|
void |
setBulkCopyTimeout(int timeout)
Sets the number of seconds for the operation to complete before it times out.
|
void |
setCheckConstraints(boolean checkConstraints)
Sets whether constraints are to be checked while data is being inserted or not.
|
void |
setFireTriggers(boolean fireTriggers)
Sets whether the server should be set to fire insert triggers for rows being inserted into the database.
|
void |
setKeepIdentity(boolean keepIdentity)
Sets whether or not to preserve any source identity values.
|
void |
setKeepNulls(boolean keepNulls)
Sets whether to preserve null values in the destination table regardless of the settings for default values,
or if they should be replaced by default values (where applicable).
|
void |
setTableLock(boolean tableLock)
Sets whether SQLServerBulkCopy should obtain a bulk update lock for the duration of the bulk copy operation.
|
void |
setUseInternalTransaction(boolean useInternalTransaction)
Sets whether each batch of the bulk-copy operation will occur within a transaction or not.
|
public SQLServerBulkCopyOptions()
public int getBatchSize()
public void setBatchSize(int batchSize)
throws SQLServerException
batchSize - Number of rows in each batch.SQLServerException - If the batchSize being set is invalid.public int getBulkCopyTimeout()
public void setBulkCopyTimeout(int timeout)
throws SQLServerException
timeout - Number of seconds before operation times out.SQLServerException - If the batchSize being set is invalid.public boolean isKeepIdentity()
public void setKeepIdentity(boolean keepIdentity)
keepIdentity - True if source identity values are to be preserved; false if they are to be assigned by the destinationpublic boolean isKeepNulls()
public void setKeepNulls(boolean keepNulls)
keepNulls - True if null values should be preserved; false if null values should be replaced by default values where applicable.public boolean isTableLock()
public void setTableLock(boolean tableLock)
tableLock - True to obtain row locks; false otherwise.public boolean isUseInternalTransaction()
public void setUseInternalTransaction(boolean useInternalTransaction)
useInternalTransaction - True if the batch will occur within a transaction; false otherwise.public boolean isCheckConstraints()
public void setCheckConstraints(boolean checkConstraints)
checkConstraints - True if constraints are to be checked; false otherwise.public boolean isFireTriggers()
public void setFireTriggers(boolean fireTriggers)
fireTriggers - True triggers are to be enabled; false otherwise.public boolean isAllowEncryptedValueModifications()
public void setAllowEncryptedValueModifications(boolean allowEncryptedValueModifications)
Copyright © 2016. All rights reserved.