@Test public void isNotExistByIpAndPort() throws Exception { boolean boolen = serverDao.isNotExistByIpAndPort(server); System.out.println("isNotExistByIpAndPort :-------> " + boolen); Assert.assertTrue(boolen == false); }
public boolean isNotExistByIpAndPort(Server server) throws SQLException { String sql = "select count(1) from server where ip = '" + server.getIp() + "' and port = " + server.getPort(); return this.getCount(sql) <= 0; }
ServerDao extends BaseDao { public boolean isNotExistByIpAndPort(Server server) throws SQLException { String sql = "select count(1) from server where ip = '" + server.getIp() + "' and port = " + server.getPort(); return this.getCount(sql) <= 0; } }
ServerDao extends BaseDao { public boolean isNotExistByIpAndPort(Server server) throws SQLException { String sql = "select count(1) from server where ip = '" + server.getIp() + "' and port = " + server.getPort(); return this.getCount(sql) <= 0; }  }
ServerDao extends BaseDao { public boolean isNotExistByIpAndPort(Server server) throws SQLException { String sql = "select count(1) from server where ip = '" + server.getIp() + "' and port = " + server.getPort(); return this.getCount(sql) <= 0; }  Server getServerById(Long id); Long insertServer(Server server); int updateServer(Server server); int deleteServer(Server server); int deleteServerAndServerConfigByServerId(Long serverId); boolean isNotExistByIpAndPort(Server server); int deleteServerByServerGroupId(Long serverGroupId); int changeServerGroup(long serverId, long serverGroupId); List<Server> getServersByServerGroupId(Long serverGroupId); Long getServerTotalCount(Paging<Server> paging); List<ServerView> findServerPageList(Paging<Server> paging); }
ServerDao extends BaseDao { public boolean isNotExistByIpAndPort(Server server) throws SQLException { String sql = "select count(1) from server where ip = '" + server.getIp() + "' and port = " + server.getPort(); return this.getCount(sql) <= 0; }  Server getServerById(Long id); Long insertServer(Server server); int updateServer(Server server); int deleteServer(Server server); int deleteServerAndServerConfigByServerId(Long serverId); boolean isNotExistByIpAndPort(Server server); int deleteServerByServerGroupId(Long serverGroupId); int changeServerGroup(long serverId, long serverGroupId); List<Server> getServersByServerGroupId(Long serverGroupId); Long getServerTotalCount(Paging<Server> paging); List<ServerView> findServerPageList(Paging<Server> paging);  }