Class ObjectCore

  • All Implemented Interfaces:
    com.simplicite.util.engine.CacheInterface, java.io.Serializable
    Direct Known Subclasses:
    ObjectDB

    public abstract class ObjectCore
    extends java.lang.Object
    implements java.io.Serializable, com.simplicite.util.engine.CacheInterface
    Core business object without outsourced services
    See Also:
    Serialized Form
    • Constructor Summary

      Constructors 
      Constructor Description
      ObjectCore()  
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods 
      Modifier and Type Method Description
      void addAgenda​(Agenda a)
      Add one agenda
      void addCrosstab​(Crosstab ctb)
      Add pivot table
      void addDataMap​(java.util.List<Datamap> map)
      Add data mapping
      void addDefaultValues()
      Adds default values on empty values (useful at creation)
      void addLinkDataMap​(LinkDatamap map)
      Deprecated.
      Do not use, deported in FK
      void addListOperationField​(ObjectField f)
      Add a field for list operations
      void addMenuListField​(java.lang.String field)
      Add enum field with list access.
      void addMenuTrayField​(java.lang.String field)
      Add enum field with tray access on the menu.
      void addPlaceMap​(PlaceMap p)
      Add one place map
      void addPredefinedSearch​(PredefinedSearch ps)
      Add a predefined search
      void addPrintTemplate​(PrintTemplate prt)
      Add publication template
      void addReflexiveLink​(Link link)
      Add reflexive link
      void addResource​(java.lang.String name, Resource r)
      Add object resource
      void addScript​(SharedScript s)
      Add an inherited server script
      void addSharedScript​(SharedScript s)
      Add a shared server script
      void addTimesheet​(Timesheet t)
      Add one timesheet
      java.lang.String buildInsertSQL​(int dbvendor, java.util.List<java.lang.String[]> rows)
      Generate insert SQL statement
      boolean canClose()
      Allow close form ?
      boolean canCopy()
      Allow copy ?
      boolean canCreateOnLink​(ObjectField refField)
      Allow create on specific link ?
      boolean canCreateOnLinks()
      Allow create on links ?
      boolean canDeleteAll()
      Allow bulk delete ?
      boolean canExport()
      Allow export ?
      boolean canExportTimestamp()
      Is export allowed for timestamp fields?
      boolean canFollowLink​(ObjectDB inlineObject)
      Allow follow a specific link ?
      boolean canFollowLink​(ObjectField refField)
      Allow follow a specific link ?
      boolean canFollowLinks()
      Allow follow links ?
      boolean canGroupByFields()
      Can group by field on list (itself and contains group by fields)?
      boolean canListAccessNewForm()
      Allow list to access new form ?
      boolean canListAccessNewLine()
      Allow list to add one row on list ?
      boolean canListAccessNewLoop()
      Allow list to add row on list in loop ?
      boolean canPreview​(ObjectField f, DocumentDB doc)
      Hook to limit access to Document preview
      boolean canPrint()
      Can print?
      boolean canSave()
      Allow save form ?
      boolean canSaveAndClose()
      Allow save/close form ?
      boolean canSaveAndCopy()
      Allow save/copy form ?
      boolean canSaveAndNew()
      Allow save/new form ?
      boolean canSelectRow()
      Can select record on object list ?
      boolean canUpdateAll()
      Allow bulk update ?
      void checkExpression​(java.lang.String expr)
      Prepares an expression and apply structural and elementary syntax checks, this method is only intended to this basic usage
      void clearMenuTrayFields()
      Clear enum fields with tray access.
      java.lang.String convertFilterToService​(ObjectField f, java.lang.String filter)  
      java.lang.String convertGuiToService​(ObjectField f, java.lang.String value)  
      java.lang.String convertServiceToFilter​(ObjectField f, java.lang.String filter)  
      java.lang.String convertServiceToGui​(ObjectField f, java.lang.String value)  
      void destroy()
      Remove the instance in the user's session
      void enableGC​(boolean enabled)
      Enable or disable the internal GC
      java.lang.Object evalExpression​(java.lang.String expr, int context)
      Prepare and evaluate an expression (see prepareExpression for details on tokens)
      java.lang.Object evalExpression​(java.lang.String expr, int context, java.lang.String[] row)
      Prepare and evaluate an expression (see prepareExpression for details on tokens)
      java.lang.Object evalExpression​(java.lang.String expr, int context, java.lang.String[] row, java.util.Map<java.lang.String,​java.lang.Object> in, java.util.Map<java.lang.String,​java.lang.Object> out)
      Prepare and evaluate an expression (see prepareExpression for details on tokens)
      java.lang.Object evalExpression​(java.lang.String expr, int context, java.util.Map<java.lang.String,​java.lang.Object> in, java.util.Map<java.lang.String,​java.lang.Object> out)
      Prepare and evaluate an expression (see prepareExpression for details on tokens)
      java.lang.String evalInputDisplayOldValue​(java.lang.String input)
      Substitutes input field display old value
      java.lang.String evalInputDisplayValue​(java.lang.String input, java.lang.String[] row)
      Substitutes input field display value
      java.lang.String evalInputOldValue​(java.lang.String input)
      Substitutes input field old value
      java.lang.String evalInputValue​(java.lang.String input, java.lang.String[] row)
      Substitutes input field value
      java.lang.String filtersToJson​(boolean reset, boolean limited)
      JSON filters in service format
      void freeListTree()
      Set stored tree in memory
      boolean garbageCollection()
      Garbage collection of dynamic data
      Action genAction​(java.lang.String name, char type, java.lang.String label, java.lang.String img, int pos, boolean enabled, boolean plus, int count)
      Generate a common action (internal usage)
      void genCommonActions()
      Generate common Actions: Reload, Preference, Export, Delete...
      Action getAction​(java.lang.String name)
      Get specified action
      java.util.List<Action> getActions()
      Get all action
      Agenda getAgenda​(java.lang.String a)
      Get one agenda
      java.util.Map<java.lang.String,​Agenda> getAgendas()
      Get all agendas
      java.lang.String getAlias()
      Get alias (or null if no alias is defined)
      boolean getBooleanParameter​(java.lang.String name, boolean def)
      Gets one boolean parameter
      java.lang.String getCacheFrom()
      Set cached from statement
      java.lang.String getCacheKey​(Grant g)
      Get object unique cache key
      java.lang.String getCacheSelect()
      Set cached select statement
      java.lang.String getClassName()
      Get the object class name
      java.lang.String getCode​(java.lang.String field, java.lang.String displayValue)
      Get the code of the enumeration display value.
      java.lang.String[] getCodes()
      Deprecated, for removal: This API element is subject to removal in a future version.
      same as getValues()
      org.json.JSONObject getConfig()
      Get additional configuration
      ObjectField getConfirmField​(Action action, java.lang.String name)
      Get action confirm field
      java.lang.String getConfirmFieldValue​(Action action, java.lang.String name)
      Get action confirm field value
      ObjectContext getContext()
      Get current usage context (list, create, update...)
      java.lang.String getContextTitle​(int context)
      Contextual title to display
      java.lang.String getCopyId()
      Get row id of the item to copy
      java.lang.String getCreatedBy()
      Get the creator (login) of current record
      java.lang.String getCreatedDate()
      Get the created date of current record
      Crosstab getCrosstab​(java.lang.String name)
      Get pivot table
      java.util.Map<java.lang.String,​Crosstab> getCrosstabs()
      Get pivot tables
      java.lang.String getCtxHelp​(java.lang.String helpContext)
      Contextual help
      java.util.List<ObjectCtxHelp> getCtxHelps()
      Get contextual helps
      java.lang.String getCurrentAction()
      Get current custom action (null if no action)
      java.lang.String[] getCurrentItem()
      Get current list item in current page
      java.util.List<java.lang.String[]> getCurrentList()
      Get current list from the last search
      int getCurrentPage()
      Get current page number in list pagination
      int getCurrentPos()
      Get current list item position in current page
      java.lang.String getCurrentRowId()
      Get current item row id in current page
      FieldStateTransition getCurrentTransition()
      Get current transition (null if no transition during the save)
      java.lang.String getCurrentView()
      Get the current view
      com.simplicite.util.engine.ObjectData getData()
      Get core object meta data
      java.util.List<java.util.List<Datamap>> getDataMap()
      Get data mappings
      java.lang.String getDataSource()
      Get data source name
      int getDataSourceVendor()
      Get data source vendor
      ObjectField getDbField​(java.lang.String dbname)
      Deprecated.
      Use getDBField
      ObjectField getDBField​(java.lang.String dbname)
      Get a field from physical name
      int getDbIndex​(java.lang.String dbname)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Use getDBIndex
      int getDBIndex​(java.lang.String dbname)
      Get the field index from physical name.
      java.lang.String getDBName()
      Get physical name (same as getTable)
      java.lang.String getDefaultLink()
      Default view to display on object form
      java.lang.String getDefaultSearchSpec()
      Get the default search specification
      java.lang.String getDesc()
      Get description
      java.lang.String getDisplay()
      Get the object translation in current user language
      static java.lang.String getDisplay​(java.lang.String obj, java.lang.String lang)
      Get display label
      static java.lang.String getDisplay​(java.lang.String obj, java.lang.String lang, boolean plural)
      Get display label
      static java.lang.String getDisplayFromDB​(java.lang.String obj, java.lang.String lang, boolean plural)
      Get display label from database
      java.util.List<ObjectField> getDocFields()
      Get all document and image fields
      double getDoubleParameter​(java.lang.String name, double def)
      Gets one double parameter
      ObjectField getEndDateField()
      Get the optional end date field.
      ObjectField getField​(int index)
      Get field in indexed position
      ObjectField getField​(java.lang.String name)
      Get a field from logical name, can be either a simple name or input name or full input name.
      ObjectField getField​(java.lang.String name, boolean err)
      Get a field from logical name (can be either a simple name or input name or full input name).
      FieldArea getFieldArea​(int position)
      Gets field area for specified position
      FieldArea getFieldArea​(java.lang.String name)
      Gets field area for specified name
      FieldAreas getFieldAreas()
      Get ordered field areas
      ObjectField getFieldAtIndex​(int index)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Use getField
      ObjectField getFieldByObjectFieldId​(java.lang.String obfId)
      Get a field from an object field row ID
      ObjectField getFieldByTranslation​(java.lang.String display, boolean err)
      Get a field from its translation.
      java.lang.String getFieldDisplayOldValue​(ObjectField field)
      Get the current field display old value
      java.lang.String getFieldDisplayOldValue​(java.lang.String name)
      Get the current field display old value = shorthand for getField(name).getDisplayValue(getGrant())
      java.lang.String getFieldDisplayValue​(ObjectField field, java.lang.String[] row)
      Get the field display value for specified record row
      java.lang.String getFieldDisplayValue​(java.lang.String name)
      Get the current field display value = shorthand for getField(name).getDisplayValue(getGrant())
      java.lang.String getFieldDisplayValue​(java.lang.String name, java.lang.String[] row)
      Get the field display value for specified record row = shorthand for getField(name).getDisplayValue(getGrant(), row[getFieldIndex(name)])
      java.lang.String getFieldFilter​(java.lang.String name)
      Get a field filter = shorthand for getField(name).getFilter()
      ObjectField getFieldFromColumn​(java.lang.String column)
      Get a field from physical column name.
      ObjectField getFieldFromColumn​(java.lang.String column, boolean err)
      Get a field from physical column name.
      int getFieldIndex​(java.lang.String name)
      Get the field index from logical name (either simple name or input name or full input name)
      int getFieldIndex​(java.lang.String name, boolean err)
      Get the field index from logical name, either simple name or input name or full input name.
      java.lang.String getFieldOldValue​(ObjectField field)
      Get a field old value
      java.lang.String getFieldOldValue​(java.lang.String name)
      Get a field old value = shorthand for getField(name).getOldValue()
      int getFieldOrder​(java.lang.String name)
      Get a field order = shorthand for getField(name).getOrder()
      java.util.List<ObjectField> getFields()
      Get ordered fields
      java.util.List<ObjectField> getFields​(java.lang.String[] fields)
      Get specified fields list
      java.util.List<ObjectField> getFieldsByType​(int type, java.lang.String rendering)
      Search object fields with specified type and optional rendering.
      java.util.List<ObjectField> getFieldsDocument()
      Search document and image fields
      java.lang.String getFieldValue​(ObjectField field, java.lang.String[] row)
      Get the field value for specified record row
      java.lang.String getFieldValue​(java.lang.String name)
      Get the current field value = shorthand for getField(name).getValue()
      java.lang.String getFieldValue​(java.lang.String name, java.lang.String[] row)
      Get the field value for specified record row = shorthand for row[getFieldIndex(name)]
      static java.lang.String[] getFieldValues​(ObjectCore obj, java.util.List<java.lang.String[]> rows, ObjectField f)
      Get values of specified field from specified object data rows
      java.lang.String[] getFieldValues​(java.util.List<java.lang.String[]> rows, ObjectField f)
      Get values of specified field from object data rows
      ObjectFieldSearch[] getFilters()
      Get current filters
      static ObjectFieldSearch[] getFilters​(ObjectCore obj)
      Get current filters of specified object
      boolean getFlagParameter​(java.lang.String name)
      Gets one boolean flag parameter
      float getFloatParameter​(java.lang.String name, float def)
      Gets one float parameter
      java.util.List<ObjectField> getFonctId()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Use getFunctId
      java.util.List<ObjectField> getForeignKeys()
      List object foreign keys
      int getFormLayout()
      Get form layout.
      ObjectField getFullInput​(java.lang.String name)
      Get a field from logical full input name.
      ObjectField getFullInput​(java.lang.String name, boolean err)
      Get a field from logical full input name.
      int getFullInputIndex​(java.lang.String name)
      Get the field index from logical full input name
      int getFullInputIndex​(java.lang.String name, boolean err)
      Get the field index from logical full input name.
      java.util.List<ObjectField> getFunctId()
      Get functional keys fields.
      Grant getGrant()
      Get grant (user rights)
      java.util.List<ObjectField> getGroupByFields()
      Ordered fields to group in list
      java.lang.String getHelp()
      Get main object help
      java.lang.String getHistoricDBName()
      Get historic object physical name (table name)
      java.lang.String getHistoricName()
      Get historic object name
      java.lang.String getIconCode()
      Get icon code.
      java.lang.String getId()
      Get the object definition ID
      ObjectField getImageField()
      Get the first visible field containing an image
      int getIndex​(java.lang.String name)
      Deprecated.
      Use getFieldIndex
      int getIndex​(java.lang.String name, boolean err)
      Deprecated.
      Use getFieldIndex
      java.util.List<java.lang.String> getInheritedObjects()
      Get the inherited objects list
      ObjectField getInput​(java.lang.String name)
      Get a field from logical input name
      ObjectField getInput​(java.lang.String name, boolean err)
      Get a field from logical input name.
      ObjectField getInputAtIndex​(int index)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Use getField
      int getInputIndex​(java.lang.String name)
      Get the field index from logical input name.
      int getInputIndex​(java.lang.String name, boolean err)
      Get the field index from logical input name.
      java.lang.String getInstanceName()
      Get the object instance name
      int getIntParameter​(java.lang.String name, int def)
      Gets one integer parameter
      java.lang.String getLabel()
      Get the object translation in current user language (alias to getDisplay)
      java.lang.String getLastUpdatedBy()
      Get the last user (login) of current record
      java.lang.String getLastUpdatedDate()
      Get the last updated date of current record
      Link getLink​(java.lang.String childObject, java.lang.String refField)
      Get a link definition
      java.util.List<LinkDatamap> getLinkDataMap()
      Deprecated.
      Do not use, deported in FK
      java.util.List<Link> getLinks()
      Get all objects links
      java.lang.String getListEditMode()
      List edit mode
      java.util.List<ObjectField> getListOperationFields()
      Get fields for list operations
      char getListSearchMode()
      Get the search mode when search is accessible on embedded list
      int getListSize()
      Get page size of list
      ObjectNode getListTree()
      Get stored tree in memory
      java.lang.Object getLock()
      Get the lock to be used in synchronized blocks
      long getLongParameter​(java.lang.String name, long def)
      Gets one long parameter
      java.lang.String getMappedExportPath​(java.lang.String[] row)
      Get the mapped export file path
      java.lang.String getMappedFilePath​(ObjectField f)
      Get the mapped file path for specified field
      int getMaxPage()
      Get maximum pages in list pagination
      int getMaxRows()
      Get the list maximum size (for paginated search, default = the max rows of user's profile)
      java.util.List<java.lang.String> getMenuListFields()
      Get simple enum field with list access.
      char getMenuSearch()
      Deprecated, for removal: This API element is subject to removal in a future version.
      java.util.List<java.lang.String> getMenuTrayFields()
      Get simple enum field with tray access on the menu.
      int getMinRows()
      Get the list page minimum size (for paginated searches, default = the min rows of user's profile)
      java.lang.String getModuleId()
      Get the object module ID
      static java.lang.String getModuleId​(java.lang.String objectId)
      Retrieve the object's module ID from the object ID
      static java.lang.String getModuleIdByName​(java.lang.String objectName)
      Get object's module ID from the object name
      java.lang.String getModuleName()
      Get the object module name
      java.lang.String getName()
      Get the object name
      Notification getNotification​(java.lang.String name)
      Get notification by name
      java.util.List<Notification> getNotifications()
      Get list of object's notifications
      static java.lang.String getObjectId​(java.lang.String objectName)
      Get object ID from specified name
      ObjectLocation getObjectLocation()
      Get object location data
      static java.lang.String getObjectName​(java.lang.String objectId)
      Get object name from specified ID
      java.lang.Object getObjectParameter​(java.lang.String name)
      Gets one object parameter
      static java.lang.String getObjectTable​(java.lang.String objectId)
      Get object table from specified ID
      java.lang.String getOldStatus()
      Gets the previous status field value (only relevant if the object is a state model object).
      java.lang.String[] getOldValues()
      Get current old values
      static java.lang.String[] getOldValues​(ObjectCore obj)
      Get current old values of specified object
      int getPageSize()
      Alias to getListSize()
      java.lang.String getParameter​(java.lang.String name)
      Gets a text parameter
      java.lang.String getParameter​(java.lang.String name, java.lang.String def)
      Gets a text parameter
      java.util.Map<java.lang.String,​java.io.Serializable> getParameters()
      Gets all parameters
      ObjectField getParentField​(ObjectCore parent, ObjectField childField)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Outdated, do not use
      int getParentIdx()
      Search an index of one field that references the object.
      ObjectCore getParentObject()
      Get the contextual parent object for child lists
      java.lang.String getParentObjectRefField()
      Get the child field that references parent object for child lists
      java.lang.String[] getParentValues()
      Get parent values (used to limit search in where clause)
      PlaceMap getPlaceMap​(java.lang.String p)
      Get one place map
      java.util.Map<java.lang.String,​PlaceMap> getPlaceMaps()
      Get all place maps
      java.lang.String getPluralDisplay()
      Get the plural object translation in current user language
      java.lang.String getPluralLabel()
      Get the plural object translation in current user language (alias to getPluralDisplay)
      java.util.List<PredefinedSearch> getPredefinedSearch()
      Deprecated.
      Use the getPredefinedSearches
      PredefinedSearch getPredefinedSearch​(int index)
      Get predefined search by index
      PredefinedSearch getPredefinedSearch​(java.lang.String id)
      Get predefined search by Id
      java.util.List<PredefinedSearch> getPredefinedSearches()
      Hook to get accessible predefined searches.
      int getPredefinedSearchIndex()
      Get selected predefined search
      int getPredefinedSearchIndex​(java.lang.String id)
      Get predefined search index by id
      PredefinedSearch getPredefinedSearchSelected()
      Get selected predefined search on UI
      int getPredefSearch()
      Use predefined search ?
      PrintTemplate getPrintTemplate​(java.lang.String name)
      Get publication template
      java.util.Map<java.lang.String,​PrintTemplate> getPrintTemplates()
      Get publication templates
      ObjectField getRefField​(ObjectField f)
      Should not be used.
      java.util.List<ObjectField> getRefFields​(java.lang.String object)
      List foreign-key fields to object
      Link getReflexiveLink​(boolean hasDepth)
      Get first reflexive link with depth to show
      java.util.List<Link> getReflexiveLinks()
      Get all reflexive links
      java.util.Map<java.lang.String,​java.util.List<ObjectField>> getRefObjects()
      List all referenced objects
      Resource getResource​(java.lang.String name)
      Get object resource
      java.util.List<Resource> getResources​(boolean reload)
      Get object resources
      ObjectField getRootField​(ObjectField f)
      Watch for a root parent field in the object
      java.lang.String getRowId()
      Get the current record's row ID value
      java.lang.String getRowId​(java.lang.String[] row)
      Get the specified record row row ID value
      ObjectField getRowIdField()
      Get the object's row ID field
      int getRowIdFieldIndex()
      Get the object's row ID field index
      SharedScript getScript​(java.lang.String name)
      Get object server script for specified name
      java.lang.String getScriptId()
      Get the object script document ID
      java.util.List<SharedScript> getScripts()
      Get all object server scripts (inherited)
      int getSearchLimit()
      Search limit ?
      java.lang.String getSearchSpec()
      Get the current search specification
      java.util.List<java.lang.String> getSelectedIds()
      Get current selected rows.
      SharedScript getSharedScript​(java.lang.String name)
      Get shared server script for specified name
      java.util.List<SharedScript> getSharedScripts()
      Get all shared server scripts
      ObjectField getStartDateField()
      Get the optional start date field.
      java.lang.String getStatus()
      Gets the current status field value (only relevant if the object is a state model object).
      java.lang.String getStatus​(java.lang.String[] row)
      Gets the status field value for specified record row (only relevant if the object is a state model object).
      ObjectField getStatusField()
      Gets the status field of a state model object (or null if the object is not a state model object).
      int getStatusIndex()
      Gets the status field index of a state model object (or -1 if the object is not a state model object).
      java.lang.String getTable()
      Get physical name
      java.lang.String getTableAlias​(ObjectField f)
      Get the table alias to be used in SQL select.
      java.lang.String[] getTargetObject​(java.lang.String rowId, java.lang.String[] row)
      Hook to substitute the current object/instance/rowId to another target object.
      static java.lang.String getTemplateId​(java.lang.String objectName)
      Get object's template ID from specified name
      static java.lang.String getTemplateName​(java.lang.String objectName)
      Get object's template name from specified name
      Timesheet getTimesheet​(java.lang.String t)
      Get one timesheet
      java.util.Map<java.lang.String,​Timesheet> getTimesheets()
      Get all timesheets
      java.lang.String getTitle()
      Substitute extended title with current values
      java.lang.String getTitle​(java.lang.String[] row)
      Substitute extended title [VALUE:field] with current values or specified row
      java.lang.String getUIMiniature()
      Get front UI miniature
      java.lang.String getUITemplate()
      Get front UI template
      java.lang.String[] getUserKeyValues()
      Get user-key current values
      static java.lang.String[] getUserKeyValues​(ObjectCore obj)
      Get current user-key values of specified object
      java.lang.String[] getValues()
      Get current values
      static java.lang.String[] getValues​(ObjectCore obj)
      Get current values of specified object
      java.util.List<View> getView()
      Deprecated.
      use getViews
      View getView​(java.lang.String name)
      Get a view.
      char getViewMode()
      Get the view mode.
      java.util.List<View> getViews()
      Get all the object's views.
      boolean hasChanged​(boolean timestamp)
      Checks if the object has changed
      boolean hasField​(java.lang.String name)
      Check whether a logical name (can be either a simple name or input name or full input name) corresponds to an object field.
      boolean hasFieldType​(int type, java.lang.String rendering)
      Check whether at least one object field is of specified type and optional rendering.
      boolean hasFullInput​(java.lang.String name)
      Check whether an full input name corresponds to an object field.
      boolean hasIndexableFields()
      Does the object contains indexable fields?
      boolean hasInput​(java.lang.String name)
      Check whether an input name correspond to an object field
      boolean hasMenuDashboard()
      Use dashboard in states sub-menu?
      boolean hasMenuStates()
      Use states sub-menu?
      boolean hasMenuTray()
      Use tray in states sub-menu?
      boolean hasMoreOnForm()
      Has extended fields on form ?
      boolean hasMoreOnList()
      Has extended fields on list ?
      boolean hasMoreOnSearch()
      Has extended fields on search ?
      boolean hasSearchLimitError()
      Error on over search limit searches
      boolean haveMore()
      Deprecated.
      Use hasMoreOnForm
      static void initLists​(ObjectCore obj, boolean creation)
      Deprecated.
      Use initLists with search argument
      static void initLists​(ObjectCore obj, boolean creation, boolean search)
      Set the linked enum and status fields
      boolean isAgendaInstance()
      Is a agenda instance
      boolean isAjaxInstance()
      Is an ajax instance (include ajax_, the_ajax_, panel_ajax_...)
      boolean isAreaVisible​(FieldArea fa, boolean all, boolean list)
      Checks if a field area is visible (contains one visible field)
      boolean isAreaVisibleOnList()
      Is area block visible on list header?
      boolean isBatchInstance()
      Is a batch instance (for import XML eai_)
      boolean isBookmark()
      Has a bookmark access?
      boolean isChildOf​(java.lang.String parentName)
      Check if object is child of specified object
      boolean isChildOf​(java.lang.String parentName, java.lang.String parentRefField)
      Check if object is child of specifed object thru specified field
      boolean isCopied()
      Is current creation a copy from another item
      boolean isCronInstance()
      Is a cron instance
      boolean isCustomRowId()
      Is the object using a custom row ID field?
      boolean isDataMapInstance()
      Is a data mapping instance
      boolean isDataMappedFrom​(java.lang.String objectName)
      Check if object is data mapped from specified object
      boolean isDate​(java.lang.String dd, java.lang.String mm, java.lang.String yyyy)
      Deprecated.
      Use Tool.isDate
      boolean isDistinct()
      Is distinct ?
      java.lang.String isExportAllowed​(java.lang.String mode, java.lang.String media, java.lang.String rowId)
      Is requested export allowed?
      boolean isExportInstance()
      Is a export instance
      boolean isFieldForbidden​(ObjectField f)
      Checks if a field is forbidden on UI
      int isFieldSearchable​(ObjectField f)
      Checks if a field is searcheable
      boolean isFieldUpdatable​(ObjectField f, boolean list, boolean checkRef)
      Checks if the field is updatable
      boolean isFieldVisible​(ObjectField f, boolean ignoreMore, boolean list)
      Checks if a field is visible
      boolean isFieldVisibleJSON​(ObjectField f, boolean searchable, boolean constraint, boolean placemap)
      Visible fields on list UI via JSON
      boolean isFiltered​(boolean ignoreParent)  
      boolean isHistoric()
      Is historization required?
      boolean isHistoricLog()
      Is single redo log historizable?
      boolean isHistoricPost()
      Is historizable with social post ?
      boolean isHistoricRedoLog()
      Is full redo log historizable?
      boolean isHomeInstance()
      Is a home instance
      boolean isIDEInstance()
      Is an IDE instance (for use from an externale dev environment)
      boolean isIndexable()
      Is indexable (itself and contains indexable fields)?
      boolean isInstanceOf​(java.lang.String name)
      Check the object inheritance
      boolean isInternalRowId()
      Is the object using a standard internal row ID field ("row_id")?
      boolean isJavaImplemented()
      Is object implemented in Java?
      boolean isLimit()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Use useLimit
      boolean isListEditable()
      Allow rows to be editable ?
      boolean isListSearch()
      Is the search in list accessible?
      boolean isListSearchVisible()
      Deprecated, for removal: This API element is subject to removal in a future version. 
      boolean isListTree()
      Use tree in list ?
      boolean isListUpsertable()
      Allow create+rows to be editable ?
      boolean isLoaded()
      Are meta data loaded
      boolean isMainInstance()
      Is the main instance
      boolean isMergeable()
      Can merge rows together ?
      boolean isMergeInstance()
      Is a merge instance
      boolean isModelerInstance()
      Is a modeler instance
      boolean isMoreForm()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Use isMoreOnForm
      boolean isMoreFormEnable()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Use isMoreOnForm
      boolean isMoreListEnable()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Use isMoreRows
      boolean isMoreOnForm()
      Is the form in extended mode?
      boolean isMoreOnList()
      Is the list in extended mode ?
      boolean isMoreRows()
      Is the list in more rows mode ?
      boolean isMoreSearch()
      Is the search in extended mode ?
      boolean isNew()
      Is new when row ID is equals to "0"
      boolean isOrdered()  
      boolean isPanelInstance()
      Is a panel instance (0,n link)
      boolean isPanelOf​(java.lang.String parentName)
      Check if object is panel of specified object
      boolean isPanelOf​(java.lang.String parentName, java.lang.String parentRefField)
      Check if object is panel of specified object thru specified field
      boolean isPredefSearch()
      Use predefined search ?
      boolean isPredefSearchOnList()
      Access to predefined search on list ?
      boolean isPrintInstance()
      Is a publication instance
      boolean isProcessInstance()
      Is a process instance
      boolean isQuerySpecific()
      Use a specific query ?
      boolean isReadOnly()
      Globally read only
      boolean isReadOnlyFields()
      In case of state model, is the current status set to a read-only state ?
      boolean isRefCount()
      Is count links enabled?
      boolean isReferencedFrom​(java.lang.String objectName)
      Check if object is referenced from specified object
      boolean isReferencedFrom​(java.lang.String objectName, java.lang.String refField)
      Check if object is referenced from specified object thru specified field
      boolean isRefInstance()
      Is a reference instance (object picker)
      boolean isScripted()
      Object contains server scripts ?
      boolean isServiceSpecific()
      Use a specific service (not a query) ?
      boolean isSocial()
      Use a social feature?
      boolean isSocialInline()
      Inline posts on form ?
      boolean isSocialPopup()
      Posts dialog ?
      boolean isSocialShare()
      Can share object ?
      boolean isSortableOnList()
      Is columns sortable on list header?
      boolean isTimestampBlocking()
      Is timestamp blocking = locked by a user?
      boolean isTimestampNonBlocking()
      Is timestamp non-blocking (even if the timestamp has changed) ?
      boolean isTimestampOptimistic()
      Is timestamp optimistic (block if timestamp has changed on save)?
      boolean isTmpInstance()
      Is a temporary instance
      boolean isTreeviewInstance()
      Is a treeview instance
      boolean isUIInstance()
      Is current instance a UI instance (main, panel, home...)
      boolean isUndoableInstance()
      Is current instance undoable ? (exclude core system such as loggers, cron, index, document...)
      boolean isUnique​(ObjectField f)
      Check unicity of current field value
      boolean isUnique​(ObjectField f, java.lang.String val, java.lang.String where)
      Check unicity of specified value for field
      boolean isWebServiceInstance()
      Is a webservice instance (include ws_, soap_ and rest_ and api_)
      long lastUsage​(boolean update)
      Last usage timestamp (last access to object engine)
      void listSelectAll()
      Select all
      boolean listSelectId​(java.lang.String id)
      Deprecated.
      Use listSelectId with additional argument
      boolean listSelectId​(java.lang.String id, boolean toggle)
      Select a row id, or remove it if already selected
      void listSelectPage()
      Select current page rows
      void listUnselectAll()
      Unselect all rows
      void listUnselectId​(java.lang.String id)
      Unselect a row id
      static java.lang.String parseDataSourceName​(java.lang.String dbtable)
      Get data source name part from object table name string
      static java.lang.String parseTableName​(java.lang.String dbtable)
      Get table name part from object table name string
      java.lang.String prepareExpression​(java.lang.String expr, java.lang.String[] row, boolean inlineValues, boolean front)
      Prepares an expression applying following token substitutions:
      - [CONTEXT:<context>]: Check if in specified context
      - [OBJECTID] : the current object ID
      - [OBJECT] : the current object
      - [TABLE] : the current object table name
      - [OBJECTNAME] or [OBJNAME] : the current object name
      - [OBJECTLABEL] or [OBJLABEL] : the current object label
      - [OBJECTINSTANCENAME] or [OBJINST]: the current object instance name
      - [PARENTOBJECT] or [PARENT] : the current object parent object
      - [PARENTOBJECTNAME] or [PARENTNAME] : the current object parent object name
      - [PARENTOBJECTLABEL] or [PARENTLABEL] : the current object parent object label
      - [PARENTOBJECTINSTANCENAME] or [PARENTINSTANCENAME] or [PARENTINST] : the current object parent object instance name
      - [CHILDOF:<parent object name>[:<parent ref field>]] : check if current object is child object of specified object (thru optional specified ref field)
      - [PANELOF:<parent object name>[:<parent ref field>]] : check if current object is panel child object of specified object (thru optional specified ref field)
      - [REFFROM:<object name>[:<ref field>]] or [REFERENCEDFROM:<object name>[:<ref field>]]: check if current object is referenced object from specified object (thru optional specified ref field)
      - [DATAMAPFROM:<object name>] or [DATAMAPPEDFROM:<object name>] : check if current object is data mapped object from specified object
      - [OBJECTSTATUS] or [STATUS] : the object current status (if object has a status)
      - [OBJECTOLDSTATUS] or [OLDSTATUS] : the old object status if any (if object has a status, not available on lists)
      - [OBJECTSTATUSCHANGED] or [STATUSCHANGED] : check if the object status has changed
      - [ISNEW]: Check if object is in creation
      - [ISCOPIED]: Check if object is in creation as a copy
      - [ROWID]: Row ID value
      - [FIELD:<name>] or [INPUT:<inputname>]: the specified field
      - [COLUMN:<inputname>] : the specified field column name
      - [LABEL:<inputname>] : the specified field label
      - [VALUE:<inputname>] (or [<inputname>]): the specified input field current value
      - [OLDVALUE:<inputname>]: the specified input field old value (not available on lists)
      - [DISPLAYVALUE:<inputname>]: the specified input field current value display
      - [DISPLAYOLDVALUE:<inputname>]: the specified input field old value display
      - [PARAM:<parameter name>]: object parameter value
      NB: It first calls Grant.prepareExpression() for grant level token substitutions.
      void preparePagination​(long nbRows, int maxRows)
      Prepare pagination
      java.lang.String prepareSQL​(java.lang.String sql)
      Prepares a SQL statement applying following token substitutions:
      - [table] : table name
      - [column:<input>] : Input column name
      - [rowid] : object row ID
      - [value:<input>] : Input value
      - [login] : user login
      - [userid] : user row ID
      NB : It first calls Grant.prepareSQL()
      void removeField​(java.lang.String field)
      Remove a field
      Link removeLink​(java.lang.String childObject, java.lang.String refField)
      Remove a link (and related view)
      java.io.Serializable removeParameter​(java.lang.String name)
      Unsets a parameter
      void removeParameters​(java.lang.String prefix)
      Unsets parameters starting with prefix
      View removeView​(java.lang.String name)
      Remove a view.
      void resetAllFields()
      Deprecated.
      Use resetFiltersOrdersAndCalcDefaults
      void resetAllFieldsRequired()
      Reset all fields to their required default.
      void resetAllFieldsSearch()
      Reset all fields to their searchable default.
      void resetAllFieldsSearchRequired()
      Reset all fields to their required search default
      void resetAllFieldsUpdatable()
      Reset all fields to their updatable default.
      void resetContextDefaultValues()
      Clears contextualized default value for all fields.
      void resetFilter()
      Deprecated.
      Use resetFilters
      void resetFilters()
      Clears all filters for all fields (all filters are set to %)
      void resetFilters​(boolean ignoreParent)
      Clears all filters for all fields
      void resetFiltersOrdersAndCalcDefaults()
      Clears all fields filters, default ordering and contextualized default values.
      void resetGroupBy​(boolean clearGroup, boolean clearOrder)  
      void resetOrders()
      Clears ordering for all field (all orderings are cleared)
      void resetOrders​(boolean clear)
      Clears ordering for all field (all orderings are either reset to default ordering or cleared)
      void resetRequireds()
      Reset all field mandatory statuses to defaults
      void resetSearchables()
      Reset all field search type (and required search strategy) to defaults
      void resetSelectedIds()
      Reset current selected rows.
      void resetUpdatables()
      Reset all field updatability to defaults
      void resetValues()
      Clears value for all fields (all values are set to "")
      void resetValues​(boolean defaultValues)
      Clears values (and old values) for all fields: values are set to defaults or empty
      void resetValues​(boolean defaultValues, java.lang.String rowId)
      Clears values (and old values) for all fields: values are set to defaults or empty and row ID field is optionaly set to an explicit value
      void resetVisibilities()
      Reset all field visibilities to defaults
      void selectCurrentItemFromList()
      Select current position list item as current item
      void selectItemFromList​(int pos)
      Select current list item for specified position as current item
      void setAlias​(java.lang.String a)
      Set alias (or remove with null)
      void setAllFieldsUpdatable​(boolean b)
      Set/unset all fields as updatable.
      void setAreaVisibleOnList​(boolean b)
      Set area block visible on list header
      void setBookmark​(boolean enabled, boolean plus)
      Set object to allow bookmark (disabled if user has no BOOKMARK responsibility)
      void setCacheFrom​(java.lang.String req)
      Get cached from statement
      void setCacheSelect​(java.lang.String req)
      Get cached select statement
      void setClassName​(java.lang.String cn)
      Set the object class name
      void setClose​(boolean b)
      Set object to allow close form
      void setConfig​(org.json.JSONObject config)
      Get additional configuration
      void setConfirmFieldValue​(Action action, java.lang.String name, java.lang.String value)
      Set action confirm field value
      void setContext​(ObjectContext ctx)
      Set current usage context (list, create, update...)
      void setCopy​(boolean enabled)
      Set object to allow copy
      void setCopy​(boolean enabled, boolean plus)
      Set object to allow copy
      void setCopyId​(java.lang.String b)
      Set row id of the item to copy
      void setCreateOnLinks​(boolean b)
      Set object to allow create on links
      void setCrosstabVisibility​(boolean visibility)
      Set pivot table visibility
      void setCtxHelp​(java.lang.String context, java.lang.String help)
      Set a contextual help
      void setCtxHelps​(java.util.List<ObjectCtxHelp> ctxhelps)
      Set contextual helps
      void setCurrentAction​(java.lang.String a)
      Set current custom action (null if no action)
      void setCurrentList​(java.util.List<java.lang.String[]> rows)
      Set current list
      void setCurrentPage​(int page)
      Set current page number in list pagination
      void setCurrentPos​(int i)
      Set current list item position in current page
      void setCurrentPos​(java.lang.String row_id)
      Set current list item position (using row id) in current page
      void setCurrentTransition​(FieldStateTransition t)
      Set current transition
      void setCurrentView​(java.lang.String view, boolean checkRef)
      Set the current view
      void setData​(com.simplicite.util.engine.ObjectData d)
      Set core object meta data
      void setDataSource​(java.lang.String ds)
      Set data source name
      void setDataSourceVendor​(int v)
      Set data source vendor
      void setDBName​(java.lang.String t)
      Set physical name (same as setTable)
      void setDefaultLink​(java.lang.String view)
      Set the default view to display on object form
      void setDefaultSearchSpec​(java.lang.String s)
      Set the default search specification (also set the current search specification)
      void setDeleteAll​(boolean enabled)
      Set object to allow bulk delete
      void setDeleteAll​(boolean enabled, boolean plus)
      Set object to allow bulk delete
      void setDesc​(java.lang.String d)
      Set description
      void setDisplay​(java.lang.String d)
      Set the object translation in current user language
      void setDistinct​(boolean b)
      Set object to be distinct
      void setEndDateField​(ObjectField endDate)
      Set the end date field.
      void setExport​(boolean enabled)
      Set object to allow export
      void setExport​(boolean enabled, boolean plus)
      Set object to allow export
      void setExportTimestamp​(boolean enabled)
      Set object to allow timestamp fields export.
      void setFieldFilter​(java.lang.String name, java.lang.Object filter)
      Set a field filter = shorthand for getField(name).setFilter(filter)
      void setFieldOldValue​(java.lang.String name, java.lang.String value)
      Set a field old value = shorthand for getField(name).setOldValue(value)
      void setFieldOrder​(java.lang.String name, int ord)
      Set a field order = shorthand for getField(name).setOrder(ord)
      void setFields​(java.util.ArrayList<ObjectField> fields)
      Set ordered fields
      void setFieldValue​(java.lang.String name, java.lang.Object value)
      Set a field value = shorthand for getField(name).setValue(value)
      static void setFilters​(ObjectCore obj, ObjectFieldSearch[] filters)
      Set current filters for specified object
      void setFilters​(ObjectFieldSearch[] filters)
      Set current filters
      void setFilters​(java.util.List<ObjectFieldSearch> filters)
      Set current filters
      void setFilters​(org.json.JSONObject filters)
      Replace all filters from JSON object
      void setFilters​(org.json.JSONObject filters, boolean resetFilters)
      Replace all filters from JSON object
      void setFilters​(org.json.JSONObject filters, boolean resetFilters, boolean resetOrders, java.lang.Short fixed)
      Set filters from JSON object
      void setFollowLinks​(boolean b)
      Set object to allow follow links
      void setForm​(boolean b)
      Set the object to use the form
      void setFormLayout​(int formLayout)
      Set form layout.
      void setFunctId()
      Build the functional key and object field hierarchy.
      void setGrant​(Grant g)
      Set grant (user rights)
      void setGroupByFields​(boolean b)
      Set group by field on list.
      void setHaveMore​(boolean b)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Do not use, does nothing
      void setHelp​(java.lang.String help)
      Set main object help
      void setHistoric​(boolean b)
      Set historization required
      void setHistoricLog​(boolean b)
      Set single redo log historizable
      void setHistoricPost​(boolean b)
      Set historizable with social post
      void setHistoricRedoLog​(boolean b)
      Set full redo log historizable
      void setIconCode​(java.lang.String i)
      Set icon code
      void setId​(java.lang.String id)
      Set the object definition ID
      void setIndexable​(boolean b)
      Set indexable.
      void setInheritedObject​(java.lang.String obj)
      Push one inherited objects
      void setInstanceName​(java.lang.String instance)
      Set object instance name
      void setLabel​(java.lang.String d)
      Set the object translation in current user language (alias to setDisplay)
      void setLimit​(boolean b)
      Set the object to use list pagination
      void setListAccessNewForm​(boolean b)
      Display the 'New' form button
      void setListAccessNewLine​(boolean b)
      Display the New line button, generate the 'addlist' action
      void setListAccessNewLine​(boolean b, boolean loop, boolean plus)
      Display the New line button, generate the 'addlist' action
      void setListEdit​(java.lang.String edit)
      Set list editable
      void setListEdit​(java.lang.String edit, boolean plusAddList, boolean plusEditList, boolean plusUpsertList)
      Set list editable
      void setListEditable​(boolean b)
      Set list editable and generate the 'listedit' action
      void setListEditable​(boolean b, boolean plus)
      Set list editable and generate the 'listedit' action
      void setListEditMode​(java.lang.String mode)
      Set object to allow edit list
      void setListSearch​(boolean b)
      Set whether the search in list is accessible or not to user
      void setListSearchMode​(char mode)
      Set default search mode on embedded list
      void setListSearchVisible​(boolean b)
      Deprecated, for removal: This API element is subject to removal in a future version. 
      void setListSize​(int size)
      Set page size of list
      void setListTree​(boolean b)
      Set object to use tree in list ?
      void setListUpsertable​(boolean b, boolean plus)
      Set list create+editable and generate the 'listupsert' action
      void setMaxPage​(int m)
      Set maximum pages in list pagination
      void setMaxRows​(int n)
      Set the list page maximum size (for paginated searches, 0 = use the default granted max size)
      void setMenuDashboard​(boolean b)
      Set use dashboard in states sub-menu
      void setMenuSearch​(char mode)
      Deprecated, for removal: This API element is subject to removal in a future version.
      void setMenuStates​(boolean b)
      Set use states sub-menu.
      void setMenuTray​(boolean b)
      Set use tray in states sub-menu.
      void setMergeable​(boolean enabled)
      Allow to merge rows selection (only if user can select rows)
      void setMergeable​(boolean enabled, boolean plus)
      Allow to merge rows selection (only if user can select rows and has update and delete rights)
      void setMinRows​(int n)
      Set the list page minimum size (for paginated searches, 0 = use the default granted min size)
      void setModuleId​(java.lang.String id)
      Set the object module ID
      void setModuleName​(java.lang.String m)
      Set the object module name
      void setMoreForm​(boolean b)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Use setMoreOnForm
      void setMoreOnForm​(boolean b)
      Set the form to be in extended mode
      void setMoreOnList​(boolean b)
      Set the list to be in extended mode
      void setMoreRows​(boolean b)
      Set the list to be in more rows mode
      void setMoreSearch​(boolean b)
      Set the search to be in extended mode
      void setName​(java.lang.String name)
      Set the object name
      static void setOldValues​(ObjectCore obj, java.lang.String[] oldvalues)
      Set current old values for specified object
      void setOldValues​(java.lang.String[] oldvalues)
      Set current old values
      void setOldValues​(java.util.List<java.lang.String> oldvalues)
      Set current old values
      void setPageSize​(int size)
      Alias to setListSize()t
      void setParameter​(java.lang.String name, boolean b)
      Set parameter from boolean
      void setParameter​(java.lang.String name, double d)
      Set parameter from double float
      void setParameter​(java.lang.String name, float f)
      Set parameter from float
      void setParameter​(java.lang.String name, int i)
      Set parameter from integer
      void setParameter​(java.lang.String name, long l)
      Set parameter from long integer
      void setParameter​(java.lang.String name, java.io.Serializable value)
      Sets one parameter in the object instance (useful, for instance, to store data thru different pages and contexts)
      void setParentObject​(ObjectCore obj)
      Set the contextual parent object for child lists
      void setParentObjectRefField​(java.lang.String field)
      Set the child field that references parent object for child lists
      void setParentValues​(java.lang.String[] values)
      Set parent values (used to limit search in where clause)
      void setPluralDisplay​(java.lang.String d)
      Set the plural object translation in current user language
      void setPluralLabel​(java.lang.String d)
      Set the plural object translation in current user language (alias to setPluralDisplay)
      void setPredefinedSearchIndex​(int i)
      Set selected predefined search by index
      void setPredefSearch​(boolean b)
      Set the object to use and edit predefined search
      void setPredefSearch​(boolean use, boolean edit)
      Set the object to use predefined search
      void setPredefSearch​(java.lang.String predef)
      Set the object to use predefined search
      void setPredefSearchOnList​(boolean b)
      Set the object to access predefined search on list
      void setPrint​(boolean b)
      Set can print
      void setPrintTemplateVisibility​(boolean visibility)
      Set publication template visibility
      void setQuerySpecific()
      Force the object to use a specific query (this forces the table name)
      void setQuerySpecific​(boolean b)
      Set the object as using a specific query (without altering the table name)
      void setReadOnly​(boolean b)
      Set globally read only : freeze fields and update actions, keep access to search, select and export
      void setRefCount​(boolean b)
      Set count links
      void setRowId​(java.lang.String id)
      Set the current record's row ID value
      void setSave​(boolean b)
      Set object to allow save form
      void setSaveAndClose​(boolean b)
      Set object to allow save/close form
      void setSaveAndCopy​(boolean b)
      Set object to allow save/copy form
      void setSaveAndNew​(boolean b)
      Set object to allow save/new form
      void setScriptId​(java.lang.String id)
      Set the object script document ID
      void setSearchCreatedBy​(boolean b)
      Set 'created by' searchable
      void setSearchCreatedDate​(boolean b)
      Set 'created date' searchable
      void setSearchLimit​(int n)
      Set object to have a search limit
      void setSearchLimitError​(boolean b)
      Set objet to generate error on over search limit searches
      void setSearchSpec​(java.lang.String s)
      Set the current search specification (does not affect default search specification)
      void setSearchSpec​(java.lang.String s, boolean def)
      Set the current search specification
      void setSearchUpdatedBy​(boolean b)
      Set 'updated by' searchable
      void setSearchUpdatedDate​(boolean b)
      Set 'updated date' searchable
      void setSelectedIds​(java.util.List<java.lang.String> ids)
      Set selected rows
      void setSelectRow​(boolean b)
      Allow list rows selection
      void setServiceSpecific()
      Force the object to use a specific service (this forces table name)
      void setServiceSpecific​(boolean b)
      Set the object as using a specific service (without altering the table name)
      void setSocial​(boolean b)
      Allows to post social messages + share
      void setSocial​(boolean popup, boolean inline, boolean share)
      Allows to post social messages
      void setSortableOnList​(boolean b)
      Set columns sortable on list header
      void setStartDateField​(ObjectField startDate)
      Set the start date field
      void setStatus​(char status)
      Sets current status field to specified value (only relevant if the object is a state model object).
      void setStatus​(int status)
      Sets current status field to specified value (only relevant if the object is a state model object).
      void setStatus​(java.lang.String statusFieldIndex)
      Sets current status field to specified value (only relevant if the object is a state model object).
      void setStatusField​(ObjectField statusField)
      Sets the status field of a state model object.
      void setTable​(java.lang.String t)
      Set physical table name
      void setTimestamp​(int t)
      Set object as using a timestamp TIMESTAMP_*
      void setTitle​(java.lang.String d)
      Set the title definition with fields under brackets: [field] or [VALUE:field]
      void setUIMiniature​(java.lang.String t)
      Set front UI miniature
      void setUITemplate​(java.lang.String t)
      Set front UI template
      void setUpdateAll​(boolean enabled)
      Set object to allow bulk update
      void setUpdateAll​(boolean enabled, boolean plus)
      Set object to allow bulk update
      static void setUserKeyValues​(ObjectCore obj, java.lang.String[] values)
      Set current user-key values of specified object
      void setUserKeyValues​(java.lang.String[] values)
      Set current user-key values
      static void setValues​(ObjectCore obj, java.lang.String[] values, boolean oldValues)
      Set current values for specified object.
      static void setValues​(ObjectCore obj, java.lang.String[] values, java.lang.Boolean withOldValues, boolean withDocs)
      Set current values for specified object.
      void setValues​(java.lang.String[] values)
      Change the current record (values and old values)
      void setValues​(java.lang.String[] values, java.lang.Boolean withOldValues)
      Set current values.
      void setValues​(java.lang.String[] values, java.lang.Boolean withOldValues, boolean withDocs)
      Set current values.
      void setValues​(java.util.List<java.lang.String> values)
      Change the current record only (keep the old values)
      void setValues​(java.util.List<java.lang.String> values, java.lang.Boolean withOldValues)
      Set current values and reset old ones
      void setValues​(java.util.List<java.lang.String> values, java.lang.Boolean withOldValues, boolean withDocs)
      Set current values
      static void setValuesFromJSONObject​(ObjectCore obj, org.json.JSONObject values, boolean reset, boolean onlyUserKey)
      Set current values for specified object from JSON object
      void setValuesFromJSONObject​(org.json.JSONObject values, boolean reset, boolean onlyUserKey)
      Set current values for object from JSON object
      void setViewMode​(char mode)
      Set the view mode.
      void testData()
      Generate random/sample field values on row ID
      void testData​(java.lang.String rowId, boolean random, boolean refs)
      Generate random/sample field values
      java.lang.String toHTML()
      Publish current row to raw HTML
      java.lang.String toHTML​(java.util.List<java.lang.String[]> rows)
      Publish specified rows to raw HTML
      void toHTML​(java.util.List<java.lang.String[]> rows, java.io.PrintWriter out)
      Publish specified rows to raw HTML on specified print writer
      java.lang.String toJSON()
      Serialize current row to JSON without documents
      java.lang.String toJSON​(boolean inlineDocs, boolean inlineThumbs, boolean inlineObjs, java.util.List<ObjectField> fields, boolean onlyFunctIds, boolean timestamps, java.lang.String separator)
      Deprecated.
      Use toJSON with InlineParam
      java.lang.String toJSON​(Parameters.InlineParam inlines)
      Serialize current row to JSON
      java.lang.String toJSON​(Parameters.InlineParam inlines, java.util.List<ObjectField> fields, boolean onlyFunctIds)
      Serialize current row to JSON
      java.lang.String toJSON​(Parameters.InlineParam inlines, java.util.List<ObjectField> fields, boolean onlyFunctIds, boolean timestamps, java.lang.String separator)
      Serialize current row to JSON
      java.lang.String toJSON​(java.lang.String[] row, Parameters.InlineParam inlines, boolean timestamps, boolean visibleOnly)
      Serialize specified row to JSON object { field: value, ...
      java.lang.String toJSON​(java.util.List<java.lang.String[]> rows, Parameters.InlineParam inlines, boolean timestamp, boolean visibleOnly)
      Deprecated.
      Use toJSON with valuesOnly argument
      java.lang.String toJSON​(java.util.List<java.lang.String[]> rows, Parameters.InlineParam inlines, boolean timestamp, boolean visibleOnly, boolean valuesOnly)
      Serialize specified rows to JSON array
      java.lang.String toJSONArray​(java.lang.String[] row, Parameters.InlineParam inlines, boolean timestamps, boolean visibleOnly)
      Serialize specified row to JSON array [ value, ...
      org.json.JSONObject toJSONObject()
      Generates a JSON object representation of the business object
      org.json.JSONObject toJSONObject​(boolean params)
      Generates a JSON object representation of the business object
      org.json.JSONObject toJSONObject​(Parameters.InlineParam inlines)
      JSON object item with ordered fields (used by treeviews and exported module)
      java.lang.String toString()
      Generates a string representation of the business object
      java.lang.String toString​(boolean params)
      Generates a string representation of the business object
      boolean useForm()
      Use the form ?
      boolean useLimit()
      Use list pagination ?
      boolean useTimestamp()
      Use a timestamp ?
      boolean useTimeStamp()
      Use a timestamp (alias to useTimestamp)?
      • Methods inherited from class java.lang.Object

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

      • TYPE_QUERY

        public static final java.lang.String TYPE_QUERY
        Select object type
        See Also:
        Constant Field Values
      • TYPE_SERVICE

        public static final java.lang.String TYPE_SERVICE
        Service object type
        See Also:
        Constant Field Values
      • TYPE_SERVICE_SIMPLICITE

        public static final java.lang.String TYPE_SERVICE_SIMPLICITE
        Simplicite service object type
        See Also:
        Constant Field Values
      • TYPE_SERVICE_LDAP

        public static final java.lang.String TYPE_SERVICE_LDAP
        LDAP service object type
        See Also:
        Constant Field Values
      • TYPE_SERVICE_MONGODB

        public static final java.lang.String TYPE_SERVICE_MONGODB
        MongoDB service object type
        See Also:
        Constant Field Values
      • TYPE_SERVICE_REST

        public static final java.lang.String TYPE_SERVICE_REST
        REST service object type
        See Also:
        Constant Field Values
      • TYPE_SERVICE_OPENDATASOFT

        public static final java.lang.String TYPE_SERVICE_OPENDATASOFT
        OpenDataSoft service object type
        See Also:
        Constant Field Values
      • TYPE_SERVICE_SALESFORCE

        public static final java.lang.String TYPE_SERVICE_SALESFORCE
        SalesForce service object type
        See Also:
        Constant Field Values
      • TYPE_SERVICE_SERVICENOW

        public static final java.lang.String TYPE_SERVICE_SERVICENOW
        ServiceNow service object type
        See Also:
        Constant Field Values
      • DB_UNKNOWN

        @Deprecated(forRemoval=false,
                    since="4.0")
        public static final int DB_UNKNOWN
        Deprecated.
        Use Globals.DB_UNKNOWN
        See Also:
        Constant Field Values
      • DB_MYSQL

        @Deprecated(forRemoval=false,
                    since="4.0")
        public static final int DB_MYSQL
        Deprecated.
        Use Globals.DB_MYSQL
        See Also:
        Constant Field Values
      • DB_ORACLE

        @Deprecated(forRemoval=false,
                    since="4.0")
        public static final int DB_ORACLE
        Deprecated.
        Use Globals.DB_ORACLE
        See Also:
        Constant Field Values
      • DB_HSQLDB

        @Deprecated(forRemoval=false,
                    since="4.0")
        public static final int DB_HSQLDB
        Deprecated.
        Use Globals.DB_HSQLDB
        See Also:
        Constant Field Values
      • DB_POSTGRESQL

        @Deprecated(forRemoval=false,
                    since="4.0")
        public static final int DB_POSTGRESQL
        Deprecated.
        Use Globals.DB_POSTGRESQL
        See Also:
        Constant Field Values
      • DB_MSSQL

        @Deprecated(forRemoval=false,
                    since="4.0")
        public static final int DB_MSSQL
        Deprecated.
        Use Globals.DB_MSSQL
        See Also:
        Constant Field Values
      • DB_H2

        @Deprecated(forRemoval=false,
                    since="4.0")
        public static final int DB_H2
        Deprecated.
        Use Globals.DB_H2
        See Also:
        Constant Field Values
      • DB_DERBY

        @Deprecated(forRemoval=false,
                    since="4.0")
        public static final int DB_DERBY
        Deprecated.
        use Globals.DB_DERBY
        See Also:
        Constant Field Values
      • DEL_RESTRICT

        public static final char DEL_RESTRICT
        Delete is allowed if object is not referenced
        See Also:
        Constant Field Values
      • DEL_NULL

        public static final char DEL_NULL
        Deletion will set all references to null
        See Also:
        Constant Field Values
      • DEL_IGNORE

        public static final char DEL_IGNORE
        Ignore cascading rules on deletion
        See Also:
        Constant Field Values
      • SEARCH_HIDE

        public static final char SEARCH_HIDE
        hide the search by default when accessing object
        See Also:
        Constant Field Values
      • SEARCH_LIST

        public static final char SEARCH_LIST
        Show the search on top of list by default
        See Also:
        Constant Field Values
      • SEARCH_DOCK

        public static final char SEARCH_DOCK
        Dock the search beside of the list by default
        See Also:
        Constant Field Values
      • SEARCH_DIALOG

        public static final char SEARCH_DIALOG
        Show the search in a dialog by default
        See Also:
        Constant Field Values
      • CONTEXT_STATETRANSITION

        public static final int CONTEXT_STATETRANSITION
        See Also:
        Constant Field Values
      • VIEW_MODE_TABS

        public static final char VIEW_MODE_TABS
        TABS: Views are grouped in a single tabulation, only one tab can be selected
        See Also:
        Constant Field Values
      • VIEW_MODE_COLLAPSED

        public static final char VIEW_MODE_COLLAPSED
        COLLAPSED : Views are listed one below the other and collapsed by default (except object default link/view)
        See Also:
        Constant Field Values
      • VIEW_MODE_EXTENDED

        public static final char VIEW_MODE_EXTENDED
        EXTENDED : Views are listed one below the other and extended by default
        See Also:
        Constant Field Values
      • VIEW_MODE_ACCORDION

        public static final char VIEW_MODE_ACCORDION
        ACCORDION : Views are listed one below the other, toggle only one view (firstly the default link/view)
        See Also:
        Constant Field Values
      • VIEW_MODE_TABS_VERTICAL

        public static final char VIEW_MODE_TABS_VERTICAL
        VERTICAL : grouped in a vertical tabs
        See Also:
        Constant Field Values
      • TIMESTAMP_NONE

        public static final int TIMESTAMP_NONE
        No timestamp used
        See Also:
        Constant Field Values
      • TIMESTAMP_OPTIMISTIC

        public static final int TIMESTAMP_OPTIMISTIC
        Optimistic: control the timestamp valaidity on save
        See Also:
        Constant Field Values
      • TIMESTAMP_NON_BLOKING

        public static final int TIMESTAMP_NON_BLOKING
        Non-blocking timestamp: override the timestamp on each save
        See Also:
        Constant Field Values
      • TIMESTAMP_BLOKING

        public static final int TIMESTAMP_BLOKING
        Locking timestamp: only one user can update a record at a same time
        See Also:
        Constant Field Values
      • PREDEF_SEARCH_NONE

        public static final int PREDEF_SEARCH_NONE
        Do not use predefined search
        See Also:
        Constant Field Values
      • PREDEF_SEARCH_USE_EDIT

        public static final int PREDEF_SEARCH_USE_EDIT
        Edit and use predefined searches thru the search dialog
        See Also:
        Constant Field Values
      • PREDEF_SEARCH_USE_ONLY

        public static final int PREDEF_SEARCH_USE_ONLY
        Use only the predefined searches thru the search dialog
        See Also:
        Constant Field Values
      • PREDEF_SEARCH_ONLIST

        public static final int PREDEF_SEARCH_ONLIST
        Fast access to predefined searches on list
        See Also:
        Constant Field Values
      • LIST_EDIT_ROWS

        public static final java.lang.String LIST_EDIT_ROWS
        List is in the rows edition mode
        See Also:
        Constant Field Values
      • LIST_EDIT_ADD

        public static final java.lang.String LIST_EDIT_ADD
        List is in a add row mode
        See Also:
        Constant Field Values
      • LIST_EDIT_UPSERT

        public static final java.lang.String LIST_EDIT_UPSERT
        List is in full insert+update+delete mode
        See Also:
        Constant Field Values
      • FORM_LAYOUT_DEFAULT

        public static final int FORM_LAYOUT_DEFAULT
        Default form layout
        See Also:
        Constant Field Values
      • FORM_LAYOUT_COMPACT

        public static final int FORM_LAYOUT_COMPACT
        Compact form layout
        See Also:
        Constant Field Values
    • Constructor Detail

      • ObjectCore

        public ObjectCore()
    • Method Detail

      • getData

        public com.simplicite.util.engine.ObjectData getData()
        Get core object meta data
      • setData

        public void setData​(com.simplicite.util.engine.ObjectData d)
        Set core object meta data
      • getLock

        public java.lang.Object getLock()
        Get the lock to be used in synchronized blocks
      • getContext

        public ObjectContext getContext()
        Get current usage context (list, create, update...)
      • setContext

        public void setContext​(ObjectContext ctx)
        Set current usage context (list, create, update...)
      • isLoaded

        public boolean isLoaded()
        Are meta data loaded
      • getName

        public java.lang.String getName()
        Get the object name
        Specified by:
        getName in interface com.simplicite.util.engine.CacheInterface
        Returns:
        Name
      • setName

        public void setName​(java.lang.String name)
        Set the object name
        Parameters:
        name - Name
      • getInstanceName

        public java.lang.String getInstanceName()
        Get the object instance name
        Returns:
        Instance name
      • setInstanceName

        public void setInstanceName​(java.lang.String instance)
        Set object instance name
        Parameters:
        instance - Instance name
      • destroy

        public void destroy()
        Remove the instance in the user's session
      • getTargetObject

        public java.lang.String[] getTargetObject​(java.lang.String rowId,
                                                  java.lang.String[] row)
        Hook to substitute the current object/instance/rowId to another target object. Applied in case of row action (open, copy, print...). Useful in case of inheritance, redirection to another object or table.
        Parameters:
        rowId - Target rowId
        row - Optional, current row if known, otherwise the record have to be selected with the rowId
        Returns:
        By default returns the current object itself. Return null if no target is possible. Otherwise an Array of 3 items: object name, instance name and row id.
      • getCacheKey

        public java.lang.String getCacheKey​(Grant g)
        Get object unique cache key
        Specified by:
        getCacheKey in interface com.simplicite.util.engine.CacheInterface
        Parameters:
        g - Grant
        Returns:
        Unique cache key
      • lastUsage

        public long lastUsage​(boolean update)
        Last usage timestamp (last access to object engine)
        Specified by:
        lastUsage in interface com.simplicite.util.engine.CacheInterface
        Parameters:
        update - true to update the current time
        Returns:
        Last usage in millisecond (-1 no GC)
      • garbageCollection

        public boolean garbageCollection()
        Garbage collection of dynamic data
        Specified by:
        garbageCollection in interface com.simplicite.util.engine.CacheInterface
        Returns:
        True if something has been cleared
      • enableGC

        public void enableGC​(boolean enabled)
        Enable or disable the internal GC
        Specified by:
        enableGC in interface com.simplicite.util.engine.CacheInterface
        Parameters:
        enabled - Enabled?
      • isJavaImplemented

        public boolean isJavaImplemented()
        Is object implemented in Java?
        Specified by:
        isJavaImplemented in interface com.simplicite.util.engine.CacheInterface
        Returns:
        True if object is implemented in Java
      • setId

        public void setId​(java.lang.String id)
        Set the object definition ID
      • getId

        public java.lang.String getId()
        Get the object definition ID
      • getObjectLocation

        public ObjectLocation getObjectLocation()
        Get object location data
      • setModuleId

        public void setModuleId​(java.lang.String id)
        Set the object module ID
      • getModuleId

        public java.lang.String getModuleId()
        Get the object module ID
      • setModuleName

        public void setModuleName​(java.lang.String m)
        Set the object module name
      • getModuleName

        public java.lang.String getModuleName()
        Get the object module name
      • setClassName

        public void setClassName​(java.lang.String cn)
        Set the object class name
      • getClassName

        public java.lang.String getClassName()
        Get the object class name
      • setScriptId

        public void setScriptId​(java.lang.String id)
        Set the object script document ID
      • getScriptId

        public java.lang.String getScriptId()
        Get the object script document ID
      • getModuleId

        public static java.lang.String getModuleId​(java.lang.String objectId)

        Retrieve the object's module ID from the object ID

        Parameters:
        objectId - Object ID
        Returns:
        Module ID
      • getModuleIdByName

        public static java.lang.String getModuleIdByName​(java.lang.String objectName)
        Get object's module ID from the object name
        Parameters:
        objectName - Object name
        Returns:
        Object's module ID
      • getObjectId

        public static java.lang.String getObjectId​(java.lang.String objectName)
        Get object ID from specified name
        Parameters:
        objectName - Object name
        Returns:
        Object ID
      • getObjectName

        public static java.lang.String getObjectName​(java.lang.String objectId)
        Get object name from specified ID
        Parameters:
        objectId - Object ID
        Returns:
        Object name
      • getObjectTable

        public static java.lang.String getObjectTable​(java.lang.String objectId)
        Get object table from specified ID
        Parameters:
        objectId - Object ID
        Returns:
        Object table
      • getTemplateName

        public static java.lang.String getTemplateName​(java.lang.String objectName)
        Get object's template name from specified name
        Parameters:
        objectName - Object name
        Returns:
        Object's template name
      • getTemplateId

        public static java.lang.String getTemplateId​(java.lang.String objectName)
        Get object's template ID from specified name
        Parameters:
        objectName - Object name
        Returns:
        Object's template ID
      • getDisplay

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

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

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

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

        public java.lang.String getPluralDisplay()
        Get the plural object translation in current user language
      • getPluralLabel

        public java.lang.String getPluralLabel()
        Get the plural object translation in current user language (alias to getPluralDisplay)
      • setPluralDisplay

        public void setPluralDisplay​(java.lang.String d)
        Set the plural object translation in current user language
      • setPluralLabel

        public void setPluralLabel​(java.lang.String d)
        Set the plural object translation in current user language (alias to setPluralDisplay)
      • getDisplay

        public static java.lang.String getDisplay​(java.lang.String obj,
                                                  java.lang.String lang)
        Get display label
        Parameters:
        obj - Object name
        lang - Language
        Returns:
        Object display label
      • getDisplay

        public static java.lang.String getDisplay​(java.lang.String obj,
                                                  java.lang.String lang,
                                                  boolean plural)
        Get display label
        Parameters:
        obj - Object name
        lang - Language
        plural - Plural?
        Returns:
        Singular or plural display label
      • getDisplayFromDB

        public static java.lang.String getDisplayFromDB​(java.lang.String obj,
                                                        java.lang.String lang,
                                                        boolean plural)
        Get display label from database
        Parameters:
        obj - Object name
        lang - Language
        plural - Plural?
        Returns:
        Singular or plural display label
      • parseDataSourceName

        public static java.lang.String parseDataSourceName​(java.lang.String dbtable)
        Get data source name part from object table name string
        Parameters:
        dbtable - Object table name string
        Returns:
        Parsed datasource name or default datasource name
      • parseTableName

        public static java.lang.String parseTableName​(java.lang.String dbtable)
        Get table name part from object table name string
        Parameters:
        dbtable - Object table name string
        Returns:
        Parsed table name or empty string
      • getDataSource

        public java.lang.String getDataSource()
        Get data source name
      • setDataSource

        public void setDataSource​(java.lang.String ds)
        Set data source name
      • getDataSourceVendor

        public int getDataSourceVendor()
        Get data source vendor
      • setDataSourceVendor

        public void setDataSourceVendor​(int v)
        Set data source vendor
      • getTable

        public java.lang.String getTable()
        Get physical name
      • getDBName

        public final java.lang.String getDBName()
        Get physical name (same as getTable)
      • setTable

        public void setTable​(java.lang.String t)
        Set physical table name
      • setDBName

        public final void setDBName​(java.lang.String t)
        Set physical name (same as setTable)
      • getAlias

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

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

        public org.json.JSONObject getConfig()
        Get additional configuration
        Returns:
        Optional aditional configuration
      • setConfig

        public void setConfig​(org.json.JSONObject config)
        Get additional configuration
        Parameters:
        config - Optional aditional configuration
      • getDesc

        public java.lang.String getDesc()
        Get description
      • setDesc

        public void setDesc​(java.lang.String d)
        Set description
      • getFields

        public java.util.List<ObjectField> getFields()
        Get ordered fields
      • setFields

        public void setFields​(java.util.ArrayList<ObjectField> fields)
        Set ordered fields
      • getField

        public ObjectField getField​(int index)
        Get field in indexed position
        Parameters:
        index - Index
      • getFieldFilter

        public final java.lang.String getFieldFilter​(java.lang.String name)
        Get a field filter = shorthand for getField(name).getFilter()
        Parameters:
        name - Field name
        Returns:
        field filter or null if field not found
      • getFieldValue

        public final java.lang.String getFieldValue​(java.lang.String name)
        Get the current field value = shorthand for getField(name).getValue()
        Parameters:
        name - Field name
        Returns:
        field value or null if field not found
      • getFieldValue

        public final java.lang.String getFieldValue​(java.lang.String name,
                                                    java.lang.String[] row)
        Get the field value for specified record row = shorthand for row[getFieldIndex(name)]
        Parameters:
        name - Field name
        row - Record row (if empty return current record's field value)
        Returns:
        field value or null if field not found
      • getFieldValue

        public final java.lang.String getFieldValue​(ObjectField field,
                                                    java.lang.String[] row)
        Get the field value for specified record row
        Parameters:
        field - Field
        row - Record row (if empty return current record's field value)
        Returns:
        field value or null if field not found
      • getFieldOldValue

        public final java.lang.String getFieldOldValue​(java.lang.String name)
        Get a field old value = shorthand for getField(name).getOldValue()
        Parameters:
        name - Field name
        Returns:
        field old value or null if field not found
      • getFieldOldValue

        public final java.lang.String getFieldOldValue​(ObjectField field)
        Get a field old value
        Parameters:
        field - Field
        Returns:
        field old value or null if field not found
      • getFieldDisplayValue

        public final java.lang.String getFieldDisplayValue​(java.lang.String name)
        Get the current field display value = shorthand for getField(name).getDisplayValue(getGrant())
        Parameters:
        name - Field name
        Returns:
        field value or null if field not found
      • getFieldDisplayValue

        public final java.lang.String getFieldDisplayValue​(java.lang.String name,
                                                           java.lang.String[] row)
        Get the field display value for specified record row = shorthand for getField(name).getDisplayValue(getGrant(), row[getFieldIndex(name)])
        Parameters:
        name - Field name
        row - Record row (if empty return current record's field value)
        Returns:
        field value or null if field not found
      • getFieldDisplayValue

        public final java.lang.String getFieldDisplayValue​(ObjectField field,
                                                           java.lang.String[] row)
        Get the field display value for specified record row
        Parameters:
        field - Field
        row - Record row (if empty return current record's field value)
        Returns:
        field value or null if field not found
      • getFieldDisplayOldValue

        public final java.lang.String getFieldDisplayOldValue​(java.lang.String name)
        Get the current field display old value = shorthand for getField(name).getDisplayValue(getGrant())
        Parameters:
        name - Field name
        Returns:
        field value or null if field not found
      • getFieldDisplayOldValue

        public final java.lang.String getFieldDisplayOldValue​(ObjectField field)
        Get the current field display old value
        Parameters:
        field - Field
        Returns:
        field value or null if field not found
      • setFieldFilter

        public final void setFieldFilter​(java.lang.String name,
                                         java.lang.Object filter)
        Set a field filter = shorthand for getField(name).setFilter(filter)
        Parameters:
        name - Field name
        filter - Filter
      • setFieldValue

        public final void setFieldValue​(java.lang.String name,
                                        java.lang.Object value)
        Set a field value = shorthand for getField(name).setValue(value)
        Parameters:
        name - Field name
        value - Value
      • setFieldOldValue

        public final void setFieldOldValue​(java.lang.String name,
                                           java.lang.String value)
        Set a field old value = shorthand for getField(name).setOldValue(value)
        Parameters:
        name - Field name
        value - Value
      • getFieldOrder

        public final int getFieldOrder​(java.lang.String name)
        Get a field order = shorthand for getField(name).getOrder()
        Parameters:
        name - Field name
      • setFieldOrder

        public final void setFieldOrder​(java.lang.String name,
                                        int ord)
        Set a field order = shorthand for getField(name).setOrder(ord)
        Parameters:
        name - Field name
        ord - Order
      • getFields

        public java.util.List<ObjectField> getFields​(java.lang.String[] fields)
        Get specified fields list
      • hasChanged

        public boolean hasChanged​(boolean timestamp)
        Checks if the object has changed
        Parameters:
        timestamp - true to check timestamp fields
        Returns:
        true if a field has changed
      • getDocFields

        public java.util.List<ObjectField> getDocFields()
        Get all document and image fields
        Returns:
        document and image fields, null means no document or image in the object
      • removeField

        public void removeField​(java.lang.String field)
        Remove a field
      • getRowIdField

        public ObjectField getRowIdField()
        Get the object's row ID field
        Returns:
        Row ID field
      • getRowIdFieldIndex

        public int getRowIdFieldIndex()
        Get the object's row ID field index
        Returns:
        Row ID field index
      • isInternalRowId

        public boolean isInternalRowId()
        Is the object using a standard internal row ID field ("row_id")?
        Returns:
        True if a standard row ID field is used
      • isCustomRowId

        public boolean isCustomRowId()
        Is the object using a custom row ID field?
        Returns:
        True if a custom row ID field is used
      • getRowId

        public java.lang.String getRowId()
        Get the current record's row ID value
        Returns:
        Row ID value
      • setRowId

        public void setRowId​(java.lang.String id)
        Set the current record's row ID value
        Parameters:
        id - Row ID value
      • getRowId

        public java.lang.String getRowId​(java.lang.String[] row)
        Get the specified record row row ID value
        Parameters:
        row - Record row (if empty or null get current record's row ID)
        Returns:
        Row ID value
      • getCreatedDate

        public java.lang.String getCreatedDate()
        Get the created date of current record
      • getLastUpdatedDate

        public java.lang.String getLastUpdatedDate()
        Get the last updated date of current record
      • getCreatedBy

        public java.lang.String getCreatedBy()
        Get the creator (login) of current record
      • getLastUpdatedBy

        public java.lang.String getLastUpdatedBy()
        Get the last user (login) of current record
      • getFieldAreas

        public FieldAreas getFieldAreas()
        Get ordered field areas
        Returns:
        List of field areas
      • getFieldArea

        public FieldArea getFieldArea​(int position)

        Gets field area for specified position

        Parameters:
        position - Field area position (0 = technical fields)
        Returns:
        Field area if found, null otherwise
      • getFieldArea

        public FieldArea getFieldArea​(java.lang.String name)

        Gets field area for specified name

        Parameters:
        name - Area name
        Returns:
        Field area if found, null otherwise
      • getImageField

        public ObjectField getImageField()
        Get the first visible field containing an image
        Returns:
        Image field or null if not exists
      • getDefaultSearchSpec

        public java.lang.String getDefaultSearchSpec()
        Get the default search specification
      • setDefaultSearchSpec

        public void setDefaultSearchSpec​(java.lang.String s)
        Set the default search specification (also set the current search specification)
      • getSearchSpec

        public java.lang.String getSearchSpec()
        Get the current search specification
      • setSearchSpec

        public void setSearchSpec​(java.lang.String s)
        Set the current search specification (does not affect default search specification)
      • setSearchSpec

        public void setSearchSpec​(java.lang.String s,
                                  boolean def)
        Set the current search specification
        Parameters:
        def - Also set this search specification as default search specification ?
      • getCtxHelp

        public java.lang.String getCtxHelp​(java.lang.String helpContext)
        Contextual help
        Parameters:
        helpContext - Help context (one of ObjectCtxHelp.CTXHELP_* constants)
      • getCtxHelps

        public java.util.List<ObjectCtxHelp> getCtxHelps()
        Get contextual helps
        Returns:
        Contextual helps
      • setCtxHelps

        public void setCtxHelps​(java.util.List<ObjectCtxHelp> ctxhelps)
        Set contextual helps
        Parameters:
        ctxhelps - Contextual helps
      • setCtxHelp

        public void setCtxHelp​(java.lang.String context,
                               java.lang.String help)
        Set a contextual help
        Parameters:
        context - one of ObjectCtxHelp.CONTEXT_*
        help - Help message
      • getHelp

        public java.lang.String getHelp()
        Get main object help
        Returns:
        Main object help
      • setHelp

        public void setHelp​(java.lang.String help)
        Set main object help
        Parameters:
        help - Main object help
      • isHistoric

        public boolean isHistoric()
        Is historization required?
        Returns:
        True if historization is required
      • setHistoric

        public void setHistoric​(boolean b)
        Set historization required
        Parameters:
        b - Historization required?
      • getHistoricName

        public java.lang.String getHistoricName()
        Get historic object name
        Returns:
        Historic object name
      • getHistoricDBName

        public java.lang.String getHistoricDBName()
        Get historic object physical name (table name)
        Returns:
        Historic object physical name (table name)
      • setHistoricPost

        public void setHistoricPost​(boolean b)
        Set historizable with social post
      • isHistoricPost

        public boolean isHistoricPost()
        Is historizable with social post ?
      • setHistoricLog

        public void setHistoricLog​(boolean b)
        Set single redo log historizable
      • isHistoricLog

        public boolean isHistoricLog()
        Is single redo log historizable?
      • setHistoricRedoLog

        public void setHistoricRedoLog​(boolean b)
        Set full redo log historizable
      • isHistoricRedoLog

        public boolean isHistoricRedoLog()
        Is full redo log historizable?
      • useTimeStamp

        public boolean useTimeStamp()
        Use a timestamp (alias to useTimestamp)?
      • useTimestamp

        public boolean useTimestamp()
        Use a timestamp ?
      • isTimestampOptimistic

        public boolean isTimestampOptimistic()
        Is timestamp optimistic (block if timestamp has changed on save)?
      • isTimestampNonBlocking

        public boolean isTimestampNonBlocking()
        Is timestamp non-blocking (even if the timestamp has changed) ?
      • isTimestampBlocking

        public boolean isTimestampBlocking()
        Is timestamp blocking = locked by a user?
      • setTimestamp

        public void setTimestamp​(int t)
        Set object as using a timestamp TIMESTAMP_*
      • setSearchCreatedDate

        public void setSearchCreatedDate​(boolean b)
        Set 'created date' searchable
      • setSearchCreatedBy

        public void setSearchCreatedBy​(boolean b)
        Set 'created by' searchable
      • setSearchUpdatedDate

        public void setSearchUpdatedDate​(boolean b)
        Set 'updated date' searchable
      • setSearchUpdatedBy

        public void setSearchUpdatedBy​(boolean b)
        Set 'updated by' searchable
      • isMoreSearch

        public boolean isMoreSearch()
        Is the search in extended mode ?
      • setMoreSearch

        public void setMoreSearch​(boolean b)
        Set the search to be in extended mode
      • hasMoreOnSearch

        public boolean hasMoreOnSearch()
        Has extended fields on search ?
      • getMenuSearch

        @Deprecated(forRemoval=true,
                    since="3.x")
        public char getMenuSearch()
        Deprecated, for removal: This API element is subject to removal in a future version.
        Get default search display when accessing the object from the menu
        Returns:
        One of the SEARCH_ constants
      • setMenuSearch

        @Deprecated(forRemoval=true,
                    since="3.x")
        public void setMenuSearch​(char mode)
        Deprecated, for removal: This API element is subject to removal in a future version.
        Set default search display when accessing the object from the menu
        Parameters:
        mode - One of the SEARCH_ constants
      • isListSearch

        public boolean isListSearch()
        Is the search in list accessible?
        Returns:
        True if accessible
      • setListSearch

        public void setListSearch​(boolean b)
        Set whether the search in list is accessible or not to user
        Parameters:
        b - Accessible?
      • getListSearchMode

        public char getListSearchMode()
        Get the search mode when search is accessible on embedded list
        Returns:
        One of the SEARCH_* constants
      • setListSearchMode

        public void setListSearchMode​(char mode)
        Set default search mode on embedded list
        Parameters:
        mode - One of the SEARCH_* constants
      • isListSearchVisible

        @Deprecated(forRemoval=true,
                    since="3.x")
        public boolean isListSearchVisible()
        Deprecated, for removal: This API element is subject to removal in a future version.
        Use getListSearchMode
      • setListSearchVisible

        @Deprecated(forRemoval=true,
                    since="3.x")
        public void setListSearchVisible​(boolean b)
        Deprecated, for removal: This API element is subject to removal in a future version.
        Use setListSearchMode
      • isMoreFormEnable

        @Deprecated(forRemoval=true,
                    since="3.x")
        public final boolean isMoreFormEnable()
        Deprecated, for removal: This API element is subject to removal in a future version.
        Use isMoreOnForm
      • isMoreForm

        @Deprecated(forRemoval=true,
                    since="3.x")
        public final boolean isMoreForm()
        Deprecated, for removal: This API element is subject to removal in a future version.
        Use isMoreOnForm
      • setMoreForm

        @Deprecated(forRemoval=true,
                    since="3.x")
        public final void setMoreForm​(boolean b)
        Deprecated, for removal: This API element is subject to removal in a future version.
        Use setMoreOnForm
      • isMoreOnForm

        public boolean isMoreOnForm()
        Is the form in extended mode?
        Returns:
        True if in extended mode
      • setMoreOnForm

        public void setMoreOnForm​(boolean b)
        Set the form to be in extended mode
        Parameters:
        b - Extended mode?
      • haveMore

        @Deprecated(forRemoval=false,
                    since="3.x")
        public final boolean haveMore()
        Deprecated.
        Use hasMoreOnForm
      • setHaveMore

        @Deprecated(forRemoval=true,
                    since="3.x")
        public final void setHaveMore​(boolean b)
        Deprecated, for removal: This API element is subject to removal in a future version.
        Do not use, does nothing
      • hasMoreOnForm

        public boolean hasMoreOnForm()
        Has extended fields on form ?
      • isMoreOnList

        public boolean isMoreOnList()
        Is the list in extended mode ?
      • setMoreOnList

        public void setMoreOnList​(boolean b)
        Set the list to be in extended mode
      • hasMoreOnList

        public boolean hasMoreOnList()
        Has extended fields on list ?
      • isMoreListEnable

        @Deprecated(forRemoval=true,
                    since="3.x")
        public boolean isMoreListEnable()
        Deprecated, for removal: This API element is subject to removal in a future version.
        Use isMoreRows
      • isMoreRows

        public boolean isMoreRows()
        Is the list in more rows mode ?
      • setMoreRows

        public void setMoreRows​(boolean b)
        Set the list to be in more rows mode
      • setMinRows

        public void setMinRows​(int n)
        Set the list page minimum size (for paginated searches, 0 = use the default granted min size)
        Parameters:
        n - List page minimum size
      • getMinRows

        public int getMinRows()
        Get the list page minimum size (for paginated searches, default = the min rows of user's profile)
        Returns:
        List page minimum size
      • setMaxRows

        public void setMaxRows​(int n)
        Set the list page maximum size (for paginated searches, 0 = use the default granted max size)
        Parameters:
        n - List page maximum size
      • getMaxRows

        public int getMaxRows()
        Get the list maximum size (for paginated search, default = the max rows of user's profile)
        Returns:
        List page maximum size
      • isNew

        public boolean isNew()
        Is new when row ID is equals to "0"
      • isDistinct

        public boolean isDistinct()
        Is distinct ?
      • setDistinct

        public void setDistinct​(boolean b)
        Set object to be distinct
      • getInheritedObjects

        public java.util.List<java.lang.String> getInheritedObjects()
        Get the inherited objects list
      • setInheritedObject

        public void setInheritedObject​(java.lang.String obj)
        Push one inherited objects
      • isInstanceOf

        public boolean isInstanceOf​(java.lang.String name)
        Check the object inheritance
      • useForm

        public boolean useForm()
        Use the form ?
      • setForm

        public void setForm​(boolean b)
        Set the object to use the form
      • isLimit

        @Deprecated(forRemoval=true,
                    since="3.x")
        public final boolean isLimit()
        Deprecated, for removal: This API element is subject to removal in a future version.
        Use useLimit
      • useLimit

        public boolean useLimit()
        Use list pagination ?
      • setLimit

        public void setLimit​(boolean b)
        Set the object to use list pagination
      • isPredefSearch

        public boolean isPredefSearch()
        Use predefined search ?
      • getPredefSearch

        public int getPredefSearch()
        Use predefined search ?
      • setPredefSearch

        public void setPredefSearch​(boolean b)
        Set the object to use and edit predefined search
      • setPredefSearch

        public void setPredefSearch​(boolean use,
                                    boolean edit)
        Set the object to use predefined search
        Parameters:
        use - Use only the predefined searches thru search dialog
        edit - Edit and use the predefined searches thru search dialog
      • setPredefSearch

        public void setPredefSearch​(java.lang.String predef)
        Set the object to use predefined search
        Parameters:
        predef - Enum multiple PREDEF_SEARCH_*
      • isPredefSearchOnList

        public boolean isPredefSearchOnList()
        Access to predefined search on list ?
      • setPredefSearchOnList

        public void setPredefSearchOnList​(boolean b)
        Set the object to access predefined search on list
      • isQuerySpecific

        public boolean isQuerySpecific()
        Use a specific query ?
      • setQuerySpecific

        public void setQuerySpecific()
        Force the object to use a specific query (this forces the table name)
      • setQuerySpecific

        public void setQuerySpecific​(boolean b)
        Set the object as using a specific query (without altering the table name)
      • isServiceSpecific

        public boolean isServiceSpecific()
        Use a specific service (not a query) ?
      • setServiceSpecific

        public void setServiceSpecific()
        Force the object to use a specific service (this forces table name)
      • setServiceSpecific

        public void setServiceSpecific​(boolean b)
        Set the object as using a specific service (without altering the table name)
      • canExport

        public boolean canExport()
        Allow export ?
      • setExport

        public void setExport​(boolean enabled)
        Set object to allow export
      • setExport

        public void setExport​(boolean enabled,
                              boolean plus)
        Set object to allow export
      • isExportAllowed

        public java.lang.String isExportAllowed​(java.lang.String mode,
                                                java.lang.String media,
                                                java.lang.String rowId)
        Is requested export allowed?
        Parameters:
        mode - ObjectXML.MODE_* full | form | list | pref
        media - ServletTool.MEDIA_*
        rowId - Optional ID (form export)
        Returns:
        Error to denied export, Warning to confirm on UI or null to allow export
      • setExportTimestamp

        public void setExportTimestamp​(boolean enabled)
        Set object to allow timestamp fields export. by default only ADMIN
      • canExportTimestamp

        public boolean canExportTimestamp()
        Is export allowed for timestamp fields?
        Returns:
        true if ADMIN by default
      • setBookmark

        public void setBookmark​(boolean enabled,
                                boolean plus)
        Set object to allow bookmark (disabled if user has no BOOKMARK responsibility)
      • isBookmark

        public boolean isBookmark()
        Has a bookmark access?
      • genAction

        public Action genAction​(java.lang.String name,
                                char type,
                                java.lang.String label,
                                java.lang.String img,
                                int pos,
                                boolean enabled,
                                boolean plus,
                                int count)
        Generate a common action (internal usage)
        Parameters:
        name - Action name (reload, export, prefs, crosstab...)
        type - Action type
        label - Action label
        img - Action icon
        pos - Action position
        enabled - Add or remove the action
        plus - add to plus button
        count - count selected rows?
      • genCommonActions

        public void genCommonActions()
        Generate common Actions: Reload, Preference, Export, Delete...
      • canListAccessNewForm

        public boolean canListAccessNewForm()
        Allow list to access new form ?
      • canListAccessNewLine

        public boolean canListAccessNewLine()
        Allow list to add one row on list ?
      • canListAccessNewLoop

        public boolean canListAccessNewLoop()
        Allow list to add row on list in loop ?
      • isListEditable

        public boolean isListEditable()
        Allow rows to be editable ?
      • isListUpsertable

        public boolean isListUpsertable()
        Allow create+rows to be editable ?
      • setListEdit

        public void setListEdit​(java.lang.String edit)
        Set list editable
        Parameters:
        edit - Enum multiple N;L;E;U = Create form; Create on list; list editable; Upsert on list
      • setListEdit

        public void setListEdit​(java.lang.String edit,
                                boolean plusAddList,
                                boolean plusEditList,
                                boolean plusUpsertList)
        Set list editable
        Parameters:
        edit - Enum multiple N;L;E = Create form; Create on list; list editable
        plusAddList - Create on list in the plus button ?
        plusEditList - Edit list in the plus button ?
        plusUpsertList - Upsert on list in the plus button ?
      • setListEditable

        public void setListEditable​(boolean b)
        Set list editable and generate the 'listedit' action
        Parameters:
        b - list edit allowed ?
      • setListEditable

        public void setListEditable​(boolean b,
                                    boolean plus)
        Set list editable and generate the 'listedit' action
        Parameters:
        b - list edit allowed ?
        plus - add to plus button ?
      • setListUpsertable

        public void setListUpsertable​(boolean b,
                                      boolean plus)
        Set list create+editable and generate the 'listupsert' action
        Parameters:
        b - action allowed ?
        plus - add to plus button ?
      • setListAccessNewForm

        public void setListAccessNewForm​(boolean b)
        Display the 'New' form button
        Parameters:
        b - new form allowed ?
      • setListAccessNewLine

        public void setListAccessNewLine​(boolean b)
        Display the New line button, generate the 'addlist' action
        Parameters:
        b - new in list allowed ?
      • setListAccessNewLine

        public void setListAccessNewLine​(boolean b,
                                         boolean loop,
                                         boolean plus)
        Display the New line button, generate the 'addlist' action
        Parameters:
        b - new in list allowed ?
        loop - stays on the new line mode after save ?
        plus - add to plus button ?
      • getListEditMode

        public java.lang.String getListEditMode()
        List edit mode
        Returns:
        LIST_EDIT_* or null
      • setListEditMode

        public void setListEditMode​(java.lang.String mode)
        Set object to allow edit list
        Parameters:
        mode - LIST_EDIT_*
      • canPrint

        public boolean canPrint()
        Can print?
        Returns:
        True if can print
      • setPrint

        public void setPrint​(boolean b)
        Set can print
        Parameters:
        b - Can print?
      • canCopy

        public boolean canCopy()
        Allow copy ?
      • setCopy

        public void setCopy​(boolean enabled)
        Set object to allow copy
      • setCopy

        public void setCopy​(boolean enabled,
                            boolean plus)
        Set object to allow copy
      • canSave

        public boolean canSave()
        Allow save form ?
      • setSave

        public void setSave​(boolean b)
        Set object to allow save form
      • canClose

        public boolean canClose()
        Allow close form ?
      • setClose

        public void setClose​(boolean b)
        Set object to allow close form
      • canSaveAndClose

        public boolean canSaveAndClose()
        Allow save/close form ?
      • setSaveAndClose

        public void setSaveAndClose​(boolean b)
        Set object to allow save/close form
      • canSaveAndNew

        public boolean canSaveAndNew()
        Allow save/new form ?
      • setSaveAndNew

        public void setSaveAndNew​(boolean b)
        Set object to allow save/new form
      • canSaveAndCopy

        public boolean canSaveAndCopy()
        Allow save/copy form ?
      • setSaveAndCopy

        public void setSaveAndCopy​(boolean b)
        Set object to allow save/copy form
      • canUpdateAll

        public boolean canUpdateAll()
        Allow bulk update ?
      • setUpdateAll

        public void setUpdateAll​(boolean enabled)
        Set object to allow bulk update
      • setUpdateAll

        public void setUpdateAll​(boolean enabled,
                                 boolean plus)
        Set object to allow bulk update
      • canDeleteAll

        public boolean canDeleteAll()
        Allow bulk delete ?
      • setDeleteAll

        public void setDeleteAll​(boolean enabled)
        Set object to allow bulk delete
      • setDeleteAll

        public void setDeleteAll​(boolean enabled,
                                 boolean plus)
        Set object to allow bulk delete
      • canFollowLinks

        public boolean canFollowLinks()
        Allow follow links ?
      • setFollowLinks

        public void setFollowLinks​(boolean b)
        Set object to allow follow links
      • canFollowLink

        public boolean canFollowLink​(ObjectField refField)
        Allow follow a specific link ?
        Parameters:
        refField - Reference field (foreign key)
        Returns:
        true by default, to override to limit some link access
      • canFollowLink

        public boolean canFollowLink​(ObjectDB inlineObject)
        Allow follow a specific link ?
        Parameters:
        inlineObject - Object in 0,1 link
        Returns:
        true by default, to override to limit some link access
      • canCreateOnLinks

        public boolean canCreateOnLinks()
        Allow create on links ?
      • setCreateOnLinks

        public void setCreateOnLinks​(boolean b)
        Set object to allow create on links
      • canCreateOnLink

        public boolean canCreateOnLink​(ObjectField refField)
        Allow create on specific link ?
        Parameters:
        refField - Reference field
        Returns:
        true by default, to override to limit some link creation
      • canPreview

        public boolean canPreview​(ObjectField f,
                                  DocumentDB doc)
        Hook to limit access to Document preview
        Parameters:
        f - Field
        doc - Document
        Returns:
        true if permitted
      • getCopyId

        public java.lang.String getCopyId()
        Get row id of the item to copy
      • setCopyId

        public void setCopyId​(java.lang.String b)
        Set row id of the item to copy
      • isCopied

        public boolean isCopied()
        Is current creation a copy from another item
      • isReadOnly

        public boolean isReadOnly()
        Globally read only
      • setReadOnly

        public void setReadOnly​(boolean b)
        Set globally read only : freeze fields and update actions, keep access to search, select and export
      • isReadOnlyFields

        public boolean isReadOnlyFields()
        In case of state model, is the current status set to a read-only state ?
      • getSearchLimit

        public int getSearchLimit()
        Search limit ?
      • setSearchLimit

        public void setSearchLimit​(int n)
        Set object to have a search limit
      • hasSearchLimitError

        public boolean hasSearchLimitError()
        Error on over search limit searches
      • setSearchLimitError

        public void setSearchLimitError​(boolean b)
        Set objet to generate error on over search limit searches
      • setAreaVisibleOnList

        public void setAreaVisibleOnList​(boolean b)
        Set area block visible on list header
        Parameters:
        b - true to display areas on list
      • isAreaVisibleOnList

        public boolean isAreaVisibleOnList()
        Is area block visible on list header?
        Returns:
        true to display areas on list
      • setSortableOnList

        public void setSortableOnList​(boolean b)
        Set columns sortable on list header
        Parameters:
        b - true to allow ordering on columns
      • isSortableOnList

        public boolean isSortableOnList()
        Is columns sortable on list header?
        Returns:
        true to allow ordering on columns
      • isMainInstance

        public boolean isMainInstance()
        Is the main instance
      • isPanelInstance

        public boolean isPanelInstance()
        Is a panel instance (0,n link)
      • isRefInstance

        public boolean isRefInstance()
        Is a reference instance (object picker)
      • isDataMapInstance

        public boolean isDataMapInstance()
        Is a data mapping instance
      • isHomeInstance

        public boolean isHomeInstance()
        Is a home instance
      • isBatchInstance

        public boolean isBatchInstance()
        Is a batch instance (for import XML eai_)
      • isWebServiceInstance

        public boolean isWebServiceInstance()
        Is a webservice instance (include ws_, soap_ and rest_ and api_)
      • isAjaxInstance

        public boolean isAjaxInstance()
        Is an ajax instance (include ajax_, the_ajax_, panel_ajax_...)
      • isTmpInstance

        public boolean isTmpInstance()
        Is a temporary instance
      • isProcessInstance

        public boolean isProcessInstance()
        Is a process instance
      • isTreeviewInstance

        public boolean isTreeviewInstance()
        Is a treeview instance
      • isAgendaInstance

        public boolean isAgendaInstance()
        Is a agenda instance
      • isPrintInstance

        public boolean isPrintInstance()
        Is a publication instance
      • isModelerInstance

        public boolean isModelerInstance()
        Is a modeler instance
      • isCronInstance

        public boolean isCronInstance()
        Is a cron instance
      • isExportInstance

        public boolean isExportInstance()
        Is a export instance
      • isMergeInstance

        public boolean isMergeInstance()
        Is a merge instance
      • isUIInstance

        public boolean isUIInstance()
        Is current instance a UI instance (main, panel, home...)
      • isIDEInstance

        public boolean isIDEInstance()
        Is an IDE instance (for use from an externale dev environment)
      • isUndoableInstance

        public boolean isUndoableInstance()
        Is current instance undoable ? (exclude core system such as loggers, cron, index, document...)
      • getRootField

        public ObjectField getRootField​(ObjectField f)

        Watch for a root parent field in the object

        Parameters:
        f - Object field
        Returns:
        Root field if exists or null if the field is not referenced
      • getParentField

        @Deprecated(forRemoval=true,
                    since="5")
        public ObjectField getParentField​(ObjectCore parent,
                                          ObjectField childField)
        Deprecated, for removal: This API element is subject to removal in a future version.
        Outdated, do not use
      • getRefField

        public ObjectField getRefField​(ObjectField f)
        Should not be used. Prefer f.getParentField() directly when the object is loaded. This method evaluates a parent field in the fields list during the object loading.
        Parameters:
        f - Object field
        Returns:
        Parent field if exists or null
      • setTitle

        public void setTitle​(java.lang.String d)
        Set the title definition with fields under brackets: [field] or [VALUE:field]
      • getTitle

        public java.lang.String getTitle()
        Substitute extended title with current values
        Returns:
        Current object title, or an empty string if title is not defined or an error occurs
      • getTitle

        public java.lang.String getTitle​(java.lang.String[] row)
        Substitute extended title [VALUE:field] with current values or specified row
        Parameters:
        row - Any record, if row is null, the selected fields are used
        Returns:
        Current object title, or an empty string if title is not defined or an error occurs
      • getContextTitle

        public java.lang.String getContextTitle​(int context)
        Contextual title to display
      • getLinks

        public java.util.List<Link> getLinks()
        Get all objects links
      • getLink

        public Link getLink​(java.lang.String childObject,
                            java.lang.String refField)
        Get a link definition
        Parameters:
        childObject - Child object name
        refField - Foreign key name
        Returns:
        Link or null
      • removeLink

        public Link removeLink​(java.lang.String childObject,
                               java.lang.String refField)
        Remove a link (and related view)
        Parameters:
        childObject - Child object name
        refField - Foreign key name
        Returns:
        Removed Link or null
      • getFonctId

        @Deprecated(forRemoval=true,
                    since="5")
        public java.util.List<ObjectField> getFonctId()
        Deprecated, for removal: This API element is subject to removal in a future version.
        Use getFunctId
      • getFunctId

        public java.util.List<ObjectField> getFunctId()
        Get functional keys fields.
        Returns:
        List of functional key fields
      • getGrant

        public Grant getGrant()
        Get grant (user rights)
        Returns:
        Grant
      • setGrant

        public void setGrant​(Grant g)
        Set grant (user rights)
        Parameters:
        g - Grant
      • getActions

        public java.util.List<Action> getActions()
        Get all action
      • getAction

        public Action getAction​(java.lang.String name)
        Get specified action
      • getCurrentAction

        public java.lang.String getCurrentAction()
        Get current custom action (null if no action)
      • setCurrentAction

        public void setCurrentAction​(java.lang.String a)
        Set current custom action (null if no action)
      • getCurrentTransition

        public FieldStateTransition getCurrentTransition()
        Get current transition (null if no transition during the save)
        Returns:
        Current transition
      • setCurrentTransition

        public void setCurrentTransition​(FieldStateTransition t)
        Set current transition
        Parameters:
        t - Current transition
      • getListOperationFields

        public java.util.List<ObjectField> getListOperationFields()
        Get fields for list operations
      • addListOperationField

        public void addListOperationField​(ObjectField f)
        Add a field for list operations
      • getCurrentPage

        public int getCurrentPage()
        Get current page number in list pagination
        Returns:
        Current page number
      • setCurrentPage

        public void setCurrentPage​(int page)
        Set current page number in list pagination
        Parameters:
        page - Current page number
      • getMaxPage

        public int getMaxPage()
        Get maximum pages in list pagination
        Returns:
        Max pages
      • setMaxPage

        public void setMaxPage​(int m)
        Set maximum pages in list pagination
      • getCurrentList

        public java.util.List<java.lang.String[]> getCurrentList()
        Get current list from the last search
        Returns:
        Current list
      • setCurrentList

        public void setCurrentList​(java.util.List<java.lang.String[]> rows)
        Set current list
        Parameters:
        rows - Current list
      • getListSize

        public int getListSize()
        Get page size of list
        Returns:
        Page size
      • getPageSize

        public int getPageSize()
        Alias to getListSize()
        Returns:
        Page size
      • setListSize

        public void setListSize​(int size)
        Set page size of list
        Parameters:
        size - Page size
      • setPageSize

        public void setPageSize​(int size)
        Alias to setListSize()t
        Parameters:
        size - Page size
      • preparePagination

        public final void preparePagination​(long nbRows,
                                            int maxRows)
        Prepare pagination
        Parameters:
        nbRows - Number of rows
        maxRows - Max number of rows
      • getSelectedIds

        public java.util.List<java.lang.String> getSelectedIds()
        Get current selected rows. null = 'all rows selected' to limit heap size for huge table. Empty list = nothing has been selected.
      • resetSelectedIds

        public void resetSelectedIds()
        Reset current selected rows.
      • setSelectedIds

        public void setSelectedIds​(java.util.List<java.lang.String> ids)
        Set selected rows
        Parameters:
        ids - List of row id or null = all selected
      • listSelectId

        @Deprecated(forRemoval=false,
                    since="5")
        public boolean listSelectId​(java.lang.String id)
        Deprecated.
        Use listSelectId with additional argument
      • listSelectId

        public boolean listSelectId​(java.lang.String id,
                                    boolean toggle)
        Select a row id, or remove it if already selected
        Parameters:
        id - Row Id
        toggle - true to remove the id if already selected
        Returns:
        true if selected
      • listSelectPage

        public void listSelectPage()
        Select current page rows
      • listSelectAll

        public void listSelectAll()
        Select all
      • listUnselectId

        public void listUnselectId​(java.lang.String id)
        Unselect a row id
      • listUnselectAll

        public void listUnselectAll()
        Unselect all rows
      • canSelectRow

        public boolean canSelectRow()
        Can select record on object list ?
      • setSelectRow

        public void setSelectRow​(boolean b)
        Allow list rows selection
      • isMergeable

        public boolean isMergeable()
        Can merge rows together ?
      • setMergeable

        public void setMergeable​(boolean enabled)
        Allow to merge rows selection (only if user can select rows)
      • setMergeable

        public void setMergeable​(boolean enabled,
                                 boolean plus)
        Allow to merge rows selection (only if user can select rows and has update and delete rights)
      • isSocial

        public boolean isSocial()
        Use a social feature?
      • isSocialPopup

        public boolean isSocialPopup()
        Posts dialog ?
      • isSocialInline

        public boolean isSocialInline()
        Inline posts on form ?
      • isSocialShare

        public boolean isSocialShare()
        Can share object ?
      • setSocial

        public void setSocial​(boolean b)
        Allows to post social messages + share
      • setSocial

        public void setSocial​(boolean popup,
                              boolean inline,
                              boolean share)
        Allows to post social messages
        Parameters:
        popup - Display posts in a dialog
        inline - Display post on bottom of form
        share - Allows to share the object
      • setCurrentPos

        public void setCurrentPos​(int i)
        Set current list item position in current page
      • setCurrentPos

        public void setCurrentPos​(java.lang.String row_id)
        Set current list item position (using row id) in current page
      • getCurrentPos

        public int getCurrentPos()
        Get current list item position in current page
      • getCurrentItem

        public java.lang.String[] getCurrentItem()
        Get current list item in current page
      • selectItemFromList

        public void selectItemFromList​(int pos)
        Select current list item for specified position as current item
      • selectCurrentItemFromList

        public void selectCurrentItemFromList()
        Select current position list item as current item
      • getCurrentRowId

        public java.lang.String getCurrentRowId()
        Get current item row id in current page
      • isListTree

        public boolean isListTree()
        Use tree in list ?
      • setListTree

        public void setListTree​(boolean b)
        Set object to use tree in list ?
      • getListTree

        public ObjectNode getListTree()
        Get stored tree in memory
      • freeListTree

        public void freeListTree()
        Set stored tree in memory
      • addReflexiveLink

        public void addReflexiveLink​(Link link)
        Add reflexive link
        Parameters:
        link - Link
      • getReflexiveLinks

        public java.util.List<Link> getReflexiveLinks()
        Get all reflexive links
      • getReflexiveLink

        public Link getReflexiveLink​(boolean hasDepth)
        Get first reflexive link with depth to show
        Parameters:
        hasDepth - only link with a tree depth
        Returns:
        Link or null
      • getLinkDataMap

        @Deprecated(forRemoval=false,
                    since="5")
        public java.util.List<LinkDatamap> getLinkDataMap()
        Deprecated.
        Do not use, deported in FK
      • addLinkDataMap

        @Deprecated(forRemoval=false,
                    since="5")
        public void addLinkDataMap​(LinkDatamap map)
        Deprecated.
        Do not use, deported in FK
      • getDataMap

        public java.util.List<java.util.List<Datamap>> getDataMap()
        Get data mappings
        Returns:
        List of data mappings
      • addDataMap

        public void addDataMap​(java.util.List<Datamap> map)
        Add data mapping
        Parameters:
        map - Data mapping
      • getUITemplate

        public java.lang.String getUITemplate()
        Get front UI template
      • setUITemplate

        public void setUITemplate​(java.lang.String t)
        Set front UI template
      • getUIMiniature

        public java.lang.String getUIMiniature()
        Get front UI miniature
      • setUIMiniature

        public void setUIMiniature​(java.lang.String t)
        Set front UI miniature
      • getViews

        public java.util.List<View> getViews()
        Get all the object's views.
        Returns:
        The list of the object's views
      • getView

        @Deprecated(forRemoval=false,
                    since="4.0")
        public java.util.List<View> getView()
        Deprecated.
        use getViews
      • getView

        public View getView​(java.lang.String name)
        Get a view.
        Parameters:
        name - View name
        Returns:
        View
      • removeView

        public View removeView​(java.lang.String name)
        Remove a view.
        Parameters:
        name - View name
        Returns:
        Removed View or null
      • getViewMode

        public char getViewMode()
        Get the view mode.
        Returns:
        One of the VIEW_MODE_* constants
      • setViewMode

        public void setViewMode​(char mode)
        Set the view mode.
        Parameters:
        mode - One of the VIEW_MODE_* constants
      • getDefaultLink

        public java.lang.String getDefaultLink()
        Default view to display on object form
      • setDefaultLink

        public void setDefaultLink​(java.lang.String view)
        Set the default view to display on object form
      • setCurrentView

        public void setCurrentView​(java.lang.String view,
                                   boolean checkRef)
        Set the current view
        Parameters:
        view - View name or Link name as childObject;childForeignKey
        checkRef - Checks if the view or link can be referenced
      • getCurrentView

        public java.lang.String getCurrentView()
        Get the current view
      • getPredefinedSearch

        @Deprecated(forRemoval=false,
                    since="5")
        public java.util.List<PredefinedSearch> getPredefinedSearch()
        Deprecated.
        Use the getPredefinedSearches
      • getPredefinedSearches

        public java.util.List<PredefinedSearch> getPredefinedSearches()
        Hook to get accessible predefined searches.
        Returns:
        the granted public and private searches on object
      • addPredefinedSearch

        public void addPredefinedSearch​(PredefinedSearch ps)
        Add a predefined search
        Parameters:
        ps - Predefined search definition
      • getPredefinedSearchIndex

        public int getPredefinedSearchIndex()
        Get selected predefined search
      • setPredefinedSearchIndex

        public void setPredefinedSearchIndex​(int i)
        Set selected predefined search by index
      • getPredefinedSearchIndex

        public int getPredefinedSearchIndex​(java.lang.String id)
        Get predefined search index by id
      • getPredefinedSearch

        public PredefinedSearch getPredefinedSearch​(int index)
        Get predefined search by index
      • getPredefinedSearch

        public PredefinedSearch getPredefinedSearch​(java.lang.String id)
        Get predefined search by Id
      • getPredefinedSearchSelected

        public PredefinedSearch getPredefinedSearchSelected()
        Get selected predefined search on UI
      • setCacheSelect

        public void setCacheSelect​(java.lang.String req)
        Get cached select statement
      • getCacheSelect

        public java.lang.String getCacheSelect()
        Set cached select statement
      • setCacheFrom

        public void setCacheFrom​(java.lang.String req)
        Get cached from statement
      • getCacheFrom

        public java.lang.String getCacheFrom()
        Set cached from statement
      • setParentObject

        public void setParentObject​(ObjectCore obj)
        Set the contextual parent object for child lists
      • getParentObject

        public ObjectCore getParentObject()
        Get the contextual parent object for child lists
      • isChildOf

        public boolean isChildOf​(java.lang.String parentName)
        Check if object is child of specified object
        Parameters:
        parentName - Parent object name
      • isChildOf

        public boolean isChildOf​(java.lang.String parentName,
                                 java.lang.String parentRefField)
        Check if object is child of specifed object thru specified field
        Parameters:
        parentName - Parent object name
        parentRefField - Parent reference field name
      • isPanelOf

        public boolean isPanelOf​(java.lang.String parentName)
        Check if object is panel of specified object
        Parameters:
        parentName - Parent object name
      • isPanelOf

        public boolean isPanelOf​(java.lang.String parentName,
                                 java.lang.String parentRefField)
        Check if object is panel of specified object thru specified field
        Parameters:
        parentName - Parent object name
        parentRefField - Parent reference field name
      • isReferencedFrom

        public boolean isReferencedFrom​(java.lang.String objectName)
        Check if object is referenced from specified object
        Parameters:
        objectName - Object name
      • isReferencedFrom

        public boolean isReferencedFrom​(java.lang.String objectName,
                                        java.lang.String refField)
        Check if object is referenced from specified object thru specified field
        Parameters:
        objectName - Object name
        refField - Reference field name
      • isDataMappedFrom

        public boolean isDataMappedFrom​(java.lang.String objectName)
        Check if object is data mapped from specified object
        Parameters:
        objectName - Object name
      • setParentObjectRefField

        public void setParentObjectRefField​(java.lang.String field)
        Set the child field that references parent object for child lists
        Parameters:
        field - Field name
      • getParentObjectRefField

        public java.lang.String getParentObjectRefField()
        Get the child field that references parent object for child lists
        Returns:
        Field name
      • getParentValues

        public java.lang.String[] getParentValues()
        Get parent values (used to limit search in where clause)
        Returns:
        Row of parent values
      • setParentValues

        public void setParentValues​(java.lang.String[] values)
        Set parent values (used to limit search in where clause)
        Parameters:
        values - Row of parent values
      • setCrosstabVisibility

        public void setCrosstabVisibility​(boolean visibility)
        Set pivot table visibility
        Parameters:
        visibility - Visibility
      • getCrosstabs

        public java.util.Map<java.lang.String,​Crosstab> getCrosstabs()
        Get pivot tables
        Returns:
        Map of pivot tables
      • getCrosstab

        public Crosstab getCrosstab​(java.lang.String name)
        Get pivot table
        Parameters:
        name - Pivot table name
        Returns:
        Pivot table
      • addCrosstab

        public void addCrosstab​(Crosstab ctb)
        Add pivot table
        Parameters:
        ctb - Pivot table
      • setPrintTemplateVisibility

        public void setPrintTemplateVisibility​(boolean visibility)
        Set publication template visibility
        Parameters:
        visibility - Visibility
      • getPrintTemplates

        public java.util.Map<java.lang.String,​PrintTemplate> getPrintTemplates()
        Get publication templates
        Returns:
        Map of publication templates
      • getPrintTemplate

        public PrintTemplate getPrintTemplate​(java.lang.String name)
        Get publication template
        Parameters:
        name - Print template name
        Returns:
        Publication template
      • addPrintTemplate

        public void addPrintTemplate​(PrintTemplate prt)
        Add publication template
        Parameters:
        prt - Publication template
      • getCode

        public java.lang.String getCode​(java.lang.String field,
                                        java.lang.String displayValue)
        Get the code of the enumeration display value.
        Parameters:
        field - Field
        displayValue - Display value
        Returns:
        The code of the list of value
      • getCodes

        @Deprecated(forRemoval=true,
                    since="5")
        public java.lang.String[] getCodes()
        Deprecated, for removal: This API element is subject to removal in a future version.
        same as getValues()
        Retrieve current object fields codes as array of string (same as list items).
        Returns:
        string array of current object fields codes
      • getField

        public final ObjectField getField​(java.lang.String name)
        Get a field from logical name, can be either a simple name or input name or full input name.
        Parameters:
        name - Name
        Returns:
        Field or null if unknown
      • getField

        public ObjectField getField​(java.lang.String name,
                                    boolean err)
        Get a field from logical name (can be either a simple name or input name or full input name).
        Parameters:
        name - Name
        err - Raise error if not found ?
        Returns:
        Field or null if unknown
      • hasField

        public boolean hasField​(java.lang.String name)
        Check whether a logical name (can be either a simple name or input name or full input name) corresponds to an object field.
        Parameters:
        name - Name
        Returns:
        True if the name corresponds to an object field
      • hasFieldType

        public boolean hasFieldType​(int type,
                                    java.lang.String rendering)
        Check whether at least one object field is of specified type and optional rendering.
        Parameters:
        type - Type
        rendering - Rendering
        Returns:
        True if at least one object field is of specified type and optional rendering
      • getFieldsByType

        public java.util.List<ObjectField> getFieldsByType​(int type,
                                                           java.lang.String rendering)
        Search object fields with specified type and optional rendering.
        Parameters:
        type - Type
        rendering - Rendering
        Returns:
        List of fields or empty list
      • getFieldsDocument

        public java.util.List<ObjectField> getFieldsDocument()
        Search document and image fields
        Returns:
        List of fields or empty list
      • hasIndexableFields

        public boolean hasIndexableFields()
        Does the object contains indexable fields?
        Returns:
        True if the object contains indexable fields
      • getFieldByTranslation

        public ObjectField getFieldByTranslation​(java.lang.String display,
                                                 boolean err)
        Get a field from its translation.
        Parameters:
        display - displayed label
        err - Raise error if not found ?
        Returns:
        Field or null if unknown
      • getInput

        public final ObjectField getInput​(java.lang.String name)
        Get a field from logical input name
        Parameters:
        name - Input name
        Returns:
        Field or null if unknown
      • getInput

        public ObjectField getInput​(java.lang.String name,
                                    boolean err)
        Get a field from logical input name.
        Parameters:
        name - Input name
        err - Raise error if not found ?
        Returns:
        Field or null if unknown
      • getFieldFromColumn

        public ObjectField getFieldFromColumn​(java.lang.String column)
        Get a field from physical column name.
        Parameters:
        column - Column name
        Returns:
        Field or null if unknown
      • getFieldFromColumn

        public ObjectField getFieldFromColumn​(java.lang.String column,
                                              boolean err)
        Get a field from physical column name.
        Parameters:
        column - Column name
        err - Raise error if not found ?
        Returns:
        Field or null if unknown
      • hasInput

        public boolean hasInput​(java.lang.String name)
        Check whether an input name correspond to an object field
      • getFullInput

        public final ObjectField getFullInput​(java.lang.String name)
        Get a field from logical full input name.
        Parameters:
        name - Full input name
        Returns:
        Field or null if unknown
      • getFullInput

        public ObjectField getFullInput​(java.lang.String name,
                                        boolean err)
        Get a field from logical full input name.
        Parameters:
        name - Full input name
        err - Raise error if not found ?
        Returns:
        Field or null if unknown
      • hasFullInput

        public boolean hasFullInput​(java.lang.String name)
        Check whether an full input name corresponds to an object field.
        Parameters:
        name - Full input name
        Returns:
        True if the full input name corresponds to an object field
      • getDbField

        @Deprecated(forRemoval=false,
                    since="3.x")
        public final ObjectField getDbField​(java.lang.String dbname)
        Deprecated.
        Use getDBField
      • getDBField

        public ObjectField getDBField​(java.lang.String dbname)
        Get a field from physical name
        Parameters:
        dbname - DB name
        Returns:
        Field or null if unknown
      • getIndex

        @Deprecated(forRemoval=false,
                    since="4.0")
        public final int getIndex​(java.lang.String name)
        Deprecated.
        Use getFieldIndex
      • getIndex

        @Deprecated(forRemoval=false,
                    since="4.0")
        public final int getIndex​(java.lang.String name,
                                  boolean err)
        Deprecated.
        Use getFieldIndex
      • getFieldIndex

        public final int getFieldIndex​(java.lang.String name)
        Get the field index from logical name (either simple name or input name or full input name)
        Parameters:
        name - Logical name
        Returns:
        Field index or -1 if unknown
      • getFieldIndex

        public int getFieldIndex​(java.lang.String name,
                                 boolean err)
        Get the field index from logical name, either simple name or input name or full input name.
        Parameters:
        name - Name
        err - Raise error if not found?
        Returns:
        Field index or -1 if unknown
      • getInputIndex

        public final int getInputIndex​(java.lang.String name)
        Get the field index from logical input name.
        Parameters:
        name - Name
        Returns:
        Field index or -1 if unknown
      • getInputIndex

        public int getInputIndex​(java.lang.String name,
                                 boolean err)
        Get the field index from logical input name.
        Parameters:
        name - Name
        err - Raise error if not found ?
        Returns:
        Field index or -1 if unknown
      • getFullInputIndex

        public final int getFullInputIndex​(java.lang.String name)
        Get the field index from logical full input name
        Parameters:
        name - Name
        Returns:
        Field index or -1 if unknown
      • getFullInputIndex

        public int getFullInputIndex​(java.lang.String name,
                                     boolean err)
        Get the field index from logical full input name.
        Parameters:
        name - Name
        err - Raise error if not found ?
        Returns:
        Field index or -1 if unknown
      • getFieldByObjectFieldId

        public ObjectField getFieldByObjectFieldId​(java.lang.String obfId)
        Get a field from an object field row ID
        Parameters:
        obfId - Object field row ID
        Returns:
        Field or null if not found
      • getFieldAtIndex

        @Deprecated(forRemoval=true,
                    since="4.0")
        public ObjectField getFieldAtIndex​(int index)
        Deprecated, for removal: This API element is subject to removal in a future version.
        Use getField
      • getInputAtIndex

        @Deprecated(forRemoval=true,
                    since="4.0")
        public ObjectField getInputAtIndex​(int index)
        Deprecated, for removal: This API element is subject to removal in a future version.
        Use getField
      • getDbIndex

        @Deprecated(forRemoval=true,
                    since="4.0")
        public final int getDbIndex​(java.lang.String dbname)
        Deprecated, for removal: This API element is subject to removal in a future version.
        Use getDBIndex
      • getDBIndex

        public int getDBIndex​(java.lang.String dbname)
        Get the field index from physical name.
        Parameters:
        dbname - DB name
        Returns:
        Field index or -1
      • getParentIdx

        public int getParentIdx()
        Search an index of one field that references the object.
        Returns:
        field index
      • setFunctId

        public void setFunctId()
        Build the functional key and object field hierarchy.
        It belongs to the object user key if:
        - the field is a Functional key
        - and its parent field too when the field is referenced
      • isDate

        @Deprecated(forRemoval=false,
                    since="5")
        public boolean isDate​(java.lang.String dd,
                              java.lang.String mm,
                              java.lang.String yyyy)
        Deprecated.
        Use Tool.isDate
      • convertGuiToService

        public java.lang.String convertGuiToService​(ObjectField f,
                                                    java.lang.String value)
      • convertFilterToService

        public java.lang.String convertFilterToService​(ObjectField f,
                                                       java.lang.String filter)
      • convertServiceToGui

        public java.lang.String convertServiceToGui​(ObjectField f,
                                                    java.lang.String value)
      • convertServiceToFilter

        public java.lang.String convertServiceToFilter​(ObjectField f,
                                                       java.lang.String filter)
      • isRefCount

        public boolean isRefCount()
        Is count links enabled?
        Returns:
        True if count links is enabled
      • setRefCount

        public void setRefCount​(boolean b)
        Set count links
      • getIconCode

        public java.lang.String getIconCode()
        Get icon code.
        Returns:
        Icon code
      • setIconCode

        public void setIconCode​(java.lang.String i)
        Set icon code
      • getFormLayout

        public int getFormLayout()
        Get form layout.
        Returns:
        Form layout (one of FORM_LAYOUT_* constants)
      • setFormLayout

        public void setFormLayout​(int formLayout)
        Set form layout.
        Parameters:
        formLayout - Form layout (one of FORM_LAYOUT_* constants)
      • getStatusField

        public ObjectField getStatusField()
        Gets the status field of a state model object (or null if the object is not a state model object).
        Returns:
        Status field or null
      • setStatusField

        public void setStatusField​(ObjectField statusField)
        Sets the status field of a state model object.
        Parameters:
        statusField - Status field
      • getStatusIndex

        public int getStatusIndex()
        Gets the status field index of a state model object (or -1 if the object is not a state model object).
        Returns:
        Status field index or -1
      • setStatus

        public void setStatus​(java.lang.String statusFieldIndex)
        Sets current status field to specified value (only relevant if the object is a state model object).
        Parameters:
        statusFieldIndex - Status field index
      • setStatus

        public void setStatus​(char status)
        Sets current status field to specified value (only relevant if the object is a state model object).
        Parameters:
        status - Status value
      • setStatus

        public void setStatus​(int status)
        Sets current status field to specified value (only relevant if the object is a state model object).
        Parameters:
        status - Status value
      • getOldStatus

        public java.lang.String getOldStatus()
        Gets the previous status field value (only relevant if the object is a state model object).
        Returns:
        Previous status value
      • getStatus

        public java.lang.String getStatus()
        Gets the current status field value (only relevant if the object is a state model object).
        Returns:
        Current status value
      • getStatus

        public java.lang.String getStatus​(java.lang.String[] row)
        Gets the status field value for specified record row (only relevant if the object is a state model object).
        Parameters:
        row - Record row (if null or empty return current record's status)
      • getStartDateField

        public ObjectField getStartDateField()
        Get the optional start date field.
        Returns:
        Optional start date field or null
      • setStartDateField

        public void setStartDateField​(ObjectField startDate)
        Set the start date field
        Parameters:
        startDate - Optional start date field
      • getEndDateField

        public ObjectField getEndDateField()
        Get the optional end date field.
        Returns:
        Optional end date field or null
      • setEndDateField

        public void setEndDateField​(ObjectField endDate)
        Set the end date field.
        Parameters:
        endDate - Optional end date field
      • setAllFieldsUpdatable

        public void setAllFieldsUpdatable​(boolean b)
        Set/unset all fields as updatable.
        Parameters:
        b - Fields updatable?
      • resetAllFieldsUpdatable

        public void resetAllFieldsUpdatable()
        Reset all fields to their updatable default.
      • resetAllFieldsRequired

        public void resetAllFieldsRequired()
        Reset all fields to their required default.
      • resetAllFieldsSearch

        public void resetAllFieldsSearch()
        Reset all fields to their searchable default.
      • resetAllFieldsSearchRequired

        public void resetAllFieldsSearchRequired()

        Reset all fields to their required search default

      • isIndexable

        public boolean isIndexable()
        Is indexable (itself and contains indexable fields)?
        Returns:
        True if indexable
      • setIndexable

        public void setIndexable​(boolean b)
        Set indexable.
        Parameters:
        b - Indexable?
      • canGroupByFields

        public boolean canGroupByFields()
        Can group by field on list (itself and contains group by fields)?
        Returns:
        True if can group by field on list
      • setGroupByFields

        public void setGroupByFields​(boolean b)
        Set group by field on list.
        Parameters:
        b - Group by?
      • hasMenuStates

        public boolean hasMenuStates()
        Use states sub-menu?
        Returns:
        True if use states sub-menu
      • setMenuStates

        public void setMenuStates​(boolean b)
        Set use states sub-menu.
        Parameters:
        b - Use states sub-menu?
      • hasMenuTray

        public boolean hasMenuTray()
        Use tray in states sub-menu?
        Returns:
        True if use tray in states sub-menu
      • setMenuTray

        public void setMenuTray​(boolean b)
        Set use tray in states sub-menu.
        Parameters:
        b - Use tray in states sub-menu?
      • addMenuTrayField

        public void addMenuTrayField​(java.lang.String field)
        Add enum field with tray access on the menu.
        Parameters:
        field - Enum field with tray access
      • getMenuTrayFields

        public java.util.List<java.lang.String> getMenuTrayFields()
        Get simple enum field with tray access on the menu.
        Returns:
        List of enum field name with tray access
      • addMenuListField

        public void addMenuListField​(java.lang.String field)
        Add enum field with list access.
        Parameters:
        field - Enum field with list access
      • getMenuListFields

        public java.util.List<java.lang.String> getMenuListFields()
        Get simple enum field with list access.
        Returns:
        List of enum field name with list access
      • clearMenuTrayFields

        public void clearMenuTrayFields()
        Clear enum fields with tray access.
      • hasMenuDashboard

        public boolean hasMenuDashboard()
        Use dashboard in states sub-menu?
        Returns:
        True if use dashboard in states sub-menu
      • setMenuDashboard

        public void setMenuDashboard​(boolean b)
        Set use dashboard in states sub-menu
        Parameters:
        b - Use dashboard in states sub-menu?
      • getScripts

        public java.util.List<SharedScript> getScripts()
        Get all object server scripts (inherited)
      • isScripted

        public boolean isScripted()
        Object contains server scripts ?
      • addScript

        public void addScript​(SharedScript s)
        Add an inherited server script
      • getScript

        public SharedScript getScript​(java.lang.String name)
        Get object server script for specified name
        Parameters:
        name - Object server script name
      • getSharedScripts

        public java.util.List<SharedScript> getSharedScripts()
        Get all shared server scripts
      • addSharedScript

        public void addSharedScript​(SharedScript s)
        Add a shared server script
      • getSharedScript

        public SharedScript getSharedScript​(java.lang.String name)
        Get shared server script for specified name
        Parameters:
        name - Shared server script name
      • getResources

        public java.util.List<Resource> getResources​(boolean reload)
        Get object resources
        Parameters:
        reload - true to reload them from user rights
        Returns:
        List of resources or null
      • getResource

        public Resource getResource​(java.lang.String name)
        Get object resource
        Parameters:
        name - Resource name
        Returns:
        Resource or null
      • addResource

        public void addResource​(java.lang.String name,
                                Resource r)
        Add object resource
        Parameters:
        name - Resource name
        r - Resource
      • resetFilter

        @Deprecated(forRemoval=false,
                    since="4.0")
        public final void resetFilter()
        Deprecated.
        Use resetFilters
      • resetFilters

        public void resetFilters()

        Clears all filters for all fields (all filters are set to %)

      • resetFilters

        public void resetFilters​(boolean ignoreParent)

        Clears all filters for all fields

        Parameters:
        ignoreParent - ignore the current filter on foreign key
      • isFiltered

        public boolean isFiltered​(boolean ignoreParent)
        Parameters:
        ignoreParent - ignore the current filter on foreign key
        Returns:
        true if at least one field contains a filter
      • isOrdered

        public boolean isOrdered()
        Returns:
        true if at least one field contains an order
      • resetOrders

        public final void resetOrders()

        Clears ordering for all field (all orderings are cleared)

      • resetOrders

        public void resetOrders​(boolean clear)

        Clears ordering for all field (all orderings are either reset to default ordering or cleared)

        Parameters:
        clear - Clear orders (true) or reset default orders (false)
      • resetGroupBy

        public void resetGroupBy​(boolean clearGroup,
                                 boolean clearOrder)
      • getGroupByFields

        public java.util.List<ObjectField> getGroupByFields()
        Ordered fields to group in list
        Returns:
        List of fields or null
      • resetContextDefaultValues

        public void resetContextDefaultValues()
        Clears contextualized default value for all fields.
      • resetAllFields

        @Deprecated(forRemoval=false,
                    since="4.0")
        public final void resetAllFields()
        Deprecated.
        Use resetFiltersOrdersAndCalcDefaults
      • resetFiltersOrdersAndCalcDefaults

        public void resetFiltersOrdersAndCalcDefaults()
        Clears all fields filters, default ordering and contextualized default values.
      • resetValues

        public final void resetValues()
        Clears value for all fields (all values are set to "")
      • resetValues

        public void resetValues​(boolean defaultValues)
        Clears values (and old values) for all fields: values are set to defaults or empty
        Parameters:
        defaultValues - Indicates if values are to be reset to default values, values are set to empty otherwise
      • resetValues

        public void resetValues​(boolean defaultValues,
                                java.lang.String rowId)
        Clears values (and old values) for all fields: values are set to defaults or empty and row ID field is optionaly set to an explicit value
        Parameters:
        defaultValues - Indicates if values are to be reset to default values, values are set to empty otherwise
        rowId - Optional explicit row ID
      • addDefaultValues

        public void addDefaultValues()

        Adds default values on empty values (useful at creation)

      • evalExpression

        public final java.lang.Object evalExpression​(java.lang.String expr,
                                                     int context)
                                              throws ScriptException
        Prepare and evaluate an expression (see prepareExpression for details on tokens)
        Parameters:
        expr - Expression
        context - Context
        Returns:
        Expression evaluation result
        Throws:
        ScriptException
      • evalExpression

        public final java.lang.Object evalExpression​(java.lang.String expr,
                                                     int context,
                                                     java.lang.String[] row)
                                              throws ScriptException
        Prepare and evaluate an expression (see prepareExpression for details on tokens)
        Parameters:
        expr - Expression
        context - Context
        row - Row (null means selected item)
        Returns:
        Expression expression evaluation result
        Throws:
        ScriptException
      • evalExpression

        public final java.lang.Object evalExpression​(java.lang.String expr,
                                                     int context,
                                                     java.util.Map<java.lang.String,​java.lang.Object> in,
                                                     java.util.Map<java.lang.String,​java.lang.Object> out)
                                              throws ScriptException
        Prepare and evaluate an expression (see prepareExpression for details on tokens)
        Parameters:
        expr - Expression
        context - Context
        in - Input variables to set before expression evaluation
        out - Output variables to retrieve after expression evaluation
        Returns:
        Expression evaluation result
        Throws:
        ScriptException
      • evalExpression

        public java.lang.Object evalExpression​(java.lang.String expr,
                                               int context,
                                               java.lang.String[] row,
                                               java.util.Map<java.lang.String,​java.lang.Object> in,
                                               java.util.Map<java.lang.String,​java.lang.Object> out)
                                        throws ScriptException
        Prepare and evaluate an expression (see prepareExpression for details on tokens)
        Parameters:
        expr - Expression
        context - Context
        row - Row (null means selected item)
        in - Input variables to set before expression evaluation
        out - Output variables to retrieve after expression evaluation
        Returns:
        Expression evaluation result
        Throws:
        ScriptException
      • addAgenda

        public void addAgenda​(Agenda a)
        Add one agenda
        Parameters:
        a - Agenda definition
      • getAgenda

        public Agenda getAgenda​(java.lang.String a)
        Get one agenda
        Parameters:
        a - Agenda name
        Returns:
        agenda
      • getAgendas

        public java.util.Map<java.lang.String,​Agenda> getAgendas()
        Get all agendas
      • getNotification

        public Notification getNotification​(java.lang.String name)
        Get notification by name
        Parameters:
        name - Notification name
        Returns:
        Notification
      • getNotifications

        public java.util.List<Notification> getNotifications()
        Get list of object's notifications
        Returns:
        List of Notifcations
      • addPlaceMap

        public void addPlaceMap​(PlaceMap p)
        Add one place map
        Parameters:
        p - Place map definition
      • getPlaceMap

        public PlaceMap getPlaceMap​(java.lang.String p)
        Get one place map
        Parameters:
        p - Place map name
        Returns:
        place map
      • getPlaceMaps

        public java.util.Map<java.lang.String,​PlaceMap> getPlaceMaps()
        Get all place maps
      • addTimesheet

        public void addTimesheet​(Timesheet t)
        Add one timesheet
        Parameters:
        t - Timesheet definition
      • getTimesheet

        public Timesheet getTimesheet​(java.lang.String t)
        Get one timesheet
        Parameters:
        t - Timesheet name
        Returns:
        Timesheet
      • getTimesheets

        public java.util.Map<java.lang.String,​Timesheet> getTimesheets()
        Get all timesheets
      • buildInsertSQL

        public java.lang.String buildInsertSQL​(int dbvendor,
                                               java.util.List<java.lang.String[]> rows)
        Generate insert SQL statement
        Parameters:
        dbvendor - DBMS vendor
        rows - Rows to export (may be null to use the current record only)
        Returns:
        insert statements
      • evalInputValue

        public final java.lang.String evalInputValue​(java.lang.String input,
                                                     java.lang.String[] row)
        Substitutes input field value
        Parameters:
        input - Input field name
        row - A record of a list (or null to use the selected record)
      • evalInputOldValue

        public final java.lang.String evalInputOldValue​(java.lang.String input)
        Substitutes input field old value
        Parameters:
        input - Input field name
      • evalInputDisplayValue

        public final java.lang.String evalInputDisplayValue​(java.lang.String input,
                                                            java.lang.String[] row)
        Substitutes input field display value
        Parameters:
        input - Input field name
        row - A record of a list (or null to use the selected record)
      • evalInputDisplayOldValue

        public final java.lang.String evalInputDisplayOldValue​(java.lang.String input)
        Substitutes input field display old value
        Parameters:
        input - Input field name
      • checkExpression

        public void checkExpression​(java.lang.String expr)
                             throws ScriptException
        Prepares an expression and apply structural and elementary syntax checks, this method is only intended to this basic usage
        Parameters:
        expr - Expression
        Throws:
        ScriptException
      • prepareExpression

        public java.lang.String prepareExpression​(java.lang.String expr,
                                                  java.lang.String[] row,
                                                  boolean inlineValues,
                                                  boolean front)
                                           throws ScriptException
        Prepares an expression applying following token substitutions:
        - [CONTEXT:<context>]: Check if in specified context
        - [OBJECTID] : the current object ID
        - [OBJECT] : the current object
        - [TABLE] : the current object table name
        - [OBJECTNAME] or [OBJNAME] : the current object name
        - [OBJECTLABEL] or [OBJLABEL] : the current object label
        - [OBJECTINSTANCENAME] or [OBJINST]: the current object instance name
        - [PARENTOBJECT] or [PARENT] : the current object parent object
        - [PARENTOBJECTNAME] or [PARENTNAME] : the current object parent object name
        - [PARENTOBJECTLABEL] or [PARENTLABEL] : the current object parent object label
        - [PARENTOBJECTINSTANCENAME] or [PARENTINSTANCENAME] or [PARENTINST] : the current object parent object instance name
        - [CHILDOF:<parent object name>[:<parent ref field>]] : check if current object is child object of specified object (thru optional specified ref field)
        - [PANELOF:<parent object name>[:<parent ref field>]] : check if current object is panel child object of specified object (thru optional specified ref field)
        - [REFFROM:<object name>[:<ref field>]] or [REFERENCEDFROM:<object name>[:<ref field>]]: check if current object is referenced object from specified object (thru optional specified ref field)
        - [DATAMAPFROM:<object name>] or [DATAMAPPEDFROM:<object name>] : check if current object is data mapped object from specified object
        - [OBJECTSTATUS] or [STATUS] : the object current status (if object has a status)
        - [OBJECTOLDSTATUS] or [OLDSTATUS] : the old object status if any (if object has a status, not available on lists)
        - [OBJECTSTATUSCHANGED] or [STATUSCHANGED] : check if the object status has changed
        - [ISNEW]: Check if object is in creation
        - [ISCOPIED]: Check if object is in creation as a copy
        - [ROWID]: Row ID value
        - [FIELD:<name>] or [INPUT:<inputname>]: the specified field
        - [COLUMN:<inputname>] : the specified field column name
        - [LABEL:<inputname>] : the specified field label
        - [VALUE:<inputname>] (or [<inputname>]): the specified input field current value
        - [OLDVALUE:<inputname>]: the specified input field old value (not available on lists)
        - [DISPLAYVALUE:<inputname>]: the specified input field current value display
        - [DISPLAYOLDVALUE:<inputname>]: the specified input field old value display
        - [PARAM:<parameter name>]: object parameter value
        NB: It first calls Grant.prepareExpression() for grant level token substitutions.
        Parameters:
        expr - Expression including tokens to substitute
        row - Data row (null means current selected item)
        inlineValues - Replace with explicit value or with API. Ex: [VALUE:input] will be replaced with explicit value of field, or replaced by obj.getInput(input).getValue()
        front - front syntax for non inlined values?
        Returns:
        Prepared expression
        Throws:
        ScriptException
      • prepareSQL

        public java.lang.String prepareSQL​(java.lang.String sql)
        Prepares a SQL statement applying following token substitutions:
        - [table] : table name
        - [column:<input>] : Input column name
        - [rowid] : object row ID
        - [value:<input>] : Input value
        - [login] : user login
        - [userid] : user row ID
        NB : It first calls Grant.prepareSQL()
        Parameters:
        sql - SQL including tokens to substitute
        Returns:
        Prepared SQL statement
      • getFilters

        public ObjectFieldSearch[] getFilters()
        Get current filters
        Returns:
        Current filters
      • getFilters

        public static ObjectFieldSearch[] getFilters​(ObjectCore obj)
        Get current filters of specified object
        Parameters:
        obj - Object
        Returns:
        Current filters
      • setFilters

        public final void setFilters​(ObjectFieldSearch[] filters)
        Set current filters
        Parameters:
        filters - Values
      • setFilters

        public final void setFilters​(java.util.List<ObjectFieldSearch> filters)
        Set current filters
        Parameters:
        filters - Values
      • setFilters

        public static void setFilters​(ObjectCore obj,
                                      ObjectFieldSearch[] filters)
        Set current filters for specified object
        Parameters:
        obj - Object
        filters - Values
      • setFilters

        public final void setFilters​(org.json.JSONObject filters)
        Replace all filters from JSON object
        Parameters:
        filters - filter or order per field fullinput
      • setFilters

        public final void setFilters​(org.json.JSONObject filters,
                                     boolean resetFilters)
        Replace all filters from JSON object
        Parameters:
        filters - filter or order per field fullinput
      • setFilters

        public void setFilters​(org.json.JSONObject filters,
                               boolean resetFilters,
                               boolean resetOrders,
                               java.lang.Short fixed)
        Set filters from JSON object
        Parameters:
        filters - filter/order per field
        resetFilters - reset filters before applying new filters?
        resetOrders - reset orderings before applying new orders?
        fixed - Are filters fixed read/hidden to user? ObjectField.FIXED_FILTER_* or null to ignore
      • filtersToJson

        public java.lang.String filtersToJson​(boolean reset,
                                              boolean limited)
        JSON filters in service format
        Parameters:
        reset - Reset filters first ?
        limited - get valued filter only ?
        Returns:
        JSON
      • getOldValues

        public java.lang.String[] getOldValues()
        Get current old values
        Returns:
        Current old values as string array
      • getOldValues

        public static java.lang.String[] getOldValues​(ObjectCore obj)
        Get current old values of specified object
        Parameters:
        obj - Object
        Returns:
        Current old values as string array
      • setOldValues

        public final void setOldValues​(java.lang.String[] oldvalues)
        Set current old values
        Parameters:
        oldvalues - Values (string array format)
      • setOldValues

        public final void setOldValues​(java.util.List<java.lang.String> oldvalues)
        Set current old values
        Parameters:
        oldvalues - Values (string list format)
      • setOldValues

        public static void setOldValues​(ObjectCore obj,
                                        java.lang.String[] oldvalues)
        Set current old values for specified object
        Parameters:
        obj - Object
        oldvalues - Values (string array format)
      • getValues

        public java.lang.String[] getValues()
        Get current values
        Returns:
        Current values as string array
      • getValues

        public static java.lang.String[] getValues​(ObjectCore obj)
        Get current values of specified object
        Parameters:
        obj - Object
        Returns:
        Current values as string array
      • getUserKeyValues

        public java.lang.String[] getUserKeyValues()
        Get user-key current values
        Returns:
        Current user-key values as string array
      • getUserKeyValues

        public static java.lang.String[] getUserKeyValues​(ObjectCore obj)
        Get current user-key values of specified object
        Parameters:
        obj - Object
        Returns:
        Current user-key values as string array
      • setUserKeyValues

        public void setUserKeyValues​(java.lang.String[] values)
        Set current user-key values
        Parameters:
        values - Current user-key values as string array
      • setUserKeyValues

        public static void setUserKeyValues​(ObjectCore obj,
                                            java.lang.String[] values)
        Set current user-key values of specified object
        Parameters:
        obj - Object
        values - Current user-key values as string array
      • getFieldValues

        public java.lang.String[] getFieldValues​(java.util.List<java.lang.String[]> rows,
                                                 ObjectField f)
        Get values of specified field from object data rows
        Parameters:
        rows - Data rows
        f - Field
        Returns:
        Array of values
      • getFieldValues

        public static java.lang.String[] getFieldValues​(ObjectCore obj,
                                                        java.util.List<java.lang.String[]> rows,
                                                        ObjectField f)
        Get values of specified field from specified object data rows
        Parameters:
        obj - Object
        rows - Data rows
        f - Field name
        Returns:
        Array of values
      • setValues

        public final void setValues​(java.lang.String[] values)
        Change the current record (values and old values)
        Parameters:
        values - Values
      • setValues

        public final void setValues​(java.lang.String[] values,
                                    java.lang.Boolean withOldValues)
        Set current values. Complete permitted status and list of values.
        Parameters:
        values - Values (string array format)
        withOldValues - Set also old values (with same values in case of update or save for hasChange behaviors) or reset them or null to keep old values
      • setValues

        public final void setValues​(java.lang.String[] values,
                                    java.lang.Boolean withOldValues,
                                    boolean withDocs)
        Set current values. Complete doc infos, permitted status and list of values.
        Parameters:
        values - Values (string array format)
        withOldValues - Set also old values (with same values in case of update or save for hasChange behaviors) or reset them or null to keep old values
        withDocs - Retrieve doc infos from DB
      • setValues

        public final void setValues​(java.util.List<java.lang.String> values)
        Change the current record only (keep the old values)
        Parameters:
        values - Values
      • setValues

        public final void setValues​(java.util.List<java.lang.String> values,
                                    java.lang.Boolean withOldValues)
        Set current values and reset old ones
        Parameters:
        values - Values (string list format)
        withOldValues - Set also old values (with same values in case of update or save for hasChange behaviors) or reset them or null to keep old values
      • setValues

        public final void setValues​(java.util.List<java.lang.String> values,
                                    java.lang.Boolean withOldValues,
                                    boolean withDocs)
        Set current values
        Parameters:
        values - Values (string list format)
        withOldValues - Set also old values (with same values in case of update or save for hasChange behaviors) or reset them or null to keep old values
        withDocs - Retrieve doc infos from DB
      • setValues

        public static void setValues​(ObjectCore obj,
                                     java.lang.String[] values,
                                     boolean oldValues)
        Set current values for specified object. Complete permitted status and list of values.
        Parameters:
        obj - Object
        values - Values (string array format)
        oldValues - Set also old values (with same values in case of update or save for hasChange behaviors) or reset them
      • setValues

        public static void setValues​(ObjectCore obj,
                                     java.lang.String[] values,
                                     java.lang.Boolean withOldValues,
                                     boolean withDocs)
        Set current values for specified object. Complete doc infos, permitted status and list of values.
        Parameters:
        obj - Object
        values - Values (string array format)
        withOldValues - true to set also old values (with same values in case of update or save for hasChange behaviors) or false to reset them or null to keep old values
        withDocs - Retrieve doc infos from DB
      • getConfirmField

        public ObjectField getConfirmField​(Action action,
                                           java.lang.String name)
        Get action confirm field
        Parameters:
        action - Action
        name - Field name
        Returns:
        Field
      • getConfirmFieldValue

        public java.lang.String getConfirmFieldValue​(Action action,
                                                     java.lang.String name)
        Get action confirm field value
        Parameters:
        action - Action
        name - Field name
        Returns:
        Field value
      • setConfirmFieldValue

        public void setConfirmFieldValue​(Action action,
                                         java.lang.String name,
                                         java.lang.String value)
        Set action confirm field value
        Parameters:
        action - Action
        name - Field name
        value - Field value
      • initLists

        @Deprecated(forRemoval=false,
                    since="5")
        public static void initLists​(ObjectCore obj,
                                     boolean creation)
        Deprecated.
        Use initLists with search argument
      • initLists

        public static void initLists​(ObjectCore obj,
                                     boolean creation,
                                     boolean search)
        Set the linked enum and status fields
        Parameters:
        obj - Object
        creation - Init for a creation (needed for initial status)
        search - Get all linked values when field is empty (in a search context)
      • setValuesFromJSONObject

        public void setValuesFromJSONObject​(org.json.JSONObject values,
                                            boolean reset,
                                            boolean onlyUserKey)
        Set current values for object from JSON object
        Parameters:
        values - Values as JSON object
        reset - reset field if not present in values?
        onlyUserKey - only user-key fields?
      • setValuesFromJSONObject

        public static void setValuesFromJSONObject​(ObjectCore obj,
                                                   org.json.JSONObject values,
                                                   boolean reset,
                                                   boolean onlyUserKey)
        Set current values for specified object from JSON object
        Parameters:
        obj - Object
        values - Values as JSON object
        reset - reset field if not present in values?
        onlyUserKey - only user-key fields?
      • setParameter

        public void setParameter​(java.lang.String name,
                                 boolean b)
        Set parameter from boolean
      • setParameter

        public void setParameter​(java.lang.String name,
                                 int i)
        Set parameter from integer
      • setParameter

        public void setParameter​(java.lang.String name,
                                 long l)
        Set parameter from long integer
      • setParameter

        public void setParameter​(java.lang.String name,
                                 float f)
        Set parameter from float
      • setParameter

        public void setParameter​(java.lang.String name,
                                 double d)
        Set parameter from double float
      • setParameter

        public void setParameter​(java.lang.String name,
                                 java.io.Serializable value)
        Sets one parameter in the object instance (useful, for instance, to store data thru different pages and contexts)
        Parameters:
        name - Parameter name
        value - Parameter value, if null the parameter name is removed
      • removeParameter

        public java.io.Serializable removeParameter​(java.lang.String name)
        Unsets a parameter
        Parameters:
        name - Parameter name
        Returns:
        Serializable object if parameter exists
      • getParameters

        public java.util.Map<java.lang.String,​java.io.Serializable> getParameters()
        Gets all parameters
        Returns:
        Map of parameters value
      • removeParameters

        public void removeParameters​(java.lang.String prefix)
        Unsets parameters starting with prefix
        Parameters:
        prefix - Parameter prefix
      • getParameter

        public java.lang.String getParameter​(java.lang.String name)
        Gets a text parameter
        Parameters:
        name - Parameter name
        Returns:
        Object parameter value (null if not found)
      • getParameter

        public java.lang.String getParameter​(java.lang.String name,
                                             java.lang.String def)
        Gets a text parameter
        Parameters:
        name - Parameter name
        def - Default value
        Returns:
        Object parameter value
      • getObjectParameter

        public java.lang.Object getObjectParameter​(java.lang.String name)
        Gets one object parameter
        Parameters:
        name - Parameter name
        Returns:
        Object parameter
      • getIntParameter

        public int getIntParameter​(java.lang.String name,
                                   int def)
        Gets one integer parameter
        Parameters:
        name - Parameter name
        Returns:
        Integer parameter value
      • getLongParameter

        public long getLongParameter​(java.lang.String name,
                                     long def)
        Gets one long parameter
        Parameters:
        name - Parameter name
        Returns:
        Long parameter value
      • getFloatParameter

        public float getFloatParameter​(java.lang.String name,
                                       float def)
        Gets one float parameter
        Parameters:
        name - Parameter name
        Returns:
        Float parameter value
      • getDoubleParameter

        public double getDoubleParameter​(java.lang.String name,
                                         double def)
        Gets one double parameter
        Parameters:
        name - Parameter name
        Returns:
        Double parameter value
      • getBooleanParameter

        public boolean getBooleanParameter​(java.lang.String name,
                                           boolean def)

        Gets one boolean parameter

        Parameters:
        name - Parameter name
        def - Default value if parsing fails
        Returns:
        Boolean parameter value
      • getFlagParameter

        public boolean getFlagParameter​(java.lang.String name)

        Gets one boolean flag parameter

        Parameters:
        name - Parameter name
        Returns:
        Boolean flag parameter value (defaults to false)
      • resetVisibilities

        public final void resetVisibilities()
        Reset all field visibilities to defaults
      • resetSearchables

        public final void resetSearchables()
        Reset all field search type (and required search strategy) to defaults
      • resetUpdatables

        public final void resetUpdatables()
        Reset all field updatability to defaults
      • resetRequireds

        public final void resetRequireds()
        Reset all field mandatory statuses to defaults
      • getForeignKeys

        public final java.util.List<ObjectField> getForeignKeys()
        List object foreign keys
        Returns:
        list of foreign keys or null
      • getRefObjects

        public final java.util.Map<java.lang.String,​java.util.List<ObjectField>> getRefObjects()
        List all referenced objects
        Returns:
        List of foreign-key fields per foreign object
      • getRefFields

        public final java.util.List<ObjectField> getRefFields​(java.lang.String object)
        List foreign-key fields to object
        Returns:
        List of reference fields if exists
      • isFieldUpdatable

        public boolean isFieldUpdatable​(ObjectField f,
                                        boolean list,
                                        boolean checkRef)
        Checks if the field is updatable
        Parameters:
        f - object field
        list - checks in list or in form context
        checkRef - true to check field and fk, false to check only foreign key
        Returns:
        true if the field can be changed
      • isFieldVisible

        public boolean isFieldVisible​(ObjectField f,
                                      boolean ignoreMore,
                                      boolean list)
        Checks if a field is visible
        Parameters:
        f - object field
        ignoreMore - true to ignore more property, false to test if the field+object are extended
        list - checks in list or in form context
        Returns:
        true if the field can be displayed or hidden on UI
      • isFieldForbidden

        public boolean isFieldForbidden​(ObjectField f)
        Checks if a field is forbidden on UI
        Parameters:
        f - object field
        Returns:
        true if the field must not be sent to UI
      • isAreaVisible

        public boolean isAreaVisible​(FieldArea fa,
                                     boolean all,
                                     boolean list)
        Checks if a field area is visible (contains one visible field)
        Parameters:
        fa - field area
        all - true to ignore more flags, false to test if the field+object are extended
        list - checks in list or in form context
        Returns:
        true if the area can be displayed on UI
      • isFieldSearchable

        public int isFieldSearchable​(ObjectField f)
        Checks if a field is searcheable
        Parameters:
        f - field
        Returns:
        0:not, 1:optional, 2:semi-required, 3:required
      • isFieldVisibleJSON

        public boolean isFieldVisibleJSON​(ObjectField f,
                                          boolean searchable,
                                          boolean constraint,
                                          boolean placemap)
        Visible fields on list UI via JSON
      • getTableAlias

        public java.lang.String getTableAlias​(ObjectField f)
        Get the table alias to be used in SQL select.
        "t" if column belongs to table, or foreign-keys full path "t_[fk1]_[fk2]..._[fkN]" or simple "t_[fkN]" if not ambiguous
        Truncate if too long: 63 on PostgreSQL, ORACLE_ALIAS_LENGTH on Oracle
        Parameters:
        f - Related field
        Returns:
        table alias
      • isUnique

        public boolean isUnique​(ObjectField f,
                                java.lang.String val,
                                java.lang.String where)
        Check unicity of specified value for field
        Parameters:
        f - Object field
        val - Optional value (defaults to current field value)
        where - Optional custom SQL where clause (added after an AND defaults to nothing at creation and to row ID <> 'current row ID value')
      • isUnique

        public boolean isUnique​(ObjectField f)
        Check unicity of current field value
        Parameters:
        f - Object field
      • getMappedExportPath

        public java.lang.String getMappedExportPath​(java.lang.String[] row)
        Get the mapped export file path
        Parameters:
        row - Row
        Returns:
        Mapped export file path
      • getMappedFilePath

        public java.lang.String getMappedFilePath​(ObjectField f)
        Get the mapped file path for specified field
        Parameters:
        f - Document field
        Returns:
        Document mapped file path or null
      • toHTML

        public java.lang.String toHTML​(java.util.List<java.lang.String[]> rows)

        Publish specified rows to raw HTML

        Parameters:
        rows - Rows
      • toHTML

        public java.lang.String toHTML()

        Publish current row to raw HTML

      • toHTML

        public void toHTML​(java.util.List<java.lang.String[]> rows,
                           java.io.PrintWriter out)

        Publish specified rows to raw HTML on specified print writer

        Parameters:
        rows - Rows
        out - Print writer
      • toJSON

        public java.lang.String toJSON()

        Serialize current row to JSON without documents

      • toJSON

        public java.lang.String toJSON​(Parameters.InlineParam inlines)

        Serialize current row to JSON

        Parameters:
        inlines - Inline documents options
      • toJSON

        public java.lang.String toJSON​(Parameters.InlineParam inlines,
                                       java.util.List<ObjectField> fields,
                                       boolean onlyFunctIds)

        Serialize current row to JSON

        Parameters:
        inlines - Inline documents options
        fields - Restrict to specified list of fields
        onlyFunctIds - Only functional key fields (no row IDs)
      • toJSON

        @Deprecated(forRemoval=false,
                    since="5")
        public java.lang.String toJSON​(boolean inlineDocs,
                                       boolean inlineThumbs,
                                       boolean inlineObjs,
                                       java.util.List<ObjectField> fields,
                                       boolean onlyFunctIds,
                                       boolean timestamps,
                                       java.lang.String separator)
        Deprecated.
        Use toJSON with InlineParam
      • toJSON

        public java.lang.String toJSON​(Parameters.InlineParam inlines,
                                       java.util.List<ObjectField> fields,
                                       boolean onlyFunctIds,
                                       boolean timestamps,
                                       java.lang.String separator)

        Serialize current row to JSON

        Parameters:
        inlines - Inline documents options
        fields - Restrict to specified list of fields
        onlyFunctIds - Only functional key fields (no row IDs)
        timestamps - with timestamps ?
        Returns:
        JSON object
      • toJSON

        public java.lang.String toJSON​(java.lang.String[] row,
                                       Parameters.InlineParam inlines,
                                       boolean timestamps,
                                       boolean visibleOnly)

        Serialize specified row to JSON object { field: value, ... }

        Parameters:
        row - Row
        inlines - Inline documents options
        timestamps - with timestamps ?
        visibleOnly - only visible fields on list ?
      • toJSONArray

        public java.lang.String toJSONArray​(java.lang.String[] row,
                                            Parameters.InlineParam inlines,
                                            boolean timestamps,
                                            boolean visibleOnly)

        Serialize specified row to JSON array [ value, ... ]

        Parameters:
        row - Row
        inlines - Inline documents options
        timestamps - with timestamps ?
        visibleOnly - only visible fields on list ?
      • toJSON

        @Deprecated(forRemoval=false,
                    since="5")
        public java.lang.String toJSON​(java.util.List<java.lang.String[]> rows,
                                       Parameters.InlineParam inlines,
                                       boolean timestamp,
                                       boolean visibleOnly)
        Deprecated.
        Use toJSON with valuesOnly argument
      • toJSON

        public java.lang.String toJSON​(java.util.List<java.lang.String[]> rows,
                                       Parameters.InlineParam inlines,
                                       boolean timestamp,
                                       boolean visibleOnly,
                                       boolean valuesOnly)

        Serialize specified rows to JSON array

        Parameters:
        rows - Rows
        inlines - Inline documents options
        timestamp - add timestamp fields (created_dt, created_by, update_dt, update_by) ?
        visibleOnly - only visible fields on list ?
        valuesOnly - only values or full objects { field:value, ... } ?
      • toJSONObject

        public org.json.JSONObject toJSONObject​(Parameters.InlineParam inlines)
        JSON object item with ordered fields (used by treeviews and exported module)
        Parameters:
        inlines - to inline data or map files in a directory
        Returns:
        JSON object
      • testData

        public void testData()
        Generate random/sample field values on row ID
      • testData

        public void testData​(java.lang.String rowId,
                             boolean random,
                             boolean refs)
        Generate random/sample field values
        Parameters:
        rowId - Row ID (defaults to "1234" or random value)
        random - Set random values on fields (including row ID)?
        refs - Set random values on references and referenced fields?
      • toJSONObject

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

        public org.json.JSONObject toJSONObject​(boolean params)
        Generates a JSON object representation of the business object
        Parameters:
        params - Include object parameters?
        Returns:
        business object as JSON object
      • toString

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

        public java.lang.String toString​(boolean params)
        Generates a string representation of the business object
        Parameters:
        params - Include object parameters?
        Returns:
        business object as string