Changeset 752


Ignore:
Timestamp:
05/05/11 22:55:21 (8 years ago)
Author:
philsmart
Message:
 
Location:
raptor-client/trunk/src/main/java/uk/ac/cardiff/raptor/store
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • raptor-client/trunk/src/main/java/uk/ac/cardiff/raptor/store/EntryHandler.java

    r736 r752  
    2222package uk.ac.cardiff.raptor.store; 
    2323 
    24 import java.util.ArrayList; 
    2524import java.util.List; 
    2625import java.util.Set; 
     
    8786         * @return 
    8887         */ 
     88        public List query(String query, Object[] parameters); 
     89         
     90        /** 
     91         * 
     92         * @param query 
     93         * @return 
     94         */ 
    8995        public Object queryUnique(String query); 
    9096 
  • raptor-client/trunk/src/main/java/uk/ac/cardiff/raptor/store/dao/DefaultDataConnection.java

    r678 r752  
    1616package uk.ac.cardiff.raptor.store.dao; 
    1717 
     18import java.util.Arrays; 
    1819import java.util.Collection; 
    1920import java.util.List; 
     
    5455 
    5556        public Object runQueryUnique(String query, Object[] parameters) { 
     57                if (parameters!=null) 
     58                        log.trace("Query to db, {}, with params [{}]",query,Arrays.asList(parameters)); 
    5659                Object object = DataAccessUtils.uniqueResult(getHibernateTemplate().find(query, parameters)); 
    5760                return object; 
  • raptor-client/trunk/src/main/java/uk/ac/cardiff/raptor/store/impl/MemoryEntryHandler.java

    r736 r752  
    180180    } 
    181181 
     182    /** 
     183     * This is a no-op method for the memory entry handler 
     184     */ 
     185        public List query(String query, Object[] parameters) { 
     186                return null; 
     187        } 
     188 
    182189 
    183190 
  • raptor-client/trunk/src/main/java/uk/ac/cardiff/raptor/store/impl/PersistantEntryHandler.java

    r736 r752  
    5959        private RaptorDataConnection dataConnection; 
    6060 
    61         /** 
    62          * set of all entries stored by this EntryHandler should never be used as 
    63          * memory overhead is too high for large databases 
    64          */ 
    65         //private Set<Event> entries; 
    6661 
    6762        /** Used to hold events temporarily before they are persisted, allows 
     
    9691                 log.trace("SQL query to entry handler [{}]",query); 
    9792                return dataConnection.runQueryUnique(query, null); 
     93        } 
     94         
     95        public List query(String query, Object[] parameters) { 
     96                log.trace("SQL query to entry handler [{}], with parameters [{}]",query,Arrays.asList(parameters)); 
     97                return dataConnection.runQuery(query, parameters); 
    9898        } 
    9999 
     
    205205 
    206206 
     207 
     208 
    207209} 
Note: See TracChangeset for help on using the changeset viewer.