TemplatedViolatedConstraintNameExtracter (Hibernate JavaDocs)
Date: 2012-04-05

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.hibernate.exception.spi
Class TemplatedViolatedConstraintNameExtracter

    java.lang.Object
      org.hibernate.exception.spi.TemplatedViolatedConstraintNameExtracter

All Implemented Interfaces:
  ViolatedConstraintNameExtracter

    public abstract class TemplatedViolatedConstraintNameExtracter

extends Object
implements 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.

Constructor Summary
`TemplatedViolatedConstraintNameExtracter()`

Method Summary
`protected String` | `extractUsingTemplate(String templateStart, String templateEnd, String message)` Extracts the constraint name based on a template (i.e., templateStartconstraintNametemplateEnd).

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Methods inherited from interface org.hibernate.exception.spi.ViolatedConstraintNameExtracter
`extractConstraintName`

Constructor Detail

### TemplatedViolatedConstraintNameExtracter

    public TemplatedViolatedConstraintNameExtracter()

Method Detail

### extractUsingTemplate

    protected String extractUsingTemplate(String templateStart,
                                          String templateEnd,
                                          String message)

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

  Parameters:
    `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.
  Returns:
    The found constraint name, or null.

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2001-2012 Red Hat, Inc. All Rights Reserved.