Revision dc5f7965
Von Sven Schöling vor mehr als 10 Jahren hinzugefügt
SL/DB/Manager/ProjectStatus.pm | ||
---|---|---|
1 |
package SL::DB::Manager::ProjectStatus; |
|
2 |
|
|
3 |
use strict; |
|
4 |
|
|
5 |
use parent qw(SL::DB::Helper::Manager); |
|
6 |
|
|
7 |
use SL::DB::Helper::Paginated; |
|
8 |
use SL::DB::Helper::Sorted; |
|
9 |
|
|
10 |
sub object_class { 'SL::DB::ProjectStatus' } |
|
11 |
|
|
12 |
__PACKAGE__->make_manager_methods; |
|
13 |
|
|
14 |
sub _sort_spec { |
|
15 |
return ( |
|
16 |
default => [ 'position', 1 ], |
|
17 |
columns => { |
|
18 |
SIMPLE => 'ALL', |
|
19 |
description => 'lower(project_status.description)', |
|
20 |
}); |
|
21 |
} |
|
22 |
|
|
23 |
1; |
|
24 |
__END__ |
|
25 |
|
|
26 |
=pod |
|
27 |
|
|
28 |
=encoding utf8 |
|
29 |
|
|
30 |
=head1 NAME |
|
31 |
|
|
32 |
SL::DB::Manager::ProjectStatus - Manager for models for the 'project_status' table |
|
33 |
|
|
34 |
=head1 SYNOPSIS |
|
35 |
|
|
36 |
This is a standard Rose::DB::Manager based model manager and can be |
|
37 |
used as such. |
|
38 |
|
|
39 |
=head1 FUNCTIONS |
|
40 |
|
|
41 |
None yet. |
|
42 |
|
|
43 |
=head1 BUGS |
|
44 |
|
|
45 |
Nothing here yet. |
|
46 |
|
|
47 |
=head1 AUTHOR |
|
48 |
|
|
49 |
Sven Schöling E<lt>s.schoeling@linet-services.deE<gt> |
|
50 |
|
|
51 |
=cut |
SL/DB/ProjectStatus.pm | ||
---|---|---|
1 |
# This file has been auto-generated only because it didn't exist. |
|
2 |
# Feel free to modify it at will; it will not be overwritten automatically. |
|
3 |
|
|
4 | 1 |
package SL::DB::ProjectStatus; |
5 | 2 |
|
6 | 3 |
use strict; |
7 | 4 |
|
8 | 5 |
use SL::DB::MetaSetup::ProjectStatus; |
6 |
use SL::DB::Manager::ProjectStatus; |
|
7 |
|
|
8 |
use SL::DB::Helper::ActsAsList; |
|
9 |
|
|
10 |
__PACKAGE__->meta->add_relationship( |
|
11 |
projects => { |
|
12 |
type => 'many to one', |
|
13 |
class => 'SL::DB::Project', |
|
14 |
column_map => { id => 'project_status_id' }, |
|
15 |
}, |
|
16 |
); |
|
17 |
|
|
18 |
__PACKAGE__->meta->initialize; |
|
19 |
|
|
20 |
sub validate { |
|
21 |
my ($self) = @_; |
|
22 |
|
|
23 |
my @errors; |
|
24 |
push @errors, $::locale->text('The description is missing.') if !$self->description; |
|
9 | 25 |
|
10 |
# Creates get_all, get_all_count, get_all_iterator, delete_all and update_all.
|
|
11 |
__PACKAGE__->meta->make_manager_class;
|
|
26 |
return @errors;
|
|
27 |
}
|
|
12 | 28 |
|
13 | 29 |
1; |
Auch abrufbar als: Unified diff
Manager für Projekt Status