Top Description Constructors Methods
org.hibernate.exception

public abstract Class TemplatedViolatedConstraintNameExtracter

extends Object
implements ViolatedConstraintNameExtracter
Class Inheritance
All Implemented Interfaces
org.hibernate.exception.ViolatedConstraintNameExtracter

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.
Author
Steve Ebersole

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
protected String

Returns:

The found constraint name, or null.
extractUsingTemplate
(String
The pattern denoting the start of the constraint name within the message.
templateStart
,
String
The pattern denoting the end of the constraint name within the message.
templateEnd
,
String
The templated error message containing the constraint name.
message
)

Extracts the constraint name based on a template (i.e., templateStartconstraintNametemplateEnd).

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Constructor Detail

TemplatedViolatedConstraintNameExtracterback to summary
public TemplatedViolatedConstraintNameExtracter()

Method Detail

extractUsingTemplateback to summary
protected String extractUsingTemplate(String templateStart, String templateEnd, String message)

Extracts the constraint name based on a template (i.e., templateStartconstraintNametemplateEnd).

Parameters
templateStart:String

The pattern denoting the start of the constraint name within the message.

templateEnd:String

The pattern denoting the end of the constraint name within the message.

message:String

The templated error message containing the constraint name.

Returns:String

The found constraint name, or null.