- java.lang.Object
-
- aeonics.template.Relationship
-
- All Implemented Interfaces:
Documented
,Exportable
public class Relationship extends java.lang.Object implements Documented
-
-
Constructor Summary
Constructors Constructor Description Relationship(java.lang.String name)
Create a new relationship
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description <R extends Relationship>
Radd(Parameter parameter)
Adds a parameter linked to this relationshipjava.lang.String
category()
Returns the target entity category to relate to<R extends Relationship>
Rcategory(java.lang.Class<? extends Item<? extends Entity>> value)
Sets the target entity category to relate to<R extends Relationship>
Rcategory(java.lang.String value)
Sets the target entity category to relate tojava.lang.String
description()
Returns the relationship description<R extends Relationship>
Rdescription(java.lang.String value)
Sets the relationship descriptionData
export()
Renders this class instance to a simple data structure for rendering client-side.int
max()
Returns the maximum number of relations.<R extends Relationship>
Rmax(int value)
Sets the maximum number of relations.int
min()
Returns the minimum number of relations<R extends Relationship>
Rmin(int value)
Sets the minimum number of relationsjava.lang.String
name()
Returns the relationship nameboolean
ordered()
Returns whether or not the order of multiple values should be perserved<R extends Relationship>
Rordered(boolean value)
Sets whether or not the order of multiple values should be perservedjava.util.Map<java.lang.String,Parameter>
parameters()
Returns the list of parameters for this relationshipjava.lang.String
summary()
Returns the relationship summary<R extends Relationship>
Rsummary(java.lang.String value)
Sets the relationship summary
-
-
-
Method Detail
-
name
public java.lang.String name()
Returns the relationship name- Specified by:
name
in interfaceDocumented
- Returns:
- the relationship name
-
summary
public java.lang.String summary()
Returns the relationship summary- Specified by:
summary
in interfaceDocumented
- Returns:
- the relationship summary
-
summary
public <R extends Relationship> R summary(java.lang.String value)
Sets the relationship summary- Type Parameters:
R
- the relationship type- Parameters:
value
- the summary- Returns:
- this
-
description
public java.lang.String description()
Returns the relationship description- Specified by:
description
in interfaceDocumented
- Returns:
- the relationship description
-
description
public <R extends Relationship> R description(java.lang.String value)
Sets the relationship description- Type Parameters:
R
- the relationship type- Parameters:
value
- the description- Returns:
- this
-
category
public java.lang.String category()
Returns the target entity category to relate to- Returns:
- the target entity type to relate to
-
category
public <R extends Relationship> R category(java.lang.Class<? extends Item<? extends Entity>> value)
Sets the target entity category to relate to- Type Parameters:
R
- the relationship type- Parameters:
value
- the target entity category to relate to- Returns:
- this
-
category
public <R extends Relationship> R category(java.lang.String value)
Sets the target entity category to relate to- Type Parameters:
R
- the relationship type- Parameters:
value
- the target entity category to relate to- Returns:
- this
-
min
public int min()
Returns the minimum number of relations- Returns:
- the minimum number of relations
-
min
public <R extends Relationship> R min(int value)
Sets the minimum number of relations- Type Parameters:
R
- the relationship type- Parameters:
value
- the minimum number of relations- Returns:
- this
-
max
public int max()
Returns the maximum number of relations. If negative, it means that the maximum is not set.- Returns:
- the maximum number of relations
-
max
public <R extends Relationship> R max(int value)
Sets the maximum number of relations.- Type Parameters:
R
- the relationship type- Parameters:
value
- the maximum number of relations (-1 if undefined)- Returns:
- this
-
ordered
public boolean ordered()
Returns whether or not the order of multiple values should be perserved- Returns:
- whether or not the order of multiple values should be perserved
-
ordered
public <R extends Relationship> R ordered(boolean value)
Sets whether or not the order of multiple values should be perserved- Type Parameters:
R
- the relationship type- Parameters:
value
- whether or not the order of multiple values should be perserved- Returns:
- this
-
parameters
public java.util.Map<java.lang.String,Parameter> parameters()
Returns the list of parameters for this relationship- Returns:
- the list of parameters for this relationship
-
add
public <R extends Relationship> R add(Parameter parameter)
Adds a parameter linked to this relationship- Type Parameters:
R
- the relationship type- Parameters:
parameter
- the parameter definition- Returns:
- this
-
export
public Data export()
Description copied from interface:Exportable
Renders this class instance to a simple data structure for rendering client-side.- Specified by:
export
in interfaceDocumented
- Specified by:
export
in interfaceExportable
- Returns:
- a public data representation of this class instance
-
-