Path

ez components / documentation / api reference / 2006.2 / persistentobject


eZ Components 2006.2

PersistentObject: ezcPersistentManualGenerator

[ Tutorial ] [ Class tree ] [ Element index ] [ ChangeLog ] [ Credits ]

Class: ezcPersistentManualGenerator

This identifier generator does not generate any ID's. Instead the user must manually assign an ID when the object is saved. [source]
This is useful don't want any automatic id generation.

Parents

ezcPersistentIdentifierGenerator
   |
   --ezcPersistentManualGenerator

Method Summary

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

Methods

checkPersistence

void checkPersistence( ezcPersistentObjectDefinition $def, $db, $state )
Check 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  
$state array  

postSave

int postSave( ezcPersistentObjectDefinition $def, $db )
Returns the integer 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  

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  

Last updated: Thu, 01 Nov 2007