org.apache.openjpa.conf
Class OpenJPAVersionAndConfigurationTypeValidationPolicy

java.lang.Object
  extended by org.apache.openjpa.conf.OpenJPAVersionAndConfigurationTypeValidationPolicy
All Implemented Interfaces:
CacheMarshaller.ValidationPolicy, Configurable

public class OpenJPAVersionAndConfigurationTypeValidationPolicy
extends Object
implements CacheMarshaller.ValidationPolicy, Configurable

Compute validity based on whether or not the cached data is from the same version of Kodo as the current install. This also checks OpenJPA version information in case the OpenJPA jars were independently updated.

Since:
1.1.0

Constructor Summary
OpenJPAVersionAndConfigurationTypeValidationPolicy()
           
 
Method Summary
 void endConfiguration()
          Invoked upon completion of bean property configuration for this object.
 Object getCacheableData(Object o)
          Return an object that the CacheMarshaller should store.
 Object getValidData(Object o)
          Returns an object that this policy considers to be valid, based on o.
 void setConfiguration(Configuration conf)
          Invoked prior to setting bean properties.
 void startConfiguration()
          Invoked before bean property configuration is begun on this object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OpenJPAVersionAndConfigurationTypeValidationPolicy

public OpenJPAVersionAndConfigurationTypeValidationPolicy()
Method Detail

getCacheableData

public Object getCacheableData(Object o)
Description copied from interface: CacheMarshaller.ValidationPolicy
Return an object that the CacheMarshaller should store.

Specified by:
getCacheableData in interface CacheMarshaller.ValidationPolicy

getValidData

public Object getValidData(Object o)
Description copied from interface: CacheMarshaller.ValidationPolicy
Returns an object that this policy considers to be valid, based on o. If o is not valid, this method will return null.

Specified by:
getValidData in interface CacheMarshaller.ValidationPolicy

setConfiguration

public void setConfiguration(Configuration conf)
Description copied from interface: Configurable
Invoked prior to setting bean properties.

Specified by:
setConfiguration in interface Configurable

startConfiguration

public void startConfiguration()
Description copied from interface: Configurable
Invoked before bean property configuration is begun on this object.

Specified by:
startConfiguration in interface Configurable

endConfiguration

public void endConfiguration()
Description copied from interface: Configurable
Invoked upon completion of bean property configuration for this object.

Specified by:
endConfiguration in interface Configurable


Copyright © 2006-2013 Apache Software Foundation. All Rights Reserved.