Changeset 536 for geisa/service


Ignore:
Timestamp:
07/25/12 18:37:30 (12 years ago)
Author:
npipsl
Message:

Interrogation BDD transition

Location:
geisa/service
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • geisa/service/implementation/com/ether/GeisaServiceImpl.java

    r533 r536  
    22 
    33import com.ether.dao.IsotopeG03DAO; 
     4import com.ether.dao.IsotopeG09DAO; 
     5import com.ether.dao.IsotopeIasiG03DAO; 
     6import com.ether.dao.IsotopeIasiG09DAO; 
    47import org.apache.commons.logging.Log; 
    58import org.apache.commons.logging.LogFactory; 
     
    912 
    1013import java.util.List; 
     14import java.util.Set; 
    1115 
    1216/** 
     
    3438    @NotNull 
    3539    @Transactional(readOnly = true) 
    36     public List<IsotopeG03> getTransitionsByIsotopeG03Name( final String isotopeName ) 
     40    public List<IsotopeG03> getTransitionsByIsotopeG03Name( final List<String> isotopeNameArray, final Float spectralRangeLower, final Float spectralRangeUpper) 
    3741            throws ServiceException 
    3842    { 
    3943        try 
    4044        { 
    41             return _isotopeG03DAO.getTransitionsByIsotopeG03Name(isotopeName); 
     45            return _isotopeG03DAO.getTransitionsByIsotopeG03Name( isotopeNameArray, spectralRangeLower, spectralRangeUpper ); 
     46        } 
     47        catch( PersistenceException e ) 
     48        { 
     49            throw new ServiceException( ServiceException.ServiceCode.ISOTOPE_NOT_FOUND, e ); 
     50        } 
     51    } 
     52 
     53    @NotNull 
     54    @Transactional(readOnly = true) 
     55    public List<Pair> getTransitionsLU( final List<String> isotopeNameArray, final Float spectralRangeLower, final Float spectralRangeUpper ) 
     56            throws ServiceException 
     57    { 
     58        try 
     59        { 
     60            return _isotopeG03DAO.getTransitionsLU( isotopeNameArray, spectralRangeLower, spectralRangeUpper ); 
     61        } 
     62        catch( PersistenceException e ) 
     63        { 
     64            throw new ServiceException( ServiceException.ServiceCode.ISOTOPE_NOT_FOUND, e ); 
     65        } 
     66    } 
     67 
     68    @NotNull 
     69    @Transactional(readOnly = true) 
     70    public List<IsotopeG03> getTransitionsByIsotopeG03NameByTransitionLower( final String isotopeName, final Float spectralRangeLower, final Float spectralRangeUpper, final String transitionLower) 
     71            throws ServiceException 
     72    { 
     73        try 
     74        { 
     75            return _isotopeG03DAO.getTransitionsByIsotopeG03NameByTransitionLower( isotopeName, spectralRangeLower, spectralRangeUpper, transitionLower ); 
     76        } 
     77        catch( PersistenceException e ) 
     78        { 
     79            throw new ServiceException( ServiceException.ServiceCode.ISOTOPE_NOT_FOUND, e ); 
     80        } 
     81    } 
     82 
     83    @NotNull 
     84    @Transactional(readOnly = true) 
     85    public Set<String> getTransitionsLower( final Object geisaSelectedDatabase, final List<String> isotopesSelectedNameList, final Float spectralRangeLower, final Float spectralRangeUpper ) 
     86            throws ServiceException 
     87    { 
     88        try 
     89        { 
     90            if(geisaSelectedDatabase.equals( IsotopeG03.class.toString() )) 
     91                return _isotopeG03DAO.getTransitionsLower( isotopesSelectedNameList, spectralRangeLower, spectralRangeUpper ); 
     92            else if(geisaSelectedDatabase.equals( IsotopeG09.class.toString() )) 
     93                return _isotopeG09DAO.getTransitionsLower( isotopesSelectedNameList, spectralRangeLower, spectralRangeUpper ); 
     94            else if(geisaSelectedDatabase.equals( IsotopeIasiG03.class.toString() )) 
     95                return _isotopeIasiG03DAO.getTransitionsLower( isotopesSelectedNameList, spectralRangeLower, spectralRangeUpper ); 
     96            else 
     97                return _isotopeIasiG09DAO.getTransitionsLower( isotopesSelectedNameList, spectralRangeLower, spectralRangeUpper ); 
     98 
     99 
     100 
     101        } 
     102        catch( PersistenceException e ) 
     103        { 
     104            throw new ServiceException( ServiceException.ServiceCode.ISOTOPE_NOT_FOUND, e ); 
     105        } 
     106    } 
     107 
     108    @NotNull 
     109    @Transactional(readOnly = true) 
     110    public Set<String> getTransitionsUpper( final Object geisaSelectedDatabase, final List<String> isotopesSelectedNameList, final Float spectralRangeLower, final Float spectralRangeUpper ) 
     111            throws ServiceException 
     112    { 
     113        try 
     114        { 
     115            if(geisaSelectedDatabase.equals( IsotopeG03.class.toString() )) 
     116                return _isotopeG03DAO.getTransitionsUpper( isotopesSelectedNameList, spectralRangeLower, spectralRangeUpper ); 
     117            else if(geisaSelectedDatabase.equals( IsotopeG09.class.toString() )) 
     118                return _isotopeG09DAO.getTransitionsUpper( isotopesSelectedNameList, spectralRangeLower, spectralRangeUpper ); 
     119            else if(geisaSelectedDatabase.equals( IsotopeIasiG03.class.toString() )) 
     120                return _isotopeIasiG03DAO.getTransitionsUpper( isotopesSelectedNameList, spectralRangeLower, spectralRangeUpper ); 
     121            else 
     122                return _isotopeIasiG09DAO.getTransitionsUpper( isotopesSelectedNameList, spectralRangeLower, spectralRangeUpper ); 
    42123        } 
    43124        catch( PersistenceException e ) 
     
    53134    } 
    54135 
     136    @Required 
     137    public void setIsotopeG09DAO( final IsotopeG09DAO isotopeG09DAO ) 
     138    { 
     139        _isotopeG09DAO = isotopeG09DAO; 
     140    } 
     141 
     142    @Required 
     143    public void setIsotopeIasiG03DAO( final IsotopeIasiG03DAO isotopeIasiG03DAO ) 
     144    { 
     145        _isotopeIasiG03DAO = isotopeIasiG03DAO; 
     146    } 
     147 
     148    @Required 
     149    public void setIsotopeIasiG09DAO( final IsotopeIasiG09DAO isotopeIasiG09DAO ) 
     150    { 
     151        _isotopeIasiG09DAO = isotopeIasiG09DAO; 
     152    } 
     153 
    55154    private static final Log LOGGER = LogFactory.getLog( GeisaServiceImpl.class ); 
    56155 
    57156    private IsotopeG03DAO _isotopeG03DAO; 
    58  
     157    private IsotopeG09DAO _isotopeG09DAO; 
     158    private IsotopeIasiG03DAO _isotopeIasiG03DAO; 
     159    private IsotopeIasiG09DAO _isotopeIasiG09DAO; 
    59160} 
  • geisa/service/interface/com/ether/GeisaService.java

    r533 r536  
    66 
    77import java.util.List; 
     8import java.util.Set; 
    89 
    910/** 
     
    1415        extends Service 
    1516{ 
    16         @NotNull 
     17    @NotNull 
    1718    List<IsotopeG03> getAllIsotopeG03() throws ServiceException; 
    1819 
    1920    @NotNull 
    20     List<IsotopeG03> getTransitionsByIsotopeG03Name( final String isotopeName ) throws ServiceException; 
     21    List<IsotopeG03> getTransitionsByIsotopeG03Name( final List<String> isotopeNameArray, final Float spectralRangeLower, final Float spectralRangeUpper ) throws ServiceException; 
    2122 
     23    @NotNull 
     24    List<Pair> getTransitionsLU( final List<String> isotopeNameArray, final Float spectralRangeLower, final Float spectralRangeUpper ) throws ServiceException; 
     25 
     26    @NotNull 
     27    List<IsotopeG03> getTransitionsByIsotopeG03NameByTransitionLower( final String isotopeName, final Float spectralRangeLower, final Float spectralRangeUpper, final String transitionLower ) throws ServiceException; 
     28 
     29    @NotNull 
     30    Set<String> getTransitionsLower( final Object geisaSelectedDatabase, final List<String> isotopesSelectedNameList, final Float spectralRangeLower, final Float spectralRangeUpper ) 
     31            throws ServiceException; 
     32 
     33    @NotNull 
     34    Set<String> getTransitionsUpper( final Object geisaSelectedDatabase, final List<String> isotopesSelectedNameList,final  Float spectralRangeLower,final Float spectralRangeUpper ) 
     35            throws ServiceException; 
    2236} 
Note: See TracChangeset for help on using the changeset viewer.