com.atlassian.confluence.labels
Class Labelling

java.lang.Object
  extended by com.atlassian.core.bean.EntityObject
      extended by com.atlassian.confluence.labels.Labelling
All Implemented Interfaces:
Serializable, Cloneable

public class Labelling
extends com.atlassian.core.bean.EntityObject
implements Serializable

An essentially immutable object that represents the link between labels and the content they label.

See Also:
Serialized Form

Constructor Summary
Labelling()
          Available so that newInstance can be used by hibernate to create this object.
Labelling(Label label, ContentEntityObject content, String user)
           
Labelling(Label label, ContentEntityObject content, String user, String spaceKey)
          Deprecated. since 2.10. The Labelling object is only associated with a space through the content. Use Labelling(Label, ContentEntityObject, String) instead.
 
Method Summary
 boolean equals(Object o)
           
 ContentEntityObject getContent()
          Getter for the content entity object associated with this labelling.
 Label getLabel()
           
 String getSpaceKey()
          Deprecated. since 2.10. Use getContent() and check if it is a SpaceContentEntityObject. If it is, cast it and call SpaceContentEntityObject.getSpaceKey() on it
 String getUser()
           
 int hashCode()
           
 void setSpaceKey(String spaceKey)
          Deprecated. since 2.10. The Labelling object is only associated with a space through the content.
 String toString()
           
 
Methods inherited from class com.atlassian.core.bean.EntityObject
clone, getCreationDate, getCurrentDate, getId, getLastModificationDate, setClock, setCreationDate, setId, setLastModificationDate
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Labelling

public Labelling(Label label,
                 ContentEntityObject content,
                 String user)

Labelling

@Deprecated
public Labelling(Label label,
                            ContentEntityObject content,
                            String user,
                            String spaceKey)
Deprecated. since 2.10. The Labelling object is only associated with a space through the content. Use Labelling(Label, ContentEntityObject, String) instead.


Labelling

public Labelling()
Available so that newInstance can be used by hibernate to create this object.

Method Detail

getContent

public ContentEntityObject getContent()
Getter for the content entity object associated with this labelling.

Returns:
content

getLabel

public Label getLabel()

getUser

public String getUser()

getSpaceKey

@Deprecated
public String getSpaceKey()
Deprecated. since 2.10. Use getContent() and check if it is a SpaceContentEntityObject. If it is, cast it and call SpaceContentEntityObject.getSpaceKey() on it


setSpaceKey

public void setSpaceKey(String spaceKey)
Deprecated. since 2.10. The Labelling object is only associated with a space through the content.


equals

public boolean equals(Object o)
Overrides:
equals in class com.atlassian.core.bean.EntityObject

hashCode

public int hashCode()
Overrides:
hashCode in class com.atlassian.core.bean.EntityObject

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2003-2012 Atlassian. All Rights Reserved.