コード例 #1
0
ファイル: GameInterfaceParams.java プロジェクト: s-Heart/Sdk
	/**
	 * 获取游戏接口参数
	 * @param rs ResultSet
	 * @return
	 */
	protected static wh.game.model.GameInterfaceParams getModel(ResultSet rs) throws SQLException{
		wh.game.model.GameInterfaceParams m = null;
		if (rs != null)
        {
            m = new wh.game.model.GameInterfaceParams();
			try{
				m.setGameInterfaceParamsId(rs.getInt("GameInterfaceParamsId"));
				wh.game.model.GameInterface gameInterface = new wh.game.model.GameInterface();
				gameInterface.setGameInterfaceId(rs.getInt("GameInterface_GameInterfaceId"));
				gameInterface.setGame(new wh.game.model.Game());
				gameInterface.getGame().setGameId(rs.getInt("GameInterface_GameId"));
				gameInterface.setName(rs.getString("GameInterface_Name"));
				gameInterface.setUrl(rs.getString("GameInterface_Url"));
				gameInterface.setInterfaceType(rs.getByte("GameInterface_InterfaceType"));
				gameInterface.setPayUnitType(rs.getByte("GameInterface_PayUnitType"));
				gameInterface.setCreateDate(rs.getTimestamp("GameInterface_CreateDate"));
				gameInterface.setStatus(rs.getByte("GameInterface_Status"));
				gameInterface.setSignJoinSymbol(rs.getString("GameInterface_SignJoinSymbol"));
				m.setGameInterface(gameInterface);
				
				wh.game.model.Game game = new wh.game.model.Game();
				game.setGameId(rs.getInt("Game_GameId"));
				game.setProvider(new wh.game.model.Provider());
				game.getProvider().setProviderId(rs.getInt("Game_ProviderId"));
				game.setManager(new wh.member.model.Manager());
				game.getManager().setManagerId(rs.getInt("Game_ManagerId"));
				game.setGameCategory(new wh.game.model.GameCategory());
				game.getGameCategory().setGameCategoryId(rs.getInt("Game_GameCategoryId"));
				game.setGameName(rs.getString("Game_GameName"));
				game.setPosterPath(rs.getString("Game_PosterPath"));
				game.setCreateDate(rs.getTimestamp("Game_CreateDate"));
				game.setGameType(rs.getByte("Game_GameType"));
				game.setEnableType(rs.getByte("Game_EnableType"));
				game.setStatus(rs.getByte("Game_Status"));
				game.setGameMoneyType(rs.getByte("Game_GameMoneyType"));
				game.setGameMoneyRate(rs.getInt("Game_GameMoneyRate"));
				game.setContent(rs.getString("Game_Content"));
				game.setRecommendType(rs.getByte("Game_RecommendType"));
				game.setHomeUrl(rs.getString("Game_HomeUrl"));
				game.setCPosterPath(rs.getString("Game_CPosterPath"));
				game.setSPosterPath(rs.getString("Game_SPosterPath"));
				game.setLPosterPath(rs.getString("Game_LPosterPath"));
				m.setGame(game);
				
				m.setParamName(rs.getString("ParamName"));
				m.setParamValue(rs.getString("ParamValue"));
				m.setParamExplain(rs.getString("ParamExplain"));
				m.setSignType(rs.getByte("SignType"));
				m.setSignIndex(rs.getByte("SignIndex"));
				m.setParamType(rs.getByte("ParamType"));
				m.setParamInType(rs.getByte("ParamInType"));
				m.setParamOutType(rs.getByte("ParamOutType"));
				m.setSignFormatValue(rs.getString("SignFormatValue"));
			}catch (SQLException e) {
				throw new SQLException(e.getMessage(),e);
			}
        }
        return m;
	}