org.xwiki.model.reference
Class EntityReference
java.lang.Object
org.xwiki.model.reference.EntityReference
- All Implemented Interfaces:
- Serializable, Cloneable, Comparable<EntityReference>
- Direct Known Subclasses:
- AttachmentReference, ClassPropertyReference, DocumentReference, ObjectPropertyReference, ObjectReference, RegexEntityReference, SpaceReference, WikiReference
public class EntityReference
- extends Object
- implements Serializable, Cloneable, Comparable<EntityReference>
Represents a reference to an Entity (Document, Attachment, Space, Wiki, etc).
- Since:
- 2.2M1
- Version:
- $Id$
- See Also:
- Serialized Form
EntityReference
public EntityReference(String name,
EntityType type)
EntityReference
public EntityReference(String name,
EntityType type,
EntityReference parent)
setName
public void setName(String name)
- Throws:
IllegalArgumentException - if the passed name is null or empty
getName
public String getName()
setParent
public void setParent(EntityReference parent)
getParent
public EntityReference getParent()
setChild
public void setChild(EntityReference child)
getChild
public EntityReference getChild()
setType
public void setType(EntityType type)
- Throws:
IllegalArgumentException - if the passed type is null
getType
public EntityType getType()
getRoot
public EntityReference getRoot()
extractReference
public EntityReference extractReference(EntityType type)
toString
public String toString()
-
- Overrides:
toString in class Object
- See Also:
Object.toString()
equals
public boolean equals(Object obj)
-
- Overrides:
equals in class Object
- See Also:
Object.equals(Object)
hashCode
public int hashCode()
-
- Overrides:
hashCode in class Object
- See Also:
Object.hashCode()
clone
public EntityReference clone()
-
- Overrides:
clone in class Object
- See Also:
Object.clone()
compareTo
public int compareTo(EntityReference reference)
-
- Specified by:
compareTo in interface Comparable<EntityReference>
- See Also:
Comparable.compareTo(Object)
Copyright © 2004-2011 XWiki. All Rights Reserved.