Changeset 828 for raptor-client


Ignore:
Timestamp:
05/17/11 14:51:51 (9 years ago)
Author:
philsmart
Message:
 
Location:
raptor-client/trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • raptor-client/trunk/pom.xml

    r823 r828  
    2929    <properties> 
    3030        <apache.cxf.version>2.2.7</apache.cxf.version> 
     31        <spring.version>3.0.3.RELEASE</spring.version> 
    3132    </properties> 
    3233 
     
    3435 
    3536        <!-- Shibboleth V3 dependencies --> 
    36         <!-- <dependency> <groupId>net.shibboleth.idp</groupId> <artifactId>idp-attribute-resolver-api</artifactId> <version>3.0-SNAPSHOT</version>  
    37             </dependency> <dependency> <groupId>net.shibboleth.idp</groupId> <artifactId>idp-attribute-resolver-impl</artifactId> <version>3.0-SNAPSHOT</version>  
     37        <!-- <dependency> <groupId>net.shibboleth.idp</groupId> <artifactId>idp-attribute-resolver-api</artifactId> <version>3.0-SNAPSHOT</version> 
     38            </dependency> <dependency> <groupId>net.shibboleth.idp</groupId> <artifactId>idp-attribute-resolver-impl</artifactId> <version>3.0-SNAPSHOT</version> 
    3839            </dependency> --> 
    3940 
     
    172173            <groupId>org.springframework</groupId> 
    173174            <artifactId>spring-orm</artifactId> 
    174             <version>3.0.2.RELEASE</version> 
     175            <version>${spring.version}</version> 
    175176        </dependency> 
    176177 
  • raptor-client/trunk/src/main/java/uk/ac/cardiff/raptor/event/expansion/ResourceCategoryAttributeAssociationDefinition.java

    r817 r828  
    2020 
    2121 
    22 import org.hibernate.exception.DataException; 
    2322import org.slf4j.Logger; 
    2423import org.slf4j.LoggerFactory; 
     24import org.springframework.dao.DataAccessException; 
    2525 
    2626import uk.ac.cardiff.model.event.Event; 
     
    7373               dataConnection.save(resourceNew); 
    7474           } 
    75            catch(DataException e){ 
     75           catch(DataAccessException e){ 
    7676               log.error("Could not save new resource metadata {}",e.getMessage()); 
    7777               return false; 
  • raptor-client/trunk/src/main/java/uk/ac/cardiff/raptor/store/EntryHandler.java

    r808 r828  
    2626import java.util.Set; 
    2727 
    28 import org.hibernate.exception.DataException; 
    2928import org.joda.time.DateTime; 
    3029 
     
    6968         */ 
    7069        public void removeAllEntries(); 
    71          
     70 
    7271        public void update(String query, Object[] parameters) throws StorageException; 
    7372 
     
    9897         */ 
    9998        public List query(String query, Object[] parameters, int maxNoResults); 
    100          
     99 
    101100        public void save(Object object) throws StorageException; 
    102          
     101 
    103102        public void saveAll(Collection object) throws StorageException; 
    104103        /** 
  • raptor-client/trunk/src/main/java/uk/ac/cardiff/raptor/store/impl/PersistantEntryHandler.java

    r823 r828  
    2626import java.util.Set; 
    2727 
    28 import org.hibernate.exception.DataException; 
     28import org.springframework.dao.DataAccessException; 
    2929import org.joda.time.DateTime; 
    3030import org.slf4j.Logger; 
    3131import org.slf4j.LoggerFactory; 
    32 import org.springframework.dao.DataAccessException; 
    3332 
    3433import uk.ac.cardiff.model.event.Event; 
     
    112111                        dataConnection.save(object); 
    113112                } 
    114                 catch (DataException e){ 
     113                catch (DataAccessException e){ 
    115114                        throw new StorageException("Could not save object",e); 
    116115                } 
     
    121120                        dataConnection.saveAll(object); 
    122121                } 
    123                 catch (DataException e){ 
     122                catch (DataAccessException e){ 
    124123                        throw new StorageException("Could not save collection",e); 
    125124                } 
     
    147146                        String query ="select count(*) from "+event.getClass().getSimpleName()+" where eventTime = ? and eventId =?"; 
    148147                        Object[] parameters= new Object[]{event.getEventTime().toDate(),event.getEventId()}; 
    149                         int storedDuplicates = ((Integer) dataConnection.runQueryUnique(query, parameters)).intValue(); 
    150  
     148                        log.debug("Using parameters {}",Arrays.asList(parameters)); 
     149                        Object result = dataConnection.runQueryUnique(query, parameters); 
     150                        log.debug("Result {}",result); 
     151                        int storedDuplicates = 0; 
     152                        //int storedDuplicates = ((Integer) dataConnection.runQueryUnique(query, parameters)).intValue(); 
     153                        log.debug("Found {} duplicates ",storedDuplicates); 
    151154                        if (storedDuplicates == 0){ 
    152155                            persist.add(event); 
Note: See TracChangeset for help on using the changeset viewer.