public class RelationUtils extends Object
Constructor and Description |
---|
RelationUtils() |
Modifier and Type | Method and Description |
---|---|
static String |
extractError(ValidationResult validationResult,
String defaultMessage)
Extracts all errors from the
ValidationResult as a single
String . |
static ValidationResult |
validateAgainstApiModel(RelatableEntity source,
RelatableEntity target,
RelationDescriptor relationDescriptor)
Helper method, which can be used to validate relation based on input parameters.
|
public static ValidationResult validateAgainstApiModel(RelatableEntity source, RelatableEntity target, RelationDescriptor relationDescriptor)
RelationDescriptor
is built) into corresponding Hibernate's classes
(which implement RelatableEntity
interface), and perform validation.source
- target
- relationDescriptor
- ValidationResult
public static String extractError(ValidationResult validationResult, String defaultMessage)
ValidationResult
as a single
String
. Is used to form appropriate exception message when validation fails.validationResult
- defaultMessage
- (\n)
Copyright © 2003–2017 Atlassian. All rights reserved.