Package com.ibatis.sqlmap.engine.cache

Examples of com.ibatis.sqlmap.engine.cache.CacheKey


    public boolean equals(Object obj) {
        return this == obj;
    }

    public int hashCode() {
        CacheKey key = new CacheKey();
        if (txManager != null) {
            key.update(txManager);
            if (txManager.getConfig().getDataSource() != null) {
                key.update(txManager.getConfig().getDataSource());
            }
        }
        key.update(System.identityHashCode(this));
        return key.hashCode();
    }
View Full Code Here


        return n;
    }

    public Object executeQueryForObject(StatementScope statementScope, Transaction trans, Object parameterObject,
            Object resultObject) throws SQLException {
        CacheKey cacheKey = getCacheKey(statementScope, parameterObject);
        cacheKey.update("executeQueryForObject");
        Object object = cacheModel.getObject(cacheKey);
        if (object == CacheModel.NULL_OBJECT) {
            //  This was cached, but null
            object = null;
        } else if (object == null) {
View Full Code Here

        return object;
    }

    public List executeQueryForList(StatementScope statementScope, Transaction trans, Object parameterObject, int skipResults,
            int maxResults) throws SQLException {
        CacheKey cacheKey = getCacheKey(statementScope, parameterObject);
        cacheKey.update("executeQueryForList");
        cacheKey.update(skipResults);
        cacheKey.update(maxResults);
        Object listAsObject = cacheModel.getObject(cacheKey);
        List list;
        if (listAsObject == CacheModel.NULL_OBJECT) {
            // The cached object was null
            list = null;
View Full Code Here

            RowHandler rowHandler) throws SQLException {
        statement.executeQueryWithRowHandler(statementScope, trans, parameterObject, rowHandler);
    }

    public CacheKey getCacheKey(StatementScope statementScope, Object parameterObject) {
        CacheKey key = statement.getCacheKey(statementScope, parameterObject);
        if (!cacheModel.isReadOnly() && !cacheModel.isSerialize()) {
            key.update(statementScope.getSession());
        }
        return key;
    }
View Full Code Here

TOP

Related Classes of com.ibatis.sqlmap.engine.cache.CacheKey

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.