org.acegisecurity.domain.dao
Class EvictionUtils

java.lang.Object
  extended by org.acegisecurity.domain.dao.EvictionUtils

public class EvictionUtils
extends Object

Convenience methods that support eviction of PersistableEntitys from those objects that implement EvictionCapable.

Version:
$Id: EvictionUtils.java,v 1.6 2005/11/17 00:55:47 benalex Exp $
Author:
Ben Alex

Constructor Summary
EvictionUtils()
           
 
Method Summary
static void evictIfRequired(Object daoOrServices, Collection<? extends Object> collection)
          Evicts each PersistableEntity element of the passed Collection using the passed Object (provided that the passed Object implements EvictionCapable).
static void evictIfRequired(Object daoOrServices, PersistableEntity entity)
          Evicts the PersistableEntity using the passed Object (provided that the passed Object implements EvictionCapable).
static void evictPopulatedIfRequired(Object daoOrServices, PersistableEntity entity)
          Evicts the PersistableEntity using the passed Object (provided that the passed Object implements EvictionCapable), along with expressly evicting every PersistableEntity returned by the PersistableEntity's getters.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EvictionUtils

public EvictionUtils()
Method Detail

evictIfRequired

public static void evictIfRequired(Object daoOrServices,
                                   PersistableEntity entity)
Evicts the PersistableEntity using the passed Object (provided that the passed Object implements EvictionCapable).

Parameters:
daoOrServices - the potential source for EvictionCapable services (never null)
entity - to evict (can be null)

evictPopulatedIfRequired

public static void evictPopulatedIfRequired(Object daoOrServices,
                                            PersistableEntity entity)
Evicts the PersistableEntity using the passed Object (provided that the passed Object implements EvictionCapable), along with expressly evicting every PersistableEntity returned by the PersistableEntity's getters.

Parameters:
daoOrServices - the potential source for EvictionCapable services (never null)
entity - to evict includnig its getter results (can be null)

evictIfRequired

public static void evictIfRequired(Object daoOrServices,
                                   Collection<? extends Object> collection)
Evicts each PersistableEntity element of the passed Collection using the passed Object (provided that the passed Object implements EvictionCapable).

Parameters:
daoOrServices - the potential source for EvictionCapable services (never null)
collection - whose members to evict (never null)


Copyright © 2004-2005 Acegi Technology Pty Limited. All Rights Reserved.