public class TransformerFactory extends Object
EntityManagerSetupImpl.predeploy(javax.persistence.spi.PersistenceUnitInfo, java.util.Map)
Note: The Session's Project is is scanned to ensure that weaving is
supported and is modified to suit (set the ObjectChangePolicy
for the Descriptor).
Modifier and Type | Field and Description |
---|---|
protected Map |
classDetailsMap |
protected ClassLoader |
classLoader |
protected List |
embeddableClasses |
protected Collection |
entityClasses |
protected Session |
session |
static String |
WEAVER_ADDING_EMBEDDABLE |
static String |
WEAVER_CLASS_NOT_IN_PROJECT |
static String |
WEAVER_DISABLE_BY_SYSPROP |
static String |
WEAVER_FOUND_FIELD_LOCK |
static String |
WEAVER_NULL_PROJECT |
static String |
WEAVER_PROCESSING_CLASS |
Constructor and Description |
---|
TransformerFactory(Session session,
Collection entityClasses,
ClassLoader classLoader) |
Modifier and Type | Method and Description |
---|---|
void |
addClassDetailsForMappedSuperClasses(Class clz,
ClassDescriptor initialDescriptor,
ClassDetails classDetails,
Map classDetailsMap,
List unMappedAttributes)
INTERNAL:
Look higher in the hierarchy for the mappings listed in the unMappedAttribute list.
|
void |
buildClassDetailsAndModifyProject()
Build a list ClassDetails instance that contains a ClassDetails for each class
in our entities list.
|
ClassTransformer |
buildTopLinkWeaver() |
protected boolean |
canWeaveValueHolders(Class clz,
List mappings) |
static ClassTransformer |
createTransformerAndModifyProject(Session session,
Collection entityClasses,
ClassLoader classLoader) |
protected ClassDescriptor |
findDescriptor(Project project,
String className)
Find a descriptor by name in the given project
used to avoid referring to descriptors by class.
|
protected static boolean |
hasField(Class clz,
String fieldName) |
protected void |
log(int level,
String msg,
Object[] params) |
protected List |
storeAttributeMappings(Class clz,
ClassDetails classDetails,
List mappings,
boolean weaveValueHolders)
INTERNAL:
Store a set of attribute mappings on the given ClassDetails taht correspont to the given class.
|
public static final String WEAVER_NULL_PROJECT
public static final String WEAVER_DISABLE_BY_SYSPROP
public static final String WEAVER_ADDING_EMBEDDABLE
public static final String WEAVER_FOUND_FIELD_LOCK
public static final String WEAVER_CLASS_NOT_IN_PROJECT
public static final String WEAVER_PROCESSING_CLASS
protected Session session
protected Collection entityClasses
protected List embeddableClasses
protected Map classDetailsMap
protected ClassLoader classLoader
public TransformerFactory(Session session, Collection entityClasses, ClassLoader classLoader)
public static ClassTransformer createTransformerAndModifyProject(Session session, Collection entityClasses, ClassLoader classLoader)
public void addClassDetailsForMappedSuperClasses(Class clz, ClassDescriptor initialDescriptor, ClassDetails classDetails, Map classDetailsMap, List unMappedAttributes)
public ClassTransformer buildTopLinkWeaver()
public void buildClassDetailsAndModifyProject()
protected List storeAttributeMappings(Class clz, ClassDetails classDetails, List mappings, boolean weaveValueHolders)
protected ClassDescriptor findDescriptor(Project project, String className)
Copyright © 2024. All rights reserved.