pscachekey.java

来自「Sequoia ERP是一个真正的企业级开源ERP解决方案。它提供的模块包括:电」· Java 代码 · 共 45 行

JAVA
45
字号
/* * Licensed under the X license (see http://www.x.org/terms.htm) */package org.ofbiz.minerva.pool.jdbc;import java.sql.Connection;import java.sql.ResultSet;/** * Temporarily not used.  Identifies a PreparedStatement by * SQL, type, and concurrency. * * @author Aaron Mulder ammulder@alumni.princeton.edu */public class PSCacheKey {    public Connection con;    public String sql;    public int rsType;    public int rsConcur;    public PSCacheKey(Connection con, String sql) {        this.con = con;        this.sql = sql;        this.rsType = ResultSet.TYPE_FORWARD_ONLY;        this.rsConcur = ResultSet.CONCUR_READ_ONLY;    }    public PSCacheKey(Connection con, String sql, int rsType, int rsConcur) {        this.con = con;        this.sql = sql;        this.rsType = rsType;        this.rsConcur = rsConcur;    }    public boolean equals(Object o) {        PSCacheKey key = (PSCacheKey) o;        return key.con.equals(con) && key.sql.equals(sql) && key.rsType == rsType && key.rsConcur == rsConcur;    }    public int hashCode() {        return con.hashCode() ^ sql.hashCode() ^ rsType ^ rsConcur;    }}

⌨️ 快捷键说明

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