⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 advertisementdb.java~4~

📁 云网论坛CWBBS 源码,内容丰富,学习,参考,教学的好资料,具体见内说明,
💻 JAVA~4~
字号:
package com.redmoon.forum.ad;

import cn.js.fan.base.*;
import cn.js.fan.db.*;
import cn.js.fan.util.*;

/**
 * <p>Title: </p>
 *
 * <p>Description: </p>
 *
 * <p>Copyright: Copyright (c) 2005</p>
 *
 * <p>Company: </p>
 *
 * @author not attributable
 * @version 1.0
 */
public class AdvertisementDb extends ObjectDb {
    public AdvertisementDb() {
    }

    public AdvertisementDb(int id) {
        this.id = id;
        init();
        load();
    }

    public void initDB() {
        this.tableName = "sq_ad_content";
        primaryKey = new PrimaryKey("id", PrimaryKey.TYPE_INT);
        objectCache = new AdvertisementCache(this);

        this.QUERY_DEL =
                "delete FROM " + tableName + " WHERE id=?";
        this.QUERY_CREATE =
                "INSERT into " + tableName + " (id,title,begindate,enddate,type,content,height,width,url,targets,fontsize,imagetitle) VALUES (?,?,?,?,?,?,?,?,?,?,?,?)";
        this.QUERY_LOAD =
                "SELECT id,title,begindate,enddate,type,content,height,width,url,targets,fontsize,imagetitle FROM " + tableName + " WHERE id=?";
        this.QUERY_SAVE =
                "UPDATE " + tableName +
                " SET id=?,title=?,begindate=?,enddate=?,type=?,content=?,height=?,width=?,url=?,targets=?,fontsize=?,imagetitle=? WHERE id=?";
        this.QUERY_LIST = "select id from " + tableName + " order by id desc";
        isInitFromConfigDB = false;
    }

    public ObjectDb getObjectRaw(PrimaryKey pk) {
        return new AdvertisementDb(pk.getIntValue());
    }

    public AdvertisementDb getAdvertisementDb(int id) {
        return (AdvertisementDb) getObjectDb(id);
    }

    public void load() {
    }

    public boolean create() throws ErrMsgException {
        return true;
    }

    public boolean del() throws ErrMsgException {
        return true;
    }

    public boolean save() throws ErrMsgException {
        return true;
    }


    public void setId(int id) {
        this.id = id;
    }

    public int getId() {
        return id;
    }

    private int id;
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -