DESCRIPTION
METHODS
prf_get_default
prf_set_default
setup_owner_type
get_owner_type
prf_defaults
with_fields
Searches the objecs with fields that match. Pass it a hash of name => value pairs and it will return a resultset of all the owners that match all the requirements. If you want to use ilikes, you can, just like regular DBIC searches. It will figure out the hard relationship stuff for you.
my $rs = Owner->with_fields({
'simple_test' => 'test',
'second_test' => { -ilike => 'test2' },
});
validate_extra_parameters
validate_extra_parameter
join_by_name
Returns a resultset joined to the preferences with the name specified.
$rs->join_by_name('test');
select_extra_fields
Returns a resultset joined to the preferences with the names specified. Similar to join_by_name but it makes multiple joins for each name.
It returns the new resultset and a list of the field -> aliases so that you can then do whatever you want with them.
my $info = $rs->select_extra_fields('test', 'test2');
my $new_rs = $info->{rs};
my $aliases = $info->{aliases};
prefetch_extra_fields
Select the extra fields when searching the resultset. It select's them as extra_$fieldname
. These values are accessible via get_column
It returns a hashref like select_extra_fields with rs and an alias map.
my $info = $rs->prefetch_extra_fields('field1', 'field2');
my $new_rs = $info->{rs};
my @all = $new_rs->all;
my $field1 = $all[0]->get_column('extra_field1');
prf_preferences
Returns a resultset of all the preferences relating to this type of PrfOwner.
ATTRIBUTES
LICENSE AND COPYRIGHT
Copyright 2012 OpusVL.
This software is licensed according to the "IP Assignment Schedule" provided with the development project.