ETLp/Role/Schema.pm untested

filter: Statementstmt 0.0% 0 / 27 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 0.0% 0 / 2 Podpod n/a totaltotal 0.0% 0 / 29 CC 1 SCAR 6.9
CC
1
Cov
0%
BEGIN
2.0
BEGIN
2.0
CRAP 2.0
1 package ETLp::Role::Schema;
2  
3 use MooseX::Declare;
4  
5 =head1 NAME
6  
7 ETLp::Role::Schema - Access to ETLp resultsets
8  
9 =head1 DESCRIPTION
10  
11 This role provides user-friendly methods for ETLp resultset objects
12  
13 =head1 METHODS
14  
15 =head2 schema
16  
17 Returns the ETLp::Schema
18  
19 =head1 RESULTSET METHODS
20  
21 Returns a schema resultset for the supplied method name
22  
23 * EtlpConfiguration
24 * EtlpFile
25 * EtlpFileProcess
26 * EtlpItem
27 * EtlpJob
28 * EtlpPhase
29 * EtlpSection
30 * EtlpStatus
31 * EtlpUser
32  
33 =cut
34  
35 role ETLp::Role::Schema {
36
37 use ETLp::Config;
38
39 method schema {
40 return ETLp::Config->schema;
41 }
42
43 method EtlpAppConfig {
44 return $self->schema->resultset('EtlpAppConfig');
45 }
46
47 method EtlpConfiguration {
48 return $self->schema->resultset('EtlpConfiguration');
49 }
50
51 method EtlpDayOfWeek {
52 return $self->schema->resultset('EtlpDayOfWeek');
53 }
54
55 method EtlpFile {
56 return $self->schema->resultset('EtlpFile');
57 }
58
59 method EtlpFileProcess {
60 return $self->schema->resultset('EtlpFileProcess');
61 }
62
63 method EtlpItem {
64 return $self->schema->resultset('EtlpItem');
65 }
66
67 method EtlpJob {
68 return $self->schema->resultset('EtlpJob');
69 }
70
71 method EtlpMonth {
72 return $self->schema->resultset('EtlpMonth');
73 }
74
75 method EtlpPhase {
76 return $self->schema->resultset('EtlpPhase');
77 }
78
79 method EtlpSchedule {
80 return $self->schema->resultset('EtlpSchedule');
81 }
82
83 method EtlpScheduleDayOfMonth{
84 return $self->schema->resultset('EtlpScheduleDayOfMonth');
85 }
86
87 method EtlpScheduleDayOfWeek {
88 return $self->schema->resultset('EtlpScheduleDayOfWeek');
89 }
90
91 method EtlpScheduleHour {
92 return $self->schema->resultset('EtlpScheduleHour');
93 }
94
95 method EtlpScheduleMinute {
96 return $self->schema->resultset('EtlpScheduleMinute');
97 }
98
99 method EtlpScheduleMonth {
100 return $self->schema->resultset('EtlpScheduleMonth');
101 }
102
103 method EtlpSection {
104 return $self->schema->resultset('EtlpSection');
105 }
106
107 method EtlpStatus {
108 return $self->schema->resultset('EtlpStatus');
109 }
110
111 method EtlpUser {
112 return $self->schema->resultset('EtlpUser');
113 }
114 }
115  
116 =head1 LICENSE AND COPYRIGHT
117  
118 Copyright 2010 Redbone Systems Ltd
119  
120 This program is free software; you can redistribute it and/or modify it
121 under the terms of either: the GNU General Public License as published
122 by the Free Software Foundation; or the Artistic License.
123  
124 The terms are in the LICENSE file that accompanies this application
125  
126 =cut
127  
128 1;
129