Apache Zeta Components - high quality PHP components

Apache Zeta Components Manual :: Docs For Class ezcPersistentManualGenerator

PersistentObject::ezcPersistentManualGenerator

Class ezcPersistentManualGenerator

This identifier generator does not generate any ID's. Instead the user must manually assign an ID when the object is saved.

This is useful don't want any automatic id generation.

Source for this file: /PersistentObject/src/generators/manual_generator.php

ezcPersistentIdentifierGenerator
   |
   --ezcPersistentManualGenerator
Version:   //autogen//

Method Summary

public void checkPersistence( $def , $db , $state )
Returns true if the object is persistent already.
public int postSave( $def , $db )
Returns the value of the generated identifier for the new object.
public void preSave( $def , $db , $q )
Sets the correct id on the insert query.

Inherited Methods

From ezcPersistentIdentifierGenerator
public bool ezcPersistentIdentifierGenerator::checkPersistence()
Returns true if the object is persistent already.
public abstract int ezcPersistentIdentifierGenerator::postSave()
Returns the value of the generated identifier for the new object.
public abstract void ezcPersistentIdentifierGenerator::preSave()
Called prior to executing the insert query that saves the data to the database.

Methods

checkPersistence

void checkPersistence( ezcPersistentObjectDefinition $def , $db , $state )

Returns true if the object is persistent already.

Called in the beginning of the save process.

Persistent objects that are being saved must not exist in the database already.

Parameters:
Name Type Description
$def ezcPersistentObjectDefinition
$db ezcDbHandler
$state array(key=>value)
Redefinition of:
Method Description
ezcPersistentIdentifierGenerator::checkPersistence() Returns true if the object is persistent already.

postSave

int postSave( ezcPersistentObjectDefinition $def , $db )

Returns the value of the generated identifier for the new object.

Called right after execution of the insert query.

Parameters:
Name Type Description
$def ezcPersistentObjectDefinition
$db ezcDbHandler
Redefinition of:
Method Description
ezcPersistentIdentifierGenerator::postSave() Returns the value of the generated identifier for the new object.

preSave

void preSave( ezcPersistentObjectDefinition $def , $db , $q )

Sets the correct id on the insert query.

Parameters:
Name Type Description
$def ezcPersistentObjectDefinition
$db ezcDbHandler
$q ezcQueryInsert
Redefinition of:
Method Description
ezcPersistentIdentifierGenerator::preSave() Called prior to executing the insert query that saves the data to the database.
Documentation generated by phpDocumentor 1.4.3