org.tratoo.mdd.kernel
Interface Repository

All Known Implementing Classes:
AbstractRepositoryImpl

public interface Repository

A Repository provides an implementation of a domain model.

Author:
woelfle

Method Summary
<T> T
createInstance(java.lang.Class<T> domainType)
          Creates an instance of the type specifieed by the parameter 'domainType'.
 java.util.Collection<? extends java.lang.Object> getAllElements()
          Returns all elements in the repository.
 Domain getDomain()
          The Domain the repository realizes.
 java.util.Collection<? extends java.lang.Object> getRootElements()
          Returns the root elements in the repository.
 

Method Detail

getDomain

Domain getDomain()
The Domain the repository realizes.

Returns:
The domain the Repository relizes.

createInstance

<T> T createInstance(java.lang.Class<T> domainType)
Creates an instance of the type specifieed by the parameter 'domainType'.

Type Parameters:
T - The concrete domain type type.
Parameters:
domainType - The domain type for which to create a new instance.
Returns:
The new instance for the requested type.

getRootElements

java.util.Collection<? extends java.lang.Object> getRootElements()
Returns the root elements in the repository. Root elements are elements that are not contained by any other element.

Returns:
The root elements in the repository.

getAllElements

java.util.Collection<? extends java.lang.Object> getAllElements()
Returns all elements in the repository.

Returns:
All elements in the repository.


Copyright © 2007. All Rights Reserved.