mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-24 17:32:48 +00:00
Merged V2.2 to HEAD
7633: Fixed compilation fallout from PropertyValue changes 7640: Build Fix - missing purges for some stores 7645: Fixed line endings 7646: Tweaks to MySQL QName upgrade script after doing large 1.4.3 to 2.2 upgrade. 7648: Give more time per thread to cater for slow executions of test threads 7649: Fixed QName query flush modes git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@8440 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -35,6 +35,8 @@ import org.alfresco.repo.domain.NamespaceEntity;
|
||||
import org.alfresco.repo.domain.QNameDAO;
|
||||
import org.alfresco.repo.domain.QNameEntity;
|
||||
import org.alfresco.service.namespace.QName;
|
||||
import org.apache.commons.logging.Log;
|
||||
import org.apache.commons.logging.LogFactory;
|
||||
import org.hibernate.Query;
|
||||
import org.hibernate.Session;
|
||||
import org.springframework.orm.hibernate3.HibernateCallback;
|
||||
@@ -48,6 +50,8 @@ import org.springframework.orm.hibernate3.support.HibernateDaoSupport;
|
||||
*/
|
||||
public class HibernateQNameDAOImpl extends HibernateDaoSupport implements QNameDAO
|
||||
{
|
||||
private static Log logger = LogFactory.getLog(HibernateQNameDAOImpl.class);
|
||||
|
||||
private static final String QUERY_GET_NS_BY_URI = "qname.GetNamespaceByUri";
|
||||
private static final String QUERY_GET_QNAME_BY_URI_AND_LOCALNAME = "qname.GetQNameByUriAndLocalName";
|
||||
|
||||
@@ -98,6 +102,10 @@ public class HibernateQNameDAOImpl extends HibernateDaoSupport implements QNameD
|
||||
|
||||
public NamespaceEntity newNamespaceEntity(String namespaceUri)
|
||||
{
|
||||
if (logger.isDebugEnabled())
|
||||
{
|
||||
logger.debug("Persisting Namespace: " + namespaceUri);
|
||||
}
|
||||
NamespaceEntity namespace = new NamespaceEntityImpl();
|
||||
namespace.setUri(namespaceUri);
|
||||
// Persist
|
||||
@@ -186,6 +194,10 @@ public class HibernateQNameDAOImpl extends HibernateDaoSupport implements QNameD
|
||||
|
||||
public QNameEntity newQNameEntity(QName qname)
|
||||
{
|
||||
if (logger.isDebugEnabled())
|
||||
{
|
||||
logger.debug("Persisting QName: " + qname);
|
||||
}
|
||||
final String namespaceUri = qname.getNamespaceURI();
|
||||
final String localName = qname.getLocalName();
|
||||
NamespaceEntity namespace = getNamespaceEntity(namespaceUri);
|
||||
|
@@ -59,7 +59,7 @@
|
||||
<version column="version" name="version" type="long" />
|
||||
</class>
|
||||
|
||||
<query name="qname.GetNamespaceByUri" flush-mode="never" cacheable="false">
|
||||
<query name="qname.GetNamespaceByUri" cacheable="false">
|
||||
select
|
||||
namespace
|
||||
from
|
||||
@@ -68,7 +68,7 @@
|
||||
namespace.uri = :namespaceUri
|
||||
</query>
|
||||
|
||||
<query name="qname.GetQNameByUriAndLocalName" flush-mode="never" cacheable="false">
|
||||
<query name="qname.GetQNameByUriAndLocalName" cacheable="false">
|
||||
select
|
||||
qname
|
||||
from
|
||||
|
Reference in New Issue
Block a user