Class ObjectField

  • All Implemented Interfaces:
    java.io.Serializable

    public class ObjectField
    extends java.lang.Object
    implements java.io.Serializable
    Field
    The field can be used by ObjectDB, by document indexation or by workflow process.
    All properties are loaded first and can be changed on the fly with the hooks.
    It may not have a physical name (ex: a calculated field is not stored in DB).
    It must have a translation in each language.

    See Also:
    Serialized Form
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      class  ObjectField.Metrics
      Field metrics
    • Constructor Summary

      Constructors 
      Constructor Description
      ObjectField()
      Default constructor
      ObjectField​(int type)
      Constructor
      ObjectField​(int type, java.lang.String value)
      Constructor
      ObjectField​(int type, java.lang.String name, java.lang.String value)
      Constructor
      ObjectField​(int type, java.lang.String name, java.lang.String column, int size, int prec)
      Constructor
      ObjectField​(ObjectField f)
      Cloning constructor
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods 
      Modifier and Type Method Description
      void addLinkDataMap​(LinkDatamap ldm)  
      void addNotepad​(java.lang.String fullname, java.lang.String text)
      Add text to notepad
      void addStyle​(FieldStyle style)
      Add a UI style to the field
      void addStyle​(java.lang.String val, java.lang.String min, java.lang.String max, java.lang.String style, java.lang.String icon)
      Add a UI style to the field
      boolean canAutoComplete()
      True if the field use auto-completion
      boolean canAutoCompleteWithAutoSelect()
      True if the field use auto-select on auto-completion
      boolean canGroupBy()
      Is the field group-by-able on UI ?
      boolean canUpdateAll()
      True if the field is bulk updatable
      ObjectField clone​(ObjectField f)
      Clone this field
      boolean contains​(java.lang.String code)
      Test if the value or multi-enum contains a code
      void delNotepad()
      Del text from notepad
      java.lang.String eval​(ObjectDB obj, int context)
      Calculated field evaluation on current selected item
      java.lang.String eval​(ObjectDB obj, int context, java.lang.String[] row)
      Calculated field evaluation
      java.lang.String evalDefault​(ObjectCore obj)
      Default value evaluation
      java.lang.String getAdditionalSearchSpec()
      Get additional SQL filter appended to where clause
      java.lang.String getAlias()
      Get the alias or null if no alias
      java.lang.String[] getAllCodes​(ObjectCore obj, java.util.List<java.lang.String[]> rows)
      Get all codes for specified object data rows
      java.lang.Boolean getBoolean()
      Field value as Boolean
      boolean getBoolean​(boolean defValue)
      Field value as raw boolean with default value
      java.lang.String getCalcExpr()
      Get the expression to calculate the field value
      char getCase()
      Get the field case
      java.lang.String getClassification()
      RGPD Classification
      java.lang.String[] getCodes()
      Get the codes of a multiple enumeration (TYPE_ENUM_MULTI) field
      java.lang.String[] getCodes​(java.lang.String codes)
      Get the codes of a multiple enumeration (TYPE_ENUM_MULTI) value
      java.lang.String getColumn()
      Get the physical column name
      java.lang.String getContextDefaultValue()
      Default value to store specific creation context
      int getDataMap()
      Get datamap index (-1=none)
      java.util.Date getDate()
      Field value as Date
      java.util.Date getDate​(java.util.Date defValue)
      Field value as Date with default value
      java.lang.String getDBName()
      Get the physical column name (same as getColumn)
      java.math.BigDecimal getDecimal()
      Field value as BigDecimal
      java.math.BigDecimal getDecimal​(java.math.BigDecimal defValue)
      Field value as raw BigDecimal with default value
      java.lang.String getDefault()
      Get default value
      int getDefaultOrder()
      Deprecated.
      Use getOrderDefault
      java.lang.String getDefaultValue()
      Alias to getDefault
      java.lang.String getDesc​(ObjectCore obj)
      Get the alias or null if no alias
      java.lang.String getDisplay()
      Get the field translation in current user language
      java.lang.String getDisplayOldValue()
      Previous display value (applies only to list of values values)
      java.lang.String getDisplayOldValue​(Grant g)
      Previous display value (applies also to user related formats : date, ...)
      java.lang.String getDisplayValue()
      Get the display value
      java.lang.String getDisplayValue​(Grant g)
      Get the display current value for specified value (applies also user related formats : dates, ...)
      java.lang.String getDisplayValue​(Grant g, java.lang.String value)
      Get the display value for specified value (applies also user related formats : dates, ...)
      java.lang.String getDisplayValue​(java.lang.String value)
      Get the display value for specified value (only applies to list of values)
      java.lang.String getDisplayValue​(java.lang.String value, java.lang.String sep)
      Get the display value for specified value (only applies to list of values)
      DocumentDB getDocument()
      Document extended data
      DocumentDB getDocument​(Grant g)
      Load and get the document's extended data
      DocumentDB getDocumentFromDB​(Grant g)
      Deprecated.
      Use getDocument(Grant)
      java.lang.Double getDouble()
      Field value as Double
      double getDouble​(double defValue)
      Field value as raw double with default value
      java.lang.String getExportValue​(Grant g, java.lang.String value)
      Exported value to PDF and Excel
      FieldArea getFieldArea()
      Get the field area
      static java.lang.String getFieldId​(java.lang.String name)
      Get field ID from name
      java.lang.String getFilter()
      Get field filter (% means no filter)
      java.lang.String getFilterDateMax()
      Get max date filter (for date field)
      java.lang.String getFilterDateMin()
      Get min date filter (for date field)
      ObjectFieldSearch getFilterSearch()
      Get the field filters
      java.lang.Float getFloat()
      Field value as Float
      float getFloat​(float defValue)
      Field value as raw float with default value
      int getFloatPrecision()
      Get field precision (float decimals)
      java.lang.String getFullInput()
      Get the logical full input name (or input if null)
      int getGroupByDefault()
      Get default group by in list
      int getGroupByOrder()
      Get the current 'group by' order in list
      java.lang.String getHelp()
      Get the help in the user language
      java.lang.String getHelpList()
      Get the help on list in the user language
      java.lang.String getId()
      Get the technical id of the field
      java.lang.String getImage​(ObjectDB obj, java.lang.String val)
      Get the image associated to the value
      int getIndex​(ObjectCore o)
      Get position index in object fields
      java.lang.String getInheritedFromObject()
      Get the inherited object name
      int getInitialOrder()
      Deprecated.
      Use getOrderDefault
      java.lang.String getInput()
      Get the logical input name (or name if null)
      java.lang.Integer getInt()
      Field value as Integer
      int getInt​(int defValue)
      Field value as raw integer with default value
      java.lang.String getLabel()
      Get the field translation in current user language (alias to getDisplay)
      java.util.List<LinkDatamap> getLinkDataMap()
      Get link datamaps of foreign key
      ObjectFieldList getList()
      Get the field list of values
      java.lang.String getListName()
      Get the name of the list of values
      int getListOperator()
      Get the operator on lists LIST_*
      java.lang.String getListOperatorValue()
      Get current value of list operation
      java.lang.Long getLong()
      Field value as Long
      long getLong​(long defValue)
      Field value as raw long with default value
      java.util.List<java.lang.String> getMetaObjectList()
      Authorized objects of TYPE_OBJECT
      ObjectField.Metrics getMetrics()
      Get the field UI metrics
      int getMinSize()
      Get field min size
      java.lang.String[] getMultiFilter()
      Get multi-valued filter for enum (separated by semi-colon)
      java.lang.String getName()
      Get the logical simple name
      java.lang.String getObjectFieldId()
      Get the technical id of the object-field relation
      static java.lang.String getObjectFieldId​(java.lang.String object, java.lang.String field)
      Get 1st level object field ID from object name and field name
      java.lang.Boolean getOldBoolean()
      Field old value as Boolean
      java.lang.String getOldCode()
      Deprecated.
      Use getOldValue
      java.util.Date getOldDate()
      Field old value as Date
      java.math.BigDecimal getOldDecimal()
      Field old value as BigDecimal
      DocumentDB getOldDocument()
      Get old document
      java.lang.Double getOldDouble()
      Field old value as Double
      java.lang.Float getOldFloat()
      Field old value as Float
      java.lang.Integer getOldInt()
      Field old value as Integer
      java.lang.Long getOldLong()
      Field old value as Long
      java.lang.String getOldValue()
      Get previous value
      int getOrder()
      Current sort specification in search:
      asc = positive value,
      desc = negative value,
      no sort = 0
      int getOrderDefault()
      Default sort specification in search:
      asc = positive value,
      desc = negative value,
      no sort = 0
      int getOrderInObject()
      Get the order in object
      ObjectField getParentField()
      Parent field (null if the field belongs to the object)
      java.lang.String getPlaceholder()
      Get the field placeholder translation in current user language
      int getPrecision()
      Deprecated. 
      int getPrecisionHeight()
      Deprecated.
      use getMetrics
      java.lang.String getRefColumn()
      Get physical name of the referenced field
      java.lang.String getRefDataSource()
      Get the DB datasource of the referenced object
      java.lang.String getRefFieldDBName()
      Alias to getRefColumn
      java.lang.String getRefFieldDisplay()
      Get display name of the referenced field
      java.lang.String getRefFieldName()
      Logical name of the referenced field
      int getRefMaxOccurs()
      Maximum occurs (m) in link cardinality (n,m), -1 means infinity
      int getRefMinOccurs()
      Minimum occurs (n) in link cardinality (n,m)
      java.lang.String getRefObjectContext()
      Get logical name of the current referenced object
      java.lang.String getRefObjectDBName()
      Alias to getRefTable
      java.lang.String getRefObjectDisplay()
      Get display name of the referenced object
      java.lang.String getRefObjectName()
      Get logical name of the referenced object
      int getRefObjectRowIdType()
      Get type of the referenced object row ID
      java.lang.String getRefRowId()
      Physical name of the referenced table Id (default = row_id)
      java.lang.String getRefSearchSpec()
      Get search specification applied to link
      java.lang.String getRefTable()
      Get the DB table of the referenced object
      java.lang.String getRegExp()
      The regular expression of TYPE_REGEXP field
      java.lang.String getRegExpMethod()
      Method to call of TYPE_REGEXP field (null=none)
      java.lang.String getRegExpMsg()
      Message associated to TYPE_REGEXP
      java.lang.String getRegName()
      The regular name of TYPE_REGEXP field
      static java.util.List<java.lang.String[]> getRelatedAreas​(java.lang.String field)
      Get areas containing the field
      static java.util.List<java.lang.String[]> getRelatedObjects​(java.lang.String field)
      Get objects containing the field
      java.lang.String getRendering()
      Get the field rendering
      java.lang.String getRenderingDefault()
      Get the field rendering default
      java.lang.String getRenderingMode()
      Long string rendering mode (for Ace Editor)
      boolean getRequiredDefault()
      Get default mandatory status
      ObjectField getRootField()
      Root parent field
      int getSearch()
      Get the field search type
      int getSearchDefault()
      Get default field search type
      int getSearchRequired()
      Get the field required strategy for searches
      int getSearchRequiredDefault()
      Get default field required strategy for searches
      java.lang.String getSearchSpec()
      Get parsed generic SQL filter applied to a field (platform's internal usage, not to be used in specific code)
      java.lang.String getShortDisplay()
      Get the field short translation in current user language
      int getSize()
      Get field max size
      char getSortType()
      Get the field sort type SORT_*
      java.lang.String getSQLOldValue()
      Returns the old value formatted for SQL statements (the value is surrounded by single quotes if the field is alphanumerical)
      java.lang.String getSQLValue()
      Returns the value formatted for SQL statements (the value is surrounded by single quotes if the field is alphanumerical)
      java.lang.String getStartDateField()
      Optional related start date field (this field is the end date)
      java.util.List<FieldStateTransition> getStateModel()
      Get state model attached to the list of values
      FieldStateTransition getStateTransition​(java.lang.String tran)  
      Action getStateTransitionAction​(java.lang.String actionName)
      Get the Action associated with a transition of status field
      Action getStateTransitionAction​(java.lang.String fromState, java.lang.String toState)
      Deprecated. 
      java.lang.String getStyle​(ObjectDB obj)
      Get field style for current value
      java.lang.String getStyle​(ObjectDB obj, java.lang.String val)
      Get field style for specified value
      java.lang.String getTooltip()
      Get the tooltip in the user language
      int getType()
      Get field type
      static java.lang.String getTypeLabel​(int type, int size, int prec)
      Label for type
      int getUpdatableDefault()
      Get default field updatability
      java.lang.String getValue()
      Get the field value
      int getVisibility()
      Get field visibility
      int getVisibilityDefault()
      Get default field visibility
      int getVisible()
      Deprecated.
      use getVisibility
      int getVisibleDefault()
      Deprecated.
      use getVisibilityDefault
      boolean hasChanged()
      Check whether the field value has changed (it performs a type-aware comparison between current value and old value)
      void initStateModel()
      Set state model attached to the list of values
      boolean isAlphaNum()
      Is type a text (in storage) ?
      boolean isCopiable()
      True if the field is copiable
      boolean isDefaultExpr()
      Is default value an expression ?
      boolean isDocument()
      Is type a document (document or image) ?
      boolean isEmpty()
      Shorthand to check is a field value is null or empty
      boolean isFalse()
      Shorthand to check if a field value is false (using Tool.isFalse())
      boolean isFiltered()
      Is the field filtered
      boolean isFilterEmpty()
      Shorthand to check is a field filter is null or empty or default search filter
      boolean isFilterExpr​(java.lang.String filter)
      Is the filter an expression?
      boolean isFonctId()
      Deprecated.
      Use isFunctId
      boolean isForbidden()
      Is the field forbidden
      boolean isForeignKey()
      Is the field a foreign key (belongs to the object and references one object) ?
      boolean isFunctId()
      True if the field is a functional key
      boolean isGrouped()  
      boolean isHidden()
      Is the field hidden
      boolean isImage()
      Is type Image ?
      boolean isIndexable()
      True if the field is indexed
      boolean isInternalForeignKey()
      Is the field an internal foreign key ?
      boolean isInternalRowId()
      Is the specified field an internal rowId ?
      boolean isListMore()
      Is field an extended field in list
      boolean isListMoreDefault()
      Default list more
      boolean isListSum()
      True if the field has a sum on lists
      boolean isMore()
      Is field an extended field in form
      boolean isNumeric()
      Is type a numeric (in storage) ?
      boolean isOldEmpty()
      Shorthand to check is a old field value is null or empty
      boolean isOldFalse()
      Shorthand to check if a field old value is false (using Tool.isFalse())
      boolean isOldTrue()
      Shorthand to check if a field old value is true (using Tool.isTrue())
      boolean isOrdered()  
      boolean isPersistent()
      Shorthand to check is persistent
      boolean isReferenced()
      Do the field belongs to a referenced object ?
      boolean isRequired()
      Is field mandatory?
      boolean isRequired​(ObjectDB obj)
      Is field required within specified object?
      boolean isRightToLeft()
      Get field orientation
      boolean isSimpleDoc()
      True if the Document field is not in a Bookshelf
      boolean isTechnicalField()
      Checks if field name is one of object's technical field (row_id or timestamp)
      boolean isTimestampField()
      Checks if field name is one of object's technical timestamp field
      boolean isTrue()
      Shorthand to check if a field value is true (using Tool.isTrue())
      boolean isUpdatable()
      True if the field is updatable (not UPD_READ_ONLY means updatable in lists and/or forms)
      boolean isUpdatableInForm()
      Deprecated.
      Use isUpdatableOnForm
      boolean isUpdatableInList()
      Deprecated.
      Use isUpdatableOnList
      boolean isUpdatableOnForm()
      True if the field is updatable in form
      boolean isUpdatableOnList()
      True if the field is updatable in list
      boolean isVisibleOnForm()
      True if the field is visible on form
      boolean isVisibleOnList()
      True if the field is visible on list
      void load​(java.lang.String name, Grant g, ObjectDB obj)
      Load the field definition from repository
      void loadList​(ObjectDB obj, java.lang.String name, Grant g)
      Loads the list of values
      java.lang.String parseEvalValue​(java.lang.Object val)
      Try to return appropriate value from evaluation result
      void removeStyles()
      Remove all UI styles of the field
      void resetFilter()
      Reset the field filter
      void setAdditionalSearchSpec​(java.lang.String s)
      Set additional SQL filter appended to where clause
      void setAlias​(java.lang.String a)
      Set the alias (or remove alias with null)
      void setAutoComplete​(boolean b)
      Deprecated. 
      void setAutoComplete​(char auto)
      Set the field to use auto-completion
      void setBoolean​(boolean b)  
      void setCalcExpr​(java.lang.String e)  
      void setCard​(java.lang.String n)
      Link card min,max separated by comma
      void setCase​(char c)
      Set the field case
      void setClassification​(java.lang.String c)  
      void setColumn​(java.lang.String col)
      Set the physical column name
      void setContextDefaultValue​(java.lang.String d)  
      void setCopy​(boolean b)
      Set the field as copiable
      void setDataMap​(int d)
      Set datamap index (-1=none)
      void setDate​(java.util.Date d)  
      void setDBName​(java.lang.String col)
      Set the physical column name (same as setColumn)
      void setDefault​(java.lang.String d)
      Set default value
      void setDefaultOrder​(int i)
      Deprecated.
      Use setDefaultOrder
      void setDefaultValue​(java.lang.String d)
      Alias to setDefault
      void setDesc​(java.lang.String d)
      Set the alias (or remove alias with null)
      void setDisplay​(java.lang.String d)
      Set the translation in current user language
      void setDocument​(DocumentDB doc)
      Set document
      void setDocument​(ObjectDB obj, java.lang.String name, byte[] data)
      Set document
      void setDocument​(ObjectDB obj, java.lang.String name, java.io.InputStream in)
      Set documentt
      void setDouble​(double d)
      Convert a double to a String, decimal separator is ".", without Exponent representation
      Example : field length=13 and precision=2.
      void setFieldArea​(FieldArea fa)
      Set the field area
      void setFilter​(boolean b)
      Set field filter from boolean
      void setFilter​(char c)
      Set field filter from char
      void setFilter​(double d)
      Set field filter from double
      void setFilter​(float f)
      Set field filter from float
      void setFilter​(int i)
      Set field filter from integer
      void setFilter​(long l)
      Set field filter from long
      void setFilter​(ObjectFieldSearch ofs)
      Set the field filters
      void setFilter​(java.lang.String filter)
      Set the field filter (% means no filter)
      void setFilter​(java.util.Date d)
      Set field filter from date
      void setFilter​(org.json.JSONArray a)
      Set field filter from JSON array
      void setFilterDateMax​(java.lang.String f)
      Set max date filter (for date field)
      void setFilterDateMin​(java.lang.String f)
      Set min date filter (for date field)
      void setFilterSearch​(ObjectFieldSearch ofs)
      Deprecated.
      Use setFilter
      void setFloat​(float f)  
      void setFloatPrecision​(int p)
      Set field precision (float decimals)
      void setFonctId​(boolean b)
      Deprecated.
      Use setFunctId
      void setFullInput​(java.lang.String i)
      Set the logical full input name
      void setFunctId​(boolean b)
      Set the field as a functional key
      void setGroupBy​(boolean b)  
      void setGroupByOrder​(int index, ObjectCore obj)
      Set the current 'group by' order in list
      void setGroupByOrderDefault​(int index, ObjectCore obj)
      Set default group by in list
      void setHelp​(java.lang.String h)
      Set the help in the user language
      void setHelpList​(java.lang.String h)
      Set the help on list in the user language
      void setId​(java.lang.String id)
      Set the technical id of the field
      void setIndexable​(boolean b)
      Set the field as indexed
      void setInheritedFromObject​(java.lang.String name)
      Set the inherited object name
      void setInitialOrder​(int i)
      Deprecated.
      Use setDefaultOrder
      void setInput​(java.lang.String i)
      Set the logical input name
      void setInt​(int i)  
      void setLabel​(java.lang.String d)
      Set the translation in current user language (alias to setDisplay)
      void setList​(ObjectFieldList list)
      Force the field list of values
      void setListMore​(boolean b)
      Set field to be an extended field in list
      void setListMoreDefault​(boolean b)  
      void setListOperator​(int ope)
      Set the field to have an operator LIST_* on lists
      void setListOperatorValue​(java.lang.String val)
      Set current value of list operation
      void setLong​(long l)  
      void setMetaObjectList​(java.lang.String list)
      Set the authorized objects of TYPE_OBJECT
      void setMetrics​(java.lang.String m)
      Simple metrics parser:
      - A single number is interpreted as a width (ex: image thumb size in pixels).
      void setMinSize​(int s)
      Set field min size
      void setMore​(boolean b)
      Set field to be an extended field in form
      static void setMultiFilter​(ObjectField field, ObjectFieldSearch fs, java.lang.String[] f)  
      void setMultiFilter​(java.lang.String[] f)
      Set multi-valued filter : enum as 'a;b;c' / other types as 'in (a,b,c)'
      void setName​(java.lang.String n)
      Set the logical simple name
      void setObjectFieldId​(java.lang.String id)
      Set the technical id of the object-field relation
      void setOldDocument​(DocumentDB oldDoc)
      Set old document
      void setOldValue​(java.lang.String value)
      Set previous value
      void setOrder​(int i)  
      void setOrderDefault​(int i)
      Set default sort specification in search
      void setOrderInObject​(int i)
      Set the order in object
      void setParentField​(ObjectField p)  
      void setPlaceholder​(java.lang.String p)
      Set the placeholder translation in current user language
      void setPrecision​(int p)
      Deprecated. 
      void setPrecision​(java.lang.String prec)
      Deprecated. 
      void setPrecisionHeight​(int h)
      Deprecated.
      use getMetrics
      void setRef​(boolean b)
      Indicate that the field to belong to a referenced object
      void setRefColumn​(java.lang.String c)
      Set physical name of the referenced field
      void setRefDataSource​(java.lang.String d)
      Set the DB table of the referenced object
      void setRefFieldDBName​(java.lang.String c)
      Alias to setRefColumn
      void setRefFieldDisplay​(java.lang.String d)
      Set display name of the referenced field
      void setRefFieldName​(java.lang.String f)
      Set logical name of the referenced field
      void setRefObjectContext​(java.lang.String n)
      Set logical name of the current referenced object
      void setRefObjectDBName​(java.lang.String t)
      Alias to setRefTable
      void setRefObjectDisplay​(int t)
      Set type of the referenced object row ID
      void setRefObjectDisplay​(java.lang.String d)
      Set display name of the referenced object
      void setRefObjectName​(java.lang.String n)
      Set logical name of the referenced object
      void setRefRowId​(java.lang.String f)
      Set physical name of the referenced table Id
      void setRefSearchSpec​(java.lang.String s)
      Set search specification applied to link
      void setRefTable​(java.lang.String t)
      Set the DB table of the referenced object
      void setRegExp​(java.lang.String r)  
      void setRegExpMethod​(java.lang.String m)  
      void setRegExpMsg​(java.lang.String m)  
      void setRegName​(java.lang.String name)  
      void setRendering​(java.lang.String r)
      Set the field rendering
      void setRenderingDefault​(java.lang.String r)
      Set the field rendering default
      void setRequired​(boolean required)
      Set field as mandatory
      void setRequiredDefault​(boolean defRequired)
      Set default mandatory status
      void setRightToLeft​(boolean b)
      Set field orientation
      void setRootField()
      Deprecated. 
      void setRootField​(ObjectDB obj)
      Root parent field calculation
      void setSearch​(int i)
      Set the field search type SEARCH_*
      void setSearchDefault​(int i)
      Set default field search type
      void setSearchRequired​(int b)
      Set the field strategy vs required for searches
      void setSearchRequiredDefault​(int i)
      Set default field required strategy for searches
      void setSearchSpec​(java.lang.String f)
      Set parsed generic SQL filter applied to a field (platform's internal usage, not to be used in specific code)
      void setShortDisplay​(java.lang.String d)
      Set the short translation in current user language
      void setSimpleDoc​(boolean b)
      Set whether the Document field is not in a Bookshelf
      void setSize​(int s)
      Set field max size
      void setSortType​(char type)
      Set the field search type SORT_*
      void setStartDateField​(java.lang.String name)
      Set the start date field (this field is the end date)
      void setTooltip​(java.lang.String text)
      Set the tooltip in the user language
      void setType​(int t)
      Set field type
      void setUpdatable​(boolean b)
      Set the field as updatable.
      void setUpdatable​(int upd)
      Set the field as updatable UPD_*
      void setUpdatableDefault​(int upd)
      Set default field updatability
      void setUpdateAll​(boolean b)
      Set the field as bulk updatable
      void setValue​(boolean bool)
      Set the value with a boolean
      void setValue​(char c)
      Set the value with a char
      void setValue​(double doubleValue)
      Set the value with a double
      void setValue​(float floatValue)
      Set the value with a float
      void setValue​(int intValue)
      Set the value with an integer
      void setValue​(long longValue)
      Set the value with a long integer
      void setValue​(DocumentDB doc)
      Set the value with a document
      void setValue​(java.lang.String value)
      Set the field value
      void setValue​(java.lang.StringBuilder v)
      Set the value with a string buffer
      void setValue​(java.lang.String value, int limit)
      Set the field value with truncation
      void setValue​(java.util.Date date)
      Set the value with a date
      void setVisibility​(int v)
      Set field visibility
      void setVisibilityDefault​(int v)
      Set default field visibility
      void setVisible​(int v)
      Deprecated.
      use setVisibility
      void setVisibleDefault​(int v)
      Deprecated.
      use setVisibilityDefault
      boolean showCalcul()
      True if the FLOAT field uses a calculator (Rendering=CALC)
      java.lang.String toJSON()
      Serialize field to JSON
      java.lang.String toJSON​(Grant g, boolean inlineDocs, boolean inlineThumbs, boolean inlineObjs, boolean copy)
      Deprecated. 
      java.lang.String toJSON​(Grant g, Parameters.InlineParam inlines, boolean copy)
      Serialize field to JSON
      org.json.JSONObject toJSONObject()
      Generates a JSON object representation of the field
      java.lang.String toString()
      Generates a string representation of the field
      java.util.List<java.lang.String> validate​(Processus pcs)
      Valid the field value in a business process
      java.util.List<java.lang.String> validate​(ObjectDB obj)
      Valid the field value in a business object
      java.util.List<java.lang.String> validateFilter​(Processus pcs)
      Valid the field filter in a business process
      java.util.List<java.lang.String> validateFilter​(ObjectDB obj)
      Valid the field filter in a business object
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Field Detail

      • TYPE_ID

        public static final int TYPE_ID
        Technical ID (foreign key or primary key)
        See Also:
        Constant Field Values
      • TYPE_FLOAT

        public static final int TYPE_FLOAT
        Float (double precision)
        See Also:
        Constant Field Values
      • TYPE_DATETIME

        public static final int TYPE_DATETIME
        Datetime (format yyyy-MM-dd HH:mm:ss)
        See Also:
        Constant Field Values
      • TYPE_BOOLEAN

        public static final int TYPE_BOOLEAN
        Boolean False=0 True=1
        See Also:
        Constant Field Values
      • TYPE_ENUM_MULTI

        public static final int TYPE_ENUM_MULTI
        Multi-enum (list of values). Codes are separated by semi-colon
        See Also:
        Constant Field Values
      • TYPE_REGEXP

        public static final int TYPE_REGEXP
        Text with regular expression
        See Also:
        Constant Field Values
      • TYPE_EXTFILE

        public static final int TYPE_EXTFILE
        Physical path a file
        See Also:
        Constant Field Values
      • TYPE_NOTEPAD

        public static final int TYPE_NOTEPAD
        Notepad: appending text with datetime + login
        See Also:
        Constant Field Values
      • TYPE_OBJECT

        public static final int TYPE_OBJECT
        Object as "name:id" in a single value
        See Also:
        Constant Field Values
      • TYPE_GEOCOORDS

        public static final int TYPE_GEOCOORDS
        Geo coordinates as "latitude;longitude[;altitude]" in a single value
        See Also:
        Constant Field Values
      • TYPE_BIGDECIMAL

        public static final int TYPE_BIGDECIMAL
        BigDecimal max storage DECIMAL(100,32)
        See Also:
        Constant Field Values
      • VIS_FORBIDDEN

        public static final int VIS_FORBIDDEN
        Not visible to API and UI
        See Also:
        Constant Field Values
      • UPD_ALWAYS

        public static final int UPD_ALWAYS
        Updatable in lists and forms
        See Also:
        Constant Field Values
      • UPD_FORM_ONLY

        public static final int UPD_FORM_ONLY
        Updatable in forms only
        See Also:
        Constant Field Values
      • UPD_LIST_ONLY

        public static final int UPD_LIST_ONLY
        Updatable in lists only
        See Also:
        Constant Field Values
      • CASE_FIRSTCAPITAL

        public static final char CASE_FIRSTCAPITAL
        First capital
        See Also:
        Constant Field Values
      • RENDERING_DEFAULT

        public static final java.lang.String RENDERING_DEFAULT
        Rendering default
        See Also:
        Constant Field Values
      • RENDERING_RADIO

        public static final java.lang.String RENDERING_RADIO
        Rendering radio button
        See Also:
        Constant Field Values
      • RENDERING_CHECK

        public static final java.lang.String RENDERING_CHECK
        Rendering checkbox
        See Also:
        Constant Field Values
      • RENDERING_COMBO

        public static final java.lang.String RENDERING_COMBO
        Rendering select box
        See Also:
        Constant Field Values
      • RENDERING_SLIDE

        public static final java.lang.String RENDERING_SLIDE
        Rendering slide button
        See Also:
        Constant Field Values
      • RENDERING_SELECTBOX

        public static final java.lang.String RENDERING_SELECTBOX
        Rendering select box (single or multiple select)
        See Also:
        Constant Field Values
      • RENDERING_HORIZCHECKBOX

        public static final java.lang.String RENDERING_HORIZCHECKBOX
        Rendering horizontal check box(es)
        See Also:
        Constant Field Values
      • RENDERING_VERTCHECKBOX

        public static final java.lang.String RENDERING_VERTCHECKBOX
        Rendering vertical check box(es)
        See Also:
        Constant Field Values
      • RENDERING_HORIZRADIOBUTTON

        public static final java.lang.String RENDERING_HORIZRADIOBUTTON
        Rendering horizontal radio buttons
        See Also:
        Constant Field Values
      • RENDERING_VERTRADIOBUTTON

        public static final java.lang.String RENDERING_VERTRADIOBUTTON
        Rendering vertical radio buttons
        See Also:
        Constant Field Values
      • RENDERING_MONO

        public static final java.lang.String RENDERING_MONO
        Rendering monotype
        See Also:
        Constant Field Values
      • RENDERING_EXPRESSION

        public static final java.lang.String RENDERING_EXPRESSION
        Rendering for script expression
        See Also:
        Constant Field Values
      • RENDERING_HTML

        public static final java.lang.String RENDERING_HTML
        Rendering for HTML
        See Also:
        Constant Field Values
      • RENDERING_SQL

        public static final java.lang.String RENDERING_SQL
        Rendering for SQL
        See Also:
        Constant Field Values
      • RENDERING_MARKDOWN

        public static final java.lang.String RENDERING_MARKDOWN
        Rendering for markdown text
        See Also:
        Constant Field Values
      • RENDERING_JSON

        public static final java.lang.String RENDERING_JSON
        Rendering for JSON
        See Also:
        Constant Field Values
      • RENDERING_TEXT

        public static final java.lang.String RENDERING_TEXT
        Rendering for text editor
        See Also:
        Constant Field Values
      • RENDERING_GRID

        public static final java.lang.String RENDERING_GRID
        Rendering for JSON 2D Array
        See Also:
        Constant Field Values
      • PASSWORD_MASK

        public static final java.lang.String PASSWORD_MASK
        Mask for displaying passwords
        See Also:
        Constant Field Values
      • DEFAULT_ROW_ID

        public static final java.lang.String DEFAULT_ROW_ID
        Default value for row id value (for creation)
      • FILTER_ANYCHARS

        public static final java.lang.String FILTER_ANYCHARS
        Wildcard any characters
        See Also:
        Constant Field Values
      • FILTER_ANYSINGLECHAR

        public static final java.lang.String FILTER_ANYSINGLECHAR
        Wildcard one characters
        See Also:
        Constant Field Values
      • DEFAULT_FILTER

        public static final java.lang.String DEFAULT_FILTER
        Default filter value
        See Also:
        Constant Field Values
      • AUTO_COMPLETE_NONE

        public static final char AUTO_COMPLETE_NONE
        No field completion
        See Also:
        Constant Field Values
      • AUTO_COMPLETE_SIMPLE

        public static final char AUTO_COMPLETE_SIMPLE
        Use the field completion
        See Also:
        Constant Field Values
      • AUTO_COMPLETE_SELECT

        public static final char AUTO_COMPLETE_SELECT
        Use the field completion with auto-select option
        See Also:
        Constant Field Values
      • LIST_CALC

        public static final int LIST_CALC
        Calculate with field expression
        See Also:
        Constant Field Values
      • SEARCH_MONO

        public static final int SEARCH_MONO
        Simple search with one value
        See Also:
        Constant Field Values
      • SEARCH_MULTI_CHECK

        public static final int SEARCH_MULTI_CHECK
        Multi-search with checkbox
        See Also:
        Constant Field Values
      • SEARCH_MULTI_LIST

        public static final int SEARCH_MULTI_LIST
        Multi-search with a choice list
        See Also:
        Constant Field Values
      • SEARCH_PERIOD

        public static final int SEARCH_PERIOD
        Search with a time period
        See Also:
        Constant Field Values
      • SEARCHREQ_NOT

        public static final int SEARCHREQ_NOT
        Not required for searches
        See Also:
        Constant Field Values
      • SEARCHREQ_SEMI

        public static final int SEARCHREQ_SEMI
        Semi-required for searches
        See Also:
        Constant Field Values
      • SEARCHREQ_REQ

        public static final int SEARCHREQ_REQ
        Required for searches
        See Also:
        Constant Field Values
      • SEARCHREQ_EXT

        public static final int SEARCHREQ_EXT
        For extended searches
        See Also:
        Constant Field Values
      • SORT_BY_CODE

        public static final char SORT_BY_CODE
        Sort by code (DB value)
        See Also:
        Constant Field Values
      • SORT_BY_VALUE

        public static final char SORT_BY_VALUE
        Sort by value (translation in case of enum)
        See Also:
        Constant Field Values
      • SORT_BY_CODE_ORDER

        public static final char SORT_BY_CODE_ORDER
        Sort by code order of enum
        See Also:
        Constant Field Values
    • Constructor Detail

      • ObjectField

        public ObjectField()
        Default constructor
      • ObjectField

        public ObjectField​(int type)
        Constructor
        Parameters:
        type - Type (one of ObjectField.TYPE_*)
      • ObjectField

        public ObjectField​(int type,
                           java.lang.String value)
        Constructor
        Parameters:
        type - Type (one of ObjectField.TYPE_*)
        value - Value
      • ObjectField

        public ObjectField​(int type,
                           java.lang.String name,
                           java.lang.String value)
        Constructor
        Parameters:
        type - Type (one of ObjectField.TYPE_*)
        name - Logical name
        value - Value
      • ObjectField

        public ObjectField​(int type,
                           java.lang.String name,
                           java.lang.String column,
                           int size,
                           int prec)
        Constructor
        Parameters:
        type - Type (one of ObjectField.TYPE_*)
        name - Logical name
        column - Optional physical name
        size - Size
        prec - Precision
      • ObjectField

        public ObjectField​(ObjectField f)
        Cloning constructor
        Parameters:
        f - Field to clone
    • Method Detail

      • getTypeLabel

        public static final java.lang.String getTypeLabel​(int type,
                                                          int size,
                                                          int prec)
        Label for type
        Parameters:
        type - Type
        size - Size
        prec - Precision
      • clone

        public ObjectField clone​(ObjectField f)
        Clone this field
        Parameters:
        f - Optional field to override
        Returns:
        the clone
      • load

        public void load​(java.lang.String name,
                         Grant g,
                         ObjectDB obj)
        Load the field definition from repository
        Parameters:
        name - Field name
        g - User rights
        obj - Optional object
      • getId

        public java.lang.String getId()
        Get the technical id of the field
      • setId

        public void setId​(java.lang.String id)
        Set the technical id of the field
      • getFieldId

        public static java.lang.String getFieldId​(java.lang.String name)
        Get field ID from name
        Parameters:
        name - Field name
        Returns:
        Field ID or empty string
      • getObjectFieldId

        public java.lang.String getObjectFieldId()
        Get the technical id of the object-field relation
      • setObjectFieldId

        public void setObjectFieldId​(java.lang.String id)
        Set the technical id of the object-field relation
      • getObjectFieldId

        public static java.lang.String getObjectFieldId​(java.lang.String object,
                                                        java.lang.String field)
        Get 1st level object field ID from object name and field name
        Parameters:
        object - Object name
        field - Field name
        Returns:
        Object field ID or empty string
      • getRelatedObjects

        public static java.util.List<java.lang.String[]> getRelatedObjects​(java.lang.String field)
        Get objects containing the field
        Parameters:
        field - Field name
        Returns:
        List of objects [id,name]
      • getRelatedAreas

        public static java.util.List<java.lang.String[]> getRelatedAreas​(java.lang.String field)
        Get areas containing the field
        Parameters:
        field - Field name
        Returns:
        List of areas [id, name]
      • getName

        public java.lang.String getName()
        Get the logical simple name
      • setName

        public void setName​(java.lang.String n)
        Set the logical simple name
      • getInput

        public java.lang.String getInput()
        Get the logical input name (or name if null)
      • setInput

        public void setInput​(java.lang.String i)
        Set the logical input name
      • getFullInput

        public java.lang.String getFullInput()
        Get the logical full input name (or input if null)
      • setFullInput

        public void setFullInput​(java.lang.String i)
        Set the logical full input name
      • getAlias

        public java.lang.String getAlias()
        Get the alias or null if no alias
      • setAlias

        public void setAlias​(java.lang.String a)
        Set the alias (or remove alias with null)
      • getDesc

        public java.lang.String getDesc​(ObjectCore obj)
        Get the alias or null if no alias
      • setDesc

        public void setDesc​(java.lang.String d)
        Set the alias (or remove alias with null)
      • getOrderInObject

        public int getOrderInObject()
        Get the order in object
      • setOrderInObject

        public void setOrderInObject​(int i)
        Set the order in object
      • getIndex

        public int getIndex​(ObjectCore o)
        Get position index in object fields
      • getDisplay

        public java.lang.String getDisplay()
        Get the field translation in current user language
      • getLabel

        public java.lang.String getLabel()
        Get the field translation in current user language (alias to getDisplay)
      • setDisplay

        public void setDisplay​(java.lang.String d)
        Set the translation in current user language
      • setLabel

        public void setLabel​(java.lang.String d)
        Set the translation in current user language (alias to setDisplay)
      • getShortDisplay

        public java.lang.String getShortDisplay()
        Get the field short translation in current user language
      • setShortDisplay

        public void setShortDisplay​(java.lang.String d)
        Set the short translation in current user language
      • getPlaceholder

        public java.lang.String getPlaceholder()
        Get the field placeholder translation in current user language
      • setPlaceholder

        public void setPlaceholder​(java.lang.String p)
        Set the placeholder translation in current user language
      • getHelp

        public java.lang.String getHelp()
        Get the help in the user language
      • setHelp

        public void setHelp​(java.lang.String h)
        Set the help in the user language
      • getHelpList

        public java.lang.String getHelpList()
        Get the help on list in the user language
      • setHelpList

        public void setHelpList​(java.lang.String h)
        Set the help on list in the user language
      • getTooltip

        public java.lang.String getTooltip()
        Get the tooltip in the user language
      • setTooltip

        public void setTooltip​(java.lang.String text)
        Set the tooltip in the user language
      • isRightToLeft

        public boolean isRightToLeft()
        Get field orientation
      • setRightToLeft

        public void setRightToLeft​(boolean b)
        Set field orientation
      • getRendering

        public java.lang.String getRendering()
        Get the field rendering
      • setRendering

        public void setRendering​(java.lang.String r)
        Set the field rendering
      • getRenderingDefault

        public java.lang.String getRenderingDefault()
        Get the field rendering default
      • setRenderingDefault

        public void setRenderingDefault​(java.lang.String r)
        Set the field rendering default
      • getRenderingMode

        public java.lang.String getRenderingMode()
        Long string rendering mode (for Ace Editor)
      • getColumn

        public java.lang.String getColumn()
        Get the physical column name
      • getDBName

        public final java.lang.String getDBName()
        Get the physical column name (same as getColumn)
      • setColumn

        public void setColumn​(java.lang.String col)
        Set the physical column name
      • setDBName

        public final void setDBName​(java.lang.String col)
        Set the physical column name (same as setColumn)
      • getFieldArea

        public FieldArea getFieldArea()
        Get the field area
      • setFieldArea

        public void setFieldArea​(FieldArea fa)
        Set the field area
      • getVisibility

        public int getVisibility()
        Get field visibility
      • isVisibleOnList

        public boolean isVisibleOnList()
        True if the field is visible on list
      • isVisibleOnForm

        public boolean isVisibleOnForm()
        True if the field is visible on form
      • isForbidden

        public boolean isForbidden()
        Is the field forbidden
      • isHidden

        public boolean isHidden()
        Is the field hidden
      • setVisibility

        public void setVisibility​(int v)
        Set field visibility
      • getVisibilityDefault

        public int getVisibilityDefault()
        Get default field visibility
      • setVisibilityDefault

        public void setVisibilityDefault​(int v)
        Set default field visibility
      • getVisible

        @Deprecated
        public int getVisible()
        Deprecated.
        use getVisibility
      • setVisible

        @Deprecated
        public void setVisible​(int v)
        Deprecated.
        use setVisibility
      • getVisibleDefault

        @Deprecated
        public int getVisibleDefault()
        Deprecated.
        use getVisibilityDefault
      • setVisibleDefault

        @Deprecated
        public void setVisibleDefault​(int v)
        Deprecated.
        use setVisibilityDefault
      • showCalcul

        public boolean showCalcul()
        True if the FLOAT field uses a calculator (Rendering=CALC)
      • isCopiable

        public boolean isCopiable()
        True if the field is copiable
      • setCopy

        public void setCopy​(boolean b)
        Set the field as copiable
      • isUpdatable

        public boolean isUpdatable()
        True if the field is updatable (not UPD_READ_ONLY means updatable in lists and/or forms)
      • isUpdatableInList

        @Deprecated
        public final boolean isUpdatableInList()
        Deprecated.
        Use isUpdatableOnList
      • isUpdatableOnList

        public boolean isUpdatableOnList()
        True if the field is updatable in list
      • isUpdatableInForm

        @Deprecated
        public final boolean isUpdatableInForm()
        Deprecated.
        Use isUpdatableOnForm
      • isUpdatableOnForm

        public boolean isUpdatableOnForm()
        True if the field is updatable in form
      • setUpdatable

        public void setUpdatable​(boolean b)
        Set the field as updatable. Nearly deprecated. Use setUpdatable(UPD_*)
      • setUpdatable

        public void setUpdatable​(int upd)
        Set the field as updatable UPD_*
      • getUpdatableDefault

        public int getUpdatableDefault()
        Get default field updatability
      • setUpdatableDefault

        public void setUpdatableDefault​(int upd)
        Set default field updatability
      • canUpdateAll

        public boolean canUpdateAll()
        True if the field is bulk updatable
      • setUpdateAll

        public void setUpdateAll​(boolean b)
        Set the field as bulk updatable
      • isIndexable

        public boolean isIndexable()
        True if the field is indexed
      • setIndexable

        public void setIndexable​(boolean b)
        Set the field as indexed
      • canAutoComplete

        public boolean canAutoComplete()
        True if the field use auto-completion
      • canAutoCompleteWithAutoSelect

        public boolean canAutoCompleteWithAutoSelect()
        True if the field use auto-select on auto-completion
      • setAutoComplete

        @Deprecated
        public void setAutoComplete​(boolean b)
        Deprecated.
        Set the field to use auto-completion
      • setAutoComplete

        public void setAutoComplete​(char auto)
        Set the field to use auto-completion
        Parameters:
        auto - AUTO_COMPLETE_*
      • getDocument

        public DocumentDB getDocument()
        Document extended data
      • getDocumentFromDB

        @Deprecated
        public DocumentDB getDocumentFromDB​(Grant g)
        Deprecated.
        Use getDocument(Grant)
      • getDocument

        public DocumentDB getDocument​(Grant g)
        Load and get the document's extended data
        Parameters:
        g - Grant
        Returns:
        Document
      • setDocument

        public void setDocument​(DocumentDB doc)
        Set document
        Parameters:
        doc - Document
      • setDocument

        public void setDocument​(ObjectDB obj,
                                java.lang.String name,
                                byte[] data)
        Set document
        Parameters:
        obj - Object
        name - Document name
        data - Document data
      • setDocument

        public void setDocument​(ObjectDB obj,
                                java.lang.String name,
                                java.io.InputStream in)
        Set documentt
        Parameters:
        obj - Object
        name - Name
        in - Data inputstream
      • getOldDocument

        public DocumentDB getOldDocument()
        Get old document
        Returns:
        Old document
      • setOldDocument

        public void setOldDocument​(DocumentDB oldDoc)
        Set old document
        Parameters:
        oldDoc - Old document
      • isRequired

        public boolean isRequired()
        Is field mandatory?
        Returns:
        True if field is mandatory
      • setRequired

        public void setRequired​(boolean required)
        Set field as mandatory
        Parameters:
        required - Mandatory?
      • getRequiredDefault

        public boolean getRequiredDefault()
        Get default mandatory status
        Returns:
        Default mandatory sattus
      • setRequiredDefault

        public void setRequiredDefault​(boolean defRequired)
        Set default mandatory status
        Parameters:
        defRequired - Mandatory?
      • isRequired

        public boolean isRequired​(ObjectDB obj)
        Is field required within specified object?
        Parameters:
        obj - Object
        Returns:
        True if field is mandatory in specified object
      • isFonctId

        @Deprecated
        public boolean isFonctId()
        Deprecated.
        Use isFunctId
      • isFunctId

        public boolean isFunctId()
        True if the field is a functional key
      • setFonctId

        @Deprecated
        public void setFonctId​(boolean b)
        Deprecated.
        Use setFunctId
      • setFunctId

        public void setFunctId​(boolean b)
        Set the field as a functional key
      • getCase

        public char getCase()
        Get the field case
      • setCase

        public void setCase​(char c)
        Set the field case
      • setMetaObjectList

        public void setMetaObjectList​(java.lang.String list)
        Set the authorized objects of TYPE_OBJECT
        Parameters:
        list - separated with semicolon or new lines
      • getMetaObjectList

        public java.util.List<java.lang.String> getMetaObjectList()
        Authorized objects of TYPE_OBJECT
      • isListSum

        public boolean isListSum()
        True if the field has a sum on lists
      • getListOperator

        public int getListOperator()
        Get the operator on lists LIST_*
      • setListOperator

        public void setListOperator​(int ope)
        Set the field to have an operator LIST_* on lists
      • getListOperatorValue

        public java.lang.String getListOperatorValue()
        Get current value of list operation
      • setListOperatorValue

        public void setListOperatorValue​(java.lang.String val)
        Set current value of list operation
      • getSearch

        public int getSearch()
        Get the field search type
      • setSearch

        public void setSearch​(int i)
        Set the field search type SEARCH_*
      • getSearchDefault

        public int getSearchDefault()
        Get default field search type
      • setSearchDefault

        public void setSearchDefault​(int i)
        Set default field search type
      • getSearchRequired

        public int getSearchRequired()
        Get the field required strategy for searches
      • setSearchRequired

        public void setSearchRequired​(int b)
        Set the field strategy vs required for searches
      • getSearchRequiredDefault

        public int getSearchRequiredDefault()
        Get default field required strategy for searches
      • setSearchRequiredDefault

        public void setSearchRequiredDefault​(int i)
        Set default field required strategy for searches
      • getSortType

        public char getSortType()
        Get the field sort type SORT_*
      • setSortType

        public void setSortType​(char type)
        Set the field search type SORT_*
      • isMore

        public boolean isMore()
        Is field an extended field in form
      • setMore

        public void setMore​(boolean b)
        Set field to be an extended field in form
      • isListMore

        public boolean isListMore()
        Is field an extended field in list
      • setListMore

        public void setListMore​(boolean b)
        Set field to be an extended field in list
      • isListMoreDefault

        public boolean isListMoreDefault()
        Default list more
      • setListMoreDefault

        public void setListMoreDefault​(boolean b)
      • getSize

        public int getSize()
        Get field max size
      • setSize

        public void setSize​(int s)
        Set field max size
      • getMinSize

        public int getMinSize()
        Get field min size
      • setMinSize

        public void setMinSize​(int s)
        Set field min size
      • getPrecision

        @Deprecated
        public int getPrecision()
        Deprecated.
        use getFloatPrecision
      • setPrecision

        @Deprecated
        public void setPrecision​(int p)
        Deprecated.
        use setFloatPrecisions
      • getFloatPrecision

        public int getFloatPrecision()
        Get field precision (float decimals)
      • setFloatPrecision

        public void setFloatPrecision​(int p)
        Set field precision (float decimals)
      • getPrecisionHeight

        @Deprecated
        public int getPrecisionHeight()
        Deprecated.
        use getMetrics
      • setPrecisionHeight

        @Deprecated
        public void setPrecisionHeight​(int h)
        Deprecated.
        use getMetrics
      • setPrecision

        @Deprecated
        public void setPrecision​(java.lang.String prec)
        Deprecated.
        use setMetric or setFloatPrecision
      • setMetrics

        public void setMetrics​(java.lang.String m)
        Simple metrics parser:
        - A single number is interpreted as a width (ex: image thumb size in pixels).
        - Use w and h to specify the general width and height of the field (ex: textarea, HTML editor size in characters).
        - Use explicitly wf+hf or wl+hl to specify form or list size only.
        Parameters:
        m - Number or w=number h=number or wf=number hf=number wl=number hl=number
      • getType

        public int getType()
        Get field type
      • setType

        public void setType​(int t)
        Set field type
      • isNumeric

        public boolean isNumeric()
        Is type a numeric (in storage) ?
      • isAlphaNum

        public boolean isAlphaNum()
        Is type a text (in storage) ?
      • isDocument

        public boolean isDocument()
        Is type a document (document or image) ?
      • isImage

        public boolean isImage()
        Is type Image ?
      • setInheritedFromObject

        public void setInheritedFromObject​(java.lang.String name)
        Set the inherited object name
        Parameters:
        name - Object name
      • getInheritedFromObject

        public java.lang.String getInheritedFromObject()
        Get the inherited object name
        Returns:
        Object name or null if not inherited
      • isTechnicalField

        public boolean isTechnicalField()
        Checks if field name is one of object's technical field (row_id or timestamp)
      • isTimestampField

        public boolean isTimestampField()
        Checks if field name is one of object's technical timestamp field
      • getListName

        public java.lang.String getListName()
        Get the name of the list of values
      • loadList

        public void loadList​(ObjectDB obj,
                             java.lang.String name,
                             Grant g)
        Loads the list of values
      • setList

        public void setList​(ObjectFieldList list)
        Force the field list of values
      • getStateModel

        public java.util.List<FieldStateTransition> getStateModel()
        Get state model attached to the list of values
      • initStateModel

        public void initStateModel()
        Set state model attached to the list of values
      • getStateTransitionAction

        @Deprecated
        public Action getStateTransitionAction​(java.lang.String fromState,
                                               java.lang.String toState)
        Deprecated.
      • getStateTransitionAction

        public Action getStateTransitionAction​(java.lang.String actionName)
        Get the Action associated with a transition of status field
        Parameters:
        actionName - Action name of transition
        Returns:
        Action or null if not found
      • getStartDateField

        public java.lang.String getStartDateField()
        Optional related start date field (this field is the end date)
      • setStartDateField

        public void setStartDateField​(java.lang.String name)
        Set the start date field (this field is the end date)
      • getDefault

        public java.lang.String getDefault()
        Get default value
      • getDefaultValue

        public java.lang.String getDefaultValue()
        Alias to getDefault
      • setDefault

        public void setDefault​(java.lang.String d)
        Set default value
      • setDefaultValue

        public void setDefaultValue​(java.lang.String d)
        Alias to setDefault
      • isDefaultExpr

        public boolean isDefaultExpr()
        Is default value an expression ?
      • parseEvalValue

        public java.lang.String parseEvalValue​(java.lang.Object val)
        Try to return appropriate value from evaluation result
      • evalDefault

        public java.lang.String evalDefault​(ObjectCore obj)
        Default value evaluation
      • getContextDefaultValue

        public java.lang.String getContextDefaultValue()
        Default value to store specific creation context
      • setContextDefaultValue

        public void setContextDefaultValue​(java.lang.String d)
      • getParentField

        public ObjectField getParentField()
        Parent field (null if the field belongs to the object)
      • setParentField

        public void setParentField​(ObjectField p)
      • isReferenced

        public boolean isReferenced()
        Do the field belongs to a referenced object ?
      • setRef

        public void setRef​(boolean b)
        Indicate that the field to belong to a referenced object
      • isInternalRowId

        public boolean isInternalRowId()
        Is the specified field an internal rowId ?
      • isForeignKey

        public boolean isForeignKey()
        Is the field a foreign key (belongs to the object and references one object) ?
      • isInternalForeignKey

        public boolean isInternalForeignKey()
        Is the field an internal foreign key ?
      • getRefDataSource

        public java.lang.String getRefDataSource()
        Get the DB datasource of the referenced object
      • setRefDataSource

        public void setRefDataSource​(java.lang.String d)
        Set the DB table of the referenced object
      • getRefTable

        public java.lang.String getRefTable()
        Get the DB table of the referenced object
      • getRefObjectDBName

        public java.lang.String getRefObjectDBName()
        Alias to getRefTable
      • setRefTable

        public void setRefTable​(java.lang.String t)
        Set the DB table of the referenced object
      • setRefObjectDBName

        public void setRefObjectDBName​(java.lang.String t)
        Alias to setRefTable
      • getRefFieldName

        public java.lang.String getRefFieldName()
        Logical name of the referenced field
      • setRefFieldName

        public void setRefFieldName​(java.lang.String f)
        Set logical name of the referenced field
      • getRefColumn

        public java.lang.String getRefColumn()
        Get physical name of the referenced field
      • getRefFieldDBName

        public java.lang.String getRefFieldDBName()
        Alias to getRefColumn
      • setRefColumn

        public void setRefColumn​(java.lang.String c)
        Set physical name of the referenced field
      • setRefFieldDBName

        public void setRefFieldDBName​(java.lang.String c)
        Alias to setRefColumn
      • getRefObjectName

        public java.lang.String getRefObjectName()
        Get logical name of the referenced object
      • setRefObjectName

        public void setRefObjectName​(java.lang.String n)
        Set logical name of the referenced object
      • getRefObjectContext

        public java.lang.String getRefObjectContext()
        Get logical name of the current referenced object
      • setRefObjectContext

        public void setRefObjectContext​(java.lang.String n)
        Set logical name of the current referenced object
      • getRefObjectDisplay

        public java.lang.String getRefObjectDisplay()
        Get display name of the referenced object
      • setRefObjectDisplay

        public void setRefObjectDisplay​(java.lang.String d)
        Set display name of the referenced object
      • getRefObjectRowIdType

        public int getRefObjectRowIdType()
        Get type of the referenced object row ID
      • setRefObjectDisplay

        public void setRefObjectDisplay​(int t)
        Set type of the referenced object row ID
      • getRefFieldDisplay

        public java.lang.String getRefFieldDisplay()
        Get display name of the referenced field
      • setRefFieldDisplay

        public void setRefFieldDisplay​(java.lang.String d)
        Set display name of the referenced field
      • getRefRowId

        public java.lang.String getRefRowId()
        Physical name of the referenced table Id (default = row_id)
      • setRefRowId

        public void setRefRowId​(java.lang.String f)
        Set physical name of the referenced table Id
      • getRefSearchSpec

        public java.lang.String getRefSearchSpec()
        Get search specification applied to link
      • setRefSearchSpec

        public void setRefSearchSpec​(java.lang.String s)
        Set search specification applied to link
      • getRefMinOccurs

        public int getRefMinOccurs()
        Minimum occurs (n) in link cardinality (n,m)
      • getRefMaxOccurs

        public int getRefMaxOccurs()
        Maximum occurs (m) in link cardinality (n,m), -1 means infinity
      • setCard

        public void setCard​(java.lang.String n)
        Link card min,max separated by comma
      • setRootField

        @Deprecated
        public void setRootField()
        Deprecated.
      • setRootField

        public void setRootField​(ObjectDB obj)
        Root parent field calculation
      • getRootField

        public ObjectField getRootField()
        Root parent field
      • getDataMap

        public int getDataMap()
        Get datamap index (-1=none)
      • setDataMap

        public void setDataMap​(int d)
        Set datamap index (-1=none)
      • isSimpleDoc

        public boolean isSimpleDoc()
        True if the Document field is not in a Bookshelf
      • setSimpleDoc

        public void setSimpleDoc​(boolean b)
        Set whether the Document field is not in a Bookshelf
      • getFilter

        public java.lang.String getFilter()
        Get field filter (% means no filter)
      • setFilterSearch

        @Deprecated
        public void setFilterSearch​(ObjectFieldSearch ofs)
        Deprecated.
        Use setFilter
      • setFilter

        public void setFilter​(char c)
        Set field filter from char
      • setFilter

        public void setFilter​(boolean b)
        Set field filter from boolean
      • setFilter

        public void setFilter​(java.util.Date d)
        Set field filter from date
      • setFilter

        public void setFilter​(int i)
        Set field filter from integer
      • setFilter

        public void setFilter​(long l)
        Set field filter from long
      • setFilter

        public void setFilter​(float f)
        Set field filter from float
      • setFilter

        public void setFilter​(double d)
        Set field filter from double
      • setFilter

        public void setFilter​(org.json.JSONArray a)
        Set field filter from JSON array
      • setFilter

        public void setFilter​(java.lang.String filter)
        Set the field filter (% means no filter)
        Parameters:
        filter - filter value
      • isFilterExpr

        public boolean isFilterExpr​(java.lang.String filter)
        Is the filter an expression?
        Parameters:
        filter - Filter
        Returns:
        true if filter match with 'is null', 'in not null', 'like', 'in ('...
      • resetFilter

        public void resetFilter()
        Reset the field filter
      • getMultiFilter

        public java.lang.String[] getMultiFilter()
        Get multi-valued filter for enum (separated by semi-colon)
      • setMultiFilter

        public void setMultiFilter​(java.lang.String[] f)
        Set multi-valued filter : enum as 'a;b;c' / other types as 'in (a,b,c)'
      • getSearchSpec

        public java.lang.String getSearchSpec()
        Get parsed generic SQL filter applied to a field (platform's internal usage, not to be used in specific code)
      • setSearchSpec

        public void setSearchSpec​(java.lang.String f)
        Set parsed generic SQL filter applied to a field (platform's internal usage, not to be used in specific code)
      • getAdditionalSearchSpec

        public java.lang.String getAdditionalSearchSpec()
        Get additional SQL filter appended to where clause
      • setAdditionalSearchSpec

        public void setAdditionalSearchSpec​(java.lang.String s)
        Set additional SQL filter appended to where clause
      • getFilterDateMax

        public java.lang.String getFilterDateMax()
        Get max date filter (for date field)
      • setFilterDateMax

        public void setFilterDateMax​(java.lang.String f)
        Set max date filter (for date field)
      • getFilterDateMin

        public java.lang.String getFilterDateMin()
        Get min date filter (for date field)
      • setFilterDateMin

        public void setFilterDateMin​(java.lang.String f)
        Set min date filter (for date field)
      • isFiltered

        public boolean isFiltered()
        Is the field filtered
      • getOrder

        public int getOrder()
        Current sort specification in search:
        asc = positive value,
        desc = negative value,
        no sort = 0
      • setOrder

        public void setOrder​(int i)
      • isOrdered

        public boolean isOrdered()
      • getInitialOrder

        @Deprecated
        public int getInitialOrder()
        Deprecated.
        Use getOrderDefault
      • getDefaultOrder

        @Deprecated
        public int getDefaultOrder()
        Deprecated.
        Use getOrderDefault
      • getOrderDefault

        public int getOrderDefault()
        Default sort specification in search:
        asc = positive value,
        desc = negative value,
        no sort = 0
      • setInitialOrder

        @Deprecated
        public void setInitialOrder​(int i)
        Deprecated.
        Use setDefaultOrder
      • setDefaultOrder

        @Deprecated
        public void setDefaultOrder​(int i)
        Deprecated.
        Use setDefaultOrder
      • setOrderDefault

        public void setOrderDefault​(int i)
        Set default sort specification in search
      • setGroupByOrderDefault

        public void setGroupByOrderDefault​(int index,
                                           ObjectCore obj)
        Set default group by in list
      • getGroupByDefault

        public int getGroupByDefault()
        Get default group by in list
      • getGroupByOrder

        public int getGroupByOrder()
        Get the current 'group by' order in list
      • setGroupByOrder

        public void setGroupByOrder​(int index,
                                    ObjectCore obj)
        Set the current 'group by' order in list
      • isGrouped

        public boolean isGrouped()
      • canGroupBy

        public boolean canGroupBy()
        Is the field group-by-able on UI ?
      • setGroupBy

        public void setGroupBy​(boolean b)
      • getClassification

        public java.lang.String getClassification()
        RGPD Classification
      • setClassification

        public void setClassification​(java.lang.String c)
      • addNotepad

        public void addNotepad​(java.lang.String fullname,
                               java.lang.String text)
        Add text to notepad
      • delNotepad

        public void delNotepad()
        Del text from notepad
      • setDate

        public void setDate​(java.util.Date d)
        Parameters:
        d - Date
      • setLong

        public void setLong​(long l)
        Parameters:
        l - long integer
      • setInt

        public void setInt​(int i)
        Parameters:
        i - integer
      • setDouble

        public void setDouble​(double d)

        Convert a double to a String, decimal separator is ".", without Exponent representation
        Example : field length=13 and precision=2. setDouble(123456789.5678) = "123456789.57"

        Parameters:
        d - double
      • setFloat

        public void setFloat​(float f)
        Parameters:
        f - float value
      • setBoolean

        public void setBoolean​(boolean b)
        Parameters:
        b - boolean
      • setValue

        public void setValue​(java.lang.StringBuilder v)
        Set the value with a string buffer
        Parameters:
        v - string buffer
      • setValue

        public void setValue​(char c)
        Set the value with a char
        Parameters:
        c - character
      • setValue

        public void setValue​(java.util.Date date)
        Set the value with a date
        Parameters:
        date - Java Date
      • setValue

        public void setValue​(int intValue)
        Set the value with an integer
        Parameters:
        intValue - integer value
      • setValue

        public void setValue​(long longValue)
        Set the value with a long integer
        Parameters:
        longValue - long value
      • setValue

        public void setValue​(float floatValue)
        Set the value with a float
        Parameters:
        floatValue - float value
      • setValue

        public void setValue​(double doubleValue)
        Set the value with a double
        Parameters:
        doubleValue - double value
      • setValue

        public void setValue​(boolean bool)
        Set the value with a boolean
        Parameters:
        bool - boolean value
      • setValue

        public void setValue​(DocumentDB doc)
        Set the value with a document
        Parameters:
        doc - Document
      • getOldCode

        @Deprecated
        public final java.lang.String getOldCode()
        Deprecated.
        Use getOldValue
      • getOldValue

        public java.lang.String getOldValue()
        Get previous value
      • setOldValue

        public void setOldValue​(java.lang.String value)
        Set previous value
      • getDisplayOldValue

        public java.lang.String getDisplayOldValue()
        Previous display value (applies only to list of values values)
      • getDisplayOldValue

        public java.lang.String getDisplayOldValue​(Grant g)
        Previous display value (applies also to user related formats : date, ...)
      • hasChanged

        public boolean hasChanged()

        Check whether the field value has changed (it performs a type-aware comparison between current value and old value)

      • getRegName

        public java.lang.String getRegName()
        The regular name of TYPE_REGEXP field
      • setRegName

        public void setRegName​(java.lang.String name)
      • getRegExp

        public java.lang.String getRegExp()
        The regular expression of TYPE_REGEXP field
      • setRegExp

        public void setRegExp​(java.lang.String r)
      • getRegExpMethod

        public java.lang.String getRegExpMethod()
        Method to call of TYPE_REGEXP field (null=none)
      • setRegExpMethod

        public void setRegExpMethod​(java.lang.String m)
      • getRegExpMsg

        public java.lang.String getRegExpMsg()
        Message associated to TYPE_REGEXP
      • setRegExpMsg

        public void setRegExpMsg​(java.lang.String m)
      • getValue

        public java.lang.String getValue()
        Get the field value
      • setValue

        public void setValue​(java.lang.String value)
        Set the field value
        Parameters:
        value - Value
      • setValue

        public void setValue​(java.lang.String value,
                             int limit)
        Set the field value with truncation
        Parameters:
        value - Value
        limit - Max length
      • getSQLValue

        public java.lang.String getSQLValue()

        Returns the value formatted for SQL statements (the value is surrounded by single quotes if the field is alphanumerical)

        Returns:
        old value formatted for SQL statements
      • getSQLOldValue

        public java.lang.String getSQLOldValue()

        Returns the old value formatted for SQL statements (the value is surrounded by single quotes if the field is alphanumerical)

        Returns:
        old value formatted for SQL statements
      • getDisplayValue

        public final java.lang.String getDisplayValue()
        Get the display value
      • getDisplayValue

        public java.lang.String getDisplayValue​(java.lang.String value)
        Get the display value for specified value (only applies to list of values)
        Parameters:
        value - Value
      • getDisplayValue

        public java.lang.String getDisplayValue​(java.lang.String value,
                                                java.lang.String sep)
        Get the display value for specified value (only applies to list of values)
        Parameters:
        value - Value
        sep - Value separator (default is a slash)
      • getDisplayValue

        public final java.lang.String getDisplayValue​(Grant g)
        Get the display current value for specified value (applies also user related formats : dates, ...)
        Parameters:
        g - User rights
      • getDisplayValue

        public java.lang.String getDisplayValue​(Grant g,
                                                java.lang.String value)
        Get the display value for specified value (applies also user related formats : dates, ...)
        Parameters:
        g - User rights
        value - Value
      • getExportValue

        public java.lang.String getExportValue​(Grant g,
                                               java.lang.String value)
        Exported value to PDF and Excel
        Parameters:
        g - User rights
        value - Field value
        Returns:
        Exported value
      • getCodes

        public java.lang.String[] getCodes()
        Get the codes of a multiple enumeration (TYPE_ENUM_MULTI) field
        Returns:
        Field codes or null if there is no code
      • getCodes

        public java.lang.String[] getCodes​(java.lang.String codes)
        Get the codes of a multiple enumeration (TYPE_ENUM_MULTI) value
        Parameters:
        codes - codes separated by ';'
        Returns:
        Field codes or null if there is no code
      • getAllCodes

        public java.lang.String[] getAllCodes​(ObjectCore obj,
                                              java.util.List<java.lang.String[]> rows)
        Get all codes for specified object data rows
        Parameters:
        obj - Object
        rows - Data rows
      • contains

        public boolean contains​(java.lang.String code)
        Test if the value or multi-enum contains a code
        Parameters:
        code - - text to search
        Returns:
        true if the list or the value contains the code
      • getDate

        public java.util.Date getDate()

        Field value as Date

        Returns:
        Field value as Date or null if null or empty
      • getDate

        public java.util.Date getDate​(java.util.Date defValue)

        Field value as Date with default value

        Parameters:
        defValue - Default value
        Returns:
        Field value as Date or default value if null or empty
      • getOldDate

        public java.util.Date getOldDate()

        Field old value as Date

        Returns:
        Field old value as Date or null if null or empty
      • getInt

        public java.lang.Integer getInt()

        Field value as Integer

        Returns:
        Field value as Integer or Integer(0) if null or empty
      • getInt

        public int getInt​(int defValue)

        Field value as raw integer with default value

        Parameters:
        defValue - Default value
        Returns:
        Field value as raw integer or default value if null or empty
      • getOldInt

        public java.lang.Integer getOldInt()

        Field old value as Integer

        Returns:
        Field old value as Integer or Integer(0) if null or empty
      • getLong

        public java.lang.Long getLong()

        Field value as Long

        Returns:
        Field value as Long or Long(0) if null or empty
      • getLong

        public long getLong​(long defValue)

        Field value as raw long with default value

        Parameters:
        defValue - Default value
        Returns:
        Field value as raw long or default value if null or empty
      • getOldLong

        public java.lang.Long getOldLong()

        Field old value as Long

        Returns:
        Field old value as Long or Long(0) if null or empty
      • getDouble

        public java.lang.Double getDouble()

        Field value as Double

        Returns:
        Field value as Double or Double(0) if null, empty or non double (generates a log message in that case)
      • getDouble

        public double getDouble​(double defValue)

        Field value as raw double with default value

        Parameters:
        defValue - Default value
        Returns:
        Field value as raw double or default value if null, empty or non double (generates a log message in that case)
      • getOldDouble

        public java.lang.Double getOldDouble()

        Field old value as Double

        Returns:
        Field old value as Double or Double(0) if null, empty or non double (generates a log message in that case)
      • getFloat

        public java.lang.Float getFloat()

        Field value as Float

        Returns:
        Field value as Float or Float(0) if null, empty or non float (generates a log message in that case)
      • getFloat

        public float getFloat​(float defValue)

        Field value as raw float with default value

        Parameters:
        defValue - Default value
        Returns:
        Field value as raw float or default value if null, empty or non float (generates a log message in that case)
      • getOldFloat

        public java.lang.Float getOldFloat()

        Field old value as Float

        Returns:
        Field old value as Float or Float(0) if null, empty or non float (generates a log message in that case)
      • getDecimal

        public java.math.BigDecimal getDecimal()

        Field value as BigDecimal

        Returns:
        Field value as BigDecimal or BigDecimal(0) if null, empty or non decimal (generates a log message in that case)
      • getDecimal

        public java.math.BigDecimal getDecimal​(java.math.BigDecimal defValue)

        Field value as raw BigDecimal with default value

        Parameters:
        defValue - Default value
        Returns:
        Field value as raw BigDecimal or default value if null, empty or non decimal (generates a log message in that case)
      • getOldDecimal

        public java.math.BigDecimal getOldDecimal()

        Field old value as BigDecimal

        Returns:
        Field old value as BigDecimal or BigDecimal(0) if null, empty or non decimal (generates a log message in that case)
      • getBoolean

        public java.lang.Boolean getBoolean()

        Field value as Boolean

        Returns:
        Field value as Boolean or Boolean.FALSE if null, empty or non boolean (generates a log message in that case)
      • getBoolean

        public boolean getBoolean​(boolean defValue)

        Field value as raw boolean with default value

        Parameters:
        defValue - Default value
        Returns:
        Field value as boolean or default value if null, empty or non boolean (generates a log message in that case)
      • getOldBoolean

        public java.lang.Boolean getOldBoolean()

        Field old value as Boolean

        Returns:
        Field old value as Boolean or Boolean.FALSE if null, empty or non boolean (generates a log message in that case)
      • isTrue

        public boolean isTrue()
        Shorthand to check if a field value is true (using Tool.isTrue())
        Returns:
        True if the value is true
      • isOldTrue

        public boolean isOldTrue()
        Shorthand to check if a field old value is true (using Tool.isTrue())
        Returns:
        True if the value is true
      • isFalse

        public boolean isFalse()
        Shorthand to check if a field value is false (using Tool.isFalse())
        Returns:
        True if the value is false
      • isOldFalse

        public boolean isOldFalse()
        Shorthand to check if a field old value is false (using Tool.isFalse())
        Returns:
        True if the old value is false
      • isEmpty

        public boolean isEmpty()
        Shorthand to check is a field value is null or empty
      • isOldEmpty

        public boolean isOldEmpty()
        Shorthand to check is a old field value is null or empty
      • isFilterEmpty

        public boolean isFilterEmpty()
        Shorthand to check is a field filter is null or empty or default search filter
      • isPersistent

        public boolean isPersistent()
        Shorthand to check is persistent
      • validate

        public java.util.List<java.lang.String> validate​(ObjectDB obj)
        Valid the field value in a business object
        Parameters:
        obj - ObjectDB
        Returns:
        Error codes or null
      • validate

        public java.util.List<java.lang.String> validate​(Processus pcs)
        Valid the field value in a business process
        Parameters:
        pcs - Processus
        Returns:
        Error codes or null
      • validateFilter

        public java.util.List<java.lang.String> validateFilter​(ObjectDB obj)
        Valid the field filter in a business object
        Parameters:
        obj - ObjectDB
        Returns:
        Error codes or null
      • validateFilter

        public java.util.List<java.lang.String> validateFilter​(Processus pcs)
        Valid the field filter in a business process
        Parameters:
        pcs - Processus
        Returns:
        Error codes or null
      • getLinkDataMap

        public java.util.List<LinkDatamap> getLinkDataMap()
        Get link datamaps of foreign key
      • addLinkDataMap

        public void addLinkDataMap​(LinkDatamap ldm)
      • removeStyles

        public void removeStyles()
        Remove all UI styles of the field
      • addStyle

        public void addStyle​(FieldStyle style)
        Add a UI style to the field
        Parameters:
        style - Simple style
      • addStyle

        public void addStyle​(java.lang.String val,
                             java.lang.String min,
                             java.lang.String max,
                             java.lang.String style,
                             java.lang.String icon)
        Add a UI style to the field
        Parameters:
        val - Single value
        min - Min value
        max - Max value
        style - Style defined in CSS
        icon - Path to icon
      • getStyle

        public java.lang.String getStyle​(ObjectDB obj)
        Get field style for current value
        Parameters:
        obj - Object
        Returns:
        CSS style
      • getStyle

        public java.lang.String getStyle​(ObjectDB obj,
                                         java.lang.String val)
        Get field style for specified value
        Parameters:
        obj - Object
        val - Value
        Returns:
        CSS style
      • getImage

        public java.lang.String getImage​(ObjectDB obj,
                                         java.lang.String val)
        Get the image associated to the value
        Parameters:
        obj - Object
        val - Value
        Returns:
        image or empty string
      • getCalcExpr

        public java.lang.String getCalcExpr()
        Get the expression to calculate the field value
      • setCalcExpr

        public void setCalcExpr​(java.lang.String e)
      • eval

        public java.lang.String eval​(ObjectDB obj,
                                     int context)
        Calculated field evaluation on current selected item
        Parameters:
        obj - object
        context - Context
        Returns:
        Evaluated field value
      • eval

        public java.lang.String eval​(ObjectDB obj,
                                     int context,
                                     java.lang.String[] row)
        Calculated field evaluation
        Parameters:
        obj - object
        row - a record of list (or null to use a selected record)
        context - Context
        Returns:
        Evaluated field value
      • toJSON

        public java.lang.String toJSON()

        Serialize field to JSON

      • toJSON

        @Deprecated
        public java.lang.String toJSON​(Grant g,
                                       boolean inlineDocs,
                                       boolean inlineThumbs,
                                       boolean inlineObjs,
                                       boolean copy)
        Deprecated.
      • toJSON

        public java.lang.String toJSON​(Grant g,
                                       Parameters.InlineParam inlines,
                                       boolean copy)

        Serialize field to JSON

        Parameters:
        inlines - Inline documents options
        copy - true to get a copy of documents
      • toJSONObject

        public org.json.JSONObject toJSONObject()
        Generates a JSON object representation of the field
        Returns:
        field as JSON object
      • toString

        public java.lang.String toString()
        Generates a string representation of the field
        Overrides:
        toString in class java.lang.Object
        Returns:
        field as string