edu.nrao.sss.model.parameter
Interface ParameterProvider


public interface ParameterProvider

A provider of astronomical parameters.

CVS Info:

$Revision: 161 $
$Date: 2006-12-15 11:48:34 -0700 (Fri, 15 Dec 2006) $
$Author: btruitt $

Since:
2006-08-03
Author:
David M. Harland

Method Summary
 Parameter findParameterById(long id)
          Returns the Parameter with the given id, if any.
 List<Parameter> findParameterByName(String name)
          Returns the Parameter(s) with the given name, if any.
 List<Parameter> getParameters()
          Returns a list of all parameters held by this provider.
 List<Parameter> getParameters(ParameterFilter filter)
          Returns a list of parameters held this provider that can pass through filter.
 

Method Detail

findParameterById

Parameter findParameterById(long id)
                            throws RepositoryException
Returns the Parameter with the given id, if any.

If this provider holds no Parameter with an ID of id, null is returned.

Parameters:
id - the identifier (primary key) for a Parameter in this repository.
Returns:
The Parameter with the given id, or null, if this provider holds no such Parameter.
Throws:
RepositoryException - if anything goes wrong while trying to fetch parameters from this provider.

findParameterByName

List<Parameter> findParameterByName(String name)
                                    throws RepositoryException
Returns the Parameter(s) with the given name, if any.

Ideally, the returned list will contain only one parameter. However, since the name is not usually used as a primary key to a parameter, it is possible that the returned list may contain more than one parameter. If this provider holds no Parameter with a name of name, the returned list will be empty.

Parameters:
name - the name of a Parameter requested from this provider.
Returns:
The Parameters with the given name, or null, if this provider holds no such Parameter.
Throws:
RepositoryException - if anything goes wrong while trying to fetch parameters from this provider.

getParameters

List<Parameter> getParameters(ParameterFilter filter)
                              throws RepositoryException
Returns a list of parameters held this provider that can pass through filter. If filter is null, it will be treated as a wide-open filter, allowing all parameters to pass.

Parameters:
filter - the filter through which a parameter must pass in order to be included in the returned set.
Returns:
a list of parameters that can pass through filter.
Throws:
RepositoryException - if anything goes wrong while trying to fetch parameters from this provider.

getParameters

List<Parameter> getParameters()
                              throws RepositoryException
Returns a list of all parameters held by this provider.

Returns:
a list of all parameters held by this provider. If the provider has no parameters the returned list will be empty.
Throws:
RepositoryException - if anything goes wrong while trying to fetch parameters from this provider.


Copyright © 2009. All Rights Reserved.