public abstract class RelationEntity<S extends RelatableEntity,T extends RelatableEntity> extends ConfluenceEntityObject implements Serializable
It is very similar to the content properties, but the very important difference is that for given page we're not interested for all relations, but only if it is related with one particular entity (f.e. to show the page we don't need to know all the users who "favourited" this page, we just need to know if the current user did). At the same time we need to fetch all the contentproperties to render the page properly.
So it was decided to create generic relation service to feed and serve "relational" functionality efficiently.
Constructor and Description |
---|
RelationEntity() |
Modifier and Type | Method and Description |
---|---|
long |
getId() |
String |
getRelationName() |
S |
getSourceContent() |
RelatableEntityTypeEnum |
getSourceType() |
T |
getTargetContent() |
RelatableEntityTypeEnum |
getTargetType() |
void |
setId(long id) |
void |
setRelationName(String relationName) |
void |
setSourceContent(S sourceContent) |
void |
setSourceType(RelatableEntityTypeEnum sourceType) |
void |
setTargetContent(T targetContent) |
void |
setTargetType(RelatableEntityTypeEnum targetType) |
getCreator, getCreatorName, getLastModifier, getLastModifierName, getRealClass, isPersistent, setCreator, setCreatorName, setLastModifier, setLastModifierName
public long getId()
getId
in class com.atlassian.core.bean.EntityObject
public void setId(long id)
setId
in class com.atlassian.core.bean.EntityObject
public T getTargetContent()
public void setTargetContent(T targetContent)
public S getSourceContent()
public void setSourceContent(S sourceContent)
public RelatableEntityTypeEnum getTargetType()
public void setTargetType(RelatableEntityTypeEnum targetType)
public RelatableEntityTypeEnum getSourceType()
public void setSourceType(RelatableEntityTypeEnum sourceType)
public String getRelationName()
public void setRelationName(String relationName)
Copyright © 2003–2017 Atlassian. All rights reserved.