Skip to main content

Notice: this Wiki will be going read only early in 2024 and edits will no longer be possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.

Jump to: navigation, search

EclipseLink/Development/Dynamic/Design PublicAPI

< EclipseLink‎ | Development‎ | Dynamic
Revision as of 15:08, 17 September 2009 by Michael.norman.oracle.com (Talk | contribs) (Public API)

Public API

This page captures the design of the public API - introduced in the new package org.eclipse.persistence.dynamic -
that allows developers to define and use dynamic entities.

Dynpersist.png

public interface DynamicEntity
  • Primary interface of a dynamic persistent entity. This is the API an application uses to interact with an entity.

DynamicEntity is the public interface for dealing with dynamic persistent objects.
The purpose of dynamic persistent objects is to enable (simple) data access when only mapping information is available
and no concrete Java model is present (specifically, no .class files .)

Applications using DynamicEntity's can access the persistent state using property names which correspond to
the mapped attributes in the underlying EclipseLink descriptors. For properties mapped to containers (Collection,Map, etc.), the property is retrieved then the resulting container can be manipulated.

To discover meta-data about a DynamicEntity's properties, see the DynamicHelper class

Since:
EclipseLink 1.2/2.0
Method Summary
<T> T

get(String propertyPath)
Return the persistence value for the given property as the specified type.
boolean isSet(String propertyPath)
Discover if a property has a persistent value
DynamicEntity set(String propertyPath, Object value)
Set the persistence value for the given property to the specified value


public interface EntityType
  • Provides access to the type information (meta-model) as well as functioning as a factory for new instances

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/2.0
Method Summary
boolean containsProperty(String propertyName)
String getClassName()
o.e.p.descriptors.ClassDescriptor getDescriptor()
Class<?> getJavaClass()
String getName()
Return the entity type's name.
int getNumberOfProperties()
The current number of properties.
EntityType getParentType()
java.util.List<String> getPropertiesNames()
The current names of properties.
int getPropertyIndex(String propertyName)
Class<?> getPropertyType(int propertyIndex)
Class<?> getPropertyType(String propertyName)
DynamicEntity newInstance()


Internal Design

New package org.eclipse.persistence.internal.dynamic

Back to the top