NAME

GenOO::RegionCollection::Factory::DB - Factory for creating GenOO::RegionCollection object from a database table

SYNOPSIS

# Creates GenOO::RegionCollection object from a database table 

# Preferably use it through the generic GenOO::RegionCollection::Factory
my $db_factory_implementation = GenOO::RegionCollection::Factory->new('DB',
    {
        driver      => undef,
        host        => undef,
        database    => undef,
        table       => undef,
        record_type => undef,
        user        => undef,
        password    => undef,
        port        => undef,
    }
);

DESCRIPTION

An instance of this class is a concrete factory for a GenOO::RegionCollection
object. It offers the method "read_collection" (as the consumed role requires)
which returns the actual GenOO::RegionCollection object in the form of 
GenOO::RegionCollection::Type::DB. The latter is the implementation of the 
GenOO::RegionCollection class based on a database table.

EXAMPLES

# Create a concrete factory
my $factory_implementation = GenOO::RegionCollection::Factory->new('DB',
    {
        file => 'sample.sam'
    }
);

# Return the actual GenOO::RegionCollection object
my $collection = $factory_implementation->read_collection;
print ref($collection) # GenOO::RegionCollection::Type::DB