public final class RelationDescriptors extends Object
RelationDescriptor}
Constructor and Description |
---|
RelationDescriptors() |
Modifier and Type | Method and Description |
---|---|
static <S extends Relatable,T extends Relatable> |
canRelate(S source,
RelationDescriptor<S,T> relationDescriptor,
T target)
Deprecated.
since 5.11. Use
ValidatingRelationDescriptor.canRelate(Relatable, Relatable) instead |
static <S extends Relatable,T extends Relatable> |
lookupBuiltinOrCreate(Class<S> sourceClass,
String name,
Class<T> targetClass)
Get one of the built-in RelationDescriptor objects (for example FavouriteRelationDescriptor).
|
public static <S extends Relatable,T extends Relatable> RelationDescriptor<S,T> lookupBuiltinOrCreate(Class<S> sourceClass, String name, Class<T> targetClass)
sourceClass
- The source type of the relationshipname
- The name of the relationship - this may be a built-in name or arbitrary nametargetClass
- The target type of the relationship@Deprecated public static <S extends Relatable,T extends Relatable> ValidationResult canRelate(S source, RelationDescriptor<S,T> relationDescriptor, T target)
ValidatingRelationDescriptor.canRelate(Relatable, Relatable)
insteadValidationResult
, which indicates if two given entities may
for a relation, described by a RelationDescriptor
object.
Validation will fail if the source or target are of the wrong type.source
- entitytarget
- entityCopyright © 2003–2018 Atlassian. All rights reserved.