MigrationClusterDao extends AbstractXpipeConsoleDAO { public void updatePublishInfoById(long id, String publishInfo){ MigrationClusterTbl migrationClusterTbl = new MigrationClusterTbl(); migrationClusterTbl.setId(id); migrationClusterTbl.setPublishInfo(publishInfo); queryHandler.handleUpdate(new DalQuery<Integer>() { @Override public Integer doQuery() throws DalException { return migrationClusterTblDao.updatePublishInfoById(migrationClusterTbl, MigrationClusterTblEntity.UPDATESET_FULL); } }); }  @PostConstruct void postConstruct(); List<MigrationClusterTbl> find(long size, long offset); List<MigrationClusterTbl> findByCluster(long clusterId, long size, long offset); long countAllByCluster(long clusterId); List<MigrationClusterTbl> findUnfinishedByClusterId(final long clusterId); MigrationClusterTbl getById(long id); void insert(MigrationClusterTbl migrationCluster); void updateStartTime(long id, Date date); void updateStatusAndEndTimeById(long id, MigrationStatus status, Date endTime); void updatePublishInfoById(long id, String publishInfo); MigrationClusterTbl findByEventIdAndClusterId(final long eventId, final long clusterId); List<MigrationClusterTbl> findAllByClusterId(final long clusterId); MigrationClusterTbl findfindByPK(final long id);  }
@Test public void testUpdatePublishInfoById(){ long id = randomInsert(); String random = randomString(); migrationClusterDao.updatePublishInfoById(id, random); MigrationClusterTbl byId = migrationClusterDao.getById(id); Assert.assertEquals(random, byId.getPublishInfo()); }