Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.openjpa.enhance
Class PCDataGenerator

    java.lang.Object
      org.apache.openjpa.enhance.DynamicStorageGenerator
          org.apache.openjpa.enhance.PCDataGenerator

Direct Known Subclasses:
  DataCachePCDataGenerator

    public class PCDataGenerator

extends DynamicStorageGenerator

Generates `PCDataGenerator.DynamicPCData` 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

Nested Class Summary
`static interface` | `PCDataGenerator.DynamicPCData` Dynamic `PCData`s generated will implement this interface to simplify initialization.

Field Summary
`protected static String` | `POSTFIX`

Fields inherited from class org.apache.openjpa.enhance.DynamicStorageGenerator
`POLICY_EMPTY, POLICY_EXCEPTION, POLICY_SILENT`

Constructor Summary
`PCDataGenerator(OpenJPAConfiguration conf)`

Method Summary
`protected void` | `addVersionMethods(serp.bytecode.BCClass bc)` Add methods for loading and storing version data.
`protected void` | `callAbstractPCData(serp.bytecode.BCClass bc, String name, Class<?> retType, Class<?>[] args)` Add method which defers to AbstractPCData.
`protected void` | `declareClasses(serp.bytecode.BCClass bc)` Add interface or superclass declarations to the generated class.
`protected void` | `decorate(serp.bytecode.BCClass bc, ClassMetaData meta)` Apply additional decoration to generated class.
`protected void` | `decorate(Object obj, serp.bytecode.BCClass bc, int[] types)` Decorate the generated class.
`protected void` | `finish(PCDataGenerator.DynamicPCData data, ClassMetaData meta)` Perform any final actions before the pcdata is returned to client code.
`PCData` | `generatePCData(Object oid, ClassMetaData meta)` Return a `PCDataGenerator.DynamicPCData` instance for the given oid and metadata.
`protected String` | `getClassName(Object obj)` Return a class name to use for the given user key.
`OpenJPAConfiguration` | `getConfiguration()` Return the configuration.
`protected int` | `getCreateFieldMethods(int typeCode)` Return the policy constant for how to create type methods.
`protected String` | `getUniqueName(Class<?> type)` Creates a unique name for the given type's pcdata implementation.
`protected int` | `replaceType(FieldMetaData fmd)` Return a valid `JavaTypes` constant for the given field
`protected void` | `setTarget(serp.bytecode.Instruction ins, Collection<serp.bytecode.Instruction> jumps)` Set the collection of `JumpInstruction`s to the given instruction, clearing the collection in the process.
`protected boolean` | `usesImplData(ClassMetaData meta)` Whether the given type might have cacheable class-level impl data.
`protected boolean` | `usesImplData(FieldMetaData fmd)` Whether the given field might have cacheable impl data.
`protected boolean` | `usesIntermediate(FieldMetaData fmd)` 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, replaceMethod, throwException`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### POSTFIX

    protected static final String POSTFIX

See Also:
  Constant Field Values

Constructor Detail

### PCDataGenerator

    public PCDataGenerator(OpenJPAConfiguration conf)

Method Detail

### getConfiguration

    public OpenJPAConfiguration getConfiguration()

  Return the configuration.

### generatePCData

    public PCData generatePCData(Object oid,
                                 ClassMetaData meta)

  Return a `PCDataGenerator.DynamicPCData` instance for the given oid and metadata.

### finish

    protected void finish(PCDataGenerator.DynamicPCData data,
                          ClassMetaData meta)

  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 class `DynamicStorageGenerator`

### declareClasses

    protected void declareClasses(serp.bytecode.BCClass bc)

  Description copied from class: `DynamicStorageGenerator`
  Add interface or superclass declarations to the generated class.

  Overrides:
    `declareClasses` in class `DynamicStorageGenerator`

### getClassName

    protected final String getClassName(Object obj)

  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 class `DynamicStorageGenerator`

### getUniqueName

    protected String getUniqueName(Class<?> type)

  Creates a unique name for the given type's pcdata implementation.

### decorate

    protected final void decorate(Object obj,
                                  serp.bytecode.BCClass bc,
                                  int[] types)

  Description copied from class: `DynamicStorageGenerator`
  Decorate the generated class.

  Overrides:
    `decorate` in class `DynamicStorageGenerator`

### decorate

    protected void decorate(serp.bytecode.BCClass bc,
                            ClassMetaData meta)

  Apply additional decoration to generated class.

### addVersionMethods

    protected void addVersionMethods(serp.bytecode.BCClass bc)

  Add methods for loading and storing version data.

### replaceType

    protected int replaceType(FieldMetaData fmd)

  Return a valid `JavaTypes` constant for the given field

### usesIntermediate

    protected boolean usesIntermediate(FieldMetaData fmd)

  Whether the given field uses a cacheable intermediate value.

### usesImplData

    protected boolean usesImplData(ClassMetaData meta)

  Whether the given type might have cacheable class-level impl data.

### usesImplData

    protected boolean usesImplData(FieldMetaData fmd)

  Whether the given field might have cacheable impl data.

### callAbstractPCData

    protected void callAbstractPCData(serp.bytecode.BCClass bc,
                                      String name,
                                      Class<?> retType,
                                      Class<?>[] args)

  Add method which defers to AbstractPCData.

### setTarget

    protected void setTarget(serp.bytecode.Instruction ins,
                             Collection<serp.bytecode.Instruction> jumps)

  Set the collection of `JumpInstruction`s to the given instruction, clearing the collection in the process.

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2006-2013 Apache Software Foundation. All Rights Reserved.