import mir.entity.AbstractEntity;
import mir.log.LoggerWrapper;
-import mir.storage.StorageObjectFailure;
+import mir.storage.DatabaseFailure;
import mircoders.storage.DatabaseContentToMedia;
/**
* this class implements mapping of one line of the database table content
* to a java object
*
- * @version $Id: EntityContent.java,v 1.19.2.10 2005/02/10 16:22:32 rhindes Exp $
+ * @version $Id: EntityContent.java,v 1.19.2.11 2005/03/26 11:26:26 zapata Exp $
* @author mir-coders group
*
*/
/**
* set is_produced flag for the article
*/
- public void setProduced(boolean yesno) throws StorageObjectFailure
+ public void setProduced(boolean yesno) throws DatabaseFailure
{
String value = (yesno) ? "1":"0";
if (value.equals( getFieldValue("is_produced") )) return;
stmt = con.createStatement();
database.executeUpdate(stmt,sql);
}
- catch (StorageObjectFailure e) {
+ catch (DatabaseFailure e) {
throw e;
}
catch (SQLException e) {
- throw new StorageObjectFailure(e);
+ throw new DatabaseFailure(e);
}
finally {
database.freeConnection(con,stmt);
*
* @param anArticleId
* @param aMediaId
- * @throws StorageObjectFailure
+ * @throws DatabaseFailure
*/
- public void dettach(String anArticleId, String aMediaId) throws StorageObjectFailure
+ public void dettach(String anArticleId, String aMediaId) throws DatabaseFailure
{
if (aMediaId!=null){
DatabaseContentToMedia.getInstance().delete(anArticleId, aMediaId);
* Attaches media to the article
*/
- public void attach(String aMediaId) throws StorageObjectFailure
+ public void attach(String aMediaId) throws DatabaseFailure
{
if (aMediaId!=null) {
DatabaseContentToMedia.getInstance().addMedia(getId(),aMediaId);