public class BaseObject extends BaseCollection<BaseObjectReference> implements ObjectInterface, Serializable, Cloneable
currentReferenceDocumentReferenceResolver, fields, fieldsToRemove, number, relativeEntityReferenceResolverdocumentReference, ownerDocument, referenceCache| Constructor and Description |
|---|
BaseObject() |
| Modifier and Type | Method and Description |
|---|---|
BaseObject |
clone() |
protected BaseObjectReference |
createReference() |
void |
displayEdit(StringBuffer buffer,
String name,
String prefix,
XWikiContext context) |
String |
displayEdit(String name,
String prefix,
XWikiContext context) |
String |
displayEdit(String name,
XWikiContext context) |
void |
displayHidden(StringBuffer buffer,
String name,
String prefix,
XWikiContext context) |
String |
displayHidden(String name,
String prefix,
XWikiContext context) |
String |
displayHidden(String name,
XWikiContext context) |
void |
displayView(StringBuffer buffer,
String name,
String prefix,
XWikiContext context) |
String |
displayView(String name,
String prefix,
XWikiContext context) |
String |
displayView(String name,
XWikiContext context) |
BaseObject |
duplicate()
Similar to
clone() but whereas a clone is an exact copy (with the same GUID), a duplicate keeps the same
data but with a different identity. |
BaseObject |
duplicate(DocumentReference documentReference) |
boolean |
equals(Object obj) |
void |
fromXML(org.dom4j.Element oel) |
List<ObjectDiff> |
getDiff(Object oldEntity,
XWikiContext context) |
String |
getGuid() |
String |
getName()
Deprecated.
since 2.2M2 use
BaseElement.getDocumentReference() |
int |
hashCode() |
protected void |
mergeField(PropertyInterface currentElement,
ElementInterface previousElement,
ElementInterface newElement,
MergeConfiguration configuration,
XWikiContext context,
MergeResult mergeResult) |
Object |
newObjectApi(BaseObject obj,
XWikiContext context) |
void |
set(String fieldname,
Object value,
XWikiContext context) |
void |
setGuid(String guid) |
void |
setName(String name)
Deprecated.
|
void |
setNumber(int number) |
void |
setOwnerDocument(XWikiDocument ownerDocument)
Set the owner document of this base object.
|
void |
setXClassReference(EntityReference xClassReference)
Set the reference to the XClass (used for an XObject).
|
addField, addPropertyForRemoval, apply, get, getClassName, getCurrentReferenceDocumentReferenceResolver, getCustomMappingMap, getDateValue, getDoubleValue, getField, getFieldList, getFieldsToRemove, getFloatValue, getIntValue, getIntValue, getLargeStringValue, getListValue, getLongValue, getNumber, getProperties, getPropertyList, getPropertyNames, getRelativeEntityReferenceResolver, getRelativeXClassReference, getSetValue, getSortedIterator, getStringValue, getXClass, getXClassReference, merge, merge, put, removeField, safeget, safeput, setClassName, setDateValue, setDBStringListValue, setDocumentReference, setDoubleValue, setFields, setFieldsToRemove, setFloatValue, setIntValue, setLargeStringValue, setLongValue, setSetValue, setStringListValue, setStringValue, toXML, toXML, toXMLStringfromXML, getDocumentReference, getId, getLocalEntityReferenceSerializer, getLocalization, getLocalKey, getLocalUidStringEntityReferenceSerializer, getMergeManager, getOwnerDocument, getPrettyName, getReference, getXWikiContext, localizePlain, localizePlainOrKey, setId, setPrettyName, toString, toXMLStringfinalize, getClass, notify, notifyAll, wait, wait, waitget, getXClass, put, safeget, safeput, toXMLapply, getDocumentReference, getReference, merge, setDocumentReference, toString@Deprecated public String getName()
BaseElement.getDocumentReference()Note that this method is used by Hibernate for saving an element.
Note: This method is overridden to add the deprecation warning so that code using it can see it's deprecated.
getName in interface ElementInterfacegetName in class BaseElement<BaseObjectReference>BaseProperty).ElementInterface.getName()@Deprecated public void setName(String name)
BaseCollection.setDocumentReference(org.xwiki.model.reference.DocumentReference)Note that this method is used by Hibernate for loading an element.
Note: BaseElement.setName() does not support setting reference anymore since 2.4M2.
setName in interface ElementInterfacesetName in class BaseElement<BaseObjectReference>ElementInterface.setName(java.lang.String)protected BaseObjectReference createReference()
createReference in class BaseElement<BaseObjectReference>public void setNumber(int number)
setNumber in class BaseCollection<BaseObjectReference>public void setXClassReference(EntityReference xClassReference)
BaseCollectionNote that absolute reference are not supported for xclasses which mean that the wiki part (whatever the wiki is) of the reference will be systematically removed.
setXClassReference in class BaseCollection<BaseObjectReference>xClassReference - the reference to the XClass of this XObject.public void displayHidden(StringBuffer buffer, String name, String prefix, XWikiContext context)
public void displayView(StringBuffer buffer, String name, String prefix, XWikiContext context)
public void displayEdit(StringBuffer buffer, String name, String prefix, XWikiContext context)
public String displayHidden(String name, String prefix, XWikiContext context)
public String displayView(String name, String prefix, XWikiContext context)
public String displayEdit(String name, String prefix, XWikiContext context)
public String displayHidden(String name, XWikiContext context)
public String displayView(String name, XWikiContext context)
public String displayEdit(String name, XWikiContext context)
public BaseObject clone()
clone in class BaseCollection<BaseObjectReference>public BaseObject duplicate()
clone() but whereas a clone is an exact copy (with the same GUID), a duplicate keeps the same
data but with a different identity.public BaseObject duplicate(DocumentReference documentReference)
public boolean equals(Object obj)
equals in class BaseCollection<BaseObjectReference>public int hashCode()
hashCode in class BaseElement<BaseObjectReference>public void fromXML(org.dom4j.Element oel)
throws XWikiException
fromXML in class BaseElement<BaseObjectReference>XWikiExceptionpublic List<ObjectDiff> getDiff(Object oldEntity, XWikiContext context)
getDiff in class BaseCollection<BaseObjectReference>public Object newObjectApi(BaseObject obj, XWikiContext context)
public void set(String fieldname, Object value, XWikiContext context)
public String getGuid()
public void setGuid(String guid)
guid - the unique identifier of the object, if null a new one will be generatedpublic void setOwnerDocument(XWikiDocument ownerDocument)
setOwnerDocument in class BaseCollection<BaseObjectReference>ownerDocument - The owner document.protected void mergeField(PropertyInterface currentElement, ElementInterface previousElement, ElementInterface newElement, MergeConfiguration configuration, XWikiContext context, MergeResult mergeResult)
mergeField in class BaseCollection<BaseObjectReference>Copyright © 2004–2022 XWiki. All rights reserved.