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)
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.
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. |
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 |
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 :
The first parameter "and" of the function indicates that we want to start the string with "and"
The second parameter "([EXPRESSION])" indicates that we want to repeat this pattern for each join. The keyword [EXPRESSION] references a valid keyword of the table Pattern Attributes List
The third parameter " and " indicates that we want to separate each interpreted occurrence of the pattern with " and " (note the spaces before and after "and")
The fourth parameter "" of the function indicates that we want to end the string with no specific character