. */ namespace Doctrine\ORM; /** * OptimisticLockException * * @author Roman Borschel * @license http://www.opensource.org/licenses/lgpl-license.php LGPL * @link www.doctrine-project.org * @since 2.0 * @version $Revision$ */ class OptimisticLockException extends ORMException { public static function lockFailed() { return new self("The optimistic lock failed."); } public static function lockFailedVersionMissmatch($expectedLockVersion, $actualLockVersion) { return new self("The optimistic lock failed, version " . $expectedLockVersion . " was expected, but is actually ".$actualLockVersion); } public static function notVersioned($className) { return new self("Cannot obtain optimistic lock on unversioned entity ".$className); } }