java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
org.seasar.doma.DomaException
org.seasar.doma.jdbc.JdbcException
org.seasar.doma.jdbc.NonUniqueResultException
- All Implemented Interfaces:
Serializable
Thrown to indicate that the number of fetched rows is expected less than or equal to 1, but
actually it is greater than or equal to 2.
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final Stringprotected final SqlKindprotected final Stringprotected final StringFields inherited from class org.seasar.doma.DomaException
args, messageResource -
Constructor Summary
ConstructorsConstructorDescriptionNonUniqueResultException(SqlLogType logType, Sql<?> sql) NonUniqueResultException(SqlLogType logType, SqlKind kind, String rawSql, String formattedSql, String sqlFilePath) -
Method Summary
Modifier and TypeMethodDescriptionReturns the formatted SQL string.getKind()Returns the SQL kind.Returns the raw SQL string.Returns the SQL file pathMethods inherited from class org.seasar.doma.jdbc.JdbcException
choiceSqlMethods inherited from class org.seasar.doma.DomaException
getArgs, getMessageResourceMethods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Field Details
-
kind
-
rawSql
-
formattedSql
-
sqlFilePath
-
-
Constructor Details
-
NonUniqueResultException
-
NonUniqueResultException
public NonUniqueResultException(SqlLogType logType, SqlKind kind, String rawSql, String formattedSql, String sqlFilePath)
-
-
Method Details
-
getKind
Returns the SQL kind.- Returns:
- the SQL kind
-
getRawSql
Returns the raw SQL string.- Returns:
- the raw SQL string
-
getFormattedSql
Returns the formatted SQL string.- Returns:
- the formatted SQL string
-
getSqlFilePath
Returns the SQL file path- Returns:
- the SQL file path or
nullif the SQL is auto generated
-