org.spicefactory.pimento.service
Interface EntityManagerProxy

All Known Implementing Classes:
DefaultEntityManagerProxy

@CinnamonService
public interface EntityManagerProxy

Server-side proxy for the EntityManager remote service.

The method signatures of this service interface are different than that of the corresponding AS3 EntityManager interface since Pimento modifies some of the parameters and return values under the hood.

This class should be exposed for clients through a Spring ApplicationContext. It is usually not used in server-side application code directly.

Author:
Jens Halm

Method Summary
 Object executeQuery(DefaultQuery query, int typeHandle)
          Executes the specified query and returns the result.
 Object initialize(int typeHandle, Object primaryKey)
          Intializes the entity with the specified primary key and type handle.
 Object initialize(int typeHandle, Object primaryKey, String propertyName)
          Loads the collection property for the entity with the specified primary key and type handle.
 Object load(int typeHandle, Object primaryKey)
          Loads the entity with the specified primary key and type handle.
 void merge(Object entity)
          Merges the specified entity.
 void persist(Object entity)
          Persists the specified entity.
 Object refresh(int typeHandle, Object primaryKey)
          Refreshes the entity with the specified primary key and type handle.
 void remove(int typeHandle, Object primaryKey)
          Removes the entity with the specified primary key and type handle.
 

Method Detail

executeQuery

Object executeQuery(DefaultQuery query,
                    int typeHandle)
Executes the specified query and returns the result.

Parameters:
query - the query to execute
typeHandle - the type handle of the result objects or 0 if not specified
Returns:
the result of the query

load

Object load(int typeHandle,
            Object primaryKey)
Loads the entity with the specified primary key and type handle.

Parameters:
typeHandle - the type handle of the entity
primaryKey - the primary key of the entity
Returns:
the entity with the specified primary key and type handle

refresh

Object refresh(int typeHandle,
               Object primaryKey)
Refreshes the entity with the specified primary key and type handle.

Parameters:
typeHandle - the type handle of the entity
primaryKey - the primary key of the entity
Returns:
the entity with the specified primary key and type handle

initialize

Object initialize(int typeHandle,
                  Object primaryKey)
Intializes the entity with the specified primary key and type handle.

Parameters:
typeHandle - the type handle of the entity
primaryKey - the primary key of the entity
Returns:
the entity with the specified primary key and type handle

initialize

Object initialize(int typeHandle,
                  Object primaryKey,
                  String propertyName)
Loads the collection property for the entity with the specified primary key and type handle.

Parameters:
typeHandle - the type handle of the owning entity
primaryKey - the primary key of the owning entity
propertyName - the name of the collection property
Returns:
the entity with the specified primary key and type handle

persist

void persist(Object entity)
Persists the specified entity.

Parameters:
entity - the entity to persist.

merge

void merge(Object entity)
Merges the specified entity.

Parameters:
entity - the entity to merge

remove

void remove(int typeHandle,
            Object primaryKey)
Removes the entity with the specified primary key and type handle.

Parameters:
typeHandle - the type handle of the entity to remove
primaryKey - the primary key of the entity to remove