org.ow2.jonas.resource.internal.cm.sql.cache
Class PreparedStatementMapCacheKey

java.lang.Object
  extended by org.ow2.jonas.resource.internal.cm.sql.cache.PreparedStatementMapCacheKey

public class PreparedStatementMapCacheKey
extends Object

Cache Key for the 'map' policy

Author:
pelletib

Constructor Summary
PreparedStatementMapCacheKey(String user, String sql, int resultSetType, int resultSetConcurrency, int resultSetHoldability, int autoGeneratedKeys, int[] columnIndexes, String[] columnNames, int hashcode, org.objectweb.util.monolog.api.Logger logger)
          Creates a key object.
 
Method Summary
 boolean equals(Object key)
           
 int hashCode()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PreparedStatementMapCacheKey

public PreparedStatementMapCacheKey(String user,
                                    String sql,
                                    int resultSetType,
                                    int resultSetConcurrency,
                                    int resultSetHoldability,
                                    int autoGeneratedKeys,
                                    int[] columnIndexes,
                                    String[] columnNames,
                                    int hashcode,
                                    org.objectweb.util.monolog.api.Logger logger)
Creates a key object.

Parameters:
user - the user used for accessing the connection
sql - a String object that is the SQL statement to be sent to the database; may contain one or more ? IN parameters
resultSetType - a result set type; one of ResultSet.TYPE_FORWARD_ONLY, ResultSet.TYPE_SCROLL_INSENSITIVE, or ResultSet.TYPE_SCROLL_SENSITIVE
resultSetConcurrency - a concurrency type; one of ResultSet.CONCUR_READ_ONLY or ResultSet.CONCUR_UPDATABLE
resultSetHoldability - one of the following ResultSet constants: ResultSet.HOLD_CURSORS_OVER_COMMIT or ResultSet.CLOSE_CURSORS_AT_COMMIT
autoGeneratedKeys - a flag indicating whether auto-generated keys should be returned; one of Statement.RETURN_GENERATED_KEYS or Statement.NO_GENERATED_KEYS
columnIndexes - an array of column indexes indicating the columns that should be returned from the inserted row or rows
columnNames - an array of column names indicating the columns that should be returned from the inserted row or rows
trace - the logger to use for logging purpose
isDebugLogging - if true, log the debug event in the logger
Method Detail

equals

public boolean equals(Object key)
Overrides:
equals in class Object
Parameters:
stmt - given statement for comparing it
Returns:
true if given object is equals to this current object

hashCode

public int hashCode()
Overrides:
hashCode in class Object


Copyright © 2011 OW2 Consortium. All Rights Reserved.