Package org.apache.openjpa.conf
Class CacheMarshallerImpl
java.lang.Object
org.apache.openjpa.conf.CacheMarshallerImpl
- All Implemented Interfaces:
CacheMarshaller,Configurable
Default
CacheMarshaller implementation that writes data
to a specified file and reads data from a specified file or URL.- Since:
- 1.1.0
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.apache.openjpa.conf.CacheMarshaller
CacheMarshaller.ValidationPolicy -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidInvoked upon completion of bean property configuration for this object.getId()The id that this marshaller is responsible for.load()Load and return an instance of the type handled by this marshaller.voidInvoked prior to setting bean properties.voidsetConsumeSerializationErrors(boolean consume) voidThe id that this marshaller is responsible for.voidsetInputResource(String resource) voidsetInputURL(URL url) voidsetOutputFile(File file) voidsetValidationPolicy(String policy) TheCacheMarshaller.ValidationPolicythat this marshaller should use.voidInvoked before bean property configuration is begun on this object.voidStoreointo the cache.
-
Constructor Details
-
CacheMarshallerImpl
public CacheMarshallerImpl()
-
-
Method Details
-
load
Description copied from interface:CacheMarshallerLoad and return an instance of the type handled by this marshaller. If the type implementsConfigurable, then this method will invokeConfigurable.setConfiguration(org.apache.openjpa.lib.conf.Configuration),Configurable.startConfiguration(), andConfigurable.endConfiguration()on the instance before returning.- Specified by:
loadin interfaceCacheMarshaller
-
store
Description copied from interface:CacheMarshallerStoreointo the cache.- Specified by:
storein interfaceCacheMarshaller
-
setOutputFile
-
getOutputFile
-
setInputURL
-
setInputResource
-
setConsumeSerializationErrors
public void setConsumeSerializationErrors(boolean consume) -
getId
Description copied from interface:CacheMarshallerThe id that this marshaller is responsible for.- Specified by:
getIdin interfaceCacheMarshaller
-
setId
Description copied from interface:CacheMarshallerThe id that this marshaller is responsible for. A value for this parameter is required.- Specified by:
setIdin interfaceCacheMarshaller
-
setValidationPolicy
public void setValidationPolicy(String policy) throws InstantiationException, IllegalAccessException Description copied from interface:CacheMarshallerTheCacheMarshaller.ValidationPolicythat this marshaller should use. A value for this parameter is required. The class will be instantiated via theConfigurationsmechanism, ensuring that if the class implementsConfigurableorGenericConfigurable, it will be taken through the appropriate lifecycle.- Specified by:
setValidationPolicyin interfaceCacheMarshaller- Throws:
InstantiationExceptionIllegalAccessException
-
getValidationPolicy
-
setConfiguration
Description copied from interface:ConfigurableInvoked prior to setting bean properties.- Specified by:
setConfigurationin interfaceConfigurable
-
startConfiguration
public void startConfiguration()Description copied from interface:ConfigurableInvoked before bean property configuration is begun on this object.- Specified by:
startConfigurationin interfaceConfigurable
-
endConfiguration
public void endConfiguration()Description copied from interface:ConfigurableInvoked upon completion of bean property configuration for this object.- Specified by:
endConfigurationin interfaceConfigurable
-