Package org.hibernate.annotations
Enum ResultCheckStyle
- java.lang.Object
-
- java.lang.Enum<ResultCheckStyle>
-
- org.hibernate.annotations.ResultCheckStyle
-
- All Implemented Interfaces:
Serializable
,Comparable<ResultCheckStyle>
@Deprecated(since="6.5") public enum ResultCheckStyle extends Enum<ResultCheckStyle>
Deprecated.Use anExpectation
class instead.Enumerates strategies for checking JDBC return codes for custom SQL DML queries.Return code checking is used to verify that a SQL statement actually had the intended effect, for example, that an
UPDATE
statement actually changed the expected number of rows.
-
-
Enum Constant Summary
Enum Constants Enum Constant Description COUNT
Deprecated.Row count checking.NONE
Deprecated.No return code checking.PARAM
Deprecated.Essentially identical toCOUNT
except that the row count is obtained via an output parameter of astored procedure
.
-
Method Summary
All Methods Static Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static ResultCheckStyle
valueOf(String name)
Deprecated.Returns the enum constant of this type with the specified name.static ResultCheckStyle[]
values()
Deprecated.Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
NONE
public static final ResultCheckStyle NONE
Deprecated.No return code checking. Might mean that no checks are required, or that failure is indicated by aSQLException
being thrown, for example, by astored procedure
which performs explicit checks.- See Also:
Expectation.None
-
COUNT
public static final ResultCheckStyle COUNT
Deprecated.Row count checking. A row count is an integer value returned byPreparedStatement.executeUpdate()
orStatement.executeBatch()
. The row count is checked against an expected value. For example, the expected row count for anINSERT
statement is always 1.- See Also:
Expectation.RowCount
-
PARAM
public static final ResultCheckStyle PARAM
Deprecated.Essentially identical toCOUNT
except that the row count is obtained via an output parameter of astored procedure
.Statement batching is disabled when
PARAM
is selected.- See Also:
Expectation.OutParameter
-
-
Method Detail
-
values
public static ResultCheckStyle[] values()
Deprecated.Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (ResultCheckStyle c : ResultCheckStyle.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static ResultCheckStyle valueOf(String name)
Deprecated.Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is null
-
-