getJoinList() Method

Usage

public java.lang.String getJoinList( java.lang.String pStart, 
java.lang.String pPattern, 
java.lang.String pSeparator, 
java.lang.String pEnd)

Alternative syntax:

public java.lang.String getJoinList(
java.lang.String pPattern, 
java.lang.String pSeparator)

Description

Offers a list of the occurrences of the SQL joins in an interface to position in a WHERE clause.

The pPattern parameter is interpreted and then repeated for each element in the list and separated from its predecessor with the parameter pSeparator. The generated string begins with pStart and ends up with pEnd.

In the alternative syntax, any parameters not set are set to an empty string.

Parameters

Parameter

Type

Description

pStart

String

This parameter marks the beginning of the string to generate.

pPattern

String

The pattern is repeated for each occurrence in the list.

 The list of authorized attributes in a pattern is detailed in the table « Pattern Attributes List »

 Each attribute occurrence in the pattern string is substituted with its value. The attributes must be between brackets ([ and ])

Example  My string [COL_NAME] is a column »

pSeparator

String

This parameter separates each pattern from its predecessor.

pEnd

String

This parameter marks the end of the string to generate.

Pattern Attributes List

The following table lists the different values of the parameters as well as the associated description.

Parameter value

Description

ID

Internal identifier of the join

EXPRESSION

Text of the join expression

Examples

insert into <%=odiRef.getTable("L", "COLL_NAME", "W")%>
select <%=odiRef.getColList("", "[EXPRESSION]", ", ", "", "INS=1")%>
from <%=odiRef.getFrom()%>
where (1=1)
<%=odiRef.getJoinList("and ","([EXPRESSION])"," and ","")%>

<%=odiRef.getFilterList("and ","([EXPRESSION])"," and ","")%>
<%=odiRef.getGrpBy()%>
<%=odiRef.getHaving()%>

Explanation: the getJoinList function will be used to generate join expressions to put in the WHERE part of the SELECT statement that must start with "and" and that repeats a pattern (the expression of each join) separated by " and "  for each join. Thus :