zoukankan      html  css  js  c++  java
  • 毕业设计-1.08

    情况概述:

      完成了天气的Bean类设计,Dao层

    代码:

      WeatherBean

    package com.zlc.entity;
    
    /**
     * @author Zhao Lucang
     * @version 创建时间:2021年1月08日 下午3:55:37 类说明
     */
    public class WeatherBean {
        // 变量*******************
        private int ID;
        private String Province;
        private String City;
        private int Date;
        private String Week;
        private int MinD;
        private int MaxD;
        private String Weather;
        private String WindDirection;
        private String WindForce;
    
        // 函数********
        public int getID() {
            return ID;
        }
    
        public void setID(int iD) {
            ID = iD;
        }
    
        public String getProvince() {
            return Province;
        }
    
        public void setProvince(String province) {
            Province = province;
        }
    
        public String getCity() {
            return City;
        }
    
        public void setCity(String city) {
            City = city;
        }
    
        public int getDate() {
            return Date;
        }
    
        public void setDate(int date) {
            Date = date;
        }
    
        public String getWeek() {
            return Week;
        }
    
        public void setWeek(String week) {
            Week = week;
        }
    
        public int getMinD() {
            return MinD;
        }
    
        public void setMinD(int minD) {
            MinD = minD;
        }
    
        public int getMaxD() {
            return MaxD;
        }
    
        public void setMaxD(int maxD) {
            MaxD = maxD;
        }
    
        public String getWeather() {
            return Weather;
        }
    
        public void setWeather(String weather) {
            Weather = weather;
        }
    
        public String getWindDirection() {
            return WindDirection;
        }
    
        public void setWindDirection(String windDirection) {
            WindDirection = windDirection;
        }
    
        public String getWindForce() {
            return WindForce;
        }
    
        public void setWindForce(String windForce) {
            WindForce = windForce;
        }
    
        // 构造函数
        public WeatherBean(int id, String province, String city, int date, String week, int mind, int maxd, String weather,
                String winddirection, String windforce) {
            super();
            this.ID = id;
            this.Province = province;
            this.City = city;
            this.Date = date;
            this.Week = week;
            this.MinD = mind;
            this.MaxD = maxd;
            this.Weather = weather;
            this.WindDirection = winddirection;
            this.WindForce = windforce;
    
        }
        
        // 空构造函数
        public WeatherBean() {
        
        }
    
    }

    IWeatherDao

    package com.zlc.dao;
    
    import java.util.List;
    
    import com.zlc.entity.WeatherBean;
    
    public interface IWeatherDao {
    
        // 查看此ID是否存在***************************
        public boolean isExist(int ID);
        
        // 根据ID查询***************************
        public WeatherBean queryWeatherByID(int ID);
        
        // 根据地点时间查询***************************
        public WeatherBean queryWeatherByCityDate(String City, int Date); 
        
        // 根据时间遍历***************************
        public List<WeatherBean> queryAllWeathersByDate(int Date);
    }
     

    并初步构建了框架结构

  • 相关阅读:
    数据库一直显示恢复中。。记录一则处理数据库异常的解决方法
    MSSQl分布式查询
    ASP.NET MVC中实现数据库填充的下拉列表 .
    理解浮点数的储存规则
    获取 "斐波那契数列" 的函数
    Int64 与 Currency
    学 Win32 汇编[33] 探讨 Win32 汇编的模块化编程
    学 Win32 汇编[34] 宏汇编(1)
    Delphi 中 "位" 的使用(2) 集合
    如何用弹出窗口显示进度 回复 "嘿嘿嘿" 的问题
  • 原文地址:https://www.cnblogs.com/zlc364624/p/14453644.html
Copyright © 2011-2022 走看看