Child pages
  • JSRelationItem

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Divcache
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
styleindexdisplay: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.

true
refresh100d
showRefreshtrue
iddoc
titleRefresh page
showDatetrue
retryEnable

servoy sReturnTypes2100%height: 30px;2Return TypessWordListBLOCK

servoy sReturnTypes2100%height: 30px;2Supported ClientssWordListSmartClientsWordListWebClientsWordListNGClient

servoy sSummary12%30%58%height: 30px;3Constants SummaryConstant for using literals in solution model in relations.

HTML Table

idclassservoy sSummaryidclass

Colgroup Tag
Col
width80px
Col
Table Head (thead) Table Row (tr)style Table Row (tr)
Table Cell (td)
String
Table Cell (td)foreignColumnName
servoy sSummary12%30%58%height: 30px;
Table Head (th)
colspan2
Property Summary
3Property SummaryThe 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

Colgroup Tag
Col
width80px
Col
Table Head (thead) Table Row (tr)styleservoy sSummaryid Table Row (tr)
Table Cell (td)
UUID
Table Cell (td)getUUID()
12%30%58%height: 30px;
Table Head (th)
colspan2
Method Summary
3Methods SummaryReturns the comment of this component.Returns the UUID of this component.

HTML Table

constantclass Colgroup Tag Colcolspanservoy sDetail2width100%

Col
Table Head (thead) Table Row (tr)styleheight:30px; Table Head (th)colspan2Constants Details Table Body (tbody)ididLITERAL_PREFIX Table Row (tr)nametd

LITERAL_PREFIX

Table Row (tr)id

des Table Cell (td) DivclasssIndent
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)idtd
ret

Returns

divsIndentclients

classtd

Supported Clients

sIndent
String Table Row (tr)
idsam
SmartClient,WebClient,NGClientsam

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) sIdentjavascriptlastDetailRow

propertyservoy sDetail2100%height:30px2Property DetailsforeignColumnNamename

foreignColumnName

dessIndent
The name of the column from the destination table
that this relation item is based on.
ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRowoperatorname

operator

dessIndent
The operator that defines the relationship between the primary dataprovider
and the foreign column.
ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
primaryDataProviderIDname

primaryDataProviderID

dessIndent
The name of the column from the source table
that this relation item is based on.
ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
primaryLiteralname

primaryLiteral

dessIndent
Get the literal.
ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow

functionservoy sDetail2100%height:30px2Methods DetailsgetCommentname

getComment()

dessIndent
Returns the comment of this component.
ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRowgetUUIDname

getUUID()

dessIndent
Returns the UUID of this component.
ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow