Class ObjectCore

  • All Implemented Interfaces:
    CacheInterface, java.io.Serializable
    Direct Known Subclasses:
    ObjectDB

    public abstract class ObjectCore
    extends java.lang.Object
    implements java.io.Serializable, 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 addGraph​(Graphic gph)
      Add graph
      void addLinkDataMap​(LinkDatamap map)
      Deprecated. 
      void addListOperationField​(ObjectField f)
      Add a field for list operations
      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 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 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
      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
      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.
      same as getValues()
      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/page of search
      int getCurrentPage()
      Get current page 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
      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. 
      ObjectField getDBField​(java.lang.String dbname)
      Get a field from physical name
      int getDbIndex​(java.lang.String dbname)
      Deprecated.
      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
      java.util.List<ObjectField> getDocFields()
      Get all document and image fields
      double getDoubleParameter​(java.lang.String name, double def)
      Gets one double paramete
      ObjectField getEndDateField()
      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.
      Use getField
      ObjectField getFieldByObjectFieldId​(java.lang.String obfId)  
      ObjectField getFieldByTranslation​(java.lang.String display, boolean err)
      Get a field from its translation
      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​(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()
      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​(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.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.
      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)
      Graphic getGraph​(java.lang.String name)
      Get graph
      java.util.Map<java.lang.String,​Graphic> getGraphs()
      Get graphs
      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. 
      int getIndex​(java.lang.String name, boolean err)
      Deprecated. 
      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.
      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 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)
      Find a link
      java.util.List<LinkDatamap> getLinkDataMap()
      Deprecated. 
      java.util.List<Link> getLinks()
      Get all objects links
      int getListEditMode()
      List edit toggle LIST_READ/LIST_EDIT/LIST_ADD
      java.util.List<ObjectField> getListOperationFields()
      Get fields for list operations
      int getListSize()
      Get page size of list
      ObjectNode getListTree()
      Get stored tree in memory
      long getLongParameter​(java.lang.String name, long def)
      Gets one long parameter
      int getMaxPage()
      Get maximum pages in list pagination
      char getMenuSearch()
      Default search display when accessing the object by menu
      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 logical object name
      static java.lang.String getObjectId​(java.lang.String objectName)
      Get object ID from name
      ObjectLocation getObjectLocation()
      Get object location data
      static java.lang.String getObjectName​(java.lang.String objectId)
      Get object name from its ID
      java.lang.Object getObjectParameter​(java.lang.String name)
      Gets one object parameter
      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
      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
      ObjectField getParentField​(ObjectCore parent, ObjectField childField)
      Look for a field in the parent object matching with a child input
      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. 
      java.util.List<PredefinedSearch> getPredefinedSearches()
      Hook to get accessible predefined searches.
      int getPredefinedSearchIndex()
      Get selected predefined search
      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 referenced fields to object
      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 current record's item row ID
      java.lang.String getRowId​(java.lang.String[] row)
      Get row ID for specified record row
      ObjectField getRowIdField()
      Get object row id field
      int getRowIdFieldIndex()
      Get 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()
      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 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.
      java.lang.String getTemplate()
      Get form template
      static java.lang.String getTemplateId​(java.lang.String objectName)
      Get object's template ID from object name
      static java.lang.String getTemplateName​(java.lang.String objectName)
      Get object's template name from object 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 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[] 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 from VIEW_MODE_*
      java.util.List<View> getViews()
      Get all object views
      boolean hasChanged​(boolean timestamp)
      Checks if the object has changed
      boolean hasField​(java.lang.String name)
      Check whether a name (can be either a simple name or input name or full input name) correspond 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 (optimized)
      boolean hasFullInput​(java.lang.String name)
      Check whether an full input name correspond to an object field
      boolean hasIndexableFields()
      Contains indexable fields ?
      boolean hasInput​(java.lang.String name)
      Check whether an input name correspond to an object field
      boolean hasMenuDashboard()
      Use dashboard menu?
      boolean hasMenuTray()
      Use tray 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)
      Set the linked enum and status fields
      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 isBatchInstance()
      Is a batch instance (for import XML)
      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 isCopy()
      Deprecated.
      Use canCopy
      boolean isCronInstance()
      Is a cron instance
      boolean isCustomRowId()
      Is 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 JJ, java.lang.String MM, java.lang.String AAAA)  
      boolean isDistinct()
      Is distinct ?
      boolean isExport()
      Deprecated.
      Use canExport
      java.lang.String isExportAllowed​(java.lang.String mode, java.lang.String media, java.lang.String rowId)
      Is requested export allowed?
      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 isIndexable()
      Is indexable (itself and contains indexable fields) ?
      boolean isInstanceOf​(java.lang.String name)
      Check the object inheritance
      boolean isInternalRowId()
      Is standard internal row ID field ("row_id")?
      boolean isJavaImplemented()
      Object is implemented in Java?
      boolean isLimit()
      Deprecated.
      Use useLimit
      boolean isListEditable()
      Allow rows to be editable ?
      boolean isListSearch()
      Is the embedded search in list accessible
      boolean isListSearchVisible()
      Is the embedded search in list visible
      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 isMenuSearch()
      Deprecated. 
      boolean isMergeable()
      Can merge rows together ?
      boolean isModelerInstance()
      Is a modeler instance
      boolean isMoreForm()
      Deprecated.
      Use isMoreOnForm
      boolean isMoreFormEnable()
      Deprecated.
      Use isMoreOnForm
      boolean isMoreListEnable()
      Deprecated.
      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 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 isRefCountEnable()
      Deprecated.
      Use isRefCount
      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 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 isUpdateAll()
      Deprecated.
      Use canUpdateAll
      boolean isWebServiceInstance()
      Is a webservice instance
      long lastUsage​(boolean update)
      Last usage timestamp (last access to object engine)
      void listSelectAll()
      Select all
      boolean listSelectId​(java.lang.String id)
      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
      java.io.Serializable removeParameter​(java.lang.String name)
      Unsets a parameter
      void removeParameters​(java.lang.String prefix)
      Unsets parameters starting with prefix
      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 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 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 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[]> v)
      Set current list
      void setCurrentPage​(int i)
      Set current page 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​(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 f)
      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 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 setFollowLinks​(boolean b)
      Set object to allow follow links
      void setForm​(boolean b)
      Set the object to use the form
      void setFormLayout​(int fl)
      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.
      Does nothing now !!!
      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 s)
      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​(int m)
      Set object to allow edit list
      void setListSearch​(boolean b)  
      void setListSearchVisible​(boolean b)
      Set the embedded search in list hidden or not
      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 setMenuDashboard​(boolean b)
      Set use dashboard menu
      void setMenuSearch​(boolean b)
      Deprecated. 
      void setMenuSearch​(char mode)  
      void setMenuTray​(boolean b)
      Set use tray 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 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.
      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 n)
      Set logical 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 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 integre
      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
      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 current record's item row ID
      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 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 setStartDateField​(ObjectField f)
      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 status)
      Sets current status field to specified value (only relevant if the object is a state model object)
      void setStatusField​(ObjectField f)
      Sets the status field of a state model object
      void setTable​(java.lang.String t)
      Set physical table name
      void setTemplate​(java.lang.String t)
      Set form template
      void setTimestamp​(int t)
      Set object as using a timestamp TIMESTAMP_*
      void setTimeStamp​(boolean b)
      Deprecated.
      Use setTimestamp
      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 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 oldValues)
      Set current values for specified object from JSON object
      void setValuesFromJSONObject​(org.json.JSONObject values, boolean oldValues)
      Set current values for object from JSON object
      void setViewMode​(char mode)
      Set the view mode to 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 toCSV​(java.util.List<java.lang.String[]> rows)
      Publish rows to raw CSV
      void toCSV​(java.util.List<java.lang.String[]> rows, java.io.PrintWriter out)
      Publish rows to raw CSV on specified print writer
      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. 
      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
      java.lang.String toJSON​(java.util.List<java.lang.String[]> rows, Parameters.InlineParam inlines, boolean timestamp, boolean visibleOnly)
      Serialize specified rows to JSON
      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
      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
      java.lang.String toTSV​(java.util.List<java.lang.String[]> rows)
      Publish rows to raw TSV
      void toTSV​(java.util.List<java.lang.String[]> rows, java.io.PrintWriter out)
      Publish rows to raw TSV on specified print writer
      boolean useForm()
      Use the form ?
      boolean useLimit()
      Use list pagination ?
      boolean useTimeStamp()
      Use a timestamp ?
      • 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_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
      • DB_POSTGRESQL

        @Deprecated
        public static final int DB_POSTGRESQL
        Deprecated.
        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
      • LIST_READ

        public static final int LIST_READ
        List is in a read mode (default)
        See Also:
        Constant Field Values
      • LIST_EDIT

        public static final int LIST_EDIT
        List is in the rows edition mode
        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
      • 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
      • 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 ObjectData getData()
        Get core object meta data
      • setData

        public void setData​(ObjectData d)
        Set core object meta data
      • 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 logical object name
        Specified by:
        getName in interface CacheInterface
        Returns:
        Name
      • setName

        public void setName​(java.lang.String n)
        Set logical object name
      • getInstanceName

        public java.lang.String getInstanceName()
        Get object instance name
      • setInstanceName

        public void setInstanceName​(java.lang.String s)
        Set object 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 CacheInterface
        Parameters:
        g - Grant
        Returns:
        Cache key of object instance
      • lastUsage

        public long lastUsage​(boolean update)
        Last usage timestamp (last access to object engine)
        Specified by:
        lastUsage in interface 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 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 CacheInterface
        Parameters:
        enabled - Enabled?
      • isJavaImplemented

        public boolean isJavaImplemented()
        Object is implemented in Java?
        Specified by:
        isJavaImplemented in interface 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 name
        Parameters:
        objectName - Object name
        Returns:
        Object ID
      • getObjectName

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

        public static java.lang.String getTemplateName​(java.lang.String objectName)
        Get object's template name from object 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 object 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
      • 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)
      • 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
      • 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
      • 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
      • 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
      • 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
      • 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 object row id field
      • getRowIdFieldIndex

        public int getRowIdFieldIndex()
        Get object's row ID field index
      • isInternalRowId

        public boolean isInternalRowId()
        Is standard internal row ID field ("row_id")?
      • isCustomRowId

        public boolean isCustomRowId()
        Is custom row ID field?
      • getRowId

        public java.lang.String getRowId()
        Get current record's item row ID
      • setRowId

        public void setRowId​(java.lang.String id)
        Set current record's item row ID
      • getRowId

        public java.lang.String getRowId​(java.lang.String[] row)
        Get row ID for specified record row
        Parameters:
        row - Record row (if empty or null get current record's row ID)
      • 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 area
      • 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
      • 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 ?
      • 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) ?
      • setTimeStamp

        @Deprecated
        public void setTimeStamp​(boolean b)
        Deprecated.
        Use setTimestamp
      • 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 ?
      • isMenuSearch

        @Deprecated
        public boolean isMenuSearch()
        Deprecated.
      • setMenuSearch

        @Deprecated
        public void setMenuSearch​(boolean b)
        Deprecated.
      • getMenuSearch

        public char getMenuSearch()
        Default search display when accessing the object by menu
      • setMenuSearch

        public void setMenuSearch​(char mode)
      • isListSearch

        public boolean isListSearch()
        Is the embedded search in list accessible
      • setListSearch

        public void setListSearch​(boolean b)
      • isListSearchVisible

        public boolean isListSearchVisible()
        Is the embedded search in list visible
      • setListSearchVisible

        public void setListSearchVisible​(boolean b)
        Set the embedded search in list hidden or not
      • isMoreFormEnable

        @Deprecated
        public final boolean isMoreFormEnable()
        Deprecated.
        Use isMoreOnForm
      • isMoreForm

        @Deprecated
        public final boolean isMoreForm()
        Deprecated.
        Use isMoreOnForm
      • setMoreForm

        @Deprecated
        public final void setMoreForm​(boolean b)
        Deprecated.
        Use setMoreOnForm
      • isMoreOnForm

        public boolean isMoreOnForm()
        Is the form in extended mode ?
      • setMoreOnForm

        public void setMoreOnForm​(boolean b)
        Set the form to be in extended mode
      • haveMore

        @Deprecated
        public final boolean haveMore()
        Deprecated.
        Use hasMoreOnForm
      • setHaveMore

        @Deprecated
        public final void setHaveMore​(boolean b)
        Deprecated.
        Does nothing now !!!
      • 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
        public boolean isMoreListEnable()
        Deprecated.
        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
      • 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
        public final boolean isLimit()
        Deprecated.
        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)
      • isExport

        @Deprecated
        public final boolean isExport()
        Deprecated.
        Use canExport
      • 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
      • 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 int getListEditMode()
        List edit toggle LIST_READ/LIST_EDIT/LIST_ADD
      • setListEditMode

        public void setListEditMode​(int m)
        Set object to allow edit list
      • canPrint

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

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

        @Deprecated
        public final boolean isCopy()
        Deprecated.
        Use canCopy
      • 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
      • isUpdateAll

        @Deprecated
        public boolean isUpdateAll()
        Deprecated.
        Use canUpdateAll
      • 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
      • 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)
      • isWebServiceInstance

        public boolean isWebServiceInstance()
        Is a webservice instance
      • 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
      • isModelerInstance

        public boolean isModelerInstance()
        Is a modeler instance
      • isCronInstance

        public boolean isCronInstance()
        Is a cron instance
      • isUIInstance

        public boolean isUIInstance()
        Is current instance a UI instance (main, panel, home...)
      • 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

        public ObjectField getParentField​(ObjectCore parent,
                                          ObjectField childField)

        Look for a field in the parent object matching with a child input

        Parameters:
        parent - Parent object (linked to the child)
        childField - Referenced field
        Returns:
        Parent field of null if not found
      • 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 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)
        Find a link
      • getFonctId

        @Deprecated
        public java.util.List<ObjectField> getFonctId()
        Deprecated.
        Use getFunctId
      • getFunctId

        public java.util.List<ObjectField> getFunctId()
        Get functional keys 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 in list pagination
      • setCurrentPage

        public void setCurrentPage​(int i)
        Set current page in list pagination
      • getMaxPage

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

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

        public java.util.List<java.lang.String[]> getCurrentList()
        Get current list/page of search
      • setCurrentList

        public void setCurrentList​(java.util.List<java.lang.String[]> v)
        Set current list
      • getListSize

        public int getListSize()
        Get page size of list
      • setListSize

        public void setListSize​(int size)
        Set page size of list
      • 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.
      • listSelectId

        public boolean listSelectId​(java.lang.String id)
        Select a row id, or remove it 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
      • getLinkDataMap

        @Deprecated
        public java.util.List<LinkDatamap> getLinkDataMap()
        Deprecated.
        Link datamaps / deported in FK
      • addLinkDataMap

        @Deprecated
        public void addLinkDataMap​(LinkDatamap map)
        Deprecated.
        Link datamaps / 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
      • getTemplate

        public java.lang.String getTemplate()
        Get form template
      • setTemplate

        public void setTemplate​(java.lang.String t)
        Set form template
      • 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 object views
      • getView

        @Deprecated
        public java.util.List<View> getView()
        Deprecated.
        use getViews
      • getView

        public View getView​(java.lang.String name)
        Get a view
      • getViewMode

        public char getViewMode()
        Get the view mode from VIEW_MODE_*
      • setViewMode

        public void setViewMode​(char mode)
        Set the view mode to VIEW_MODE_*
      • 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
        public java.util.List<PredefinedSearch> getPredefinedSearch()
        Deprecated.
        Use the hook 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
      • getPredefinedSearchIndex

        public int getPredefinedSearchIndex()
        Get selected predefined search
      • setPredefinedSearchIndex

        public void setPredefinedSearchIndex​(int i)
        Set selected predefined search
      • 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
      • getGraphs

        public java.util.Map<java.lang.String,​Graphic> getGraphs()
        Get graphs
        Returns:
        Map of graphs
      • getGraph

        public Graphic getGraph​(java.lang.String name)
        Get graph
        Parameters:
        name - Graph name
        Returns:
        Graph
      • addGraph

        public void addGraph​(Graphic gph)
        Add graph
        Parameters:
        gph - Graph
      • 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
        public java.lang.String[] getCodes()
        Deprecated.
        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. (optimized)
        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 name (can be either a simple name or input name or full input name) correspond 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 (optimized)
      • hasIndexableFields

        public boolean hasIndexableFields()
        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
      • 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 correspond to an object field
      • getDbField

        @Deprecated
        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
        public final int getIndex​(java.lang.String name)
        Deprecated.
        Use getFieldIndex
      • getIndex

        @Deprecated
        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. (optimized)
        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)
      • getFieldAtIndex

        @Deprecated
        public ObjectField getFieldAtIndex​(int index)
        Deprecated.
        Use getField
      • getInputAtIndex

        @Deprecated
        public ObjectField getInputAtIndex​(int index)
        Deprecated.
        Use getField
      • getDbIndex

        @Deprecated
        public final int getDbIndex​(java.lang.String dbname)
        Deprecated.
        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

        public boolean isDate​(java.lang.String JJ,
                              java.lang.String MM,
                              java.lang.String AAAA)
      • 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)
      • isRefCountEnable

        @Deprecated
        public final boolean isRefCountEnable()
        Deprecated.
        Use isRefCount
      • isRefCount

        public boolean isRefCount()
        Is count links enabled ?
      • setRefCount

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

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

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

        public int getFormLayout()
        Get form layout
      • setFormLayout

        public void setFormLayout​(int fl)
        Set form layout
      • getStatusField

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

        public void setStatusField​(ObjectField f)
        Sets the status field of a state model object
      • getStatusIndex

        public int getStatusIndex()
        Gets the status field index of a state model object (or if the object is not a state model object)
      • setStatus

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

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

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

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

        public java.lang.String getStatus()
        Gets the current status field value (only relevant if the object is a state model object)
      • 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()
        Optional start date field
      • setStartDateField

        public void setStartDateField​(ObjectField f)
        Set the start date field
      • getEndDateField

        public ObjectField getEndDateField()
        Optional end date field
      • setEndDateField

        public void setEndDateField​(ObjectField f)
        Set the 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?
      • hasMenuTray

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

        public void setMenuTray​(boolean b)
        Set use tray menu
        Parameters:
        b - Use tray menu?
      • hasMenuDashboard

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

        public void setMenuDashboard​(boolean b)
        Set use dashboard menu
        Parameters:
        b - Use dashboard 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
      • resetFilter

        @Deprecated
        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
        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
      • 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()
        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
      • 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
      • 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 name
        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
      • initLists

        public static void initLists​(ObjectCore obj,
                                     boolean creation)
        Set the linked enum and status fields
        Parameters:
        obj - Object
        creation - Init for a creation (needed for initial status)
      • 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 oldValues)
        Set current values for object from JSON object
        Parameters:
        values - Values as JSON object
      • setValuesFromJSONObject

        public static void setValuesFromJSONObject​(ObjectCore obj,
                                                   org.json.JSONObject values,
                                                   boolean oldValues)
        Set current values for specified object from JSON object
        Parameters:
        obj - Object
        values - Values as JSON object
        oldValues - Set old values?
      • 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 integre
      • 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:
        parameter value if exists
      • 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 paramete
        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 reference fields per foreign object
      • getRefFields

        public final java.util.List<ObjectField> getRefFields​(java.lang.String object)
        List referenced 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
        use ORACLE_ALIAS_LENGTH on Oracle DB (limted to 128 by default): truncate if too long with indexation stored in object parameter _ORACLE_ALIAS_
        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
      • 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
      • toCSV

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

        Publish rows to raw CSV

        Parameters:
        rows - Rows
      • toCSV

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

        Publish rows to raw CSV on specified print writer

        Parameters:
        rows - Rows
        out - Print writer
      • toTSV

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

        Publish rows to raw TSV

        Parameters:
        rows - Rows
      • toTSV

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

        Publish rows to raw TSV 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 functionnal key fields (no row IDs)
      • toJSON

        @Deprecated
        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.
      • 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 functionnal key fields (no row IDs)
        timestamps - with timestamps ?
      • toJSON

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

        Serialize specified row to JSON

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

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

        Serialize specified rows to JSON

        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 ?
      • 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 onf 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