package Reaction::InterfaceModel::Collection;
-use Reaction::InterfaceModel::ObjectClass;
+use Reaction::Class;
use Scalar::Util qw/refaddr blessed/;
+use aliased 'Reaction::Meta::InterfaceModel::Object::DomainModelAttribute';
# WARNING - DANGER: this is just an RFC, please DO NOT USE YET
-class Collection, which {
+class Collection is "Reaction::InterfaceModel::Object", which {
# consider supporting slice, first, iterator, last etc.
# pager functionality should probably be a role
# THEM CORRECT, OR FINAL. JUST A ROUGH DRAFT.
#domain_models are 'ro' unless otherwise specified
- domain_model _collection_store => (is => 'rw', isa => 'ArrayRef',
- lazy_build => 1, clearer => "_clear_collection_store");
+ has _collection_store => (
+ is => 'rw',
+ isa => 'ArrayRef',
+ lazy_build => 1,
+ clearer => "_clear_collection_store",
+ metaclass => DomainModelAttribute,
+ );
- implements _build_collection_store => as { [] };
+ has 'member_type' => (is => 'ro', isa => 'ClassName');
+
+ implements _build__collection_store => as { [] };
implements members => as {
my $self = shift;
=head1 NAME
Reaction::InterfaceModel::Collection - Generic collections of
-C<Reaction::InterfaceModel::Object>s
+L<Reaction::InterfaceModel::Object>s
=head1 DESCRIPTION
=head1 PRIVATE METHODS
-_build_collection_store
+_build__collection_store
Builder method for attribute_collection_store, returns an empty arrayref