Ignore:
Timestamp:
04/25/09 09:04:34 (15 years ago)
Author:
nanardon
Message:
  • dont provide mandatory function anymore
File:
1 edited

Legend:

Unmodified
Added
Removed
  • LATMOS-Accounts/lib/LATMOS/Accounts/Bases/Objects.pm

    r28 r42  
    2626List object supported by this module existing in base $base 
    2727 
    28 =cut 
    29  
    30 sub list { 
    31     my ($class) = @_; 
    32     return; 
    33 } 
     28Must be provide by object class 
     29 
     30    sub list { 
     31        my ($class) = @_; 
     32    } 
     33 
     34=cut 
    3435 
    3536=head2 new($base, $id) 
     
    6465} 
    6566 
     67=head2 _create($class, $base, $id, %data) 
     68 
     69Must create a new object in database. 
     70 
     71Is called if underling base does not override create_object 
     72 
     73    sub _create( 
     74        my ($class, $base, $id, %data) 
     75    } 
     76 
     77=cut 
     78 
    6679=head2 type 
    6780 
     
    8598} 
    8699 
     100=head2 list_canonical_fields 
     101 
     102Object shortcut to get the list of field supported by the object. 
     103 
     104=cut 
     105 
     106sub list_canonical_fields { 
     107    my ($self) = @_; 
     108    $self->base->list_canonical_fields($self->type); 
     109} 
     110 
    87111=head2 _canonical_fields 
    88112 
     
    90114 
    91115Notice this query will always come from the upstream data base, 
    92 this function is just a ficility to store data in the module, but the 
     116this function is just a facility to store data in the module, but the 
    93117underling database can reply themself. 
    94118 
     119Is call if underling base doesn't override list_canonical_fields() 
     120 
    95121See list_canonical_fields(). 
    96122 
    97 =cut 
    98  
    99 sub _canonical_fields {  
    100     my ($self) = @_; 
    101     return; 
    102 } 
     123    sub _canonical_fields {  
     124        my ($self) = @_; 
     125    } 
     126 
     127=cut 
    103128 
    104129=head2 _get_fields_name($field) 
     
    106131Return the fields name for canonical field $field 
    107132 
    108 =cut 
    109  
    110 sub _get_field_name { 
    111     my ($self, $field) = @_; 
    112     return; 
    113 } 
     133    sub _get_field_name { 
     134        my ($self, $field) = @_; 
     135    } 
     136 
     137=cut 
    114138 
    115139=head2 get_field($field) 
     
    117141Return the value for $field, must be provide by data base. 
    118142 
    119 =cut 
    120  
    121 sub get_field { return } 
     143    sub get_field { 
     144        my ($self, $field) 
     145    } 
     146 
     147=cut 
    122148 
    123149=head2 get_c_fields($cfield) 
    124150 
    125 Return the value for canonical field $cfield 
     151Return the value for canonical field $cfield. 
     152 
     153Call driver specific get_field_name() and get_field() 
    126154 
    127155=cut 
     
    137165Set values for this object. %data is a list or peer field => values. 
    138166 
    139 =cut 
    140  
    141 sub set_fields { 
    142     return; 
    143 } 
    144  
    145 =head2 set_fields(%data) 
     167    sub set_fields { 
     168        my ($self, %data) = @_; 
     169    } 
     170 
     171=cut 
     172 
     173=head2 set_c_fields(%data) 
    146174 
    147175Set values for this object. %data is a list or peer  
     
    194222at your option, any later version of Perl 5 you may have available. 
    195223 
    196  
    197 =cut 
     224=cut 
Note: See TracChangeset for help on using the changeset viewer.