log
graph
tags
bookmarks
branches
changeset
browse
file
latest
diff
comparison
annotate
file log
raw
help
Mercurial
>
pub
>
Impl
annotate Lib/IMPL/ORM/Schema/Field.pm @ 197:
6b1dda998839
Find changesets by keywords (author, files, the commit message), revision number or hash, or
revset expression
.
Added IMPL::declare, IMPL::require, to simplify module definitions IMPL::Transform now admires object inheritance while searching for the transformation Added HTTP some exceptions IMPL::Web::Application::RestResource almost implemented
author
sergey
date
Thu, 19 Apr 2012 02:10:02 +0400 (2012-04-18)
parents
4267a2ac3d46
children
Ignore whitespace changes -
Everywhere:
Within whitespace:
At end of lines:
rev
line source
49
16ada169ca75
migrating to the Eclipse IDE
wizard@linux-odin.local
parents:
38
diff
changeset
+
−
1
package IMPL::ORM::Schema::Field;
16ada169ca75
migrating to the Eclipse IDE
wizard@linux-odin.local
parents:
38
diff
changeset
+
−
2
use strict;
16ada169ca75
migrating to the Eclipse IDE
wizard@linux-odin.local
parents:
38
diff
changeset
+
−
3
use warnings;
16ada169ca75
migrating to the Eclipse IDE
wizard@linux-odin.local
parents:
38
diff
changeset
+
−
4
166
4267a2ac3d46
Added Class::Template,
wizard
parents:
49
diff
changeset
+
−
5
use parent qw(IMPL::DOM::Node);
49
16ada169ca75
migrating to the Eclipse IDE
wizard@linux-odin.local
parents:
38
diff
changeset
+
−
6
use IMPL::Class::Property;
16ada169ca75
migrating to the Eclipse IDE
wizard@linux-odin.local
parents:
38
diff
changeset
+
−
7
16ada169ca75
migrating to the Eclipse IDE
wizard@linux-odin.local
parents:
38
diff
changeset
+
−
8
BEGIN {
16ada169ca75
migrating to the Eclipse IDE
wizard@linux-odin.local
parents:
38
diff
changeset
+
−
9
public property fieldName => prop_get | owner_set;
16ada169ca75
migrating to the Eclipse IDE
wizard@linux-odin.local
parents:
38
diff
changeset
+
−
10
public property fieldType => prop_get | owner_set;
16ada169ca75
migrating to the Eclipse IDE
wizard@linux-odin.local
parents:
38
diff
changeset
+
−
11
public property fieldNullbale => prop_get | owner_set;
16ada169ca75
migrating to the Eclipse IDE
wizard@linux-odin.local
parents:
38
diff
changeset
+
−
12
}
16ada169ca75
migrating to the Eclipse IDE
wizard@linux-odin.local
parents:
38
diff
changeset
+
−
13
16ada169ca75
migrating to the Eclipse IDE
wizard@linux-odin.local
parents:
38
diff
changeset
+
−
14
our %CTOR = (
16ada169ca75
migrating to the Eclipse IDE
wizard@linux-odin.local
parents:
38
diff
changeset
+
−
15
'IMPL::DOM::Node' => sub { nodeName => 'Field' }
16ada169ca75
migrating to the Eclipse IDE
wizard@linux-odin.local
parents:
38
diff
changeset
+
−
16
);
16ada169ca75
migrating to the Eclipse IDE
wizard@linux-odin.local
parents:
38
diff
changeset
+
−
17
16ada169ca75
migrating to the Eclipse IDE
wizard@linux-odin.local
parents:
38
diff
changeset
+
−
18
sub CTOR {
16ada169ca75
migrating to the Eclipse IDE
wizard@linux-odin.local
parents:
38
diff
changeset
+
−
19
my ($this,$name,$type,$nullable) = @_;
16ada169ca75
migrating to the Eclipse IDE
wizard@linux-odin.local
parents:
38
diff
changeset
+
−
20
16ada169ca75
migrating to the Eclipse IDE
wizard@linux-odin.local
parents:
38
diff
changeset
+
−
21
$this->fieldName($name) or die new IMPL::InvalidArgumentException('A name is required for the field');
16ada169ca75
migrating to the Eclipse IDE
wizard@linux-odin.local
parents:
38
diff
changeset
+
−
22
$this->fieldType($type) or die new IMPL::InvalidArgumentException('A type is required for the field');
16ada169ca75
migrating to the Eclipse IDE
wizard@linux-odin.local
parents:
38
diff
changeset
+
−
23
$this->fieldNullbale(1) if $nullable;
16ada169ca75
migrating to the Eclipse IDE
wizard@linux-odin.local
parents:
38
diff
changeset
+
−
24
}
16ada169ca75
migrating to the Eclipse IDE
wizard@linux-odin.local
parents:
38
diff
changeset
+
−
25
16ada169ca75
migrating to the Eclipse IDE
wizard@linux-odin.local
parents:
38
diff
changeset
+
−
26
sub canHaveChildren {
16ada169ca75
migrating to the Eclipse IDE
wizard@linux-odin.local
parents:
38
diff
changeset
+
−
27
0;
16ada169ca75
migrating to the Eclipse IDE
wizard@linux-odin.local
parents:
38
diff
changeset
+
−
28
}
16ada169ca75
migrating to the Eclipse IDE
wizard@linux-odin.local
parents:
38
diff
changeset
+
−
29
16ada169ca75
migrating to the Eclipse IDE
wizard@linux-odin.local
parents:
38
diff
changeset
+
−
30
1;