private SlcExecutionDao slcExecutionDao;
@Override
- public SlcExecution getLine(int i) {
-
- // SlcExecution se = new SlcExecution();
- // se.setHost("Marshall");
- // se.setUuid("a very long uuid");
- // se.setStatus(SlcExecution.STATUS_RUNNING);
- // return se;
- return null;
+ public SlcExecution getLine(int index) {
+ return slcExecutions.get(index);
}
@Override
switch (i) {
case 0:
- return "DATE";
+ return se.getStartDate().toString();
case 1:
return se.getHost();
case 2:
return se.getUuid();
case 3:
- return "TYPE";
+ return se.getStatus();
}
return "test";
}
// Thread.currentThread().setContextClassLoader(null);
List<SlcExecution> lst = slcExecutionDao.listSlcExecutions();
if (lst.get(0) != null) {
- // log.debug(lst.get(0).getStartDate());
- log.debug(lst.get(0).getHost());
- log.debug(lst.get(0).getStatus());
- log.debug(lst.get(0).getUuid());
+ log.debug("======================== set CONTENT =====================");
+ log.debug("Lst Size : " + lst.size());
+ log.debug("Date : " + lst.get(0).getStartDate());
+ log.debug("Host : " + lst.get(0).getHost());
+ log.debug("Status : " + lst.get(0).getStatus());
+ log.debug("UUID : " + lst.get(0).getUuid());
}
slcExecutions.clear();
public interface TableContent {
- public Object getLine(int i);
+ public Object getLine(int index);
- public String getLabel(Object o, int i);
+ public String getLabel(Object o, int index);
public void setContent();
Bundle-Name: Hibernate Interface for RCP Client
Bundle-SymbolicName: org.argeo.slc.client.hibernate
Bundle-Version: 1.0.0.qualifier
-Import-Package: org.argeo.slc.client.core,
- org.argeo.slc.dao.process;version="0.13.0.SNAPSHOT-r3777"
+Import-Package: org.aopalliance.aop;version="1.0.0",
+ org.argeo.slc.client.core,
+ org.argeo.slc.dao.process;version="0.13.0.SNAPSHOT-r3777",
+ org.springframework.aop;version="2.5.6.SEC01",
+ org.springframework.aop.framework;version="2.5.6.SEC01",
+ org.springframework.transaction;version="2.5.6.SEC01"
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<beans:beans xmlns="http://www.springframework.org/schema/osgi"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:beans="http://www.springframework.org/schema/beans"
+ xsi:schemaLocation="http://www.springframework.org/schema/osgi
+ http://www.springframework.org/schema/osgi/spring-osgi-1.1.xsd
+ http://www.springframework.org/schema/beans
+ http://www.springframework.org/schema/beans/spring-beans-2.5.xsd">
+
+ <reference id="transactionManager"
+ interface="org.springframework.transaction.PlatformTransactionManager"
+ context-class-loader="service-provider" />
+</beans:beans>
\ No newline at end of file
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<beans xmlns="http://www.springframework.org/schema/beans"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:aop="http://www.springframework.org/schema/aop"
+ xmlns:tx="http://www.springframework.org/schema/tx"
+ xsi:schemaLocation="
+ http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
+ http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-2.5.xsd
+ http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-2.5.xsd">
+
+ <!-- AOP Configuration -->
+ <aop:config>
+ <aop:pointcut id="tableContentMethods"
+ expression="execution(*
+ org.argeo.slc.client.core.TableContent.*(..))" />
+ <aop:advisor advice-ref="daoAdvice" pointcut-ref="tableContentMethods" />
+ </aop:config>
+ <tx:advice id="daoAdvice" transaction-manager="transactionManager">
+ <tx:attributes>
+ <tx:method name="get*" propagation="REQUIRED" read-only="true" />
+ <tx:method name="*" propagation="REQUIRED" />
+ </tx:attributes>
+ </tx:advice>
+</beans>
\ No newline at end of file