Top Description Inners Fields Constructors Methods
org.eclipse.persistence.internal.dynamic

public abstract Class DynamicEntityImpl

extends Object
implements DynamicEntity, PersistenceEntity, ChangeTracker, FetchGroupTracker
Class Inheritance
All Implemented Interfaces
org.eclipse.persistence.queries.FetchGroupTracker, org.eclipse.persistence.descriptors.changetracking.ChangeTracker, org.eclipse.persistence.internal.descriptors.PersistenceEntity, org.eclipse.persistence.dynamic.DynamicEntity
Static Imports
org.eclipse.persistence.internal.helper.Helper.getShortClassName

This abstract class is used to represent an entity which typically is not realized in Java code. In combination with the DynamicClassLoader ASM is used to generate subclasses that will work within EclipseLink's framework. Since no concrete fields or methods exist on this class the mappings used must be customized to use a custom AttributeAccessor (ValuesAccessor).

Type/Property Meta-model: This dynamic entity approach also includes a meta-model facade to simplify access to the types and property information so that clients can more easily understand the model. Each DynamicTypeImpl wraps the underlying EclipseLink relational-descriptor and the DynamicPropertiesManager wraps each mapping. The client application can use these types and properties to facilitate generic access to the entity instances and are required for creating new instances as well as for accessing the Java class needed for JPA and EclipseLink native API calls.

Author
dclarke, mnorman
Since
EclipseLink 1.2

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static class
pack-priv static class

Field Summary

Modifier and TypeField and Description
protected CacheKey
private PropertyChangeListener
changeListener

ChangeListener used for attribute change tracking processed in the property.

private FetchGroup
private Object
primaryKey

Cache the primary key within the entity

protected Map<String, DynamicEntityImpl.PropertyWrapper>
private boolean
private Session

Constructor Summary

AccessConstructor and Description
protected
DynamicEntityImpl()

Instantiates a new dynamic entity impl.

Method Summary

Modifier and TypeMethod and Description
public CacheKey
public FetchGroup
public Object
public PropertyChangeListener
public Session
public boolean

Returns:

true, if successful
_persistence_isAttributeFetched
(String
the attribute
attribute
)

Implements org.eclipse.persistence.queries.FetchGroupTracker._persistence_isAttributeFetched.

Return true if the attribute is in the fetch group being tracked.
public void
_persistence_resetFetchGroup()

Implements org.eclipse.persistence.queries.FetchGroupTracker._persistence_resetFetchGroup.

Reset all attributes of the tracked object to the un-fetched state with initial default values.
public void
public void
public void
public void
public void
_persistence_setSession(Session session)

Implements org.eclipse.persistence.queries.FetchGroupTracker._persistence_setSession.

Set true if the fetch group attributes should be refreshed
public void
_persistence_setShouldRefreshFetchGroup(boolean shouldRefreshFetchGroup)

Implements org.eclipse.persistence.queries.FetchGroupTracker._persistence_setShouldRefreshFetchGroup.

Set true if the fetch group attributes should be refreshed.
public boolean
public abstract DynamicPropertiesManager

Returns:

the dynamic properties manager
fetchPropertiesManager
()

Fetch properties manager.

public <T> T
get(String
the name of a mapped property If the property cannot be found, a DynamicException will be thrown.
propertyName
)

Implements org.eclipse.persistence.dynamic.DynamicEntity.get.

Return the persistence value for the given property as the specified type.
public Map<String, DynamicEntityImpl.PropertyWrapper>

Returns:

the properties map
getPropertiesMap
()

Gets the properties map.

public DynamicTypeImpl

Returns:

Dynamic type of this entity
getType
()

Gets internal impl class of DynamicType.

public boolean
isSet(String
the name of a mapped property If the property cannot be found, a DynamicException will be thrown.
propertyName
)

Implements org.eclipse.persistence.dynamic.DynamicEntity.isSet.

Discover if a property has a persistent value
protected void
postConstruct()

Post construct.

public DynamicEntity
set(String
the name of a mapped property If the property cannot be found, a DynamicException will be thrown.
propertyName
,
Object
the specified object
value
)

Implements org.eclipse.persistence.dynamic.DynamicEntity.set.

Set the persistence value for the given property to the specified value
public DynamicEntity

Returns:

the dynamic entity
set
(String
the property name
propertyName
,
Object
the value
value
,
boolean
the fire property change
firePropertyChange
)

Sets the.

public String

Returns:

the string
toString
()

Overrides java.lang.Object.toString.

String representation of the dynamic entity using the entity type name and the primary key values - something like {Emp 10} or {Phone 234-5678 10}.
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAllwaitwaitwait