}
if (column || objectType == DbObject.TABLE_OR_VIEW || objectType == DbObject.USER || objectType == DbObject.INDEX
|| objectType == DbObject.CONSTRAINT) {
db.update(session, object);
} else {
Comment comment = db.findComment(object);
if (comment == null) {
if (text == null) {
// reset a non-existing comment - nothing to do
} else {
int id = getObjectId();
comment = new Comment(db, id, object);
comment.setCommentText(text);
db.addDatabaseObject(session, comment);
}
} else {
if (text == null) {
db.removeDatabaseObject(session, comment);
} else {
comment.setCommentText(text);
db.update(session, comment);
}
}
}
return 0;