Changeset 542 for geisa/persistence
- Timestamp:
- 07/30/12 18:23:29 (12 years ago)
- Location:
- geisa/persistence
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
geisa/persistence/implementation/com/ether/dao/IsotopeG03DAOImpl.java
r541 r542 63 63 64 64 @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) 66 66 throws PersistenceException 67 67 { 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 ) ) 70 71 .add( Restrictions.ge( "wavenbMax", spectralRangeLower ) ) 71 72 .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" ) )); 75 75 76 return selectAllByCriteria( Pair.class, criteria ); 76 final List<String> transitions = selectAllByCriteria( String.class, criteria ); 77 return new HashSet<String>( transitions ); 77 78 } 78 79 … … 92 93 93 94 @NotNull 94 private Set<String> getTransitions( final List<String> isotopesSelectedNameList, final Float spectralRangeLower, final Float spectralRangeUpper, final boolean isFor Lower )95 private Set<String> getTransitions( final List<String> isotopesSelectedNameList, final Float spectralRangeLower, final Float spectralRangeUpper, final boolean isForUpper ) 95 96 throws PersistenceException 96 97 { … … 100 101 .add( Restrictions.le( "wavenbMin", spectralRangeUpper ) ); 101 102 102 if(isFor Lower)103 if(isForUpper) 103 104 criteria.setProjection( Projections.distinct( Projections.property( "codeQuantUpper" ) )); 104 105 else -
geisa/persistence/implementation/com/ether/dao/IsotopeG09DAOImpl.java
r541 r542 42 42 } 43 43 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 44 60 @NotNull 45 61 public Set<String> getTransitionsUpper( final List<String> isotopesSelectedNameList, final Float spectralRangeLower, final Float spectralRangeUpper ) … … 57 73 58 74 @NotNull 59 private Set<String> getTransitions( final List<String> isotopesSelectedNameList, final Float spectralRangeLower, final Float spectralRangeUpper, final boolean isFor Lower )75 private Set<String> getTransitions( final List<String> isotopesSelectedNameList, final Float spectralRangeLower, final Float spectralRangeUpper, final boolean isForUpper ) 60 76 throws PersistenceException 61 77 { … … 65 81 .add( Restrictions.le( "wavenbMin", spectralRangeUpper ) ); 66 82 67 if(isFor Lower)83 if(isForUpper) 68 84 criteria.setProjection( Projections.distinct( Projections.property( "codeQuantUpper" ) )); 69 85 else -
geisa/persistence/implementation/com/ether/dao/IsotopeIasiG03DAOImpl.java
r541 r542 44 44 } 45 45 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 46 62 47 63 @NotNull … … 60 76 61 77 @NotNull 62 private Set<String> getTransitions( final List<String> isotopesSelectedNameList, final Float spectralRangeLower, final Float spectralRangeUpper, final boolean isFor Lower )78 private Set<String> getTransitions( final List<String> isotopesSelectedNameList, final Float spectralRangeLower, final Float spectralRangeUpper, final boolean isForUpper ) 63 79 throws PersistenceException 64 80 { … … 68 84 .add( Restrictions.le( "wavenbMin", spectralRangeUpper ) ); 69 85 70 if(isFor Lower)86 if(isForUpper) 71 87 criteria.setProjection( Projections.distinct( Projections.property( "codeQuantUpper" ) )); 72 88 else -
geisa/persistence/implementation/com/ether/dao/IsotopeIasiG09DAOImpl.java
r541 r542 42 42 } 43 43 44 @NotNull 45 public Set<String> getTransitionsUpperByTransitionUpper( final List<String> isotopesSelectedNameList, final Float spectralRangeLower, final Float spectralRangeUpper , final String transitionUpper) 46 throws PersistenceException 47 { 44 48 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 } 45 59 46 60 @NotNull … … 59 73 60 74 @NotNull 61 private Set<String> getTransitions( final List<String> isotopesSelectedNameList, final Float spectralRangeLower, final Float spectralRangeUpper, final boolean isFor Lower )75 private Set<String> getTransitions( final List<String> isotopesSelectedNameList, final Float spectralRangeLower, final Float spectralRangeUpper, final boolean isForUpper ) 62 76 throws PersistenceException 63 77 { … … 67 81 .add( Restrictions.le( "wavenbMin", spectralRangeUpper ) ); 68 82 69 if(isFor Lower)83 if(isForUpper) 70 84 criteria.setProjection( Projections.distinct( Projections.property( "codeQuantUpper" ) )); 71 85 else -
geisa/persistence/interface/com/ether/dao/IsotopeG03DAO.java
r541 r542 32 32 33 33 @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) 35 35 throws PersistenceException; 36 36 -
geisa/persistence/interface/com/ether/dao/IsotopeG09DAO.java
r541 r542 22 22 23 23 @NotNull 24 Set<String> getTransitionsUpperByTransitionUpper( final List<String> isotopeNameArray,final Float spectralRangeLower, final Float spectralRangeUpper, final String transitionUpper) 25 throws PersistenceException; 26 27 @NotNull 24 28 Set<String> getTransitionsLower( final List<String> isotopesSelectedNameList, final Float spectralRangeLower, final Float spectralRangeUpper ) 25 29 throws PersistenceException; -
geisa/persistence/interface/com/ether/dao/IsotopeIasiG03DAO.java
r541 r542 22 22 throws PersistenceException; 23 23 24 @NotNull 25 Set<String> getTransitionsUpperByTransitionUpper( final List<String> isotopeNameArray,final Float spectralRangeLower, final Float spectralRangeUpper, final String transitionUpper) 26 throws PersistenceException; 27 24 28 25 29 @NotNull -
geisa/persistence/interface/com/ether/dao/IsotopeIasiG09DAO.java
r541 r542 22 22 23 23 24 @NotNull 25 Set<String> getTransitionsUpperByTransitionUpper( final List<String> isotopeNameArray,final Float spectralRangeLower, final Float spectralRangeUpper, final String transitionUpper) 26 throws PersistenceException; 27 28 24 29 @NotNull 25 30 Set<String> getTransitionsLower( final List<String> isotopesSelectedNameList, final Float spectralRangeLower, final Float spectralRangeUpper )
Note: See TracChangeset
for help on using the changeset viewer.