Child pages
  • JSRelationItem

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 5.3
Div
styledisplay:none

DO NOT EDIT THE CONTENT OF THIS PAGE DIRECTLY (EXCEPT INSIDE THE DIV BELOW WITH ID=DESCRIPTION), UNLESS YOU KNOW WHAT YOU'RE DOING.
THE STRUCTURE OF THE CONTENT IS VITAL IN BEING ABLE TO AUTO UPDATE THE CONTENT THROUGH THE DOC GENERATOR.

Div
iddescription



HTML Table
id
classservoy sSummary
Colgroup Tag
Col
width80px
Col
Table Head (thead)
Table Row (tr)
styleheight: 30px;
Table Head (th)
colspan2
Constants Summary
Table Row (tr)
Table Cell (td)
String
Table Cell (td)
LITERAL_PREFIX
Constant for using literals in solution model in relations.



HTML Table
id
classservoy sSummary
Colgroup Tag
Col
width80px
Col
Table Head (thead)
Table Row (tr)
styleheight: 30px;
Table Head (th)
colspan2
Property Summary
Table Row (tr)
Table Cell (td)
String
Table Cell (td)
foreignColumnName
The name of the column from the destination table
that this relation item is based on.
Table Row (tr)
Table Cell (td)
String
Table Cell (td)
operator
The operator that defines the relationship between the primary dataprovider
and the foreign column.
Table Row (tr)
Table Cell (td)
String
Table Cell (td)
primaryDataProviderID
The name of the column from the source table
that this relation item is based on.
Table Row (tr)
Table Cell (td)
Object
Table Cell (td)
primaryLiteral
Get the literal.



HTML Table
id
classservoy sSummary
Colgroup Tag
Col
width80px
Col
Table Head (thead)
Table Row (tr)
styleheight: 30px;
Table Head (th)
colspan2
Method Summary
Table Row (tr)
Table Cell (td)
UUID
Table Cell (td)
getUUID()
Returns the UUID of this component.



HTML Table
idconstant
classservoy sDetail
Colgroup Tag
Col
colspan2
width100%
Col
Table Head (thead)
Table Row (tr)
styleheight: 30px;
Table Head (th)
colspan2
Constants Details
Table Body (tbody)
idLITERAL_PREFIX
Table Row (tr)
idname
Table Cell (td)

LITERAL_PREFIX

Table Row (tr)
iddes
Table Cell (td)
Div
classsIndent
Constant for using literals in solution model in relations.
Strings must be passed as quoted value to make a distinction between string '5' and number 5.
Table Row (tr)
idret
Table Cell (td)

Returns

Div
classsIndent
String
Table Row (tr)
idsam
Table Cell (td)

Sample

Div
classsIndent
Code Block
languagejavascript
relation.newRelationItem(JSRelationItem.LITERAL_PREFIX + "'hello'",'=', 'mytextfield');
Table Row (tr)
classlastDetailRow
Table Cell (td)
 



HTML Table
idproperty
classservoy sDetail
Colgroup Tag
Col
colspan2
width100%
Col
Table Head (thead)
Table Row (tr)
styleheight: 30px;
Table Head (th)
colspan2
Property Details
Table Body (tbody)
idforeignColumnName
Table Row (tr)
idname
Table Cell (td)

foreignColumnName

Table Row (tr)
iddes
Table Cell (td)
Div
classsIndent
The name of the column from the destination table
that this relation item is based on.
Table Row (tr)
idret
Table Cell (td)

Returns

Div
classsIndent
String
Table Row (tr)
idsam
Table Cell (td)

Sample

Div
classsIndent
Code Block
languagejavascript
var relation = solutionModel.newRelation('parentToChild', 'db:/example_data/parent_table', 'db:/example_data/child_table', JSRelation.INNER_JOIN);
var criteria = relation.newRelationItem('parent_table_id', '=', 'child_table_parent_id');
criteria.primaryDataProviderID = 'parent_table_text';
criteria.foreignColumnName = 'child_table_text';
criteria.operator = '<';
Table Row (tr)
classlastDetailRow
Table Cell (td)
 
Table Body (tbody)
idoperator
Table Row (tr)
idname
Table Cell (td)

operator

Table Row (tr)
iddes
Table Cell (td)
Div
classsIndent
The operator that defines the relationship between the primary dataprovider
and the foreign column.
Table Row (tr)
idret
Table Cell (td)

Returns

Div
classsIndent
String
Table Row (tr)
idsam
Table Cell (td)

Sample

Div
classsIndent
Code Block
languagejavascript
var relation = solutionModel.newRelation('parentToChild', 'db:/example_data/parent_table', 'db:/example_data/child_table', JSRelation.INNER_JOIN);
var criteria = relation.newRelationItem('parent_table_id', '=', 'child_table_parent_id');
criteria.primaryDataProviderID = 'parent_table_text';
criteria.foreignColumnName = 'child_table_text';
criteria.operator = '<';
Table Row (tr)
classlastDetailRow
Table Cell (td)
 
Table Body (tbody)
idprimaryDataProviderID
Table Row (tr)
idname
Table Cell (td)

primaryDataProviderID

Table Row (tr)
iddes
Table Cell (td)
Div
classsIndent
The name of the column from the source table
that this relation item is based on.
Table Row (tr)
idret
Table Cell (td)

Returns

Div
classsIndent
String
Table Row (tr)
idsam
Table Cell (td)

Sample

Div
classsIndent
Code Block
languagejavascript
var relation = solutionModel.newRelation('parentToChild', 'db:/example_data/parent_table', 'db:/example_data/child_table', JSRelation.INNER_JOIN);
var criteria = relation.newRelationItem('parent_table_id', '=', 'child_table_parent_id');
criteria.primaryDataProviderID = 'parent_table_text';
criteria.foreignColumnName = 'child_table_text';
criteria.operator = '<';
Table Row (tr)
classlastDetailRow
Table Cell (td)
 
Table Body (tbody)
idprimaryLiteral
Table Row (tr)
idname
Table Cell (td)

primaryLiteral

Table Row (tr)
iddes
Table Cell (td)
Div
classsIndent
Get the literal.
Table Row (tr)
idret
Table Cell (td)

Returns

Div
classsIndent
Object
Table Row (tr)
idsam
Table Cell (td)

Sample

Div
classsIndent
Code Block
languagejavascript
var relation = solutionModel.newRelation('parentToChild', 'db:/example_data/parent_table', 'db:/example_data/child_table', JSRelation.INNER_JOIN);
var criteria = relation.newRelationItem(JSRelationItem.LITERAL_PREFIX + "'hello'",'=', 'myTextField');
criteria.primaryLiteral = 'literal_text';
//criteria.primaryLiteral = number;
var primaryLiteral = criteria.primaryLiteral;
Table Row (tr)
classlastDetailRow
Table Cell (td)
 



HTML Table
idfunction
classservoy sDetail
Colgroup Tag
Col
colspan2
width100%
Col
Table Head (thead)
Table Row (tr)
styleheight: 30px;
Table Head (th)
colspan2
Method Details
Table Body (tbody)
idgetUUID
Table Row (tr)
idname
Table Cell (td)

getUUID

Table Row (tr)
idsig
Table Cell (td)
Span
stylemargin-right: 5px;
UUID
Span
stylefont-weight: bold;
getUUID
Span
()
Table Row (tr)
iddes
Table Cell (td)
Div
classsIndent
Returns the UUID of this component.
Table Row (tr)
idret
Table Cell (td)

Returns

Div
classsIndent
UUID
Table Row (tr)
idsam
Table Cell (td)

Sample

Div
classsIndent
Code Block
languagejavascript
var button_uuid = solutionModel.getForm("my_form").getButton("my_button").getUUID();
application.output(button_uuid.toString());
Table Row (tr)
classlastDetailRow
Table Cell (td)