3 |
# $Id$ |
# $Id$ |
4 |
# |
# |
5 |
# $Log$ |
# $Log$ |
6 |
|
# Revision 1.22 2002/12/18 22:28:16 jonen |
7 |
|
# + added extended logging at 'getObjectByGuid()' |
8 |
|
# |
9 |
# Revision 1.21 2002/12/16 22:20:49 jonen |
# Revision 1.21 2002/12/16 22:20:49 jonen |
10 |
# + fixed bug at 'getObjectByGuid()' |
# + fixed bug at 'getObjectByGuid()' |
11 |
# |
# |
566 |
|
|
567 |
# Guid and Classname is needed |
# Guid and Classname is needed |
568 |
if(!$guid || !$options->{classname}) { |
if(!$guid || !$options->{classname}) { |
569 |
|
$logger->error( __PACKAGE__ . "->getObjectByGuid: No 'guid' OR no Classname in options hash was given but needed!" ); |
570 |
return; |
return; |
571 |
} |
} |
572 |
|
|
579 |
my @result = $self->{_COREHANDLE}->select($obj_tmp, $obj_tmp->{guid} eq $guid); |
my @result = $self->{_COREHANDLE}->select($obj_tmp, $obj_tmp->{guid} eq $guid); |
580 |
|
|
581 |
# we searched for global unique identifer of some object, |
# we searched for global unique identifer of some object, |
582 |
# so it think we can trust there would be only one result |
# so I think we can trust there would be only one result |
583 |
if($result[0]) { |
if($result[0]) { |
584 |
return $result[0]; |
return $result[0]; |
585 |
} else { |
} else { |
586 |
return "No Object with Classname $options->{classname} and GUID $options->{guid} found!"; |
$logger->error( __PACKAGE__ . "->getObjectByGuid: No Object with Classname $options->{classname} and GUID $guid found!" ); |
587 |
|
return; |
588 |
} |
} |
589 |
|
|
590 |
} |
} |