org.odata4j.producer.jpa
Class JPAEdmGenerator

java.lang.Object
  extended by org.odata4j.producer.jpa.JPAEdmGenerator
All Implemented Interfaces:
EdmGenerator
Direct Known Subclasses:
EclipseLinkJPAEdmGenerator

public class JPAEdmGenerator
extends Object
implements EdmGenerator


Constructor Summary
JPAEdmGenerator(EntityManagerFactory emf, String namespace)
           
 
Method Summary
 EdmDataServices.Builder generateEdm(EdmDecorator decorator)
          Produces a new mutable EdmDataServices model given an optional decorator.
protected static String getAssociationName(List<EdmAssociation.Builder> associations, EdmEntityType.Builder fromEntityType, EdmEntityType.Builder toEntityType)
           
protected  String getContainerSchemaNamespace()
           
protected  String getEntityContainerName()
           
protected  EntityManagerFactory getEntityManagerFactory()
           
static
<X> String
getEntitySetName(EntityType<X> et)
           
static
<X> SingularAttribute<? super X,?>
getIdAttribute(EntityType<X> et)
           
protected  String getModelSchemaNamespace()
           
protected  String getNamespace()
           
protected  List<EdmProperty.Builder> getProperties(String modelNamespace, ManagedType<?> et)
           
protected  TemporalType getTemporalType(SingularAttribute<?,?> sa)
           
protected  EdmProperty.Builder toEdmProperty(String modelNamespace, SingularAttribute<?,?> sa)
           
protected  EdmSimpleType<?> toEdmType(SingularAttribute<?,?> sa)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JPAEdmGenerator

public JPAEdmGenerator(EntityManagerFactory emf,
                       String namespace)
Method Detail

generateEdm

public EdmDataServices.Builder generateEdm(EdmDecorator decorator)
Description copied from interface: EdmGenerator
Produces a new mutable EdmDataServices model given an optional decorator.

Specified by:
generateEdm in interface EdmGenerator

getAssociationName

protected static String getAssociationName(List<EdmAssociation.Builder> associations,
                                           EdmEntityType.Builder fromEntityType,
                                           EdmEntityType.Builder toEntityType)

getContainerSchemaNamespace

protected String getContainerSchemaNamespace()

getEntityContainerName

protected String getEntityContainerName()

getEntityManagerFactory

protected EntityManagerFactory getEntityManagerFactory()

getEntitySetName

public static <X> String getEntitySetName(EntityType<X> et)

getIdAttribute

public static <X> SingularAttribute<? super X,?> getIdAttribute(EntityType<X> et)

getModelSchemaNamespace

protected String getModelSchemaNamespace()

getNamespace

protected String getNamespace()

getProperties

protected List<EdmProperty.Builder> getProperties(String modelNamespace,
                                                  ManagedType<?> et)

getTemporalType

protected TemporalType getTemporalType(SingularAttribute<?,?> sa)

toEdmProperty

protected EdmProperty.Builder toEdmProperty(String modelNamespace,
                                            SingularAttribute<?,?> sa)

toEdmType

protected EdmSimpleType<?> toEdmType(SingularAttribute<?,?> sa)


http://odata4j.org