LEONARDI Application Composer - 8.9.0.40 by W4 S.A.

leon.peer.sql
Class LySqlRequestInfo

java.lang.Object
  extended by leon.peer.sql.LySqlRequestInfo

public class LySqlRequestInfo
extends java.lang.Object

This class is used to keep the encoding context of a request when going into multiple encoders.

See Also:
LySqlRequestEncoder

Nested Class Summary
static class LySqlRequestInfo.Join
          Join type to merge at parent level the new aliases only.
 
Field Summary
static java.lang.String __VERSION
           
 
Constructor Summary
LySqlRequestInfo(LyClass c)
          Constructor.
 
Method Summary
 void addUnionSelectInfos(java.lang.String filter)
          This mode applies when an union select validation is requested Internal use only for SQL Optimization.
 void addUsedClass(java.lang.String name)
          Add a name to the Classes names actually used in the where clause.
 void clearCurrentUsedClasses()
          Reset Classes names actually used in the where clause.
 void completeDetectingUnionSelect()
          Internal use only : checks wether an union select is pertinent or not.
 LySqlRequestInfo.Join getChildType()
          Type of child, one of the CHILD_xxx types.
 java.util.ArrayList<java.lang.String> getCurrentUsedClasses()
          Classes names actually used in the where clause.
 LyClass getDataClass()
          Retrieves the class of data handled by this data source.
 boolean getForceUseAlias()
          Accessor : Force using alias an not just table names Example : see FFT00757 when using left join clauses
 LySqlRequestInfo getParent()
          Access to the parent info of this request info
 LySqlRequestInfo getRootParent()
          Access to the root parent request info of this request info
 java.lang.String getSQLFormatDateInOrderByClause(java.lang.String id)
          Accessor : Force using alias an not just table names Example : see FFT00757 when using left join clauses
 java.lang.Object[] getUnionSelectInfos(int i)
          This mode applies when an union select validation is requested Internal use only for SQL Optimization.
 boolean isDetectingUnionSelect()
          This mode applies when an union select validation is requested Internal use only for SQL Optimization.
 boolean isSQLFormatDateInOrderByClauseEmpty()
           
 boolean isUsingAlias()
          Indicates if 'real' aliases are used in this request.
 void removeUsedClass(java.lang.String className)
           
 void reportUsedClasses(LySqlRequestInfo child)
          Report to parent the used table names.
 void setDetectingUnionSelect(boolean unionSelect)
          This mode applies when an union select validation is requested Internal use only for SQL Optimization.
 void setForceUseAlias(boolean b)
          Force using alias an not just table names Example : see FFT00757 when using left join clauses
 void setParent(LySqlRequestInfo parent, LySqlRequestInfo.Join childType)
          sets the Parent request info.
 void setSQLFormatDateInOrderByClause(java.lang.String id, java.lang.String sqlFormattedDate)
          Force using alias an not just table names Example : see FFT00757 when using left join clauses
 java.lang.String toString()
          Overriden to display an understandable information for debug.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

__VERSION

public static final java.lang.String __VERSION
See Also:
Constant Field Values
Constructor Detail

LySqlRequestInfo

public LySqlRequestInfo(LyClass c)
Constructor.

Parameters:
provider -
dataSource -
valueSep -
Method Detail

setParent

public void setParent(LySqlRequestInfo parent,
                      LySqlRequestInfo.Join childType)
sets the Parent request info.

Parameters:
parent - new parent, if null this object is removed from the parent children list
childType - the type of child, one of the TYPE_xxx constants. parameter is ignored when parent is null.

getRootParent

public LySqlRequestInfo getRootParent()
Access to the root parent request info of this request info

Returns:
the root parent request info or null if this is a root context

getParent

public LySqlRequestInfo getParent()
Access to the parent info of this request info

Returns:
the parent request info or null if this is a root context

getDataClass

public final LyClass getDataClass()
Retrieves the class of data handled by this data source.

Returns:
Class of the data managed in this data source.

toString

public java.lang.String toString()
Overriden to display an understandable information for debug.

Overrides:
toString in class java.lang.Object
Returns:
a human readable details of current info and children

isUsingAlias

public boolean isUsingAlias()
Indicates if 'real' aliases are used in this request.

Returns:
true if at least a 'real' alias is used

getChildType

public LySqlRequestInfo.Join getChildType()
Type of child, one of the CHILD_xxx types.


reportUsedClasses

public void reportUsedClasses(LySqlRequestInfo child)
Report to parent the used table names.


addUsedClass

public void addUsedClass(java.lang.String name)
Add a name to the Classes names actually used in the where clause.

Parameters:
name - the name of the table which is used

getCurrentUsedClasses

public java.util.ArrayList<java.lang.String> getCurrentUsedClasses()
Classes names actually used in the where clause.

Returns:
the list of table names used in the where clause

clearCurrentUsedClasses

public void clearCurrentUsedClasses()
Reset Classes names actually used in the where clause.


removeUsedClass

public void removeUsedClass(java.lang.String className)

isDetectingUnionSelect

public boolean isDetectingUnionSelect()
This mode applies when an union select validation is requested Internal use only for SQL Optimization.


setDetectingUnionSelect

public void setDetectingUnionSelect(boolean unionSelect)
This mode applies when an union select validation is requested Internal use only for SQL Optimization.

Parameters:
true - to activate detectiuon mode. Applicationshall never invoke this method directly

completeDetectingUnionSelect

public void completeDetectingUnionSelect()
Internal use only : checks wether an union select is pertinent or not.


getUnionSelectInfos

public java.lang.Object[] getUnionSelectInfos(int i)
This mode applies when an union select validation is requested Internal use only for SQL Optimization.

Returns:
in [0] the 'additional' used classes fot the from request, in [1] the 'request criteria' and in [2] the index of the child.

addUnionSelectInfos

public void addUnionSelectInfos(java.lang.String filter)
This mode applies when an union select validation is requested Internal use only for SQL Optimization.


setForceUseAlias

public void setForceUseAlias(boolean b)
Force using alias an not just table names Example : see FFT00757 when using left join clauses

Parameters:
b - new alias using status

getForceUseAlias

public boolean getForceUseAlias()
Accessor : Force using alias an not just table names Example : see FFT00757 when using left join clauses

Returns:
new alias using status

setSQLFormatDateInOrderByClause

public void setSQLFormatDateInOrderByClause(java.lang.String id,
                                            java.lang.String sqlFormattedDate)
Force using alias an not just table names Example : see FFT00757 when using left join clauses

Parameters:
b - new alias using status

getSQLFormatDateInOrderByClause

public java.lang.String getSQLFormatDateInOrderByClause(java.lang.String id)
Accessor : Force using alias an not just table names Example : see FFT00757 when using left join clauses

Returns:
new alias using status

isSQLFormatDateInOrderByClauseEmpty

public boolean isSQLFormatDateInOrderByClauseEmpty()

(c) January 2013 - W4 S.A.

Website: W4 S.A., contact us: support@w4global.com