Class ObjectField

  • All Implemented Interfaces:
    java.io.Serializable

    public class ObjectField
    extends java.lang.Object
    implements java.io.Serializable
    Object 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)
      Set value 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
      java.lang.String addValue​(java.lang.String value)
      Add a value to enum multiple (or set value on other types)
      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()
      Deprecated, for removal: This API element is subject to removal in a future version. 
      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()
      Get field value as a Boolean object
      boolean getBoolean​(boolean defValue)
      Get 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()
      Get confidentiality cassification
      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()
      Get field value as a Date object
      java.util.Date getDate​(java.util.Date defValue)
      Get field value as a Date object (with default value)
      java.lang.String getDBName()
      Get the physical column name (same as getColumn)
      java.math.BigDecimal getDecimal()
      Get field value as a BigDecimal object
      java.math.BigDecimal getDecimal​(java.math.BigDecimal defValue)
      Get field value as BigDecimal object (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()
      Get previous display value (applies only to list of values values)
      java.lang.String getDisplayOldValue​(Grant g)
      Get previous display value (applies also to user related formats : date, ...)
      java.lang.String getDisplayValue()
      Get the display value for current value (only applies to list of values)
      java.lang.String getDisplayValue​(Grant g)
      Get the display current value for current 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)
      java.lang.String getDocIndex()
      Set the bookshelf name (from DocIndex)
      DocumentDB getDocument()
      Document(s) extended data in memory.
      DocumentDB getDocument​(Grant g)
      Load and get the document's extended data
      DocumentDB getDocuments​(ObjectCore obj, java.lang.String rowId)
      Deprecated. 
      java.lang.Double getDouble()
      Field value as a Double object
      double getDouble​(double defValue)
      Get field value as a 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
      static java.lang.String getFieldTypeName​(java.lang.String typeId)
      Get field type name from rowId
      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()
      Get field value as a Float object
      float getFloat​(float defValue)
      Get field value as a 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
      static java.lang.String getId​(java.lang.String name)
      Get field rowId from name
      java.lang.String getImage​(ObjectDB obj, java.lang.String val)
      Get the image associated to the value
      java.lang.String getIncrementPattern()
      Get increment expression
      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()
      Get field value as an Integer object
      int getInt​(int defValue)
      Get field value as a raw integer (with default value)
      java.lang.String getJoinedObjectName()
      Joined object name (only set on foreign ID)
      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
      java.util.List<DocumentDB> getListOfDocuments​(ObjectCore obj, java.lang.String rowId)
      Get multi-documents extended data
      int getListOperator()
      Get the operator on lists LIST_*
      java.lang.String getListOperatorValue()
      Get current value of list operation (sum, avg, min/max...).
      java.lang.Long getLong()
      Get field value as a Long object
      long getLong​(long defValue)
      Get field value as a 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
      static java.lang.String getName​(java.lang.String rowId)
      Get field name from rowId
      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()
      Get field old value as a Boolean object
      java.lang.String getOldCode()
      Deprecated.
      Use getOldValue
      java.util.Date getOldDate()
      Get field old value as a Date object
      java.math.BigDecimal getOldDecimal()
      Get field old value as a BigDecimal object
      DocumentDB getOldDocument()
      Get old document
      java.lang.Double getOldDouble()
      Get field old value as a Double object
      java.lang.Float getOldFloat()
      Get field old value as a Float object
      java.lang.Integer getOldInt()
      Get field old value as an Integer object
      java.lang.Long getOldLong()
      Get field old value as a Long object
      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
      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
      java.lang.String getRefFilters()
      Get search filters applied to link
      org.json.JSONObject getRefFilters​(ObjectDB obj)
      Get search filters applied to link
      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()
      Set the regular expression for a regular expression type field
      java.lang.String getRegExpMethod()
      Get method name to call for a regular expression type field (null=none)
      java.lang.String getRegExpMsg()
      Get message associated to regular expression type
      java.lang.String getRegName()
      Get the name of a regular expression type 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 getSQLValue​(java.lang.String value)
      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, for removal: This API element is subject to removal in a future version.
      Use getStateTransition(name).getAction()
      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)
      boolean hasMenuList()
      Has ENUM menu list?
      boolean hasMenuListReferenced()
      Has ENUM menu list from referenced object?
      boolean hasMenuTray()
      Has ENUM menu tray?
      boolean hasSpeechRecognition()
      Has speech recognition on UI?
      boolean hasSpeechSynthesis()
      Has speech synthesis on UI?
      java.lang.String increment​(ObjectDB obj, java.lang.String nextId, java.lang.String incrementPattern)
      Increment field value by 1 based on pattern at Creation
      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 or image ?
      boolean isEmpty()
      Shorthand to check is a field value is null or empty (using Tool.isEmpty())
      boolean isExportable()
      Is exportable?
      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?
      short isFilterFixed()
      Is the filter fixed for the user?
      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 isMonoDocument()
      Is a mono-document field?
      boolean isMore()
      Is field an extended field in form
      boolean isMultiDocuments()
      Is a multi-documents field?
      boolean isNumeric()
      Is type a numeric (in storage) ?
      boolean isOldEmpty()
      Shorthand to check is a field old value is null or empty (using Tool.isEmpty())
      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 if a field 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 isString()
      Is the field a string?
      static boolean isString​(int type)
      Is the type a plain string type?
      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)
      Load the field definition from repository
      void load​(java.lang.String name, Grant g, ObjectDB obj)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Use load without object argument
      DocumentDB loadDocuments​(ObjectCore obj, java.lang.String rowId)
      Load and get multi-documents extended data
      void loadList​(ObjectDB obj, java.lang.String name, Grant g)
      Loads the list of values
      void loadList​(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
      java.lang.String removeValue​(java.lang.String value)
      Remove a value to enum multiple (or reset value on other types)
      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.
      Use setAutoComplete with char argument (one of the AUTO_COMPLETE_* constants)
      void setAutoComplete​(char auto)
      Set the field to use auto-completion
      void setBoolean​(boolean b)
      Set vaelue from a boolean
      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)
      Set confidentiality cassification
      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)
      Set value from a date
      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 setDocIndex​(java.lang.String n)
      Set the bookshelf name (from DocIndex)
      void setDocument​(DocumentDB doc)
      Set document(s)
      void setDocument​(ObjectCore obj, java.lang.String name, byte[] data)
      Set a single document
      void setDocument​(ObjectCore obj, java.lang.String name, java.io.InputStream in)
      Set a single document
      void setDouble​(double d)
      Set value from a double, decimal separator is ".", without exponent representation
      Example : field length=13 and precision=2, setDouble(123456789.5678) = "123456789.57"
      void setExportable​(boolean exportable)
      Set exportable
      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 setFilterFixed​(short fixed)
      Set the fixed filter
      void setFilterObject​(java.lang.String object, java.lang.String filter)
      Set a filter of a meta-object field (helper for object#filter syntax)
      void setFloat​(float f)
      Set value from a double, decimal separator is ".", without exponent representation
      Example : field length=13 and precision=2, setDouble(123456789.5678) = "123456789.57"
      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 setIncrementPattern​(java.lang.String i)
      Set increment expression
      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)
      Set value from an integer
      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)
      Set value from a long integer
      void setMenuList​(boolean b)
      Set ENUM menu list
      void setMenuListReferenced​(boolean b)
      Set ENUM menu list from referenced object
      void setMenuTray​(boolean b)
      Set ENUM menu tray
      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 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 setRefFilters​(java.lang.String filters)
      Set search filters applied to link
      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 exp)
      Get the regular expression for a regular expression type field
      void setRegExpMethod​(java.lang.String meth)
      Set method name to call for a regular expression type field (null=none)
      void setRegExpMsg​(java.lang.String msg)
      Set message associated to regular expression type
      void setRegName​(java.lang.String name)
      Set the name of a regular expression type field
      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.
      Use setRootField with object attribute
      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 setSize​(int s)
      Set field max size
      void setSortType​(char type)
      Set the field search type SORT_*
      void setSpeechRecognition​(boolean b)
      Allows speech recognition on UI
      void setSpeechSynthesis​(boolean b)
      Allows speech synthesis on UI
      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 (equivalent to setDocument)
      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, boolean old, java.lang.String path)
      Serialize field to JSON
      org.json.JSONObject toJSONObject()
      Generates a partial 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
      • TYPES

        public static final java.lang.String[] TYPES
        Types
      • 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_HORIZONTAL

        public static final java.lang.String RENDERING_HORIZONTAL
        Rendering horizontal check/radio
        See Also:
        Constant Field Values
      • RENDERING_VERTICAL

        public static final java.lang.String RENDERING_VERTICAL
        Rendering vertical check/radio
        See Also:
        Constant Field Values
      • RENDERING_PILLBOX

        public static final java.lang.String RENDERING_PILLBOX
        Rendering pillbox
        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
      • RENDERING_MULTI_DOC_BOX

        public static final java.lang.String RENDERING_MULTI_DOC_BOX
        Rendering multi-doc with boxes
        See Also:
        Constant Field Values
      • RENDERING_MULTI_DOC_LIST

        public static final java.lang.String RENDERING_MULTI_DOC_LIST
        Rendering multi-doc with list
        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
      • FIXED_FILTER_NOT

        public static final short FIXED_FILTER_NOT
        Not a fixed filter
        See Also:
        Constant Field Values
      • FIXED_FILTER_READ

        public static final short FIXED_FILTER_READ
        Fixed filter: readable on UI
        See Also:
        Constant Field Values
      • FIXED_FILTER_HIDE

        public static final short FIXED_FILTER_HIDE
        Fixed filter: hidden on UI
        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)
        Load the field definition from repository
        Parameters:
        name - Field name
        g - User rights
      • load

        @Deprecated(forRemoval=true,
                    since="4.0")
        public void load​(java.lang.String name,
                         Grant g,
                         ObjectDB obj)
        Deprecated, for removal: This API element is subject to removal in a future version.
        Use load without object argument
      • 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
      • getName

        public static java.lang.String getName​(java.lang.String rowId)
        Get field name from rowId
        Parameters:
        rowId - Row Id
        Returns:
        field name if exists
      • getId

        public static java.lang.String getId​(java.lang.String name)
        Get field rowId from name
        Parameters:
        name - Field name
        Returns:
        row Id if exists
      • getFieldTypeName

        public static java.lang.String getFieldTypeName​(java.lang.String typeId)
        Get field type name from rowId
        Parameters:
        typeId - Type row Id
        Returns:
        field type name if exists
      • 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
      • hasMenuTray

        public boolean hasMenuTray()
        Has ENUM menu tray?
      • setMenuTray

        public void setMenuTray​(boolean b)
        Set ENUM menu tray
      • hasMenuList

        public boolean hasMenuList()
        Has ENUM menu list?
      • setMenuList

        public void setMenuList​(boolean b)
        Set ENUM menu list
      • hasMenuListReferenced

        public boolean hasMenuListReferenced()
        Has ENUM menu list from referenced object?
      • setMenuListReferenced

        public void setMenuListReferenced​(boolean b)
        Set ENUM menu list from referenced object
      • 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)
      • hasSpeechRecognition

        public boolean hasSpeechRecognition()
        Has speech recognition on UI?
      • setSpeechRecognition

        public void setSpeechRecognition​(boolean b)
        Allows speech recognition on UI
      • hasSpeechSynthesis

        public boolean hasSpeechSynthesis()
        Has speech synthesis on UI?
      • setSpeechSynthesis

        public void setSpeechSynthesis​(boolean b)
        Allows speech synthesis on UI
      • 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
      • isExportable

        public boolean isExportable()
        Is exportable?
        Returns:
        True if exportable
      • setExportable

        public void setExportable​(boolean exportable)
        Set exportable
        Parameters:
        exportable - Exportable?
      • getVisible

        @Deprecated(forRemoval=false,
                    since="3.x")
        public int getVisible()
        Deprecated.
        use getVisibility
      • setVisible

        @Deprecated(forRemoval=false,
                    since="3.x")
        public void setVisible​(int v)
        Deprecated.
        use setVisibility
      • getVisibleDefault

        @Deprecated(forRemoval=false,
                    since="3.x")
        public int getVisibleDefault()
        Deprecated.
        use getVisibilityDefault
      • setVisibleDefault

        @Deprecated(forRemoval=false,
                    since="3.x")
        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(forRemoval=false,
                    since="3.x")
        public final boolean isUpdatableInList()
        Deprecated.
        Use isUpdatableOnList
      • isUpdatableOnList

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

        @Deprecated(forRemoval=false,
                    since="3.x")
        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(forRemoval=false,
                    since="4.0")
        public void setAutoComplete​(boolean b)
        Deprecated.
        Use setAutoComplete with char argument (one of the AUTO_COMPLETE_* constants)
      • setAutoComplete

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

        public DocumentDB getDocument()
        Document(s) extended data in memory. If not set, use getDocument(Grant) to load first a single document, or loadDocuments(obj,rowId) to load a multi-docs field.
        Returns:
        Top level document (mono or with multiple docs)
      • getDocument

        public DocumentDB getDocument​(Grant g)
        Load and get the document's extended data
        Parameters:
        g - Grant
        Returns:
        Simple document or null if the field is multi-documents
      • getDocuments

        @Deprecated
        public DocumentDB getDocuments​(ObjectCore obj,
                                       java.lang.String rowId)
        Deprecated.
        Renamed to loadDocuments
      • loadDocuments

        public DocumentDB loadDocuments​(ObjectCore obj,
                                        java.lang.String rowId)
        Load and get multi-documents extended data
        Parameters:
        obj - Object
        rowId - Object row ID
        Returns:
        Document containing all documents or null if the field is mono-document
      • getListOfDocuments

        public java.util.List<DocumentDB> getListOfDocuments​(ObjectCore obj,
                                                             java.lang.String rowId)
        Get multi-documents extended data
        Parameters:
        obj - Object
        rowId - Object row ID
        Returns:
        List of documents or null
      • setDocument

        public void setDocument​(DocumentDB doc)
        Set document(s)
        Parameters:
        doc - Document (mono or multiple)
      • setDocument

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

        public void setDocument​(ObjectCore obj,
                                java.lang.String name,
                                java.io.InputStream in)
        Set a single document
        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(forRemoval=false,
                    since="3.x")
        public boolean isFonctId()
        Deprecated.
        Use isFunctId
      • isFunctId

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

        @Deprecated(forRemoval=false,
                    since="3.x")
        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 (sum, avg, min/max...). The value is set by the ObjectDB.getCount()
      • 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
      • getFloatPrecision

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

        public void setFloatPrecision​(int p)
        Set field precision (float decimals)
      • 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).
        - In case of textarea h=0 means autosize to fit content
        - Use explicitly wf+hf or wl+hl to specify form or list size only.
        - Slider rendering with min/max and optional step
        - Stars rendering with number of stars
        - Document with max upload size
        Parameters:
        m - Number or w=number h=number, or wf=number hf=number wl=number hl=number, or min=number max=number step=number
      • getType

        public int getType()
        Get field type
      • setType

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

        public static boolean isString​(int type)
        Is the type a plain string type?
        Returns:
        True if the type is a plain string type (short string, regular expression, long string, HTML content, or notepad)
      • isString

        public boolean isString()
        Is the field a string?
        Returns:
        True if the field is a string (short string, regular expression, long string, HTML content or notepad)
      • 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 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​(java.lang.String name,
                             Grant g)
        Loads the list of values
        Parameters:
        name - List name
        g - User rights
      • loadList

        public void loadList​(ObjectDB obj,
                             java.lang.String name,
                             Grant g)
        Loads the list of values
        Parameters:
        obj - Optional object to load linked lists
        name - List name
        g - User rights
      • 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(forRemoval=true,
                    since="4.0")
        public Action getStateTransitionAction​(java.lang.String fromState,
                                               java.lang.String toState)
        Deprecated, for removal: This API element is subject to removal in a future version.
        Use getStateTransition(name).getAction()
      • 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 ?
      • getIncrementPattern

        public java.lang.String getIncrementPattern()
        Get increment expression
      • setIncrementPattern

        public void setIncrementPattern​(java.lang.String i)
        Set increment expression
      • increment

        public java.lang.String increment​(ObjectDB obj,
                                          java.lang.String nextId,
                                          java.lang.String incrementPattern)
        Increment field value by 1 based on pattern at Creation
        Parameters:
        obj - optional object in case of Simplicite Expression in increment pattern
        nextId - value to be set as increment
        incrementPattern - Increment pattern
        Returns:
        Incremented value of field
      • 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
      • getRefFilters

        public java.lang.String getRefFilters()
        Get search filters applied to link
      • getRefFilters

        public org.json.JSONObject getRefFilters​(ObjectDB obj)
        Get search filters applied to link
        Parameters:
        obj - Current valued parent object
      • setRefFilters

        public void setRefFilters​(java.lang.String filters)
        Set search filters applied to link
        Parameters:
        filters - JSON syntax with tokens to substitute ex [VALUE:parentField]
      • 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(forRemoval=false,
                    since="4.0")
        public void setRootField()
        Deprecated.
        Use setRootField with object attribute
      • setRootField

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

        public ObjectField getRootField()
        Root parent field
      • getJoinedObjectName

        public java.lang.String getJoinedObjectName()
        Joined object name (only set on foreign ID)
      • getDataMap

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

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

        public java.lang.String getDocIndex()
        Set the bookshelf name (from DocIndex)
      • setDocIndex

        public void setDocIndex​(java.lang.String n)
        Set the bookshelf name (from DocIndex)
      • isMonoDocument

        public boolean isMonoDocument()
        Is a mono-document field?
        Returns:
        True if the Document is unique (rendering unique)
      • isMultiDocuments

        public boolean isMultiDocuments()
        Is a multi-documents field?
        Returns:
        True if the Document is multiple (rendering multiple)
      • setFilterFixed

        public void setFilterFixed​(short fixed)
        Set the fixed filter
        Parameters:
        fixed - FIXED_FILTER_NOT|READ|HIDE
      • isFilterFixed

        public short isFilterFixed()
        Is the filter fixed for the user?
        Returns:
        FIXED_FILTER_NOT|READ|HIDE
      • getFilter

        public java.lang.String getFilter()
        Get field filter (% means no filter)
      • 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)'
      • setFilterObject

        public void setFilterObject​(java.lang.String object,
                                    java.lang.String filter)
        Set a filter of a meta-object field (helper for object#filter syntax)
        Parameters:
        object - Optional object name (null means keep current object)
        filter - Optional filter (null means keep current filter)
      • 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(forRemoval=false,
                    since="4.0")
        public int getInitialOrder()
        Deprecated.
        Use getOrderDefault
      • getDefaultOrder

        @Deprecated(forRemoval=false,
                    since="4.0")
        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(forRemoval=false,
                    since="4.0")
        public void setInitialOrder​(int i)
        Deprecated.
        Use setDefaultOrder
      • setDefaultOrder

        @Deprecated(forRemoval=false,
                    since="4.0")
        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()
        Get confidentiality cassification
        Returns:
        Confidentiality classification
      • setClassification

        public void setClassification​(java.lang.String c)
        Set confidentiality cassification
        Parameters:
        c - Confidentiality classification
      • addNotepad

        public void addNotepad​(java.lang.String fullname,
                               java.lang.String text)
        Set value to notepad. Uses old value to get notepad history and prepends the new note.
        Parameters:
        fullname - User full name
        text - Text to prepend with date and user name
      • delNotepad

        @Deprecated(forRemoval=true,
                    since="3.x")
        public void delNotepad()
        Deprecated, for removal: This API element is subject to removal in a future version.
        Delete text from notepad
      • setDate

        public void setDate​(java.util.Date d)
        Set value from a date
        Parameters:
        d - Date value
      • setLong

        public void setLong​(long l)
        Set value from a long integer
        Parameters:
        l - Long integer value
      • setInt

        public void setInt​(int i)
        Set value from an integer
        Parameters:
        i - Integer value
      • setDouble

        public void setDouble​(double d)
        Set value from a double, decimal separator is ".", without exponent representation
        Example : field length=13 and precision=2, setDouble(123456789.5678) = "123456789.57"
        Parameters:
        d - Double value
      • setFloat

        public void setFloat​(float f)
        Set value from a double, decimal separator is ".", without exponent representation
        Example : field length=13 and precision=2, setDouble(123456789.5678) = "123456789.57"
        Parameters:
        f - Float value
      • setBoolean

        public void setBoolean​(boolean b)
        Set vaelue from a boolean
        Parameters:
        b - Boolean value
      • 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 (equivalent to setDocument)
        Parameters:
        doc - Document
      • getOldCode

        @Deprecated(forRemoval=false,
                    since="4.0")
        public final java.lang.String getOldCode()
        Deprecated.
        Use getOldValue
      • getOldValue

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

        public void setOldValue​(java.lang.String value)
        Set previous value
        Parameters:
        value - Previous value
      • getDisplayOldValue

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

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

        public boolean hasChanged()
        Check whether the field value has changed (it performs a type-aware comparison between current value and old value)
        Returns:
        True if the field value has changed
      • getRegName

        public java.lang.String getRegName()
        Get the name of a regular expression type field
        Returns:
        Regular expression name
      • setRegName

        public void setRegName​(java.lang.String name)
        Set the name of a regular expression type field
        Parameters:
        name - Regular expression name
      • getRegExp

        public java.lang.String getRegExp()
        Set the regular expression for a regular expression type field
        Returns:
        Expression
      • setRegExp

        public void setRegExp​(java.lang.String exp)
        Get the regular expression for a regular expression type field
        Parameters:
        exp - Expression
      • getRegExpMethod

        public java.lang.String getRegExpMethod()
        Get method name to call for a regular expression type field (null=none)
        Returns:
        Method name
      • setRegExpMethod

        public void setRegExpMethod​(java.lang.String meth)
        Set method name to call for a regular expression type field (null=none)
        Parameters:
        meth - Method name
      • getRegExpMsg

        public java.lang.String getRegExpMsg()
        Get message associated to regular expression type
        Returns:
        Message
      • setRegExpMsg

        public void setRegExpMsg​(java.lang.String msg)
        Set message associated to regular expression type
        Parameters:
        msg - Message
      • getValue

        public java.lang.String getValue()
        Get the field value
        Returns:
        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
      • getSQLValue

        public java.lang.String getSQLValue​(java.lang.String value)

        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 for current value (only applies to list of values)
        Returns:
        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
        Returns:
        Display 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)
        Returns:
        Display value
      • getDisplayValue

        public final java.lang.String getDisplayValue​(Grant g)
        Get the display current value for current value (applies also user related formats : dates, ...)
        Parameters:
        g - User rights
        Returns:
        Display value
      • 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
        Returns:
        Display 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
      • addValue

        public java.lang.String addValue​(java.lang.String value)
        Add a value to enum multiple (or set value on other types)
        Parameters:
        value - code to add
        Returns:
        new value
      • removeValue

        public java.lang.String removeValue​(java.lang.String value)
        Remove a value to enum multiple (or reset value on other types)
        Parameters:
        value - code to remove
        Returns:
        new value
      • getDate

        public java.util.Date getDate()
        Get field value as a Date object
        Returns:
        Field value as a Date object or null if null or empty
      • getDate

        public java.util.Date getDate​(java.util.Date defValue)
        Get field value as a Date object (with default value)
        Parameters:
        defValue - Default value
        Returns:
        Field value as a Date object or default value if null or empty
      • getOldDate

        public java.util.Date getOldDate()
        Get field old value as a Date object
        Returns:
        Field old value as a Date object or null if null or empty
      • getInt

        public java.lang.Integer getInt()
        Get field value as an Integer object
        Returns:
        Field value as an Integer object or Integer(0) if null or empty
      • getInt

        public int getInt​(int defValue)
        Get field value as a raw integer (with default value)
        Parameters:
        defValue - Default value
        Returns:
        Field value as a raw integer or default value if null or empty
      • getOldInt

        public java.lang.Integer getOldInt()
        Get field old value as an Integer object
        Returns:
        Field old value as an Integer object or Integer(0) if null or empty
      • getLong

        public java.lang.Long getLong()
        Get field value as a Long object
        Returns:
        Field value as a Long object or Long(0) if null or empty
      • getLong

        public long getLong​(long defValue)
        Get field value as a raw long (with default value)
        Parameters:
        defValue - Default value
        Returns:
        Field value as a raw long or default value if null or empty
      • getOldLong

        public java.lang.Long getOldLong()
        Get field old value as a Long object
        Returns:
        Field old value as a Long object or Long(0) if null or empty
      • getDouble

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

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

        public java.lang.Double getOldDouble()
        Get field old value as a Double object
        Returns:
        Field old value as a Double object or Double(0) if null, empty or non double (generates a log message in that case)
      • getFloat

        public java.lang.Float getFloat()
        Get field value as a Float object
        Returns:
        Field value as a Float object or Float(0) if null, empty or non float (generates a log message in that case)
      • getFloat

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

        public java.lang.Float getOldFloat()
        Get field old value as a Float object
        Returns:
        Field old value as a Float object or Float(0) if null, empty or non float (generates a log message in that case)
      • getDecimal

        public java.math.BigDecimal getDecimal()
        Get field value as a BigDecimal object
        Returns:
        Field value as a BigDecimal object 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)
        Get field value as BigDecimal object (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()
        Get field old value as a BigDecimal object
        Returns:
        Field old value as a BigDecimal object or BigDecimal(0) if null, empty or non decimal (generates a log message in that case)
      • getBoolean

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

        public boolean getBoolean​(boolean defValue)
        Get 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()
        Get field old value as a Boolean object
        Returns:
        Field old value as a Boolean object 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 (using Tool.isEmpty())
        Returns:
        True if the value is null or empty
      • isOldEmpty

        public boolean isOldEmpty()
        Shorthand to check is a field old value is null or empty (using Tool.isEmpty())
        Returns:
        True if the old value is null or empty
      • isFilterEmpty

        public boolean isFilterEmpty()
        Shorthand to check is a field filter is null or empty or default search filter
        Returns:
        True if the field filter is null or empty or equals to the default search filter
      • isPersistent

        public boolean isPersistent()
        Shorthand to check if a field is persistent
        Returns:
        True if the field 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(forRemoval=false,
                    since="5")
        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,
                                       boolean old,
                                       java.lang.String path)

        Serialize field to JSON

        Parameters:
        inlines - Inline documents options
        copy - true to get a copy of documents
        old - true to get old values
        path - optional relative path to export field in a mapped directory
      • toJSONObject

        public org.json.JSONObject toJSONObject()
        Generates a partial 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