net.sf.blunder.service.persistence
Interface BlunderPersistenceService

All Known Implementing Classes:
BlunderBinaryService, BlunderHibernateService, BlunderOpenCsvService, InMemoryPersistenceService

public interface BlunderPersistenceService

Interface for defining a persistence service for Blunder. If you plan to write your own persistence mechanism, you should start writing your own implementation of this class.

Author:
Ambrosi Lucas
See Also:
InMemoryPersistenceService

Method Summary
 void delete(ExceptionRelation relation)
          Deletes a new ExceptionRelation.
 List<ExceptionRelation> findBy(String leafClassname, String rootClassname, String businessClassname)
          Finds an ExceptionRelation for the following arguments.
 List<ExceptionRelation> findByBusiness(String businessClassname)
          Finds an ExceptionRelation for the following arguments.
 List<ExceptionRelation> findByLeaf(String leafClassname)
          Finds an ExceptionRelation for the following arguments.
 List<ExceptionRelation> findByLeafAndBusiness(String leafClassname, String businessClassname)
          Finds an ExceptionRelation for the following arguments.
 List<ExceptionRelation> findByLeafAndRoot(String leafClassname, String rootClassname)
          Finds an ExceptionRelation for the following arguments.
 List<ExceptionRelation> findByRoot(String rootClassname)
          Finds an ExceptionRelation for the following arguments.
 ExceptionRelation findDefaultRelation()
           
 void learn(ExceptionRelation relation)
          Learns a new ExceptionRelation.
 void refresh()
          Refresh the persistence service.
 void update(ExceptionRelation relation)
          Updates a known ExceptionRelation.
 

Method Detail

findBy

List<ExceptionRelation> findBy(String leafClassname,
                               String rootClassname,
                               String businessClassname)
Finds an ExceptionRelation for the following arguments.

Parameters:
leafClassname - class name of the highest level Exception in the chain.
rootClassname - class name of the lowest level Exception in the chain.
businessClassname - class name of the business Exception in the chain.
Returns:
a List of ExceptionRelation with all relations that matches with the previous parameters.
See Also:
RelationResolver

findByLeafAndBusiness

List<ExceptionRelation> findByLeafAndBusiness(String leafClassname,
                                              String businessClassname)
Finds an ExceptionRelation for the following arguments.

Parameters:
leafClassname - class name of the highest level Exception in the chain.
businessClassname - class name of the business Exception in the chain.
Returns:
a List of ExceptionRelation with all relations that matches with the previous parameters.
See Also:
RelationResolver

findByLeafAndRoot

List<ExceptionRelation> findByLeafAndRoot(String leafClassname,
                                          String rootClassname)
Finds an ExceptionRelation for the following arguments.

Parameters:
leafClassname - class name of the highest level Exception in the chain.
rootClassname - class name of the lowest level Exception in the chain.
Returns:
a List of ExceptionRelation with all relations that matches with the previous parameters.
See Also:
RelationResolver

findByRoot

List<ExceptionRelation> findByRoot(String rootClassname)
Finds an ExceptionRelation for the following arguments.

Parameters:
rootClassname - class name of the lowest level Exception in the chain.
Returns:
a List of ExceptionRelation with all relations that matches with the previous parameters.
See Also:
RelationResolver

findByLeaf

List<ExceptionRelation> findByLeaf(String leafClassname)
Finds an ExceptionRelation for the following arguments.

Parameters:
leafClassname - class name of the highest level Exception in the chain.
Returns:
a List of ExceptionRelation with all relations that matches with the previous parameters.
See Also:
RelationResolver

findByBusiness

List<ExceptionRelation> findByBusiness(String businessClassname)
Finds an ExceptionRelation for the following arguments.

Parameters:
businessClassname - class name of the business Exception in the chain.
Returns:
a List of ExceptionRelation with all relations that matches with the previous parameters.
See Also:
RelationResolver

findDefaultRelation

ExceptionRelation findDefaultRelation()
Returns:
the default ExceptionRelation.

learn

void learn(ExceptionRelation relation)
Learns a new ExceptionRelation.

Parameters:
relation - the ExceptionRelation to learn.

update

void update(ExceptionRelation relation)
Updates a known ExceptionRelation.

Parameters:
relation - the ExceptionRelation to update.

delete

void delete(ExceptionRelation relation)
Deletes a new ExceptionRelation.

Parameters:
relation - the ExceptionRelation to delete.

refresh

void refresh()
Refresh the persistence service. This should be used to clear all data in the local cache.



Copyright © 2009 Blunder. All Rights Reserved.