28
|
1 package IMPL::ORM::Schema::Field;
|
|
2 use strict;
|
|
3 use warnings;
|
|
4
|
|
5 use base qw(IMPL::DOM::Node);
|
|
6 use IMPL::Class::Property;
|
|
7
|
|
8 BEGIN {
|
|
9 public property fieldName => prop_get | owner_set;
|
|
10 public property fieldType => prop_get | owner_set;
|
|
11 }
|
|
12
|
|
13 our %CTOR = (
|
|
14 'IMPL::DOM::Node' => sub { nodeName => 'Field' }
|
|
15 );
|
|
16
|
|
17 sub CTOR {
|
|
18 my ($this,$name,$type) = @_;
|
|
19
|
|
20 $this->fieldName($name) or die new IMPL::InvalidArgumentException('A name is required for the field');
|
|
21 $this->fieldType($type) or die new IMPL::InvalidArgumentException('A type is required for the field');
|
|
22 }
|
|
23
|
|
24 sub canHaveChildren {
|
|
25 0;
|
|
26 }
|
|
27
|
|
28 1;
|