Changeset 542 for geisa/persistence


Ignore:
Timestamp:
07/30/12 18:23:29 (12 years ago)
Author:
npipsl
Message:

Début raffraichissement menu transition quand on clique dessus

Location:
geisa/persistence
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • geisa/persistence/implementation/com/ether/dao/IsotopeG03DAOImpl.java

    r541 r542  
    6363 
    6464    @NotNull 
    65     public List<Pair> getTransitionsLU( final List<String> isotopeNameArray, final Float spectralRangeLower, final Float spectralRangeUpper ) 
     65    public Set<String> getTransitionsUpperByTransitionUpper( final List<String> isotopesSelectedNameList, final Float spectralRangeLower, final Float spectralRangeUpper , final String transitionUpper) 
    6666            throws PersistenceException 
    6767    { 
    68         final DetachedCriteria criteria = DetachedCriteria.forClass( IsotopeG03.class ) 
    69                 .add( Restrictions.in( "chMoleIsot", isotopeNameArray ) ) 
     68 
     69          final DetachedCriteria criteria = DetachedCriteria.forClass( IsotopeG03.class ) 
     70                .add( Restrictions.in( "chMoleIsot", isotopesSelectedNameList ) ) 
    7071                .add( Restrictions.ge( "wavenbMax", spectralRangeLower ) ) 
    7172                .add( Restrictions.le( "wavenbMin", spectralRangeUpper ) ) 
    72                 .setProjection( Projections.projectionList() 
    73                         .add( Projections.property( "codeQuantUpper" ) ) 
    74                         .add( Projections.property( "codeQuantLower" ) )); 
     73                .add( Restrictions.eq( "codeQuantUpper",transitionUpper ) ); 
     74            criteria.setProjection( Projections.distinct( Projections.property( "codeQuantLower" ) )); 
    7575 
    76         return selectAllByCriteria( Pair.class, criteria ); 
     76        final List<String> transitions = selectAllByCriteria( String.class, criteria ); 
     77        return new HashSet<String>( transitions ); 
    7778    } 
    7879 
     
    9293 
    9394    @NotNull 
    94     private Set<String> getTransitions( final List<String> isotopesSelectedNameList, final Float spectralRangeLower, final Float spectralRangeUpper, final boolean isForLower ) 
     95    private Set<String> getTransitions( final List<String> isotopesSelectedNameList, final Float spectralRangeLower, final Float spectralRangeUpper, final boolean isForUpper ) 
    9596            throws PersistenceException 
    9697    { 
     
    100101                .add( Restrictions.le( "wavenbMin", spectralRangeUpper ) ); 
    101102 
    102         if(isForLower) 
     103        if(isForUpper) 
    103104            criteria.setProjection( Projections.distinct( Projections.property( "codeQuantUpper" ) )); 
    104105        else 
  • geisa/persistence/implementation/com/ether/dao/IsotopeG09DAOImpl.java

    r541 r542  
    4242    } 
    4343 
     44     @NotNull 
     45    public Set<String> getTransitionsUpperByTransitionUpper( final List<String> isotopesSelectedNameList, final Float spectralRangeLower, final Float spectralRangeUpper , final String transitionUpper) 
     46            throws PersistenceException 
     47    { 
     48 
     49          final DetachedCriteria criteria = DetachedCriteria.forClass( IsotopeG09.class ) 
     50                .add( Restrictions.in( "chMoleIsot", isotopesSelectedNameList ) ) 
     51                .add( Restrictions.ge( "wavenbMax", spectralRangeLower ) ) 
     52                .add( Restrictions.le( "wavenbMin", spectralRangeUpper ) ) 
     53                .add( Restrictions.eq( "codeQuantUpper",transitionUpper ) ); 
     54            criteria.setProjection( Projections.distinct( Projections.property( "codeQuantLower" ) )); 
     55 
     56        final List<String> transitions = selectAllByCriteria( String.class, criteria ); 
     57        return new HashSet<String>( transitions ); 
     58    } 
     59 
    4460    @NotNull 
    4561    public Set<String> getTransitionsUpper( final List<String> isotopesSelectedNameList, final Float spectralRangeLower, final Float spectralRangeUpper ) 
     
    5773 
    5874    @NotNull 
    59     private Set<String> getTransitions( final List<String> isotopesSelectedNameList, final Float spectralRangeLower, final Float spectralRangeUpper, final boolean isForLower ) 
     75    private Set<String> getTransitions( final List<String> isotopesSelectedNameList, final Float spectralRangeLower, final Float spectralRangeUpper, final boolean isForUpper ) 
    6076            throws PersistenceException 
    6177    { 
     
    6581                .add( Restrictions.le( "wavenbMin", spectralRangeUpper ) ); 
    6682 
    67         if(isForLower) 
     83        if(isForUpper) 
    6884            criteria.setProjection( Projections.distinct( Projections.property( "codeQuantUpper" ) )); 
    6985        else 
  • geisa/persistence/implementation/com/ether/dao/IsotopeIasiG03DAOImpl.java

    r541 r542  
    4444    } 
    4545 
     46     @NotNull 
     47    public Set<String> getTransitionsUpperByTransitionUpper( final List<String> isotopesSelectedNameList, final Float spectralRangeLower, final Float spectralRangeUpper , final String transitionUpper) 
     48            throws PersistenceException 
     49    { 
     50 
     51          final DetachedCriteria criteria = DetachedCriteria.forClass( IsotopeIasiG03.class ) 
     52                .add( Restrictions.in( "chMoleIsot", isotopesSelectedNameList ) ) 
     53                .add( Restrictions.ge( "wavenbMax", spectralRangeLower ) ) 
     54                .add( Restrictions.le( "wavenbMin", spectralRangeUpper ) ) 
     55                .add( Restrictions.eq( "codeQuantUpper",transitionUpper ) ); 
     56            criteria.setProjection( Projections.distinct( Projections.property( "codeQuantLower" ) )); 
     57 
     58        final List<String> transitions = selectAllByCriteria( String.class, criteria ); 
     59        return new HashSet<String>( transitions ); 
     60    } 
     61 
    4662 
    4763    @NotNull 
     
    6076 
    6177    @NotNull 
    62     private Set<String> getTransitions( final List<String> isotopesSelectedNameList, final Float spectralRangeLower, final Float spectralRangeUpper, final boolean isForLower ) 
     78    private Set<String> getTransitions( final List<String> isotopesSelectedNameList, final Float spectralRangeLower, final Float spectralRangeUpper, final boolean isForUpper ) 
    6379            throws PersistenceException 
    6480    { 
     
    6884                .add( Restrictions.le( "wavenbMin", spectralRangeUpper ) ); 
    6985 
    70         if(isForLower) 
     86        if(isForUpper) 
    7187            criteria.setProjection( Projections.distinct( Projections.property( "codeQuantUpper" ) )); 
    7288        else 
  • geisa/persistence/implementation/com/ether/dao/IsotopeIasiG09DAOImpl.java

    r541 r542  
    4242    } 
    4343 
     44     @NotNull 
     45    public Set<String> getTransitionsUpperByTransitionUpper( final List<String> isotopesSelectedNameList, final Float spectralRangeLower, final Float spectralRangeUpper , final String transitionUpper) 
     46            throws PersistenceException 
     47    { 
    4448 
     49          final DetachedCriteria criteria = DetachedCriteria.forClass( IsotopeIasiG09.class ) 
     50                .add( Restrictions.in( "chMoleIsot", isotopesSelectedNameList ) ) 
     51                .add( Restrictions.ge( "wavenbMax", spectralRangeLower ) ) 
     52                .add( Restrictions.le( "wavenbMin", spectralRangeUpper ) ) 
     53                .add( Restrictions.eq( "codeQuantUpper",transitionUpper ) ); 
     54            criteria.setProjection( Projections.distinct( Projections.property( "codeQuantLower" ) )); 
     55 
     56        final List<String> transitions = selectAllByCriteria( String.class, criteria ); 
     57        return new HashSet<String>( transitions ); 
     58    } 
    4559 
    4660    @NotNull 
     
    5973 
    6074    @NotNull 
    61     private Set<String> getTransitions( final List<String> isotopesSelectedNameList, final Float spectralRangeLower, final Float spectralRangeUpper, final boolean isForLower ) 
     75    private Set<String> getTransitions( final List<String> isotopesSelectedNameList, final Float spectralRangeLower, final Float spectralRangeUpper, final boolean isForUpper ) 
    6276            throws PersistenceException 
    6377    { 
     
    6781                .add( Restrictions.le( "wavenbMin", spectralRangeUpper ) ); 
    6882 
    69         if(isForLower) 
     83        if(isForUpper) 
    7084            criteria.setProjection( Projections.distinct( Projections.property( "codeQuantUpper" ) )); 
    7185        else 
  • geisa/persistence/interface/com/ether/dao/IsotopeG03DAO.java

    r541 r542  
    3232 
    3333    @NotNull 
    34     List<Pair> getTransitionsLU( final List<String> isotopeNameArray,final Float spectralRangeLower, final Float spectralRangeUpper ) 
     34    Set<String> getTransitionsUpperByTransitionUpper( final List<String> isotopeNameArray,final Float spectralRangeLower, final Float spectralRangeUpper, final String transitionUpper) 
    3535            throws PersistenceException; 
    3636 
  • geisa/persistence/interface/com/ether/dao/IsotopeG09DAO.java

    r541 r542  
    2222 
    2323    @NotNull 
     24    Set<String> getTransitionsUpperByTransitionUpper( final List<String> isotopeNameArray,final Float spectralRangeLower, final Float spectralRangeUpper, final String transitionUpper) 
     25            throws PersistenceException; 
     26 
     27    @NotNull 
    2428    Set<String> getTransitionsLower( final List<String> isotopesSelectedNameList, final Float spectralRangeLower, final Float spectralRangeUpper ) 
    2529            throws PersistenceException; 
  • geisa/persistence/interface/com/ether/dao/IsotopeIasiG03DAO.java

    r541 r542  
    2222             throws PersistenceException; 
    2323 
     24    @NotNull 
     25    Set<String> getTransitionsUpperByTransitionUpper( final List<String> isotopeNameArray,final Float spectralRangeLower, final Float spectralRangeUpper, final String transitionUpper) 
     26            throws PersistenceException; 
     27 
    2428 
    2529    @NotNull 
  • geisa/persistence/interface/com/ether/dao/IsotopeIasiG09DAO.java

    r541 r542  
    2222 
    2323 
     24    @NotNull 
     25    Set<String> getTransitionsUpperByTransitionUpper( final List<String> isotopeNameArray,final Float spectralRangeLower, final Float spectralRangeUpper, final String transitionUpper) 
     26            throws PersistenceException; 
     27 
     28 
    2429   @NotNull 
    2530    Set<String> getTransitionsLower( final List<String> isotopesSelectedNameList, final Float spectralRangeLower, final Float spectralRangeUpper ) 
Note: See TracChangeset for help on using the changeset viewer.