Package com.groupon.odo.proxylib.models

Examples of com.groupon.odo.proxylib.models.ServerGroup


                            "ORDER BY " + Constants.GENERIC_NAME
            );
            queryStatement.setInt(1, profileId);
            results = queryStatement.executeQuery();
            while (results.next()) {
                ServerGroup curServerGroup = new ServerGroup(results.getInt(Constants.GENERIC_ID),
                        results.getString(Constants.GENERIC_NAME),
                        results.getInt(Constants.GENERIC_PROFILE_ID));
                curServerGroup.setServers(tableServers(profileId, curServerGroup.getId()));
                serverGroups.add(curServerGroup);
            }
        } catch (SQLException e) {
            e.printStackTrace();
        } finally {
View Full Code Here


        PreparedStatement queryStatement = null;
        ResultSet results = null;


        if (id == 0) {
            return new ServerGroup(0, "Default", profileId);
        }


        try (Connection sqlConnection = sqlService.getConnection()) {
            queryStatement = sqlConnection.prepareStatement(
                    "SELECT * FROM " + Constants.DB_TABLE_SERVER_GROUPS +
                            " WHERE " + Constants.GENERIC_ID + " = ?"
            );
            queryStatement.setInt(1, id);
            results = queryStatement.executeQuery();
            if (results.next()) {
                ServerGroup curGroup = new ServerGroup(results.getInt(Constants.GENERIC_ID),
                        results.getString(Constants.GENERIC_NAME),
                        results.getInt(Constants.GENERIC_PROFILE_ID));
                return curGroup;
            }
            logger.info("Did not find the ID: {}", id);
View Full Code Here

        List<ServerGroup> serverGroups = ServerRedirectService.getInstance().tableServerGroups(profileId);

        if (search != null) {
            Iterator<ServerGroup> iterator = serverGroups.iterator();
            while (iterator.hasNext()) {
                ServerGroup serverGroup = iterator.next();
                if (!serverGroup.getName().toLowerCase().contains(search.toLowerCase())) {
                    iterator.remove();
                }
            }
        }
        HashMap<String, Object> returnJson = Utils.getJQGridJSON(serverGroups, "servergroups");
View Full Code Here

            profileId = ProfileService.getInstance().getIdFromName(profileIdentifier);
        }

        int clientId = ClientService.getInstance().findClient(clientUUID, profileId).getId();

        ServerGroup group = ServerRedirectService.getInstance().getServerGroup(id, profileId);
        ServerRedirectService.getInstance().deleteServerGroup(id);
        return ServerRedirectService.getInstance().tableServerGroups(clientId);
    }
View Full Code Here

TOP

Related Classes of com.groupon.odo.proxylib.models.ServerGroup

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.