interface CachedCollectionPersister implements CachedPersister, CollectionPersister (View source)

Interface for second level cache collection persisters.

Methods

afterTransactionComplete()

Perform whatever processing is encapsulated here after completion of the transaction.

afterTransactionRolledBack()

Perform whatever processing is encapsulated here after completion of the rolled-back.

getCacheRegion()

Gets the The region access.

void
delete(PersistentCollection $collection)

Deletes the persistent state represented by the given collection.

void
update(PersistentCollection $collection)

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

integer
count(PersistentCollection $collection)

Counts the size of this persistent collection.

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

Slices elements.

boolean
contains(PersistentCollection $collection, object $element)

Checks for existence of an element.

boolean
containsKey(PersistentCollection $collection, mixed $key)

Checks for existence of a key.

mixed
removeElement(PersistentCollection $collection, object $element)

Removes an element.

mixed
get(PersistentCollection $collection, mixed $index)

Gets an element by key.

array
loadCriteria(PersistentCollection $collection, Criteria $criteria)

Loads association entities matching the given Criteria object.

loadCollectionCache(PersistentCollection $collection, CollectionCacheKey $key)

Loads a collection from cache

void
storeCollectionCache(CollectionCacheKey $key, array|Collection $elements)

Stores a collection into cache

Details

afterTransactionComplete()

Perform whatever processing is encapsulated here after completion of the transaction.

afterTransactionRolledBack()

Perform whatever processing is encapsulated here after completion of the rolled-back.

Region getCacheRegion()

Gets the The region access.

Return Value

Region

void delete(PersistentCollection $collection)

Deletes the persistent state represented by the given collection.

Parameters

PersistentCollection $collection

Return Value

void

void update(PersistentCollection $collection)

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

Parameters

PersistentCollection $collection

Return Value

void

integer count(PersistentCollection $collection)

Counts the size of this persistent collection.

Parameters

PersistentCollection $collection

Return Value

integer

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

Slices elements.

Parameters

PersistentCollection $collection
integer $offset
integer $length

Return Value

array

boolean contains(PersistentCollection $collection, object $element)

Checks for existence of an element.

Parameters

PersistentCollection $collection
object $element

Return Value

boolean

boolean containsKey(PersistentCollection $collection, mixed $key)

Checks for existence of a key.

Parameters

PersistentCollection $collection
mixed $key

Return Value

boolean

mixed removeElement(PersistentCollection $collection, object $element)

Removes an element.

Parameters

PersistentCollection $collection
object $element

Return Value

mixed

mixed get(PersistentCollection $collection, mixed $index)

Gets an element by key.

Parameters

PersistentCollection $collection
mixed $index

Return Value

mixed

array loadCriteria(PersistentCollection $collection, Criteria $criteria)

Loads association entities matching the given Criteria object.

Parameters

PersistentCollection $collection
Criteria $criteria

Return Value

array

ClassMetadata getSourceEntityMetadata()

Return Value

ClassMetadata

ClassMetadata getTargetEntityMetadata()

Return Value

ClassMetadata

PersistentCollection|null loadCollectionCache(PersistentCollection $collection, CollectionCacheKey $key)

Loads a collection from cache

Parameters

PersistentCollection $collection
CollectionCacheKey $key

Return Value

PersistentCollection|null

void storeCollectionCache(CollectionCacheKey $key, array|Collection $elements)

Stores a collection into cache

Parameters

CollectionCacheKey $key
array|Collection $elements

Return Value

void