Package org.apache.openjpa.lib.conf
Class AbstractProductDerivation
java.lang.Object
org.apache.openjpa.lib.conf.AbstractProductDerivation
- All Implemented Interfaces:
ProductDerivation
- Direct Known Subclasses:
JDBCPersistenceProductDerivation,JDBCProductDerivation,PersistenceProductDerivation,ProductDerivation
Abstract no-op product derivation for easy extension.
- Since:
- 0.4.1
- Author:
- Pinaki Poddar
-
Field Summary
Fields inherited from interface org.apache.openjpa.lib.conf.ProductDerivation
TYPE_FEATURE, TYPE_PRODUCT -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanCalled after the specification has been set.voidCalled before the given Configuration is closed.booleanProvides the instance with a callback to mutate the initial properties of theConfigurationProvider.booleanProvides the instance with the opportunity to mutateconfbefore the user configuration is applied.getAnchorsInFile(File file) Return a Listof all the anchors defined in file.getAnchorsInResource(String resource) Return a Listof all the anchors defined in resource.Return the configuration prefix for properties of this product.Return a string identifying the default resource location for this product derivation, if one exists.Return set of Query hint keys recognized by this receiver.Load given file, or return null if it is not a file this receiver understands.load(String resource, String anchor, ClassLoader loader) Load the given given resource into the returned ConfigurationProvider, or return null if it is not a resource this receiver understands.loadDefaults(ClassLoader loader) Load defaults into the returned ConfigurationProvider, or return null if no defaults are found.loadGlobals(ClassLoader loader) Load globals into the returned ConfigurationProvider, or return null if no globals are found.voidvalidate()Ensure that this derivation is valid.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.openjpa.lib.conf.ProductDerivation
getType
-
Constructor Details
-
AbstractProductDerivation
public AbstractProductDerivation()
-
-
Method Details
-
getConfigurationPrefix
Description copied from interface:ProductDerivationReturn the configuration prefix for properties of this product.- Specified by:
getConfigurationPrefixin interfaceProductDerivation
-
validate
Description copied from interface:ProductDerivationEnsure that this derivation is valid. This action might consist of loading classes for the product this derivation represents to be sure they exist. Throw any throwable to indicate an invalid derivation. Invalid derivations will not be used.- Specified by:
validatein interfaceProductDerivation- Throws:
Exception
-
loadGlobals
Description copied from interface:ProductDerivationLoad globals into the returned ConfigurationProvider, or return null if no globals are found.- Specified by:
loadGlobalsin interfaceProductDerivation- Throws:
Exception
-
loadDefaults
Description copied from interface:ProductDerivationLoad defaults into the returned ConfigurationProvider, or return null if no defaults are found.- Specified by:
loadDefaultsin interfaceProductDerivation- Throws:
Exception
-
load
public ConfigurationProvider load(String resource, String anchor, ClassLoader loader) throws Exception Description copied from interface:ProductDerivationLoad the given given resource into the returned ConfigurationProvider, or return null if it is not a resource this receiver understands. The given class loader may be null.- Specified by:
loadin interfaceProductDerivationanchor- optional named anchor within a multiple-configuration resource- Throws:
Exception
-
load
Description copied from interface:ProductDerivationLoad given file, or return null if it is not a file this receiver understands.- Specified by:
loadin interfaceProductDerivationanchor- optional named anchor within a multiple-configuration file- Throws:
Exception
-
getDefaultResourceLocation
Description copied from interface:ProductDerivationReturn a string identifying the default resource location for this product derivation, if one exists. If there is no default location, returnsnull.- Specified by:
getDefaultResourceLocationin interfaceProductDerivation
-
getAnchorsInFile
Description copied from interface:ProductDerivationReturn a Listof all the anchors defined in file. The returned names are not fully-qualified, so must be used in conjunction withfilein calls toProductDerivation.load(java.io.File, String). Returnsnullor an empty list if no anchors could be found.- Specified by:
getAnchorsInFilein interfaceProductDerivation- Throws:
Exception
-
getAnchorsInResource
Description copied from interface:ProductDerivationReturn a Listof all the anchors defined in resource. The returned names are not fully-qualified, so must be used in conjunction withresourcein calls toProductDerivation.load(java.io.File, String). Returnsnullor an empty list if no anchors could be found.- Specified by:
getAnchorsInResourcein interfaceProductDerivation- Throws:
Exception
-
beforeConfigurationConstruct
Description copied from interface:ProductDerivationProvides the instance with a callback to mutate the initial properties of theConfigurationProvider. This is primarily to alter or add properties that determine what type of configuration is constructed, and therefore is typically used at runtime only.- Specified by:
beforeConfigurationConstructin interfaceProductDerivation- Returns:
- true if given ConfigurationProvider has been mutated.
-
beforeConfigurationLoad
Description copied from interface:ProductDerivationProvides the instance with the opportunity to mutateconfbefore the user configuration is applied.- Specified by:
beforeConfigurationLoadin interfaceProductDerivation- Returns:
- true if given Configuration has been mutated.
-
afterSpecificationSet
Description copied from interface:ProductDerivationCalled after the specification has been set.- Specified by:
afterSpecificationSetin interfaceProductDerivation- Returns:
- true if given Configuration has been mutated.
-
beforeConfigurationClose
Description copied from interface:ProductDerivationCalled before the given Configuration is closed.- Specified by:
beforeConfigurationClosein interfaceProductDerivation
-
getSupportedQueryHints
Description copied from interface:ProductDerivationReturn set of Query hint keys recognized by this receiver.- Specified by:
getSupportedQueryHintsin interfaceProductDerivation
-