Module org.eclipse.persistence.core
Class DynamicTypeImpl
java.lang.Object
org.eclipse.persistence.internal.dynamic.DynamicTypeImpl
- All Implemented Interfaces:
Cloneable
,DynamicType
- Direct Known Subclasses:
XRDynamicType
An EntityType provides a metadata facade into the EclipseLink
object-relational metadata (descriptors & mappings) with specific knowledge
of the entity types being dynamic.
- Since:
- EclipseLink 1.2
-
Field Summary
Modifier and TypeFieldDescriptionprotected ClassDescriptor
protected DynamicPropertiesManager
protected Set
<DatabaseMapping> These properties require initialization when a new instance is created.protected DynamicType
Fields inherited from interface org.eclipse.persistence.dynamic.DynamicType
DESCRIPTOR_PROPERTY
-
Constructor Summary
ModifierConstructorDescriptionprotected
DynamicTypeImpl
(ClassDescriptor descriptor, DynamicType parentType) Creation of an EntityTypeImpl for an existing Descriptor with mappings. -
Method Summary
Modifier and TypeMethodDescriptionvoid
Ensure the value being set is supported by the mapping.clone()
boolean
containsProperty
(String propertyName) Class
<? extends DynamicEntity> getMapping
(String propertyName) getName()
Return the entity type's name.int
The current number of properties.The current names of properties.int
getPropertyIndex
(String propertyName) Class
<?> getPropertyType
(int propertyIndex) Class
<?> getPropertyType
(String propertyName) boolean
void
setDescriptor
(ClassDescriptor descriptor) void
toString()
-
Field Details
-
descriptor
-
parentType
-
dpm
-
mappingsRequiringInitialization
These properties require initialization when a new instance is created. This includes properties that are primitives as well as relationships requiring indirection ValueHolders or collections.
-
-
Constructor Details
-
DynamicTypeImpl
protected DynamicTypeImpl() -
DynamicTypeImpl
Creation of an EntityTypeImpl for an existing Descriptor with mappings.
-
-
Method Details
-
clone
-
getDescriptor
- Specified by:
getDescriptor
in interfaceDynamicType
- Returns:
- the underlying
ClassDescriptor
for the mapped type
-
setDescriptor
-
getDynamicPropertiesManager
-
setDynamicPropertiesManager
-
getParentType
- Specified by:
getParentType
in interfaceDynamicType
- Returns:
- The parent type or null if this type does not have a persistent superclass
-
getMappings
-
getName
Description copied from interface:DynamicType
Return the entity type's name. This is the short name of the class or theClassDescriptor.getAlias()
- Specified by:
getName
in interfaceDynamicType
- See Also:
-
getClassName
- Specified by:
getClassName
in interfaceDynamicType
- Returns:
- Fully qualified name of mapped class.
-
getNumberOfProperties
public int getNumberOfProperties()Description copied from interface:DynamicType
The current number of properties.Note: Some implementations support adding mapped attributes at runtime so it is best to avoid caching the result.
- Specified by:
getNumberOfProperties
in interfaceDynamicType
-
getMappingsRequiringInitialization
-
isInitialized
public boolean isInitialized() -
containsProperty
- Specified by:
containsProperty
in interfaceDynamicType
-
getJavaClass
- Specified by:
getJavaClass
in interfaceDynamicType
-
getMapping
-
getPropertiesNames
Description copied from interface:DynamicType
The current names of properties.Note: Some implementations support adding mapped attributes at runtime so it is best to avoid caching the result.
- Specified by:
getPropertiesNames
in interfaceDynamicType
-
getPropertyType
- Specified by:
getPropertyType
in interfaceDynamicType
-
newDynamicEntity
- Specified by:
newDynamicEntity
in interfaceDynamicType
-
checkSet
Ensure the value being set is supported by the mapping. If the mapping is direct/basic and the mapping's type is primitive ensure the non-primitive type is allowed.- Throws:
DynamicException
-
getPropertyIndex
- Specified by:
getPropertyIndex
in interfaceDynamicType
-
getPropertyType
- Specified by:
getPropertyType
in interfaceDynamicType
-
toString
-