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
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Invoked 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.void
Invoked prior to setting bean properties.void
setConsumeSerializationErrors
(boolean consume) void
The id that this marshaller is responsible for.void
setInputResource
(String resource) void
setInputURL
(URL url) void
setOutputFile
(File file) void
setValidationPolicy
(String policy) TheCacheMarshaller.ValidationPolicy
that this marshaller should use.void
Invoked before bean property configuration is begun on this object.void
Storeo
into the cache.
-
Constructor Details
-
CacheMarshallerImpl
public CacheMarshallerImpl()
-
-
Method Details
-
load
Description copied from interface:CacheMarshaller
Load 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:
load
in interfaceCacheMarshaller
-
store
Description copied from interface:CacheMarshaller
Storeo
into the cache.- Specified by:
store
in interfaceCacheMarshaller
-
setOutputFile
-
getOutputFile
-
setInputURL
-
setInputResource
-
setConsumeSerializationErrors
public void setConsumeSerializationErrors(boolean consume) -
getId
Description copied from interface:CacheMarshaller
The id that this marshaller is responsible for.- Specified by:
getId
in interfaceCacheMarshaller
-
setId
Description copied from interface:CacheMarshaller
The id that this marshaller is responsible for. A value for this parameter is required.- Specified by:
setId
in interfaceCacheMarshaller
-
setValidationPolicy
public void setValidationPolicy(String policy) throws InstantiationException, IllegalAccessException Description copied from interface:CacheMarshaller
TheCacheMarshaller.ValidationPolicy
that this marshaller should use. A value for this parameter is required. The class will be instantiated via theConfigurations
mechanism, ensuring that if the class implementsConfigurable
orGenericConfigurable
, it will be taken through the appropriate lifecycle.- Specified by:
setValidationPolicy
in interfaceCacheMarshaller
- Throws:
InstantiationException
IllegalAccessException
-
getValidationPolicy
-
setConfiguration
Description copied from interface:Configurable
Invoked prior to setting bean properties.- Specified by:
setConfiguration
in interfaceConfigurable
-
startConfiguration
public void startConfiguration()Description copied from interface:Configurable
Invoked before bean property configuration is begun on this object.- Specified by:
startConfiguration
in interfaceConfigurable
-
endConfiguration
public void endConfiguration()Description copied from interface:Configurable
Invoked upon completion of bean property configuration for this object.- Specified by:
endConfiguration
in interfaceConfigurable
-