-
- /**
- * Overrides the AbstractModule.set(),
- * All dependent ContentEntities are set unproduced.
- * @param theValues Hash mit Spalte/Wert-Paaren
- * @return Id des eingefügten Objekts
- * @exception ModuleException
- */
- public String set (HashMap theValues) throws ModuleException {
- try {
- Entity theEntity = theStorage.selectById((String)theValues.get("id"));
- if (theEntity == null){
- throw new ModuleException("Kein Objekt mit id in Datenbank id: " + theValues.get("id"));
- }
- theEntity.setValues(theValues);
- DatabaseContentToTopics db = DatabaseContentToTopics.getInstance();
- DatabaseContent dbc = DatabaseContent.getInstance();
- EntityList contentList = db.getContent((EntityTopics)theEntity);
- for (int i = 0; i < contentList.size(); i++){
- dbc.setUnproduced("id="+((EntityContent)contentList.elementAt(i)).getId());
- }
- theEntity.update();
- return theEntity.getId();
- } catch (StorageObjectException e){
- e.printStackTrace(System.err);
- throw new ModuleException(e.toString());
- }
- }