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