|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.datanucleus.enhancer.asm.primarykey.PrimaryKeyGenerator
public class PrimaryKeyGenerator
Class to handle the generation of a PK class for a persistable class. The primary key class is generated as its own class, rather than as an inner class of the original class.
| Field Summary | |
|---|---|
protected static org.datanucleus.util.Localiser |
LOCALISER
Localisation of messages |
| Constructor Summary | |
|---|---|
PrimaryKeyGenerator(org.datanucleus.metadata.AbstractClassMetaData cmd,
ASMClassEnhancer enhancer)
Constructor for a PK generator for the specified class. |
|
| Method Summary | |
|---|---|
protected void |
addDefaultConstructor(org.objectweb.asm.ClassWriter cw)
Method to add an empty default constructor. |
protected void |
addFields(org.objectweb.asm.ClassWriter cw)
Method to add fields to match the PK fields of the persistable class |
protected void |
addMethodEquals(org.objectweb.asm.ClassWriter cw)
Method to add an equals() method. |
protected void |
addMethodHashCode(org.objectweb.asm.ClassWriter cw)
Method to add a hashCode() method. |
protected void |
addMethodToString(org.objectweb.asm.ClassWriter cw)
Method to add a toString() method. |
protected void |
addStringConstructor(org.objectweb.asm.ClassWriter cw)
Method to add a constructor taking in a String. |
byte[] |
generate()
Method to generate the primary key class. |
protected String |
getTypeNameForField(org.datanucleus.metadata.AbstractMemberMetaData mmd)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected static final org.datanucleus.util.Localiser LOCALISER
| Constructor Detail |
|---|
public PrimaryKeyGenerator(org.datanucleus.metadata.AbstractClassMetaData cmd,
ASMClassEnhancer enhancer)
cmd - Metadata for the class that needs a primary key classenhancer - The enhancer being used| Method Detail |
|---|
public byte[] generate()
protected void addFields(org.objectweb.asm.ClassWriter cw)
cw - The ClassWriter to useprotected String getTypeNameForField(org.datanucleus.metadata.AbstractMemberMetaData mmd)
protected void addDefaultConstructor(org.objectweb.asm.ClassWriter cw)
cw - The ClassWriter to useprotected void addStringConstructor(org.objectweb.asm.ClassWriter cw)
cw - The ClassWriter to useprotected void addMethodToString(org.objectweb.asm.ClassWriter cw)
cw - The ClassWriter to useprotected void addMethodEquals(org.objectweb.asm.ClassWriter cw)
cw - The ClassWriter to useprotected void addMethodHashCode(org.objectweb.asm.ClassWriter cw)
cw - The ClassWriter to use
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||