com.gentics.api.lib.datasource
Class AbstractCacheableDatasource.DatasourceResultCacheKey

java.lang.Object
  extended by com.gentics.api.lib.datasource.AbstractCacheableDatasource.DatasourceResultCacheKey
All Implemented Interfaces:
AbstractCacheableDatasource.DatasourceResultCacheKeyBase, java.io.Serializable
Enclosing class:
AbstractCacheableDatasource

public static class AbstractCacheableDatasource.DatasourceResultCacheKey
extends java.lang.Object
implements AbstractCacheableDatasource.DatasourceResultCacheKeyBase, java.io.Serializable

A simple cache key used for caching datasource results. implementations of Datasource can either directly use this implementation, or if it is not sufficient can subclass this implementation.

Author:
herbert
See Also:
Serialized Form

Constructor Summary
AbstractCacheableDatasource.DatasourceResultCacheKey(java.lang.String query, java.lang.Object[] params, int start, int count, Datasource.Sorting[] sortedColumns, java.lang.Object[] additionalParameters)
          Creates a new ResultCacheKey.
 
Method Summary
 boolean equals(java.lang.Object obj)
           
 int hashCode()
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

AbstractCacheableDatasource.DatasourceResultCacheKey

public AbstractCacheableDatasource.DatasourceResultCacheKey(java.lang.String query,
                                                            java.lang.Object[] params,
                                                            int start,
                                                            int count,
                                                            Datasource.Sorting[] sortedColumns,
                                                            java.lang.Object[] additionalParameters)
Creates a new ResultCacheKey. it's arguments need to uniquely identify the result. The arguments are roughly equal to the getResult methods of the Datasource interface.

Parameters:
query - the query in the native language of the datasource - must not be null.
params - parameters used to bind variables in the query string - may be null.
start - start index (when using paging)
count - count (when using paging)
sortColumns - sorted columns when result is sorted - may be null.
additionalParameters - can be used for additional parameters which determine the result of this query (e.g. basedn for LDAP)
Throws:
java.lang.NullPointerException - if query is null.
Method Detail

equals

public boolean equals(java.lang.Object obj)
Overrides:
equals in class java.lang.Object

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object


Copyright © 2013 Gentics Software GmbH. All Rights Reserved.