zoukankan      html  css  js  c++  java
  • 第二阶段冲刺(九)

    今日任务:

    • 通过昨天反应出来的问题,开会进行讨论,制定任务卡。
    • 继续观察网友提出的问题,有利于后期的维护。

    增加删除代码:

    package com.yuukidach.ucount;

    import android.content.res.Resources;

    import org.litepal.crud.DataSupport;

    public class IOItem extends DataSupport {
    public final int TYPE_COST = -1;
    public final int TYPE_EARN = 1;

    private int id;
    private int type; // 收入还会支出
    private int mId;
    private double money;
    private String name;
    private String description;
    private String timeStamp;
    private String srcName; // 项目资源名称

    public IOItem () {}

    public IOItem(String srcName, String name) {
    this.srcName = srcName;
    this.name = name;
    }

    // 构造函数(无具体描述)
    public IOItem(String srcName, int type, double money, String name) {
    this.srcName = srcName;
    this.money = money;
    this.type = type;
    this.name = name;
    }

    // 构造函数(有具体描述)
    public IOItem(String srcName, int type, double money, String name, String description) {
    this.money = money;
    this.type = type;
    this.srcName = srcName;
    this.name = name;
    this.description = description;
    }

    public double getMoney() { return money; }
    public int getType() { return type; }
    public String getName() { return name; }
    public String getDescription() { return description; }
    public String getTimeStamp() { return timeStamp; }
    public int getmId() { return mId; }
    public String getSrcName() { return srcName; }
    public int getId() { return id; }

    // 设定属性
    public void setMoney(double money) { this.money = money; }
    public void setType(int type) { this.type = type; }
    public void setName(String name) { this.name = name; }
    public void setDescription(String description) { this.description = description; }
    public void setTimeStamp(String timeStamp) { this.timeStamp = timeStamp; }
    public void setmId(int mId) { this.mId = mId; }
    public void setSrcName(String srcName) { this.srcName = srcName; }

    // 返回图片资源的id
    public int getSrcId() {
    Resources resources = MainActivity.resources;
    return resources.getIdentifier(srcName, "drawable", MainActivity.PACKAGE_NAME);
    }
    }

  • 相关阅读:
    SQL WHERE 子句:语法及案例剖析
    SQL SELECT DISTINCT 语句:语法及案例剖析
    SQL SELECT 语句:语法与案例剖析
    SQL 语法:一些最重要的 SQL 命令简介
    SQL 简介:什么是SQL,SQL能做什么
    mybatis 注解开发
    mybatis 缓存
    mybatis 延迟加载策略
    mybatis的多表查询
    mybatis 的动态 SQL 语句
  • 原文地址:https://www.cnblogs.com/mac-13/p/13084230.html
Copyright © 2011-2022 走看看