Top Description Inners Methods
org.hibernate.event.service.spi

public Interface DuplicationStrategy

Known Direct Implementers
org.hibernate.cfg.beanvalidation.DuplicationStrategyImpl

Defines listener duplication checking strategy, both in terms of when a duplication is detected (see areMatch) as well as how to handle a duplication (see getAction).
Author
Steve Ebersole

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static enum
DuplicationStrategy.Action

The enumerated list of actions available on duplication match

Method Summary

Modifier and TypeMethod and Description
public boolean

Returns:

true if the two instances are considered a duplication; false otherwise
areMatch
(Object
The listener we are currently trying to register
listener
,
Object
An already registered listener
original
)

Are the two listener instances considered a duplication?

public DuplicationStrategy.Action

Returns:

The strategy for handling duplication
getAction
()

How should a duplication be handled?

Method Detail

areMatchback to summary
public boolean areMatch(Object listener, Object original)

Are the two listener instances considered a duplication?

Parameters
listener:Object

The listener we are currently trying to register

original:Object

An already registered listener

Returns:boolean

true if the two instances are considered a duplication; false otherwise

getActionback to summary
public DuplicationStrategy.Action getAction()

How should a duplication be handled?

Returns:DuplicationStrategy.Action

The strategy for handling duplication

org.hibernate.event.service.spi back to summary

public final Enum DuplicationStrategy.Action

extends Enum<DuplicationStrategy.Action>
Class Inheritance

The enumerated list of actions available on duplication match

Field Summary

Modifier and TypeField and Description
public static final DuplicationStrategy.Action
public static final DuplicationStrategy.Action
public static final DuplicationStrategy.Action

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public static DuplicationStrategy.Action
public static DuplicationStrategy.Action[]
Inherited from java.lang.Enum:
clonecompareTodescribeConstableequalsfinalizegetDeclaringClasshashCodenameordinaltoStringvalueOf

Field Detail

ERRORback to summary
public static final DuplicationStrategy.Action ERROR
KEEP_ORIGINALback to summary
public static final DuplicationStrategy.Action KEEP_ORIGINAL
REPLACE_ORIGINALback to summary
public static final DuplicationStrategy.Action REPLACE_ORIGINAL

Constructor Detail

Actionback to summary
private Action()

Method Detail

valueOfback to summary
public static DuplicationStrategy.Action valueOf(String name)
valuesback to summary
public static DuplicationStrategy.Action[] values()