public abstract class DynamicEntityImpl extends java.lang.Object implements DynamicEntity, PersistenceEntity, ChangeTracker, FetchGroupTracker, PersistenceWeavedRest
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.
| Modifier and Type | Class and Description |
|---|---|
static class |
DynamicEntityImpl.PropertyWrapper |
| Constructor and Description |
|---|
DynamicEntityImpl()
Instantiates a new dynamic entity impl.
|
| Modifier and Type | Method and Description |
|---|---|
CacheKey |
_persistence_getCacheKey() |
FetchGroup |
_persistence_getFetchGroup()
Return the fetch group being tracked
|
Link |
_persistence_getHref() |
java.lang.Object |
_persistence_getId() |
ItemLinks |
_persistence_getLinks() |
java.beans.PropertyChangeListener |
_persistence_getPropertyChangeListener()
PUBLIC:
Return the PropertyChangeListener for the object.
|
java.util.List<RelationshipInfo> |
_persistence_getRelationships() |
Session |
_persistence_getSession()
Return the session for the object.
|
boolean |
_persistence_isAttributeFetched(java.lang.String attribute)
Return true if the attribute is in the fetch group being tracked.
|
void |
_persistence_resetFetchGroup()
Reset all attributes of the tracked object to the un-fetched state with
initial default values.
|
void |
_persistence_setCacheKey(CacheKey cacheKey) |
void |
_persistence_setFetchGroup(FetchGroup group)
Set a fetch group to be tracked.
|
void |
_persistence_setHref(Link href) |
void |
_persistence_setId(java.lang.Object pk) |
void |
_persistence_setLinks(ItemLinks links) |
void |
_persistence_setPropertyChangeListener(java.beans.PropertyChangeListener listener)
PUBLIC:
Set the PropertyChangeListener for the object.
|
void |
_persistence_setRelationships(java.util.List<RelationshipInfo> relationships) |
void |
_persistence_setSession(Session session)
Set true if the fetch group attributes should be refreshed
|
void |
_persistence_setShouldRefreshFetchGroup(boolean shouldRefreshFetchGroup)
Set true if the fetch group attributes should be refreshed.
|
boolean |
_persistence_shouldRefreshFetchGroup()
Return true if the fetch group attributes should be refreshed.
|
abstract DynamicPropertiesManager |
fetchPropertiesManager()
Fetch properties manager.
|
<T> T |
get(java.lang.String propertyName)
Return the persistence value for the given property as the specified type.
|
java.util.Map<java.lang.String,DynamicEntityImpl.PropertyWrapper> |
getPropertiesMap()
Gets the properties map.
|
DynamicTypeImpl |
getType()
Gets internal impl class of
DynamicType. |
boolean |
isSet(java.lang.String propertyName)
Discover if a property has a persistent value
|
DynamicEntity |
set(java.lang.String propertyName,
java.lang.Object value)
Set the persistence value for the given property to the specified value
|
DynamicEntity |
set(java.lang.String propertyName,
java.lang.Object value,
boolean firePropertyChange)
Sets the.
|
java.lang.String |
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}.
|
public DynamicEntityImpl()
public abstract DynamicPropertiesManager fetchPropertiesManager()
public java.util.Map<java.lang.String,DynamicEntityImpl.PropertyWrapper> getPropertiesMap()
public DynamicTypeImpl getType() throws DynamicException
DynamicType.DynamicException - if type is nullpublic <T> T get(java.lang.String propertyName)
throws DynamicException
DynamicEntityget in interface DynamicEntityT - generic type of the property (if not provided, assume Object).
If the property cannot be cast to the specific type, a DynamicExceptionwill be thrown.propertyName - the name of a mapped property
If the property cannot be found, a DynamicException will be thrown.DynamicExceptionpublic boolean isSet(java.lang.String propertyName)
throws DynamicException
DynamicEntityisSet in interface DynamicEntitypropertyName - the name of a mapped property
If the property cannot be found, a DynamicException will be thrown.DynamicExceptionpublic DynamicEntity set(java.lang.String propertyName, java.lang.Object value) throws DynamicException
DynamicEntityset in interface DynamicEntitypropertyName - the name of a mapped property
If the property cannot be found, a DynamicException will be thrown.value - the specified objectDynamicExceptionpublic DynamicEntity set(java.lang.String propertyName, java.lang.Object value, boolean firePropertyChange) throws DynamicException
propertyName - the property namevalue - the valuefirePropertyChange - the fire property changeDynamicException - the dynamic exceptionpublic java.lang.Object _persistence_getId()
_persistence_getId in interface PersistenceEntitypublic void _persistence_setId(java.lang.Object pk)
_persistence_setId in interface PersistenceEntitypublic CacheKey _persistence_getCacheKey()
_persistence_getCacheKey in interface PersistenceEntitypublic void _persistence_setCacheKey(CacheKey cacheKey)
_persistence_setCacheKey in interface PersistenceEntitypublic java.beans.PropertyChangeListener _persistence_getPropertyChangeListener()
ChangeTracker_persistence_getPropertyChangeListener in interface ChangeTrackerpublic void _persistence_setPropertyChangeListener(java.beans.PropertyChangeListener listener)
ChangeTracker_persistence_setPropertyChangeListener in interface ChangeTrackerpublic FetchGroup _persistence_getFetchGroup()
FetchGroupTracker_persistence_getFetchGroup in interface FetchGroupTrackerpublic void _persistence_setFetchGroup(FetchGroup group)
FetchGroupTracker_persistence_setFetchGroup in interface FetchGroupTrackerpublic void _persistence_setShouldRefreshFetchGroup(boolean shouldRefreshFetchGroup)
FetchGroupTracker_persistence_setShouldRefreshFetchGroup in interface FetchGroupTrackerpublic boolean _persistence_shouldRefreshFetchGroup()
FetchGroupTracker_persistence_shouldRefreshFetchGroup in interface FetchGroupTrackerpublic boolean _persistence_isAttributeFetched(java.lang.String attribute)
_persistence_isAttributeFetched in interface FetchGroupTrackerattribute - the attributepublic void _persistence_resetFetchGroup()
_persistence_resetFetchGroup in interface FetchGroupTrackerpublic java.util.List<RelationshipInfo> _persistence_getRelationships()
_persistence_getRelationships in interface PersistenceWeavedRestpublic void _persistence_setRelationships(java.util.List<RelationshipInfo> relationships)
_persistence_setRelationships in interface PersistenceWeavedRestpublic Link _persistence_getHref()
_persistence_getHref in interface PersistenceWeavedRestpublic void _persistence_setHref(Link href)
_persistence_setHref in interface PersistenceWeavedRestpublic Session _persistence_getSession()
FetchGroupTracker_persistence_getSession in interface FetchGroupTrackerpublic void _persistence_setSession(Session session)
FetchGroupTracker_persistence_setSession in interface FetchGroupTrackerpublic ItemLinks _persistence_getLinks()
_persistence_getLinks in interface PersistenceWeavedRestpublic void _persistence_setLinks(ItemLinks links)
_persistence_setLinks in interface PersistenceWeavedRestpublic java.lang.String toString()
toString in class java.lang.ObjectEclipseLink 2.6.3, "build v20160428-59c81c5" API Reference