projects
/
mir.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
7df39d0
)
deleting a comment now unchecks the is_produced flag of the article the comment
author
zapata
<zapata>
Tue, 24 Dec 2002 22:31:50 +0000
(22:31 +0000)
committer
zapata
<zapata>
Tue, 24 Dec 2002 22:31:50 +0000
(22:31 +0000)
belongs to
source/mircoders/module/ModuleComment.java
patch
|
blob
|
history
diff --git
a/source/mircoders/module/ModuleComment.java
b/source/mircoders/module/ModuleComment.java
index
4a483b1
..
2a2c280
100755
(executable)
--- a/
source/mircoders/module/ModuleComment.java
+++ b/
source/mircoders/module/ModuleComment.java
@@
-77,6
+77,19
@@
public class ModuleComment extends AbstractModule
}
}
}
}
+ public void deleteById (String anId) throws ModuleException {
+ try {
+ Entity theEntity = theStorage.selectById((String)anId);
+ if (theEntity != null)
+ DatabaseContent.getInstance().setUnproduced("id=" + theEntity.getValue("to_media"));
+
+ super.deleteById(anId);
+ }
+ catch (StorageObjectException e){
+ throw new ModuleException(e.toString());
+ }
+ }
+
/**
* setValues in the Entity and updates them on the StorageObject
*/
/**
* setValues in the Entity and updates them on the StorageObject
*/
@@
-84,7
+97,7
@@
public class ModuleComment extends AbstractModule
try {
Entity theEntity = theStorage.selectById((String)theValues.get("id"));
if (theEntity == null)
try {
Entity theEntity = theStorage.selectById((String)theValues.get("id"));
if (theEntity == null)
- throw new ModuleException("No Obje
kt with id in Database id:
" + theValues.get("id"));
+ throw new ModuleException("No Obje
ct in the database with id
" + theValues.get("id"));
DatabaseContent.getInstance().setUnproduced("id=" + theEntity.getValue("to_media"));
theEntity.setValues(theValues);
theEntity.update();
DatabaseContent.getInstance().setUnproduced("id=" + theEntity.getValue("to_media"));
theEntity.setValues(theValues);
theEntity.update();