org.spicefactory.pimento.metamodel
Interface Metamodel

All Known Implementing Classes:
MetamodelImpl, TypeHierarchy

public interface Metamodel

Represents the metamodel for all persistent entities of a particular endpoint managed by Pimento.

Author:
Jens Halm

Method Summary
 Entity forClass(Class<?> type)
          Returns the entity metamodel for the specified persistent type.
 Entity forHandle(int handle)
          Returns the entity metamodel for the specified type handle.
 Collection<Entity> getEntities()
          Return all entity metamodels managed by this instance.
 

Method Detail

forClass

Entity forClass(Class<?> type)
Returns the entity metamodel for the specified persistent type.

Parameters:
type - the persistent type to retrieve the metamodel for
Returns:
the entity metamodel for the specified persistent type

forHandle

Entity forHandle(int handle)
Returns the entity metamodel for the specified type handle. Type handles are usually only used internally. To save bandwidth Pimento uses a numeric identifier for an entity type instead of passing class names.

Parameters:
handle - the type handle to retrieve the metamodel for
Returns:
the entity metamodel for the specified type handle

getEntities

Collection<Entity> getEntities()
Return all entity metamodels managed by this instance.

Returns:
all entity metamodels managed by this instance.