edu.nrao.sss.model.proposal
Interface ProposalProvider


public interface ProposalProvider

A provider of proposals.

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
 Proposal findByCode(String proposalCode)
          Returns the Proposal with the given proposalId, if any.
 Proposal findById(long id)
          Returns the Proposal with the given id, if any.
 List<Proposal> findByUserId(long uid)
           
 List<Proposal> findProposals(Long userId, ProposalStatus status)
          This method returns a List of Projects owned by userId that have a status of status.
 List<Proposal> findProposals(ProposalStatus status)
          returns a non-null (but possibly empty) list of Proposals that have the Proposal Status of status
 List<Proposal> getAllProposals()
          Returns a list of all proposals held by this provider.
 

Method Detail

findById

Proposal findById(long id)
                  throws RepositoryException
Returns the Proposal with the given id, if any.

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

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

findByCode

Proposal findByCode(String proposalCode)
                    throws RepositoryException
Returns the Proposal with the given proposalId, if any.

If this provider holds no Proposal with the given proposal ID, null is returned.

Parameters:
proposalCode - the identifier for a Proposal in this repository.
Returns:
the Proposal with the given id, or null, if this provider holds no such Proposal.
Throws:
RepositoryException - if anything goes wrong while trying to fetch proposals from this provider.

findByUserId

List<Proposal> findByUserId(long uid)
                            throws RepositoryException
Returns:
a List (possibly empty) of Proposals that uid is an editor of. This method should not return null.
Throws:
RepositoryException

findProposals

List<Proposal> findProposals(Long userId,
                             ProposalStatus status)
                             throws RepositoryException
This method returns a List of Projects owned by userId that have a status of status.

Returns:
A list of projects. The list may be empty, but should not be null!
Throws:
RepositoryException

findProposals

List<Proposal> findProposals(ProposalStatus status)
                             throws RepositoryException
returns a non-null (but possibly empty) list of Proposals that have the Proposal Status of status

Parameters:
status - the status to search for.
Returns:
a non-null list of Proposals.
Throws:
RepositoryException

getAllProposals

List<Proposal> getAllProposals()
                               throws RepositoryException
Returns a list of all proposals held by this provider.

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


Copyright © 2009. All Rights Reserved.