class LazyCriteriaCollection extends AbstractLazyCollection implements Selectable (View source)

A lazy collection that allow a fast count when using criteria object Once count gets executed once without collection being initialized, result is cached and returned on subsequent calls until collection gets loaded, then returning the number of loaded results.

Properties

protected BasicEntityPersister $entityPersister
protected Criteria $criteria

Methods

__construct(EntityPersister $entityPersister, Criteria $criteria)

No description

int
count()

Do an efficient count on the collection

bool
isEmpty()

check if collection is empty without loading it

bool
contains(object $element)

Do an optimized search of an element

matching(Criteria $criteria)

{@inheritDoc}

doInitialize()

{@inheritDoc}

Details

__construct(EntityPersister $entityPersister, Criteria $criteria)

Parameters

EntityPersister $entityPersister
Criteria $criteria

int count()

Do an efficient count on the collection

Return Value

int

bool isEmpty()

check if collection is empty without loading it

Return Value

bool TRUE if the collection is empty, FALSE otherwise.

bool contains(object $element)

Do an optimized search of an element

Parameters

object $element

Return Value

bool

matching(Criteria $criteria)

{@inheritDoc}

Parameters

Criteria $criteria

protected doInitialize()

{@inheritDoc}