class HibernateGenericDAO extends HibernatePersistentObjectDAO<Generic> implements GenericDAO {

	@Override
	public boolean delete(long genericId, int code) throws PersistenceException {
		assert (code != 0);

		if (!checkStoringAspect())
			return false;

		boolean result = true;
		Generic generic = findById(genericId);
		if (generic != null) {
			generic.setType(generic.getType() + "." + generic.getId());
			generic.setSubtype(generic.getSubtype() + "." + generic.getId());
			generic.setDeleted(code);
			saveOrUpdate(generic);
			flush();
		}

		return result;
	}

	public  HibernateGenericDAO();

}