Top Description Fields Constructors Methods
org.eclipse.persistence.internal.jpa.weaving

public Class ClassDetails

extends Object
Class Inheritance
Imports
java.util.ArrayList, .Iterator, .List, .Map, org.eclipse.persistence.internal.descriptors.VirtualAttributeMethodInfo, org.eclipse.persistence.internal.jpa.metadata.accessors.objects.MetadataClass

Internal helper class that holds details of a persistent class. Used by PersistenceWeaver

Field Summary

Modifier and TypeField and Description
protected Map<String, AttributeDetails>
attributesMap

Map of this class' persistent attributes where the key is the Attribute name.

protected String
className

Name of this class.

protected MetadataClass
protected Map<String, AttributeDetails>
getterMethodToAttributeDetails

Map of this class' persistent get methods where the key is the getMethod name.

protected boolean
implementsCloneMethod

Determine if this class specifically implements a clone method

protected boolean
isEmbedable

Determine if a JPA "embedable" (aggregate).

protected boolean
isMappedSuperClass

Determine if a JPA "mapped superclass".

protected Map<String, AttributeDetails>
setterMethodToAttributeDetails

Map of this class' persistent set methods where the key is the setMethod name.

protected boolean
shouldWeaveChangeTracking

Define if change tracking should be weaved in this class.

protected boolean
shouldWeaveConstructorOptimization

Determine if a new constructor can be used to bypass setting variables to default values.

protected boolean
shouldWeaveFetchGroups

Define if fetch groups should be weaved in this class.

protected boolean
shouldWeaveInternal

Define if internal optimizations should be weaved in this class.

protected boolean
shouldWeaveRest

Define if this class should be weaved for our REST support

protected boolean
shouldWeaveValueHolders

Define if lazy value holders should be weaved in this class.

protected ClassDetails
superClassDetails

Superclass' ClassDetails - only populated if superclass is also persistent.

protected String
superClassName

Superclass' name.

protected boolean
usesAttributeAccess

Determine if class uses attribute access, lazily initialized.

protected List<VirtualAttributeMethodInfo>
virtualAccessMethods

The methods that are used by virtual attributes as getter methods.

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public boolean
public boolean
canWeaveConstructorOptimization()

Returns true if Used with field access, and is set to false if transient variables are discovered

public boolean
public AttributeDetails
public Map<String, AttributeDetails>
public String
public MetadataClass
public Map<String, AttributeDetails>
public boolean
public VirtualAttributeMethodInfo
getInfoForVirtualGetMethod(String getMethodName)

INTERNAL: Search the list of virtualAccessMethods for a VirtualAttributeMethodInfo with the given getMethodName.

public VirtualAttributeMethodInfo
getInfoForVirtualSetMethod(String setMethodName)

INTERNAL: Search the list of virtualAccessMethods for a VirtualAttributeMethodInfo with the given setMethodName.

public String
getNameOfSuperclassImplementingCloneMethod()

Return the name of the most direct superclass that has a direct implementation of a clone method.

public Map<String, AttributeDetails>
public ClassDetails
public String
public List<VirtualAttributeMethodInfo>
public boolean
public boolean
isInMetadataHierarchy(String className)

Returns true if the given class name represents this class, or any superclass that can be navigated to by recursively navigating up the structure of superClassDetails stored in this class.

public boolean
isInSuperclassHierarchy(String className)

Returns true if the given class name represents this class, or any superclass that can be navigated to by recursively navigating up the structure of superClassDetails stored in this class.

public boolean
public void
public void
setClassName(String className)

public void
public void
public void
setImplementsCloneMethod(boolean implementsCloneMethod)

public void
setIsEmbedable(boolean isEmbedable)

public void
setIsMappedSuperClass(boolean isMappedSuperClass)

public void
public void
setShouldWeaveChangeTracking(boolean shouldWeaveChangeTracking)

public void
setShouldWeaveConstructorOptimization(boolean shouldWeaveConstructorOptimization)

public void
setShouldWeaveFetchGroups(boolean shouldWeaveFetchGroups)

public void
setShouldWeaveInternal(boolean shouldWeaveInternal)

public void
setShouldWeaveREST(boolean shouldWeaveRest)

public void
setShouldWeaveValueHolders(boolean shouldWeaveValueHolders)

public void
public void
setSuperClassName(String superClassName)

public void
public boolean
public boolean
public boolean
public boolean
public boolean
public void
public boolean
usesAttributeAccess()

If one attribute of this class uses attribute access, by the JPA specification, all attributes must use attribute access This method assumes it is called when this class details is completely initialized.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

attributesMapback to summary
protected Map<String, AttributeDetails> attributesMap

Map of this class' persistent attributes where the key is the Attribute name.

classNameback to summary
protected String className

Name of this class.

describedClassback to summary
protected MetadataClass describedClass
getterMethodToAttributeDetailsback to summary
protected Map<String, AttributeDetails> getterMethodToAttributeDetails

Map of this class' persistent get methods where the key is the getMethod name.

implementsCloneMethodback to summary
protected boolean implementsCloneMethod

Determine if this class specifically implements a clone method

isEmbedableback to summary
protected boolean isEmbedable

Determine if a JPA "embedable" (aggregate).

isMappedSuperClassback to summary
protected boolean isMappedSuperClass

Determine if a JPA "mapped superclass".

setterMethodToAttributeDetailsback to summary
protected Map<String, AttributeDetails> setterMethodToAttributeDetails

Map of this class' persistent set methods where the key is the setMethod name.

shouldWeaveChangeTrackingback to summary
protected boolean shouldWeaveChangeTracking

Define if change tracking should be weaved in this class.

shouldWeaveConstructorOptimizationback to summary
protected boolean shouldWeaveConstructorOptimization

Determine if a new constructor can be used to bypass setting variables to default values.

shouldWeaveFetchGroupsback to summary
protected boolean shouldWeaveFetchGroups

Define if fetch groups should be weaved in this class.

shouldWeaveInternalback to summary
protected boolean shouldWeaveInternal

Define if internal optimizations should be weaved in this class.

shouldWeaveRestback to summary
protected boolean shouldWeaveRest

Define if this class should be weaved for our REST support

shouldWeaveValueHoldersback to summary
protected boolean shouldWeaveValueHolders

Define if lazy value holders should be weaved in this class.

superClassDetailsback to summary
protected ClassDetails superClassDetails

Superclass' ClassDetails - only populated if superclass is also persistent.

superClassNameback to summary
protected String superClassName

Superclass' name.

usesAttributeAccessback to summary
protected boolean usesAttributeAccess

Determine if class uses attribute access, lazily initialized.

virtualAccessMethodsback to summary
protected List<VirtualAttributeMethodInfo> virtualAccessMethods

The methods that are used by virtual attributes as getter methods. These will be used by our weaver to properly weave those methods This list should be kept in sync with virtualSetMethodNames. Every time a value is added, one should be added to virtualSetMethodNames so that at a particular index, the virtualGetMethodName and the virtualSetMethodCoorespond

Constructor Detail

ClassDetailsback to summary
public ClassDetails()

Method Detail

canWeaveChangeTrackingback to summary
public boolean canWeaveChangeTracking()
canWeaveConstructorOptimizationback to summary
public boolean canWeaveConstructorOptimization()

Returns true if Used with field access, and is set to false if transient variables are discovered

doesSuperclassWeaveChangeTrackingback to summary
public boolean doesSuperclassWeaveChangeTracking()
getAttributeDetailsFromClassOrSuperClassback to summary
public AttributeDetails getAttributeDetailsFromClassOrSuperClass(String attributeName)
getAttributesMapback to summary
public Map<String, AttributeDetails> getAttributesMap()
getClassNameback to summary
public String getClassName()
getDescribedClassback to summary
public MetadataClass getDescribedClass()
getGetterMethodToAttributeDetailsback to summary
public Map<String, AttributeDetails> getGetterMethodToAttributeDetails()
getImplementsCloneMethodback to summary
public boolean getImplementsCloneMethod()
getInfoForVirtualGetMethodback to summary
public VirtualAttributeMethodInfo getInfoForVirtualGetMethod(String getMethodName)

INTERNAL: Search the list of virtualAccessMethods for a VirtualAttributeMethodInfo with the given getMethodName. Return the VirtualAttributeMethodInfo if there is one, else return null

getInfoForVirtualSetMethodback to summary
public VirtualAttributeMethodInfo getInfoForVirtualSetMethod(String setMethodName)

INTERNAL: Search the list of virtualAccessMethods for a VirtualAttributeMethodInfo with the given setMethodName. Return the VirtualAttributeMethodInfo if there is one, else return null

getNameOfSuperclassImplementingCloneMethodback to summary
public String getNameOfSuperclassImplementingCloneMethod()

Return the name of the most direct superclass that has a direct implementation of a clone method. If there is not one, return null

getSetterMethodToAttributeDetailsback to summary
public Map<String, AttributeDetails> getSetterMethodToAttributeDetails()
getSuperClassDetailsback to summary
public ClassDetails getSuperClassDetails()
getSuperClassNameback to summary
public String getSuperClassName()
getVirtualAccessMethodsback to summary
public List<VirtualAttributeMethodInfo> getVirtualAccessMethods()
isEmbedableback to summary
public boolean isEmbedable()
isInMetadataHierarchyback to summary
public boolean isInMetadataHierarchy(String className)

Returns true if the given class name represents this class, or any superclass that can be navigated to by recursively navigating up the structure of superClassDetails stored in this class. Assume java.lang.Object is in the hierarchy

isInSuperclassHierarchyback to summary
public boolean isInSuperclassHierarchy(String className)

Returns true if the given class name represents this class, or any superclass that can be navigated to by recursively navigating up the structure of superClassDetails stored in this class. Assume java.lang.Object is in the hierarchy

isMappedSuperClassback to summary
public boolean isMappedSuperClass()
setAttributesMapback to summary
public void setAttributesMap(Map<String, AttributeDetails> attributesMap)
setClassNameback to summary
public void setClassName(String className)
setDescribedClassback to summary
public void setDescribedClass(MetadataClass describedClass)
setGetterMethodToAttributeDetailsback to summary
public void setGetterMethodToAttributeDetails(Map<String, AttributeDetails> map)
setImplementsCloneMethodback to summary
public void setImplementsCloneMethod(boolean implementsCloneMethod)
setIsEmbedableback to summary
public void setIsEmbedable(boolean isEmbedable)
setIsMappedSuperClassback to summary
public void setIsMappedSuperClass(boolean isMappedSuperClass)
setSetterMethodToAttributeDetailsback to summary
public void setSetterMethodToAttributeDetails(Map<K, V> map)
setShouldWeaveChangeTrackingback to summary
public void setShouldWeaveChangeTracking(boolean shouldWeaveChangeTracking)
setShouldWeaveConstructorOptimizationback to summary
public void setShouldWeaveConstructorOptimization(boolean shouldWeaveConstructorOptimization)
setShouldWeaveFetchGroupsback to summary
public void setShouldWeaveFetchGroups(boolean shouldWeaveFetchGroups)
setShouldWeaveInternalback to summary
public void setShouldWeaveInternal(boolean shouldWeaveInternal)
setShouldWeaveRESTback to summary
public void setShouldWeaveREST(boolean shouldWeaveRest)
setShouldWeaveValueHoldersback to summary
public void setShouldWeaveValueHolders(boolean shouldWeaveValueHolders)
setSuperClassDetailsback to summary
public void setSuperClassDetails(ClassDetails superClassDetails)
setSuperClassNameback to summary
public void setSuperClassName(String superClassName)
setVirtualAccessMethodsback to summary
public void setVirtualAccessMethods(List<VirtualAttributeMethodInfo> virtualAccessMethods)
shouldWeaveChangeTrackingback to summary
public boolean shouldWeaveChangeTracking()
shouldWeaveFetchGroupsback to summary
public boolean shouldWeaveFetchGroups()
shouldWeaveInternalback to summary
public boolean shouldWeaveInternal()
shouldWeaveRESTback to summary
public boolean shouldWeaveREST()
shouldWeaveValueHoldersback to summary
public boolean shouldWeaveValueHolders()
useAttributeAccessback to summary
public void useAttributeAccess()
usesAttributeAccessback to summary
public boolean usesAttributeAccess()

If one attribute of this class uses attribute access, by the JPA specification, all attributes must use attribute access This method assumes it is called when this class details is completely initialized.