class OneToManyPersister extends AbstractCollectionPersister (View source)

Persister for one-to-many collections.

Properties

protected EntityManager $em from AbstractCollectionPersister
protected Connection $conn from AbstractCollectionPersister
protected UnitOfWork $uow from AbstractCollectionPersister
protected AbstractPlatform $platform The database platform. from AbstractCollectionPersister
protected QuoteStrategy $quoteStrategy The quote strategy. from AbstractCollectionPersister

Methods

__construct(EntityManager $em)

Initializes a new instance of a class derived from AbstractCollectionPersister.

void
delete(PersistentCollection $coll)

Deletes the persistent state represented by the given collection.

string
getDeleteSQL(PersistentCollection $coll)

Gets the SQL statement for deleting the given collection.

array
getDeleteSQLParameters(PersistentCollection $coll)

Gets the SQL parameters for the corresponding SQL statement to delete the given collection.

void
update(PersistentCollection $coll)

Updates the given collection, synchronizing its state with the database by inserting, updating and deleting individual elements.

integer
count(PersistentCollection $coll)

Counts the size of this persistent collection.

array
slice(PersistentCollection $coll, integer $offset, integer $length = null)

No description

boolean
contains(PersistentCollection $coll, object $element)

No description

boolean
containsKey(PersistentCollection $coll, mixed $key)

Checks for existence of a key.

mixed
removeElement(PersistentCollection $coll, object $element)

No description

void
removeKey(PersistentCollection $coll, mixed $key)

Removes an element by key.

mixed
get(PersistentCollection $coll, mixed $index)

Gets an element by key.

string
getDeleteRowSQL(PersistentCollection $coll)

Generates the SQL UPDATE that updates a particular row's foreign key to null.

array
getDeleteRowSQLParameters(PersistentCollection $coll, mixed $element)

Gets the SQL parameters for the corresponding SQL statement to delete the given element from the given collection.

string
getUpdateRowSQL(PersistentCollection $coll)

Gets the SQL statement used for updating a row in the collection.

string
getInsertRowSQL(PersistentCollection $coll)

Gets the SQL statement used for inserting a row in the collection.

array
getInsertRowSQLParameters(PersistentCollection $coll, mixed $element)

Gets the SQL parameters for the corresponding SQL statement to insert the given element of the given collection into the database.

Details

__construct(EntityManager $em)

Initializes a new instance of a class derived from AbstractCollectionPersister.

Parameters

EntityManager $em

void delete(PersistentCollection $coll)

Deletes the persistent state represented by the given collection.

Parameters

PersistentCollection $coll

Return Value

void

protected string getDeleteSQL(PersistentCollection $coll)

Gets the SQL statement for deleting the given collection.

Parameters

PersistentCollection $coll

Return Value

string

protected array getDeleteSQLParameters(PersistentCollection $coll)

Gets the SQL parameters for the corresponding SQL statement to delete the given collection.

Parameters

PersistentCollection $coll

Return Value

array

void update(PersistentCollection $coll)

Updates the given collection, synchronizing its state with the database by inserting, updating and deleting individual elements.

Parameters

PersistentCollection $coll

Return Value

void

void deleteRows(PersistentCollection $coll)

Deletes rows.

Parameters

PersistentCollection $coll

Return Value

void

void insertRows(PersistentCollection $coll)

Inserts rows.

Parameters

PersistentCollection $coll

Return Value

void

integer count(PersistentCollection $coll)

Counts the size of this persistent collection.

Parameters

PersistentCollection $coll

Return Value

integer

Exceptions

BadMethodCallException

array slice(PersistentCollection $coll, integer $offset, integer $length = null)

Parameters

PersistentCollection $coll
integer $offset
integer $length

Return Value

array

boolean contains(PersistentCollection $coll, object $element)

Parameters

PersistentCollection $coll
object $element

Return Value

boolean

boolean containsKey(PersistentCollection $coll, mixed $key)

Checks for existence of a key.

Parameters

PersistentCollection $coll
mixed $key

Return Value

boolean

Exceptions

BadMethodCallException

mixed removeElement(PersistentCollection $coll, object $element)

Parameters

PersistentCollection $coll
object $element

Return Value

mixed

void removeKey(PersistentCollection $coll, mixed $key)

Removes an element by key.

Parameters

PersistentCollection $coll
mixed $key

Return Value

void

Exceptions

BadMethodCallException

mixed get(PersistentCollection $coll, mixed $index)

Gets an element by key.

Parameters

PersistentCollection $coll
mixed $index

Return Value

mixed

Exceptions

BadMethodCallException

protected string getDeleteRowSQL(PersistentCollection $coll)

Generates the SQL UPDATE that updates a particular row's foreign key to null.

Parameters

PersistentCollection $coll

Return Value

string

protected array getDeleteRowSQLParameters(PersistentCollection $coll, mixed $element)

Gets the SQL parameters for the corresponding SQL statement to delete the given element from the given collection.

Parameters

PersistentCollection $coll
mixed $element

Return Value

array

protected string getUpdateRowSQL(PersistentCollection $coll)

Gets the SQL statement used for updating a row in the collection.

Parameters

PersistentCollection $coll

Return Value

string

protected string getInsertRowSQL(PersistentCollection $coll)

Gets the SQL statement used for inserting a row in the collection.

Parameters

PersistentCollection $coll

Return Value

string

protected array getInsertRowSQLParameters(PersistentCollection $coll, mixed $element)

Gets the SQL parameters for the corresponding SQL statement to insert the given element of the given collection into the database.

Parameters

PersistentCollection $coll
mixed $element

Return Value

array