Further DAO for audit values

- General-purpose property persisting in searchable schema
 - TODO: More high volume tests for general values


git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@15556 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Derek Hulley
2009-08-03 17:59:05 +00:00
parent 8d90b426dc
commit 686ec6479b
13 changed files with 1337 additions and 38 deletions

View File

@@ -12,6 +12,8 @@
<typeAlias alias="PropertyClass" type="org.alfresco.repo.domain.propval.PropertyClassEntity"/>
<typeAlias alias="PropertyStringValue" type="org.alfresco.repo.domain.propval.PropertyStringValueEntity"/>
<typeAlias alias="PropertyDoubleValue" type="org.alfresco.repo.domain.propval.PropertyDoubleValueEntity"/>
<typeAlias alias="PropertyValue" type="org.alfresco.repo.domain.propval.PropertyValueEntity"/>
<!-- -->
<!-- Result Maps -->
@@ -27,6 +29,14 @@
<result property="id" column="id" jdbcType="BIGINT" javaType="java.lang.Long"/>
<result property="stringValue" column="string_value" jdbcType="VARCHAR" javaType="java.lang.String"/>
</resultMap>
<resultMap id="result.PropertyDoubleValue" class="PropertyDoubleValue">
<result property="id" column="id" jdbcType="BIGINT" javaType="java.lang.Long"/>
<result property="doubleValue" column="double_value" jdbcType="DOUBLE" javaType="java.lang.Double"/>
</resultMap>
<resultMap id="result.PropertyValue" class="PropertyValue">
<result property="id" column="id" jdbcType="BIGINT" javaType="java.lang.Long"/>
<result property="longValue" column="long_value" jdbcType="BIGINT" javaType="java.lang.Long"/>
</resultMap>
<!-- -->
<!-- Parameter Maps -->
@@ -56,6 +66,16 @@
values (#stringValue#)
</sql>
<sql id="insert.PropertyDoubleValue.AutoIncrement">
insert into alf_prop_double_value (double_value)
values (#doubleValue#)
</sql>
<sql id="insert.PropertyValue.AutoIncrement">
insert into alf_prop_value (persisted_type, long_value)
values (#persistedType#, #longValue#)
</sql>
<!-- -->
<!-- Statements -->
<!-- -->
@@ -101,4 +121,24 @@
string_value = #stringValue#
</select>
<!-- Get a property simple value by ID -->
<select id="select.PropertyDoubleValueByID" parameterClass="PropertyDoubleValue" resultMap="result.PropertyDoubleValue">
select
*
from
alf_prop_double_value
where
id = #id#
</select>
<!-- Get the property string value by string -->
<select id="select.PropertyDoubleValueByValue" parameterClass="PropertyDoubleValue" resultMap="result.PropertyDoubleValue">
select
*
from
alf_prop_double_value
where
double_value = #doubleValue#
</select>
</sqlMap>