java.lang.Object
com.genologics.ri.userdefined.UDF
- All Implemented Interfaces:
- Serializable
Field is the value and data type of a user-defined field.
- See Also:
- 
Field SummaryFields
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptiongetName()getType()static UDFFinds a UDF by name in the UDFs of the given object.static UDFFinds a UDF by name in the UDFs of the given object.static UDFFinds a UDF by name in the UDFs of the given object.static UDFgetUDF(Collection<UDF> udfs, String name) Finds a UDF by name in a collection of UDF objects.static UDFgetUDF(Collection<UDF> udfs, String name, boolean fail) Finds a UDF by name in a collection of UDF objects.static UDFgetUDF(Collection<UDF> udfs, String name, boolean fail, String failMessage) Finds a UDF by name in a collection of UDF objects.static StringgetUDFValue(UDFHolder thing, String name) Finds a UDF by name in the UDFs of the given object and, if found, returns its value.static StringgetUDFValue(UDFHolder thing, String name, boolean fail) Finds a UDF by name in the UDFs of the given object and returns its value.static StringgetUDFValue(UDFHolder thing, String name, boolean fail, String failMessage) Finds a UDF by name in the UDFs of the given object and returns its value.static StringgetUDFValue(UDFHolder thing, String name, String defaultValue) Finds a UDF by name in the UDFs of the given object and, if found, returns its value.static StringgetUDFValue(Collection<UDF> udfs, String name) Finds a UDF by name in a collection of UDF objects and, if found, returns its value.static StringgetUDFValue(Collection<UDF> udfs, String name, boolean fail) Finds a UDF by name in a collection of UDF objects and returns its value.static StringgetUDFValue(Collection<UDF> udfs, String name, boolean fail, String failMessage) Finds a UDF by name in a collection of UDF objects and returns its value.static StringgetUDFValue(Collection<UDF> udfs, String name, String defaultValue) Finds a UDF by name in a collection of UDF objects and, if found, returns its value.getUnit()getValue()voidvoidstatic UDFAdds, sets or removes a UDF from the collection of fields on the given object.static UDFsetUDF(Collection<UDF> udfs, String name, Object value) Adds, sets or removes a UDF from the given collection of fields.voidtoString()
- 
Field Details- 
name
- 
type
- 
unit
- 
value
 
- 
- 
Constructor Details- 
UDFpublic UDF()
- 
UDF
- 
UDF
- 
UDF
 
- 
- 
Method Details- 
getValue
- 
setValue
- 
getUnit
- 
getName
- 
setName
- 
getType
- 
setType
- 
toString
- 
getUDFFinds a UDF by name in a collection of UDF objects.- Parameters:
- udfs- The collection to search.
- name- The name of the UDF to find.
- Returns:
- The UDF object with the same name, or nullif there is no matching UDF.
- Throws:
- IllegalArgumentException- if- nameis null.
 
- 
getUDFValueFinds a UDF by name in a collection of UDF objects and, if found, returns its value.- Parameters:
- udfs- The collection to search.
- name- The name of the UDF to find.
- Returns:
- The value of the UDF, or nullif there is no matching UDF.
- Throws:
- IllegalArgumentException- if- nameis null.
 
- 
getUDFValueFinds a UDF by name in a collection of UDF objects and, if found, returns its value.- Parameters:
- udfs- The collection to search.
- name- The name of the UDF to find.
- defaultValue- The value to return if there is no matching UDF.
- Returns:
- The value of the UDF, or defaultValueif there is no matching UDF.
- Throws:
- IllegalArgumentException- if- nameis null.
- Since:
- 2.22
 
- 
getUDFFinds a UDF by name in a collection of UDF objects.- Parameters:
- udfs- The collection to search.
- name- The name of the UDF to find.
- fail- Whether to fail with a- MissingUDFExceptionif the field is not found.
- Returns:
- The UDF object with the same name, or nullif there is no matching UDF andfailis false.
- Throws:
- IllegalArgumentException- if- nameis null.
- MissingUDFException- if- failis true and there is no matching UDF.
 
- 
getUDFValueFinds a UDF by name in a collection of UDF objects and returns its value.- Parameters:
- udfs- The collection to search.
- name- The name of the UDF to find.
- fail- Whether to fail with a- MissingUDFExceptionif the field is not found.
- Returns:
- The value of the UDF, or nullif there is no matching UDF andfailis false.
- Throws:
- IllegalArgumentException- if- nameis null.
- MissingUDFException- if- failis true and there is no matching UDF.
 
- 
getUDFFinds a UDF by name in a collection of UDF objects.- Parameters:
- udfs- The collection to search.
- name- The name of the UDF to find.
- fail- Whether to fail with a- MissingUDFExceptionif the field is not found.
- failMessage- The message to put in the- MissingUDFExceptionwhen such an exception is raised.
- Returns:
- The UDF object with the same name, or nullif there is no matching UDF andfailis false.
- Throws:
- IllegalArgumentException- if- nameis null.
- MissingUDFException- if- failis true and there is no matching UDF.
 
- 
getUDFValuepublic static String getUDFValue(Collection<UDF> udfs, String name, boolean fail, String failMessage) Finds a UDF by name in a collection of UDF objects and returns its value.- Parameters:
- udfs- The collection to search.
- name- The name of the UDF to find.
- fail- Whether to fail with a- MissingUDFExceptionif the field is not found.
- failMessage- The message to put in the- MissingUDFExceptionwhen such an exception is raised.
- Returns:
- The value of the UDF, or nullif there is no matching UDF andfailis false.
- Throws:
- IllegalArgumentException- if- nameis null.
- MissingUDFException- if- failis true and there is no matching UDF.
 
- 
getUDFFinds a UDF by name in the UDFs of the given object.- Parameters:
- thing- The object that holds UDFs.
- name- The name of the UDF to find.
- Returns:
- The UDF object with the same name, or nullif there is no matching UDF.
- Throws:
- IllegalArgumentException- if- nameis null.
 
- 
getUDFValueFinds a UDF by name in the UDFs of the given object and, if found, returns its value.- Parameters:
- thing- The object that holds UDFs.
- name- The name of the UDF to find.
- Returns:
- The value of the UDF, or nullif there is no matching UDF.
- Throws:
- IllegalArgumentException- if- nameis null.
 
- 
getUDFValueFinds a UDF by name in the UDFs of the given object and, if found, returns its value.- Parameters:
- thing- The object that holds UDFs.
- name- The name of the UDF to find.
- defaultValue- The value to return if there is no matching UDF.
- Returns:
- The value of the UDF, or defaultValueif there is no matching UDF.
- Throws:
- IllegalArgumentException- if- nameis null.
- Since:
- 2.22
 
- 
getUDFFinds a UDF by name in the UDFs of the given object.- Parameters:
- thing- The object that holds UDFs.
- name- The name of the UDF to find.
- fail- Whether to fail with a- MissingUDFExceptionif the field is not found.
- Returns:
- The UDF object with the same name, or nullif there is no matching UDF andfailis false.
- Throws:
- IllegalArgumentException- if- nameis null.
- MissingUDFException- if- failis true and there is no matching UDF.
 
- 
getUDFValueFinds a UDF by name in the UDFs of the given object and returns its value.- Parameters:
- thing- The object that holds UDFs.
- name- The name of the UDF to find.
- fail- Whether to fail with a- MissingUDFExceptionif the field is not found.
- Returns:
- The value of the UDF, or nullif there is no matching UDF andfailis false.
- Throws:
- IllegalArgumentException- if- nameis null.
- MissingUDFException- if- failis true and there is no matching UDF.
 
- 
getUDFFinds a UDF by name in the UDFs of the given object.- Parameters:
- thing- The object that holds UDFs.
- name- The name of the UDF to find.
- fail- Whether to fail with a- MissingUDFExceptionif the field is not found.
- failMessage- The message to put in the- MissingUDFExceptionwhen such an exception is raised.
- Returns:
- The UDF object with the same name, or nullif there is no matching UDF andfailis false.
- Throws:
- IllegalArgumentException- if- nameis null.
- MissingUDFException- if- failis true and there is no matching UDF.
 
- 
getUDFValueFinds a UDF by name in the UDFs of the given object and returns its value.- Parameters:
- thing- The object that holds UDFs.
- name- The name of the UDF to find.
- fail- Whether to fail with a- MissingUDFExceptionif the field is not found.
- failMessage- The message to put in the- MissingUDFExceptionwhen such an exception is raised.
- Returns:
- The value of the UDF, or nullif there is no matching UDF andfailis false.
- Throws:
- IllegalArgumentException- if- nameis null.
- MissingUDFException- if- failis true and there is no matching UDF.
 
- 
setUDFAdds, sets or removes a UDF from the collection of fields on the given object. If the named UDF exists in the collection, it either has its value set (if "value" is not null) or is removed (if "value" is null). If it doesn't exist, a newUDFobject is created for the field and is added to the collection.- Parameters:
- thing- The object containing UDFs.
- name- The name of the field to change.
- value- The value to set the field to.
- Returns:
- The UDF object found or created, or null if it is removed or not found.
- Throws:
- IllegalArgumentException- if either of- thingor- nameare null.
 
- 
setUDFAdds, sets or removes a UDF from the given collection of fields. If the named UDF exists in the collection, it either has its value set (if "value" is not null) or is removed (if "value" is null). If it doesn't exist, a newUDFobject is created for the field and is added to the collection.- Parameters:
- udfs- The collection of UDF objects.
- name- The name of the field to change.
- value- The value to set the field to.
- Returns:
- The UDF object found or created, or null if it is removed or not found.
- Throws:
- IllegalArgumentException- if either of- udfsor- nameare null.
 
 
-