com.sri.emo.wizard
Interface WizDefinitionRepository

All Known Implementing Classes:
SelectionWizDefinitionRepository

public interface WizDefinitionRepository

Repository Interface for wizard definitions. Like all repository definitions, this interface helps us to isolate database access from the rest of the program assisting testing and componentization.

Version:
1.0
Author:
Michael Rimov

Field Summary
static String DEFAULT_SORT_ORDER
          Constant to specify that no sort order is specified when listing Wizards.
static List NO_RESULTS
          Special Case constant in case there are no wizards defined.
 
Method Summary
 boolean canRequesterAdd()
          Returns true if the current requester can add.
 WizDefinition findById(int key)
          Find a wizard definition by id.
 List listAll(String sortOrder)
          List all wizards available on the system
 

Field Detail

DEFAULT_SORT_ORDER

static final String DEFAULT_SORT_ORDER
Constant to specify that no sort order is specified when listing Wizards.


NO_RESULTS

static final List NO_RESULTS
Special Case constant in case there are no wizards defined.

Method Detail

findById

WizDefinition findById(int key)
                       throws ObjectNotFoundException,
                              RepositoryException
Find a wizard definition by id.

Parameters:
key - int the wizard id.
Returns:
WizDefinition
Throws:
NonHandleableException - on underlying database error.
DBRecordNotFoundException - if the key doesn't list anything.
ObjectNotFoundException
RepositoryException

listAll

List listAll(String sortOrder)
             throws RepositoryException
List all wizards available on the system

Parameters:
sortOrder - String the field to sort by or DEFAULT_SORT_ORDER if no specific order is desired.
Returns:
A list of wizard definitions. (NO_RESULTS if nothing is found)
Throws:
NonHandleableException - upon underlying query error.
RepositoryException

canRequesterAdd

boolean canRequesterAdd()
                        throws RepositoryException
Returns true if the current requester can add.

Returns:
boolean true.
Throws:
NonHandleableException
RepositoryException


Copyright © 2004-2006 Codeguild, Inc.. All Rights Reserved.