<?php
namespace Claromentis\Core\Repository;

$GLOBALS["__65da1b1ec2d665" . "3e8a0ab7848e5362" . "15"] = (@$GLOBALS["__65da1b1ec2d665" . "3e8a0ab7848e5362" . "15"] ?: array()) + array("_fc9d7314a9d9958d8fa0a403ba" . "8ff197" => base64_decode("Z2V0" . "X2Ns" . "YXNz"), "_42bd6b7ed0" . "36a15d831d3" . "821016f8e59" => base64_decode("RmFpbGVkIHRvIHN" . "hdmUg"), "_29225c3f2cb4b5bb8cdfe" . "cad11c6f491" => base64_decode("Og" . "=="), "_8513924a0ff2f1ee" . "2a69066c615852a8" => base64_decode("QXR0ZW1wdCB0byBhY2Nlc3Mga" . "W52YWxpZCBwcm9wZXJ0eSA="), "_62d701c3c53404f0" . "6345eb35720a47b4" => base64_decode("aXNfbnVtZXJpY" . "w=="));
use Claromentis\Core\Repository\Exception\StorageException;
use Claromentis\Core\Repository\Exception\UnknownPropertyException;






abstract class RepositoryItemAbstract implements RepositoryItem
{
    protected $db_values;
    private static $columns = array();
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    public function LoadFromArray($_b8cfc2e06d9d1fec1893ea4a054002bf)
    {
        $this->db_values = $_b8cfc2e06d9d1fec1893ea4a054002bf;
        return true;
    }
    public function SaveTo(\ObjectsStorage $storage)
    {
        $_18cb991d3787967aac03336ac7811b3d = $storage->Save($this);
        if ($_18cb991d3787967aac03336ac7811b3d) {
            if ($GLOBALS["__65da1b1ec2d665" . "3e8a0ab7848e5362" . "15"]["_62d701c3c534" . "04f06345eb357" . "20a47b4"]($_18cb991d3787967aac03336ac7811b3d)) {
                $this->SetProperty($storage->GetDbIdentity($this), $_18cb991d3787967aac03336ac7811b3d);
            }
            return true;
        }
        throw new StorageException($GLOBALS["__65da1b1ec2d66" . "53e8a0ab7848e53" . "6215"]["_42bd6b7ed036a15d831d38" . "21016f8e59"] . $GLOBALS["__65da1b1ec2d6653e" . "8a0ab7848e536215"]["_fc9d7314a9" . "d9958d8fa0a" . "403ba8ff197"]($this));
    }
    public function GetProperty($_ce76a91ef2b7be07d7d04e74d4da9b6a)
    {
        $_cf58d50fa50aab09e047075c4b2206cd = $GLOBALS["__65da1b1ec2d6653e8a0ab7848e5362" . "15"]["_fc9d7314a9d9958d8fa0a403ba8ff1" . "97"]($this);
        if (!isset(self::$columns[$_cf58d50fa50aab09e047075c4b2206cd])) {
            self::$columns[$_cf58d50fa50aab09e047075c4b2206cd] = \ObjectsStorage::I()->GetDbColumns($this);
        }
        if (!isset(self::$columns[$_cf58d50fa50aab09e047075c4b2206cd][$_ce76a91ef2b7be07d7d04e74d4da9b6a])) {
            throw new UnknownPropertyException($GLOBALS["__65da1b1ec2d6653e8a0ab7848e53" . "6215"]["_8513924a0ff2f1ee2a69066c615" . "852a8"] . $_cf58d50fa50aab09e047075c4b2206cd . ($GLOBALS["__65da1b1ec" . "2d6653e8a0a" . "b7848e53621" . "5"]["_29225c3" . "f2cb4b5b" . "b8cdfeca" . "d11c6f49" . "1"] . $_ce76a91ef2b7be07d7d04e74d4da9b6a));
        }
        return isset($this->db_values[$_ce76a91ef2b7be07d7d04e74d4da9b6a]) ? $this->db_values[$_ce76a91ef2b7be07d7d04e74d4da9b6a] : null;
    }
    protected function SetProperty($_ce76a91ef2b7be07d7d04e74d4da9b6a, $value)
    {
        $_cf58d50fa50aab09e047075c4b2206cd = $GLOBALS["__65da1b1ec2d66" . "53e8a0ab7848e53" . "6215"]["_fc9d7314a9d9958d8fa0a403" . "ba8ff197"]($this);
        if (!isset(self::$columns[$_cf58d50fa50aab09e047075c4b2206cd])) {
            self::$columns[$_cf58d50fa50aab09e047075c4b2206cd] = \ObjectsStorage::I()->GetDbColumns($this);
        }
        if (!isset(self::$columns[$_cf58d50fa50aab09e047075c4b2206cd][$_ce76a91ef2b7be07d7d04e74d4da9b6a])) {
            throw new UnknownPropertyException($GLOBALS["__65da1b1ec2d6653e" . "8a0ab7848e536215"]["_8513924" . "a0ff2f1e" . "e2a69066" . "c615852a" . "8"] . $_cf58d50fa50aab09e047075c4b2206cd . ($GLOBALS["__65da1b1ec2d6653e8a0a" . "b7848e536215"]["_29225c3f2" . "cb4b5bb8cd" . "fecad11c6f" . "491"] . $_ce76a91ef2b7be07d7d04e74d4da9b6a));
        }
        $this->db_values[$_ce76a91ef2b7be07d7d04e74d4da9b6a] = $value;
        return true;
    }
    public function __get($_ce76a91ef2b7be07d7d04e74d4da9b6a)
    {
        return $this->GetProperty($_ce76a91ef2b7be07d7d04e74d4da9b6a);
    }
    public function __isset($_ce76a91ef2b7be07d7d04e74d4da9b6a)
    {
        return isset($this->db_values[$_ce76a91ef2b7be07d7d04e74d4da9b6a]);
    }
    
    
    
    
    
    
    public static function Create($_fd62bc4eaaf7d58dea9bada3e30443b9)
    {
        $_68ffaaa31e3ba49ed9d6159fbee9f043 = new static();
        
        
        $_68ffaaa31e3ba49ed9d6159fbee9f043->LoadFromArray($_fd62bc4eaaf7d58dea9bada3e30443b9);
        return $_68ffaaa31e3ba49ed9d6159fbee9f043;
    }
}