Package org.apache.openjpa.meta
Class Extensions
java.lang.Object
org.apache.openjpa.meta.Extensions
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
ClassMetaData
,FieldMetaData
Vendor extensions. This class is thread safe for reads, but not for
mutations.
- Author:
- Abe White
- See Also:
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addExtension
(String key, Object value) Add a vendor extension to this entity.void
addExtension
(String vendor, String key, Object value) Add a vendor extension to this entity.protected void
addExtensionKeys
(Collection exts) Add all the known extension keys to the specified collection; any implementation that utilized new extensions should override this method to include both the known extensions of its superclass as well as its own extension keys.protected void
copy
(Extensions exts) Copy the extensions not present in this instance but present in the given instance.boolean
Get the value as a boolean.boolean
getBooleanExtension
(String vendor, String key) Get the value as a boolean.double
getDoubleExtension
(String key) Get the value as a double.double
getDoubleExtension
(String vendor, String key) Get the value as a double.getEmbeddedExtensions
(String key, boolean create) Return the embedded extensions under the given key.getEmbeddedExtensions
(String vendor, String key, boolean create) Return the embedded extensions under the given key.String[]
Return all extension keys.String[]
getExtensionKeys
(String vendor) Return all extension keys for the given vendor.String[]
Return all vendors who have extension keys at this level.int
getIntExtension
(String key) Get the value as an int.int
getIntExtension
(String vendor, String key) Get the value as an int.getObjectExtension
(String key) Get the value of an extension.getObjectExtension
(String vendor, String key) Get the value of an extension.abstract MetaDataRepository
Return the metadata repository.getStringExtension
(String key) Get the value as a string.getStringExtension
(String vendor, String key) Get the value as a string.boolean
hasExtension
(String key) Return true if the extension with the given key exists.boolean
hasExtension
(String vendor, String key) Return true if the extension with the given key exists.boolean
isEmpty()
Return true if there are no keys for any vendor.boolean
boolean
removeEmbeddedExtensions
(String vendor, String key) boolean
removeExtension
(String key) Remove a vendor extension.boolean
removeExtension
(String vendor, String key) Remove a vendor extension.protected boolean
Return true if extensions starting with the given official datastore prefix should be validated for this runtime.void
Helper method to issue warnings for any extensions that we recognize but do not use.
-
Field Details
-
OPENJPA
- See Also:
-
-
Constructor Details
-
Extensions
public Extensions()
-
-
Method Details
-
isEmpty
public boolean isEmpty()Return true if there are no keys for any vendor. -
getExtensionVendors
Return all vendors who have extension keys at this level. -
getExtensionKeys
Return all extension keys. -
getExtensionKeys
Return all extension keys for the given vendor. -
hasExtension
Return true if the extension with the given key exists. -
hasExtension
Return true if the extension with the given key exists. -
addExtension
Add a vendor extension to this entity. -
addExtension
Add a vendor extension to this entity. -
removeExtension
Remove a vendor extension. -
removeExtension
Remove a vendor extension. -
getObjectExtension
Get the value of an extension. -
getObjectExtension
Get the value of an extension. -
getStringExtension
Get the value as a string. -
getStringExtension
Get the value as a string. -
getIntExtension
Get the value as an int. -
getIntExtension
Get the value as an int. -
getDoubleExtension
Get the value as a double. -
getDoubleExtension
Get the value as a double. -
getBooleanExtension
Get the value as a boolean. -
getBooleanExtension
Get the value as a boolean. -
getEmbeddedExtensions
Return the embedded extensions under the given key. -
getEmbeddedExtensions
Return the embedded extensions under the given key. -
removeEmbeddedExtensions
-
removeEmbeddedExtensions
-
copy
Copy the extensions not present in this instance but present in the given instance. -
validateExtensionKeys
public void validateExtensionKeys()Helper method to issue warnings for any extensions that we recognize but do not use.- Since:
- 0.3.1.3
-
addExtensionKeys
Add all the known extension keys to the specified collection; any implementation that utilized new extensions should override this method to include both the known extensions of its superclass as well as its own extension keys.- Since:
- 0.3.1.3
-
validateDataStoreExtensionPrefix
Return true if extensions starting with the given official datastore prefix should be validated for this runtime. -
getRepository
Return the metadata repository.
-