Child pages
  • JSRelationItem

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Rev: 1381948887907

...

HTML Table
id
classservoy sSummary
Colgroup Tag
Column
padding0px
width80px

Column

Table Row (tr)
styleheight: 30px;
Table Head (th)
colspan2
Constants Summary
Table Body (tbody)
Table Row (tr)
Table Cell (td)
String
Table Cell (td)
#LITERALLITERAL_PREFIX
Constant for using literals in solution model in relations.

HTML Table
id
classservoy sSummary
Colgroup Tag
Column
padding0px
width80px

Column

tbody
Table Row (tr)
styleheight: 30px;
Table Head (th)
colspan2
Property Summary
tbody
Table Row (tr)
Table Cell (td)
String
Table Cell (td)
#foreignColumnNameforeignColumnName
The name of the column from the destination table
that this relation item is based on.
tbody
Table Row (tr)
Table Cell (td)
String
Table Cell (td)
#operatoroperator
The operator that defines the relationship between the primary dataprovider
and the foreign column.
Table Row (tr)
Table Cell (td)
String
Table Cell (td)
#primaryDataProviderIDprimaryDataProviderID
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
Column
padding0px
width80px

Column

tbody
Table Row (tr)
styleheight: 30px;
Table Head (th)
colspan2
Method Summary
Table Row (tr)
Table Cell (td)
UUID
Table Cell (td)
#getUUIDgetUUID()
Returns the UUID of this component.

HTML Table
idconstant
classservoy sDetail
Colgroup Tag
Column
padding0px
width100%

Table Row (tr)
styleheight: 30px;
Table Head (th)
colspan1
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
Column
padding0px
width100%

Table Row (tr)
styleheight: 30px;
Table Head (th)
colspan1
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
Column
padding0px
width100%

Table Row (tr)
styleheight: 30px;
Table Head (th)
colspan1
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)