Package org.apache.openjpa.enhance
Class PCDataGenerator
java.lang.Object
org.apache.openjpa.enhance.DynamicStorageGenerator
org.apache.openjpa.enhance.PCDataGenerator
- Direct Known Subclasses:
DataCachePCDataGenerator
Generates
PCData
instances which avoid primitive wrappers
to optimize memory use and performance at the cost of slightly higher
startup time.- Since:
- 0.3.2
- Author:
- Steve Kim, Mark Struberg rework to ASM
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic interface
DynamicPCData
s generated will implement this interface to simplify initialization. -
Field Summary
Fields inherited from class org.apache.openjpa.enhance.DynamicStorageGenerator
POLICY_EMPTY, POLICY_EXCEPTION, POLICY_SILENT
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected void
Add methods for loading and storing version data.protected void
Add interface or superclass declarations to the generated class.protected final void
decorate
(Object obj, ClassNodeTracker bc, int[] types) Decorate the generated class.protected void
decorate
(ClassNodeTracker bc, ClassMetaData meta) Apply additional decoration to generated class.protected void
finish
(PCDataGenerator.DynamicPCData data, ClassMetaData meta) Perform any final actions before the pcdata is returned to client code.generatePCData
(Object oid, ClassMetaData meta) Return aPCData
instance for the given oid and metadata.protected final String
getClassName
(Object obj) Return a class name to use for the given user key.Return the configuration.protected int
getCreateFieldMethods
(int typeCode) Return the policy constant for how to create type methods.static Class<?>
protected String
getUniqueName
(Class<?> type) Creates a unique name for the given type's pcdata implementation.protected int
replaceType
(FieldMetaData fmd) Return a validJavaTypes
constant for the given fieldprotected boolean
usesImplData
(ClassMetaData meta) Whether the given type might have cacheable class-level impl data.protected boolean
Whether the given field might have cacheable impl data.protected boolean
Whether the given field uses a cacheable intermediate value.Methods inherited from class org.apache.openjpa.enhance.DynamicStorageGenerator
addBeanField, createFactory, forType, generateStorage, getFieldAccess, getFieldName, getWrapper, getWrapper, isCompatible
-
Field Details
-
POSTFIX
- See Also:
-
-
Constructor Details
-
PCDataGenerator
-
-
Method Details
-
getConfiguration
Return the configuration. -
generatePCData
Return aPCData
instance for the given oid and metadata. -
finish
Perform any final actions before the pcdata is returned to client code. -
getCreateFieldMethods
protected int getCreateFieldMethods(int typeCode) Description copied from class:DynamicStorageGenerator
Return the policy constant for how to create type methods.- Overrides:
getCreateFieldMethods
in classDynamicStorageGenerator
-
declareClasses
Description copied from class:DynamicStorageGenerator
Add interface or superclass declarations to the generated class.- Overrides:
declareClasses
in classDynamicStorageGenerator
-
getClassName
Description copied from class:DynamicStorageGenerator
Return a class name to use for the given user key. By default, returns the stringified key prefixed by PREFIX.- Overrides:
getClassName
in classDynamicStorageGenerator
-
getUniqueName
Creates a unique name for the given type's pcdata implementation. -
decorate
Description copied from class:DynamicStorageGenerator
Decorate the generated class.- Overrides:
decorate
in classDynamicStorageGenerator
-
decorate
Apply additional decoration to generated class. -
getType
-
addVersionMethods
Add methods for loading and storing version data. -
replaceType
Return a validJavaTypes
constant for the given field -
usesIntermediate
Whether the given field uses a cacheable intermediate value. -
usesImplData
Whether the given type might have cacheable class-level impl data. -
usesImplData
Whether the given field might have cacheable impl data.
-