Class StatementConfiguration
java.lang.Object
org.mybatis.dynamic.sql.configuration.StatementConfiguration
This class can be used to change some behaviors of the framework. Every configurable statement
contains a unique instance of this class, so changes here will only impact a single statement.
If you intend to change the behavior for all statements, use the
GlobalConfiguration
.
Initial values for this class in each statement are set from the GlobalConfiguration
.
Configurable behaviors are detailed below:
- nonRenderingWhereClauseAllowed
- If false (default), the framework will throw a
NonRenderingWhereClauseException
if a where clause is specified in the statement, but it fails to render because all optional conditions do not render. For example, if an "in" condition specifies an empty list of values. If no criteria are specified in a where clause, the framework assumes that no where clause was intended and will not throw an exception.
- Since:
- 1.4.1
- Author:
- Jeff Butler
- See Also:
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
setNonRenderingWhereClauseAllowed
(boolean nonRenderingWhereClauseAllowed)
-
Constructor Details
-
StatementConfiguration
public StatementConfiguration()
-
-
Method Details
-
isNonRenderingWhereClauseAllowed
public boolean isNonRenderingWhereClauseAllowed() -
setNonRenderingWhereClauseAllowed
public StatementConfiguration setNonRenderingWhereClauseAllowed(boolean nonRenderingWhereClauseAllowed)
-