[Bio] / Sprout / ERDBObject.pm Repository:
ViewVC logotype

Diff of /Sprout/ERDBObject.pm

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.3, Mon Jul 16 20:04:51 2007 UTC revision 1.4, Thu Dec 6 14:58:03 2007 UTC
# Line 25  Line 25 
25    
26  =head3 new  =head3 new
27    
28  C<< my $dbObject = ERDBObject::new($name1 => \@list1, $name2 => \@list2, ... $nameN => \@listN); >>      my $dbObject = ERDBObject::new($name1 => \@list1, $name2 => \@list2, ... $nameN => \@listN);
29    
30  Create a new transient object. A transient object maps fields to values, but is not  Create a new transient object. A transient object maps fields to values, but is not
31  associated with a database. The parameter list should be an entity name followed by  associated with a database. The parameter list should be an entity name followed by
# Line 59  Line 59 
59    
60  =head3 SetDB  =head3 SetDB
61    
62  C<< my  = $dbObject->SetDB($db, $target); >>      my  = $dbObject->SetDB($db, $target);
63    
64  Attach a database to this object. This method is useful if you have to create an  Attach a database to this object. This method is useful if you have to create an
65  object manually (using L</new>) but want to be able to use the database methods  object manually (using L</new>) but want to be able to use the database methods
# Line 93  Line 93 
93    
94  =head3 Attributes  =head3 Attributes
95    
96  C<< my @attrNames = $dbObject->Attributes(); >>      my @attrNames = $dbObject->Attributes();
97    
98  This method will return a sorted list of the attributes present in this object.  This method will return a sorted list of the attributes present in this object.
99  The list can be used in the L</Values> method to get all the values stored.  The list can be used in the L</Values> method to get all the values stored.
# Line 117  Line 117 
117    
118  =head3 HasField  =head3 HasField
119    
120  C<< my $flag = $dbObject->HasField($fieldSpec); >>      my $flag = $dbObject->HasField($fieldSpec);
121    
122  Return TRUE if this object has the specified field available, else FALSE.  Return TRUE if this object has the specified field available, else FALSE.
123  This method can be used to determine if a value is available without  This method can be used to determine if a value is available without
# Line 149  Line 149 
149    
150  =head3 AddValues  =head3 AddValues
151    
152  C<< $dbObject->AddValues($name, @values); >>      $dbObject->AddValues($name, @values);
153    
154  Add one or more values to a specified field.  Add one or more values to a specified field.
155    
# Line 179  Line 179 
179    
180  =head3 PrimaryValue  =head3 PrimaryValue
181    
182  C<< my $value = $dbObject->PrimaryValue($name); >>      my $value = $dbObject->PrimaryValue($name);
183    
184  Return the primary value of a field. This will be its first value in a standard value list.  Return the primary value of a field. This will be its first value in a standard value list.
185    
# Line 218  Line 218 
218    
219  =head3 Value  =head3 Value
220    
221  C<< my @values = $dbObject->Value($attributeName); >>      my @values = $dbObject->Value($attributeName);
222    
223  Return a list of the values for the specified attribute.  Return a list of the values for the specified attribute.
224    
# Line 288  Line 288 
288    
289  =head3 Values  =head3 Values
290    
291  C<< my @values = $dbObject->Values(\@attributeNames); >>      my @values = $dbObject->Values(\@attributeNames);
292    
293  This method returns a list of all the values for a list of field specifiers. Essentially, it calls  This method returns a list of all the values for a list of field specifiers. Essentially, it calls
294  the L</Value> method for each element in the parameter list and returns a flattened list of all  the L</Value> method for each element in the parameter list and returns a flattened list of all
# Line 298  Line 298 
298  The following call will put the feature links in C<$link1> and C<$link2> and the translation in  The following call will put the feature links in C<$link1> and C<$link2> and the translation in
299  C<$translation>.  C<$translation>.
300    
301  C<< my ($link1, $link2, $translation) = $feature->Values(['Feature(link)', 'Feature(translation)']); >>      my ($link1, $link2, $translation) = $feature->Values(['Feature(link)', 'Feature(translation)']);
302    
303  =over 4  =over 4
304    
# Line 329  Line 329 
329    
330  =head3 Cross  =head3 Cross
331    
332  C<< my $query = $dbObject->Cross($relationshipName, $filterClause, $param1, $param2, ... $paramN); >>      my $query = $dbObject->Cross($relationshipName, $filterClause, $param1, $param2, ... $paramN);
333    
334  Return a query object for instances related to this one via a specified relationship.  Return a query object for instances related to this one via a specified relationship.
335    
# Line 422  Line 422 
422    
423  =head3 IsNew  =head3 IsNew
424    
425  C<< my $boolean = $dbObject->IsNew(); >>      my $boolean = $dbObject->IsNew();
426    
427  Return TRUE if this is a new object inserted into the database, or FALSE if it was loaded from  Return TRUE if this is a new object inserted into the database, or FALSE if it was loaded from
428  the input data files.  the input data files.

Legend:
Removed from v.1.3  
changed lines
  Added in v.1.4

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3