public interface ConstraintResolver<T extends com.liferay.portal.kernel.model.change.tracking.CTModel<T>>
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getConflictDescriptionKey()
Returns the language key that describes the conflict.
|
java.lang.Class<T> |
getModelClass()
Returns the model class for this constraint resolver.
|
java.lang.String |
getResolutionDescriptionKey()
Returns the language key for steps taken (or steps needed) to resolve the
unique constraint conflict.
|
java.util.ResourceBundle |
getResourceBundle(java.util.Locale locale)
Returns the resource bundle to use for the conflict description and
resolution description keys.
|
java.lang.String[] |
getUniqueIndexColumnNames()
Returns an array of column names for the unique index, excluding the
ctCollectionId column. |
void |
resolveConflict(ConstraintResolverContext<T> constraintResolverContext)
Called when publishing would cause a constraint violation with both rows
involved accessible from the context.
|
java.lang.String getConflictDescriptionKey()
java.lang.Class<T> getModelClass()
java.lang.String getResolutionDescriptionKey()
java.util.ResourceBundle getResourceBundle(java.util.Locale locale)
locale
- the locale for the resource bundlegetConflictDescriptionKey()
,
getResolutionDescriptionKey()
java.lang.String[] getUniqueIndexColumnNames()
ctCollectionId
column.CTPersistence.getUniqueIndexColumnNames(
)
void resolveConflict(ConstraintResolverContext<T> constraintResolverContext) throws com.liferay.portal.kernel.exception.PortalException
constraintResolverContext
- the context used in automatically
resolving constraint conflicts between the source and target
modelscom.liferay.portal.kernel.exception.PortalException