(no commit message)
authorerik <erik@77661180-640e-0410-b3a8-9f9b13e6d0e0>
Wed, 19 Mar 2008 21:05:55 +0000 (21:05 +0000)
committererik <erik@77661180-640e-0410-b3a8-9f9b13e6d0e0>
Wed, 19 Mar 2008 21:05:55 +0000 (21:05 +0000)
mythtv/monitor/src/main/java/org/wamblee/mythtv/LinkStructure.java
mythtv/monitor/src/main/java/org/wamblee/mythtv/RecordingDatabase.java
mythtv/monitor/src/main/java/org/wamblee/mythtv/RecordingPk.java
mythtv/war/src/main/resources/org.wamblee.mythtv.hibernate.xml
mythtv/war/src/main/resources/org.wamblee.mythtv.properties

index ced5ae119e58db69467161a9f77ff45e1f9a384b..4d6583c8a82a0553957131ca8c0683e65caa2bde 100644 (file)
@@ -73,7 +73,7 @@ public class LinkStructure implements Listener {
 
         // Re-assess file type
         Recording recording = _recordings.get(aFile);
-        LOG.debug("Recording changed " + recording);
+        LOG.info("Recording changed " + recording);
         recording.setFilesize(aFile.length());
         _database.update(recording);
         String dir = getDirectory(recording);
index cf7bc5f502b052954d2096c0b42cac69f4fe3696..cbcf89d20caf4924fb176e2519d56c2ad1d5739f 100644 (file)
@@ -71,8 +71,6 @@ public class RecordingDatabase extends JpaDaoSupport {
     }
     
     public void update(Recording aRecording) { 
-        // Update is not required since the whole task of updating the 
-        // directory structure occurs within a single transaction. 
-        // Therefore, modifications to recordings are automatically persisted. 
+        getJpaTemplate().getEntityManager().merge(aRecording);
     }
 }
index da06d3d0d8dda0afdd386ce349117a1f4a45e343..88d31c3b96185c8c732a0cd9cd849079cb6b4ab7 100644 (file)
@@ -93,4 +93,12 @@ public class RecordingPk implements Serializable {
     public int hashCode() {
         return _channel.hashCode() + _starttime.hashCode(); 
     }
+    
+    /* (non-Javadoc)
+     * @see java.lang.Object#toString()
+     */
+    @Override
+    public String toString() {
+        return "pk(" + _channel + ", " + _starttime + ")"; 
+    }
 }
index fb66e86b18e0ca1b12fa45179b2896fac3ab9f51..29f176a87b4d72a5a75efd6fc5f2e36472009d0e 100644 (file)
@@ -2,43 +2,6 @@
 <beans xmlns="http://www.springframework.org/schema/beans"
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd">
-
-       <!-- bean id="namingStrategy" class="nl.jmonks.system.hibernate.JMonksNamingStrategy"> </bean -->
-
-       <!-- bean id="sessionFactory" class="org.springframework.orm.hibernate3.annotation.AnnotationSessionFactoryBean">
-               <property name="dataSource">
-                       <ref bean="dataSource"/>
-               </property>
-               <property name="hibernateProperties">
-                       <props>
-                               <prop key="hibernate.dialect">${hibernate.dialect}</prop>
-                <prop key="hibernate.cache.provider_class">${hibernate.cache.provider}</prop>
-                <prop key="hibernate.show_sql">${hibernate.show_sql}</prop>
-                <prop key="hibernate.cache.use_query_cache">${hibernate.cache.use_query_cache}</prop>
-                               <prop key="hibernate.query.substitutions">true 1, false 0</prop>
-                  </props>
-               </property>
-               <property name="annotatedClasses">
-                       <list>
-                               <value>org.wamblee.mythtv.Channel</value>
-                               <value>org.wamblee.mythtv.Recording</value>
-                       </list>
-               </property>
-               
-       </bean -->
-
-       <!-- bean id="hibernateTemplate" class="org.springframework.orm.hibernate3.HibernateTemplate">
-               <property name="sessionFactory">
-                       <ref bean="sessionFactory"/>
-               </property>
-       </bean -->
-
-       <!-- bean id="transactionManager"
-               class="org.springframework.orm.hibernate3.HibernateTransactionManager">
-               <property name="sessionFactory">
-                       <ref local="sessionFactory"/>
-               </property>
-               </bean -->
        
        <bean id="entityManager" class="org.springframework.jndi.JndiObjectFactoryBean">
                <property name="jndiName"><value>java:comp/env/persistence/mythtv</value></property>
index 0b3a0b6c4def8ee2b4e66af445b38cdf384a312f..85f9a0e88d6f9af65924cde26669e9d075ae626e 100644 (file)
@@ -1,8 +1,8 @@
 
 org.wamblee.mythtv.datasource=jdbc/mythtv
 org.wamblee.mythtv.pollinterval=120
-#org.wamblee.mythtv.monitordir=/data/vcr
-#org.wamblee.mythtv.linkdir=/data/vcr/links
+org.wamblee.mythtv.monitordir=/data/vcr
+org.wamblee.mythtv.linkdir=/data/vcr/links
 
-org.wamblee.mythtv.monitordir=/ext/home/erik/java/workspace/utils/mythtv/testdata/input
-org.wamblee.mythtv.linkdir=/ext/home/erik/java/workspace/utils/mythtv/testdata/links
+#org.wamblee.mythtv.monitordir=/ext/home/erik/java/workspace/utils/mythtv/testdata/input
+#org.wamblee.mythtv.linkdir=/ext/home/erik/java/workspace/utils/mythtv/testdata/links