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_ESCAPE
cachedCustomDisplayer
currentReferenceDocumentReferenceResolver, fields, fieldsToRemove, number, relativeEntityReferenceResolver
documentReference, ownerDocument, referenceCache
Constructor and Description |
---|
DBListClass() |
DBListClass(PropertyMetaClass wclass) |
DBListClass(String name,
String prettyname,
PropertyMetaClass wclass) |
displayHidden, displayRadioEdit, displaySelectEdit, fromList, fromList, fromString, fromStringArray, getDefaultValue, getDisplayType, getDisplayValue, getDisplayValue, getElementValue, getFirstSeparator, getFreeText, getListFromString, 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, toList
clone, 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, validateProperty
addField, 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, toXMLString
fromXML, getDocumentReference, getLocalEntityReferenceSerializer, getLocalization, getLocalKey, getLocalUidStringEntityReferenceSerializer, getMergeManager, getOwnerDocument, getReference, getXWikiContext, hashCode, localizePlain, localizePlainOrKey, toString, toXMLString
finalize, getClass, notify, notifyAll, wait, wait, wait
displayView
get, put, safeget, safeput
apply, getDocumentReference, getReference, merge, setDocumentReference, toString
protected 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 PropertyClassInterface
flushCache
in class PropertyClass
public String getValue(String val, String sql, XWikiContext context)
public void displayEdit(StringBuffer buffer, String name, String prefix, BaseCollection object, XWikiContext context)
displayEdit
in interface PropertyClassInterface
displayEdit
in class ListClass
public void displayView(StringBuffer buffer, String name, String prefix, BaseCollection object, XWikiContext context)
displayView
in interface PropertyClassInterface
displayView
in class ListClass
Copyright © 2004–2022 XWiki. All rights reserved.