1
0
mirror of synced 2025-01-20 23:41:39 +03:00

Corrected method names; the interface already used SQL, the files still used Sql in method names

This commit is contained in:
Christian Heinrich 2010-05-05 13:12:38 +02:00 committed by Roman S. Borschel
parent 8d52967fcd
commit 20c6259fa3
2 changed files with 25 additions and 25 deletions

View File

@ -36,7 +36,7 @@ class ManyToManyPersister extends AbstractCollectionPersister
* *
* @override * @override
*/ */
protected function _getDeleteRowSql(PersistentCollection $coll) protected function _getDeleteRowSQL(PersistentCollection $coll)
{ {
$mapping = $coll->getMapping(); $mapping = $coll->getMapping();
$joinTable = $mapping->joinTable; $joinTable = $mapping->joinTable;
@ -51,7 +51,7 @@ class ManyToManyPersister extends AbstractCollectionPersister
* @internal Order of the parameters must be the same as the order of the columns in * @internal Order of the parameters must be the same as the order of the columns in
* _getDeleteRowSql. * _getDeleteRowSql.
*/ */
protected function _getDeleteRowSqlParameters(PersistentCollection $coll, $element) protected function _getDeleteRowSQLParameters(PersistentCollection $coll, $element)
{ {
return $this->_collectJoinTableColumnParameters($coll, $element); return $this->_collectJoinTableColumnParameters($coll, $element);
} }
@ -61,7 +61,7 @@ class ManyToManyPersister extends AbstractCollectionPersister
* *
* @override * @override
*/ */
protected function _getUpdateRowSql(PersistentCollection $coll) protected function _getUpdateRowSQL(PersistentCollection $coll)
{} {}
/** /**
@ -71,7 +71,7 @@ class ManyToManyPersister extends AbstractCollectionPersister
* @internal Order of the parameters must be the same as the order of the columns in * @internal Order of the parameters must be the same as the order of the columns in
* _getInsertRowSql. * _getInsertRowSql.
*/ */
protected function _getInsertRowSql(PersistentCollection $coll) protected function _getInsertRowSQL(PersistentCollection $coll)
{ {
$mapping = $coll->getMapping(); $mapping = $coll->getMapping();
$joinTable = $mapping->joinTable; $joinTable = $mapping->joinTable;
@ -87,11 +87,11 @@ class ManyToManyPersister extends AbstractCollectionPersister
* @internal Order of the parameters must be the same as the order of the columns in * @internal Order of the parameters must be the same as the order of the columns in
* _getInsertRowSql. * _getInsertRowSql.
*/ */
protected function _getInsertRowSqlParameters(PersistentCollection $coll, $element) protected function _getInsertRowSQLParameters(PersistentCollection $coll, $element)
{ {
return $this->_collectJoinTableColumnParameters($coll, $element); return $this->_collectJoinTableColumnParameters($coll, $element);
} }
/** /**
* Collects the parameters for inserting/deleting on the join table in the order * Collects the parameters for inserting/deleting on the join table in the order
* of the join table columns as specified in ManyToManyMapping#joinTableColumns. * of the join table columns as specified in ManyToManyMapping#joinTableColumns.
@ -105,15 +105,15 @@ class ManyToManyPersister extends AbstractCollectionPersister
$params = array(); $params = array();
$mapping = $coll->getMapping(); $mapping = $coll->getMapping();
$isComposite = count($mapping->joinTableColumns) > 2; $isComposite = count($mapping->joinTableColumns) > 2;
$identifier1 = $this->_uow->getEntityIdentifier($coll->getOwner()); $identifier1 = $this->_uow->getEntityIdentifier($coll->getOwner());
$identifier2 = $this->_uow->getEntityIdentifier($element); $identifier2 = $this->_uow->getEntityIdentifier($element);
if ($isComposite) { if ($isComposite) {
$class1 = $this->_em->getClassMetadata(get_class($coll->getOwner())); $class1 = $this->_em->getClassMetadata(get_class($coll->getOwner()));
$class2 = $coll->getTypeClass(); $class2 = $coll->getTypeClass();
} }
foreach ($mapping->joinTableColumns as $joinTableColumn) { foreach ($mapping->joinTableColumns as $joinTableColumn) {
if (isset($mapping->relationToSourceKeyColumns[$joinTableColumn])) { if (isset($mapping->relationToSourceKeyColumns[$joinTableColumn])) {
if ($isComposite) { if ($isComposite) {
@ -138,7 +138,7 @@ class ManyToManyPersister extends AbstractCollectionPersister
* *
* @override * @override
*/ */
protected function _getDeleteSql(PersistentCollection $coll) protected function _getDeleteSQL(PersistentCollection $coll)
{ {
$mapping = $coll->getMapping(); $mapping = $coll->getMapping();
$joinTable = $mapping->joinTable; $joinTable = $mapping->joinTable;
@ -157,7 +157,7 @@ class ManyToManyPersister extends AbstractCollectionPersister
* @internal Order of the parameters must be the same as the order of the columns in * @internal Order of the parameters must be the same as the order of the columns in
* _getDeleteSql. * _getDeleteSql.
*/ */
protected function _getDeleteSqlParameters(PersistentCollection $coll) protected function _getDeleteSQLParameters(PersistentCollection $coll)
{ {
$params = array(); $params = array();
$mapping = $coll->getMapping(); $mapping = $coll->getMapping();
@ -170,7 +170,7 @@ class ManyToManyPersister extends AbstractCollectionPersister
} else { } else {
$params[] = array_pop($identifier); $params[] = array_pop($identifier);
} }
return $params; return $params;
} }
} }

View File

@ -25,7 +25,7 @@ use Doctrine\ORM\PersistentCollection;
/** /**
* Persister for one-to-many collections. * Persister for one-to-many collections.
* *
* IMPORTANT: * IMPORTANT:
* This persister is only used for uni-directional one-to-many mappings on a foreign key * This persister is only used for uni-directional one-to-many mappings on a foreign key
* (which are not yet supported). So currently this persister is not used. * (which are not yet supported). So currently this persister is not used.
@ -44,7 +44,7 @@ class OneToManyPersister extends AbstractCollectionPersister
* @return string * @return string
* @override * @override
*/ */
protected function _getDeleteRowSql(PersistentCollection $coll) protected function _getDeleteRowSQL(PersistentCollection $coll)
{ {
$mapping = $coll->getMapping(); $mapping = $coll->getMapping();
$targetClass = $this->_em->getClassMetadata($mapping->getTargetEntityName()); $targetClass = $this->_em->getClassMetadata($mapping->getTargetEntityName());
@ -67,36 +67,36 @@ class OneToManyPersister extends AbstractCollectionPersister
return array("UPDATE $table SET $setClause WHERE $whereClause", $this->_uow->getEntityIdentifier($element)); return array("UPDATE $table SET $setClause WHERE $whereClause", $this->_uow->getEntityIdentifier($element));
} }
protected function _getInsertRowSql(PersistentCollection $coll) protected function _getInsertRowSQL(PersistentCollection $coll)
{ {
return "UPDATE xxx SET foreign_key = yyy WHERE foreign_key = zzz"; return "UPDATE xxx SET foreign_key = yyy WHERE foreign_key = zzz";
} }
/* Not used for OneToManyPersister */ /* Not used for OneToManyPersister */
protected function _getUpdateRowSql(PersistentCollection $coll) protected function _getUpdateRowSQL(PersistentCollection $coll)
{ {
return; return;
} }
/** /**
* Generates the SQL UPDATE that updates all the foreign keys to null. * Generates the SQL UPDATE that updates all the foreign keys to null.
* *
* @param PersistentCollection $coll * @param PersistentCollection $coll
*/ */
protected function _getDeleteSql(PersistentCollection $coll) protected function _getDeleteSQL(PersistentCollection $coll)
{ {
} }
/** /**
* Gets the SQL parameters for the corresponding SQL statement to delete * Gets the SQL parameters for the corresponding SQL statement to delete
* the given collection. * the given collection.
* *
* @param PersistentCollection $coll * @param PersistentCollection $coll
*/ */
protected function _getDeleteSqlParameters(PersistentCollection $coll) protected function _getDeleteSQLParameters(PersistentCollection $coll)
{} {}
/** /**
* Gets the SQL parameters for the corresponding SQL statement to insert the given * Gets the SQL parameters for the corresponding SQL statement to insert the given
* element of the given collection into the database. * element of the given collection into the database.
@ -104,9 +104,9 @@ class OneToManyPersister extends AbstractCollectionPersister
* @param PersistentCollection $coll * @param PersistentCollection $coll
* @param mixed $element * @param mixed $element
*/ */
protected function _getInsertRowSqlParameters(PersistentCollection $coll, $element) protected function _getInsertRowSQLParameters(PersistentCollection $coll, $element)
{} {}
/** /**
* Gets the SQL parameters for the corresponding SQL statement to delete the given * Gets the SQL parameters for the corresponding SQL statement to delete the given
* element from the given collection. * element from the given collection.
@ -114,6 +114,6 @@ class OneToManyPersister extends AbstractCollectionPersister
* @param PersistentCollection $coll * @param PersistentCollection $coll
* @param mixed $element * @param mixed $element
*/ */
protected function _getDeleteRowSqlParameters(PersistentCollection $coll, $element) protected function _getDeleteRowSQLParameters(PersistentCollection $coll, $element)
{} {}
} }