4 package CXGN
::People
::UserMapData
;
7 use CXGN
::DB
::ModifiableI
;
9 use base qw
| CXGN
::Class
::DBI CXGN
::DB
::Object CXGN
::DB
::ModifiableI
|;
19 marker_name, user_map_id, protocol, marker_id,
20 linkage_group, position, confidence, sp_person_id,
21 obsolete, modified_date, create_date
23 sgn_people.user_map_data
32 UPDATE sgn_people.user_map_data SET
50 INSERT INTO sgn_people.user_map_data
51 (marker_name, user_map_id, protocol, marker_id,
52 linkage_group, position, confidence, sp_person_id,
53 modified_date, create_date, obsolete)
62 " SELECT currval('sgn_people.user_map_user_map_id_seq') ",
68 sgn_people.user_map_date
78 while(my($k,$v) = each %q){
79 __PACKAGE__
->set_sql($k,$v);
86 my $self = CXGN
::DB
::Object
->new();
88 $self->set_user_map_id($map_id);
95 my $sth= $self->get_sql('fetch');
96 $sth->execute($self->get_user_map_data_id());
97 my ($marker_name, $user_map_id, $protocol, $marker_id, $linkage_group, $position, $confidence, $sp_person_id, $obsolete, $modified_date, $create_date) = $sth->fetchrow_array();
98 $self->set_marker_name($marker_name);
99 $self->set_user_map_id($user_map_id);
100 $self->set_protocol($protocol);
101 $self->set_marker_id($marker_id);
102 $self->set_linkage_group($linkage_group);
103 $self->set_position($position);
104 $self->set_confidence($confidence);
105 $self->set_sp_person_id($sp_person_id);
106 $self->set_obsolete($obsolete);
107 $self->set_modification_date($modified_date);
108 $self->set_create_date($create_date);
124 if ($self->get_user_map_data_id()) {
126 my $sth = $self->get_sql('update');
128 $self->get_marker_name(),
129 $self->get_user_map_id(),
130 $self->get_protocol(),
131 $self->get_marker_id(),
132 $self->get_linkage_group(),
133 $self->get_position(),
134 $self->get_confidence(),
135 $self->get_sp_person_id(),
136 $self->get_obsolete(),
137 $self->get_user_map_data_id()
139 return $self->get_user_map_data_id();
142 print STDERR
"MARKER ID: ".$self->get_marker_id()."\n";
144 my $sth = $self->get_sql("insert");
146 $self->get_marker_name(),
147 $self->get_user_map_id(),
148 $self->get_protocol(),
149 $self->get_marker_id(),
150 $self->get_linkage_group(),
151 $self->get_position(),
152 $self->get_confidence(),
153 $self->get_sp_person_id(),
157 my $user_map_data_id = $self->get_sql("currval");
159 # my $dbh = $self->DBH();
160 # my ($user_map_data_id) = $dbh->get_currval("sgn_people.user_map_data_user_map_data_id_seq");
161 $self->set_user_map_data_id($user_map_data_id);
162 return $user_map_data_id;
166 =head2 get_user_map_data_id
177 sub get_user_map_data_id
{
179 return $self->{user_map_data_id
};
183 =head2 set_user_map_data_id
194 sub set_user_map_data_id
{
196 $self->{user_map_data_id
}=shift;
200 =head2 accessors set_user_map_id, get_user_map_id
211 sub get_user_map_id
{
213 return $self->{user_map_id
};
216 sub set_user_map_id
{
218 $self->{user_map_id
}=shift;
221 =head2 accessors set_marker_name, get_marker_name
232 sub get_marker_name
{
234 return $self->{marker_name
};
237 sub set_marker_name
{
239 $self->{marker_name
}=shift;
242 =head2 accessors set_marker_id, get_marker_id
255 if (!exists($self->{marker_id
}) || !($self->{marker_id
})) {
256 $self->{marker_id
}=undef;
258 return $self->{marker_id
};
263 $self->{marker_id
}=shift;
266 =head2 accessors set_linkage_group, get_linkage_group
277 sub get_linkage_group
{
279 return $self->{linkage_group
};
282 sub set_linkage_group
{
284 $self->{linkage_group
}=shift;
287 =head2 accessors set_position, get_position
300 return $self->{position
};
305 $self->{position
}=shift;
321 return $self->{protocol
};
338 $self->{protocol
}=shift;
342 =head2 get_confidence
355 return $self->{confidence
};
359 =head2 set_confidence
372 $self->{confidence
}=shift;
378 Desc: Deletes an entry in the user_map_data table. Note
379 that deleting entire maps is dealt with from the
380 UserMap object, not here.
390 my $sth = $self->get_sql('delete');
391 $sth->execute($self->get_user_map_data_id());