Package dk.brics.jwig.server.cache

Examples of dk.brics.jwig.server.cache.ProxyObject


        this.querier = querier;
    }

    @Override
  public boolean hasAccess(Persistable persistable) { //FIXME: Should it be safe to assume that we can cache the result?
        ProxyObject proxyObject = new ProxyObject(webapp.getWebSite().getQuerier(), persistable);
        Map<ProxyObject, Boolean> objectBooleanMap = persistenceCache.get();
        if (objectBooleanMap.containsKey(proxyObject)) {
            return objectBooleanMap.get(proxyObject);
        }
        boolean b = hasAccess(persistable, 0);
View Full Code Here


     */
    private void hash(Object[] dependencies, HashMethod<?> h) {
        for (Object o : dependencies) {
            if (o instanceof Persistable) {
                Persistable persistable = (Persistable) o;
                o = new ProxyObject(getWebSite().getQuerier(),persistable);
            } else if (o instanceof Enum) {
                Enum<?> anEnum = (Enum<?>) o;
                o = anEnum.getClass().getName().hashCode() * anEnum.ordinal();
            }
            h.addHashParameter("-" + (o == null ? 42 : o.hashCode()));
View Full Code Here

TOP

Related Classes of dk.brics.jwig.server.cache.ProxyObject

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.