public interface CustomFieldValueHandler
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
ATTR_FIELD
Script attribute: the custom field being validated
|
static java.lang.String |
ATTR_OBJECT
Script attribute: the object being validated
|
static java.lang.String |
ATTR_VALUE
Script attribute: the current value being validated
|
static java.util.List<Property<?,?>> |
SEARCH_PROPERTIES
The possible properties that hold actual values on
CustomFieldValueForSearchDTO |
static java.util.List<Property<?,?>> |
VALUE_PROPERTIES
The possible properties that hold actual values on
CustomFieldValueDTO |
| Modifier and Type | Method and Description |
|---|---|
<CF extends CustomField<CF,C,PV>,C extends CustomFieldPossibleValueCategory<CF,C,PV>,PV extends CustomFieldPossibleValue<CF,C,PV>,V extends CustomFieldValue<CF,C,PV,O>,O extends SimpleEntity & EntityWithCustomValues<CF,C,PV,V>> |
addDefaultValues(O entity,
java.util.Collection<CF> fields,
java.util.Collection<V> customValues)
Adds a custom field value setting its default if it is not present in the given collection according to the
fields
list.
|
void |
addLengthValidation(org.cyclos.impl.utils.validation.Property property,
IntegerRange length)
Adds a length range validation on the given
Property for the given IntegerRange. |
void |
addPatternValidation(org.cyclos.impl.utils.validation.Property property,
java.lang.String pattern)
Adds an input with pattern validation on the given
Property for the given pattern. |
void |
addSearchTitleParameters(org.cyclos.impl.utils.reports.ReportParameters reportParameters,
java.lang.Class<? extends CustomField<?,?,?>> customFieldType,
java.util.Collection<? extends BaseValueForSearchDTO> fieldValues)
Adds as report title parameters all custom field values for search in the given collection
|
void |
addTitleParameters(org.cyclos.impl.utils.reports.ReportParameters reportParameters,
java.lang.Class<? extends CustomField<?,?,?>> customFieldType,
java.util.Collection<? extends CustomFieldValueDTO> fieldValues)
Adds as report title parameters all custom field values in the given collection
|
void |
addValueValidation(org.cyclos.impl.utils.validation.Validator validator,
CustomField<?,?,?> field,
com.querydsl.core.types.dsl.EntityPathBase<? extends CustomFieldValue<?,?,?,?>> fv,
java.util.Map<java.lang.String,?> dynamicValueBindings)
Adds a validation on the given
Validator for the given CustomField |
void |
addValueValidation(org.cyclos.impl.utils.validation.Validator validator,
CustomField<?,?,?> field,
com.querydsl.core.types.dsl.EntityPathBase<? extends CustomFieldValue<?,?,?,?>> fv,
java.util.Map<java.lang.String,?> dynamicValueBindings,
java.lang.String valuesProperty)
Adds a validation on the given
Validator for the given CustomField, using a custom values
collection |
void |
addWordSizeValidation(org.cyclos.impl.utils.validation.Property property,
CustomField<?,?,?> field)
Adds a word size validation on the given
Property. |
<CF extends CustomField<CF,C,PV>,C extends CustomFieldPossibleValueCategory<CF,C,PV>,PV extends CustomFieldPossibleValue<CF,C,PV>,V extends CustomFieldValue<CF,C,PV,O>,O extends SimpleEntity & EntityWithCustomValues<CF,C,PV,V>> |
buildFieldValue(CF field,
java.lang.Class<V> valueType,
org.cyclos.entities.system.QCustomFieldValue fv,
com.querydsl.core.Tuple tuple)
Builds a field value from a projected custom field.
|
<CF extends CustomField<CF,C,PV>,C extends CustomFieldPossibleValueCategory<CF,C,PV>,PV extends CustomFieldPossibleValue<CF,C,PV>,V extends CustomFieldValue<CF,C,PV,E>,E extends SimpleEntity & EntityWithCustomValues<CF,C,PV,V>> |
cloneCustomValuesData(E owner,
java.util.Collection<V> values)
Clones a collection of
CustomFieldValue managing the special cases: CustomFieldType.FILE and
CustomFieldType.IMAGE, i.e cloning the associated CustomFieldValueFile and
CustomFieldValueImage entities too. |
<CF extends CustomField<CF,C,PV>,C extends CustomFieldPossibleValueCategory<CF,C,PV>,PV extends CustomFieldPossibleValue<CF,C,PV>,V extends CustomFieldValue<CF,C,PV,E>,E extends SimpleEntity & EntityWithCustomValues<CF,C,PV,V>> |
cloneCustomValuesData(ModelWithCustomValues<CustomFieldValueDTO> model,
java.util.Collection<V> values)
Converts a collection of
CustomFieldValue to a collection if CustomFieldValueDTOs and set it in
the given model container but cloning the related custom field value's data. |
void |
fillValuesFromScript(java.lang.Class<? extends CustomField<?,?,?>> fieldType,
LoadValuesScriptFunction function,
java.util.Map<java.lang.String,?> variables,
java.util.Collection<? extends CustomFieldDetailedVO> vos)
Fills in the given
CustomFieldDetailedVOs using values generated from script. |
java.lang.String |
format(FormatterImpl formatter,
CustomField<?,?,?> field,
java.lang.Object value)
Formats the given value according to the custom field definitions, returning an empty string for null value
|
CustomField<?,?,?> |
getCustomField(CustomFieldVO vo)
Converts the given
CustomFieldVO to the corresponding CustomField
The CustomFieldVO parameter must have set the corresponding field's nature. |
static java.lang.Class<? extends CustomField<?,?,?>> |
getCustomFieldClass(CustomFieldNature nature)
Returns the
CustomField'class for the given nature. |
java.lang.Object |
getDefaultValue(CustomField<?,?,?> field)
Returns the actual default value for this field.
|
java.util.Set<com.querydsl.core.types.Path<?>> |
getProjectionPaths(CustomField<?,?,?> field,
org.cyclos.entities.system.QCustomFieldValue fv)
Returns the paths that should be projected for the given custom field
|
java.lang.Object |
getValue(CustomField<?,?,?> field,
java.lang.Object value,
boolean sanitize)
Calls
getValue(CustomField, Object, boolean, FormatterImpl) with no formatter, meaning dates / numbers
as string will use the standard format, not a user-defined format |
java.lang.Object |
getValue(CustomField<?,?,?> field,
java.lang.Object value,
boolean sanitize,
FormatterImpl formatter)
Returns the value (as entities when possible) for the given custom field value.
|
java.lang.Object |
getValueForSearch(CustomField<?,?,?> field,
java.lang.Object value,
boolean nativeValue)
Returns the value used to filter when the given custom field is used as a search filter.
|
java.lang.Class<?> |
getValueType(CustomField<?,?,?> field)
Returns the type of actual values this field has, according to the field type:
CustomFieldType.STRING,
CustomFieldType.TEXT,
CustomFieldType.RICH_TEXT or
CustomFieldType.URL: String;
CustomFieldType.BOOLEAN: Boolean;
CustomFieldType.INTEGER: Integer;
CustomFieldType.DECIMAL: BigDecimal;
CustomFieldType.DATE: Date;
CustomFieldType.SINGLE_SELECTION: the proper subclass of CustomFieldPossibleValue;
CustomFieldType.MULTI_SELECTION: Set of the proper subclass of
CustomFieldPossibleValue;;
CustomFieldType.DYNAMIC_SELECTION: DynamicFieldValueVO;
CustomFieldType.FILE: RawFile;
CustomFieldType.IMAGE: Image;
CustomFieldType.LINKED_ENTITY: Depends on the linked entity type:
LinkedEntityType.USER: User;
LinkedEntityType.RECORD: Record;
LinkedEntityType.ADVERTISEMENT: BasicAd;
LinkedEntityType.TRANSACTION: Transaction;
LinkedEntityType.TRANSFER: Transfer;
|
void |
processAfterSave(EntityWithCustomValues<?,?,?,?> entity)
Process actions over custom fields that require the entity to be saved first.
|
com.querydsl.core.types.Predicate |
queryFilter(com.querydsl.core.types.EntityPath<? extends CustomFieldValue<?,?,?,?>> valuePath,
CustomField<?,?,?> customField,
CustomFieldValueForSearchDTO valueForSearch)
Returns a predicate which represents the condition for the given custom field and value path for the given custom
field search value, or null
if no query criteria specified
|
void |
remove(CustomFieldValue<?,?,?,?> fieldValue)
Removes the given field value, properly removing any stored files for binary fields
|
void |
removeAll(boolean binaryOnly,
EntityWithCustomValues<?,?,?,?> owner)
Removes either all custom fields of the given owner (if the flag is false) or only the binaries,
taking care to properly remove any stored files for binary fields
|
java.util.List<CustomFieldValueDTO> |
resolveValues(java.lang.Class<? extends CustomField<?,?,?>> customFieldType,
java.util.Collection<CustomFieldValueDTO> valueDTOs)
Makes sure all values set in the given DTOs collection are correctly filled-in, so it can be sent back to clients
with complete data.
|
void |
setCustomValues(BasicUser user,
java.util.Collection<UserCustomField> enabledFields,
java.util.Collection<UserCustomField> editable,
java.util.Collection<UserCustomField> managePrivacy,
java.util.Collection<UserCustomFieldValueDTO> fieldValueDTOs)
Saves the custom values from DTOs to the given user
|
<CF extends CustomField<CF,C,PV>,C extends CustomFieldPossibleValueCategory<CF,C,PV>,PV extends CustomFieldPossibleValue<CF,C,PV>,V extends CustomFieldValue<CF,C,PV,E>,E extends SimpleEntity & EntityWithCustomValues<CF,C,PV,V>> |
setCustomValues(E entity,
java.util.Collection<CF> enabledFields,
java.util.Collection<CF> editable,
java.util.Collection<CustomFieldValueDTO> fieldValueDTOs)
Saves the custom values from DTOs to the given entity
|
void |
setDefaultValue(CustomFieldDetailedVO vo,
java.lang.Object defaultValue)
Sets the default field value to the given value
|
<CF extends CustomField<CF,C,PV>,C extends CustomFieldPossibleValueCategory<CF,C,PV>,PV extends CustomFieldPossibleValue<CF,C,PV>,V extends CustomFieldValue<CF,C,PV,O>,O extends SimpleEntity & EntityWithCustomValues<CF,C,PV,V>> |
setDefaultValues(O entity,
java.util.Collection<CF> fields)
Adds a custom field value setting its default if it is not present in the given entity according to the fields
list.
|
void |
setModelValue(CustomField<?,?,?> customField,
java.lang.Object value,
ICustomFieldValue<?,?> fieldValue)
Sets the given value on the given
ICustomFieldValue, according to the correct type, converting the value
to the model-specific type. |
void |
sortAndRemoveMissing(java.util.List<? extends CustomFieldValueDTO> customValues,
java.util.List<? extends IEntity> allowedFields)
Sorts the given list of
CustomFieldValueDTO and remove a value if it's for a field not present in the
given list of allowed fields (i.e. the catalog). |
void |
sortAndRemoveMissingFromVO(java.util.List<? extends CustomFieldValueVO> customValues,
java.util.List<? extends IEntity> allowedFields)
Same as
sortAndRemoveMissing(List, List) but for a list of VOs |
java.util.List<? extends CustomFieldPossibleValue<?,?,?>> |
toCustomFieldPossibleValues(CustomField<?,?,?> customField,
java.util.Collection<?> values)
Converts each of the given input value to a custom field possible value of the given field
|
java.util.List<SimpleEntity> |
toLinkedEntityValues(CustomField<?,?,?> customField,
java.util.Collection<?> values)
Convert each of the given input value to a linked entity suited for the given custom field
|
java.util.Map<java.lang.String,java.lang.Object> |
toMap(java.lang.Class<? extends CustomField<?,?,?>> customFieldType,
java.util.Collection<? extends ICustomFieldValue<?,?>> customValues,
boolean sanitize)
Returns a Map, keyed by the custom field internal names, whose values are "server side" (example,
Date,
not DateTime, CustomFieldPossibleValue, not CustomFieldPossibleValueVO, etc) |
java.lang.String |
toReference(CustomField<?,?,?> field,
java.lang.Object value)
Converts the given field value to a valid reference value
|
static final java.lang.String ATTR_OBJECT
static final java.lang.String ATTR_FIELD
static final java.lang.String ATTR_VALUE
static final java.util.List<Property<?,?>> VALUE_PROPERTIES
CustomFieldValueDTOstatic final java.util.List<Property<?,?>> SEARCH_PROPERTIES
CustomFieldValueForSearchDTOstatic java.lang.Class<? extends CustomField<?,?,?>> getCustomFieldClass(CustomFieldNature nature)
CustomField'class for the given nature.java.lang.IllegalArgumentException - for unknown natures<CF extends CustomField<CF,C,PV>,C extends CustomFieldPossibleValueCategory<CF,C,PV>,PV extends CustomFieldPossibleValue<CF,C,PV>,V extends CustomFieldValue<CF,C,PV,O>,O extends SimpleEntity & EntityWithCustomValues<CF,C,PV,V>> void addDefaultValues(O entity, java.util.Collection<CF> fields, java.util.Collection<V> customValues)
void addLengthValidation(org.cyclos.impl.utils.validation.Property property,
IntegerRange length)
Property for the given IntegerRange.
If the length parameter is null then it returns without changes.void addPatternValidation(org.cyclos.impl.utils.validation.Property property,
java.lang.String pattern)
Property for the given pattern.
If the pattern parameter is empty (or null) then it returns without changes.void addSearchTitleParameters(org.cyclos.impl.utils.reports.ReportParameters reportParameters,
java.lang.Class<? extends CustomField<?,?,?>> customFieldType,
java.util.Collection<? extends BaseValueForSearchDTO> fieldValues)
void addTitleParameters(org.cyclos.impl.utils.reports.ReportParameters reportParameters,
java.lang.Class<? extends CustomField<?,?,?>> customFieldType,
java.util.Collection<? extends CustomFieldValueDTO> fieldValues)
void addValueValidation(org.cyclos.impl.utils.validation.Validator validator,
CustomField<?,?,?> field,
com.querydsl.core.types.dsl.EntityPathBase<? extends CustomFieldValue<?,?,?,?>> fv,
java.util.Map<java.lang.String,?> dynamicValueBindings)
Validator for the given CustomFieldvoid addValueValidation(org.cyclos.impl.utils.validation.Validator validator,
CustomField<?,?,?> field,
com.querydsl.core.types.dsl.EntityPathBase<? extends CustomFieldValue<?,?,?,?>> fv,
java.util.Map<java.lang.String,?> dynamicValueBindings,
java.lang.String valuesProperty)
Validator for the given CustomField, using a custom values
collectionvoid addWordSizeValidation(org.cyclos.impl.utils.validation.Property property,
CustomField<?,?,?> field)
Property.<CF extends CustomField<CF,C,PV>,C extends CustomFieldPossibleValueCategory<CF,C,PV>,PV extends CustomFieldPossibleValue<CF,C,PV>,V extends CustomFieldValue<CF,C,PV,O>,O extends SimpleEntity & EntityWithCustomValues<CF,C,PV,V>> V buildFieldValue(CF field, java.lang.Class<V> valueType, org.cyclos.entities.system.QCustomFieldValue fv, com.querydsl.core.Tuple tuple)
<CF extends CustomField<CF,C,PV>,C extends CustomFieldPossibleValueCategory<CF,C,PV>,PV extends CustomFieldPossibleValue<CF,C,PV>,V extends CustomFieldValue<CF,C,PV,E>,E extends SimpleEntity & EntityWithCustomValues<CF,C,PV,V>> java.util.List<V> cloneCustomValuesData(E owner, java.util.Collection<V> values)
CustomFieldValue managing the special cases: CustomFieldType.FILE and
CustomFieldType.IMAGE, i.e cloning the associated CustomFieldValueFile and
CustomFieldValueImage entities too.cloneCustomValuesData(ModelWithCustomValues, Collection) but for
entities.TransactionLevel.READ_WRITE transaction.<CF extends CustomField<CF,C,PV>,C extends CustomFieldPossibleValueCategory<CF,C,PV>,PV extends CustomFieldPossibleValue<CF,C,PV>,V extends CustomFieldValue<CF,C,PV,E>,E extends SimpleEntity & EntityWithCustomValues<CF,C,PV,V>> void cloneCustomValuesData(ModelWithCustomValues<CustomFieldValueDTO> model, java.util.Collection<V> values)
CustomFieldValue to a collection if CustomFieldValueDTOs and set it in
the given model container but cloning the related custom field value's data. More
specifically it clones the CustomFieldValueFile and CustomFieldValueImage, if any, for the
corresponding custom field of type CustomFieldType.FILE or CustomFieldType.IMAGE.TransactionLevel.READ_WRITE transaction.void fillValuesFromScript(java.lang.Class<? extends CustomField<?,?,?>> fieldType, LoadValuesScriptFunction function, java.util.Map<java.lang.String,?> variables, java.util.Collection<? extends CustomFieldDetailedVO> vos)
CustomFieldDetailedVOs using values generated from script.
For supported custom field types, call the script of type ScriptType.LOAD_CUSTOM_FIELD_VALUES.
For other custom field types, do nothing.fieldType - The actual custom field class, required to load the proper entitiesfunction - The function to call. May be called in the context of an entity or a searchvos - The list of CustomFieldDetailedVO which will be processedvariables - Variables to be bound to the script contextjava.lang.String format(FormatterImpl formatter, CustomField<?,?,?> field, java.lang.Object value)
CustomField<?,?,?> getCustomField(CustomFieldVO vo)
CustomFieldVO to the corresponding CustomField
The CustomFieldVO parameter must have set the corresponding field's nature.java.lang.Object getDefaultValue(CustomField<?,?,?> field)
getValueType(CustomField).java.util.Set<com.querydsl.core.types.Path<?>> getProjectionPaths(CustomField<?,?,?> field, org.cyclos.entities.system.QCustomFieldValue fv)
java.lang.Object getValue(CustomField<?,?,?> field, java.lang.Object value, boolean sanitize)
getValue(CustomField, Object, boolean, FormatterImpl) with no formatter, meaning dates / numbers
as string will use the standard format, not a user-defined formatjava.lang.Object getValue(CustomField<?,?,?> field, java.lang.Object value, boolean sanitize, FormatterImpl formatter)
getValueType(CustomField).
If the value is a string and a formatter is given, will use the formatter to parse the string, instead of
assuming the standard formatsfield - The custom fieldvalue - The value to resolve from. Can either be a ICustomFieldValue or a scalar value, which will
be converted to the corresponding typesanitize - Indicates if text should be sanitized. Should be set to true when reading text from clients, and
false when reading data from the database.formatter - If null, dates / numbers parsed from string will be assumed in the standard format. If not null,
is used to parse.java.lang.Object getValueForSearch(CustomField<?,?,?> field, java.lang.Object value, boolean nativeValue)
nativeValue is true then the result will be as close to the database as possible,
depending on the custom field type.
No empty collections are returned. So, it is safe to assume that if the result is not null,
it will be used on the query.
CustomFieldType.STRING,
CustomFieldType.TEXT,
CustomFieldType.RICH_TEXT or
CustomFieldType.URL: String. If nativeValue is true and the field uses a pattern
(mask) then it is removed from the input
value. Otherwise return the input value;CustomFieldType.BOOLEAN: Boolean;CustomFieldType.INTEGER: IntegerRange;CustomFieldType.DECIMAL: DecimalRange;CustomFieldType.DATE: DateRange;CustomFieldType.SINGLE_SELECTION or CustomFieldType.MULTI_SELECTION: If
nativeValue is true then Set of
Longs (ids). Otherwise Set of CustomFieldPossibleValues;CustomFieldType.DYNAMIC_SELECTION: If nativeValue is true then either a String
when applying a fulltext search with the
dynamic value's label or a Set of Strings when need to do exact matching against the internal
value. Otherwise either the input value when applying a fulltext or a Set of Strings with the
label of the values when need to do exact matching;CustomFieldType.LINKED_ENTITY: If nativeValue is true then Set of Longs
(ids). Otherwise Set of SimpleEntitys;CustomFieldType.FILE or CustomFieldType.IMAGE: null (those are not supported for
filter);field - The custom fieldvalue - The value to resolve from. Can either be a BaseValueForSearchDTO or a scalar valuenativeValue - true when the result will be used as filter in the query send to the database.java.lang.Class<?> getValueType(CustomField<?,?,?> field)
CustomFieldType.STRING,
CustomFieldType.TEXT,
CustomFieldType.RICH_TEXT or
CustomFieldType.URL: String;CustomFieldType.BOOLEAN: Boolean;CustomFieldType.INTEGER: Integer;CustomFieldType.DECIMAL: BigDecimal;CustomFieldType.DATE: Date;CustomFieldType.SINGLE_SELECTION: the proper subclass of CustomFieldPossibleValue;CustomFieldType.MULTI_SELECTION: Set of the proper subclass of
CustomFieldPossibleValue;CustomFieldType.DYNAMIC_SELECTION: DynamicFieldValueVO;CustomFieldType.FILE: RawFile;CustomFieldType.IMAGE: Image;CustomFieldType.LINKED_ENTITY: Depends on the linked entity type:
void processAfterSave(EntityWithCustomValues<?,?,?,?> entity)
com.querydsl.core.types.Predicate queryFilter(com.querydsl.core.types.EntityPath<? extends CustomFieldValue<?,?,?,?>> valuePath, CustomField<?,?,?> customField, CustomFieldValueForSearchDTO valueForSearch)
void remove(CustomFieldValue<?,?,?,?> fieldValue)
void removeAll(boolean binaryOnly,
EntityWithCustomValues<?,?,?,?> owner)
java.util.List<CustomFieldValueDTO> resolveValues(java.lang.Class<? extends CustomField<?,?,?>> customFieldType, java.util.Collection<CustomFieldValueDTO> valueDTOs)
LinkedEntityVO set with display. The same applies to enumerated values or dynamic values.
Important: The use case for this method is the case where a DTO with custom values is sent from client to
server,then those values are sent back to the clients. Hence, no sanitization is performed on strings, because
these strings will be sent back from the client to server later, and that would make the string be sanitized
twice, which can make them invalid.void setCustomValues(BasicUser user, java.util.Collection<UserCustomField> enabledFields, java.util.Collection<UserCustomField> editable, java.util.Collection<UserCustomField> managePrivacy, java.util.Collection<UserCustomFieldValueDTO> fieldValueDTOs)
<CF extends CustomField<CF,C,PV>,C extends CustomFieldPossibleValueCategory<CF,C,PV>,PV extends CustomFieldPossibleValue<CF,C,PV>,V extends CustomFieldValue<CF,C,PV,E>,E extends SimpleEntity & EntityWithCustomValues<CF,C,PV,V>> void setCustomValues(E entity, java.util.Collection<CF> enabledFields, java.util.Collection<CF> editable, java.util.Collection<CustomFieldValueDTO> fieldValueDTOs)
void setDefaultValue(CustomFieldDetailedVO vo, java.lang.Object defaultValue)
<CF extends CustomField<CF,C,PV>,C extends CustomFieldPossibleValueCategory<CF,C,PV>,PV extends CustomFieldPossibleValue<CF,C,PV>,V extends CustomFieldValue<CF,C,PV,O>,O extends SimpleEntity & EntityWithCustomValues<CF,C,PV,V>> void setDefaultValues(O entity, java.util.Collection<CF> fields)
addDefaultValues(SimpleEntity, Collection, Collection) passing
entity.getCustomValues() as the collection of custom values.void setModelValue(CustomField<?,?,?> customField, java.lang.Object value, ICustomFieldValue<?,?> fieldValue)
ICustomFieldValue, according to the correct type, converting the value
to the model-specific type. For example, enumerated values as CustomFieldPossibleValueVO, dates as
DateTime, etc.void sortAndRemoveMissing(java.util.List<? extends CustomFieldValueDTO> customValues, java.util.List<? extends IEntity> allowedFields)
CustomFieldValueDTO and remove a value if it's for a field not present in the
given list of allowed fields (i.e. the catalog).customValues - the list of values to sort.allowedFields - the ordered list of allowed fields.void sortAndRemoveMissingFromVO(java.util.List<? extends CustomFieldValueVO> customValues, java.util.List<? extends IEntity> allowedFields)
sortAndRemoveMissing(List, List) but for a list of VOssortAndRemoveMissing(List, List)java.util.List<? extends CustomFieldPossibleValue<?,?,?>> toCustomFieldPossibleValues(CustomField<?,?,?> customField, java.util.Collection<?> values)
java.util.List<SimpleEntity> toLinkedEntityValues(CustomField<?,?,?> customField, java.util.Collection<?> values)
java.util.Map<java.lang.String,java.lang.Object> toMap(java.lang.Class<? extends CustomField<?,?,?>> customFieldType, java.util.Collection<? extends ICustomFieldValue<?,?>> customValues, boolean sanitize)
Date,
not DateTime, CustomFieldPossibleValue, not CustomFieldPossibleValueVO, etc)sanitize - Indicates if text should be sanitized. Should be set to true when reading text from clients, and
false when reading data from the database.java.lang.String toReference(CustomField<?,?,?> field, java.lang.Object value)