|
Transfer version 1.1 | ||||
| FRAMES | |||||
WEB-INF.cftags.component
transfer.com.tql.walkers.AbstractBaseWalker
transfer.com.tql.walkers.Join
public class Join
Walks the join expresion
| Method Summary | |
|---|---|
private void |
buildManyToManyInterimJoinSQL(Object objectFrom, string aliasFrom, Object objectTo, string aliasTo, any buffer, ManyToMany manytomany, boolean innerJoin, string outerJoinType, [boolean resolveFromTo='true'])
Builds the from SQL for the intermim Many to Many table |
private void |
buildManyToManyJoinSQL(Object objectFrom, string aliasFrom, any buffer, ManyToMany manytomany, [boolean resolveFromTo='true'])
Builds the from SQL for the Many to Many join |
private void |
buildManyToOneJoinSQL(Object objectFrom, string aliasFrom, Object objectTo, string aliasTo, any buffer, ManyToOne manytoone, [boolean resolveFromTo='true'])
Builds the from SQL for a Many To One |
private void |
buildOneToManyJoinSQL(Object objectFrom, string aliasFrom, Object objectTo, string aliasTo, any buffer, OneToMany oneToMany, [boolean resolveFromTo='true'])
Builds the from SQL for a One to Many |
private struct |
buildRelationShipCollection(Object objectFrom, Object objectTo)
Buids the array of relationships that are possible between these two objects |
private array |
evaluateAutoJoin(Object object, string alias, array evaluation, any buffer, any pastClassIdentifierNodes)
evaluates auto joining for a particlar node |
private array |
evaluateIdentifierJoinAST(any tree, struct aliasMap, array evaluation, any buffer, boolean aliasColumns, boolean distinctMode)
walks the tree, and makes a array of structs that represent the Identifier join SQL and the mapped values |
private void |
evaluateInterimAutoJoin(Object object, string alias, any buffer, any pastClassIdentifierNodes, boolean innerJoin, string outerJoinType)
evaluates any joining that must be done before joining the actual Object table |
private struct |
evaluateInterimCompositeJoin(any tree, Object object, string alias, struct aliasMap, any buffer, any pastClassIdentifierNodes, boolean innerJoin, string outerJoinType)
evaluate a on composite join |
array |
evaluateJoinAST(any tree, struct aliasMap, array evaluation, any buffer, any pastClassIdentifierNodes, boolean aliasColumns, boolean distinctMode)
evaluates a join AST |
private struct |
evaluateOnCompositeJoin(any tree, Object object, string alias, struct aliasMap, any buffer, any pastClassIdentifierNodes)
evaluate a on composite join |
private struct |
getJoinState(any tree, [string context='auto'], [Object object], [string alias=''], [boolean innerJoin='true'], [string outerJoinType='left'], [any classIdentifierNode])
returns a struct with 3 values in it state : [auto|composite|identifier], the object, and the alias (bad cohesian, good performance) |
private string |
resolveAlias(string alias, string originalValue)
if the alias is an empty string, returns the orignal value |
private boolean |
resolveAutoJoinSQL(Object objectFrom, string aliasFrom, Object objectTo, string aliasTo, any buffer, struct relationships, [boolean on='true'])
resolves the joins found in the relationship collection |
private void |
resolveCompositeInterimJoinSQL(Object objectFrom, string aliasFrom, Object objectTo, string aliasTo, any buffer, boolean innerJoin, string outerJoinType, [string objectFromCompositeName], [string objectToCompositeName])
resolves the intermin joins found in the relationship collection |
private void |
resolveCompositeJoinSQL(Object objectFrom, string aliasFrom, Object objectTo, string aliasTo, any buffer, [string objectFromCompositeName], [string objectToCompositeName])
resolves the joins found in the relationship collection |
private void |
resolveManyToManyInterimAutoJoinSQL(Object objectFrom, string aliasFrom, Object objectTo, string aliasTo, any buffer, boolean innerJoin, string outerJoinType)
Builds the from Auto join SQL for the intermim Many to Many table |
private string |
searchPastIdentifierNodesForAlias(any pastClassIdentifierNodes, string className)
Travels back up to past nodes, to see if an alias exists. If one doesn't, then return " |
| Methods inherited from class transfer.com.tql.walkers.AbstractBaseWalker |
|---|
getJoin, getObject, getObjectManager, getProperty, getSelectStatement, getTQLParser, init, setJoin, setObject, setObjectManager, setProperty, setSelectStatement, setTQLParser, throw
|
| Methods inherited from class WEB-INF.cftags.component |
|---|
|
| Constructor Detail |
|---|
public init(TQLParser tqlParser, ObjectManager objectManager, [Property property], [Object object], [Join join], [SelectStatement selectStatement])
tqlParser - The tqlParser to generate the AST for the TQLobjectManager - The object manager to queryproperty - property walkerobject - Object walkerjoin - join walkerselectStatement - Select statement for sub selects| Method Detail |
|---|
private void buildManyToManyInterimJoinSQL(Object objectFrom, string aliasFrom, Object objectTo, string aliasTo, any buffer, ManyToMany manytomany, boolean innerJoin, string outerJoinType, [boolean resolveFromTo='true'])
objectFrom - The object to go fromaliasFrom - The from aliasobjectTo - The object to go toaliasTo - The to aliasbuffer - java.lang.StringBuffer for preSQL buildingmanytomany - The one to many connectorinnerJoin - if the join is an inner joinouterJoinType - if the join is an inner joinresolveFromTo - whether to resolve From -> To, or To -> Fromprivate void buildManyToManyJoinSQL(Object objectFrom, string aliasFrom, any buffer, ManyToMany manytomany, [boolean resolveFromTo='true'])
objectFrom - The object to go fromaliasFrom - The from aliasbuffer - java.lang.StringBuffer for preSQL buildingmanytomany - The one to many connectorresolveFromTo - whether to resolve From -> To, or To -> Fromprivate void buildManyToOneJoinSQL(Object objectFrom, string aliasFrom, Object objectTo, string aliasTo, any buffer, ManyToOne manytoone, [boolean resolveFromTo='true'])
objectFrom - The object to go fromaliasFrom - The fro aliasobjectTo - The object to go toaliasTo - The fro aliasbuffer - java.lang.StringBuffer for preSQL buildingmanytoone - The one to many connectorresolveFromTo - whether to resolve From -> To, or To -> Fromprivate void buildOneToManyJoinSQL(Object objectFrom, string aliasFrom, Object objectTo, string aliasTo, any buffer, OneToMany oneToMany, [boolean resolveFromTo='true'])
objectFrom - The object to go fromaliasFrom - The fro aliasobjectTo - The object to go toaliasTo - The fro aliasbuffer - java.lang.StringBuffer for preSQL buildingoneToMany - The one to many connectorresolveFromTo - whether to resolve From -> To, or To -> Fromprivate struct buildRelationShipCollection(Object objectFrom, Object objectTo)
objectFrom - The object to go fromobjectTo - The object to go toprivate array evaluateAutoJoin(Object object, string alias, array evaluation, any buffer, any pastClassIdentifierNodes)
object - The object toalias - The aliasevaluation - The array of evaluated valuesbuffer - java.lang.StringBuffer for preSQL buildingpastClassIdentifierNodes - keeps track of all previous class identifiersprivate array evaluateIdentifierJoinAST(any tree, struct aliasMap, array evaluation, any buffer, boolean aliasColumns, boolean distinctMode)
tree - The tree node to walkaliasMap - The from mapevaluation - The array of evaluated valuesbuffer - java.lang.StringBuffer for preSQL buildingaliasColumns - to alias columns or notdistinctMode - If to make the select distinct or notprivate void evaluateInterimAutoJoin(Object object, string alias, any buffer, any pastClassIdentifierNodes, boolean innerJoin, string outerJoinType)
object - The object toalias - The aliasbuffer - java.lang.StringBuffer for preSQL buildingpastClassIdentifierNodes - keeps track of all previous class identifiersinnerJoin - if the join is an inner joinouterJoinType - if the join is an inner joinprivate struct evaluateInterimCompositeJoin(any tree, Object object, string alias, struct aliasMap, any buffer, any pastClassIdentifierNodes, boolean innerJoin, string outerJoinType)
tree - The tree node to walkobject - The object toalias - The aliasaliasMap - The from mapbuffer - java.lang.StringBuffer for preSQL buildingpastClassIdentifierNodes - keeps track of all previous class identifiersinnerJoin - if the join is an inner joinouterJoinType - if the join is an inner joinpublic array evaluateJoinAST(any tree, struct aliasMap, array evaluation, any buffer, any pastClassIdentifierNodes, boolean aliasColumns, boolean distinctMode)
tree - The tree node to walkaliasMap - The from mapevaluation - The array of evaluated valuesbuffer - java.lang.StringBuffer for preSQL buildingpastClassIdentifierNodes - keeps track of all previous class identifiersaliasColumns - to alias columns or notdistinctMode - If to make the select distinct or notprivate struct evaluateOnCompositeJoin(any tree, Object object, string alias, struct aliasMap, any buffer, any pastClassIdentifierNodes)
tree - The tree node to walkobject - The object toalias - The aliasaliasMap - The from mapbuffer - java.lang.StringBuffer for preSQL buildingpastClassIdentifierNodes - keeps track of all previous class identifiersprivate struct getJoinState(any tree, [string context='auto'], [Object object], [string alias=''], [boolean innerJoin='true'], [string outerJoinType='left'], [any classIdentifierNode])
tree - The tree node to walkcontext - The join contextobject - The object for the joinalias - The alias for the objectinnerJoin - if an inner joinouterJoinType - The outer join type, if it existsclassIdentifierNode - The class identifier node to appendprivate string resolveAlias(string alias, string originalValue)
alias - The alias that is being usedoriginalValue - The original valueprivate boolean resolveAutoJoinSQL(Object objectFrom, string aliasFrom, Object objectTo, string aliasTo, any buffer, struct relationships, [boolean on='true'])
objectFrom - The object to go fromaliasFrom - The fro aliasobjectTo - The object to go toaliasTo - The fro aliasbuffer - java.lang.StringBuffer for preSQL buildingrelationships - The relationship collectionon - if it's an on statement, or a and statementprivate void resolveCompositeInterimJoinSQL(Object objectFrom, string aliasFrom, Object objectTo, string aliasTo, any buffer, boolean innerJoin, string outerJoinType, [string objectFromCompositeName], [string objectToCompositeName])
objectFrom - The object to go fromaliasFrom - The fro aliasobjectTo - The object to go toaliasTo - The fro aliasbuffer - java.lang.StringBuffer for preSQL buildinginnerJoin - if the join is an inner joinouterJoinType - if the join is an inner joinobjectFromCompositeName - The object composite name for the from objectobjectToCompositeName - The object composite name for the to objectprivate void resolveCompositeJoinSQL(Object objectFrom, string aliasFrom, Object objectTo, string aliasTo, any buffer, [string objectFromCompositeName], [string objectToCompositeName])
objectFrom - The object to go fromaliasFrom - The fro aliasobjectTo - The object to go toaliasTo - The fro aliasbuffer - java.lang.StringBuffer for preSQL buildingobjectFromCompositeName - The object composite name for the from objectobjectToCompositeName - The object composite name for the to objectprivate void resolveManyToManyInterimAutoJoinSQL(Object objectFrom, string aliasFrom, Object objectTo, string aliasTo, any buffer, boolean innerJoin, string outerJoinType)
objectFrom - The object to go fromaliasFrom - The from aliasobjectTo - The object to go toaliasTo - The to aliasbuffer - java.lang.StringBuffer for preSQL buildinginnerJoin - if the join is an inner joinouterJoinType - if the join is an inner joinprivate string searchPastIdentifierNodesForAlias(any pastClassIdentifierNodes, string className)
pastClassIdentifierNodes - keeps track of all previous class identifiersclassName - The name of the object class to look for
|
Transfer version 1.1 | ||||
| FRAMES | |||||