mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
25490: ALF-5260 - MyBatis: AVM (-> MySQL) - includes SerializableTypeHandler - also, for consistency, remove SqlSessionDaoSupport from Activtities (r25466) - TODO: test EliminateDuplicates patch - TODO: inserts for non-MySQL dbs 25504: ALF-5260 - MyBatis: part III - AppliedPatch, Content/MimeType/Encoding, Locale, Locks, QName, Usage - also minor updates to AVM & Activities (for consistency) 25517: ALF-5260 - MyBatis: part IV - DAOs - Patch, Permissions/ACLs, PropVal, SOLR - NOTE: includes fixup for SOLRDAOTest - also return nodeRef - TODO: batching (for ContentUrl patch) 25541: ALF-5260 - MyBatis: add missing file (r25517) 25556: ALF-5260 - MyBatis: V - PostgreSQL support (for migrated DAOs - does not yet include Audit + Node) 25576: ALF-5260 - MyBatis: VI - Audit & Control DAOs (MySQL + PostgreSQL) - also replaced SqlExecutor.NO_MAXIMUM_RESULTS with RowBounds.NO_ROW_LIMIT 25589: ALF-5260 - MyBatis: part VII - Node DAO (MySQL + PostgreSQL) 25612: ALF-5260 - MyBatis: part VIII - Oracle / DB2 / SQL Server - sanity checked only (bootstrap -> RepositoryStartupTest, DomainTestSuite, ModelTestSuite) - also remove remaining references to iBatis (and jar) Note: - Currently LockDAOTest is failing on an update - Fixed up DAo code changes from V3.4 - expect some to have been missed git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@28004 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
122 lines
3.9 KiB
XML
122 lines
3.9 KiB
XML
<?xml version="1.0" encoding="UTF-8" ?>
|
|
|
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
|
|
|
<mapper namespace="alfresco.qname">
|
|
|
|
<!-- -->
|
|
<!-- Result Maps -->
|
|
<!-- -->
|
|
|
|
<resultMap id="result_Namespace" type="Namespace">
|
|
<result property="id" column="id" jdbcType="BIGINT" javaType="java.lang.Long"/>
|
|
<result property="version" column="version" jdbcType="BIGINT" javaType="java.lang.Long"/>
|
|
<result property="uri" column="uri" jdbcType="VARCHAR" javaType="java.lang.String"/>
|
|
</resultMap>
|
|
|
|
<resultMap id="result_QName" type="QName">
|
|
<result property="id" column="id" jdbcType="BIGINT" javaType="java.lang.Long"/>
|
|
<result property="version" column="version" jdbcType="BIGINT" javaType="java.lang.Long"/>
|
|
<result property="namespaceId" column="ns_id" jdbcType="BIGINT" javaType="java.lang.Long"/>
|
|
<result property="localName" column="local_name" jdbcType="VARCHAR" javaType="java.lang.String"/>
|
|
</resultMap>
|
|
|
|
<!-- -->
|
|
<!-- Parameter Maps -->
|
|
<!-- -->
|
|
|
|
<parameterMap id="parameter_NamespaceId" type="Namespace">
|
|
<parameter property="id" jdbcType="BIGINT" javaType="java.lang.Long"/>
|
|
</parameterMap>
|
|
|
|
<parameterMap id="parameter_NamespaceUri" type="Namespace">
|
|
<parameter property="uri" jdbcType="VARCHAR" javaType="java.lang.String"/>
|
|
</parameterMap>
|
|
|
|
<parameterMap id="parameter_QNameId" type="QName">
|
|
<parameter property="id" jdbcType="BIGINT" javaType="java.lang.Long"/>
|
|
</parameterMap>
|
|
|
|
<!-- -->
|
|
<!-- SQL Snippets -->
|
|
<!-- -->
|
|
|
|
<sql id="insert_Namespace_AutoIncrement">
|
|
insert into alf_namespace (version, uri)
|
|
values (#{version}, #{uri})
|
|
</sql>
|
|
<sql id="insert_Namespace_Sequence">
|
|
insert into alf_namespace (id, version, uri)
|
|
values (#{id}, #{version}, #{uri})
|
|
</sql>
|
|
|
|
<sql id="insert_QName_AutoIncrement">
|
|
insert into alf_qname (version, ns_id, local_name)
|
|
values (#{version}, #{namespaceId}, #{localName})
|
|
</sql>
|
|
<sql id="insert_QName_AutoIncrement_Sequence">
|
|
insert into alf_qname (id, version, ns_id, local_name)
|
|
values (#{id}, #{version}, #{namespaceId}, #{localName})
|
|
</sql>
|
|
|
|
<!-- -->
|
|
<!-- Statements -->
|
|
<!-- -->
|
|
|
|
<select id="select_NamespaceById" parameterMap="parameter_NamespaceId" resultMap="result_Namespace">
|
|
select
|
|
*
|
|
from
|
|
alf_namespace
|
|
where
|
|
id = ?
|
|
</select>
|
|
|
|
<select id="select_NamespaceByUri" parameterMap="parameter_NamespaceUri" resultMap="result_Namespace">
|
|
select
|
|
*
|
|
from
|
|
alf_namespace
|
|
where
|
|
uri = ?
|
|
</select>
|
|
|
|
<update id="update_Namespace" parameterType="Namespace">
|
|
update
|
|
alf_namespace
|
|
set
|
|
uri = #{uri}
|
|
where
|
|
id = #{id}
|
|
</update>
|
|
|
|
<select id="select_QNameById" parameterMap="parameter_QNameId" resultMap="result_QName">
|
|
select
|
|
*
|
|
from
|
|
alf_qname
|
|
where
|
|
id = ?
|
|
</select>
|
|
|
|
<select id="select_QNameByNsAndLocalName" parameterType="QName" resultMap="result_QName">
|
|
select
|
|
*
|
|
from
|
|
alf_qname
|
|
where
|
|
ns_id = #{namespaceId} and
|
|
local_name = #{localName}
|
|
</select>
|
|
|
|
<update id="update_QName" parameterType="QName">
|
|
update
|
|
alf_qname
|
|
set
|
|
ns_id = #{namespaceId},
|
|
local_name = #{localName}
|
|
where
|
|
id = #{id}
|
|
</update>
|
|
|
|
</mapper> |