Top Description Fields Constructors
jakarta.data.exceptions

public Class NonUniqueResultException

extends DataException
Class Inheritance

This exception is raised when execution of a repository method with a singular return type finds multiple results. This error may be circumvented using the findFirst... method name pattern or by supplying Limit.of(1) as a parameter to explicitly request only the first result.

Field Summary

Modifier and TypeField and Description
private static final long

Constructor Summary

AccessConstructor and Description
public
NonUniqueResultException(String
the detail message.
message
)

Constructs a new NonUniqueResultException exception with the specified detail message.

public
NonUniqueResultException(String
the detail message.
message
,
Throwable
another exception or error that caused this exception. Null indicates that no other cause is specified.
cause
)

Constructs a new NonUniqueResultException exception with the specified detail message.

public
NonUniqueResultException(Throwable
the cause.
cause
)

Constructs a new NonUniqueResultException exception with the specified cause.

Field Detail

serialVersionUIDback to summary
private static final long serialVersionUID

Hides jakarta.data.exceptions.DataException.serialVersionUID.

Constructor Detail

NonUniqueResultExceptionback to summary
public NonUniqueResultException(String message)

Constructs a new NonUniqueResultException exception with the specified detail message.

Parameters
message:String

the detail message.

NonUniqueResultExceptionback to summary
public NonUniqueResultException(String message, Throwable cause)

Constructs a new NonUniqueResultException exception with the specified detail message.

Parameters
message:String

the detail message.

cause:Throwable

another exception or error that caused this exception. Null indicates that no other cause is specified.

NonUniqueResultExceptionback to summary
public NonUniqueResultException(Throwable cause)

Constructs a new NonUniqueResultException exception with the specified cause.

Parameters
cause:Throwable

the cause.