| line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
|
1
|
|
|
|
|
|
|
# ABSTRACT: DAO request - retrieve relationships |
|
2
|
|
|
|
|
|
|
package PONAPI::DAO::Request::RetrieveRelationships; |
|
3
|
|
|
|
|
|
|
|
|
4
|
8
|
|
|
8
|
|
46
|
use Moose; |
|
|
8
|
|
|
|
|
16
|
|
|
|
8
|
|
|
|
|
68
|
|
|
5
|
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
extends 'PONAPI::DAO::Request'; |
|
7
|
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
with 'PONAPI::DAO::Request::Role::HasFilter', |
|
9
|
|
|
|
|
|
|
'PONAPI::DAO::Request::Role::HasPage', |
|
10
|
|
|
|
|
|
|
'PONAPI::DAO::Request::Role::HasSort', |
|
11
|
|
|
|
|
|
|
'PONAPI::DAO::Request::Role::HasID', |
|
12
|
|
|
|
|
|
|
'PONAPI::DAO::Request::Role::HasRelationshipType'; |
|
13
|
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
sub execute { |
|
15
|
16
|
|
|
16
|
0
|
38
|
my $self = shift; |
|
16
|
|
|
|
|
|
|
|
|
17
|
16
|
100
|
|
|
|
599
|
if ( $self->is_valid ) { |
|
18
|
8
|
|
|
|
|
292
|
my $repo = $self->repository; |
|
19
|
8
|
|
|
|
|
352
|
my $document = $self->document; |
|
20
|
8
|
|
|
|
|
308
|
my $one_to_many = $repo->has_one_to_many_relationship($self->type, $self->rel_type); |
|
21
|
|
|
|
|
|
|
|
|
22
|
8
|
100
|
|
|
|
50
|
$document->convert_to_collection if $one_to_many; |
|
23
|
|
|
|
|
|
|
|
|
24
|
8
|
|
|
|
|
14
|
$repo->retrieve_relationships( %{ $self } ); |
|
|
8
|
|
|
|
|
67
|
|
|
25
|
|
|
|
|
|
|
|
|
26
|
5
|
50
|
66
|
|
|
125
|
$document->add_null_resource |
|
27
|
|
|
|
|
|
|
unless $one_to_many or $document->has_resource_builders; |
|
28
|
|
|
|
|
|
|
} |
|
29
|
|
|
|
|
|
|
|
|
30
|
13
|
|
|
|
|
137
|
return $self->response(); |
|
31
|
|
|
|
|
|
|
} |
|
32
|
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
__PACKAGE__->meta->make_immutable; |
|
34
|
8
|
|
|
8
|
|
54191
|
no Moose; 1; |
|
|
8
|
|
|
|
|
22
|
|
|
|
8
|
|
|
|
|
42
|
|
|
35
|
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
__END__ |
|
37
|
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
=pod |
|
39
|
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
=encoding UTF-8 |
|
41
|
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
=head1 NAME |
|
43
|
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
PONAPI::DAO::Request::RetrieveRelationships - DAO request - retrieve relationships |
|
45
|
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
=head1 VERSION |
|
47
|
|
|
|
|
|
|
|
|
48
|
|
|
|
|
|
|
version 0.002005 |
|
49
|
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
=head1 AUTHORS |
|
51
|
|
|
|
|
|
|
|
|
52
|
|
|
|
|
|
|
=over 4 |
|
53
|
|
|
|
|
|
|
|
|
54
|
|
|
|
|
|
|
=item * |
|
55
|
|
|
|
|
|
|
|
|
56
|
|
|
|
|
|
|
Mickey Nasriachi <mickey@cpan.org> |
|
57
|
|
|
|
|
|
|
|
|
58
|
|
|
|
|
|
|
=item * |
|
59
|
|
|
|
|
|
|
|
|
60
|
|
|
|
|
|
|
Stevan Little <stevan@cpan.org> |
|
61
|
|
|
|
|
|
|
|
|
62
|
|
|
|
|
|
|
=item * |
|
63
|
|
|
|
|
|
|
|
|
64
|
|
|
|
|
|
|
Brian Fraser <hugmeir@cpan.org> |
|
65
|
|
|
|
|
|
|
|
|
66
|
|
|
|
|
|
|
=back |
|
67
|
|
|
|
|
|
|
|
|
68
|
|
|
|
|
|
|
=head1 COPYRIGHT AND LICENSE |
|
69
|
|
|
|
|
|
|
|
|
70
|
|
|
|
|
|
|
This software is copyright (c) 2016 by Mickey Nasriachi, Stevan Little, Brian Fraser. |
|
71
|
|
|
|
|
|
|
|
|
72
|
|
|
|
|
|
|
This is free software; you can redistribute it and/or modify it under |
|
73
|
|
|
|
|
|
|
the same terms as the Perl 5 programming language system itself. |
|
74
|
|
|
|
|
|
|
|
|
75
|
|
|
|
|
|
|
=cut |