public class ObjectField
extends java.lang.Object
implements java.io.Serializable
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.
Modifier and Type | Class and Description |
---|---|
class |
ObjectField.Metrics
Field metrics
|
Modifier and Type | Field and Description |
---|---|
static char |
CASE_FIRSTCAPITAL
First capital
|
static char |
CASE_LOWER
Lower case
|
static char |
CASE_NONE
No case (or null)
|
static char |
CASE_UPPER
Upper case
|
static java.lang.String |
DEFAULT_FILTER
Default filter value
|
static java.lang.String |
DEFAULT_ROW_ID
Default value for row id value (for creation)
|
static java.lang.String |
FILTER_ANYCHARS
Wildcard any characters
|
static java.lang.String |
FILTER_ANYSINGLECHAR
Wildcard any characters
|
static int |
LIST_AVG
Average list
|
static int |
LIST_CALC
Calculate with field expression
|
static int |
LIST_MAX
Maximize list
|
static int |
LIST_MIN
Minimize list
|
static int |
LIST_NONE
No list calculation
|
static int |
LIST_SUM
Sum list
|
static java.lang.String |
PASSWORD_MASK
Mask for displaying passwords
|
static java.lang.String |
RENDERING_DEFAULT
Rendering default
|
static java.lang.String |
RENDERING_EXPRESSION
Rendering for javascript/BSH expression
|
static java.lang.String |
RENDERING_HORIZCHECKBOX
Rendering horizontal check box(es)
|
static java.lang.String |
RENDERING_HORIZRADIOBUTTON
Rendering horizontal radio buttons
|
static java.lang.String |
RENDERING_HTML
Rendering for HTML
|
static java.lang.String |
RENDERING_JSON
Rendering for JSON
|
static java.lang.String |
RENDERING_MARKDOWN
Rendering for markdown text
|
static java.lang.String |
RENDERING_MONO
Rendering monotype
|
static java.lang.String |
RENDERING_SELECTBOX
Rendering select box (single or multiple select)
|
static java.lang.String |
RENDERING_SQL
Rendering for SQL
|
static java.lang.String |
RENDERING_TEXT
Rendering for text editor
|
static java.lang.String |
RENDERING_VERTCHECKBOX
Rendering vertical check box(es)
|
static java.lang.String |
RENDERING_VERTRADIOBUTTON
Rendering vertical radio buttons
|
static int |
RESEARCH_MONO
Deprecated.
use SEARCH_MONO
|
static int |
RESEARCH_MULTI_CHECK
Deprecated.
use SEARCH_MULTI_CHECK
|
static int |
RESEARCH_MULTI_LIST
Deprecated.
use SEARCH_MULTI_LIST
|
static int |
RESEARCH_NONE
Deprecated.
use SEARCH_NONE
|
static int |
SEARCH_MONO
Simple search with one value
|
static int |
SEARCH_MULTI_CHECK
Multi-search with checkbox
|
static int |
SEARCH_MULTI_LIST
Multi-search with a choice list
|
static int |
SEARCH_NONE
No search
|
static int |
SEARCH_PERIOD
Search with a time period
|
static int |
SEARCHREQ_EXT
For extended searches
|
static int |
SEARCHREQ_NOT
Not required for searches
|
static int |
SEARCHREQ_REQ
Required for searches
|
static int |
SEARCHREQ_SEMI
Semi-required for searches
|
static int |
TYPE_BOOLEAN
Boolean False=0 True=1
|
static int |
TYPE_COLOR
Color
|
static int |
TYPE_DATE
Date (format yyyy-MM-dd
|
static int |
TYPE_DATETIME
Datetime (format yyyy-MM-dd HH:mm:ss)
|
static int |
TYPE_DOC
Document
|
static int |
TYPE_EMAIL
Email
|
static int |
TYPE_ENUM
Enum (list of values)
|
static int |
TYPE_ENUM_MULTI
Multi-enum (list of values).
|
static int |
TYPE_EXTFILE
Physical path a file
|
static int |
TYPE_FLOAT
Float
|
static int |
TYPE_FLOAT_EMPTY
Deprecated.
will be force to TYPE_FLOAT + Rendering property to use the calculator = CALC
|
static int |
TYPE_GEOCOORDS
Geo coordinates as "latitude;longitude[;altitude]" in a single value
|
static int |
TYPE_HTML
Rich content HTML
|
static int |
TYPE_ID
Technical ID (foreign key or primary key)
|
static int |
TYPE_IMAGE
Image
|
static int |
TYPE_INT
Signed integer
|
static int |
TYPE_LONG_STRING
Long text
|
static int |
TYPE_NONE
No type
|
static int |
TYPE_NOTEPAD
Notepad: appending text with datetime + login
|
static int |
TYPE_OBJECT
Object as "name:id" in a single value
|
static int |
TYPE_PASSWORD
Password
|
static int |
TYPE_PHONENUM
Phone number
|
static int |
TYPE_REGEXP
Text with regular expression
|
static int |
TYPE_STRING
Text limited to 255c
|
static int |
TYPE_TIME
Time (format HH:mm:ss)
|
static int |
TYPE_URL
URL
|
static int |
UPD_ALWAYS
Updatable in lists and forms
|
static int |
UPD_FORM_ONLY
Updatable in forms only
|
static int |
UPD_LIST_ONLY
Updatable in lists only
|
static int |
UPD_READ_ONLY
Readonly
|
static int |
VIS_BOTH
Visible in lists and forms
|
static int |
VIS_FORBIDDEN
Not sent to UI
|
static int |
VIS_FORM
Visible in forms only
|
static int |
VIS_HIDDEN
Simply hidden on UI
|
static int |
VIS_LIST
Visible in lists only
|
static int |
VIS_NOT
Deprecated.
use VIS_HIDDEN or VIS_FORBIDDEN
|
Constructor and Description |
---|
ObjectField()
Constructor by default
|
ObjectField(int type)
Constructor with a type
|
ObjectField(int type,
java.lang.String value)
Constructor with type and initial value
|
ObjectField(int type,
java.lang.String name,
java.lang.String value)
Constructor with type, name and initial value
|
ObjectField(ObjectField f)
Copy constructor
|
Modifier and Type | Method and Description |
---|---|
void |
addNotepad(java.lang.String fullname,
java.lang.String text)
Add text to notepad
|
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
|
boolean |
canAutoComplete()
True if the field use auto-completion
|
boolean |
canUpdateAll()
True if the field is bulk updatable
|
ObjectField |
clone(ObjectField f)
Clone this field
|
void |
delNotepad()
Del text from notepad
|
java.lang.String |
eval(ObjectDB obj,
int context)
Calculated field evaluation on current selected item
|
java.lang.String |
eval(ObjectDB obj,
int context,
java.lang.String[] row)
Calculated field evaluation
|
java.lang.String |
evalDefault(ObjectCore obj)
Default value evaluation
|
java.lang.String |
getAdditionalSearchSpec()
Get additional SQL filter appended to generic SQL filter
|
java.lang.String[] |
getAllCodes(ObjectCore obj,
java.util.Vector<java.lang.String[]> rows)
Get all codes for specified object data rows
|
java.lang.Boolean |
getBoolean()
Field value as Boolean
|
boolean |
getBoolean(boolean defValue)
Field value as raw boolean with default value
|
java.lang.String |
getCalcExpr()
Get the expression to calculate the field value
|
char |
getCase()
Get the field case
|
java.lang.String |
getCode()
Deprecated.
Use getValue
|
java.lang.String[] |
getCodes()
Get the codes of a multiple enumeration (TYPE_ENUM_MULTI) field
|
java.lang.String[] |
getCodes(java.lang.String codes)
Get the codes of a multiple enumeration (TYPE_ENUM_MULTI) value
|
java.lang.String |
getColumn()
Get the physical column name
|
java.lang.String |
getContextDefaultValue()
Default value to store specific creation context
|
int |
getDataMap()
Get datamap index (-1=none)
|
java.util.Date |
getDate()
Field value as Date
|
java.util.Date |
getDate(java.util.Date defValue)
Field value as Date with default value
|
java.lang.String |
getDBName()
Get the physical column name (same as getColumn)
|
java.lang.String |
getDefault()
Get default value
|
int |
getDefaultOrder()
Deprecated.
Use getOrderDefault
|
java.lang.String |
getDefaultValue()
Alias to getDefault
|
java.lang.String |
getDisplay()
Get the field translation in current user language
|
java.lang.String |
getDisplayOldValue()
Previous display value (applies only to list of values values)
|
java.lang.String |
getDisplayOldValue(Grant g)
Previous display value (applies aloso to userrelated formats : date, ...)
|
java.lang.String |
getDisplayValue()
Get the display value
|
java.lang.String |
getDisplayValue(Grant g)
Get the display current value for specified 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)
|
DocumentDB |
getDocument()
Document extended data
|
DocumentDB |
getDocumentFromDB(Grant g)
Load and return the Document extended data
|
java.lang.Double |
getDouble()
Field value as Double
|
double |
getDouble(double defValue)
Field value as raw double with default value
|
FieldArea |
getFieldArea()
Get the field area
|
java.lang.String |
getFilter()
Get field filter (% means no filter)
|
java.lang.String |
getFilterDateMax()
Get max date filter (for date field)
|
java.lang.String |
getFilterDateMin()
Get min date filter (for date field)
|
ObjectFieldSearch |
getFilterSearch()
Get the field filters
|
java.lang.Float |
getFloat()
Field value as Float
|
float |
getFloat(float defValue)
Field value as raw float with default value
|
int |
getFloatPrecision()
Get field precision (float decimals)
|
java.lang.String |
getFullInput()
Get the logical full input name
|
java.lang.String |
getHelp()
Get the help in the user language
|
java.lang.String |
getId()
Get the technical id of the field
|
java.lang.String |
getImage(java.lang.String val)
Get the image associated the the value
|
int |
getIndex(ObjectCore o)
Get position index in object fields
|
int |
getInitialOrder()
Deprecated.
Use getOrderDefault
|
java.lang.String |
getInput()
Get the logical input name
|
java.lang.Integer |
getInt()
Field value as Integer
|
int |
getInt(int defValue)
Field value as raw integer with default value
|
ObjectFieldList |
getList()
Get the field list of values
|
java.lang.String |
getListName()
Get the name of the list of values
|
int |
getListOperator()
Get the operator on lists LIST_*
|
java.lang.String |
getListOperatorValue()
Get current value of list operation
|
java.lang.Long |
getLong()
Field value as Long
|
long |
getLong(long defValue)
Field value as raw long with default value
|
java.util.Vector<java.lang.String> |
getMetaObjectList()
Authorized objects of TYPE_OBJECT
|
ObjectField.Metrics |
getMetrics()
Get the field UI metrics
|
int |
getMinSize()
Get field min size
|
java.lang.String[] |
getMultiFilter()
Get multi-valued filter for enum (separated by semi-colon)
|
java.lang.String |
getName()
Get the logical simple name
|
java.lang.Boolean |
getOldBoolean()
Field old value as Boolean
|
java.lang.String |
getOldCode()
Deprecated.
Use getOldValue
|
java.util.Date |
getOldDate()
Field old value as Date
|
DocumentDB |
getOldDocument()
Old document
|
java.lang.Double |
getOldDouble()
Field old value as Double
|
java.lang.Float |
getOldFloat()
Field old value as Float
|
java.lang.Integer |
getOldInt()
Field old value as Integer
|
java.lang.Long |
getOldLong()
Field old value as Long
|
java.lang.String |
getOldValue()
Get previous value
|
int |
getOrder()
Current sort specification in search:
asc = positive value, desc = negative value, no sort = 0 |
int |
getOrderDefault()
Default sort specification in search:
asc = positive value, desc = negative value, no sort = 0 |
int |
getOrderInObject()
Get the order in object
|
ObjectField |
getParentField()
Parent field (null if the field belongs to the object)
|
int |
getPrecision()
Deprecated.
|
int |
getPrecisionHeight()
Deprecated.
use getMetrics
|
java.lang.String |
getRefDataSource()
Get the DB datasource of the referenced object
|
java.lang.String |
getRefField()
Deprecated.
Use getRefFieldDBName()
|
java.lang.String |
getRefFieldDBName()
Get physical name of the referenced field
|
java.lang.String |
getRefFieldDisplay()
Get display name of the referenced field
|
java.lang.String |
getRefFieldName()
Logical name of the referenced field
|
int |
getRefMax()
Deprecated.
Use getRefMaxOccurs
|
int |
getRefMaxOccurs()
Maximum occurs (m) in link cardinality (n,m), -1 means infinity
|
int |
getRefMin()
Deprecated.
Use getRefMinOccurs
|
int |
getRefMinOccurs()
Minimum occurs (n) in link cardinality (n,m)
|
java.lang.String |
getRefObjectContext()
Get logical name of the current referenced object
|
java.lang.String |
getRefObjectDisplay()
Get display name of the referenced object
|
java.lang.String |
getRefObjectName()
Get logical name of the referenced object
|
int |
getRefObjectRowIdType()
Get type of the referenced object row ID
|
java.lang.String |
getRefQuery()
Deprecated.
Use getRefSearchSpec
|
java.lang.String |
getRefRowId()
Physical name of the referenced table Id (default = row_id)
|
java.lang.String |
getRefSearchSpec()
Get search specification applied to link
|
java.lang.String |
getRefTable()
Get the DB table of the referenced object
|
java.lang.String |
getRegExp()
The regular expression of TYPE_REGEXP field
|
java.lang.String |
getRegExpMethod()
Method to call of TYPE_REGEXP field (null=none)
|
java.lang.String |
getRegExpMsg()
Message associated to TYPE_REGEXP
|
java.lang.String |
getRegName()
The regular name of TYPE_REGEXP field
|
java.lang.String |
getRendering()
Get the field rendering
|
java.lang.String |
getRenderingDefault()
Get the field rendering default
|
boolean |
getRequiredDefault()
Get default mandatory
|
int |
getResearch()
Deprecated.
use getSearch
|
ObjectField |
getRootField()
Root parent field
|
int |
getSearch()
Get the field search type
|
int |
getSearchDefault()
Get default field search type
|
int |
getSearchRequired()
Get the field required strategy for searches
|
int |
getSearchRequiredDefault()
Get default field required strategy for searches
|
java.lang.String |
getSearchSpec()
Get parsed generic SQL filter applied to a field (platform's internal usage, not to be used in specific code)
|
java.lang.String |
getShortDisplay()
Get the field short translation in current user language
|
int |
getSize()
Get field max size
|
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 alphanum)
|
java.util.Vector<FieldStateTransition> |
getStateModel()
Get state model attached to the list of values
|
Action |
getStateTransitionAction(java.lang.String actionName)
Get the Action associated with a transition of status field
|
Action |
getStateTransitionAction(java.lang.String fromState,
java.lang.String toState)
Get the Action associated with a transition of status field
|
java.lang.String |
getStyle()
Get field style for current value
|
java.lang.String |
getStyle(java.lang.String val)
Get field style for specified value
|
int |
getType()
Get field type
|
int |
getUpdatableDefault()
Get default field updatability
|
java.lang.String |
getValue()
Get the field value
|
int |
getVisibility()
Get field visibility
|
int |
getVisibilityDefault()
Get default field visibility
|
int |
getVisible()
Deprecated.
use getVisibility
|
int |
getVisibleDefault()
Deprecated.
use getVisibilityDefault
|
boolean |
hasChanged()
Check whether the field value has changed (it performs a type-aware comparison between current value and old value)
|
void |
initStateModel()
Set state model attached to the list of values
|
boolean |
isAlphaNum()
Is type a text (in storage) ?
|
boolean |
isCopiable()
True if the field is copiable
|
boolean |
isDefaultExpr()
Is default value an expression ?
|
boolean |
isDocument()
Is type a document (document or image) ?
|
boolean |
isEmpty()
Shorthand to check is a field value is null or empty
|
boolean |
isFiltered()
Is the field filtered
|
boolean |
isFilterEmpty()
Shorthand to check is a field filter is null or empty or default search filter
|
boolean |
isFonctId()
Deprecated.
Use isFunctId
|
boolean |
isForbidden()
Is the field forbidden
|
boolean |
isForeignKey()
Is the field a foreign key (belongs to the object and references one object) ?
|
boolean |
isFunctId()
True if the field is a functional key
|
boolean |
isHidden()
Is the field hidden
|
boolean |
isIndexable()
True if the field is indexed
|
boolean |
isInternalForeignKey()
Is the field an internal foreign key ?
|
boolean |
isInternalRowId()
Is the specified field an internal rowId ?
|
boolean |
isListMore()
Is field an extended field in list
|
boolean |
isListMoreDefault()
Default list more
|
boolean |
isListSum()
True if the field has a sum on lists
|
boolean |
isMore()
Is field an extended field in form
|
boolean |
isNumeric()
Is type a numeric (in storage) ?
|
boolean |
isOldEmpty()
Shorthand to check is a old field value is null or empty
|
boolean |
isPersistent()
Shorthand to check is persistent
|
boolean |
isReferenced()
Do the field belongs to a referenced object ?
|
boolean |
isRequired()
Is field mandatory ?
|
boolean |
isRequired(ObjectDB obj)
Is field required within object ?
|
boolean |
isRightToLeft()
Get field orientation
|
boolean |
isSimpleDoc()
True if the Document field is not in a Bookshelf
|
boolean |
isTechnicalField()
Checks if field name is one of object's technical field (row_id or timestamp)
|
boolean |
isTimestampField()
Checks if field name is one of object's technical timestamp field
|
boolean |
isUpdatable()
True if the field is updatable (not UPD_READ_ONLY means updatable in lists and/or forms)
|
boolean |
isUpdatableInForm()
Deprecated.
Use isUpdatableOnForm
|
boolean |
isUpdatableInList()
Deprecated.
Use isUpdatableOnList
|
boolean |
isUpdatableOnForm()
True if the field is updatable in form
|
boolean |
isUpdatableOnList()
True if the field is updatable in list
|
boolean |
isVisibleOnForm()
True if the field is visible on form
|
boolean |
isVisibleOnList()
True if the field is visible on list
|
void |
load(java.lang.String name,
Grant g,
ObjectDB obj)
Load the field definition from repository
|
void |
loadList(ObjectDB obj,
java.lang.String name,
Grant g)
Loads the list of values
|
java.lang.String |
parseEvalValue(java.lang.Object val)
Try to return appropriate value from evaluation result
|
void |
removeStyles()
Remove all GUI styles of the field
|
void |
resetFilter()
Reset the field filter
|
void |
setAdditionalSearchSpec(java.lang.String f)
Set additional SQL filter appended to generic SQL filter
|
void |
setAutoComplete(boolean b)
Set the field to use auto-completion
|
void |
setBoolean(boolean b) |
void |
setCalcExpr(java.lang.String e) |
void |
setCard(java.lang.String n)
Link card min,max separated by comma
|
void |
setCase(char c)
Set the field case
|
void |
setColumn(java.lang.String col)
Set the physical column name
|
void |
setContextDefaultValue(java.lang.String d) |
void |
setCopy(boolean b)
Set the field as copiable
|
void |
setDataMap(int d)
Set datamap index (-1=none)
|
void |
setDate(java.util.Date d) |
void |
setDBName(java.lang.String col)
Set the physical column name (same as setColumn)
|
void |
setDefault(java.lang.String d)
Set default value
|
void |
setDefaultOrder(int i)
Deprecated.
Use setDefaultOrder
|
void |
setDefaultValue(java.lang.String d)
Alias to setDefault
|
void |
setDisplay(java.lang.String d)
Set the translation in current user language
|
void |
setDocument(DocumentDB doc) |
void |
setDocument(ObjectDB obj,
java.lang.String name,
byte[] data) |
void |
setDouble(double d)
Convert a double to a String, decimal separator is ".", without Exponent representation
Example : field length=13 and precision=2. |
void |
setFieldArea(FieldArea fa)
Set the field area
|
void |
setFilter(boolean b)
Set field filter from boolean
|
void |
setFilter(char c)
Set field filter from char
|
void |
setFilter(java.util.Date d)
Set field filter from date
|
void |
setFilter(double d)
Set field filter from double
|
void |
setFilter(float f)
Set field filter from float
|
void |
setFilter(int i)
Set field filter from integer
|
void |
setFilter(long l)
Set field filter from long
|
void |
setFilter(ObjectFieldSearch ofs)
Set the field filters
|
void |
setFilter(java.lang.String s)
Get field filter (% means no filter)
|
void |
setFilterDateMax(java.lang.String f)
Set max date filter (for date field)
|
void |
setFilterDateMin(java.lang.String f)
Set min date filter (for date field)
|
void |
setFilterSearch(ObjectFieldSearch ofs)
Deprecated.
Use setFilter
|
void |
setFloat(float f) |
void |
setFloatPrecision(int p)
Set field precision (float decimals)
|
void |
setFonctId(boolean b)
Deprecated.
Use setFunctId
|
void |
setFullInput(java.lang.String i)
Set the logical full input name
|
void |
setFunctId(boolean b)
Set the field as a functional key
|
void |
setHelp(java.lang.String h)
Set the help in the user language
|
void |
setId(java.lang.String n)
Set the technical id of the field
|
void |
setIndexable(boolean b)
Set the field as indexed
|
void |
setInitialOrder(int i)
Deprecated.
Use setDefaultOrder
|
void |
setInput(java.lang.String i)
Set the logical input name
|
void |
setInt(int i) |
void |
setList(ObjectFieldList list)
Force the field list of values
|
void |
setListMore(boolean b)
Set field to be an extended field in list
|
void |
setListMoreDefault(boolean b) |
void |
setListOperator(int ope)
Set the field to have an operator LIST_* on lists
|
void |
setListOperatorValue(java.lang.String val)
Set current value of list operation
|
void |
setLong(long l) |
void |
setMetaObjectList(java.lang.String list)
Set the authorized objects of TYPE_OBJECT
|
void |
setMetrics(java.lang.String m)
Simple metrics parser.
|
void |
setMinSize(int s)
Set field min size
|
void |
setMore(boolean b)
Set field to be an extended field in form
|
static void |
setMultiFilter(ObjectField field,
ObjectFieldSearch fs,
java.lang.String[] f) |
void |
setMultiFilter(java.lang.String[] f)
Set multi-valued filter : enum as 'a;b;c' / other types as 'in (a,b,c)'
|
void |
setName(java.lang.String n)
Set the logical simple name
|
void |
setOldDocument(DocumentDB doc) |
void |
setOldValue(java.lang.String value)
Set previous value
|
void |
setOrder(int i) |
void |
setOrderDefault(int i)
Set default sort specification in search
|
void |
setOrderInObject(int i)
Set the order in object
|
void |
setParentField(ObjectField p) |
void |
setPrecision(int p)
Deprecated.
|
void |
setPrecision(java.lang.String prec)
Deprecated.
|
void |
setPrecisionHeight(int h)
Deprecated.
use getMetrics
|
void |
setRef(boolean b)
Indicate that the field to belong to a referenced object
|
void |
setRefDataSource(java.lang.String d)
Set the DB table of the referenced object
|
void |
setRefField(java.lang.String f)
Deprecated.
Use setRefFieldDBName
|
void |
setRefFieldDBName(java.lang.String f)
Set physical name of the referenced field
|
void |
setRefFieldDisplay(java.lang.String d)
Set display name of the referenced field
|
void |
setRefFieldName(java.lang.String f)
Set logical name of the referenced field
|
void |
setRefObjectContext(java.lang.String n)
Set logical name of the current referenced object
|
void |
setRefObjectDisplay(int t)
Set type of the referenced object row ID
|
void |
setRefObjectDisplay(java.lang.String d)
Set display name of the referenced object
|
void |
setRefObjectName(java.lang.String n)
Set logical name of the referenced object
|
void |
setRefQuery(java.lang.String s)
Deprecated.
Use setRefSearchSpec
|
void |
setRefRowId(java.lang.String f)
Set physical name of the referenced table Id
|
void |
setRefSearchSpec(java.lang.String s)
Set search specification applied to link
|
void |
setRefTable(java.lang.String t)
Set the DB table of the referenced object
|
void |
setRegExp(java.lang.String r) |
void |
setRegExpMethod(java.lang.String m) |
void |
setRegExpMsg(java.lang.String m) |
void |
setRegName(java.lang.String name) |
void |
setRendering(java.lang.String r)
Set the field rendering
|
void |
setRenderingDefault(java.lang.String r)
Set the field rendering default
|
void |
setRequired(boolean b)
Set field as mandatory
|
void |
setRequiredDefault(boolean b)
Set default mandatory
|
void |
setResearch(boolean b)
Deprecated.
use setSearch
|
void |
setResearch(int i)
Deprecated.
use setSearch
|
void |
setRightToLeft(boolean b)
Set field orientation
|
void |
setRootField()
Root parent field calculation
|
void |
setSearch(int i)
Set the field search type SEARCH_*
|
void |
setSearchDefault(int i)
Set default field search type
|
void |
setSearchRequired(int b)
Set the field strategy vs required for searches
|
void |
setSearchRequiredDefault(int i)
Set default field required strategy for searches
|
void |
setSearchSpec(java.lang.String f)
Set parsed generic SQL filter applied to a field (platform's internal usage, not to be used in specific code)
|
void |
setShortDisplay(java.lang.String d)
Set the short translation in current user language
|
void |
setSimpleDoc(boolean b)
Set whether the Document field is not in a Bookshelf
|
void |
setSize(int s)
Set field max size
|
void |
setType(int t)
Set field type
|
void |
setUpdatable(boolean b)
Set the field as updatable.
|
void |
setUpdatable(int upd)
Set the field as updatable UPD_*
|
void |
setUpdatableDefault(int upd)
Set default field updatability
|
void |
setUpdateAll(boolean b)
Set the field as bulk updatable
|
void |
setValue(boolean bool)
Set the value with a boolean
|
void |
setValue(char c)
Set the value with a char
|
void |
setValue(java.util.Date date)
Set the value with a date
|
void |
setValue(DocumentDB doc)
Set the value with a document
|
void |
setValue(double doubleValue)
Set the value with a double
|
void |
setValue(float floatValue)
Set the value with a float
|
void |
setValue(int intValue)
Set the value with an integer
|
void |
setValue(long longValue)
Set the value with a long integer
|
void |
setValue(java.lang.String value)
The field value (set with select method)
|
void |
setValue(java.lang.StringBuffer v)
Set the value with a string buffer
|
void |
setValue(java.lang.String value,
int limit) |
void |
setVisibility(int v)
Set field visibility
|
void |
setVisibilityDefault(int v)
Set default field visibility
|
void |
setVisible(int v)
Deprecated.
use setVisibility
|
void |
setVisibleDefault(int v)
Deprecated.
use setVisibilityDefault
|
boolean |
showCalcul()
True if the FLOAT field uses a calculator (Rendering=CALC)
|
java.lang.String |
toJSON()
Serialize field to JSON
|
java.lang.String |
toJSON(Grant g,
boolean inlineDoc,
boolean inlineThumbnail)
Deprecated.
Use toJSON with additional arguments
|
java.lang.String |
toJSON(Grant g,
boolean inlineDoc,
boolean inlineThumbnail,
boolean inlineObject)
Serialize field to JSON
|
java.lang.String |
toString()
Generates basic string dump for field (usefull for debug purposes)
|
java.util.Vector<java.lang.String> |
validate(ObjectDB obj)
Valid the field value in a business object
|
java.util.Vector<java.lang.String> |
validate(Processus pcs)
Valid the field value in a business process
|
java.util.Vector<java.lang.String> |
validateFilter(ObjectDB obj)
Valid the field filter in a business object
|
java.util.Vector<java.lang.String> |
validateFilter(Processus pcs)
Valid the field filter in a business process
|
public static final int TYPE_NONE
public static final int TYPE_ID
public static final int TYPE_INT
public static final int TYPE_FLOAT
public static final int TYPE_STRING
public static final int TYPE_DATE
public static final int TYPE_DATETIME
public static final int TYPE_TIME
public static final int TYPE_ENUM
public static final int TYPE_BOOLEAN
public static final int TYPE_PASSWORD
public static final int TYPE_URL
public static final int TYPE_HTML
public static final int TYPE_EMAIL
public static final int TYPE_LONG_STRING
public static final int TYPE_ENUM_MULTI
public static final int TYPE_REGEXP
public static final int TYPE_DOC
@Deprecated public static final int TYPE_FLOAT_EMPTY
public static final int TYPE_EXTFILE
public static final int TYPE_IMAGE
public static final int TYPE_NOTEPAD
public static final int TYPE_PHONENUM
public static final int TYPE_COLOR
public static final int TYPE_OBJECT
public static final int TYPE_GEOCOORDS
public static final int VIS_HIDDEN
public static final int VIS_LIST
public static final int VIS_FORM
public static final int VIS_BOTH
public static final int VIS_FORBIDDEN
@Deprecated public static final int VIS_NOT
public static final int UPD_READ_ONLY
public static final int UPD_ALWAYS
public static final int UPD_FORM_ONLY
public static final int UPD_LIST_ONLY
public static final char CASE_UPPER
public static final char CASE_LOWER
public static final char CASE_FIRSTCAPITAL
public static final char CASE_NONE
public static final java.lang.String RENDERING_DEFAULT
public static final java.lang.String RENDERING_SELECTBOX
public static final java.lang.String RENDERING_HORIZCHECKBOX
public static final java.lang.String RENDERING_VERTCHECKBOX
public static final java.lang.String RENDERING_HORIZRADIOBUTTON
public static final java.lang.String RENDERING_VERTRADIOBUTTON
public static final java.lang.String RENDERING_MONO
public static final java.lang.String RENDERING_EXPRESSION
public static final java.lang.String RENDERING_HTML
public static final java.lang.String RENDERING_SQL
public static final java.lang.String RENDERING_MARKDOWN
public static final java.lang.String RENDERING_JSON
public static final java.lang.String RENDERING_TEXT
public static final java.lang.String PASSWORD_MASK
public static final java.lang.String DEFAULT_ROW_ID
public static final java.lang.String FILTER_ANYCHARS
public static final java.lang.String FILTER_ANYSINGLECHAR
public static final java.lang.String DEFAULT_FILTER
public static final int LIST_NONE
public static final int LIST_SUM
public static final int LIST_AVG
public static final int LIST_MIN
public static final int LIST_MAX
public static final int LIST_CALC
public static final int SEARCH_NONE
public static final int SEARCH_MONO
public static final int SEARCH_MULTI_CHECK
public static final int SEARCH_MULTI_LIST
public static final int SEARCH_PERIOD
@Deprecated public static final int RESEARCH_NONE
@Deprecated public static final int RESEARCH_MONO
@Deprecated public static final int RESEARCH_MULTI_CHECK
@Deprecated public static final int RESEARCH_MULTI_LIST
public static final int SEARCHREQ_NOT
public static final int SEARCHREQ_SEMI
public static final int SEARCHREQ_REQ
public static final int SEARCHREQ_EXT
public ObjectField()
public ObjectField(int type)
public ObjectField(int type, java.lang.String value)
public ObjectField(int type, java.lang.String name, java.lang.String value)
public ObjectField(ObjectField f)
public ObjectField clone(ObjectField f)
f
- Optional fieldpublic void load(java.lang.String name, Grant g, ObjectDB obj)
name
- Field nameg
- User rightsobj
- Optional objectpublic java.lang.String getId()
public void setId(java.lang.String n)
public java.lang.String getName()
public void setName(java.lang.String n)
public java.lang.String getInput()
public void setInput(java.lang.String i)
public java.lang.String getFullInput()
public void setFullInput(java.lang.String i)
public int getOrderInObject()
public void setOrderInObject(int i)
public int getIndex(ObjectCore o)
public java.lang.String getDisplay()
public void setDisplay(java.lang.String d)
public java.lang.String getShortDisplay()
public void setShortDisplay(java.lang.String d)
public java.lang.String getHelp()
public void setHelp(java.lang.String h)
public boolean isRightToLeft()
public void setRightToLeft(boolean b)
public java.lang.String getRendering()
public void setRendering(java.lang.String r)
public java.lang.String getRenderingDefault()
public void setRenderingDefault(java.lang.String r)
public java.lang.String getColumn()
public final java.lang.String getDBName()
public void setColumn(java.lang.String col)
public final void setDBName(java.lang.String col)
public FieldArea getFieldArea()
public void setFieldArea(FieldArea fa)
public int getVisibility()
public boolean isVisibleOnList()
public boolean isVisibleOnForm()
public boolean isForbidden()
public boolean isHidden()
public void setVisibility(int v)
public int getVisibilityDefault()
public void setVisibilityDefault(int v)
@Deprecated public int getVisible()
@Deprecated public void setVisible(int v)
@Deprecated public int getVisibleDefault()
@Deprecated public void setVisibleDefault(int v)
public boolean showCalcul()
public boolean isCopiable()
public void setCopy(boolean b)
public boolean isUpdatable()
@Deprecated public final boolean isUpdatableInList()
public boolean isUpdatableOnList()
@Deprecated public final boolean isUpdatableInForm()
public boolean isUpdatableOnForm()
public void setUpdatable(boolean b)
public void setUpdatable(int upd)
public int getUpdatableDefault()
public void setUpdatableDefault(int upd)
public boolean canUpdateAll()
public void setUpdateAll(boolean b)
public boolean isIndexable()
public void setIndexable(boolean b)
public boolean canAutoComplete()
public void setAutoComplete(boolean b)
public DocumentDB getDocument()
public DocumentDB getDocumentFromDB(Grant g)
public void setDocument(DocumentDB doc)
public void setDocument(ObjectDB obj, java.lang.String name, byte[] data)
public DocumentDB getOldDocument()
public void setOldDocument(DocumentDB doc)
public boolean isRequired()
public void setRequired(boolean b)
public boolean getRequiredDefault()
public void setRequiredDefault(boolean b)
public boolean isRequired(ObjectDB obj)
@Deprecated public boolean isFonctId()
public boolean isFunctId()
@Deprecated public void setFonctId(boolean b)
public void setFunctId(boolean b)
public char getCase()
public void setCase(char c)
public void setMetaObjectList(java.lang.String list)
list
- separated with semicolon or new linespublic java.util.Vector<java.lang.String> getMetaObjectList()
public boolean isListSum()
public int getListOperator()
public void setListOperator(int ope)
public java.lang.String getListOperatorValue()
public void setListOperatorValue(java.lang.String val)
@Deprecated public int getResearch()
public int getSearch()
@Deprecated public void setResearch(int i)
@Deprecated public void setResearch(boolean b)
public void setSearch(int i)
public int getSearchDefault()
public void setSearchDefault(int i)
public int getSearchRequired()
public void setSearchRequired(int b)
public int getSearchRequiredDefault()
public void setSearchRequiredDefault(int i)
public boolean isMore()
public void setMore(boolean b)
public boolean isListMore()
public void setListMore(boolean b)
public boolean isListMoreDefault()
public void setListMoreDefault(boolean b)
public int getSize()
public void setSize(int s)
public int getMinSize()
public void setMinSize(int s)
@Deprecated public int getPrecision()
@Deprecated public void setPrecision(int p)
public int getFloatPrecision()
public void setFloatPrecision(int p)
public ObjectField.Metrics getMetrics()
@Deprecated public int getPrecisionHeight()
@Deprecated public void setPrecisionHeight(int h)
@Deprecated public void setPrecision(java.lang.String prec)
public void setMetrics(java.lang.String m)
m
- number | w=number h=number | wf=number hf=number wl=number hl=numberpublic int getType()
public void setType(int t)
public boolean isNumeric()
public boolean isAlphaNum()
public boolean isDocument()
public boolean isTechnicalField()
public boolean isTimestampField()
public java.lang.String getListName()
public void loadList(ObjectDB obj, java.lang.String name, Grant g)
public ObjectFieldList getList()
public void setList(ObjectFieldList list)
public java.util.Vector<FieldStateTransition> getStateModel()
public void initStateModel()
public Action getStateTransitionAction(java.lang.String fromState, java.lang.String toState)
fromState
- From state codetoState
- To state codepublic Action getStateTransitionAction(java.lang.String actionName)
actionName
- Action name of transitionpublic java.lang.String getDefault()
public java.lang.String getDefaultValue()
public void setDefault(java.lang.String d)
public void setDefaultValue(java.lang.String d)
public boolean isDefaultExpr()
public java.lang.String parseEvalValue(java.lang.Object val)
public java.lang.String evalDefault(ObjectCore obj)
public java.lang.String getContextDefaultValue()
public void setContextDefaultValue(java.lang.String d)
public ObjectField getParentField()
public void setParentField(ObjectField p)
public boolean isReferenced()
public void setRef(boolean b)
public boolean isInternalRowId()
public boolean isForeignKey()
public boolean isInternalForeignKey()
public java.lang.String getRefDataSource()
public void setRefDataSource(java.lang.String d)
public java.lang.String getRefTable()
public void setRefTable(java.lang.String t)
public java.lang.String getRefFieldName()
public void setRefFieldName(java.lang.String f)
@Deprecated public java.lang.String getRefField()
public java.lang.String getRefFieldDBName()
@Deprecated public void setRefField(java.lang.String f)
public void setRefFieldDBName(java.lang.String f)
public java.lang.String getRefObjectName()
public void setRefObjectName(java.lang.String n)
public java.lang.String getRefObjectContext()
public void setRefObjectContext(java.lang.String n)
public java.lang.String getRefObjectDisplay()
public void setRefObjectDisplay(java.lang.String d)
public int getRefObjectRowIdType()
public void setRefObjectDisplay(int t)
public java.lang.String getRefFieldDisplay()
public void setRefFieldDisplay(java.lang.String d)
public java.lang.String getRefRowId()
public void setRefRowId(java.lang.String f)
@Deprecated public java.lang.String getRefQuery()
public java.lang.String getRefSearchSpec()
@Deprecated public void setRefQuery(java.lang.String s)
public void setRefSearchSpec(java.lang.String s)
@Deprecated public int getRefMin()
public int getRefMinOccurs()
@Deprecated public int getRefMax()
public int getRefMaxOccurs()
public void setCard(java.lang.String n)
public void setRootField()
public ObjectField getRootField()
public int getDataMap()
public void setDataMap(int d)
public boolean isSimpleDoc()
public void setSimpleDoc(boolean b)
public ObjectFieldSearch getFilterSearch()
public java.lang.String getFilter()
@Deprecated public void setFilterSearch(ObjectFieldSearch ofs)
public void setFilter(ObjectFieldSearch ofs)
public void setFilter(char c)
public void setFilter(boolean b)
public void setFilter(java.util.Date d)
public void setFilter(int i)
public void setFilter(long l)
public void setFilter(float f)
public void setFilter(double d)
public void setFilter(java.lang.String s)
public void resetFilter()
public java.lang.String[] getMultiFilter()
public void setMultiFilter(java.lang.String[] f)
public static void setMultiFilter(ObjectField field, ObjectFieldSearch fs, java.lang.String[] f)
public java.lang.String getSearchSpec()
public void setSearchSpec(java.lang.String f)
public java.lang.String getAdditionalSearchSpec()
public void setAdditionalSearchSpec(java.lang.String f)
public java.lang.String getFilterDateMax()
public void setFilterDateMax(java.lang.String f)
public java.lang.String getFilterDateMin()
public void setFilterDateMin(java.lang.String f)
public boolean isFiltered()
public int getOrder()
public void setOrder(int i)
@Deprecated public int getInitialOrder()
@Deprecated public int getDefaultOrder()
public int getOrderDefault()
@Deprecated public void setInitialOrder(int i)
@Deprecated public void setDefaultOrder(int i)
public void setOrderDefault(int i)
public void addNotepad(java.lang.String fullname, java.lang.String text)
public void delNotepad()
public void setDate(java.util.Date d)
d
- Datepublic void setLong(long l)
l
- long integerpublic void setInt(int i)
i
- integerpublic void setDouble(double d)
Convert a double to a String, decimal separator is ".", without Exponent representation
Example : field length=13 and precision=2. setDouble(123456789.5678) = "123456789.57"
d
- doublepublic void setFloat(float f)
f
- float valuepublic void setBoolean(boolean b)
b
- booleanpublic void setValue(java.lang.StringBuffer v)
v
- string bufferpublic void setValue(char c)
c
- characterpublic void setValue(java.util.Date date)
date
- Java Datepublic void setValue(int intValue)
intValue
- integer valuepublic void setValue(long longValue)
longValue
- long valuepublic void setValue(float floatValue)
floatValue
- float valuepublic void setValue(double doubleValue)
doubleValue
- double valuepublic void setValue(boolean bool)
bool
- boolean valuepublic void setValue(DocumentDB doc)
doc
- Document@Deprecated public final java.lang.String getOldCode()
public java.lang.String getOldValue()
public void setOldValue(java.lang.String value)
public java.lang.String getDisplayOldValue()
public java.lang.String getDisplayOldValue(Grant g)
public boolean hasChanged()
Check whether the field value has changed (it performs a type-aware comparison between current value and old value)
public java.lang.String getRegName()
public void setRegName(java.lang.String name)
public java.lang.String getRegExp()
public void setRegExp(java.lang.String r)
public java.lang.String getRegExpMethod()
public void setRegExpMethod(java.lang.String m)
public java.lang.String getRegExpMsg()
public void setRegExpMsg(java.lang.String m)
@Deprecated public final java.lang.String getCode()
public java.lang.String getValue()
public void setValue(java.lang.String value)
public void setValue(java.lang.String value, int limit)
public java.lang.String getSQLValue()
Returns the value formatted for SQL statements (the value is surrounded by single quotes if the field is alphanum)
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)
public final java.lang.String getDisplayValue()
public java.lang.String getDisplayValue(java.lang.String value)
value
- Valuepublic java.lang.String getDisplayValue(java.lang.String value, java.lang.String sep)
value
- Valuesep
- Value separator (default is a slash)public final java.lang.String getDisplayValue(Grant g)
g
- User rightspublic java.lang.String getDisplayValue(Grant g, java.lang.String value)
g
- User rightsvalue
- Valuepublic java.lang.String[] getCodes()
public java.lang.String[] getCodes(java.lang.String codes)
codes
- codes separated by ';'public java.lang.String[] getAllCodes(ObjectCore obj, java.util.Vector<java.lang.String[]> rows)
obj
- Objectrows
- Data rowspublic java.util.Date getDate()
Field value as Date
public java.util.Date getDate(java.util.Date defValue)
Field value as Date with default value
defValue
- Default valuepublic java.util.Date getOldDate()
Field old value as Date
public java.lang.Integer getInt()
Field value as Integer
public int getInt(int defValue)
Field value as raw integer with default value
defValue
- Default valuepublic java.lang.Integer getOldInt()
Field old value as Integer
public java.lang.Long getLong()
Field value as Long
public long getLong(long defValue)
Field value as raw long with default value
defValue
- Default valuepublic java.lang.Long getOldLong()
Field old value as Long
public java.lang.Double getDouble()
Field value as Double
public double getDouble(double defValue)
Field value as raw double with default value
defValue
- Default valuepublic java.lang.Double getOldDouble()
Field old value as Double
public java.lang.Float getFloat()
Field value as Float
public float getFloat(float defValue)
Field value as raw float with default value
defValue
- Default valuepublic java.lang.Float getOldFloat()
Field old value as Float
public java.lang.Boolean getBoolean()
Field value as Boolean
public boolean getBoolean(boolean defValue)
Field value as raw boolean with default value
defValue
- Default valuepublic java.lang.Boolean getOldBoolean()
Field old value as Boolean
public boolean isEmpty()
public boolean isOldEmpty()
public boolean isFilterEmpty()
public boolean isPersistent()
public java.util.Vector<java.lang.String> validate(ObjectDB obj)
obj
- ObjectDBpublic java.util.Vector<java.lang.String> validate(Processus pcs)
pcs
- Processuspublic java.util.Vector<java.lang.String> validateFilter(ObjectDB obj)
obj
- ObjectDBpublic java.util.Vector<java.lang.String> validateFilter(Processus pcs)
pcs
- Processuspublic void removeStyles()
public void addStyle(java.lang.String val, java.lang.String min, java.lang.String max, java.lang.String style, java.lang.String icon)
val
- Single valuemin
- Min valuemax
- Max valuestyle
- Style defined in CSSicon
- Path to iconpublic java.lang.String getStyle()
public java.lang.String getStyle(java.lang.String val)
val
- Valuepublic java.lang.String getImage(java.lang.String val)
val
- Valuepublic java.lang.String getCalcExpr()
public void setCalcExpr(java.lang.String e)
public java.lang.String eval(ObjectDB obj, int context)
obj
- objectcontext
- Contextpublic java.lang.String eval(ObjectDB obj, int context, java.lang.String[] row)
obj
- objectrow
- a record of list (or null to use a selected record)context
- Contextpublic java.lang.String toJSON()
Serialize field to JSON
@Deprecated public java.lang.String toJSON(Grant g, boolean inlineDoc, boolean inlineThumbnail)
public java.lang.String toJSON(Grant g, boolean inlineDoc, boolean inlineThumbnail, boolean inlineObject)
Serialize field to JSON
inlineDoc
- Inline document and image field content as base64 stringsinlineThumbnail
- Inline image field thumbnail as base64 stringsinlineObject
- Inline meta object field itempublic java.lang.String toString()
Generates basic string dump for field (usefull for debug purposes)
toString
in class java.lang.Object
Copyright (c)2006-2014 Simplicite Software. All Rights Reserved.