footprintdb.java
来自「cwbbs 云网论坛源码」· Java 代码 · 共 32 行
JAVA
32 行
package com.redmoon.blog;import com.cloudwebsoft.framework.base.*;import com.cloudwebsoft.framework.db.JdbcTemplate;import cn.js.fan.util.ResKeyException;import cn.js.fan.db.PrimaryKey;public class FootprintDb extends QObjectDb { public FootprintDb() { } public boolean create(JdbcTemplate jt, Object[] params) throws ResKeyException { FootprintDb fpd = getFootprintDb(((Long)params[0]).longValue(), (String)params[2]); if (fpd!=null) { throw new ResKeyException("res.blog.UserConfigDb", "footprint_repeat"); } boolean re = super.create(jt, params); return re; } public FootprintDb getFootprintDb(long msgId, String userName) { PrimaryKey pk = (PrimaryKey)primaryKey.clone(); pk.setKeyValue("msg_id", new Long(msgId)); pk.setKeyValue("user_name", userName); return (FootprintDb)getQObjectDb(pk.getKeys()); }}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?