class ModelJoin extends Join
A ModelJoin is a Join object tied to a RelationMap object
Constants
EQUAL |
|
INNER_JOIN |
|
Methods
__construct(string $leftColumn = null, string $rightColumn = null, string $joinType = null)
Constructor Use it preferably with no arguments, and then use addCondition() and setJoinType() Syntax with arguments used mainly for backwards compatibility |
from Join | |
addCondition(string $left, string $right, string $operator = self::EQUAL)
Join condition definition. |
from Join | |
addConditions(array $lefts, array $rights, array $operators = array())
Join condition definition, for several conditions |
from Join | |
addExplicitCondition(string $leftTableName, string $leftColumnName, string $leftTableAlias = null, string $rightTableName, string $rightColumnName, string $rightTableAlias = null, string $operator = self::EQUAL)
Join condition definition. |
from Join | |
integer |
countConditions()
Retrieve the number of conditions in the join |
from Join |
array |
getConditions()
Return an array of the join conditions |
from Join |
addOperator(string $operator = null) | from Join | |
string | getOperator(int $index) | from Join |
getOperators() | from Join | |
setJoinType(string $joinType = null)
Set the join type |
from Join | |
string |
getJoinType()
Get the join type |
from Join |
addLeftColumnName(string $left)
Add a left column name to the join condition |
from Join | |
string |
getLeftColumn(integer $index)
Get the fully qualified name of the left column of the join condition |
from Join |
string |
getLeftColumnName(integer $index)
Get the left column name of the join condition |
from Join |
array |
getLeftColumns()
Get the list of all the names of left columns of the join condition |
from Join |
setLeftTableName($leftTableName) | from Join | |
getLeftTableName() | from Join | |
setLeftTableAlias($leftTableAlias) | from Join | |
getLeftTableAlias() | from Join | |
hasLeftTableAlias() | from Join | |
getLeftTableAliasOrName() | from Join | |
getLeftTableWithAlias() | from Join | |
addRightColumnName(string $right)
Add a right column name to the join condition |
from Join | |
string |
getRightColumn(integer $index)
Get the fully qualified name of the right column of the join condition |
from Join |
string |
getRightColumnName(integer $index)
Get the right column name of the join condition |
from Join |
all | getRightColumns() | from Join |
setRightTableName($rightTableName) | from Join | |
getRightTableName() | from Join | |
setRightTableAlias($rightTableAlias) | from Join | |
getRightTableAlias() | from Join | |
hasRightTableAlias() | from Join | |
getRightTableAliasOrName() | from Join | |
getRightTableWithAlias() | from Join | |
DBAdapter |
getDB()
Get the value of db. |
from Join |
void |
setDB(DBAdapter $db)
Set the value of db. |
from Join |
setJoinCondition(Criterion $joinCondition)
Set a custom join condition |
from Join | |
Criterion |
getJoinCondition()
Get the custom join condition, if previously set |
from Join |
buildJoinCondition(Criteria $c)
Set the custom join condition Criterion based on the conditions of this join |
from Join | |
string |
getClause(array $params)
Get the join clause for this Join. |
from Join |
bool | equals(ModelJoin $join) | |
string |
toString()
Returns a String representation of the class, |
from Join |
__toString() | ||
setRelationMap(RelationMap $relationMap, $leftTableAlias = null, $relationAlias = null) | ||
getRelationMap() | ||
ModelJoin |
setTableMap(TableMap $tableMap)
Sets the right tableMap for this join |
|
TableMap |
getTableMap()
Gets the right tableMap for this join |
|
ModelJoin | setPreviousJoin(ModelJoin $join) | |
ModelJoin | getPreviousJoin() | |
bool | isPrimary() | |
setRelationAlias($relationAlias) | ||
getRelationAlias() | ||
hasRelationAlias() | ||
Object |
getObjectToRelate(Object $startObject)
This method returns the last related, but already hydrated object up until this join Starting from $startObject and continuously calling the getters to get to the base object for the current join. |
Details
in Join at line 71
public
__construct(string $leftColumn = null, string $rightColumn = null, string $joinType = null)
Constructor Use it preferably with no arguments, and then use addCondition() and setJoinType() Syntax with arguments used mainly for backwards compatibility
in Join at line 97
public
addCondition(string $left, string $right, string $operator = self::EQUAL)
Join condition definition.
Warning: doesn't support table aliases. Use the explicit methods to use aliases.
in Join at line 122
public
addConditions(array $lefts, array $rights, array $operators = array())
Join condition definition, for several conditions
in Join at line 151
public
addExplicitCondition(string $leftTableName, string $leftColumnName, string $leftTableAlias = null, string $rightTableName, string $rightColumnName, string $rightTableAlias = null, string $operator = self::EQUAL)
Join condition definition.
in Join at line 168
public integer
countConditions()
Retrieve the number of conditions in the join
in Join at line 178
public array
getConditions()
Return an array of the join conditions
in Join at line 195
public
addOperator(string $operator = null)
in Join at line 204
public string
getOperator(int $index)
in Join at line 209
public
getOperators()
in Join at line 221
public
setJoinType(string $joinType = null)
Set the join type
in Join at line 232
public string
getJoinType()
Get the join type
in Join at line 247
public
addLeftColumnName(string $left)
Add a left column name to the join condition
in Join at line 263
public string
getLeftColumn(integer $index)
Get the fully qualified name of the left column of the join condition
in Join at line 281
public string
getLeftColumnName(integer $index)
Get the left column name of the join condition
in Join at line 290
public array
getLeftColumns()
Get the list of all the names of left columns of the join condition
in Join at line 300
public
setLeftTableName($leftTableName)
in Join at line 307
public
getLeftTableName()
in Join at line 312
public
setLeftTableAlias($leftTableAlias)
in Join at line 319
public
getLeftTableAlias()
in Join at line 324
public
hasLeftTableAlias()
in Join at line 329
public
getLeftTableAliasOrName()
in Join at line 334
public
getLeftTableWithAlias()
in Join at line 349
public
addRightColumnName(string $right)
Add a right column name to the join condition
in Join at line 365
public string
getRightColumn(integer $index)
Get the fully qualified name of the right column of the join condition
in Join at line 383
public string
getRightColumnName(integer $index)
Get the right column name of the join condition
in Join at line 391
public all
getRightColumns()
in Join at line 401
public
setRightTableName($rightTableName)
in Join at line 408
public
getRightTableName()
in Join at line 413
public
setRightTableAlias($rightTableAlias)
in Join at line 420
public
getRightTableAlias()
in Join at line 425
public
hasRightTableAlias()
in Join at line 430
public
getRightTableAliasOrName()
in Join at line 435
public
getRightTableWithAlias()
in Join at line 446
public DBAdapter
getDB()
Get the value of db.
The DBAdapter which might be used to get db specific
variations of sql.
in Join at line 457
public void
setDB(DBAdapter $db)
Set the value of db.
The DBAdapter might be used to get db specific variations of sql.
in Join at line 467
public
setJoinCondition(Criterion $joinCondition)
Set a custom join condition
in Join at line 477
public Criterion
getJoinCondition()
Get the custom join condition, if previously set
in Join at line 487
public
buildJoinCondition(Criteria $c)
Set the custom join condition Criterion based on the conditions of this join
in Join at line 517
public string
getClause(array $params)
Get the join clause for this Join.
If the join condition needs binding, uses the passed params array.
at line 141
public bool
equals(ModelJoin $join)
in Join at line 560
public string
toString()
Returns a String representation of the class,
at line 149
public
__toString()
at line 23
public
setRelationMap(RelationMap $relationMap, $leftTableAlias = null, $relationAlias = null)
at line 39
public
getRelationMap()
at line 51
public ModelJoin
setTableMap(TableMap $tableMap)
Sets the right tableMap for this join
at line 63
public TableMap
getTableMap()
Gets the right tableMap for this join
at line 76
public ModelJoin
setPreviousJoin(ModelJoin $join)
at line 86
public ModelJoin
getPreviousJoin()
at line 94
public bool
isPrimary()
at line 99
public
setRelationAlias($relationAlias)
at line 104
public
getRelationAlias()
at line 109
public
hasRelationAlias()
at line 124
public Object
getObjectToRelate(Object $startObject)
This method returns the last related, but already hydrated object up until this join Starting from $startObject and continuously calling the getters to get to the base object for the current join.
This method only works if PreviousJoin has been defined,
which only happens when you provide dotted relations when calling join