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

📄 update.java

📁 一个Java持久层类库
💻 JAVA
字号:
/* * To change this template, choose Tools | Templates * and open the template in the editor. */package ActiveObject.core;import ActiveObject.exception.*;import ActiveObject.vo.IntermediaryExpression;import java.sql.SQLException;/** * @author Ruby */public class Update extends CustomizedOperation{        public Update(Class[] objectTypes, String setting, String condition, Object[] params) throws ArgumentFormatError    {        super(objectTypes, setting, condition, params);        expression.setOperateType(IntermediaryExpression.Update);    }        /**     * 添加排序条件     * @param field     * @param sortOrder     * @return     */    public Update addOrder (String field, Order sortOrder) {        this.addOrderUtil(field, sortOrder);        return this;    }        public int run() throws SQLException, ObjectAnalysisException    {        return this.excuteUpdate();//this.toSQLString(), this.expression.getParamValues()    }    @Override    protected String toSQLString() throws ObjectAnalysisException{        return new SQLCreator(expression).toSQLString();//        //添加排序控制//        String sortSql = this.createOrderStatement();//        StringBuffer updateSql = new StringBuffer(200);//        updateSql.append("update ");//        updateSql.append(this.createAliasStatement());//        updateSql.append("set ");//        updateSql.append(setting);////        if(!OQLParser.isContentEmpty(condition))//        {//            updateSql.append(" where ");//            updateSql.append(condition);//        }//        if(sortSql != null)//            updateSql.append(sortSql);//        return OQLParser.parseLikeSyntax(updateSql, params);    }}

⌨️ 快捷键说明

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