java.lang.Object
org.seasar.doma.jdbc.criteria.context.Settings
org.seasar.doma.jdbc.criteria.context.InsertSettings
Represents the settings for an INSERT criteria query.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionexclude()Returns the excluded properties.voidexclude(PropertyMetamodel<?>... propertyMetamodels) Sets the excluded properties.intReturns the batch size.booleanReturns whether to exclude null properties or not.booleanReturns whether auto-generated keys are ignored.include()Returns the included properties.voidinclude(PropertyMetamodel<?>... propertyMetamodels) Sets the included properties.voidsetBatchSize(int batchSize) Sets the batch size.voidsetExcludeNull(boolean excludeNull) Sets whether to exclude null properties or not.voidsetIgnoreGeneratedKeys(boolean ignoreGeneratedKeys) If this flag is enabled, performance may be improved.Methods inherited from class org.seasar.doma.jdbc.criteria.context.Settings
getComment, getQueryTimeout, getSqlLogType, setComment, setQueryTimeout, setSqlLogType
-
Constructor Details
-
InsertSettings
public InsertSettings()
-
-
Method Details
-
getBatchSize
public int getBatchSize()Returns the batch size.- Returns:
- the batch size. The default value is 0.
-
setBatchSize
public void setBatchSize(int batchSize) Sets the batch size.If the value is less than 1, it is regarded as 1.
- Parameters:
batchSize- the batch size- See Also:
-
getExcludeNull
public boolean getExcludeNull()Returns whether to exclude null properties or not.- Returns:
- whether to exclude null properties or not. The default value is false.
-
setExcludeNull
public void setExcludeNull(boolean excludeNull) Sets whether to exclude null properties or not.If the value is
true, the null properties are excluded from the SQL INSERT statement.- Parameters:
excludeNull- whether to exclude null properties or not
-
include
Returns the included properties.- Returns:
- the included properties
-
include
Sets the included properties.- Parameters:
propertyMetamodels- the included properties
-
exclude
Returns the excluded properties.- Returns:
- the excluded properties
-
exclude
Sets the excluded properties.- Parameters:
propertyMetamodels- the excluded properties
-
getIgnoreGeneratedKeys
public boolean getIgnoreGeneratedKeys()Returns whether auto-generated keys are ignored.- Returns:
- Whether auto-generated keys are ignored.
-
setIgnoreGeneratedKeys
public void setIgnoreGeneratedKeys(boolean ignoreGeneratedKeys) If this flag is enabled, performance may be improved. However, note that entities won't have auto-generated keys.- Parameters:
ignoreGeneratedKeys- whether auto-generated keys are ignored
-