Class ObjectCore
- java.lang.Object
-
- com.simplicite.util.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
-
-
Field Summary
Fields Modifier and Type Field Description static int
CONTEXT_ACTION
static int
CONTEXT_AGENDA
static int
CONTEXT_ASSOCIATE
static int
CONTEXT_COPY
static int
CONTEXT_CREATE
static int
CONTEXT_CROSSTAB
static int
CONTEXT_DATAMAPSELECT
static int
CONTEXT_DELETE
static int
CONTEXT_EXPORT
static int
CONTEXT_GRAPH
static int
CONTEXT_IMPORT
static int
CONTEXT_LIST
static int
CONTEXT_NONE
static int
CONTEXT_PANELLIST
static int
CONTEXT_PLACEMAP
static int
CONTEXT_POSTVALIDATE
static int
CONTEXT_PREVALIDATE
static int
CONTEXT_PRINTTMPL
static int
CONTEXT_REFSELECT
static int
CONTEXT_SEARCH
static int
CONTEXT_STATETRANSITION
static int
CONTEXT_UPDATE
static int
CONTEXT_UPDATEALL
static int
DB_DERBY
Deprecated.static int
DB_H2
Deprecated.static int
DB_HSQLDB
Deprecated.static int
DB_MSSQL
Deprecated.static int
DB_MYSQL
Deprecated.static int
DB_ORACLE
Deprecated.static int
DB_POSTGRESQL
Deprecated.static int
DB_UNKNOWN
Deprecated.static char
DEL_CASCAD
Cascading deletionstatic char
DEL_IGNORE
Ignore cascading rules on deletionstatic char
DEL_NULL
Deletion will set all references to nullstatic char
DEL_RESTRICT
Delete is allowed if object is not referencedstatic int
FORM_LAYOUT_COMPACT
Compact form layoutstatic int
FORM_LAYOUT_DEFAULT
Default form layoutstatic int
LIST_ADD
List is in a add row modestatic int
LIST_EDIT
List is in the rows edition modestatic int
LIST_READ
List is in a read mode (default)static int
PREDEF_SEARCH_NONE
Do not use predefined searchstatic int
PREDEF_SEARCH_ONLIST
Fast access to predefined searches on liststatic int
PREDEF_SEARCH_USE_EDIT
Edit and use predefined searches thru the search dialogstatic int
PREDEF_SEARCH_USE_ONLY
Use only the predefined searches thru the search dialogstatic char
SEARCH_DIALOG
Show the search in a dialog by defaultstatic char
SEARCH_DOCK
Dock the search beside of the list by defaultstatic char
SEARCH_HIDE
hide the search by default when accessing objectstatic char
SEARCH_LIST
Show the search on top of list by defaultstatic int
TIMESTAMP_NON_BLOKING
Non-blocking timestamp: override the timestamp on each savestatic int
TIMESTAMP_NONE
No timestamp usedstatic int
TIMESTAMP_OPTIMISTIC
Optimistic: control the timestamp valaidity on savestatic java.lang.String
TYPE_QUERY
Select object typestatic java.lang.String
TYPE_SERVICE
Service object typestatic java.lang.String
TYPE_SERVICE_LDAP
LDAP service object typestatic java.lang.String
TYPE_SERVICE_OPENDATASOFT
OpenDataSoft service object typestatic java.lang.String
TYPE_SERVICE_SALESFORCE
SalesForce service object typestatic java.lang.String
TYPE_SERVICE_SIMPLICITE
Simplicite service object typestatic char
VIEW_MODE_ACCORDION
ACCORDION : Views are listed one below the other, toggle only one view (firstly the default link/view)static char
VIEW_MODE_COLLAPSED
COLLAPSED : Views are listed one below the other and collapsed by default (except object default link/view)static char
VIEW_MODE_EXTENDED
EXTENDED : Views are listed one below the other and extended by defaultstatic char
VIEW_MODE_TABS
TABS: Views are grouped in a single tabulation, only one tab can be selectedstatic char
VIEW_MODE_TABS_VERTICAL
VERTICAL : grouped in a vertical tabs
-
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 agendavoid
addCrosstab(Crosstab ctb)
Add pivot tablevoid
addDataMap(java.util.List<Datamap> map)
Add data mappingvoid
addDefaultValues()
Adds default values on empty values (useful at creation)void
addGraph(Graphic gph)
Add graphvoid
addLinkDataMap(LinkDatamap map)
Deprecated.void
addListOperationField(ObjectField f)
Add a field for list operationsvoid
addPlaceMap(PlaceMap p)
Add one place mapvoid
addPredefinedSearch(PredefinedSearch ps)
Add a predefined searchvoid
addPrintTemplate(PrintTemplate prt)
Add publication templatevoid
addReflexiveLink(Link link)
Add reflexive linkvoid
addScript(SharedScript s)
Add an inherited server scriptvoid
addSharedScript(SharedScript s)
Add a shared server scriptvoid
addTimesheet(Timesheet t)
Add one timesheetjava.lang.String
buildInsertSQL(int dbvendor, java.util.List<java.lang.String[]> rows)
Generate insert SQL statementboolean
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 previewboolean
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 usagejava.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 sessionvoid
enableGC(boolean enabled)
Enable or disable the internal GCjava.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 valuejava.lang.String
evalInputDisplayValue(java.lang.String input, java.lang.String[] row)
Substitutes input field display valuejava.lang.String
evalInputOldValue(java.lang.String input)
Substitutes input field old valuejava.lang.String
evalInputValue(java.lang.String input, java.lang.String[] row)
Substitutes input field valuevoid
freeListTree()
Set stored tree in memoryboolean
garbageCollection()
Garbage collection of dynamic dataAction
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 actionjava.util.List<Action>
getActions()
Get all actionAgenda
getAgenda(java.lang.String a)
Get one agendajava.util.Map<java.lang.String,Agenda>
getAgendas()
Get all agendasjava.lang.String
getAlias()
Get alias (or null if no alias is defined)boolean
getBooleanParameter(java.lang.String name, boolean def)
Gets one boolean parameterjava.lang.String
getCacheFrom()
Set cached from statementjava.lang.String
getCacheKey(Grant g)
Get object unique cache keyjava.lang.String
getCacheSelect()
Set cached select statementjava.lang.String
getClassName()
Get the object class namejava.lang.String
getCode(java.lang.String field, java.lang.String displayValue)
Get the code of the enumeration display valuejava.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 displayjava.lang.String
getCopyId()
Get row id of the item to copyjava.lang.String
getCreatedBy()
Get the creator (login) of current recordjava.lang.String
getCreatedDate()
Get the created date of current recordCrosstab
getCrosstab(java.lang.String name)
Get pivot tablejava.util.Map<java.lang.String,Crosstab>
getCrosstabs()
Get pivot tablesjava.lang.String
getCtxHelp(java.lang.String helpContext)
Contextual helpjava.util.List<ObjectCtxHelp>
getCtxHelps()
Get contextual helpsjava.lang.String
getCurrentAction()
Get current custom action (null if no action)java.lang.String[]
getCurrentItem()
Get current list item in current pagejava.util.List<java.lang.String[]>
getCurrentList()
Get current list/page of searchint
getCurrentPage()
Get current page in list paginationint
getCurrentPos()
Get current list item position in current pagejava.lang.String
getCurrentRowId()
Get current item row id in current pageFieldStateTransition
getCurrentTransition()
Get current transition (null if no transition during the save)java.lang.String
getCurrentView()
Get the current viewObjectData
getData()
Get core object meta datajava.util.List<java.util.List<Datamap>>
getDataMap()
Get data mappingsjava.lang.String
getDataSource()
Get data source nameint
getDataSourceVendor()
Get data source vendorObjectField
getDbField(java.lang.String dbname)
Deprecated.ObjectField
getDBField(java.lang.String dbname)
Get a field from physical nameint
getDbIndex(java.lang.String dbname)
Deprecated.Use getDBIndexint
getDBIndex(java.lang.String dbname)
Get the field index from physical namejava.lang.String
getDBName()
Get physical name (same as getTable)java.lang.String
getDefaultLink()
Default view to display on object formjava.lang.String
getDefaultSearchSpec()
Get the default search specificationjava.lang.String
getDesc()
Get descriptionjava.lang.String
getDisplay()
Get the object translation in current user languagestatic java.lang.String
getDisplay(java.lang.String obj, java.lang.String lang)
Get display labelstatic java.lang.String
getDisplay(java.lang.String obj, java.lang.String lang, boolean plural)
Get display labeljava.util.List<ObjectField>
getDocFields()
Get all document and image fieldsdouble
getDoubleParameter(java.lang.String name, double def)
Gets one double parameteObjectField
getEndDateField()
Optional end date fieldObjectField
getField(int index)
Get field in indexed positionObjectField
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 positionFieldArea
getFieldArea(java.lang.String name)
Gets field area for specified nameFieldAreas
getFieldAreas()
Get ordered field areasObjectField
getFieldAtIndex(int index)
Deprecated.Use getFieldObjectField
getFieldByObjectFieldId(java.lang.String obfId)
ObjectField
getFieldByTranslation(java.lang.String display, boolean err)
Get a field from its translationjava.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 fieldsjava.util.List<ObjectField>
getFields(java.lang.String[] fields)
Get specified fields listjava.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 rowsjava.lang.String[]
getFieldValues(java.util.List<java.lang.String[]> rows, ObjectField f)
Get values of specified field from object data rowsObjectFieldSearch[]
getFilters()
Get current filtersstatic ObjectFieldSearch[]
getFilters(ObjectCore obj)
Get current filters of specified objectboolean
getFlagParameter(java.lang.String name)
Gets one boolean flag parameterfloat
getFloatParameter(java.lang.String name, float def)
Gets one float parameterjava.util.List<ObjectField>
getFonctId()
Deprecated.Use getFunctIdjava.util.List<ObjectField>
getForeignKeys()
List object foreign keysint
getFormLayout()
Get form layoutObjectField
getFullInput(java.lang.String name)
Get a field from logical full input nameObjectField
getFullInput(java.lang.String name, boolean err)
Get a field from logical full input nameint
getFullInputIndex(java.lang.String name)
Get the field index from logical full input nameint
getFullInputIndex(java.lang.String name, boolean err)
Get the field index from logical full input namejava.util.List<ObjectField>
getFunctId()
Get functional keys fieldsGrant
getGrant()
Get grant (user rights)Graphic
getGraph(java.lang.String name)
Get graphjava.util.Map<java.lang.String,Graphic>
getGraphs()
Get graphsjava.util.List<ObjectField>
getGroupByFields()
Ordered fields to group in listjava.lang.String
getHelp()
Get main object helpjava.lang.String
getHistoricDBName()
Get historic object physical name (table name)java.lang.String
getHistoricName()
Get historic object namejava.lang.String
getIconCode()
Get icon codejava.lang.String
getId()
Get the object definition IDObjectField
getImageField()
Get the first visible field containing an imageint
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 listObjectField
getInput(java.lang.String name)
Get a field from logical input nameObjectField
getInput(java.lang.String name, boolean err)
Get a field from logical input nameObjectField
getInputAtIndex(int index)
Deprecated.Use getFieldint
getInputIndex(java.lang.String name)
Get the field index from logical input nameint
getInputIndex(java.lang.String name, boolean err)
Get the field index from logical input namejava.lang.String
getInstanceName()
Get object instance nameint
getIntParameter(java.lang.String name, int def)
Gets one integer parameterjava.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 recordjava.lang.String
getLastUpdatedDate()
Get the last updated date of current recordLink
getLink(java.lang.String childObject, java.lang.String refField)
Find a linkjava.util.List<LinkDatamap>
getLinkDataMap()
Deprecated.java.util.List<Link>
getLinks()
Get all objects linksint
getListEditMode()
List edit toggle LIST_READ/LIST_EDIT/LIST_ADDjava.util.List<ObjectField>
getListOperationFields()
Get fields for list operationsint
getListSize()
Get page size of listObjectNode
getListTree()
Get stored tree in memorylong
getLongParameter(java.lang.String name, long def)
Gets one long parameterint
getMaxPage()
Get maximum pages in list paginationchar
getMenuSearch()
Default search display when accessing the object by menujava.lang.String
getModuleId()
Get the object module IDstatic java.lang.String
getModuleId(java.lang.String objectId)
Retrieve the object's module ID from the object IDstatic java.lang.String
getModuleIdByName(java.lang.String objectName)
Get object's module ID from the object namejava.lang.String
getModuleName()
Get the object module namejava.lang.String
getName()
Get logical object namestatic java.lang.String
getObjectId(java.lang.String objectName)
Get object ID from nameObjectLocation
getObjectLocation()
Get object location datastatic java.lang.String
getObjectName(java.lang.String objectId)
Get object name from its IDjava.lang.Object
getObjectParameter(java.lang.String name)
Gets one object parameterjava.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 valuesstatic java.lang.String[]
getOldValues(ObjectCore obj)
Get current old values of specified objectjava.lang.String
getParameter(java.lang.String name)
Gets a text parameterjava.lang.String
getParameter(java.lang.String name, java.lang.String def)
Gets a text parameterObjectField
getParentField(ObjectCore parent, ObjectField childField)
Look for a field in the parent object matching with a child inputint
getParentIdx()
Search an index of one field that references the objectObjectCore
getParentObject()
Get the contextual parent object for child listsjava.lang.String
getParentObjectRefField()
Get the child field that references parent object for child listsjava.lang.String[]
getParentValues()
Get parent values (used to limit search in where clause)PlaceMap
getPlaceMap(java.lang.String p)
Get one place mapjava.util.Map<java.lang.String,PlaceMap>
getPlaceMaps()
Get all place mapsjava.lang.String
getPluralDisplay()
Get the plural object translation in current user languagejava.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 searchint
getPredefSearch()
Use predefined search ?PrintTemplate
getPrintTemplate(java.lang.String name)
Get publication templatejava.util.Map<java.lang.String,PrintTemplate>
getPrintTemplates()
Get publication templatesObjectField
getRefField(ObjectField f)
Should not be used.java.util.List<ObjectField>
getRefFields(java.lang.String object)
List referenced fields to objectjava.util.List<Link>
getReflexiveLinks()
Get all reflexive linksjava.util.Map<java.lang.String,java.util.List<ObjectField>>
getRefObjects()
List all referenced objectsResource
getResource(java.lang.String name)
Get object resourcejava.util.List<Resource>
getResources(boolean reload)
Get object resourcesObjectField
getRootField(ObjectField f)
Watch for a root parent field in the objectjava.lang.String
getRowId()
Get current record's item row IDjava.lang.String
getRowId(java.lang.String[] row)
Get row ID for specified record rowObjectField
getRowIdField()
Get object row id fieldint
getRowIdFieldIndex()
Get object's row ID field indexSharedScript
getScript(java.lang.String name)
Get object server script for specified namejava.lang.String
getScriptId()
Get the object script document IDjava.util.List<SharedScript>
getScripts()
Get all object server scripts (inherited)int
getSearchLimit()
Search limit ?java.lang.String
getSearchSpec()
Get the current search specificationjava.util.List<java.lang.String>
getSelectedIds()
Get current selected rows.SharedScript
getSharedScript(java.lang.String name)
Get shared server script for specified namejava.util.List<SharedScript>
getSharedScripts()
Get all shared server scriptsObjectField
getStartDateField()
Optional start date fieldjava.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 namejava.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 templatestatic java.lang.String
getTemplateId(java.lang.String objectName)
Get object's template ID from object namestatic java.lang.String
getTemplateName(java.lang.String objectName)
Get object's template name from object nameTimesheet
getTimesheet(java.lang.String t)
Get one timesheetjava.util.Map<java.lang.String,Timesheet>
getTimesheets()
Get all timesheetsjava.lang.String
getTitle()
Substitute extended title with current valuesjava.lang.String
getTitle(java.lang.String[] row)
Substitute extended title with current values or specified rowjava.lang.String
getUIMiniature()
Get front UI miniaturejava.lang.String
getUITemplate()
Get front UI templatejava.lang.String[]
getValues()
Get current valuesstatic java.lang.String[]
getValues(ObjectCore obj)
Get current values of specified objectjava.util.List<View>
getView()
Deprecated.use getViewsView
getView(java.lang.String name)
Get a viewchar
getViewMode()
Get the view mode from VIEW_MODE_*java.util.List<View>
getViews()
Get all object viewsboolean
hasChanged(boolean timestamp)
Checks if the object has changedboolean
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 fieldboolean
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 fieldboolean
hasIndexableFields()
Contains indexable fields ?boolean
hasInput(java.lang.String name)
Check whether an input name correspond to an object fieldboolean
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 searchesboolean
haveMore()
Deprecated.Use hasMoreOnFormstatic void
initLists(ObjectCore obj, boolean creation)
Set the linked enum and status fieldsstatic void
initLists(ObjectCore obj, boolean creation, boolean search)
Set the linked enum and status fieldsboolean
isAgendaInstance()
Is a agenda instanceboolean
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 objectboolean
isChildOf(java.lang.String parentName, java.lang.String parentRefField)
Check if object is child of specifed object thru specified fieldboolean
isCopied()
Is current creation a copy from another itemboolean
isCopy()
Deprecated.Use canCopyboolean
isCronInstance()
Is a cron instanceboolean
isCustomRowId()
Is custom row ID field?boolean
isDataMapInstance()
Is a data mapping instanceboolean
isDataMappedFrom(java.lang.String objectName)
Check if object is data mapped from specified objectboolean
isDate(java.lang.String JJ, java.lang.String MM, java.lang.String AAAA)
boolean
isDistinct()
Is distinct ?boolean
isExport()
Deprecated.Use canExportjava.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 UIint
isFieldSearchable(ObjectField f)
Checks if a field is searcheableboolean
isFieldUpdatable(ObjectField f, boolean list, boolean checkRef)
Checks if the field is updatableboolean
isFieldVisible(ObjectField f, boolean ignoreMore, boolean list)
Checks if a field is visibleboolean
isFieldVisibleJSON(ObjectField f, boolean searchable, boolean constraint, boolean placemap)
Visible fields on list UI via JSONboolean
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 instanceboolean
isIndexable()
Is indexable (itself and contains indexable fields) ?boolean
isInstanceOf(java.lang.String name)
Check the object inheritanceboolean
isInternalRowId()
Is standard internal row ID field ("row_id")?boolean
isJavaImplemented()
Object is implemented in Java?boolean
isLimit()
Deprecated.Use useLimitboolean
isListEditable()
Allow rows to be editable ?boolean
isListSearch()
Is the embedded search in list accessibleboolean
isListSearchVisible()
Is the embedded search in list visibleboolean
isListTree()
Use tree in list ?boolean
isListUpsertable()
Allow create+rows to be editable ?boolean
isLoaded()
Are meta data loadedboolean
isMainInstance()
Is the main instanceboolean
isMenuSearch()
Deprecated.boolean
isMergeable()
Can merge rows together ?boolean
isModelerInstance()
Is a modeler instanceboolean
isMoreForm()
Deprecated.Use isMoreOnFormboolean
isMoreFormEnable()
Deprecated.Use isMoreOnFormboolean
isMoreListEnable()
Deprecated.Use isMoreRowsboolean
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 objectboolean
isPanelOf(java.lang.String parentName, java.lang.String parentRefField)
Check if object is panel of specified object thru specified fieldboolean
isPredefSearch()
Use predefined search ?boolean
isPredefSearchOnList()
Access to predefined search on list ?boolean
isProcessInstance()
Is a process instanceboolean
isQuerySpecific()
Use a specific query ?boolean
isReadOnly()
Globally read onlyboolean
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 isRefCountboolean
isReferencedFrom(java.lang.String objectName)
Check if object is referenced from specified objectboolean
isReferencedFrom(java.lang.String objectName, java.lang.String refField)
Check if object is referenced from specified object thru specified fieldboolean
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 instanceboolean
isTreeviewInstance()
Is a treeview instanceboolean
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 valueboolean
isUnique(ObjectField f, java.lang.String val, java.lang.String where)
Check unicity of specified value for fieldboolean
isUpdateAll()
Deprecated.Use canUpdateAllboolean
isWebServiceInstance()
Is a webservice instancelong
lastUsage(boolean update)
Last usage timestamp (last access to object engine)void
listSelectAll()
Select allboolean
listSelectId(java.lang.String id)
Select a row id, or remove it if already selectedvoid
listSelectPage()
Select current page rowsvoid
listUnselectAll()
Unselect all rowsvoid
listUnselectId(java.lang.String id)
Unselect a row idstatic java.lang.String
parseDataSourceName(java.lang.String dbtable)
Get data source name part from object table name stringstatic java.lang.String
parseTableName(java.lang.String dbtable)
Get table name part from object table name stringjava.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 paginationjava.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 fieldjava.io.Serializable
removeParameter(java.lang.String name)
Unsets a parametervoid
removeParameters(java.lang.String prefix)
Unsets parameters starting with prefixvoid
resetAllFields()
Deprecated.Use resetFiltersOrdersAndCalcDefaultsvoid
resetAllFieldsRequired()
Reset all fields to their required defaultvoid
resetAllFieldsSearch()
Reset all fields to their searchable defaultvoid
resetAllFieldsSearchRequired()
Reset all fields to their required search defaultvoid
resetAllFieldsUpdatable()
Reset all fields to their updatable defaultvoid
resetContextDefaultValues()
Clears contextualized default value for all fieldsvoid
resetFilter()
Deprecated.Use resetFiltersvoid
resetFilters()
Clears all filters for all fields (all filters are set to %)void
resetFilters(boolean ignoreParent)
Clears all filters for all fieldsvoid
resetFiltersOrdersAndCalcDefaults()
Clears all fields filters, default ordering and contextualized default valuesvoid
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 defaultsvoid
resetSearchables()
Reset all field search type (and required search strategy) to defaultsvoid
resetSelectedIds()
Reset current selected rows.void
resetUpdatables()
Reset all field updatability to defaultsvoid
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 emptyvoid
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 valuevoid
resetVisibilities()
Reset all field visibilities to defaultsvoid
selectCurrentItemFromList()
Select current position list item as current itemvoid
selectItemFromList(int pos)
Select current list item for specified position as current itemvoid
setAlias(java.lang.String a)
Set alias (or remove with null)void
setAllFieldsUpdatable(boolean b)
Set/unset all fields as updatablevoid
setCacheFrom(java.lang.String req)
Get cached from statementvoid
setCacheSelect(java.lang.String req)
Get cached select statementvoid
setClassName(java.lang.String cn)
Set the object class namevoid
setClose(boolean b)
Set object to allow close formvoid
setContext(ObjectContext ctx)
Set current usage context (list, create, update...)void
setCopy(boolean enabled)
Set object to allow copyvoid
setCopy(boolean enabled, boolean plus)
Set object to allow copyvoid
setCopyId(java.lang.String b)
Set row id of the item to copyvoid
setCreateOnLinks(boolean b)
Set object to allow create on linksvoid
setCrosstabVisibility(boolean visibility)
Set pivot table visibilityvoid
setCtxHelps(java.util.List<ObjectCtxHelp> ctxhelps)
Set contextual helpsvoid
setCurrentAction(java.lang.String a)
Set current custom action (null if no action)void
setCurrentList(java.util.List<java.lang.String[]> v)
Set current listvoid
setCurrentPage(int i)
Set current page in list paginationvoid
setCurrentPos(int i)
Set current list item position in current pagevoid
setCurrentPos(java.lang.String row_id)
Set current list item position (using row id) in current pagevoid
setCurrentTransition(FieldStateTransition t)
Set current transitionvoid
setCurrentView(java.lang.String view, boolean checkRef)
Set the current viewvoid
setData(ObjectData d)
Set core object meta datavoid
setDataSource(java.lang.String ds)
Set data source namevoid
setDataSourceVendor(int v)
Set data source vendorvoid
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 formvoid
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 deletevoid
setDeleteAll(boolean enabled, boolean plus)
Set object to allow bulk deletevoid
setDesc(java.lang.String d)
Set descriptionvoid
setDisplay(java.lang.String d)
Set the object translation in current user languagevoid
setDistinct(boolean b)
Set object to be distinctvoid
setEndDateField(ObjectField f)
Set the end date fieldvoid
setExport(boolean enabled)
Set object to allow exportvoid
setExport(boolean enabled, boolean plus)
Set object to allow exportvoid
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 fieldsvoid
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 objectvoid
setFilters(ObjectFieldSearch[] filters)
Set current filtersvoid
setFilters(java.util.List<ObjectFieldSearch> filters)
Set current filtersvoid
setFollowLinks(boolean b)
Set object to allow follow linksvoid
setForm(boolean b)
Set the object to use the formvoid
setFormLayout(int fl)
Set form layoutvoid
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 listvoid
setHaveMore(boolean b)
Deprecated.Does nothing now !!!void
setHelp(java.lang.String help)
Set main object helpvoid
setHistoric(boolean b)
Set historization requiredvoid
setHistoricLog(boolean b)
Set single redo log historizablevoid
setHistoricPost(boolean b)
Set historizable with social postvoid
setHistoricRedoLog(boolean b)
Set full redo log historizablevoid
setIconCode(java.lang.String i)
Set icon codevoid
setId(java.lang.String id)
Set the object definition IDvoid
setIndexable(boolean b)
Set indexablevoid
setInheritedObject(java.lang.String obj)
Push one inherited objectsvoid
setInstanceName(java.lang.String s)
Set object instance namevoid
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 paginationvoid
setListAccessNewForm(boolean b)
Display the 'New' form buttonvoid
setListAccessNewLine(boolean b)
Display the New line button, generate the 'addlist' actionvoid
setListAccessNewLine(boolean b, boolean loop, boolean plus)
Display the New line button, generate the 'addlist' actionvoid
setListEdit(java.lang.String edit)
Set list editablevoid
setListEdit(java.lang.String edit, boolean plusAddList, boolean plusEditList, boolean plusUpsertList)
Set list editablevoid
setListEditable(boolean b)
Set list editable and generate the 'listedit' actionvoid
setListEditable(boolean b, boolean plus)
Set list editable and generate the 'listedit' actionvoid
setListEditMode(int m)
Set object to allow edit listvoid
setListSearch(boolean b)
void
setListSearchVisible(boolean b)
Set the embedded search in list hidden or notvoid
setListSize(int size)
Set page size of listvoid
setListTree(boolean b)
Set object to use tree in list ?void
setListUpsertable(boolean b, boolean plus)
Set list create+editable and generate the 'listupsert' actionvoid
setMaxPage(int m)
Set maximum pages in list paginationvoid
setMenuDashboard(boolean b)
Set use dashboard menuvoid
setMenuSearch(boolean b)
Deprecated.void
setMenuSearch(char mode)
void
setMenuTray(boolean b)
Set use tray menuvoid
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 IDvoid
setModuleName(java.lang.String m)
Set the object module namevoid
setMoreForm(boolean b)
Deprecated.Use setMoreOnFormvoid
setMoreOnForm(boolean b)
Set the form to be in extended modevoid
setMoreOnList(boolean b)
Set the list to be in extended modevoid
setMoreRows(boolean b)
Set the list to be in more rows modevoid
setMoreSearch(boolean b)
Set the search to be in extended modevoid
setName(java.lang.String n)
Set logical object namestatic void
setOldValues(ObjectCore obj, java.lang.String[] oldvalues)
Set current old values for specified objectvoid
setOldValues(java.lang.String[] oldvalues)
Set current old valuesvoid
setOldValues(java.util.List<java.lang.String> oldvalues)
Set current old valuesvoid
setParameter(java.lang.String name, boolean b)
Set parameter from booleanvoid
setParameter(java.lang.String name, double d)
Set parameter from double floatvoid
setParameter(java.lang.String name, float f)
Set parameter from floatvoid
setParameter(java.lang.String name, int i)
Set parameter from integervoid
setParameter(java.lang.String name, long l)
Set parameter from long integrevoid
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 listsvoid
setParentObjectRefField(java.lang.String field)
Set the child field that references parent object for child listsvoid
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 languagevoid
setPluralLabel(java.lang.String d)
Set the plural object translation in current user language (alias to setPluralDisplay)void
setPredefinedSearchIndex(int i)
Set selected predefined searchvoid
setPredefSearch(boolean b)
Set the object to use and edit predefined searchvoid
setPredefSearch(boolean use, boolean edit)
Set the object to use predefined searchvoid
setPredefSearch(java.lang.String predef)
Set the object to use predefined searchvoid
setPredefSearchOnList(boolean b)
Set the object to access predefined search on listvoid
setPrint(boolean b)
Set can printvoid
setPrintTemplateVisibility(boolean visibility)
Set publication template visibilityvoid
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 exportvoid
setRefCount(boolean b)
Set count linksvoid
setRowId(java.lang.String id)
Set current record's item row IDvoid
setSave(boolean b)
Set object to allow save formvoid
setSaveAndClose(boolean b)
Set object to allow save/close formvoid
setSaveAndCopy(boolean b)
Set object to allow save/copy formvoid
setSaveAndNew(boolean b)
Set object to allow save/new formvoid
setScriptId(java.lang.String id)
Set the object script document IDvoid
setSearchCreatedBy(boolean b)
Set 'created by' searchablevoid
setSearchCreatedDate(boolean b)
Set 'created date' searchablevoid
setSearchLimit(int n)
Set object to have a search limitvoid
setSearchLimitError(boolean b)
Set objet to generate error on over search limit searchesvoid
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 specificationvoid
setSearchUpdatedBy(boolean b)
Set 'updated by' searchablevoid
setSearchUpdatedDate(boolean b)
Set 'updated date' searchablevoid
setSelectRow(boolean b)
Allow list rows selectionvoid
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 + sharevoid
setSocial(boolean popup, boolean inline, boolean share)
Allows to post social messagesvoid
setStartDateField(ObjectField f)
Set the start date fieldvoid
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 objectvoid
setTable(java.lang.String t)
Set physical table namevoid
setTemplate(java.lang.String t)
Set form templatevoid
setTimestamp(int t)
Set object as using a timestamp TIMESTAMP_*void
setTimeStamp(boolean b)
Deprecated.Use setTimestampvoid
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 miniaturevoid
setUITemplate(java.lang.String t)
Set front UI templatevoid
setUpdateAll(boolean enabled)
Set object to allow bulk updatevoid
setUpdateAll(boolean enabled, boolean plus)
Set object to allow bulk updatestatic 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 onesvoid
setValues(java.util.List<java.lang.String> values, java.lang.Boolean withOldValues, boolean withDocs)
Set current valuesstatic void
setValuesFromJSONObject(ObjectCore obj, org.json.JSONObject values, boolean oldValues)
Set current values for specified object from JSON objectvoid
setValuesFromJSONObject(org.json.JSONObject values, boolean oldValues)
Set current values for object from JSON objectvoid
setViewMode(char mode)
Set the view mode to VIEW_MODE_*void
testData()
Generate random/sample field values on row IDvoid
testData(java.lang.String rowId, boolean random, boolean refs)
Generate random/sample field valuesjava.lang.String
toCSV(java.util.List<java.lang.String[]> rows)
Publish rows to raw CSVvoid
toCSV(java.util.List<java.lang.String[]> rows, java.io.PrintWriter out)
Publish rows to raw CSV on specified print writerjava.lang.String
toHTML()
Publish current row to raw HTMLjava.lang.String
toHTML(java.util.List<java.lang.String[]> rows)
Publish specified rows to raw HTMLvoid
toHTML(java.util.List<java.lang.String[]> rows, java.io.PrintWriter out)
Publish specified rows to raw HTML on specified print writerjava.lang.String
toJSON()
Serialize current row to JSON without documentsjava.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 JSONjava.lang.String
toJSON(Parameters.InlineParam inlines, java.util.List<ObjectField> fields, boolean onlyFunctIds)
Serialize current row to JSONjava.lang.String
toJSON(Parameters.InlineParam inlines, java.util.List<ObjectField> fields, boolean onlyFunctIds, boolean timestamps, java.lang.String separator)
Serialize current row to JSONjava.lang.String
toJSON(java.lang.String[] row, Parameters.InlineParam inlines, boolean timestamps, boolean visibleOnly)
Serialize specified row to JSONjava.lang.String
toJSON(java.util.List<java.lang.String[]> rows, Parameters.InlineParam inlines, boolean timestamp, boolean visibleOnly)
Serialize specified rows to JSONorg.json.JSONObject
toJSONObject()
Generates a JSON object representation of the business objectorg.json.JSONObject
toJSONObject(boolean params)
Generates a JSON object representation of the business objectjava.lang.String
toString()
Generates a string representation of the business objectjava.lang.String
toString(boolean params)
Generates a string representation of the business objectjava.lang.String
toTSV(java.util.List<java.lang.String[]> rows)
Publish rows to raw TSVvoid
toTSV(java.util.List<java.lang.String[]> rows, java.io.PrintWriter out)
Publish rows to raw TSV on specified print writerboolean
useForm()
Use the form ?boolean
useLimit()
Use list pagination ?boolean
useTimeStamp()
Use a timestamp ?
-
-
-
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_UNKNOWN
@Deprecated public static final int DB_UNKNOWN
Deprecated.- See Also:
- Constant Field Values
-
DB_MYSQL
@Deprecated public static final int DB_MYSQL
Deprecated.- See Also:
- Constant Field Values
-
DB_ORACLE
@Deprecated public static final int DB_ORACLE
Deprecated.- See Also:
- Constant Field Values
-
DB_HSQLDB
@Deprecated public static final int DB_HSQLDB
Deprecated.- See Also:
- Constant Field Values
-
DB_POSTGRESQL
@Deprecated public static final int DB_POSTGRESQL
Deprecated.- See Also:
- Constant Field Values
-
DB_MSSQL
@Deprecated public static final int DB_MSSQL
Deprecated.- See Also:
- Constant Field Values
-
DB_H2
@Deprecated public static final int DB_H2
Deprecated.- See Also:
- Constant Field Values
-
DB_DERBY
@Deprecated public static final int DB_DERBY
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_CASCAD
public static final char DEL_CASCAD
Cascading deletion- 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_NONE
public static final int CONTEXT_NONE
- See Also:
- Constant Field Values
-
CONTEXT_SEARCH
public static final int CONTEXT_SEARCH
- See Also:
- Constant Field Values
-
CONTEXT_LIST
public static final int CONTEXT_LIST
- See Also:
- Constant Field Values
-
CONTEXT_CREATE
public static final int CONTEXT_CREATE
- See Also:
- Constant Field Values
-
CONTEXT_COPY
public static final int CONTEXT_COPY
- See Also:
- Constant Field Values
-
CONTEXT_UPDATE
public static final int CONTEXT_UPDATE
- See Also:
- Constant Field Values
-
CONTEXT_DELETE
public static final int CONTEXT_DELETE
- See Also:
- Constant Field Values
-
CONTEXT_GRAPH
public static final int CONTEXT_GRAPH
- See Also:
- Constant Field Values
-
CONTEXT_CROSSTAB
public static final int CONTEXT_CROSSTAB
- See Also:
- Constant Field Values
-
CONTEXT_PRINTTMPL
public static final int CONTEXT_PRINTTMPL
- See Also:
- Constant Field Values
-
CONTEXT_UPDATEALL
public static final int CONTEXT_UPDATEALL
- See Also:
- Constant Field Values
-
CONTEXT_REFSELECT
public static final int CONTEXT_REFSELECT
- See Also:
- Constant Field Values
-
CONTEXT_DATAMAPSELECT
public static final int CONTEXT_DATAMAPSELECT
- See Also:
- Constant Field Values
-
CONTEXT_PREVALIDATE
public static final int CONTEXT_PREVALIDATE
- See Also:
- Constant Field Values
-
CONTEXT_POSTVALIDATE
public static final int CONTEXT_POSTVALIDATE
- See Also:
- Constant Field Values
-
CONTEXT_STATETRANSITION
public static final int CONTEXT_STATETRANSITION
- See Also:
- Constant Field Values
-
CONTEXT_EXPORT
public static final int CONTEXT_EXPORT
- See Also:
- Constant Field Values
-
CONTEXT_IMPORT
public static final int CONTEXT_IMPORT
- See Also:
- Constant Field Values
-
CONTEXT_ASSOCIATE
public static final int CONTEXT_ASSOCIATE
- See Also:
- Constant Field Values
-
CONTEXT_PANELLIST
public static final int CONTEXT_PANELLIST
- See Also:
- Constant Field Values
-
CONTEXT_ACTION
public static final int CONTEXT_ACTION
- See Also:
- Constant Field Values
-
CONTEXT_AGENDA
public static final int CONTEXT_AGENDA
- See Also:
- Constant Field Values
-
CONTEXT_PLACEMAP
public static final int CONTEXT_PLACEMAP
- 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
-
LIST_ADD
public static final int LIST_ADD
List is in a add row 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
-
-
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 interfaceCacheInterface
- 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 rowIdrow
- 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 interfaceCacheInterface
- 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 interfaceCacheInterface
- 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 interfaceCacheInterface
- Returns:
- True if something has been cleared
-
enableGC
public void enableGC(boolean enabled)
Enable or disable the internal GC- Specified by:
enableGC
in interfaceCacheInterface
- Parameters:
enabled
- Enabled?
-
isJavaImplemented
public boolean isJavaImplemented()
Object is implemented in Java?- Specified by:
isJavaImplemented
in interfaceCacheInterface
- 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 namelang
- 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 namelang
- Languageplural
- 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 namerow
- 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 namerow
- 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 namefilter
- 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 namevalue
- 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 namevalue
- 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 nameord
- 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 dialogedit
- 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 | prefmedia
- 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 typelabel
- Action labelimg
- Action iconpos
- Action positionenabled
- Add or remove the actionplus
- add to plus buttoncount
- 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 editableplusAddList
- 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
- Fielddoc
- 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 rowsmaxRows
- 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 dialoginline
- Display post on bottom of formshare
- 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;childForeignKeycheckRef
- 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 nameparentRefField
- 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 nameparentRefField
- 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 namerefField
- 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
- FielddisplayValue
- 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
- Nameerr
- 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 labelerr
- 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 nameerr
- 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 nameerr
- 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
- Nameerr
- 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
- Nameerr
- 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
- Nameerr
- 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 otherwiserowId
- 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
- Expressioncontext
- 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
- Expressioncontext
- Contextrow
- 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
- Expressioncontext
- Contextin
- Input variables to set before expression evaluationout
- 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
- Expressioncontext
- Contextrow
- Row (null means selected item)in
- Input variables to set before expression evaluationout
- 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 vendorrows
- 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 namerow
- 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 namerow
- 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 substituterow
- 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
- Objectfilters
- 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
- Objectoldvalues
- 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 rowsf
- 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
- Objectrows
- Data rowsf
- 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 valueswithDocs
- 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 valueswithDocs
- 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
- Objectvalues
- 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
- Objectvalues
- 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 valueswithDocs
- Retrieve doc infos from DB
-
initLists
public static void initLists(ObjectCore obj, boolean creation)
Set the linked enum and status fields- Parameters:
obj
- Objectcreation
- 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
- Objectcreation
- 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
- Objectvalues
- Values as JSON objectoldValues
- 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 namevalue
- 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 namedef
- 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 namedef
- 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 fieldlist
- checks in list or in form contextcheckRef
- 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 fieldignoreMore
- true to ignore more property, false to test if the field+object are extendedlist
- 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 areaall
- true to ignore more flags, false to test if the field+object are extendedlist
- 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 fieldval
- Optional value (defaults to current field value)where
- Optional custom SQL where clause (added after an AND defaults to nothing at creation and torow 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
- Rowsout
- 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
- Rowsout
- 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
- Rowsout
- 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 optionsfields
- Restrict to specified list of fieldsonlyFunctIds
- 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 optionsfields
- Restrict to specified list of fieldsonlyFunctIds
- 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
- Rowinlines
- Inline documents optionstimestamps
- 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
- Rowsinlines
- Inline documents optionstimestamp
- 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 classjava.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
-
-