Package com.simplicite.util
Class ObjectField
- java.lang.Object
-
- com.simplicite.util.ObjectField
-
- All Implemented Interfaces:
java.io.Serializable
public class ObjectField extends java.lang.Object implements java.io.Serializable
Object field.
The field can be used by ObjectDB, by document indexation or by workflow process.
All properties are loaded first and can be changed on the fly with the hooks.
It may not have a physical name (ex: a calculated field is not stored in DB).
It must have a translation in each language.- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description class
ObjectField.Metrics
Field metrics
-
Field Summary
Fields Modifier and Type Field Description static char
AUTO_COMPLETE_NONE
No field completionstatic char
AUTO_COMPLETE_SELECT
Use the field completion with auto-select optionstatic char
AUTO_COMPLETE_SIMPLE
Use the field completionstatic char
CASE_FIRSTCAPITAL
First capitalstatic char
CASE_LOWER
Lower casestatic char
CASE_NONE
No case (or null)static char
CASE_UPPER
Upper casestatic java.lang.String
DEFAULT_FILTER
Default filter valuestatic java.lang.String
DEFAULT_ROW_ID
Default value for row id value (for creation)static java.lang.String
FILTER_ANYCHARS
Wildcard any charactersstatic java.lang.String
FILTER_ANYSINGLECHAR
Wildcard one charactersstatic short
FIXED_FILTER_HIDE
Fixed filter: hidden on UIstatic short
FIXED_FILTER_NOT
Not a fixed filterstatic short
FIXED_FILTER_READ
Fixed filter: readable on UIstatic int
LIST_AVG
Average liststatic int
LIST_CALC
Calculate with field expressionstatic int
LIST_MAX
Maximize liststatic int
LIST_MIN
Minimize liststatic int
LIST_NONE
No list calculationstatic int
LIST_SUM
Sum liststatic java.lang.String
PASSWORD_MASK
Mask for displaying passwordsstatic java.lang.String
RENDERING_CHECK
Rendering checkboxstatic java.lang.String
RENDERING_COMBO
Rendering select boxstatic java.lang.String
RENDERING_DEFAULT
Rendering defaultstatic java.lang.String
RENDERING_EXPRESSION
Rendering for script expressionstatic java.lang.String
RENDERING_GRID
Rendering for JSON 2D Arraystatic java.lang.String
RENDERING_HORIZONTAL
Rendering horizontal check/radiostatic java.lang.String
RENDERING_HTML
Rendering for HTMLstatic java.lang.String
RENDERING_JSON
Rendering for JSONstatic java.lang.String
RENDERING_MARKDOWN
Rendering for markdown textstatic java.lang.String
RENDERING_MONO
Rendering monotypestatic java.lang.String
RENDERING_MULTI_DOC_BOX
Rendering multi-doc with boxesstatic java.lang.String
RENDERING_MULTI_DOC_LIST
Rendering multi-doc with liststatic java.lang.String
RENDERING_PILLBOX
Rendering pillboxstatic java.lang.String
RENDERING_RADIO
Rendering radio buttonstatic java.lang.String
RENDERING_SELECTBOX
Rendering select box (single or multiple select)static java.lang.String
RENDERING_SLIDE
Rendering slide buttonstatic java.lang.String
RENDERING_SQL
Rendering for SQLstatic java.lang.String
RENDERING_TEXT
Rendering for text editorstatic java.lang.String
RENDERING_VERTICAL
Rendering vertical check/radiostatic int
SEARCH_MONO
Simple search with one valuestatic int
SEARCH_MULTI_CHECK
Multi-search with checkboxstatic int
SEARCH_MULTI_LIST
Multi-search with a choice liststatic int
SEARCH_NONE
No searchstatic int
SEARCH_PERIOD
Search with a time periodstatic int
SEARCHREQ_EXT
For extended searchesstatic int
SEARCHREQ_NOT
Not required for searchesstatic int
SEARCHREQ_REQ
Required for searchesstatic int
SEARCHREQ_SEMI
Semi-required for searchesstatic char
SORT_BY_CODE
Sort by code (DB value)static char
SORT_BY_CODE_ORDER
Sort by code order of enumstatic char
SORT_BY_VALUE
Sort by value (translation in case of enum)static char
SORT_NONE
No orderingstatic int
TYPE_BIGDECIMAL
BigDecimal max storage DECIMAL(100,32)static int
TYPE_BOOLEAN
Boolean False=0 True=1static int
TYPE_COLOR
Colorstatic int
TYPE_DATE
Date (format yyyy-MM-ddstatic int
TYPE_DATETIME
Datetime (format yyyy-MM-dd HH:mm:ss)static int
TYPE_DOC
Documentstatic int
TYPE_EMAIL
Emailstatic int
TYPE_ENUM
Enum (list of values)static int
TYPE_ENUM_MULTI
Multi-enum (list of values).static int
TYPE_EXTFILE
Physical path a filestatic int
TYPE_FLOAT
Float (double precision)static int
TYPE_GEOCOORDS
Geo coordinates as "latitude;longitude[;altitude]" in a single valuestatic int
TYPE_HTML
Rich content HTMLstatic int
TYPE_ID
Technical ID (foreign key or primary key)static int
TYPE_IMAGE
Imagestatic int
TYPE_INT
Signed integerstatic int
TYPE_LONG_STRING
Long textstatic int
TYPE_NONE
No typestatic int
TYPE_NOTEPAD
Notepad: appending text with datetime + loginstatic int
TYPE_OBJECT
Object as "name:id" in a single valuestatic int
TYPE_PASSWORD
Passwordstatic int
TYPE_PHONENUM
Phone numberstatic int
TYPE_REGEXP
Text with regular expressionstatic int
TYPE_STRING
Short textstatic int
TYPE_TIME
Time (format HH:mm:ss)static int
TYPE_URL
URLstatic java.lang.String[]
TYPES
Typesstatic int
UPD_ALWAYS
Updatable in lists and formsstatic int
UPD_FORM_ONLY
Updatable in forms onlystatic int
UPD_LIST_ONLY
Updatable in lists onlystatic int
UPD_READ_ONLY
Readonlystatic int
VIS_BOTH
Visible in lists and formsstatic int
VIS_FORBIDDEN
Not visible to API and UIstatic int
VIS_FORM
Visible in forms onlystatic int
VIS_HIDDEN
Simply hidden on UIstatic int
VIS_LIST
Visible in lists onlystatic int
VIS_NOT
Alias to VIS_HIDDEN
-
Constructor Summary
Constructors Constructor Description ObjectField()
Default constructorObjectField(int type)
ConstructorObjectField(int type, java.lang.String value)
ConstructorObjectField(int type, java.lang.String name, java.lang.String value)
ConstructorObjectField(int type, java.lang.String name, java.lang.String column, int size, int prec)
ConstructorObjectField(ObjectField f)
Cloning constructor
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description void
addLinkDataMap(LinkDatamap ldm)
void
addNotepad(java.lang.String fullname, java.lang.String text)
Add text to notepadvoid
addStyle(FieldStyle style)
Add a UI style to the fieldvoid
addStyle(java.lang.String val, java.lang.String min, java.lang.String max, java.lang.String style, java.lang.String icon)
Add a UI style to the fieldjava.lang.String
addValue(java.lang.String value)
Add a value to enum multiple (or set value on other types)boolean
canAutoComplete()
True if the field use auto-completionboolean
canAutoCompleteWithAutoSelect()
True if the field use auto-select on auto-completionboolean
canGroupBy()
Is the field group-by-able on UI ?boolean
canUpdateAll()
True if the field is bulk updatableObjectField
clone(ObjectField f)
Clone this fieldboolean
contains(java.lang.String code)
Test if the value or multi-enum contains a codevoid
delNotepad()
Delete text from notepadjava.lang.String
eval(ObjectDB obj, int context)
Calculated field evaluation on current selected itemjava.lang.String
eval(ObjectDB obj, int context, java.lang.String[] row)
Calculated field evaluationjava.lang.String
evalDefault(ObjectCore obj)
Default value evaluationjava.lang.String
getAdditionalSearchSpec()
Get additional SQL filter appended to where clausejava.lang.String
getAlias()
Get the alias or null if no aliasjava.lang.String[]
getAllCodes(ObjectCore obj, java.util.List<java.lang.String[]> rows)
Get all codes for specified object data rowsjava.lang.Boolean
getBoolean()
Get field value as a Boolean objectboolean
getBoolean(boolean defValue)
Get field value as raw boolean (with default value)java.lang.String
getCalcExpr()
Get the expression to calculate the field valuechar
getCase()
Get the field casejava.lang.String
getClassification()
Get confidentiality cassificationjava.lang.String[]
getCodes()
Get the codes of a multiple enumeration (TYPE_ENUM_MULTI) fieldjava.lang.String[]
getCodes(java.lang.String codes)
Get the codes of a multiple enumeration (TYPE_ENUM_MULTI) valuejava.lang.String
getColumn()
Get the physical column namejava.lang.String
getContextDefaultValue()
Default value to store specific creation contextint
getDataMap()
Get datamap index (-1=none)java.util.Date
getDate()
Get field value as a Date objectjava.util.Date
getDate(java.util.Date defValue)
Get field value as a Date object (with default value)java.lang.String
getDBName()
Get the physical column name (same as getColumn)java.math.BigDecimal
getDecimal()
Get field value as a BigDecimal objectjava.math.BigDecimal
getDecimal(java.math.BigDecimal defValue)
Get field value as BigDecimal object (with default value)java.lang.String
getDefault()
Get default valueint
getDefaultOrder()
Deprecated.Use getOrderDefaultjava.lang.String
getDefaultValue()
Alias to getDefaultjava.lang.String
getDesc(ObjectCore obj)
Get the alias or null if no aliasjava.lang.String
getDisplay()
Get the field translation in current user languagejava.lang.String
getDisplayOldValue()
Get previous display value (applies only to list of values values)java.lang.String
getDisplayOldValue(Grant g)
Get previous display value (applies also to user related formats : date, ...)java.lang.String
getDisplayValue()
Get the display value for current value (only applies to list of values)java.lang.String
getDisplayValue(Grant g)
Get the display current value for current value (applies also user related formats : dates, ...)java.lang.String
getDisplayValue(Grant g, java.lang.String value)
Get the display value for specified value (applies also user related formats : dates, ...)java.lang.String
getDisplayValue(java.lang.String value)
Get the display value for specified value (only applies to list of values)java.lang.String
getDisplayValue(java.lang.String value, java.lang.String sep)
Get the display value for specified value (only applies to list of values)java.lang.String
getDocIndex()
Set the bookshelf name (from DocIndex)DocumentDB
getDocument()
Document(s) extended data in memory.DocumentDB
getDocument(Grant g)
Load and get the document's extended dataDocumentDB
getDocuments(ObjectCore obj, java.lang.String rowId)
Deprecated.java.lang.Double
getDouble()
Field value as a Double objectdouble
getDouble(double defValue)
Get field value as a raw double (with default value)java.lang.String
getExportValue(Grant g, java.lang.String value)
Exported value to PDF and ExcelFieldArea
getFieldArea()
Get the field areastatic java.lang.String
getFieldId(java.lang.String name)
Get field ID from namestatic java.lang.String
getFieldTypeName(java.lang.String typeId)
Get field type name from rowIdjava.lang.String
getFilter()
Get field filter (% means no filter)java.lang.String
getFilterDateMax()
Get max date filter (for date field)java.lang.String
getFilterDateMin()
Get min date filter (for date field)ObjectFieldSearch
getFilterSearch()
Get the field filtersjava.lang.Float
getFloat()
Get field value as a Float objectfloat
getFloat(float defValue)
Get field value as a raw float (with default value)int
getFloatPrecision()
Get field precision (float decimals)java.lang.String
getFullInput()
Get the logical full input name (or input if null)int
getGroupByDefault()
Get default group by in listint
getGroupByOrder()
Get the current 'group by' order in listjava.lang.String
getHelp()
Get the help in the user languagejava.lang.String
getHelpList()
Get the help on list in the user languagejava.lang.String
getId()
Get the technical id of the fieldstatic java.lang.String
getId(java.lang.String name)
Get field rowId from namejava.lang.String
getImage(ObjectDB obj, java.lang.String val)
Get the image associated to the valuejava.lang.String
getIncrementPattern()
Get increment expressionint
getIndex(ObjectCore o)
Get position index in object fieldsjava.lang.String
getInheritedFromObject()
Get the inherited object nameint
getInitialOrder()
Deprecated.Use getOrderDefaultjava.lang.String
getInput()
Get the logical input name (or name if null)java.lang.Integer
getInt()
Get field value as an Integer objectint
getInt(int defValue)
Get field value as a raw integer (with default value)java.lang.String
getJoinedObjectName()
Joined object name (only set on foreign ID)java.lang.String
getLabel()
Get the field translation in current user language (alias to getDisplay)java.util.List<LinkDatamap>
getLinkDataMap()
Get link datamaps of foreign keyObjectFieldList
getList()
Get the field list of valuesjava.lang.String
getListName()
Get the name of the list of valuesjava.util.List<DocumentDB>
getListOfDocuments(ObjectCore obj, java.lang.String rowId)
Get multi-documents extended dataint
getListOperator()
Get the operator on lists LIST_*java.lang.String
getListOperatorValue()
Get current value of list operation (sum, avg, min/max...).java.lang.Long
getLong()
Get field value as a Long objectlong
getLong(long defValue)
Get field value as a raw long (with default value)java.util.List<java.lang.String>
getMetaObjectList()
Authorized objects of TYPE_OBJECTObjectField.Metrics
getMetrics()
Get the field UI metricsint
getMinSize()
Get field min sizejava.lang.String[]
getMultiFilter()
Get multi-valued filter for enum (separated by semi-colon)java.lang.String
getName()
Get the logical simple namestatic java.lang.String
getName(java.lang.String rowId)
Get field name from rowIdjava.lang.String
getObjectFieldId()
Get the technical id of the object-field relationstatic java.lang.String
getObjectFieldId(java.lang.String object, java.lang.String field)
Get 1st level object field ID from object name and field namejava.lang.Boolean
getOldBoolean()
Get field old value as a Boolean objectjava.lang.String
getOldCode()
Deprecated.Use getOldValuejava.util.Date
getOldDate()
Get field old value as a Date objectjava.math.BigDecimal
getOldDecimal()
Get field old value as a BigDecimal objectDocumentDB
getOldDocument()
Get old documentjava.lang.Double
getOldDouble()
Get field old value as a Double objectjava.lang.Float
getOldFloat()
Get field old value as a Float objectjava.lang.Integer
getOldInt()
Get field old value as an Integer objectjava.lang.Long
getOldLong()
Get field old value as a Long objectjava.lang.String
getOldValue()
Get previous valueint
getOrder()
Current sort specification in search:
asc = positive value,
desc = negative value,
no sort = 0int
getOrderDefault()
Default sort specification in search:
asc = positive value,
desc = negative value,
no sort = 0int
getOrderInObject()
Get the order in objectObjectField
getParentField()
Parent field (null if the field belongs to the object)java.lang.String
getPlaceholder()
Get the field placeholder translation in current user languagejava.lang.String
getRefColumn()
Get physical name of the referenced fieldjava.lang.String
getRefDataSource()
Get the DB datasource of the referenced objectjava.lang.String
getRefFieldDBName()
Alias to getRefColumnjava.lang.String
getRefFieldDisplay()
Get display name of the referenced fieldjava.lang.String
getRefFieldName()
Logical name of the referenced fieldjava.lang.String
getRefFilters()
Get search filters applied to linkorg.json.JSONObject
getRefFilters(ObjectDB obj)
Get search filters applied to linkint
getRefMaxOccurs()
Maximum occurs (m) in link cardinality (n,m), -1 means infinityint
getRefMinOccurs()
Minimum occurs (n) in link cardinality (n,m)java.lang.String
getRefObjectContext()
Get logical name of the current referenced objectjava.lang.String
getRefObjectDBName()
Alias to getRefTablejava.lang.String
getRefObjectDisplay()
Get display name of the referenced objectjava.lang.String
getRefObjectName()
Get logical name of the referenced objectint
getRefObjectRowIdType()
Get type of the referenced object row IDjava.lang.String
getRefRowId()
Physical name of the referenced table Id (default = row_id)java.lang.String
getRefSearchSpec()
Get search specification applied to linkjava.lang.String
getRefTable()
Get the DB table of the referenced objectjava.lang.String
getRegExp()
Set the regular expression for a regular expression type fieldjava.lang.String
getRegExpMethod()
Get method name to call for a regular expression type field (null=none)java.lang.String
getRegExpMsg()
Get message associated to regular expression typejava.lang.String
getRegName()
Get the name of a regular expression type fieldstatic java.util.List<java.lang.String[]>
getRelatedAreas(java.lang.String field)
Get areas containing the fieldstatic java.util.List<java.lang.String[]>
getRelatedObjects(java.lang.String field)
Get objects containing the fieldjava.lang.String
getRendering()
Get the field renderingjava.lang.String
getRenderingDefault()
Get the field rendering defaultjava.lang.String
getRenderingMode()
Long string rendering mode (for Ace Editor)boolean
getRequiredDefault()
Get default mandatory statusObjectField
getRootField()
Root parent fieldint
getSearch()
Get the field search typeint
getSearchDefault()
Get default field search typeint
getSearchRequired()
Get the field required strategy for searchesint
getSearchRequiredDefault()
Get default field required strategy for searchesjava.lang.String
getSearchSpec()
Get parsed generic SQL filter applied to a field (platform's internal usage, not to be used in specific code)java.lang.String
getShortDisplay()
Get the field short translation in current user languageint
getSize()
Get field max sizechar
getSortType()
Get the field sort type SORT_*java.lang.String
getSQLOldValue()
Returns the old value formatted for SQL statements (the value is surrounded by single quotes if the field is alphanumerical)java.lang.String
getSQLValue()
Returns the value formatted for SQL statements (the value is surrounded by single quotes if the field is alphanumerical)java.lang.String
getSQLValue(java.lang.String value)
Returns the value formatted for SQL statements (the value is surrounded by single quotes if the field is alphanumerical)java.lang.String
getStartDateField()
Optional related start date field (this field is the end date)java.util.List<FieldStateTransition>
getStateModel()
Get state model attached to the list of valuesFieldStateTransition
getStateTransition(java.lang.String tran)
Action
getStateTransitionAction(java.lang.String actionName)
Get the Action associated with a transition of status fieldAction
getStateTransitionAction(java.lang.String fromState, java.lang.String toState)
Deprecated, for removal: This API element is subject to removal in a future version.Use getStateTransition(name).getAction()java.lang.String
getStyle(ObjectDB obj)
Get field style for current valuejava.lang.String
getStyle(ObjectDB obj, java.lang.String val)
Get field style for specified valuejava.lang.String
getTooltip()
Get the tooltip in the user languageint
getType()
Get field typestatic java.lang.String
getTypeLabel(int type, int size, int prec)
Label for typeint
getUpdatableDefault()
Get default field updatabilityjava.lang.String
getValue()
Get the field valueint
getVisibility()
Get field visibilityint
getVisibilityDefault()
Get default field visibilityint
getVisible()
Deprecated.use getVisibilityint
getVisibleDefault()
Deprecated.use getVisibilityDefaultboolean
hasChanged()
Check whether the field value has changed (it performs a type-aware comparison between current value and old value)boolean
hasMenuList()
Has ENUM menu list?boolean
hasMenuListReferenced()
Has ENUM menu list from referenced object?boolean
hasMenuTray()
Has ENUM menu tray?boolean
hasSpeechRecognition()
Has speech recognition on UI?boolean
hasSpeechSynthesis()
Has speech synthesis on UI?java.lang.String
increment(ObjectDB obj, java.lang.String nextId, java.lang.String incrementPattern)
Increment field value by 1 based on pattern at Creationvoid
initStateModel()
Set state model attached to the list of valuesboolean
isAlphaNum()
Is type a text (in storage) ?boolean
isCopiable()
True if the field is copiableboolean
isDefaultExpr()
Is default value an expression ?boolean
isDocument()
Is type a document or image ?boolean
isEmpty()
Shorthand to check is a field value is null or empty (usingTool.isEmpty()
)boolean
isExportable()
Is exportable?boolean
isFalse()
Shorthand to check if a field value is false (usingTool.isFalse()
)boolean
isFiltered()
Is the field filteredboolean
isFilterEmpty()
Shorthand to check is a field filter is null or empty or default search filterboolean
isFilterExpr(java.lang.String filter)
Is the filter an expression?short
isFilterFixed()
Is the filter fixed for the user?boolean
isFonctId()
Deprecated.Use isFunctIdboolean
isForbidden()
Is the field forbiddenboolean
isForeignKey()
Is the field a foreign key (belongs to the object and references one object) ?boolean
isFunctId()
True if the field is a functional keyboolean
isGrouped()
boolean
isHidden()
Is the field hiddenboolean
isImage()
Is type Image ?boolean
isIndexable()
True if the field is indexedboolean
isInternalForeignKey()
Is the field an internal foreign key ?boolean
isInternalRowId()
Is the specified field an internal rowId ?boolean
isListMore()
Is field an extended field in listboolean
isListMoreDefault()
Default list moreboolean
isListSum()
True if the field has a sum on listsboolean
isMonoDocument()
Is a mono-document field?boolean
isMore()
Is field an extended field in formboolean
isMultiDocuments()
Is a multi-documents field?boolean
isNumeric()
Is type a numeric (in storage) ?boolean
isOldEmpty()
Shorthand to check is a field old value is null or empty (usingTool.isEmpty()
)boolean
isOldFalse()
Shorthand to check if a field old value is false (usingTool.isFalse()
)boolean
isOldTrue()
Shorthand to check if a field old value is true (usingTool.isTrue()
)boolean
isOrdered()
boolean
isPersistent()
Shorthand to check if a field is persistentboolean
isReferenced()
Do the field belongs to a referenced object ?boolean
isRequired()
Is field mandatory?boolean
isRequired(ObjectDB obj)
Is field required within specified object?boolean
isRightToLeft()
Get field orientationboolean
isString()
Is the field a string?static boolean
isString(int type)
Is the type a plain string type?boolean
isTechnicalField()
Checks if field name is one of object's technical field (row_id or timestamp)boolean
isTimestampField()
Checks if field name is one of object's technical timestamp fieldboolean
isTrue()
Shorthand to check if a field value is true (usingTool.isTrue()
)boolean
isUpdatable()
True if the field is updatable (not UPD_READ_ONLY means updatable in lists and/or forms)boolean
isUpdatableInForm()
Deprecated.Use isUpdatableOnFormboolean
isUpdatableInList()
Deprecated.Use isUpdatableOnListboolean
isUpdatableOnForm()
True if the field is updatable in formboolean
isUpdatableOnList()
True if the field is updatable in listboolean
isVisibleOnForm()
True if the field is visible on formboolean
isVisibleOnList()
True if the field is visible on listvoid
load(java.lang.String name, Grant g)
Load the field definition from repositoryvoid
load(java.lang.String name, Grant g, ObjectDB obj)
Deprecated, for removal: This API element is subject to removal in a future version.Use load without object argumentDocumentDB
loadDocuments(ObjectCore obj, java.lang.String rowId)
Load and get multi-documents extended datavoid
loadList(ObjectDB obj, java.lang.String name, Grant g)
Loads the list of valuesvoid
loadList(java.lang.String name, Grant g)
Loads the list of valuesjava.lang.String
parseEvalValue(java.lang.Object val)
Try to return appropriate value from evaluation resultvoid
removeStyles()
Remove all UI styles of the fieldjava.lang.String
removeValue(java.lang.String value)
Remove a value to enum multiple (or reset value on other types)void
resetFilter()
Reset the field filtervoid
setAdditionalSearchSpec(java.lang.String s)
Set additional SQL filter appended to where clausevoid
setAlias(java.lang.String a)
Set the alias (or remove alias with null)void
setAutoComplete(boolean b)
Deprecated.Use setAutoComplete with char argument (one of theAUTO_COMPLETE_*
constants)void
setAutoComplete(char auto)
Set the field to use auto-completionvoid
setBoolean(boolean b)
Set vaelue from a booleanvoid
setCalcExpr(java.lang.String e)
void
setCard(java.lang.String n)
Link card min,max separated by commavoid
setCase(char c)
Set the field casevoid
setClassification(java.lang.String c)
Set confidentiality cassificationvoid
setColumn(java.lang.String col)
Set the physical column namevoid
setContextDefaultValue(java.lang.String d)
void
setCopy(boolean b)
Set the field as copiablevoid
setDataMap(int d)
Set datamap index (-1=none)void
setDate(java.util.Date d)
Set value from a datevoid
setDBName(java.lang.String col)
Set the physical column name (same as setColumn)void
setDefault(java.lang.String d)
Set default valuevoid
setDefaultOrder(int i)
Deprecated.Use setDefaultOrdervoid
setDefaultValue(java.lang.String d)
Alias to setDefaultvoid
setDesc(java.lang.String d)
Set the alias (or remove alias with null)void
setDisplay(java.lang.String d)
Set the translation in current user languagevoid
setDocIndex(java.lang.String n)
Set the bookshelf name (from DocIndex)void
setDocument(DocumentDB doc)
Set document(s)void
setDocument(ObjectDB obj, java.lang.String name, byte[] data)
Set a single documentvoid
setDocument(ObjectDB obj, java.lang.String name, java.io.InputStream in)
Set a single documentvoid
setDouble(double d)
Set value from a double, decimal separator is ".", without exponent representation
Example : field length=13 and precision=2,setDouble(123456789.5678) = "123456789.57"
void
setExportable(boolean exportable)
Set exportablevoid
setFieldArea(FieldArea fa)
Set the field areavoid
setFilter(boolean b)
Set field filter from booleanvoid
setFilter(char c)
Set field filter from charvoid
setFilter(double d)
Set field filter from doublevoid
setFilter(float f)
Set field filter from floatvoid
setFilter(int i)
Set field filter from integervoid
setFilter(long l)
Set field filter from longvoid
setFilter(ObjectFieldSearch ofs)
Set the field filtersvoid
setFilter(java.lang.String filter)
Set the field filter (% means no filter)void
setFilter(java.util.Date d)
Set field filter from datevoid
setFilter(org.json.JSONArray a)
Set field filter from JSON arrayvoid
setFilterDateMax(java.lang.String f)
Set max date filter (for date field)void
setFilterDateMin(java.lang.String f)
Set min date filter (for date field)void
setFilterFixed(short fixed)
Set the fixed filtervoid
setFloat(float f)
Set value from a double, decimal separator is ".", without exponent representation
Example : field length=13 and precision=2,setDouble(123456789.5678) = "123456789.57"
void
setFloatPrecision(int p)
Set field precision (float decimals)void
setFonctId(boolean b)
Deprecated.Use setFunctIdvoid
setFullInput(java.lang.String i)
Set the logical full input namevoid
setFunctId(boolean b)
Set the field as a functional keyvoid
setGroupBy(boolean b)
void
setGroupByOrder(int index, ObjectCore obj)
Set the current 'group by' order in listvoid
setGroupByOrderDefault(int index, ObjectCore obj)
Set default group by in listvoid
setHelp(java.lang.String h)
Set the help in the user languagevoid
setHelpList(java.lang.String h)
Set the help on list in the user languagevoid
setId(java.lang.String id)
Set the technical id of the fieldvoid
setIncrementPattern(java.lang.String i)
Set increment expressionvoid
setIndexable(boolean b)
Set the field as indexedvoid
setInheritedFromObject(java.lang.String name)
Set the inherited object namevoid
setInitialOrder(int i)
Deprecated.Use setDefaultOrdervoid
setInput(java.lang.String i)
Set the logical input namevoid
setInt(int i)
Set value from an integervoid
setLabel(java.lang.String d)
Set the translation in current user language (alias to setDisplay)void
setList(ObjectFieldList list)
Force the field list of valuesvoid
setListMore(boolean b)
Set field to be an extended field in listvoid
setListMoreDefault(boolean b)
void
setListOperator(int ope)
Set the field to have an operator LIST_* on listsvoid
setListOperatorValue(java.lang.String val)
Set current value of list operationvoid
setLong(long l)
Set value from a long integervoid
setMenuList(boolean b)
Set ENUM menu listvoid
setMenuListReferenced(boolean b)
Set ENUM menu list from referenced objectvoid
setMenuTray(boolean b)
Set ENUM menu trayvoid
setMetaObjectList(java.lang.String list)
Set the authorized objects of TYPE_OBJECTvoid
setMetrics(java.lang.String m)
Simple metrics parser:
- A single number is interpreted as a width (ex: image thumb size in pixels).void
setMinSize(int s)
Set field min sizevoid
setMore(boolean b)
Set field to be an extended field in formstatic void
setMultiFilter(ObjectField field, ObjectFieldSearch fs, java.lang.String[] f)
void
setMultiFilter(java.lang.String[] f)
Set multi-valued filter : enum as 'a;b;c' / other types as 'in (a,b,c)'void
setName(java.lang.String n)
Set the logical simple namevoid
setObjectFieldId(java.lang.String id)
Set the technical id of the object-field relationvoid
setOldDocument(DocumentDB oldDoc)
Set old documentvoid
setOldValue(java.lang.String value)
Set previous valuevoid
setOrder(int i)
void
setOrderDefault(int i)
Set default sort specification in searchvoid
setOrderInObject(int i)
Set the order in objectvoid
setParentField(ObjectField p)
void
setPlaceholder(java.lang.String p)
Set the placeholder translation in current user languagevoid
setRef(boolean b)
Indicate that the field to belong to a referenced objectvoid
setRefColumn(java.lang.String c)
Set physical name of the referenced fieldvoid
setRefDataSource(java.lang.String d)
Set the DB table of the referenced objectvoid
setRefFieldDBName(java.lang.String c)
Alias to setRefColumnvoid
setRefFieldDisplay(java.lang.String d)
Set display name of the referenced fieldvoid
setRefFieldName(java.lang.String f)
Set logical name of the referenced fieldvoid
setRefFilters(java.lang.String filters)
Set search filters applied to linkvoid
setRefObjectContext(java.lang.String n)
Set logical name of the current referenced objectvoid
setRefObjectDBName(java.lang.String t)
Alias to setRefTablevoid
setRefObjectDisplay(int t)
Set type of the referenced object row IDvoid
setRefObjectDisplay(java.lang.String d)
Set display name of the referenced objectvoid
setRefObjectName(java.lang.String n)
Set logical name of the referenced objectvoid
setRefRowId(java.lang.String f)
Set physical name of the referenced table Idvoid
setRefSearchSpec(java.lang.String s)
Set search specification applied to linkvoid
setRefTable(java.lang.String t)
Set the DB table of the referenced objectvoid
setRegExp(java.lang.String exp)
Get the regular expression for a regular expression type fieldvoid
setRegExpMethod(java.lang.String meth)
Set method name to call for a regular expression type field (null=none)void
setRegExpMsg(java.lang.String msg)
Set message associated to regular expression typevoid
setRegName(java.lang.String name)
Set the name of a regular expression type fieldvoid
setRendering(java.lang.String r)
Set the field renderingvoid
setRenderingDefault(java.lang.String r)
Set the field rendering defaultvoid
setRequired(boolean required)
Set field as mandatoryvoid
setRequiredDefault(boolean defRequired)
Set default mandatory statusvoid
setRightToLeft(boolean b)
Set field orientationvoid
setRootField()
Deprecated.Use setRootField with object attributevoid
setRootField(ObjectDB obj)
Root parent field calculationvoid
setSearch(int i)
Set the field search type SEARCH_*void
setSearchDefault(int i)
Set default field search typevoid
setSearchRequired(int b)
Set the field strategy vs required for searchesvoid
setSearchRequiredDefault(int i)
Set default field required strategy for searchesvoid
setSearchSpec(java.lang.String f)
Set parsed generic SQL filter applied to a field (platform's internal usage, not to be used in specific code)void
setShortDisplay(java.lang.String d)
Set the short translation in current user languagevoid
setSize(int s)
Set field max sizevoid
setSortType(char type)
Set the field search type SORT_*void
setSpeechRecognition(boolean b)
Allows speech recognition on UIvoid
setSpeechSynthesis(boolean b)
Allows speech synthesis on UIvoid
setStartDateField(java.lang.String name)
Set the start date field (this field is the end date)void
setTooltip(java.lang.String text)
Set the tooltip in the user languagevoid
setType(int t)
Set field typevoid
setUpdatable(boolean b)
Set the field as updatable.void
setUpdatable(int upd)
Set the field as updatable UPD_*void
setUpdatableDefault(int upd)
Set default field updatabilityvoid
setUpdateAll(boolean b)
Set the field as bulk updatablevoid
setValue(boolean bool)
Set the value with a booleanvoid
setValue(char c)
Set the value with a charvoid
setValue(double doubleValue)
Set the value with a doublevoid
setValue(float floatValue)
Set the value with a floatvoid
setValue(int intValue)
Set the value with an integervoid
setValue(long longValue)
Set the value with a long integervoid
setValue(DocumentDB doc)
Set the value with a document (equivalent to setDocument)void
setValue(java.lang.String value)
Set the field valuevoid
setValue(java.lang.StringBuilder v)
Set the value with a string buffervoid
setValue(java.lang.String value, int limit)
Set the field value with truncationvoid
setValue(java.util.Date date)
Set the value with a datevoid
setVisibility(int v)
Set field visibilityvoid
setVisibilityDefault(int v)
Set default field visibilityvoid
setVisible(int v)
Deprecated.use setVisibilityvoid
setVisibleDefault(int v)
Deprecated.use setVisibilityDefaultboolean
showCalcul()
True if the FLOAT field uses a calculator (Rendering=CALC)java.lang.String
toJSON()
Serialize field to JSONjava.lang.String
toJSON(Grant g, boolean inlineDocs, boolean inlineThumbs, boolean inlineObjs, boolean copy)
Deprecated.java.lang.String
toJSON(Grant g, Parameters.InlineParam inlines, boolean copy, boolean old, java.lang.String path)
Serialize field to JSONorg.json.JSONObject
toJSONObject()
Generates a partial JSON object representation of the fieldjava.lang.String
toString()
Generates a string representation of the fieldjava.util.List<java.lang.String>
validate(Processus pcs)
Valid the field value in a business processjava.util.List<java.lang.String>
validate(ObjectDB obj)
Valid the field value in a business objectjava.util.List<java.lang.String>
validateFilter(Processus pcs)
Valid the field filter in a business processjava.util.List<java.lang.String>
validateFilter(ObjectDB obj)
Valid the field filter in a business object
-
-
-
Field Detail
-
TYPE_NONE
public static final int TYPE_NONE
No type- See Also:
- Constant Field Values
-
TYPE_ID
public static final int TYPE_ID
Technical ID (foreign key or primary key)- See Also:
- Constant Field Values
-
TYPE_INT
public static final int TYPE_INT
Signed integer- See Also:
- Constant Field Values
-
TYPE_FLOAT
public static final int TYPE_FLOAT
Float (double precision)- See Also:
- Constant Field Values
-
TYPE_STRING
public static final int TYPE_STRING
Short text- See Also:
- Constant Field Values
-
TYPE_DATE
public static final int TYPE_DATE
Date (format yyyy-MM-dd- See Also:
- Constant Field Values
-
TYPE_DATETIME
public static final int TYPE_DATETIME
Datetime (format yyyy-MM-dd HH:mm:ss)- See Also:
- Constant Field Values
-
TYPE_TIME
public static final int TYPE_TIME
Time (format HH:mm:ss)- See Also:
- Constant Field Values
-
TYPE_ENUM
public static final int TYPE_ENUM
Enum (list of values)- See Also:
- Constant Field Values
-
TYPE_BOOLEAN
public static final int TYPE_BOOLEAN
Boolean False=0 True=1- See Also:
- Constant Field Values
-
TYPE_PASSWORD
public static final int TYPE_PASSWORD
Password- See Also:
- Constant Field Values
-
TYPE_URL
public static final int TYPE_URL
URL- See Also:
- Constant Field Values
-
TYPE_HTML
public static final int TYPE_HTML
Rich content HTML- See Also:
- Constant Field Values
-
TYPE_EMAIL
public static final int TYPE_EMAIL
Email- See Also:
- Constant Field Values
-
TYPE_LONG_STRING
public static final int TYPE_LONG_STRING
Long text- See Also:
- Constant Field Values
-
TYPE_ENUM_MULTI
public static final int TYPE_ENUM_MULTI
Multi-enum (list of values). Codes are separated by semi-colon- See Also:
- Constant Field Values
-
TYPE_REGEXP
public static final int TYPE_REGEXP
Text with regular expression- See Also:
- Constant Field Values
-
TYPE_DOC
public static final int TYPE_DOC
Document- See Also:
- Constant Field Values
-
TYPE_EXTFILE
public static final int TYPE_EXTFILE
Physical path a file- See Also:
- Constant Field Values
-
TYPE_IMAGE
public static final int TYPE_IMAGE
Image- See Also:
- Constant Field Values
-
TYPE_NOTEPAD
public static final int TYPE_NOTEPAD
Notepad: appending text with datetime + login- See Also:
- Constant Field Values
-
TYPE_PHONENUM
public static final int TYPE_PHONENUM
Phone number- See Also:
- Constant Field Values
-
TYPE_COLOR
public static final int TYPE_COLOR
Color- See Also:
- Constant Field Values
-
TYPE_OBJECT
public static final int TYPE_OBJECT
Object as "name:id" in a single value- See Also:
- Constant Field Values
-
TYPE_GEOCOORDS
public static final int TYPE_GEOCOORDS
Geo coordinates as "latitude;longitude[;altitude]" in a single value- See Also:
- Constant Field Values
-
TYPE_BIGDECIMAL
public static final int TYPE_BIGDECIMAL
BigDecimal max storage DECIMAL(100,32)- See Also:
- Constant Field Values
-
TYPES
public static final java.lang.String[] TYPES
Types
-
VIS_HIDDEN
public static final int VIS_HIDDEN
Simply hidden on UI- See Also:
- Constant Field Values
-
VIS_NOT
public static final int VIS_NOT
Alias to VIS_HIDDEN- See Also:
- Constant Field Values
-
VIS_LIST
public static final int VIS_LIST
Visible in lists only- See Also:
- Constant Field Values
-
VIS_FORM
public static final int VIS_FORM
Visible in forms only- See Also:
- Constant Field Values
-
VIS_BOTH
public static final int VIS_BOTH
Visible in lists and forms- See Also:
- Constant Field Values
-
VIS_FORBIDDEN
public static final int VIS_FORBIDDEN
Not visible to API and UI- See Also:
- Constant Field Values
-
UPD_READ_ONLY
public static final int UPD_READ_ONLY
Readonly- See Also:
- Constant Field Values
-
UPD_ALWAYS
public static final int UPD_ALWAYS
Updatable in lists and forms- See Also:
- Constant Field Values
-
UPD_FORM_ONLY
public static final int UPD_FORM_ONLY
Updatable in forms only- See Also:
- Constant Field Values
-
UPD_LIST_ONLY
public static final int UPD_LIST_ONLY
Updatable in lists only- See Also:
- Constant Field Values
-
CASE_UPPER
public static final char CASE_UPPER
Upper case- See Also:
- Constant Field Values
-
CASE_LOWER
public static final char CASE_LOWER
Lower case- See Also:
- Constant Field Values
-
CASE_FIRSTCAPITAL
public static final char CASE_FIRSTCAPITAL
First capital- See Also:
- Constant Field Values
-
CASE_NONE
public static final char CASE_NONE
No case (or null)- See Also:
- Constant Field Values
-
RENDERING_DEFAULT
public static final java.lang.String RENDERING_DEFAULT
Rendering default- See Also:
- Constant Field Values
-
RENDERING_RADIO
public static final java.lang.String RENDERING_RADIO
Rendering radio button- See Also:
- Constant Field Values
-
RENDERING_CHECK
public static final java.lang.String RENDERING_CHECK
Rendering checkbox- See Also:
- Constant Field Values
-
RENDERING_COMBO
public static final java.lang.String RENDERING_COMBO
Rendering select box- See Also:
- Constant Field Values
-
RENDERING_SLIDE
public static final java.lang.String RENDERING_SLIDE
Rendering slide button- See Also:
- Constant Field Values
-
RENDERING_SELECTBOX
public static final java.lang.String RENDERING_SELECTBOX
Rendering select box (single or multiple select)- See Also:
- Constant Field Values
-
RENDERING_HORIZONTAL
public static final java.lang.String RENDERING_HORIZONTAL
Rendering horizontal check/radio- See Also:
- Constant Field Values
-
RENDERING_VERTICAL
public static final java.lang.String RENDERING_VERTICAL
Rendering vertical check/radio- See Also:
- Constant Field Values
-
RENDERING_PILLBOX
public static final java.lang.String RENDERING_PILLBOX
Rendering pillbox- See Also:
- Constant Field Values
-
RENDERING_MONO
public static final java.lang.String RENDERING_MONO
Rendering monotype- See Also:
- Constant Field Values
-
RENDERING_EXPRESSION
public static final java.lang.String RENDERING_EXPRESSION
Rendering for script expression- See Also:
- Constant Field Values
-
RENDERING_HTML
public static final java.lang.String RENDERING_HTML
Rendering for HTML- See Also:
- Constant Field Values
-
RENDERING_SQL
public static final java.lang.String RENDERING_SQL
Rendering for SQL- See Also:
- Constant Field Values
-
RENDERING_MARKDOWN
public static final java.lang.String RENDERING_MARKDOWN
Rendering for markdown text- See Also:
- Constant Field Values
-
RENDERING_JSON
public static final java.lang.String RENDERING_JSON
Rendering for JSON- See Also:
- Constant Field Values
-
RENDERING_TEXT
public static final java.lang.String RENDERING_TEXT
Rendering for text editor- See Also:
- Constant Field Values
-
RENDERING_GRID
public static final java.lang.String RENDERING_GRID
Rendering for JSON 2D Array- See Also:
- Constant Field Values
-
RENDERING_MULTI_DOC_BOX
public static final java.lang.String RENDERING_MULTI_DOC_BOX
Rendering multi-doc with boxes- See Also:
- Constant Field Values
-
RENDERING_MULTI_DOC_LIST
public static final java.lang.String RENDERING_MULTI_DOC_LIST
Rendering multi-doc with list- See Also:
- Constant Field Values
-
PASSWORD_MASK
public static final java.lang.String PASSWORD_MASK
Mask for displaying passwords- See Also:
- Constant Field Values
-
DEFAULT_ROW_ID
public static final java.lang.String DEFAULT_ROW_ID
Default value for row id value (for creation)
-
FILTER_ANYCHARS
public static final java.lang.String FILTER_ANYCHARS
Wildcard any characters- See Also:
- Constant Field Values
-
FILTER_ANYSINGLECHAR
public static final java.lang.String FILTER_ANYSINGLECHAR
Wildcard one characters- See Also:
- Constant Field Values
-
DEFAULT_FILTER
public static final java.lang.String DEFAULT_FILTER
Default filter value- See Also:
- Constant Field Values
-
FIXED_FILTER_NOT
public static final short FIXED_FILTER_NOT
Not a fixed filter- See Also:
- Constant Field Values
-
FIXED_FILTER_READ
public static final short FIXED_FILTER_READ
Fixed filter: readable on UI- See Also:
- Constant Field Values
-
FIXED_FILTER_HIDE
public static final short FIXED_FILTER_HIDE
Fixed filter: hidden on UI- See Also:
- Constant Field Values
-
AUTO_COMPLETE_NONE
public static final char AUTO_COMPLETE_NONE
No field completion- See Also:
- Constant Field Values
-
AUTO_COMPLETE_SIMPLE
public static final char AUTO_COMPLETE_SIMPLE
Use the field completion- See Also:
- Constant Field Values
-
AUTO_COMPLETE_SELECT
public static final char AUTO_COMPLETE_SELECT
Use the field completion with auto-select option- See Also:
- Constant Field Values
-
LIST_NONE
public static final int LIST_NONE
No list calculation- See Also:
- Constant Field Values
-
LIST_SUM
public static final int LIST_SUM
Sum list- See Also:
- Constant Field Values
-
LIST_AVG
public static final int LIST_AVG
Average list- See Also:
- Constant Field Values
-
LIST_MIN
public static final int LIST_MIN
Minimize list- See Also:
- Constant Field Values
-
LIST_MAX
public static final int LIST_MAX
Maximize list- See Also:
- Constant Field Values
-
LIST_CALC
public static final int LIST_CALC
Calculate with field expression- See Also:
- Constant Field Values
-
SEARCH_NONE
public static final int SEARCH_NONE
No search- See Also:
- Constant Field Values
-
SEARCH_MONO
public static final int SEARCH_MONO
Simple search with one value- See Also:
- Constant Field Values
-
SEARCH_MULTI_CHECK
public static final int SEARCH_MULTI_CHECK
Multi-search with checkbox- See Also:
- Constant Field Values
-
SEARCH_MULTI_LIST
public static final int SEARCH_MULTI_LIST
Multi-search with a choice list- See Also:
- Constant Field Values
-
SEARCH_PERIOD
public static final int SEARCH_PERIOD
Search with a time period- See Also:
- Constant Field Values
-
SEARCHREQ_NOT
public static final int SEARCHREQ_NOT
Not required for searches- See Also:
- Constant Field Values
-
SEARCHREQ_SEMI
public static final int SEARCHREQ_SEMI
Semi-required for searches- See Also:
- Constant Field Values
-
SEARCHREQ_REQ
public static final int SEARCHREQ_REQ
Required for searches- See Also:
- Constant Field Values
-
SEARCHREQ_EXT
public static final int SEARCHREQ_EXT
For extended searches- See Also:
- Constant Field Values
-
SORT_NONE
public static final char SORT_NONE
No ordering- See Also:
- Constant Field Values
-
SORT_BY_CODE
public static final char SORT_BY_CODE
Sort by code (DB value)- See Also:
- Constant Field Values
-
SORT_BY_VALUE
public static final char SORT_BY_VALUE
Sort by value (translation in case of enum)- See Also:
- Constant Field Values
-
SORT_BY_CODE_ORDER
public static final char SORT_BY_CODE_ORDER
Sort by code order of enum- See Also:
- Constant Field Values
-
-
Constructor Detail
-
ObjectField
public ObjectField()
Default constructor
-
ObjectField
public ObjectField(int type)
Constructor- Parameters:
type
- Type (one of ObjectField.TYPE_*)
-
ObjectField
public ObjectField(int type, java.lang.String value)
Constructor- Parameters:
type
- Type (one of ObjectField.TYPE_*)value
- Value
-
ObjectField
public ObjectField(int type, java.lang.String name, java.lang.String value)
Constructor- Parameters:
type
- Type (one of ObjectField.TYPE_*)name
- Logical namevalue
- Value
-
ObjectField
public ObjectField(int type, java.lang.String name, java.lang.String column, int size, int prec)
Constructor- Parameters:
type
- Type (one of ObjectField.TYPE_*)name
- Logical namecolumn
- Optional physical namesize
- Sizeprec
- Precision
-
ObjectField
public ObjectField(ObjectField f)
Cloning constructor- Parameters:
f
- Field to clone
-
-
Method Detail
-
getTypeLabel
public static final java.lang.String getTypeLabel(int type, int size, int prec)
Label for type- Parameters:
type
- Typesize
- Sizeprec
- Precision
-
clone
public ObjectField clone(ObjectField f)
Clone this field- Parameters:
f
- Optional field to override- Returns:
- the clone
-
load
public void load(java.lang.String name, Grant g)
Load the field definition from repository- Parameters:
name
- Field nameg
- User rights
-
load
@Deprecated(forRemoval=true, since="4.0") public void load(java.lang.String name, Grant g, ObjectDB obj)
Deprecated, for removal: This API element is subject to removal in a future version.Use load without object argument
-
getId
public java.lang.String getId()
Get the technical id of the field
-
setId
public void setId(java.lang.String id)
Set the technical id of the field
-
getFieldId
public static java.lang.String getFieldId(java.lang.String name)
Get field ID from name- Parameters:
name
- Field name- Returns:
- Field ID or empty string
-
getObjectFieldId
public java.lang.String getObjectFieldId()
Get the technical id of the object-field relation
-
setObjectFieldId
public void setObjectFieldId(java.lang.String id)
Set the technical id of the object-field relation
-
getObjectFieldId
public static java.lang.String getObjectFieldId(java.lang.String object, java.lang.String field)
Get 1st level object field ID from object name and field name- Parameters:
object
- Object namefield
- Field name- Returns:
- Object field ID or empty string
-
getRelatedObjects
public static java.util.List<java.lang.String[]> getRelatedObjects(java.lang.String field)
Get objects containing the field- Parameters:
field
- Field name- Returns:
- List of objects [id,name]
-
getRelatedAreas
public static java.util.List<java.lang.String[]> getRelatedAreas(java.lang.String field)
Get areas containing the field- Parameters:
field
- Field name- Returns:
- List of areas [id, name]
-
getName
public java.lang.String getName()
Get the logical simple name
-
setName
public void setName(java.lang.String n)
Set the logical simple name
-
getName
public static java.lang.String getName(java.lang.String rowId)
Get field name from rowId- Parameters:
rowId
- Row Id- Returns:
- field name if exists
-
getId
public static java.lang.String getId(java.lang.String name)
Get field rowId from name- Parameters:
name
- Field name- Returns:
- row Id if exists
-
getFieldTypeName
public static java.lang.String getFieldTypeName(java.lang.String typeId)
Get field type name from rowId- Parameters:
typeId
- Type row Id- Returns:
- field type name if exists
-
getInput
public java.lang.String getInput()
Get the logical input name (or name if null)
-
setInput
public void setInput(java.lang.String i)
Set the logical input name
-
getFullInput
public java.lang.String getFullInput()
Get the logical full input name (or input if null)
-
setFullInput
public void setFullInput(java.lang.String i)
Set the logical full input name
-
getAlias
public java.lang.String getAlias()
Get the alias or null if no alias
-
setAlias
public void setAlias(java.lang.String a)
Set the alias (or remove alias with null)
-
getDesc
public java.lang.String getDesc(ObjectCore obj)
Get the alias or null if no alias
-
setDesc
public void setDesc(java.lang.String d)
Set the alias (or remove alias with null)
-
getOrderInObject
public int getOrderInObject()
Get the order in object
-
setOrderInObject
public void setOrderInObject(int i)
Set the order in object
-
getIndex
public int getIndex(ObjectCore o)
Get position index in object fields
-
getDisplay
public java.lang.String getDisplay()
Get the field translation in current user language
-
getLabel
public java.lang.String getLabel()
Get the field translation in current user language (alias to getDisplay)
-
setDisplay
public void setDisplay(java.lang.String d)
Set the translation in current user language
-
setLabel
public void setLabel(java.lang.String d)
Set the translation in current user language (alias to setDisplay)
-
getShortDisplay
public java.lang.String getShortDisplay()
Get the field short translation in current user language
-
setShortDisplay
public void setShortDisplay(java.lang.String d)
Set the short translation in current user language
-
getPlaceholder
public java.lang.String getPlaceholder()
Get the field placeholder translation in current user language
-
setPlaceholder
public void setPlaceholder(java.lang.String p)
Set the placeholder translation in current user language
-
getHelp
public java.lang.String getHelp()
Get the help in the user language
-
setHelp
public void setHelp(java.lang.String h)
Set the help in the user language
-
getHelpList
public java.lang.String getHelpList()
Get the help on list in the user language
-
setHelpList
public void setHelpList(java.lang.String h)
Set the help on list in the user language
-
getTooltip
public java.lang.String getTooltip()
Get the tooltip in the user language
-
setTooltip
public void setTooltip(java.lang.String text)
Set the tooltip in the user language
-
hasMenuTray
public boolean hasMenuTray()
Has ENUM menu tray?
-
setMenuTray
public void setMenuTray(boolean b)
Set ENUM menu tray
-
hasMenuList
public boolean hasMenuList()
Has ENUM menu list?
-
setMenuList
public void setMenuList(boolean b)
Set ENUM menu list
-
hasMenuListReferenced
public boolean hasMenuListReferenced()
Has ENUM menu list from referenced object?
-
setMenuListReferenced
public void setMenuListReferenced(boolean b)
Set ENUM menu list from referenced object
-
isRightToLeft
public boolean isRightToLeft()
Get field orientation
-
setRightToLeft
public void setRightToLeft(boolean b)
Set field orientation
-
getRendering
public java.lang.String getRendering()
Get the field rendering
-
setRendering
public void setRendering(java.lang.String r)
Set the field rendering
-
getRenderingDefault
public java.lang.String getRenderingDefault()
Get the field rendering default
-
setRenderingDefault
public void setRenderingDefault(java.lang.String r)
Set the field rendering default
-
getRenderingMode
public java.lang.String getRenderingMode()
Long string rendering mode (for Ace Editor)
-
hasSpeechRecognition
public boolean hasSpeechRecognition()
Has speech recognition on UI?
-
setSpeechRecognition
public void setSpeechRecognition(boolean b)
Allows speech recognition on UI
-
hasSpeechSynthesis
public boolean hasSpeechSynthesis()
Has speech synthesis on UI?
-
setSpeechSynthesis
public void setSpeechSynthesis(boolean b)
Allows speech synthesis on UI
-
getColumn
public java.lang.String getColumn()
Get the physical column name
-
getDBName
public final java.lang.String getDBName()
Get the physical column name (same as getColumn)
-
setColumn
public void setColumn(java.lang.String col)
Set the physical column name
-
setDBName
public final void setDBName(java.lang.String col)
Set the physical column name (same as setColumn)
-
getFieldArea
public FieldArea getFieldArea()
Get the field area
-
setFieldArea
public void setFieldArea(FieldArea fa)
Set the field area
-
getVisibility
public int getVisibility()
Get field visibility
-
isVisibleOnList
public boolean isVisibleOnList()
True if the field is visible on list
-
isVisibleOnForm
public boolean isVisibleOnForm()
True if the field is visible on form
-
isForbidden
public boolean isForbidden()
Is the field forbidden
-
isHidden
public boolean isHidden()
Is the field hidden
-
setVisibility
public void setVisibility(int v)
Set field visibility
-
getVisibilityDefault
public int getVisibilityDefault()
Get default field visibility
-
setVisibilityDefault
public void setVisibilityDefault(int v)
Set default field visibility
-
isExportable
public boolean isExportable()
Is exportable?- Returns:
- True if exportable
-
setExportable
public void setExportable(boolean exportable)
Set exportable- Parameters:
exportable
- Exportable?
-
getVisible
@Deprecated(forRemoval=false, since="3.x") public int getVisible()
Deprecated.use getVisibility
-
setVisible
@Deprecated(forRemoval=false, since="3.x") public void setVisible(int v)
Deprecated.use setVisibility
-
getVisibleDefault
@Deprecated(forRemoval=false, since="3.x") public int getVisibleDefault()
Deprecated.use getVisibilityDefault
-
setVisibleDefault
@Deprecated(forRemoval=false, since="3.x") public void setVisibleDefault(int v)
Deprecated.use setVisibilityDefault
-
showCalcul
public boolean showCalcul()
True if the FLOAT field uses a calculator (Rendering=CALC)
-
isCopiable
public boolean isCopiable()
True if the field is copiable
-
setCopy
public void setCopy(boolean b)
Set the field as copiable
-
isUpdatable
public boolean isUpdatable()
True if the field is updatable (not UPD_READ_ONLY means updatable in lists and/or forms)
-
isUpdatableInList
@Deprecated(forRemoval=false, since="3.x") public final boolean isUpdatableInList()
Deprecated.Use isUpdatableOnList
-
isUpdatableOnList
public boolean isUpdatableOnList()
True if the field is updatable in list
-
isUpdatableInForm
@Deprecated(forRemoval=false, since="3.x") public final boolean isUpdatableInForm()
Deprecated.Use isUpdatableOnForm
-
isUpdatableOnForm
public boolean isUpdatableOnForm()
True if the field is updatable in form
-
setUpdatable
public void setUpdatable(boolean b)
Set the field as updatable. Nearly deprecated. Use setUpdatable(UPD_*)
-
setUpdatable
public void setUpdatable(int upd)
Set the field as updatable UPD_*
-
getUpdatableDefault
public int getUpdatableDefault()
Get default field updatability
-
setUpdatableDefault
public void setUpdatableDefault(int upd)
Set default field updatability
-
canUpdateAll
public boolean canUpdateAll()
True if the field is bulk updatable
-
setUpdateAll
public void setUpdateAll(boolean b)
Set the field as bulk updatable
-
isIndexable
public boolean isIndexable()
True if the field is indexed
-
setIndexable
public void setIndexable(boolean b)
Set the field as indexed
-
canAutoComplete
public boolean canAutoComplete()
True if the field use auto-completion
-
canAutoCompleteWithAutoSelect
public boolean canAutoCompleteWithAutoSelect()
True if the field use auto-select on auto-completion
-
setAutoComplete
@Deprecated(forRemoval=false, since="4.0") public void setAutoComplete(boolean b)
Deprecated.Use setAutoComplete with char argument (one of theAUTO_COMPLETE_*
constants)
-
setAutoComplete
public void setAutoComplete(char auto)
Set the field to use auto-completion- Parameters:
auto
- One of theAUTO_COMPLETE_*
constants
-
getDocument
public DocumentDB getDocument()
Document(s) extended data in memory. If not set, use getDocument(Grant) to load first a single document, or loadDocuments(obj,rowId) to load a multi-docs field.- Returns:
- Top level document (mono or with multiple docs)
-
getDocument
public DocumentDB getDocument(Grant g)
Load and get the document's extended data- Parameters:
g
- Grant- Returns:
- Simple document or null if the field is multi-documents
-
getDocuments
@Deprecated public DocumentDB getDocuments(ObjectCore obj, java.lang.String rowId)
Deprecated.Renamed to loadDocuments
-
loadDocuments
public DocumentDB loadDocuments(ObjectCore obj, java.lang.String rowId)
Load and get multi-documents extended data- Parameters:
obj
- ObjectrowId
- Object row ID- Returns:
- Document containing all documents or null if the field is mono-document
-
getListOfDocuments
public java.util.List<DocumentDB> getListOfDocuments(ObjectCore obj, java.lang.String rowId)
Get multi-documents extended data- Parameters:
obj
- ObjectrowId
- Object row ID- Returns:
- List of documents or null
-
setDocument
public void setDocument(DocumentDB doc)
Set document(s)- Parameters:
doc
- Document (mono or multiple)
-
setDocument
public void setDocument(ObjectDB obj, java.lang.String name, byte[] data)
Set a single document- Parameters:
obj
- Objectname
- Document namedata
- Document data
-
setDocument
public void setDocument(ObjectDB obj, java.lang.String name, java.io.InputStream in)
Set a single document- Parameters:
obj
- Objectname
- Namein
- Data inputstream
-
getOldDocument
public DocumentDB getOldDocument()
Get old document- Returns:
- Old document
-
setOldDocument
public void setOldDocument(DocumentDB oldDoc)
Set old document- Parameters:
oldDoc
- Old document
-
isRequired
public boolean isRequired()
Is field mandatory?- Returns:
- True if field is mandatory
-
setRequired
public void setRequired(boolean required)
Set field as mandatory- Parameters:
required
- Mandatory?
-
getRequiredDefault
public boolean getRequiredDefault()
Get default mandatory status- Returns:
- Default mandatory sattus
-
setRequiredDefault
public void setRequiredDefault(boolean defRequired)
Set default mandatory status- Parameters:
defRequired
- Mandatory?
-
isRequired
public boolean isRequired(ObjectDB obj)
Is field required within specified object?- Parameters:
obj
- Object- Returns:
- True if field is mandatory in specified object
-
isFonctId
@Deprecated(forRemoval=false, since="3.x") public boolean isFonctId()
Deprecated.Use isFunctId
-
isFunctId
public boolean isFunctId()
True if the field is a functional key
-
setFonctId
@Deprecated(forRemoval=false, since="3.x") public void setFonctId(boolean b)
Deprecated.Use setFunctId
-
setFunctId
public void setFunctId(boolean b)
Set the field as a functional key
-
getCase
public char getCase()
Get the field case
-
setCase
public void setCase(char c)
Set the field case
-
setMetaObjectList
public void setMetaObjectList(java.lang.String list)
Set the authorized objects of TYPE_OBJECT- Parameters:
list
- separated with semicolon or new lines
-
getMetaObjectList
public java.util.List<java.lang.String> getMetaObjectList()
Authorized objects of TYPE_OBJECT
-
isListSum
public boolean isListSum()
True if the field has a sum on lists
-
getListOperator
public int getListOperator()
Get the operator on lists LIST_*
-
setListOperator
public void setListOperator(int ope)
Set the field to have an operator LIST_* on lists
-
getListOperatorValue
public java.lang.String getListOperatorValue()
Get current value of list operation (sum, avg, min/max...). The value is set by the ObjectDB.getCount()
-
setListOperatorValue
public void setListOperatorValue(java.lang.String val)
Set current value of list operation
-
getSearch
public int getSearch()
Get the field search type
-
setSearch
public void setSearch(int i)
Set the field search type SEARCH_*
-
getSearchDefault
public int getSearchDefault()
Get default field search type
-
setSearchDefault
public void setSearchDefault(int i)
Set default field search type
-
getSearchRequired
public int getSearchRequired()
Get the field required strategy for searches
-
setSearchRequired
public void setSearchRequired(int b)
Set the field strategy vs required for searches
-
getSearchRequiredDefault
public int getSearchRequiredDefault()
Get default field required strategy for searches
-
setSearchRequiredDefault
public void setSearchRequiredDefault(int i)
Set default field required strategy for searches
-
getSortType
public char getSortType()
Get the field sort type SORT_*
-
setSortType
public void setSortType(char type)
Set the field search type SORT_*
-
isMore
public boolean isMore()
Is field an extended field in form
-
setMore
public void setMore(boolean b)
Set field to be an extended field in form
-
isListMore
public boolean isListMore()
Is field an extended field in list
-
setListMore
public void setListMore(boolean b)
Set field to be an extended field in list
-
isListMoreDefault
public boolean isListMoreDefault()
Default list more
-
setListMoreDefault
public void setListMoreDefault(boolean b)
-
getSize
public int getSize()
Get field max size
-
setSize
public void setSize(int s)
Set field max size
-
getMinSize
public int getMinSize()
Get field min size
-
setMinSize
public void setMinSize(int s)
Set field min size
-
getFloatPrecision
public int getFloatPrecision()
Get field precision (float decimals)
-
setFloatPrecision
public void setFloatPrecision(int p)
Set field precision (float decimals)
-
getMetrics
public ObjectField.Metrics getMetrics()
Get the field UI metrics
-
setMetrics
public void setMetrics(java.lang.String m)
Simple metrics parser:
- A single number is interpreted as a width (ex: image thumb size in pixels).
- Use w and h to specify the general width and height of the field (ex: textarea, HTML editor size in characters).
- In case of textarea h=0 means autosize to fit content
- Use explicitly wf+hf or wl+hl to specify form or list size only.
- Slider rendering with min/max and optional step
- Stars rendering with number of stars
- Document with max upload size- Parameters:
m
- Number or w=number h=number, or wf=number hf=number wl=number hl=number, or min=number max=number step=number
-
getType
public int getType()
Get field type
-
setType
public void setType(int t)
Set field type
-
isString
public static boolean isString(int type)
Is the type a plain string type?- Returns:
- True if the type is a plain string type (short string, regular expression, long string, HTML content, or notepad)
-
isString
public boolean isString()
Is the field a string?- Returns:
- True if the field is a string (short string, regular expression, long string, HTML content or notepad)
-
isNumeric
public boolean isNumeric()
Is type a numeric (in storage) ?
-
isAlphaNum
public boolean isAlphaNum()
Is type a text (in storage) ?
-
isDocument
public boolean isDocument()
Is type a document or image ?
-
isImage
public boolean isImage()
Is type Image ?
-
setInheritedFromObject
public void setInheritedFromObject(java.lang.String name)
Set the inherited object name- Parameters:
name
- Object name
-
getInheritedFromObject
public java.lang.String getInheritedFromObject()
Get the inherited object name- Returns:
- Object name or null if not inherited
-
isTechnicalField
public boolean isTechnicalField()
Checks if field name is one of object's technical field (row_id or timestamp)
-
isTimestampField
public boolean isTimestampField()
Checks if field name is one of object's technical timestamp field
-
getListName
public java.lang.String getListName()
Get the name of the list of values
-
loadList
public void loadList(java.lang.String name, Grant g)
Loads the list of values- Parameters:
name
- List nameg
- User rights
-
loadList
public void loadList(ObjectDB obj, java.lang.String name, Grant g)
Loads the list of values- Parameters:
obj
- Optional object to load linked listsname
- List nameg
- User rights
-
getList
public ObjectFieldList getList()
Get the field list of values
-
setList
public void setList(ObjectFieldList list)
Force the field list of values
-
getStateModel
public java.util.List<FieldStateTransition> getStateModel()
Get state model attached to the list of values
-
getStateTransition
public FieldStateTransition getStateTransition(java.lang.String tran)
-
initStateModel
public void initStateModel()
Set state model attached to the list of values
-
getStateTransitionAction
@Deprecated(forRemoval=true, since="4.0") public Action getStateTransitionAction(java.lang.String fromState, java.lang.String toState)
Deprecated, for removal: This API element is subject to removal in a future version.Use getStateTransition(name).getAction()
-
getStateTransitionAction
public Action getStateTransitionAction(java.lang.String actionName)
Get the Action associated with a transition of status field- Parameters:
actionName
- Action name of transition- Returns:
- Action or null if not found
-
getStartDateField
public java.lang.String getStartDateField()
Optional related start date field (this field is the end date)
-
setStartDateField
public void setStartDateField(java.lang.String name)
Set the start date field (this field is the end date)
-
getDefault
public java.lang.String getDefault()
Get default value
-
getDefaultValue
public java.lang.String getDefaultValue()
Alias to getDefault
-
setDefault
public void setDefault(java.lang.String d)
Set default value
-
setDefaultValue
public void setDefaultValue(java.lang.String d)
Alias to setDefault
-
isDefaultExpr
public boolean isDefaultExpr()
Is default value an expression ?
-
getIncrementPattern
public java.lang.String getIncrementPattern()
Get increment expression
-
setIncrementPattern
public void setIncrementPattern(java.lang.String i)
Set increment expression
-
increment
public java.lang.String increment(ObjectDB obj, java.lang.String nextId, java.lang.String incrementPattern)
Increment field value by 1 based on pattern at Creation- Parameters:
obj
- optional object in case of Simplicite Expression in increment patternnextId
- value to be set as incrementincrementPattern
- Increment pattern- Returns:
- Incremented value of field
-
parseEvalValue
public java.lang.String parseEvalValue(java.lang.Object val)
Try to return appropriate value from evaluation result
-
evalDefault
public java.lang.String evalDefault(ObjectCore obj)
Default value evaluation
-
getContextDefaultValue
public java.lang.String getContextDefaultValue()
Default value to store specific creation context
-
setContextDefaultValue
public void setContextDefaultValue(java.lang.String d)
-
getParentField
public ObjectField getParentField()
Parent field (null if the field belongs to the object)
-
setParentField
public void setParentField(ObjectField p)
-
isReferenced
public boolean isReferenced()
Do the field belongs to a referenced object ?
-
setRef
public void setRef(boolean b)
Indicate that the field to belong to a referenced object
-
isInternalRowId
public boolean isInternalRowId()
Is the specified field an internal rowId ?
-
isForeignKey
public boolean isForeignKey()
Is the field a foreign key (belongs to the object and references one object) ?
-
isInternalForeignKey
public boolean isInternalForeignKey()
Is the field an internal foreign key ?
-
getRefDataSource
public java.lang.String getRefDataSource()
Get the DB datasource of the referenced object
-
setRefDataSource
public void setRefDataSource(java.lang.String d)
Set the DB table of the referenced object
-
getRefTable
public java.lang.String getRefTable()
Get the DB table of the referenced object
-
getRefObjectDBName
public java.lang.String getRefObjectDBName()
Alias to getRefTable
-
setRefTable
public void setRefTable(java.lang.String t)
Set the DB table of the referenced object
-
setRefObjectDBName
public void setRefObjectDBName(java.lang.String t)
Alias to setRefTable
-
getRefFieldName
public java.lang.String getRefFieldName()
Logical name of the referenced field
-
setRefFieldName
public void setRefFieldName(java.lang.String f)
Set logical name of the referenced field
-
getRefColumn
public java.lang.String getRefColumn()
Get physical name of the referenced field
-
getRefFieldDBName
public java.lang.String getRefFieldDBName()
Alias to getRefColumn
-
setRefColumn
public void setRefColumn(java.lang.String c)
Set physical name of the referenced field
-
setRefFieldDBName
public void setRefFieldDBName(java.lang.String c)
Alias to setRefColumn
-
getRefObjectName
public java.lang.String getRefObjectName()
Get logical name of the referenced object
-
setRefObjectName
public void setRefObjectName(java.lang.String n)
Set logical name of the referenced object
-
getRefObjectContext
public java.lang.String getRefObjectContext()
Get logical name of the current referenced object
-
setRefObjectContext
public void setRefObjectContext(java.lang.String n)
Set logical name of the current referenced object
-
getRefObjectDisplay
public java.lang.String getRefObjectDisplay()
Get display name of the referenced object
-
setRefObjectDisplay
public void setRefObjectDisplay(java.lang.String d)
Set display name of the referenced object
-
getRefObjectRowIdType
public int getRefObjectRowIdType()
Get type of the referenced object row ID
-
setRefObjectDisplay
public void setRefObjectDisplay(int t)
Set type of the referenced object row ID
-
getRefFieldDisplay
public java.lang.String getRefFieldDisplay()
Get display name of the referenced field
-
setRefFieldDisplay
public void setRefFieldDisplay(java.lang.String d)
Set display name of the referenced field
-
getRefRowId
public java.lang.String getRefRowId()
Physical name of the referenced table Id (default = row_id)
-
setRefRowId
public void setRefRowId(java.lang.String f)
Set physical name of the referenced table Id
-
getRefSearchSpec
public java.lang.String getRefSearchSpec()
Get search specification applied to link
-
setRefSearchSpec
public void setRefSearchSpec(java.lang.String s)
Set search specification applied to link
-
getRefFilters
public java.lang.String getRefFilters()
Get search filters applied to link
-
getRefFilters
public org.json.JSONObject getRefFilters(ObjectDB obj)
Get search filters applied to link- Parameters:
obj
- Current valued parent object
-
setRefFilters
public void setRefFilters(java.lang.String filters)
Set search filters applied to link- Parameters:
filters
- JSON syntax with tokens to substitute ex [VALUE:parentField]
-
getRefMinOccurs
public int getRefMinOccurs()
Minimum occurs (n) in link cardinality (n,m)
-
getRefMaxOccurs
public int getRefMaxOccurs()
Maximum occurs (m) in link cardinality (n,m), -1 means infinity
-
setCard
public void setCard(java.lang.String n)
Link card min,max separated by comma
-
setRootField
@Deprecated(forRemoval=false, since="4.0") public void setRootField()
Deprecated.Use setRootField with object attribute
-
setRootField
public void setRootField(ObjectDB obj)
Root parent field calculation
-
getRootField
public ObjectField getRootField()
Root parent field
-
getJoinedObjectName
public java.lang.String getJoinedObjectName()
Joined object name (only set on foreign ID)
-
getDataMap
public int getDataMap()
Get datamap index (-1=none)
-
setDataMap
public void setDataMap(int d)
Set datamap index (-1=none)
-
getDocIndex
public java.lang.String getDocIndex()
Set the bookshelf name (from DocIndex)
-
setDocIndex
public void setDocIndex(java.lang.String n)
Set the bookshelf name (from DocIndex)
-
isMonoDocument
public boolean isMonoDocument()
Is a mono-document field?- Returns:
- True if the Document is unique (rendering unique)
-
isMultiDocuments
public boolean isMultiDocuments()
Is a multi-documents field?- Returns:
- True if the Document is multiple (rendering multiple)
-
setFilterFixed
public void setFilterFixed(short fixed)
Set the fixed filter- Parameters:
fixed
- FIXED_FILTER_NOT|READ|HIDE
-
isFilterFixed
public short isFilterFixed()
Is the filter fixed for the user?- Returns:
- FIXED_FILTER_NOT|READ|HIDE
-
getFilterSearch
public ObjectFieldSearch getFilterSearch()
Get the field filters
-
getFilter
public java.lang.String getFilter()
Get field filter (% means no filter)
-
setFilter
public void setFilter(ObjectFieldSearch ofs)
Set the field filters
-
setFilter
public void setFilter(char c)
Set field filter from char
-
setFilter
public void setFilter(boolean b)
Set field filter from boolean
-
setFilter
public void setFilter(java.util.Date d)
Set field filter from date
-
setFilter
public void setFilter(int i)
Set field filter from integer
-
setFilter
public void setFilter(long l)
Set field filter from long
-
setFilter
public void setFilter(float f)
Set field filter from float
-
setFilter
public void setFilter(double d)
Set field filter from double
-
setFilter
public void setFilter(org.json.JSONArray a)
Set field filter from JSON array
-
setFilter
public void setFilter(java.lang.String filter)
Set the field filter (% means no filter)- Parameters:
filter
- filter value
-
isFilterExpr
public boolean isFilterExpr(java.lang.String filter)
Is the filter an expression?- Parameters:
filter
- Filter- Returns:
- true if filter match with 'is null', 'in not null', 'like', 'in ('...
-
resetFilter
public void resetFilter()
Reset the field filter
-
getMultiFilter
public java.lang.String[] getMultiFilter()
Get multi-valued filter for enum (separated by semi-colon)
-
setMultiFilter
public void setMultiFilter(java.lang.String[] f)
Set multi-valued filter : enum as 'a;b;c' / other types as 'in (a,b,c)'
-
setMultiFilter
public static void setMultiFilter(ObjectField field, ObjectFieldSearch fs, java.lang.String[] f)
-
getSearchSpec
public java.lang.String getSearchSpec()
Get parsed generic SQL filter applied to a field (platform's internal usage, not to be used in specific code)
-
setSearchSpec
public void setSearchSpec(java.lang.String f)
Set parsed generic SQL filter applied to a field (platform's internal usage, not to be used in specific code)
-
getAdditionalSearchSpec
public java.lang.String getAdditionalSearchSpec()
Get additional SQL filter appended to where clause
-
setAdditionalSearchSpec
public void setAdditionalSearchSpec(java.lang.String s)
Set additional SQL filter appended to where clause
-
getFilterDateMax
public java.lang.String getFilterDateMax()
Get max date filter (for date field)
-
setFilterDateMax
public void setFilterDateMax(java.lang.String f)
Set max date filter (for date field)
-
getFilterDateMin
public java.lang.String getFilterDateMin()
Get min date filter (for date field)
-
setFilterDateMin
public void setFilterDateMin(java.lang.String f)
Set min date filter (for date field)
-
isFiltered
public boolean isFiltered()
Is the field filtered
-
getOrder
public int getOrder()
Current sort specification in search:
asc = positive value,
desc = negative value,
no sort = 0
-
setOrder
public void setOrder(int i)
-
isOrdered
public boolean isOrdered()
-
getInitialOrder
@Deprecated(forRemoval=false, since="4.0") public int getInitialOrder()
Deprecated.Use getOrderDefault
-
getDefaultOrder
@Deprecated(forRemoval=false, since="4.0") public int getDefaultOrder()
Deprecated.Use getOrderDefault
-
getOrderDefault
public int getOrderDefault()
Default sort specification in search:
asc = positive value,
desc = negative value,
no sort = 0
-
setInitialOrder
@Deprecated(forRemoval=false, since="4.0") public void setInitialOrder(int i)
Deprecated.Use setDefaultOrder
-
setDefaultOrder
@Deprecated(forRemoval=false, since="4.0") public void setDefaultOrder(int i)
Deprecated.Use setDefaultOrder
-
setOrderDefault
public void setOrderDefault(int i)
Set default sort specification in search
-
setGroupByOrderDefault
public void setGroupByOrderDefault(int index, ObjectCore obj)
Set default group by in list
-
getGroupByDefault
public int getGroupByDefault()
Get default group by in list
-
getGroupByOrder
public int getGroupByOrder()
Get the current 'group by' order in list
-
setGroupByOrder
public void setGroupByOrder(int index, ObjectCore obj)
Set the current 'group by' order in list
-
isGrouped
public boolean isGrouped()
-
canGroupBy
public boolean canGroupBy()
Is the field group-by-able on UI ?
-
setGroupBy
public void setGroupBy(boolean b)
-
getClassification
public java.lang.String getClassification()
Get confidentiality cassification- Returns:
- Confidentiality classification
-
setClassification
public void setClassification(java.lang.String c)
Set confidentiality cassification- Parameters:
c
- Confidentiality classification
-
addNotepad
public void addNotepad(java.lang.String fullname, java.lang.String text)
Add text to notepad- Parameters:
fullname
- Full nametext
- Text
-
delNotepad
public void delNotepad()
Delete text from notepad
-
setDate
public void setDate(java.util.Date d)
Set value from a date- Parameters:
d
- Date value
-
setLong
public void setLong(long l)
Set value from a long integer- Parameters:
l
- Long integer value
-
setInt
public void setInt(int i)
Set value from an integer- Parameters:
i
- Integer value
-
setDouble
public void setDouble(double d)
Set value from a double, decimal separator is ".", without exponent representation
Example : field length=13 and precision=2,setDouble(123456789.5678) = "123456789.57"
- Parameters:
d
- Double value
-
setFloat
public void setFloat(float f)
Set value from a double, decimal separator is ".", without exponent representation
Example : field length=13 and precision=2,setDouble(123456789.5678) = "123456789.57"
- Parameters:
f
- Float value
-
setBoolean
public void setBoolean(boolean b)
Set vaelue from a boolean- Parameters:
b
- Boolean value
-
setValue
public void setValue(java.lang.StringBuilder v)
Set the value with a string buffer- Parameters:
v
- string buffer
-
setValue
public void setValue(char c)
Set the value with a char- Parameters:
c
- character
-
setValue
public void setValue(java.util.Date date)
Set the value with a date- Parameters:
date
- Java Date
-
setValue
public void setValue(int intValue)
Set the value with an integer- Parameters:
intValue
- integer value
-
setValue
public void setValue(long longValue)
Set the value with a long integer- Parameters:
longValue
- long value
-
setValue
public void setValue(float floatValue)
Set the value with a float- Parameters:
floatValue
- float value
-
setValue
public void setValue(double doubleValue)
Set the value with a double- Parameters:
doubleValue
- double value
-
setValue
public void setValue(boolean bool)
Set the value with a boolean- Parameters:
bool
- boolean value
-
setValue
public void setValue(DocumentDB doc)
Set the value with a document (equivalent to setDocument)- Parameters:
doc
- Document
-
getOldCode
@Deprecated(forRemoval=false, since="4.0") public final java.lang.String getOldCode()
Deprecated.Use getOldValue
-
getOldValue
public java.lang.String getOldValue()
Get previous value- Returns:
- Previous value
-
setOldValue
public void setOldValue(java.lang.String value)
Set previous value- Parameters:
value
- Previous value
-
getDisplayOldValue
public java.lang.String getDisplayOldValue()
Get previous display value (applies only to list of values values)- Returns:
- Previous display value
-
getDisplayOldValue
public java.lang.String getDisplayOldValue(Grant g)
Get previous display value (applies also to user related formats : date, ...)- Returns:
- Previous display value
-
hasChanged
public boolean hasChanged()
Check whether the field value has changed (it performs a type-aware comparison between current value and old value)- Returns:
- True if the field value has changed
-
getRegName
public java.lang.String getRegName()
Get the name of a regular expression type field- Returns:
- Regular expression name
-
setRegName
public void setRegName(java.lang.String name)
Set the name of a regular expression type field- Parameters:
name
- Regular expression name
-
getRegExp
public java.lang.String getRegExp()
Set the regular expression for a regular expression type field- Returns:
- Expression
-
setRegExp
public void setRegExp(java.lang.String exp)
Get the regular expression for a regular expression type field- Parameters:
exp
- Expression
-
getRegExpMethod
public java.lang.String getRegExpMethod()
Get method name to call for a regular expression type field (null=none)- Returns:
- Method name
-
setRegExpMethod
public void setRegExpMethod(java.lang.String meth)
Set method name to call for a regular expression type field (null=none)- Parameters:
meth
- Method name
-
getRegExpMsg
public java.lang.String getRegExpMsg()
Get message associated to regular expression type- Returns:
- Message
-
setRegExpMsg
public void setRegExpMsg(java.lang.String msg)
Set message associated to regular expression type- Parameters:
msg
- Message
-
getValue
public java.lang.String getValue()
Get the field value- Returns:
- Field value
-
setValue
public void setValue(java.lang.String value)
Set the field value- Parameters:
value
- Value
-
setValue
public void setValue(java.lang.String value, int limit)
Set the field value with truncation- Parameters:
value
- Valuelimit
- Max length
-
getSQLValue
public java.lang.String getSQLValue()
Returns the value formatted for SQL statements (the value is surrounded by single quotes if the field is alphanumerical)
- Returns:
- old value formatted for SQL statements
-
getSQLValue
public java.lang.String getSQLValue(java.lang.String value)
Returns the value formatted for SQL statements (the value is surrounded by single quotes if the field is alphanumerical)
- Returns:
- old value formatted for SQL statements
-
getSQLOldValue
public java.lang.String getSQLOldValue()
Returns the old value formatted for SQL statements (the value is surrounded by single quotes if the field is alphanumerical)
- Returns:
- old value formatted for SQL statements
-
getDisplayValue
public final java.lang.String getDisplayValue()
Get the display value for current value (only applies to list of values)- Returns:
- Display value
-
getDisplayValue
public java.lang.String getDisplayValue(java.lang.String value)
Get the display value for specified value (only applies to list of values)- Parameters:
value
- Value- Returns:
- Display value
-
getDisplayValue
public java.lang.String getDisplayValue(java.lang.String value, java.lang.String sep)
Get the display value for specified value (only applies to list of values)- Parameters:
value
- Valuesep
- Value separator (default is a slash)- Returns:
- Display value
-
getDisplayValue
public final java.lang.String getDisplayValue(Grant g)
Get the display current value for current value (applies also user related formats : dates, ...)- Parameters:
g
- User rights- Returns:
- Display value
-
getDisplayValue
public java.lang.String getDisplayValue(Grant g, java.lang.String value)
Get the display value for specified value (applies also user related formats : dates, ...)- Parameters:
g
- User rightsvalue
- Value- Returns:
- Display value
-
getExportValue
public java.lang.String getExportValue(Grant g, java.lang.String value)
Exported value to PDF and Excel- Parameters:
g
- User rightsvalue
- Field value- Returns:
- Exported value
-
getCodes
public java.lang.String[] getCodes()
Get the codes of a multiple enumeration (TYPE_ENUM_MULTI) field- Returns:
- Field codes or null if there is no code
-
getCodes
public java.lang.String[] getCodes(java.lang.String codes)
Get the codes of a multiple enumeration (TYPE_ENUM_MULTI) value- Parameters:
codes
- codes separated by ';'- Returns:
- Field codes or null if there is no code
-
getAllCodes
public java.lang.String[] getAllCodes(ObjectCore obj, java.util.List<java.lang.String[]> rows)
Get all codes for specified object data rows- Parameters:
obj
- Objectrows
- Data rows
-
contains
public boolean contains(java.lang.String code)
Test if the value or multi-enum contains a code- Parameters:
code
- Text to search- Returns:
- true if the list or the value contains the code
-
addValue
public java.lang.String addValue(java.lang.String value)
Add a value to enum multiple (or set value on other types)- Parameters:
value
- code to add- Returns:
- new value
-
removeValue
public java.lang.String removeValue(java.lang.String value)
Remove a value to enum multiple (or reset value on other types)- Parameters:
value
- code to remove- Returns:
- new value
-
getDate
public java.util.Date getDate()
Get field value as a Date object- Returns:
- Field value as a Date object or null if null or empty
-
getDate
public java.util.Date getDate(java.util.Date defValue)
Get field value as a Date object (with default value)- Parameters:
defValue
- Default value- Returns:
- Field value as a Date object or default value if null or empty
-
getOldDate
public java.util.Date getOldDate()
Get field old value as a Date object- Returns:
- Field old value as a Date object or null if null or empty
-
getInt
public java.lang.Integer getInt()
Get field value as an Integer object- Returns:
- Field value as an Integer object or Integer(0) if null or empty
-
getInt
public int getInt(int defValue)
Get field value as a raw integer (with default value)- Parameters:
defValue
- Default value- Returns:
- Field value as a raw integer or default value if null or empty
-
getOldInt
public java.lang.Integer getOldInt()
Get field old value as an Integer object- Returns:
- Field old value as an Integer object or Integer(0) if null or empty
-
getLong
public java.lang.Long getLong()
Get field value as a Long object- Returns:
- Field value as a Long object or Long(0) if null or empty
-
getLong
public long getLong(long defValue)
Get field value as a raw long (with default value)- Parameters:
defValue
- Default value- Returns:
- Field value as a raw long or default value if null or empty
-
getOldLong
public java.lang.Long getOldLong()
Get field old value as a Long object- Returns:
- Field old value as a Long object or Long(0) if null or empty
-
getDouble
public java.lang.Double getDouble()
Field value as a Double object- Returns:
- Field value as a Double object or Double(0) if null, empty or non double (generates a log message in that case)
-
getDouble
public double getDouble(double defValue)
Get field value as a raw double (with default value)- Parameters:
defValue
- Default value- Returns:
- Field value as raw a double or default value if null, empty or non double (generates a log message in that case)
-
getOldDouble
public java.lang.Double getOldDouble()
Get field old value as a Double object- Returns:
- Field old value as a Double object or Double(0) if null, empty or non double (generates a log message in that case)
-
getFloat
public java.lang.Float getFloat()
Get field value as a Float object- Returns:
- Field value as a Float object or Float(0) if null, empty or non float (generates a log message in that case)
-
getFloat
public float getFloat(float defValue)
Get field value as a raw float (with default value)- Parameters:
defValue
- Default value- Returns:
- Field value as a raw float or default value if null, empty or non float (generates a log message in that case)
-
getOldFloat
public java.lang.Float getOldFloat()
Get field old value as a Float object- Returns:
- Field old value as a Float object or Float(0) if null, empty or non float (generates a log message in that case)
-
getDecimal
public java.math.BigDecimal getDecimal()
Get field value as a BigDecimal object- Returns:
- Field value as a BigDecimal object or BigDecimal(0) if null, empty or non decimal (generates a log message in that case)
-
getDecimal
public java.math.BigDecimal getDecimal(java.math.BigDecimal defValue)
Get field value as BigDecimal object (with default value)- Parameters:
defValue
- Default value- Returns:
- Field value as raw BigDecimal or default value if null, empty or non decimal (generates a log message in that case)
-
getOldDecimal
public java.math.BigDecimal getOldDecimal()
Get field old value as a BigDecimal object- Returns:
- Field old value as a BigDecimal object or BigDecimal(0) if null, empty or non decimal (generates a log message in that case)
-
getBoolean
public java.lang.Boolean getBoolean()
Get field value as a Boolean object- Returns:
- Field value as a Boolean object or Boolean.FALSE if null, empty or non boolean (generates a log message in that case)
-
getBoolean
public boolean getBoolean(boolean defValue)
Get field value as raw boolean (with default value)- Parameters:
defValue
- Default value- Returns:
- Field value as boolean or default value if null, empty or non boolean (generates a log message in that case)
-
getOldBoolean
public java.lang.Boolean getOldBoolean()
Get field old value as a Boolean object- Returns:
- Field old value as a Boolean object or Boolean.FALSE if null, empty or non boolean (generates a log message in that case)
-
isTrue
public boolean isTrue()
Shorthand to check if a field value is true (usingTool.isTrue()
)- Returns:
- True if the value is true
-
isOldTrue
public boolean isOldTrue()
Shorthand to check if a field old value is true (usingTool.isTrue()
)- Returns:
- True if the value is true
-
isFalse
public boolean isFalse()
Shorthand to check if a field value is false (usingTool.isFalse()
)- Returns:
- True if the value is false
-
isOldFalse
public boolean isOldFalse()
Shorthand to check if a field old value is false (usingTool.isFalse()
)- Returns:
- True if the old value is false
-
isEmpty
public boolean isEmpty()
Shorthand to check is a field value is null or empty (usingTool.isEmpty()
)- Returns:
- True if the value is null or empty
-
isOldEmpty
public boolean isOldEmpty()
Shorthand to check is a field old value is null or empty (usingTool.isEmpty()
)- Returns:
- True if the old value is null or empty
-
isFilterEmpty
public boolean isFilterEmpty()
Shorthand to check is a field filter is null or empty or default search filter- Returns:
- True if the field filter is null or empty or equals to the default search filter
-
isPersistent
public boolean isPersistent()
Shorthand to check if a field is persistent- Returns:
- True if the field is persistent
-
validate
public java.util.List<java.lang.String> validate(ObjectDB obj)
Valid the field value in a business object- Parameters:
obj
- ObjectDB- Returns:
- Error codes or null
-
validate
public java.util.List<java.lang.String> validate(Processus pcs)
Valid the field value in a business process- Parameters:
pcs
- Processus- Returns:
- Error codes or null
-
validateFilter
public java.util.List<java.lang.String> validateFilter(ObjectDB obj)
Valid the field filter in a business object- Parameters:
obj
- ObjectDB- Returns:
- Error codes or null
-
validateFilter
public java.util.List<java.lang.String> validateFilter(Processus pcs)
Valid the field filter in a business process- Parameters:
pcs
- Processus- Returns:
- Error codes or null
-
getLinkDataMap
public java.util.List<LinkDatamap> getLinkDataMap()
Get link datamaps of foreign key
-
addLinkDataMap
public void addLinkDataMap(LinkDatamap ldm)
-
removeStyles
public void removeStyles()
Remove all UI styles of the field
-
addStyle
public void addStyle(FieldStyle style)
Add a UI style to the field- Parameters:
style
- Simple style
-
addStyle
public void addStyle(java.lang.String val, java.lang.String min, java.lang.String max, java.lang.String style, java.lang.String icon)
Add a UI style to the field- Parameters:
val
- Single valuemin
- Min valuemax
- Max valuestyle
- Style defined in CSSicon
- Path to icon
-
getStyle
public java.lang.String getStyle(ObjectDB obj)
Get field style for current value- Parameters:
obj
- Object- Returns:
- CSS style
-
getStyle
public java.lang.String getStyle(ObjectDB obj, java.lang.String val)
Get field style for specified value- Parameters:
obj
- Objectval
- Value- Returns:
- CSS style
-
getImage
public java.lang.String getImage(ObjectDB obj, java.lang.String val)
Get the image associated to the value- Parameters:
obj
- Objectval
- Value- Returns:
- image or empty string
-
getCalcExpr
public java.lang.String getCalcExpr()
Get the expression to calculate the field value
-
setCalcExpr
public void setCalcExpr(java.lang.String e)
-
eval
public java.lang.String eval(ObjectDB obj, int context)
Calculated field evaluation on current selected item- Parameters:
obj
- objectcontext
- Context- Returns:
- Evaluated field value
-
eval
public java.lang.String eval(ObjectDB obj, int context, java.lang.String[] row)
Calculated field evaluation- Parameters:
obj
- objectrow
- a record of list (or null to use a selected record)context
- Context- Returns:
- Evaluated field value
-
toJSON
public java.lang.String toJSON()
Serialize field to JSON
-
toJSON
@Deprecated(forRemoval=false, since="5") public java.lang.String toJSON(Grant g, boolean inlineDocs, boolean inlineThumbs, boolean inlineObjs, boolean copy)
Deprecated.
-
toJSON
public java.lang.String toJSON(Grant g, Parameters.InlineParam inlines, boolean copy, boolean old, java.lang.String path)
Serialize field to JSON
- Parameters:
inlines
- Inline documents optionscopy
- true to get a copy of documentsold
- true to get old valuespath
- optional relative path to export field in a mapped directory
-
toJSONObject
public org.json.JSONObject toJSONObject()
Generates a partial JSON object representation of the field- Returns:
- field as JSON object
-
toString
public java.lang.String toString()
Generates a string representation of the field- Overrides:
toString
in classjava.lang.Object
- Returns:
- field as string
-
-