|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.tools.ant.ProjectComponent
org.apache.tools.ant.Task
org.hibernate.tool.enhance.EnhancementTask
public class EnhancementTask
Ant task for performing build-time enhancement of entities and component/embeddable classes.
IMPL NOTE : currently makes numerous assumptions, the most "horrific" being that all entities are annotated @Entity which precludeshbm.xml
mappings as well as complete orm.xml
mappings. This is
just a PoC though...
Managed
Field Summary |
---|
Fields inherited from class org.apache.tools.ant.Task |
---|
target, taskName, taskType, wrapper |
Fields inherited from class org.apache.tools.ant.ProjectComponent |
---|
description, location, project |
Constructor Summary | |
---|---|
EnhancementTask()
|
Method Summary | |
---|---|
void |
addFileset(org.apache.tools.ant.types.FileSet set)
|
boolean |
doDirtyCheckingInline(javassist.CtClass classDescriptor)
Should we in-line dirty checking for persistent attributes for this class? |
void |
execute()
|
ClassLoader |
getLoadingClassLoader()
Obtain access to the ClassLoader that can be used to load Class references. |
boolean |
hasLazyLoadableAttributes(javassist.CtClass classDescriptor)
|
boolean |
isCompositeClass(javassist.CtClass classDescriptor)
Does the given class name represent an embeddable/component class? |
boolean |
isEntityClass(javassist.CtClass classDescriptor)
Does the given class descriptor represent a entity class? |
boolean |
isLazyLoadable(javassist.CtField field)
|
boolean |
isMappedCollection(javassist.CtField field)
|
boolean |
isPersistentField(javassist.CtField ctField)
Does the field represent persistent state? Persistent fields will be "enhanced". |
javassist.CtField[] |
order(javassist.CtField[] persistentFields)
For fields which are persistent (according to EnhancementContext.isPersistentField(javassist.CtField) ), determine the corresponding ordering
maintained within the Hibernate metamodel. |
Methods inherited from class org.apache.tools.ant.Task |
---|
bindToOwner, getOwningTarget, getRuntimeConfigurableWrapper, getTaskName, getTaskType, getWrapper, handleErrorFlush, handleErrorOutput, handleFlush, handleInput, handleOutput, init, isInvalid, log, log, log, log, maybeConfigure, perform, reconfigure, setOwningTarget, setRuntimeConfigurableWrapper, setTaskName, setTaskType |
Methods inherited from class org.apache.tools.ant.ProjectComponent |
---|
clone, getDescription, getLocation, getProject, setDescription, setLocation, setProject |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public EnhancementTask()
Method Detail |
---|
public void addFileset(org.apache.tools.ant.types.FileSet set)
public void execute() throws org.apache.tools.ant.BuildException
execute
in class org.apache.tools.ant.Task
org.apache.tools.ant.BuildException
public ClassLoader getLoadingClassLoader()
EnhancementContext
PersistenceUnitInfo.getNewTempClassLoader()
getLoadingClassLoader
in interface EnhancementContext
public boolean isEntityClass(javassist.CtClass classDescriptor)
EnhancementContext
isEntityClass
in interface EnhancementContext
classDescriptor
- The descriptor of the class to check.
true
if the class is an entity; false
otherwise.public boolean isCompositeClass(javassist.CtClass classDescriptor)
EnhancementContext
isCompositeClass
in interface EnhancementContext
classDescriptor
- The descriptor of the class to check.
true
if the class is an embeddable/component; false
otherwise.public boolean doDirtyCheckingInline(javassist.CtClass classDescriptor)
EnhancementContext
doDirtyCheckingInline
in interface EnhancementContext
classDescriptor
- 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)
hasLazyLoadableAttributes
in interface EnhancementContext
public boolean isLazyLoadable(javassist.CtField field)
isLazyLoadable
in interface EnhancementContext
public boolean isPersistentField(javassist.CtField ctField)
EnhancementContext
isPersistentField
in interface EnhancementContext
ctField
- The field reference.
true
if the field is ; false
otherwise.public boolean isMappedCollection(javassist.CtField field)
isMappedCollection
in interface EnhancementContext
field
- the field to check
true
if the field is mappedpublic javassist.CtField[] order(javassist.CtField[] persistentFields)
EnhancementContext
EnhancementContext.isPersistentField(javassist.CtField)
), determine the corresponding ordering
maintained within the Hibernate metamodel.
order
in interface EnhancementContext
persistentFields
- The persistent field references.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |