public class DBListClass extends ListClass
ListClass.MapComparator| Modifier and Type | Field and Description |
|---|---|
protected static String |
DEFAULT_QUERY |
DEFAULT_SEPARATOR, DISPLAYTYPE_CHECKBOX, DISPLAYTYPE_INPUT, DISPLAYTYPE_RADIO, DISPLAYTYPE_SELECT, FREE_TEXT_ALLOWED, FREE_TEXT_DISCOURAGED, FREE_TEXT_FORBIDDEN, SEPARATOR_ESCAPEcachedCustomDisplayercurrentReferenceDocumentReferenceResolver, fields, fieldsToRemove, number, relativeEntityReferenceResolverdocumentReference, ownerDocument, referenceCache| Constructor and Description |
|---|
DBListClass() |
DBListClass(PropertyMetaClass wclass) |
DBListClass(String name,
String prettyname,
PropertyMetaClass wclass) |
displayHidden, displayRadioEdit, displaySelectEdit, fromList, fromString, fromStringArray, getDefaultValue, getDisplayType, getDisplayValue, getDisplayValue, getElementValue, getFreeText, getListFromString, getListFromString, getMapFromString, getSeparator, getSeparators, getSize, getSort, getStringFromList, getStringFromList, isCache, isLargeStorage, isMultiSelect, isPicker, isRelationalStorage, mergeNotOrderedListProperty, mergeProperty, newProperty, newPropertyfromXML, setCache, setDefaultValue, setDisplayType, setFreeText, setLargeStorage, setMultiSelect, setPicker, setRelationalStorage, setSeparator, setSeparators, setSize, setSort, toFormString, toListclone, compareTo, createReference, displayCustom, displayEdit, displayEdit, displayHidden, displayHidden, displayView, displayView, fromValue, fromXML, getCachedDefaultCustomDisplayer, getClassName, getClassType, getCustomDisplay, getDefaultCustomDisplayer, getFieldFullName, getFullQueryPropertyName, getHint, getId, getName, getNumber, getObject, getPrettyName, getPrettyName, getTooltip, getTooltip, getTranslatedPrettyName, getValidationMessage, getValidationRegExp, getXClass, getxWikiClass, initLazyCollections, isCustomDisplayed, isDisabled, isUnmodifiable, isValidColumnTypes, renderContentInContext, renderContentInContext, setClassType, setCustomDisplay, setDisabled, setHint, setId, setName, setNumber, setObject, setPrettyName, setTooltip, setUnmodifiable, setValidationMessage, setValidationRegExp, setxWikiClass, toFormString, toString, toXML, toXML, validatePropertyaddField, addPropertyForRemoval, apply, equals, get, getCurrentReferenceDocumentReferenceResolver, getCustomMappingMap, getDateValue, getDiff, getDoubleValue, getField, getFieldList, getFieldsToRemove, getFloatValue, getIntValue, getIntValue, getLargeStringValue, getListValue, getLongValue, getProperties, getPropertyList, getPropertyNames, getRelativeEntityReferenceResolver, getRelativeXClassReference, getSetValue, getSortedIterator, getStringValue, getXClassReference, merge, merge, mergeField, put, removeField, safeget, safeput, setClassName, setDateValue, setDBStringListValue, setDocumentReference, setDoubleValue, setFields, setFieldsToRemove, setFloatValue, setIntValue, setLargeStringValue, setLongValue, setOwnerDocument, setSetValue, setStringListValue, setStringValue, setXClassReference, toXMLStringfromXML, getDocumentReference, getLocalEntityReferenceSerializer, getLocalization, getLocalKey, getLocalUidStringEntityReferenceSerializer, getMergeManager, getOwnerDocument, getReference, getXWikiContext, hashCode, localizePlain, localizePlainOrKey, toString, toXMLStringfinalize, getClass, notify, notifyAll, wait, wait, waitget, put, safeget, safeputapply, getDocumentReference, getReference, merge, setDocumentReference, toStringprotected static final String DEFAULT_QUERY
public DBListClass(String name, String prettyname, PropertyMetaClass wclass)
public DBListClass(PropertyMetaClass wclass)
public DBListClass()
public List<ListItem> getDBList(XWikiContext context)
public List<String> getList(XWikiContext context)
public Map<String,ListItem> getMap(XWikiContext context)
@Deprecated public String getQuery(XWikiContext context)
QueryBuilder<DBListClass> component insteadComputes the query corresponding to the current XProperty. The query is either manually specified by the XClass creator in the sql field, or, if the query field is blank, constructed using the classname, idField and valueField properties. The query is constructed according to the following rules:
If there are two columns selected, use the first one as the stored value and the second one as the displayed value.
context - The current context.public String getSql()
public void setSql(String sql)
public String getClassname()
public void setClassname(String classname)
public String getIdField()
public void setIdField(String idField)
public String getValueField()
public void setValueField(String valueField)
public List<ListItem> getCachedDBList(XWikiContext context)
public void setCachedDBList(List<ListItem> cachedDBList, XWikiContext context)
public void flushCache()
flushCache in interface PropertyClassInterfaceflushCache in class PropertyClasspublic String getValue(String val, String sql, XWikiContext context)
public void displayEdit(StringBuffer buffer, String name, String prefix, BaseCollection object, XWikiContext context)
displayEdit in interface PropertyClassInterfacedisplayEdit in class ListClasspublic void displayView(StringBuffer buffer, String name, String prefix, BaseCollection object, XWikiContext context)
displayView in interface PropertyClassInterfacedisplayView in class ListClassCopyright © 2004–2021 XWiki. All rights reserved.