- COMMON ENTITY INTERFACE
- ADDED CLASS / INSTANCE METHODS
- LICENSE AND COPYRIGHT
- SEE ALSO
Myco::Query::Part::Filter - a Myco entity class
use Myco; # Constructors. See Myco::Base::Entity for more. my $obj = Myco::Query::Part::Filter->new; # Accessors. my $value = $obj->get_fooattrib; $obj->set_fooattrib($value); $obj->save; $obj->destroy;
Blah blah blah... Blah blah blah... Blah blah blah... Blah blah blah blah blah... Blah blah...
Constructor, accessors, and other methods -- as inherited from Myco::Base::Entity.
Attributes may be initially set during object construction (with
new()) but otherwise are accessed solely through accessor methods. Typical usage:
Set attribute value
Check functions (see Class::Tangram) perform data validation. If there is any concern that the set method might be called with invalid data then the call should be wrapped in an
evalblock to catch exceptions that would result.
Get attribute value
$value = $obj->get_attribute;
A listing of available attributes follows:
An array of the parts of the query filter. These parts consist of clauses and (potentially) other filter objects.
type: transient - boolean (1 | 0)
A boolean attribute that determines if a Filter is 'relevant', i.e. whether its inclusion in a query should be by default even if none of the params relevant to it were passed at query-run-time. On its own, this attribute is useless. To dynamically determine if a filter is relevant just prior to query-run-time, use $filter->is_relevant( %query_run_params ).
$query_filter->add_part( $query_part );
Pushes a Myco::Query::Part object onto the end of the parts array.
$query_filter->remove_part( $query_part );
Deletes a Myco::Query::Part object from the parts array. Accpets and object reference or an object ID.
my $filter_string = $query_filter->get_combined_parts;
Returns all the filter parts into a string.
my $is_relevant = $query_filter->is_relevant( \%query_run_time_params );
Calculates whether this filter is relevant to its containing query - i.e. its clauses having to do with 'remote' object comparison will be ignored if their attendant paramters were not passed to run_query.
Copyright (c) 2004 the myco project. All rights reserved. This software is free software; you can redistribute it and/or modify it under the same terms as Perl itself.