/** * the UI cannot delete the entry. it will be marked as deleted. the push listener framework will * remove the entry. * * @param accountID String * @return int * @throws EntityException */ public int markUserAsDelete(long accountID) throws EntityException { int result = 0; try { MailServerAccount msa = cdao.getUserFromID(accountID); if (msa == null) { return 0; } msa.setStatus(RegistryEntryStatus.DELETED); msa.setLastUpdate(System.currentTimeMillis()); result = cdao.markUserAsDelete(msa); } catch (DBAccessException ee) { throw new EntityException("Error marking account as delete.", ee); } return result; }