diff Lib/IMPL/ORM/Entity.pm @ 27:b544a772b654

ORM in progress
author Sergey
date Fri, 16 Oct 2009 16:37:53 +0400
parents 03e58a454b20
children 6d33f75c6e1f
line wrap: on
line diff
--- a/Lib/IMPL/ORM/Entity.pm	Thu Oct 15 17:52:09 2009 +0400
+++ b/Lib/IMPL/ORM/Entity.pm	Fri Oct 16 16:37:53 2009 +0400
@@ -2,12 +2,43 @@
 use strict;
 use warnings;
 
-use base qw(IMPL::DOM::Node);
+use base qw(IMPL::Object);
 use IMPL::Class::Property;
+use IMPL::Class::Property::Direct;
+
+BEGIN {
+    public _direct property Name => prop_get;
+    public _direct property Class => prop_get;
+    public _direct property Values => prop_get;
+    public _direct property Schema => prop_get;
+}
+
+sub CTOR {
+    my ($this,$class,$schema) = @_;
+    
+    
+}
 
-# Name
-# Fields
-# Relations
+sub Store;
+*Store = \&dbgStore;
 
+sub dbgStore {
+    my ($this,$prop,$value) = @_;
+    
+    if ( my $container = $this->{$Values}{$prop} ) {
+        if ($container->{type} eq 'SCALAR') {
+            
+        } else {
+            
+        }
+        
+    } else {
+        die new IMPL::InvalidOperationException("Property not found",$this->Name,$prop);
+    }
+}
+
+sub Get {
+    
+}
 
 1;