Package networking.request

Source Code of networking.request.RequestShopListAnimal

package networking.request;

import dataAccessLayer.ShopDAO;

import java.io.IOException;
import java.util.List;

import model.AnimalType;

import networking.response.ResponseShopListAnimal;

/**
*
* @author Xuyuan
*/
public class RequestShopListAnimal extends GameRequest {

    // Responses
    private ResponseShopListAnimal responseShopListAnimal;

    public RequestShopListAnimal() {
        responses.add(responseShopListAnimal = new ResponseShopListAnimal());
    }

    @Override
    public void parse() throws IOException {
        //Do Nothing here.
    }

    @Override
    public void doBusiness() throws Exception {
        List<AnimalType> animalList = ShopDAO.getAnimalsUpToLevel(client.getAvatar().getLevel());
        responseShopListAnimal.setAllAnimalType(animalList);
    }
}
TOP

Related Classes of networking.request.RequestShopListAnimal

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.