public function getNewID($idGeneration, $conn, $dbType, $table=null, $column=null)
    {
        try
        {
            if (!$idGeneration || $idGeneration == 'Openbizx')
            {
                $newid = $this->getNewSYSID($conn, $table, true);
            }
            elseif ($idGeneration == 'Identity')
            {
                //$newid = $this->getNewIdentity($conn, $dbtype, $table, $column);
                $newid = $conn->lastInsertId($table, $column);   // user zend_db method
            }
            elseif (strpos($idGeneration, 'Sequence:')===0)
            {
                $seqname = substr($idGeneration, 9);
                //$newid = $this->getNewSequence($conn, $dbtype, $seqname);
                $newid = $conn->nextSequenceId($seqname);   // user zend_db method
            }
            elseif ($idGeneration == 'GUID')
            {
                $newid = $this->getNewGUID($conn, $dbType, $table, $column);
            }
            elseif ($idGeneration == 'UUID')
            {
                $newid = $this->getNewUUID();
            }
            else
            {
                throw new Exception("Error in generating new ID: unsupported generation type.");
            }
        }
        catch (Exception $e)
        {
            throw new Exception($e->getMessage());
        }
        return $newid;
    }
public function getNewID($idGeneration, $conn, $dbType, $table=null, $column=null)
    {
        try
        {
            if (!$idGeneration || $idGeneration == 'Openbizx')
            {
                $newid = $this->getNewSYSID($conn, $table, true);
            }
            elseif ($idGeneration == 'Identity')
            {
                //$newid = $this->getNewIdentity($conn, $dbtype, $table, $column);
                $newid = $conn->lastInsertId($table, $column);   // user zend_db method
            }
            elseif (strpos($idGeneration, 'Sequence:')===0)
            {
                $seqname = substr($idGeneration, 9);
                //$newid = $this->getNewSequence($conn, $dbtype, $seqname);
                $newid = $conn->nextSequenceId($seqname);   // user zend_db method
            }
            elseif ($idGeneration == 'GUID')
            {
                $newid = $this->getNewGUID($conn, $dbType, $table, $column);
            }
            elseif ($idGeneration == 'UUID')
            {
                $newid = $this->getNewUUID();
            }
            else
            {
                throw new Exception("Error in generating new ID: unsupported generation type.");
            }
        }
        catch (Exception $e)
        {
            throw new Exception($e->getMessage());
        }
        return $newid;
    }
public function getNewID ( $ idGeneration , $ conn , $ dbType , $ table = null , $ column = null ) { try { if ( ! $ idGeneration || $ idGeneration == 'Openbizx' ) { $ newid = $ this -> getNewSYSID ( $ conn , $ table , true ) ; } elseif ( $ idGeneration == 'Identity' ) { //$newid = $this->getNewIdentity($conn, $dbtype, $table, $column); $ newid = $ conn -> lastInsertId ( $ table , $ column ) ; // user zend_db method } elseif ( strpos ( $ idGeneration , 'Sequence:' ) === 0 ) { $ seqname = substr ( $ idGeneration , 9 ) ; //$newid = $this->getNewSequence($conn, $dbtype, $seqname); $ newid = $ conn -> nextSequenceId ( $ seqname ) ; // user zend_db method } elseif ( $ idGeneration == 'GUID' ) { $ newid = $ this -> getNewGUID ( $ conn , $ dbType , $ table , $ column ) ; } elseif ( $ idGeneration == 'UUID' ) { $ newid = $ this -> getNewUUID ( ) ; } else { throw new Exception ( "Error in generating new ID: unsupported generation type." ) ; } } catch ( Exception $ e ) { throw new Exception ( $ e -> getMessage ( ) ) ; } return $ newid ; }
Get new Id

@param string $idGeneration
@param \Zend_Db_Adapter_Abstract $conn database connection
@param string $dbType database type
@param string $table table name
@param string $column column name
@return mixed
Get new Id