]> git.argeo.org Git - gpl/argeo-slc.git/blob - runtime/org.argeo.slc.support.hibernate/src/main/resources/org/argeo/slc/hibernate/process/SlcExecutionStep.hbm.xml
Introduce H
[gpl/argeo-slc.git] / runtime / org.argeo.slc.support.hibernate / src / main / resources / org / argeo / slc / hibernate / process / SlcExecutionStep.hbm.xml
1 <?xml version="1.0"?>
2 <!--
3
4 Copyright (C) 2010 Mathieu Baudier <mbaudier@argeo.org> Licensed under
5 the Apache License, Version 2.0 (the "License"); you may not use this
6 file except in compliance with the License. You may obtain a copy of
7 the License at http://www.apache.org/licenses/LICENSE-2.0 Unless
8 required by applicable law or agreed to in writing, software
9 distributed under the License is distributed on an "AS IS" BASIS,
10 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
11 implied. See the License for the specific language governing
12 permissions and limitations under the License.
13 -->
14
15 <!DOCTYPE hibernate-mapping PUBLIC
16 "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
17 "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
18 <hibernate-mapping package="org.argeo.slc.process">
19 <class name="SlcExecutionStep" table="SLC_EXECUTION_STEP">
20 <cache usage="nonstrict-read-write" />
21
22 <id name="uuid" column="UUID" />
23 <property name="type" column="TYPE" />
24 <property name="thread" column="THREAD" />
25 <property name="timestamp" column="TSTAMP" type="imm_timestamp" />
26
27 <list name="logLines" cascade="all" lazy="false"
28 table="SLC_EXECUTION_STEP_LOG_LINE">
29 <cache usage="nonstrict-read-write" />
30 <key column="SLC_EXECUTION_STEP_ID" />
31 <list-index column="INDX" />
32 <element column="LOG_LINE" type="string" />
33 </list>
34
35 <query name="stepIndex"><![CDATA[
36 select index(step)
37 from SlcExecution process
38 join process.steps step
39 with step.uuid = ?
40 where process.uuid = ?
41 ]]></query>
42 <query name="stepsAfter"><![CDATA[
43 select step
44 from SlcExecution process
45 join process.steps step
46 where process.uuid = ?
47 and index(step) > ?
48 ]]></query>
49 </class>
50 </hibernate-mapping>