mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
Merged V3.0 to HEAD
12083: Fix for ETHREEOH-790 - when using external auth such as NTLM the Change Password and Logout features are no longer available in the Share UI. 12085: ETHREEOH-565: Failure to generate flash preview for PPT file 12086: ETHREEOH-903 Sites drop-down Favorites UI improvements ETHREEOH-904 My Sites dashlet Favorites UI improvements ETHREEOH-547 User who is not a site manager can delete sites: my sites dashlet and sites page 12093: ETHREEOH-861, ETHREEOH-928 12094: Remove __MACOSX folder that has appeared in Share webapp 12096: Removed spurious files from YUI 2.6.0 distribution 12100: ETHREEOH-929 Tightening up transport adapters field (should never be shown for ASR) 12104: Fix for ETHREEOH-944. Admin now able to reset user home location again ((regression). 12105: Fixed: ETHREEOH-934 Multi-clicking Site favoriate icons can cause multiple requests before others finish and effectively cause a browser lock-up until page refresh 12106: Exception needs to be rethrown after releasing packet to the memory pool on a Winsock NetBIOS receive. ETHREEOH-628. 12110: An i18n message didn't work for failures. Related to ETHREEOH-934 Multi-clicking Site favoriate icons can cause multiple requests before others finish and effectively cause a browser lock-up until page refresh 12115: Added unit test to check for cm:folder-derived type support 12116: Removed unused, old patch-related query 12117: Merged V2.2 to V3.0 11454: Fixed ASH-7: QName fetching is inefficient when run without L2 cache 12118: Fixed compilation error after merge 12119: DM User Usages - 2nd pass (fix ETHREEOH-677) 12122: UserUsage does nothing if system is READ-ONLY. git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@12500 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -49,12 +49,12 @@
|
||||
<set name="aspects" fetch="join" lazy="false" table="avm_aspects" cascade="all" optimistic-lock="true">
|
||||
<cache usage="read-write"/>
|
||||
<key column="node_id" not-null="true" foreign-key="fk_avm_nasp_n"/>
|
||||
<element column="qname_id" type="long" not-null="true"/>
|
||||
<element column="qname_id" type="long" not-null="true"/> <!-- fk_avm_nasp_qn -->
|
||||
</set>
|
||||
<map name="properties" fetch="join" lazy="false" table="avm_node_properties" cascade="all" optimistic-lock="true">
|
||||
<cache usage="read-write"/>
|
||||
<key column="node_id" not-null="true" foreign-key="fk_avm_nprop_n"/>
|
||||
<map-key column="qname_id" type="long" />
|
||||
<map-key column="qname_id" type="long" /> <!-- fk_avm_nprop_qn -->
|
||||
<composite-element class="org.alfresco.repo.domain.PropertyValue">
|
||||
<property name="actualType" column="actual_type_n" type="integer" not-null="true" />
|
||||
<property name="persistedType" column="persisted_type_n" type="integer" not-null="true" />
|
||||
@@ -151,16 +151,7 @@
|
||||
<generator class="native"/>
|
||||
</id>
|
||||
<many-to-one name="store" class="AVMStoreImpl" column="avm_store_id" foreign-key="fk_avm_sprop_store"/>
|
||||
<many-to-one
|
||||
name="name"
|
||||
class="org.alfresco.repo.domain.hibernate.QNameEntityImpl"
|
||||
column="qname_id"
|
||||
foreign-key="fk_avm_sprop_qname"
|
||||
lazy="proxy"
|
||||
fetch="select"
|
||||
unique="false"
|
||||
not-null="true"
|
||||
cascade="none" />
|
||||
<property name="qnameId" column="qname_id" type="long" not-null="true" /> <!-- fk_avm_sprop_qname -->
|
||||
<component class="org.alfresco.repo.domain.PropertyValue" name="value">
|
||||
<property name="actualType" column="actual_type_n" type="integer" not-null="true" />
|
||||
<property name="persistedType" column="persisted_type_n" type="integer" not-null="true" />
|
||||
@@ -342,4 +333,48 @@
|
||||
]]>
|
||||
</query>
|
||||
|
||||
<sql-query name="avm.GetStorePropertiesByKeyPattern">
|
||||
<return alias="asp" class="AVMStorePropertyImpl"/>
|
||||
SELECT
|
||||
{asp.*}
|
||||
FROM
|
||||
avm_store_properties asp
|
||||
JOIN alf_qname qn ON (qn.id = asp.qname_id)
|
||||
JOIN alf_namespace ns ON (ns.id = qn.ns_id)
|
||||
WHERE
|
||||
ns.uri LIKE :uri AND
|
||||
qn.local_name LIKE :localName
|
||||
</sql-query>
|
||||
|
||||
<sql-query name="avm.GetStorePropertiesByStoreAndKeyPattern">
|
||||
<return alias="asp" class="AVMStorePropertyImpl"/>
|
||||
SELECT
|
||||
{asp.*}
|
||||
FROM
|
||||
avm_store_properties asp
|
||||
JOIN alf_qname qn ON (qn.id = asp.qname_id)
|
||||
JOIN alf_namespace ns ON (ns.id = qn.ns_id)
|
||||
WHERE
|
||||
asp.avm_store_id = :storeId AND
|
||||
ns.uri LIKE :uri AND
|
||||
qn.local_name LIKE :localName
|
||||
</sql-query>
|
||||
|
||||
<sql-query name="avm.DeleteStorePropertiesByType">
|
||||
DELETE
|
||||
FROM
|
||||
avm_store_properties asp
|
||||
WHERE
|
||||
asp.avm_store_id = :storeId AND
|
||||
asp.qname_id = :qnameId
|
||||
</sql-query>
|
||||
|
||||
<sql-query name="avm.DeleteStoreProperties">
|
||||
DELETE
|
||||
FROM
|
||||
avm_store_properties asp
|
||||
WHERE
|
||||
asp.avm_store_id = :storeId
|
||||
</sql-query>
|
||||
|
||||
</hibernate-mapping>
|
||||
|
@@ -29,8 +29,8 @@ import org.alfresco.repo.avm.AVMStore;
|
||||
import org.alfresco.repo.avm.AVMStoreProperty;
|
||||
import org.alfresco.repo.avm.AVMStorePropertyDAO;
|
||||
import org.alfresco.repo.domain.QNameDAO;
|
||||
import org.alfresco.repo.domain.QNameEntity;
|
||||
import org.alfresco.service.namespace.QName;
|
||||
import org.alfresco.util.Pair;
|
||||
import org.hibernate.Query;
|
||||
import org.springframework.orm.hibernate3.support.HibernateDaoSupport;
|
||||
|
||||
@@ -67,8 +67,8 @@ class AVMStorePropertyDAOHibernate extends HibernateDaoSupport implements AVMSto
|
||||
*/
|
||||
public AVMStoreProperty get(AVMStore store, QName name)
|
||||
{
|
||||
QNameEntity qnameEntity = qnameDAO.getQNameEntity(name);
|
||||
if (qnameEntity == null)
|
||||
Pair<Long, QName> qnamePair = qnameDAO.getQName(name);
|
||||
if (qnamePair == null)
|
||||
{
|
||||
// No such QName
|
||||
return null;
|
||||
@@ -81,9 +81,9 @@ class AVMStorePropertyDAOHibernate extends HibernateDaoSupport implements AVMSto
|
||||
"from AVMStorePropertyImpl asp " +
|
||||
"where " +
|
||||
"asp.store = :store and " +
|
||||
"asp.name = :name");
|
||||
"asp.qnameId = :qnameId");
|
||||
query.setEntity("store", store);
|
||||
query.setEntity("name", qnameEntity);
|
||||
query.setLong("qnameId", qnamePair.getFirst());
|
||||
return (AVMStoreProperty)query.uniqueResult();
|
||||
}
|
||||
}
|
||||
@@ -122,19 +122,20 @@ class AVMStorePropertyDAOHibernate extends HibernateDaoSupport implements AVMSto
|
||||
{
|
||||
localName = "%";
|
||||
}
|
||||
Query query =
|
||||
getSession().createQuery(
|
||||
"select asp " +
|
||||
"from AVMStorePropertyImpl asp " +
|
||||
"join asp.name name " +
|
||||
"join name.namespace namespace " +
|
||||
"where " +
|
||||
"asp.store = :store and " +
|
||||
"namespace.safeUri like :uri and " +
|
||||
"name.localName like :localName");
|
||||
query.setEntity("store", store);
|
||||
Query query = getSession().getNamedQuery("avm.GetStorePropertiesByStoreAndKeyPattern");
|
||||
query.setLong("storeId", store.getId());
|
||||
query.setParameter("uri", uri);
|
||||
query.setParameter("localName", localName);
|
||||
// Query query =
|
||||
// getSession().createQuery(
|
||||
// "select asp " +
|
||||
// "from AVMStorePropertyImpl asp " +
|
||||
// "join asp.name name " +
|
||||
// "join name.namespace namespace " +
|
||||
// "where " +
|
||||
// "asp.store = :store and " +
|
||||
// "namespace.safeUri like :uri and " +
|
||||
// "name.localName like :localName");
|
||||
return (List<AVMStoreProperty>)query.list();
|
||||
}
|
||||
|
||||
@@ -157,17 +158,20 @@ class AVMStorePropertyDAOHibernate extends HibernateDaoSupport implements AVMSto
|
||||
{
|
||||
localName = "%";
|
||||
}
|
||||
Query query =
|
||||
getSession().createQuery(
|
||||
"select asp " +
|
||||
"from AVMStorePropertyImpl asp " +
|
||||
"join asp.name name " +
|
||||
"join name.namespace namespace " +
|
||||
"where " +
|
||||
"namespace.safeUri like :uri and " +
|
||||
"name.localName like :localName");
|
||||
query.setParameter("uri", uri);
|
||||
query.setParameter("localName", localName);
|
||||
Query query = getSession().getNamedQuery("avm.GetStorePropertiesByKeyPattern");
|
||||
query.setParameter("uri", uri);
|
||||
query.setParameter("localName", localName);
|
||||
// Query query =
|
||||
// getSession().createQuery(
|
||||
// "select asp " +
|
||||
// "from AVMStorePropertyImpl asp " +
|
||||
// "join asp.name name " +
|
||||
// "join name.namespace namespace " +
|
||||
// "where " +
|
||||
// "namespace.safeUri like :uri and " +
|
||||
// "name.localName like :localName");
|
||||
// query.setParameter("uri", uri);
|
||||
// query.setParameter("localName", localName);
|
||||
return (List<AVMStoreProperty>)query.list();
|
||||
}
|
||||
|
||||
@@ -187,14 +191,12 @@ class AVMStorePropertyDAOHibernate extends HibernateDaoSupport implements AVMSto
|
||||
*/
|
||||
public void delete(AVMStore store, QName name)
|
||||
{
|
||||
QNameEntity qnameEntity = qnameDAO.getQNameEntity(name);
|
||||
if (qnameEntity != null)
|
||||
Pair<Long, QName> qnamePair = qnameDAO.getQName(name);
|
||||
if (qnamePair != null)
|
||||
{
|
||||
Query delete =
|
||||
getSession().createQuery("delete from AVMStorePropertyImpl asp " +
|
||||
"where asp.store = :store and asp.name = :name");
|
||||
delete.setEntity("store", store);
|
||||
delete.setParameter("name", qnameEntity);
|
||||
Query delete = getSession().getNamedQuery("avm.DeleteStorePropertiesByType");
|
||||
delete.setParameter("storeId", store.getId());
|
||||
delete.setParameter("qnameId", qnamePair.getFirst());
|
||||
delete.executeUpdate();
|
||||
}
|
||||
}
|
||||
@@ -205,9 +207,8 @@ class AVMStorePropertyDAOHibernate extends HibernateDaoSupport implements AVMSto
|
||||
*/
|
||||
public void delete(AVMStore store)
|
||||
{
|
||||
Query delete =
|
||||
getSession().createQuery("delete from AVMStorePropertyImpl asp where asp.store = :store");
|
||||
delete.setEntity("store", store);
|
||||
Query delete = getSession().getNamedQuery("avm.DeleteStoreProperties");
|
||||
delete.setParameter("storeId", store.getId());
|
||||
delete.executeUpdate();
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user