@Mojo(name="enhance") public class HibernateEnhancementMojo extends org.apache.maven.plugin.AbstractMojo implements EnhancementContext
This plugin will enhance Entity objects.
| Constructor and Description |
|---|
HibernateEnhancementMojo() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
doDirtyCheckingInline(javassist.CtClass classDescriptor)
|
void |
execute() |
ClassLoader |
getLoadingClassLoader()
|
boolean |
hasLazyLoadableAttributes(javassist.CtClass classDescriptor)
|
boolean |
isCompositeClass(javassist.CtClass classDescriptor)
|
boolean |
isEntityClass(javassist.CtClass classDescriptor)
|
boolean |
isLazyLoadable(javassist.CtField field)
|
boolean |
isMappedCollection(javassist.CtField field) |
boolean |
isPersistentField(javassist.CtField ctField)
|
javassist.CtField[] |
order(javassist.CtField[] persistentFields)
|
public void execute()
throws org.apache.maven.plugin.MojoExecutionException,
org.apache.maven.plugin.MojoFailureException
execute in interface org.apache.maven.plugin.Mojoorg.apache.maven.plugin.MojoExecutionExceptionorg.apache.maven.plugin.MojoFailureExceptionpublic ClassLoader getLoadingClassLoader()
EnhancementContextObtain access to the ClassLoader that can be used to load Class references. In JPA SPI terms, this
should be a "temporary class loader" as defined by
PersistenceUnitInfo.getNewTempClassLoader()
getLoadingClassLoader in interface EnhancementContextpublic boolean isEntityClass(javassist.CtClass classDescriptor)
EnhancementContextDoes the given class descriptor represent a entity class?
isEntityClass in interface EnhancementContextclassDescriptor - The descriptor of the class to check.true if the class is an entity; false otherwise.public boolean isCompositeClass(javassist.CtClass classDescriptor)
EnhancementContextDoes the given class name represent an embeddable/component class?
isCompositeClass in interface EnhancementContextclassDescriptor - The descriptor of the class to check.true if the class is an embeddable/component; false otherwise.public boolean doDirtyCheckingInline(javassist.CtClass classDescriptor)
EnhancementContextShould we in-line dirty checking for persistent attributes for this class?
doDirtyCheckingInline in interface EnhancementContextclassDescriptor - The descriptor of the class to check.true indicates that dirty checking should be in-lined within the entity; false
indicates it should not. In-lined is more easily serializable and probably more performant.public boolean hasLazyLoadableAttributes(javassist.CtClass classDescriptor)
EnhancementContextDoes the given class define any lazy loadable attributes?
hasLazyLoadableAttributes in interface EnhancementContextclassDescriptor - The class to checkpublic boolean isLazyLoadable(javassist.CtField field)
EnhancementContextDetermine if a field is lazy loadable.
isLazyLoadable in interface EnhancementContextfield - The field to checktrue if the field is lazy loadable; false otherwise.public boolean isPersistentField(javassist.CtField ctField)
EnhancementContextDoes the field represent persistent state? Persistent fields will be "enhanced". <p/> may be better to perform basic checks in the caller (non-static, etc) and call out with just the Class name and field name…
isPersistentField in interface EnhancementContextctField - The field reference.true if the field is ; false otherwise.public boolean isMappedCollection(javassist.CtField field)
isMappedCollection in interface EnhancementContextfield - the field to checktrue if the field is mappedpublic javassist.CtField[] order(javassist.CtField[] persistentFields)
EnhancementContextFor fields which are persistent (according to EnhancementContext.isPersistentField(javassist.CtField)), determine the corresponding ordering
maintained within the Hibernate metamodel.
order in interface EnhancementContextpersistentFields - The persistent field references.Copyright © 2001-2014 Red Hat, Inc. All Rights Reserved.