mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
Merged DEV to HEAD
- ALF-8806 RINF 41: Lucene Removal: Fix CopyService - ALF-9028: RINF 41: Fix Aspect cm:copiedFrom - ALF-9029 RINF 49: Lucene Removal: CheckOutCheckInService API - ALF-9032: RINF 49: fixes to cm:workingcopy aspect 28996: Dev branch for De-Lucene work pending patches 29004: Evaluator runs in read-only txn 29006: Additional PermissionCheckedCollection.create method - Use an existing collection's permission check data (cut-off, etc) to wrap a new collection 29007: CopyService and CheckOutCheckInService refactors to remove Lucene CopyService: Removed cm:source property from cm:copiedfrom aspect and replaced with a cm:original association. Added CQ-based APIs to query for copies Added APIs to support bi-directional walking of copy association Fixed sundry uses of cm:copiedfrom esp. all uses related to cm:workingcopy CheckOutCheckInService: Check-out now creates a source aspect cm:checkedOut with 1:1 relationship to cm:workingcopy via cm:workingcopylink Removed explicit use of cm:workingcopy aspect and replaced it with calls to COCI API 29083: Audit tests fail when indexing is turned off. Also removed a getReader() call during rule evaluation, leading to a 'sub-action' read being recorded. 29113: NodeDAO.getNodesWithAspects supports paging 29135: Removed unused patch queries 29139: Basic patch (still terminates with error) to upgrade cm:copiedfrom and cm:workingcopy 29157: Tested patch for cm:copiedfrom and cm:workingcopy aspects git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@29159 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -748,7 +748,7 @@
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="select_NodesWithAspectId" parameterMap="parameter_NodesWithAspect" resultMap="result_NodeRef" >
|
||||
<select id="select_NodesWithAspectIds" parameterType="Ids" resultMap="result_NodeRef" >
|
||||
select
|
||||
node.id as id,
|
||||
store.protocol as protocol,
|
||||
@@ -756,11 +756,14 @@
|
||||
node.uuid as uuid,
|
||||
node.node_deleted as node_deleted
|
||||
from
|
||||
alf_node node
|
||||
alf_node_aspects na
|
||||
join alf_node node on (na.node_id = node.id)
|
||||
join alf_store store on (store.id = node.store_id)
|
||||
join alf_node_aspects na on (na.node_id = node.id and na.node_id > ? and na.qname_id = ?)
|
||||
order by
|
||||
node.id
|
||||
where
|
||||
<![CDATA[na.node_id >= #{idOne}]]>
|
||||
<if test="idTwo != null"><![CDATA[and na.node_id < #{idTwo}]]></if>
|
||||
and na.qname_id in
|
||||
<foreach item="item" index="i" collection="ids" open="(" separator="," close=")">#{item}</foreach>
|
||||
</select>
|
||||
|
||||
<!-- Common results for result_NodeAssoc -->
|
||||
|
@@ -62,13 +62,6 @@
|
||||
<result property="lastModified" column="lastModified" jdbcType="BIGINT" javaType="java.lang.Long"/>
|
||||
</resultMap>
|
||||
|
||||
<resultMap id="result_DuplicateEntry" type="DuplicateEntry">
|
||||
<result property="id" column="child_id" jdbcType="BIGINT" javaType="java.lang.Long" />
|
||||
<result property="parentId" column="parent_id" jdbcType="BIGINT" javaType="java.lang.Long" />
|
||||
<result property="name" column="name" jdbcType="VARCHAR" javaType="java.lang.String" />
|
||||
<result property="amount" column="cnt" jdbcType="BIGINT" javaType="java.lang.Long" />
|
||||
</resultMap>
|
||||
|
||||
<resultMap id="result_aclIneritanceIssue" type="java.util.HashMap">
|
||||
<result property="childAclId" column="child_acl_id" jdbcType="BIGINT" javaType="java.lang.Long"/>
|
||||
<result property="childAclType" column="child_acl_type" jdbcType="BIGINT" javaType="java.lang.Long"/>
|
||||
@@ -117,12 +110,6 @@
|
||||
<parameter property="namePattern" jdbcType="VARCHAR" javaType="java.lang.String"/>
|
||||
</parameterMap>
|
||||
|
||||
<parameterMap id="parameter_RenamedDuplicateEntry" type="DuplicateEntry">
|
||||
<parameter property="name" jdbcType="VARCHAR" javaType="java.lang.String" />
|
||||
<parameter property="id" jdbcType="BIGINT" javaType="java.lang.Long" />
|
||||
<parameter property="parentId" jdbcType="BIGINT" javaType="java.lang.Long" />
|
||||
</parameterMap>
|
||||
|
||||
<!-- -->
|
||||
<!-- Selects -->
|
||||
<!-- -->
|
||||
@@ -342,31 +329,6 @@
|
||||
acl_id > ?
|
||||
</select>
|
||||
|
||||
<!-- deprecated - superceded by 'patch.db-V3.4-AVM-rename-dupes' -->
|
||||
<select id="select_AvmNodeDuplicates" resultMap="result_DuplicateEntry">
|
||||
<![CDATA[
|
||||
select
|
||||
ce.child_id, ce.parent_id, ce.name, entities.cnt
|
||||
from
|
||||
avm_child_entries ce,
|
||||
(
|
||||
select
|
||||
ce2.parent_id, lower(ce2.name) as lname, count(*) as cnt
|
||||
from
|
||||
avm_child_entries ce2
|
||||
group by
|
||||
ce2.parent_id, lower(ce2.name)
|
||||
having
|
||||
count(*) > 1
|
||||
) entities
|
||||
where
|
||||
(ce.parent_id = entities.parent_id)
|
||||
and (lower(ce.name) = entities.lname)
|
||||
order by
|
||||
parent_id, lower(name), child_id
|
||||
]]>
|
||||
</select>
|
||||
|
||||
<select id="select_sharedAclsThatDoNotInheritCorrectlyFromThePrimaryParent" parameterType="boolean" resultMap="result_aclIneritanceIssue">
|
||||
<![CDATA[
|
||||
select distinct
|
||||
@@ -499,6 +461,16 @@
|
||||
]]>
|
||||
</select>
|
||||
|
||||
<select id="select_CountNodesWithAspectIds" parameterType="Ids" resultType="long" >
|
||||
select
|
||||
count(*)
|
||||
from
|
||||
alf_node_aspects na
|
||||
where
|
||||
na.qname_id in
|
||||
<foreach item="item" index="i" collection="ids" open="(" separator="," close=")">#{item}</foreach>
|
||||
</select>
|
||||
|
||||
<!-- -->
|
||||
<!-- Updates -->
|
||||
<!-- -->
|
||||
@@ -537,17 +509,6 @@
|
||||
id = ?
|
||||
</update>
|
||||
|
||||
<!-- deprecated - superceded by 'patch.db-V3.4-AVM-rename-dupes' -->
|
||||
<update id="update_AvmNodeNameById" parameterMap="parameter_RenamedDuplicateEntry">
|
||||
update
|
||||
avm_child_entries
|
||||
set
|
||||
name = ?
|
||||
where
|
||||
child_id = ?
|
||||
and parent_id = ?
|
||||
</update>
|
||||
|
||||
<update id="update_CreateSizeCurrentProperty" parameterType="SizeCurrentParams" >
|
||||
INSERT INTO alf_node_properties
|
||||
(
|
||||
|
@@ -8,31 +8,40 @@
|
||||
<!-- Result Maps -->
|
||||
<!-- -->
|
||||
|
||||
<resultMap id="result_Copy" type="Node">
|
||||
<result property="id" column="id" jdbcType="BIGINT" javaType="java.lang.Long"/>
|
||||
<result property="store.protocol" column="protocol" jdbcType="VARCHAR" javaType="java.lang.String"/>
|
||||
<result property="store.identifier" column="identifier" jdbcType="VARCHAR" javaType="java.lang.String"/>
|
||||
<result property="uuid" column="uuid" jdbcType="VARCHAR" javaType="java.lang.String"/>
|
||||
<resultMap id="result_Copy" type="Copy">
|
||||
<result property="copy.id" column="id" jdbcType="BIGINT" javaType="java.lang.Long"/>
|
||||
<result property="copy.store.protocol" column="protocol" jdbcType="VARCHAR" javaType="java.lang.String"/>
|
||||
<result property="copy.store.identifier" column="identifier" jdbcType="VARCHAR" javaType="java.lang.String"/>
|
||||
<result property="copy.uuid" column="uuid" jdbcType="VARCHAR" javaType="java.lang.String"/>
|
||||
<result property="copyName" column="name" jdbcType="VARCHAR" javaType="java.lang.String"/>
|
||||
</resultMap>
|
||||
|
||||
<!-- -->
|
||||
<!-- SQL Selects -->
|
||||
<!-- -->
|
||||
|
||||
<!-- Query to get copies of a node -->
|
||||
<!-- Query to get copies of a node. The 'target' is the original and the copy is the 'source'. -->
|
||||
<select id="select_GetCopies" parameterType="CopyParameters" resultMap="result_Copy">
|
||||
select
|
||||
copiedNode.id as id,
|
||||
copiedStore.protocol as protocol,
|
||||
copiedtore.identifier as identifier,
|
||||
copiedNode.uuid as uuid,
|
||||
copy.id as id,
|
||||
copyStore.protocol as protocol,
|
||||
copyStore.identifier as identifier,
|
||||
copy.uuid as uuid,
|
||||
np.string_value as name
|
||||
from
|
||||
alf_node_assoc assoc
|
||||
join alf_node copiedNode on (copiedNode.id = assoc.targetNodeId)
|
||||
join alf_store copiedStore on (copiedStore.id = copiedNode.store_id)
|
||||
join alf_node copy on (copy.id = assoc.source_node_id)
|
||||
join alf_store copyStore on (copyStore.id = copy.store_id)
|
||||
left join alf_node_properties np on (np.node_id = copy.id and np.qname_id = #{namePropId})
|
||||
<if test="copyParentNodeId != null">
|
||||
join alf_child_assoc ca on (ca.child_node_id = copy.id and ca.is_primary = #{true})
|
||||
</if>
|
||||
where
|
||||
assoc.target_node_id = #{originalNodeId} and
|
||||
assoc.type_qname_id = #{copiedFromAssocTypeId}
|
||||
assoc.type_qname_id = #{originalAssocTypeId}
|
||||
<if test="copyParentNodeId != null">
|
||||
and ca.parent_node_id = #{copyParentNodeId}
|
||||
</if>
|
||||
</select>
|
||||
|
||||
</mapper>
|
Reference in New Issue
Block a user