Examples of CharacterInfo


Examples of lv.odylab.evemanage.domain.user.CharacterInfo

            Long userID = Long.valueOf(req.getParameter("userID"));
            Long blueprintID = Long.valueOf(req.getParameter("blueprintID"));
            Long characterID = req.getParameter("characterID") == null ? null : Long.valueOf(req.getParameter("characterID"));
            Blueprint blueprint = blueprintDao.get(blueprintID, new Key<User>(User.class, userID));
            if (characterID != null) {
                CharacterInfo characterInfo = new CharacterInfo();
                characterInfo.setCharacterID(characterID);
                characterInfo.setName(req.getParameter("characterName"));
                String corporationID = req.getParameter("corporationID");
                characterInfo.setCorporationID(corporationID == null ? null : Long.valueOf(corporationID));
                characterInfo.setCorporationName(req.getParameter("corporationName"));
                characterInfo.setCorporationTicker(req.getParameter("corporationTicker"));
                String allianceID = req.getParameter("allianceID");
                characterInfo.setAllianceID(allianceID == null ? null : Long.valueOf(allianceID));
                characterInfo.setAllianceName(req.getParameter("allianceName"));
                blueprint.setAttachedCharacterInfo(characterInfo);
            } else {
                blueprint.setAttachedCharacterInfo(null);
            }
            blueprintDao.putWithoutChecks(blueprint);
View Full Code Here

Examples of lv.odylab.evemanage.domain.user.CharacterInfo

    protected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
        try {
            Long blueprintID = Long.valueOf(req.getParameter("blueprintID"));
            logger.debug("Checking blueprint for consistency: {}", blueprintID);
            Blueprint blueprint = blueprintDao.get(new Key<Blueprint>(Blueprint.class, blueprintID));
            CharacterInfo attachedCharacterInfo = blueprint.getAttachedCharacterInfo();
            if (attachedCharacterInfo == null) {
                logger.debug("Blueprint does not have attached character, skipping");
                return;
            }
            try {
                Character character = characterDao.get(new Key<Character>(Character.class, attachedCharacterInfo.getId()));
                logger.debug("Updating blueprint attached character information: {} ({})", character.getName(), character.getCharacterID());
                attachedCharacterInfo.setCharacterID(character.getCharacterID());
                attachedCharacterInfo.setName(character.getName());
                attachedCharacterInfo.setCorporationID(character.getCorporationID());
                attachedCharacterInfo.setCorporationName(character.getCorporationName());
                attachedCharacterInfo.setCorporationTicker(character.getCorporationTicker());
                attachedCharacterInfo.setAllianceID(character.getAllianceID());
                attachedCharacterInfo.setAllianceName(character.getAllianceName());
            } catch (NotFoundException e) {
                logger.warn("Attached character does not exist: {}", attachedCharacterInfo.getId());
                blueprint.setAttachedCharacterInfo(null);
            }
            blueprint.setUpdatedDate(new Date());
            blueprintDao.putWithoutChecks(blueprint);
        } catch (Throwable t) {
View Full Code Here

Examples of lv.odylab.evemanage.domain.user.CharacterInfo

    protected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
        try {
            Long priceSetID = Long.valueOf(req.getParameter("priceSetID"));
            logger.debug("Checking price set for consistency: {}", priceSetID);
            PriceSet priceSet = priceSetDao.get(new Key<PriceSet>(PriceSet.class, priceSetID));
            CharacterInfo attachedCharacterInfo = priceSet.getAttachedCharacterInfo();
            if (attachedCharacterInfo == null) {
                logger.debug("Price set does not have attached character, skipping");
                return;
            }
            try {
                Character character = characterDao.get(new Key<Character>(Character.class, attachedCharacterInfo.getId()));
                logger.debug("Updating price set attached character information: {} ({})", character.getName(), character.getCharacterID());
                attachedCharacterInfo.setCharacterID(character.getCharacterID());
                attachedCharacterInfo.setName(character.getName());
                attachedCharacterInfo.setCorporationID(character.getCorporationID());
                attachedCharacterInfo.setCorporationName(character.getCorporationName());
                attachedCharacterInfo.setCorporationTicker(character.getCorporationTicker());
                attachedCharacterInfo.setAllianceID(character.getAllianceID());
                attachedCharacterInfo.setAllianceName(character.getAllianceName());
            } catch (NotFoundException e) {
                logger.warn("Attached character does not exist: {}", attachedCharacterInfo.getId());
                priceSet.setAttachedCharacterInfo(null);
            }
            priceSetDao.putWithoutChecks(priceSet);
        } catch (Throwable t) {
            logger.error("Caught Throwable", t);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.