Vordel SDK

com.vordel.es
Interface TypeStore

All Known Subinterfaces:
EntityStore

public interface TypeStore

Defines a common interface for retrieving Entity type information, EntityTypes, which in turn describe Entity structure.
Broken out from the EntityStore API for possible future enhancements, whereby Entities may exist outside of any given store. Practically speaking, an EntityStore can never exist without a corresponding TypeStore, but Entities may exist (in the future) without belonging to a particular EntityStore, but will always require a TypeStore to house their EntityType definitons.


Field Summary
static java.lang.String BASE_TYPE_NAME
          The root EntityType name.
 
Method Summary
 EntityType addType(java.io.InputStream stream)
          This method adds a new type to the EntityStore
 EntityType getBaseType()
          This method is used to retrieve the base entity type definition.
 java.util.Collection<java.lang.String> getSubtypes(java.lang.String type)
          Get the names of the immediate descendants of the type specified.
 EntityType getTypeForName(java.lang.String name)
          This method is used to retrieve an EntityType based on it's name.
 void reset()
          Remove all non-default Entities and reset the core Types.
 EntityType updateType(java.io.InputStream stream)
          This method updates a type in the EntityStore with a new definiton.
 

Field Detail

BASE_TYPE_NAME

static final java.lang.String BASE_TYPE_NAME
The root EntityType name. All EntityTypes are sub-types of this one.

See Also:
Constant Field Values
Method Detail

getBaseType

EntityType getBaseType()
                       throws EntityStoreException
This method is used to retrieve the base entity type definition. This will be a type named "Entity"

Returns:
EntityType
Throws:
EntityStoreException - if an error occurs

getTypeForName

EntityType getTypeForName(java.lang.String name)
                          throws EntityStoreException,
                                 UnknownTypeException
This method is used to retrieve an EntityType based on it's name.

Parameters:
name -
Returns:
The EntityType for the given name
Throws:
EntityStoreException - if there was a problem retrieving the type from the underlying persistent store
UnknownTypeException - if no type for this name exists

getSubtypes

java.util.Collection<java.lang.String> getSubtypes(java.lang.String type)
                                                   throws EntityStoreException
Get the names of the immediate descendants of the type specified.

Parameters:
type - The name of the parent type
Returns:
A collection containing the names of the immediate subtypes of the parent. This method is intended to be used in a tree browser, where you don't necessarily want to retrieve the full type definition in one fell swoop
Throws:
EntityStoreExeption - Thrown if the type specified does not exist in the Store.
EntityStoreException

addType

EntityType addType(java.io.InputStream stream)
                   throws EntityStoreException
This method adds a new type to the EntityStore

Parameters:
stream - The stream from which to read the EntityType definition
Returns:
The newly added EntityType
Throws:
EntityStoreException - Thrown if the type already exists.

updateType

EntityType updateType(java.io.InputStream stream)
                      throws EntityStoreException
This method updates a type in the EntityStore with a new definiton.

Parameters:
stream - The stream from which to read the EntityType definition
Returns:
The newly updated EntityType
Throws:
EntityStoreException - Thrown if the type does not already exist.

reset

void reset()
           throws EntityStoreException
Remove all non-default Entities and reset the core Types. Doesn't reset the implementation specific schemas (i.e. tables in jdbc, objectClasses in ldap etc.)

Throws:
EntityStoreException - if the store cannot be cleared

Vordel SDK


This documentation and all its contents and graphics, copyright © 1999 - 2011 Vordel