org.hibernate.exception
Class TemplatedViolatedConstraintNameExtracter
java.lang.Object
org.hibernate.exception.TemplatedViolatedConstraintNameExtracter
- ViolatedConstraintNameExtracter
public abstract class TemplatedViolatedConstraintNameExtracter
extends java.lang.Object
Knows how to extract a violated constraint name from an error message based on the
fact that the constraint name is templated within the message.
protected String | extractUsingTemplate(String templateStart, String templateEnd, String message) - Extracts the constraint name based on a template (i.e., templateStartconstraintNametemplateEnd).
|
extractUsingTemplate
protected String extractUsingTemplate(String templateStart,
String templateEnd,
String message)
Extracts the constraint name based on a template (i.e., templateStartconstraintNametemplateEnd).
templateStart
- The pattern denoting the start of the constraint name within the message.templateEnd
- The pattern denoting the end of the constraint name within the message.message
- The templated error message containing the constraint name.
- The found constraint name, or null.