Moose overrides for purge, purgeRevision, and purgeCache.

This commit is contained in:
Colin Kuskie 2010-04-07 16:43:16 -07:00
parent 7ba89245fa
commit 616d5cc866
36 changed files with 139 additions and 192 deletions

View file

@ -1752,7 +1752,7 @@ Extent the method from the super class to delete all storage locations.
=cut
sub purge {
override purge => sub {
my $self = shift;
my $sth = $self->session->db->read("select storageId from Event where assetId=?",[$self->getId]);
while (my ($storageId) = $sth->array) {
@ -1760,8 +1760,8 @@ sub purge {
$storage->delete if defined $storage;
}
$sth->finish;
return $self->SUPER::purge;
}
return super();
};
#-------------------------------------------------------------------
@ -1771,11 +1771,11 @@ Extent the method from the super class to delete the storage location for this r
=cut
sub purgeRevision {
override purgeRevision => sub {
my $self = shift;
$self->getStorageLocation->delete;
return $self->SUPER::purgeRevision;
}
return super();
};
####################################################################