|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.odata4j.producer.jpa.JPAProducer
public class JPAProducer
Constructor Summary | |
---|---|
JPAProducer(EntityManagerFactory emf,
EdmDataServices metadata,
int maxResults)
|
|
JPAProducer(EntityManagerFactory emf,
String namespace,
int maxResults)
|
Method Summary | |
---|---|
void |
close()
Releases any resources managed by this producer. |
protected static Object |
coercePropertyValue(OProperty<?> prop,
Class<?> javaType)
|
EntityResponse |
createEntity(String entitySetName,
OEntity entity)
Creates a new OData entity. |
EntityResponse |
createEntity(String entitySetName,
OEntityKey entityKey,
String navProp,
OEntity entity)
Creates a new OData entity as a reference of an existing entity, implicitly linked to the existing entity by a navigation property. |
void |
deleteEntity(String entitySetName,
OEntityKey entityKey)
Deletes an existing entity. |
EntitiesResponse |
getEntities(String entitySetName,
QueryInfo queryInfo)
Gets all the entities for a given set matching the query information. |
EntityResponse |
getEntity(String entitySetName,
OEntityKey entityKey)
Obtains a single entity based on its type and key. |
EdmDataServices |
getMetadata()
Obtains the service metadata for this producer. |
BaseResponse |
getNavProperty(String entitySetName,
OEntityKey entityKey,
String navProp,
QueryInfo queryInfo)
Given a specific entity, follow one of its navigation properties, applying constraints as appropriate. |
void |
mergeEntity(String entitySetName,
OEntity entity)
Modifies an existing entity using merge semantics. |
void |
updateEntity(String entitySetName,
OEntity entity)
Modifies an existing entity using update semantics. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public JPAProducer(EntityManagerFactory emf, EdmDataServices metadata, int maxResults)
public JPAProducer(EntityManagerFactory emf, String namespace, int maxResults)
Method Detail |
---|
public void close()
ODataProducer
close
in interface ODataProducer
protected static Object coercePropertyValue(OProperty<?> prop, Class<?> javaType)
public EntityResponse createEntity(String entitySetName, OEntity entity)
ODataProducer
createEntity
in interface ODataProducer
entitySetName
- the entity-set nameentity
- the request entity sent from the client
public EntityResponse createEntity(String entitySetName, OEntityKey entityKey, String navProp, OEntity entity)
ODataProducer
createEntity
in interface ODataProducer
entitySetName
- the entity-set name of the existing entityentityKey
- the entity-key of the existing entitynavProp
- the navigation property off of the existing entityentity
- the request entity sent from the client
public void deleteEntity(String entitySetName, OEntityKey entityKey)
ODataProducer
deleteEntity
in interface ODataProducer
entitySetName
- the entity-set name of the entityentityKey
- the entity-key of the entitypublic EntitiesResponse getEntities(String entitySetName, QueryInfo queryInfo)
ODataProducer
getEntities
in interface ODataProducer
entitySetName
- the entity-set name for entities to returnqueryInfo
- the additional constraints to apply to the entities
public EntityResponse getEntity(String entitySetName, OEntityKey entityKey)
ODataProducer
getEntity
in interface ODataProducer
entitySetName
- the entity-set name for the entity to returnentityKey
- the unique entity-key within the set
public EdmDataServices getMetadata()
ODataProducer
getMetadata
in interface ODataProducer
public BaseResponse getNavProperty(String entitySetName, OEntityKey entityKey, String navProp, QueryInfo queryInfo)
ODataProducer
getNavProperty
in interface ODataProducer
entitySetName
- the entity-set of the entity to start withentityKey
- the unique entity-key of the entity to start withnavProp
- the navigation property to followqueryInfo
- additional constraints to apply to the result
public void mergeEntity(String entitySetName, OEntity entity)
ODataProducer
mergeEntity
in interface ODataProducer
entitySetName
- the entity-set nameentity
- the entity modifications sent from the clientpublic void updateEntity(String entitySetName, OEntity entity)
ODataProducer
updateEntity
in interface ODataProducer
entitySetName
- the entity-set nameentity
- the entity modifications sent from the client
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |