package Reaction::InterfaceModel::Action::DBIC::Result::Delete;
-use aliased 'Reaction::InterfaceModel::Action::DBIC::Result';
-use aliased 'Reaction::InterfaceModel::Action::Role::SimpleMethodCall';
use Reaction::Types::DBIC 'Row';
use Reaction::Class;
use namespace::clean -except => [ qw(meta) ];
-extends Result;
+extends 'Reaction::InterfaceModel::Action::DBIC::Result';
+with 'Reaction::InterfaceModel::Action::Role::SimpleMethodCall';
-with SimpleMethodCall;
-sub _target_model_method { 'delete' };
+sub _target_model_method { 'delete' }
__PACKAGE__->meta->make_immutable;
-
1;
+__END__;
+
=head1 NAME
Reaction::InterfaceModel::Action::DBIC::Result::Delete
=head1 DESCRIPTION
-=head2 target_model
+C<Delete> is a subclass of
+L<Action::DBIC::Result|Reaction::InterfaceModel::Action::DBIC::Result> that consumes
+L<Role::SimpleMethodCall|'Reaction::InterfaceModel::Action::Role::SimpleMethodCall>
+to call the C<target_model>'s C<delete> method
+
+=head1 METHODS
+
+=head2 _target_model_method
+
+Returns 'delete'
+
+=head1 SEE ALSO
+
+L<Create|Reaction::InterfaceModel::Action::DBIC::ResultSet::Create>,
+L<DeleteAll|Reaction::InterfaceModel::Action::DBIC::ResultSet::DeleteAll>,
+L<Update|Reaction::InterfaceModel::Action::DBIC::Result::Update>,
=head1 AUTHORS
package Reaction::InterfaceModel::Action::DBIC::Result::Update;
-use aliased 'Reaction::InterfaceModel::Action::DBIC::Result';
use Reaction::Types::DBIC 'Row';
use Reaction::Class;
use namespace::clean -except => [ qw(meta) ];
-extends Result;
-
+extend 'Reaction::InterfaceModel::Action::DBIC::Result';
with 'Reaction::InterfaceModel::Action::DBIC::Role::CheckUniques';
+
sub BUILD {
my ($self) = @_;
my $tm = $self->target_model;
my $tm_reader = $tm_attr->get_read_method;
$self->$writer($tm->$tm_reader) if defined($tm->$tm_reader);
}
-};
+}
+
sub do_apply {
my $self = shift;
my $args = $self->parameter_hashref;
}
$model->update;
return $model;
-};
+}
__PACKAGE__->meta->make_immutable;
-
1;
+__END__;
+
=head1 NAME
Reaction::InterfaceModel::Action::DBIC::Result::Update
=head1 DESCRIPTION
-=head2 target_model
-
-=head2 error_for_attribute
+Update the target model and sync the Action's parameter attributes to
+the target model.
-=head2 sync_all
+C<Update> is a subclass of
+L<Action::DBIC::Result|Reaction::InterfaceModel::Action::DBIC::Result> that cponsumes
+L<Role::CheckUniques|'Reaction::InterfaceModel::Action::DBIC::Role::CheckUniques>
=head2 BUILD
+Sync the values from the target model's parameter attributes to the action's
+parameter attributes
+
+=head2 do_apply
+
+Sync the target model's parameter attributes to the values returned by
+C<parameter_hashref>, call C<update> and return the C<target_model>.
+
+=head1 SEE ALSO
+
+L<Create|Reaction::InterfaceModel::Action::DBIC::ResultSet::Create>,
+L<DeleteAll|Reaction::InterfaceModel::Action::DBIC::ResultSet::DeleteAll>,
+L<Delete|Reaction::InterfaceModel::Action::DBIC::Result::Delete>,
+
=head1 AUTHORS
See L<Reaction::Class> for authors.
__PACKAGE__->meta->make_immutable;
-
1;
+__END__;
+
=head1 NAME
Reaction::InterfaceModel::Action::DBIC::ResultSet::Create
=head1 DESCRIPTION
-=head2 target_model
+Create a new object.
+
+C<Update> is a subclass of
+L<Action::DBIC::ResultSet|Reaction::InterfaceModel::Action::DBIC::ResultSet>
+that cponsumes L<Role::CheckUniques|'Reaction::InterfaceModel::Action::DBIC::Role::CheckUniques>
+
+=head2 do_apply
+
+Create a C<new_result> for the C<target_model>, sync it to the action's
+C<parameter_attributes> and C<insert> it into the database. Returns the newly
+inserted object
-=head2 error_for_attribute
+=head1 SEE ALSO
-=head2 sync_all
+L<DeleteAll|Reaction::InterfaceModel::Action::DBIC::ResultSet::DeleteAll>,
+L<Update|Reaction::InterfaceModel::Action::DBIC::Result::Update>,
+L<Delete|Reaction::InterfaceModel::Action::DBIC::Result::Delete>,
=head1 AUTHORS
use Reaction::InterfaceModel::Action;
use namespace::clean -except => [ qw(meta) ];
-extends 'Reaction::InterfaceModel::Action';
+extends 'Reaction::InterfaceModel::Action::DBIC::ResultSet';
+with 'Reaction::InterfaceModel::Action::Role::SimpleMethodCall';
-
-
-has '+target_model' => (isa => ResultSet);
-
-sub can_apply { 1 }
-sub do_apply {
- my $self = shift;
- return $self->target_model->delete_all;
-};
+sub _target_model_method { 'delete_all' }
__PACKAGE__->meta->make_immutable;
-
1;
+__END__;
=head1 NAME
=head1 DESCRIPTION
-Deletes every item in the target_model ResultSet
+C<DeleteAll> is a subclass of
+L<Action::DBIC::ResultSet|Reaction::InterfaceModel::Action::DBIC::ResultSet> using
+L<Role::SimpleMethodCall|'Reaction::InterfaceModel::Action::Role::SimpleMethodCall>
+to call the C<target_model>'s C<delete_all> method, deleting every item in the
+resultset.
+
+=head1 METHODS
+
+=head2 _target_model_method
-=head2 target_model
+Returns 'delete_all'
-=head2 error_for_attribute
+=head1 SEE ALSO
-=head2 sync_all
+L<Create|Reaction::InterfaceModel::Action::DBIC::ResultSet::Create>,
+L<Update|Reaction::InterfaceModel::Action::DBIC::Result::Update>,
+L<Delete|Reaction::InterfaceModel::Action::DBIC::Result::Delete>,
=head1 AUTHORS