mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
Merged HEAD-BUG-FIX (5.0/Cloud) to HEAD (5.0/Cloud)
78519: Merged EOL (5.0/Cloud) to HEAD-BUG-FIX (5.0/Cloud) 78398: ACE-81 Upgrade MyBatis to 3.2.7 - myBatis 3.2.7 upgrade onto Spring 3.2 upgrade. Merged in appropriate sections from BRANCHES/DEV/DEREK/ALF-19099 and fixed - myBatis namespace config issue. Full maven build with unit tests works, repo and share start and the basics seem to be working. git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@82583 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -13,6 +13,9 @@ Inbound settings from iBatis
|
||||
maxSessions="500"
|
||||
/>
|
||||
-->
|
||||
<settings>
|
||||
<setting name="safeResultHandlerEnabled" value="false"/>
|
||||
</settings>
|
||||
|
||||
<typeAliases>
|
||||
|
||||
|
@@ -27,7 +27,6 @@
|
||||
|
||||
<!-- MyBatis config for Alfresco (using common datasource) -->
|
||||
<bean id="repoSqlSessionFactory" class="org.alfresco.ibatis.HierarchicalSqlSessionFactoryBean">
|
||||
<property name="useLocalCaches" value="${mybatis.useLocalCaches}"/>
|
||||
<property name="resourceLoader" ref="dialectResourceLoader"/>
|
||||
<property name="dataSource" ref="dataSource"/>
|
||||
<property name="configLocation">
|
||||
|
@@ -4,14 +4,14 @@
|
||||
|
||||
<mapper namespace="alfresco.node.select.children">
|
||||
|
||||
<select id="select_ChildAssocsOfParent_Limited" parameterType="ChildAssoc" resultMap="result_ChildAssoc">
|
||||
<select id="select_ChildAssocsOfParent_Limited" parameterType="ChildAssoc" resultMap="alfresco.node.result_ChildAssoc">
|
||||
<include refid="alfresco.node.select_ChildAssocsOfParent_Query"/>
|
||||
<if test="ordered == true">
|
||||
<include refid="alfresco.node.select_ChildAssoc_OrderBy"/>
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<select id="select_ChildNodeIds_Limited" parameterType="ChildAssoc" resultMap="result_ChildAssocIds">
|
||||
<select id="select_ChildNodeIds_Limited" parameterType="ChildAssoc" resultMap="alfresco.node.result_ChildAssocIds">
|
||||
<![CDATA[
|
||||
select
|
||||
ca.id as id,
|
||||
|
@@ -7,7 +7,7 @@
|
||||
<!-- Note the MySQL specific fetch size limitation (Integer.MIN_VALUE). fetchSize activates resultset streaming. -->
|
||||
<!-- '1=1': Makes the SQL string unique WRT the prepared statement cache -->
|
||||
|
||||
<select id="select_ChildAssocsOfParent_Limited" parameterType="ChildAssoc" resultMap="result_ChildAssoc" fetchSize="-2147483648">
|
||||
<select id="select_ChildAssocsOfParent_Limited" parameterType="ChildAssoc" resultMap="alfresco.node.result_ChildAssoc" fetchSize="-2147483648">
|
||||
<include refid="alfresco.node.select_ChildAssocsOfParent_Query"/>
|
||||
and 1=1
|
||||
<if test="ordered == true">
|
||||
@@ -15,7 +15,7 @@
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<select id="select_ChildNodeIds_Limited" parameterType="Ids" resultMap="result_ChildAssocIds" fetchSize="-2147483648">
|
||||
<select id="select_ChildNodeIds_Limited" parameterType="Ids" resultMap="alfresco.node.result_ChildAssocIds" fetchSize="-2147483648">
|
||||
<![CDATA[
|
||||
select
|
||||
ca.id as id,
|
||||
|
@@ -4,35 +4,35 @@
|
||||
|
||||
<mapper namespace="alfresco.permissions.insert">
|
||||
|
||||
<insert id="alfresco.permissions.insert_Acl" parameterType="Acl" useGeneratedKeys="true" keyProperty="id">
|
||||
<insert id="insert_Acl" parameterType="Acl" useGeneratedKeys="true" keyProperty="id">
|
||||
<include refid="alfresco.permissions.insert_Acl_AutoIncrement"/>
|
||||
</insert>
|
||||
|
||||
<insert id="alfresco.permissions.insert_AclMember" parameterType="AclMember" useGeneratedKeys="true" keyProperty="id">
|
||||
<insert id="insert_AclMember" parameterType="AclMember" useGeneratedKeys="true" keyProperty="id">
|
||||
<include refid="alfresco.permissions.insert_AclMember_AutoIncrement"/>
|
||||
</insert>
|
||||
|
||||
<insert id="alfresco.permissions.insert_AclChangeSet" parameterType="AclChangeSet" useGeneratedKeys="true" keyProperty="id">
|
||||
<insert id="insert_AclChangeSet" parameterType="AclChangeSet" useGeneratedKeys="true" keyProperty="id">
|
||||
<include refid="alfresco.permissions.insert_AclChangeSet_AutoIncrement"/>
|
||||
</insert>
|
||||
|
||||
<insert id="alfresco.permissions.insert_Ace" parameterType="Ace" useGeneratedKeys="true" keyProperty="id">
|
||||
<insert id="insert_Ace" parameterType="Ace" useGeneratedKeys="true" keyProperty="id">
|
||||
<include refid="alfresco.permissions.insert_Ace_AutoIncrement"/>
|
||||
</insert>
|
||||
|
||||
<insert id="alfresco.permissions.insert_AceContext" parameterType="AceContext" useGeneratedKeys="true" keyProperty="id">
|
||||
<insert id="insert_AceContext" parameterType="AceContext" useGeneratedKeys="true" keyProperty="id">
|
||||
<include refid="alfresco.permissions.insert_AceContext_AutoIncrement"/>
|
||||
</insert>
|
||||
|
||||
<insert id="alfresco.permissions.insert_Permission" parameterType="Permission" useGeneratedKeys="true" keyProperty="id">
|
||||
<insert id="insert_Permission" parameterType="Permission" useGeneratedKeys="true" keyProperty="id">
|
||||
<include refid="alfresco.permissions.insert_Permission_AutoIncrement"/>
|
||||
</insert>
|
||||
|
||||
<insert id="alfresco.permissions.insert_Authority" parameterType="Authority" useGeneratedKeys="true" keyProperty="id">
|
||||
<insert id="insert_Authority" parameterType="Authority" useGeneratedKeys="true" keyProperty="id">
|
||||
<include refid="alfresco.permissions.insert_Authority_AutoIncrement"/>
|
||||
</insert>
|
||||
|
||||
<insert id="alfresco.permissions.insert_AuthorityAlias" parameterType="AuthorityAlias" useGeneratedKeys="true" keyProperty="id">
|
||||
<insert id="insert_AuthorityAlias" parameterType="AuthorityAlias" useGeneratedKeys="true" keyProperty="id">
|
||||
<include refid="alfresco.permissions.insert_AuthorityAlias_AutoIncrement"/>
|
||||
</insert>
|
||||
|
||||
|
@@ -65,7 +65,7 @@ public class ActivityFeedDAOImpl extends ActivitiesDAOImpl implements ActivityFe
|
||||
public int deleteFeedEntries(Integer maxIdRange) throws SQLException
|
||||
{
|
||||
// Get the largest ID
|
||||
Long maxId = (Long) template.selectOne("alfresco.activities.select_activity_feed_entries_max_id");
|
||||
Long maxId = template.selectOne("alfresco.activities.select_activity_feed_entries_max_id");
|
||||
if (maxId == null)
|
||||
{
|
||||
return 0; // This happens when there are no entries
|
||||
@@ -127,7 +127,7 @@ public class ActivityFeedDAOImpl extends ActivitiesDAOImpl implements ActivityFe
|
||||
@Override
|
||||
public List<ActivityFeedEntity> selectUserFeedsToClean(int maxFeedSize) throws SQLException
|
||||
{
|
||||
return (List<ActivityFeedEntity>)template.selectList("alfresco.activities.select_activity_user_feeds_greater_than_max", maxFeedSize);
|
||||
return template.selectList("alfresco.activities.select_activity_user_feeds_greater_than_max", maxFeedSize);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -150,17 +150,17 @@ public class ActivityFeedDAOImpl extends ActivitiesDAOImpl implements ActivityFe
|
||||
if ((!excludeThisUser) && (!excludeOtherUsers))
|
||||
{
|
||||
// no excludes => everyone => where feed user is me
|
||||
return (Long)template.selectOne("alfresco.activities.count_activity_feed_for_feeduser_and_site", params);
|
||||
return template.selectOne("alfresco.activities.count_activity_feed_for_feeduser_and_site", params);
|
||||
}
|
||||
else if ((excludeThisUser) && (!excludeOtherUsers))
|
||||
{
|
||||
// exclude feed user => others => where feed user is me and post user is not me
|
||||
return (Long)template.selectOne("alfresco.activities.count_activity_feed_for_feeduser_others_and_site", params);
|
||||
return template.selectOne("alfresco.activities.count_activity_feed_for_feeduser_others_and_site", params);
|
||||
}
|
||||
else if ((excludeOtherUsers) && (!excludeThisUser))
|
||||
{
|
||||
// exclude others => me => where feed user is me and post user is me
|
||||
return (Long)template.selectOne("alfresco.activities.count_activity_feed_for_feeduser_me_and_site", params);
|
||||
return template.selectOne("alfresco.activities.count_activity_feed_for_feeduser_me_and_site", params);
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -175,17 +175,17 @@ public class ActivityFeedDAOImpl extends ActivitiesDAOImpl implements ActivityFe
|
||||
if (!excludeThisUser && !excludeOtherUsers)
|
||||
{
|
||||
// no excludes => everyone => where feed user is me
|
||||
return (Long)template.selectOne("alfresco.activities.count_activity_feed_for_feeduser", params);
|
||||
return template.selectOne("alfresco.activities.count_activity_feed_for_feeduser", params);
|
||||
}
|
||||
else if (excludeThisUser)
|
||||
{
|
||||
// exclude feed user => others => where feed user is me and post user is not me
|
||||
return (Long)template.selectOne("alfresco.activities.count_activity_feed_for_feeduser_others", params);
|
||||
return template.selectOne("alfresco.activities.count_activity_feed_for_feeduser_others", params);
|
||||
}
|
||||
else if (excludeOtherUsers)
|
||||
{
|
||||
// exclude others => me => where feed user is me and post user is me
|
||||
return (Long)template.selectOne("alfresco.activities.count_activity_feed_for_feeduser_me", params);
|
||||
return template.selectOne("alfresco.activities.count_activity_feed_for_feeduser_me", params);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -197,7 +197,7 @@ public class ActivityFeedDAOImpl extends ActivitiesDAOImpl implements ActivityFe
|
||||
@Override
|
||||
public List<ActivityFeedEntity> selectSiteFeedsToClean(int maxFeedSize) throws SQLException
|
||||
{
|
||||
return (List<ActivityFeedEntity>)template.selectList("alfresco.activities.select_activity_site_feeds_greater_than_max", maxFeedSize);
|
||||
return template.selectList("alfresco.activities.select_activity_site_feeds_greater_than_max", maxFeedSize);
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
@@ -228,17 +228,17 @@ public class ActivityFeedDAOImpl extends ActivitiesDAOImpl implements ActivityFe
|
||||
if ((!excludeThisUser) && (!excludeOtherUsers))
|
||||
{
|
||||
// no excludes => everyone => where feed user is me
|
||||
return (List<ActivityFeedEntity>)template.selectList("alfresco.activities.select.select.select_activity_feed_for_feeduser_and_site", params, rowBounds);
|
||||
return template.selectList("alfresco.activities.select.select_activity_feed_for_feeduser_and_site", params, rowBounds);
|
||||
}
|
||||
else if ((excludeThisUser) && (!excludeOtherUsers))
|
||||
{
|
||||
// exclude feed user => others => where feed user is me and post user is not me
|
||||
return (List<ActivityFeedEntity>)template.selectList("alfresco.activities.select.select_activity_feed_for_feeduser_others_and_site", params, rowBounds);
|
||||
return template.selectList("alfresco.activities.select.select_activity_feed_for_feeduser_others_and_site", params, rowBounds);
|
||||
}
|
||||
else if ((excludeOtherUsers) && (!excludeThisUser))
|
||||
{
|
||||
// exclude others => me => where feed user is me and post user is me
|
||||
return (List<ActivityFeedEntity>)template.selectList("alfresco.activities.select.select_activity_feed_for_feeduser_me_and_site", params, rowBounds);
|
||||
return template.selectList("alfresco.activities.select.select_activity_feed_for_feeduser_me_and_site", params, rowBounds);
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -253,17 +253,17 @@ public class ActivityFeedDAOImpl extends ActivitiesDAOImpl implements ActivityFe
|
||||
if (!excludeThisUser && !excludeOtherUsers)
|
||||
{
|
||||
// no excludes => everyone => where feed user is me
|
||||
return (List<ActivityFeedEntity>)template.selectList("alfresco.activities.select.select_activity_feed_for_feeduser", params, rowBounds);
|
||||
return template.selectList("alfresco.activities.select.select_activity_feed_for_feeduser", params, rowBounds);
|
||||
}
|
||||
else if (excludeThisUser)
|
||||
{
|
||||
// exclude feed user => others => where feed user is me and post user is not me
|
||||
return (List<ActivityFeedEntity>)template.selectList("alfresco.activities.select.select_activity_feed_for_feeduser_others", params, rowBounds);
|
||||
return template.selectList("alfresco.activities.select.select_activity_feed_for_feeduser_others", params, rowBounds);
|
||||
}
|
||||
else if (excludeOtherUsers)
|
||||
{
|
||||
// exclude others => me => where feed user is me and post user is me
|
||||
return (List<ActivityFeedEntity>)template.selectList("alfresco.activities.select.select_activity_feed_for_feeduser_me", params, rowBounds);
|
||||
return template.selectList("alfresco.activities.select.select_activity_feed_for_feeduser_me", params, rowBounds);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -335,7 +335,7 @@ public class ActivityFeedDAOImpl extends ActivitiesDAOImpl implements ActivityFe
|
||||
{
|
||||
RowBounds rowBounds = new RowBounds(skipCount, maxItems);
|
||||
|
||||
feedEntries = (List<ActivityFeedEntity>)template.selectList(sql, params, rowBounds);
|
||||
feedEntries = template.selectList(sql, params, rowBounds);
|
||||
Iterator<ActivityFeedEntity> feedEntriesIt = feedEntries.iterator();
|
||||
|
||||
while(feedEntriesIt.hasNext() && numAddedItems < expectedMaxItems)
|
||||
@@ -401,17 +401,17 @@ public class ActivityFeedDAOImpl extends ActivitiesDAOImpl implements ActivityFe
|
||||
if ((!excludeThisUser) && (!excludeOtherUsers))
|
||||
{
|
||||
// no excludes => everyone => where feed user is me
|
||||
return getPagingResults(pagingRequest, filterByNetwork(networkId, siteId, "alfresco.activities.select_activity_feed_for_feeduser_and_site", params, pagingRequest));
|
||||
return getPagingResults(pagingRequest, filterByNetwork(networkId, siteId, "alfresco.activities.select.select_activity_feed_for_feeduser_and_site", params, pagingRequest));
|
||||
}
|
||||
else if ((excludeThisUser) && (!excludeOtherUsers))
|
||||
{
|
||||
// exclude feed user => others => where feed user is me and post user is not me
|
||||
return getPagingResults(pagingRequest, filterByNetwork(networkId, siteId, "alfresco.activities.select_activity_feed_for_feeduser_others_and_site", params, pagingRequest));
|
||||
return getPagingResults(pagingRequest, filterByNetwork(networkId, siteId, "alfresco.activities.select.select_activity_feed_for_feeduser_others_and_site", params, pagingRequest));
|
||||
}
|
||||
else if ((excludeOtherUsers) && (!excludeThisUser))
|
||||
{
|
||||
// exclude others => me => where feed user is me and post user is me
|
||||
return getPagingResults(pagingRequest, filterByNetwork(networkId, siteId, "alfresco.activities.select_activity_feed_for_feeduser_me_and_site", params, pagingRequest));
|
||||
return getPagingResults(pagingRequest, filterByNetwork(networkId, siteId, "alfresco.activities.select.select_activity_feed_for_feeduser_me_and_site", params, pagingRequest));
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -426,17 +426,17 @@ public class ActivityFeedDAOImpl extends ActivitiesDAOImpl implements ActivityFe
|
||||
if (!excludeThisUser && !excludeOtherUsers)
|
||||
{
|
||||
// no excludes => everyone => where feed user is me
|
||||
return getPagingResults(pagingRequest, filterByNetwork(networkId, siteId, "alfresco.activities.select_activity_feed_for_feeduser", params, pagingRequest));
|
||||
return getPagingResults(pagingRequest, filterByNetwork(networkId, siteId, "alfresco.activities.select.select_activity_feed_for_feeduser", params, pagingRequest));
|
||||
}
|
||||
else if (excludeThisUser)
|
||||
{
|
||||
// exclude feed user => others => where feed user is me and post user is not me
|
||||
return getPagingResults(pagingRequest, filterByNetwork(networkId, siteId, "alfresco.activities.select_activity_feed_for_feeduser_others", params, pagingRequest));
|
||||
return getPagingResults(pagingRequest, filterByNetwork(networkId, siteId, "alfresco.activities.select.select_activity_feed_for_feeduser_others", params, pagingRequest));
|
||||
}
|
||||
else if (excludeOtherUsers)
|
||||
{
|
||||
// exclude others => me => where feed user is me and post user is me
|
||||
return getPagingResults(pagingRequest, filterByNetwork(networkId, siteId, "alfresco.activities.select_activity_feed_for_feeduser_me", params, pagingRequest));
|
||||
return getPagingResults(pagingRequest, filterByNetwork(networkId, siteId, "alfresco.activities.select.select_activity_feed_for_feeduser_me", params, pagingRequest));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -451,7 +451,7 @@ public class ActivityFeedDAOImpl extends ActivitiesDAOImpl implements ActivityFe
|
||||
params.setSiteNetwork(siteId);
|
||||
|
||||
// for given site
|
||||
return (Long)template.selectOne("alfresco.activities.count_activity_feed_for_site", params);
|
||||
return template.selectOne("alfresco.activities.count_activity_feed_for_site", params);
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
@@ -465,6 +465,6 @@ public class ActivityFeedDAOImpl extends ActivitiesDAOImpl implements ActivityFe
|
||||
RowBounds rowBounds = new RowBounds(RowBounds.NO_ROW_OFFSET, rowLimit);
|
||||
|
||||
// for given site
|
||||
return (List<ActivityFeedEntity>)template.selectList("alfresco.activities.select.select_activity_feed_for_site", params, rowBounds);
|
||||
return template.selectList("alfresco.activities.select.select_activity_feed_for_site", params, rowBounds);
|
||||
}
|
||||
}
|
||||
|
@@ -44,11 +44,11 @@ public class ActivityPostDAOImpl extends ActivitiesDAOImpl implements ActivityPo
|
||||
(activityPost.getMaxId() != -1) &&
|
||||
(activityPost.getStatus() != null))
|
||||
{
|
||||
return (List<ActivityPostEntity>)template.selectList("alfresco.activities.select_activity_posts_by_params", activityPost, rowBounds);
|
||||
return template.selectList("alfresco.activities.select_activity_posts_by_params", activityPost, rowBounds);
|
||||
}
|
||||
else if (activityPost.getStatus() != null)
|
||||
{
|
||||
return (List<ActivityPostEntity>)template.selectList("alfresco.activities.select_activity_posts_by_status", activityPost, rowBounds);
|
||||
return template.selectList("alfresco.activities.select_activity_posts_by_status", activityPost, rowBounds);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -58,17 +58,17 @@ public class ActivityPostDAOImpl extends ActivitiesDAOImpl implements ActivityPo
|
||||
|
||||
public Long getMaxActivitySeq() throws SQLException
|
||||
{
|
||||
return (Long)template.selectOne("alfresco.activities.select_activity_post_max_seq");
|
||||
return template.selectOne("alfresco.activities.select_activity_post_max_seq");
|
||||
}
|
||||
|
||||
public Long getMinActivitySeq() throws SQLException
|
||||
{
|
||||
return (Long)template.selectOne("alfresco.activities.select_activity_post_min_seq");
|
||||
return template.selectOne("alfresco.activities.select_activity_post_min_seq");
|
||||
}
|
||||
|
||||
public Integer getMaxNodeHash() throws SQLException
|
||||
{
|
||||
return (Integer)template.selectOne("alfresco.activities.select_activity_post_max_jobtasknode");
|
||||
return template.selectOne("alfresco.activities.select_activity_post_max_jobtasknode");
|
||||
}
|
||||
|
||||
public int updatePost(long id, String siteNetwork, String activityData, ActivityPostEntity.STATUS status) throws SQLException
|
||||
|
@@ -43,12 +43,12 @@ public class FeedControlDAOImpl extends ActivitiesDAOImpl implements FeedControl
|
||||
{
|
||||
FeedControlEntity params = new FeedControlEntity(feedUserId);
|
||||
|
||||
return (List<FeedControlEntity>)template.selectList("alfresco.activities.select_activity_feedcontrols_for_user", params);
|
||||
return template.selectList("alfresco.activities.select_activity_feedcontrols_for_user", params);
|
||||
}
|
||||
|
||||
public long selectFeedControl(FeedControlEntity activityFeedControl) throws SQLException
|
||||
{
|
||||
Long id = (Long)template.selectOne("alfresco.activities.select_activity_feedcontrol", activityFeedControl);
|
||||
Long id = template.selectOne("alfresco.activities.select_activity_feedcontrol", activityFeedControl);
|
||||
return (id != null ? id : -1);
|
||||
}
|
||||
}
|
||||
|
@@ -34,6 +34,7 @@ import org.alfresco.repo.domain.audit.AuditQueryParameters;
|
||||
import org.alfresco.repo.domain.audit.AuditQueryResult;
|
||||
import org.alfresco.repo.domain.propval.PropertyValueDAO.PropertyFinderCallback;
|
||||
import org.alfresco.util.Pair;
|
||||
import org.apache.ibatis.session.Configuration;
|
||||
import org.apache.ibatis.session.ResultContext;
|
||||
import org.apache.ibatis.session.ResultHandler;
|
||||
import org.apache.ibatis.session.RowBounds;
|
||||
@@ -77,7 +78,7 @@ public class AuditDAOImpl extends AbstractAuditDAOImpl
|
||||
{
|
||||
AuditModelEntity entity = new AuditModelEntity();
|
||||
entity.setContentCrc(crc);
|
||||
entity = (AuditModelEntity) template.selectOne(
|
||||
entity = template.selectOne(
|
||||
SELECT_MODEL_BY_CRC,
|
||||
entity);
|
||||
// Done
|
||||
@@ -99,7 +100,7 @@ public class AuditDAOImpl extends AbstractAuditDAOImpl
|
||||
{
|
||||
Map<String, Object> params = new HashMap<String, Object>(11);
|
||||
params.put("id", id);
|
||||
AuditApplicationEntity entity = (AuditApplicationEntity) template.selectOne(
|
||||
AuditApplicationEntity entity = template.selectOne(
|
||||
SELECT_APPLICATION_BY_ID,
|
||||
params);
|
||||
// Done
|
||||
@@ -123,7 +124,7 @@ public class AuditDAOImpl extends AbstractAuditDAOImpl
|
||||
|
||||
Map<String, Object> params = new HashMap<String, Object>(11);
|
||||
params.put("id", appNamePair.getFirst());
|
||||
AuditApplicationEntity entity = (AuditApplicationEntity) template.selectOne(
|
||||
AuditApplicationEntity entity = template.selectOne(
|
||||
SELECT_APPLICATION_BY_NAME_ID,
|
||||
params);
|
||||
// Done
|
||||
@@ -281,7 +282,7 @@ public class AuditDAOImpl extends AbstractAuditDAOImpl
|
||||
}
|
||||
};
|
||||
|
||||
List<AuditQueryResult> rows = (List<AuditQueryResult>) template.selectList(SELECT_ENTRIES_WITHOUT_VALUES, params, new RowBounds(0, maxResults));
|
||||
List<AuditQueryResult> rows = template.selectList(SELECT_ENTRIES_WITHOUT_VALUES, params, new RowBounds(0, maxResults));
|
||||
for (AuditQueryResult row : rows)
|
||||
{
|
||||
resultsByValueId.put(row.getAuditValuesId(), row);
|
||||
@@ -317,7 +318,9 @@ public class AuditDAOImpl extends AbstractAuditDAOImpl
|
||||
rowHandler.processResult((AuditQueryResult)context.getResultObject());
|
||||
}
|
||||
};
|
||||
Configuration configuration = template.getConfiguration();
|
||||
RollupResultHandler rollupResultHandler = new RollupResultHandler(
|
||||
configuration,
|
||||
new String[] {"auditEntryId"},
|
||||
"auditValueRows",
|
||||
queryResultHandler,
|
||||
|
@@ -103,7 +103,7 @@ public class ContentDataDAOImpl extends AbstractContentDataDAOImpl
|
||||
{
|
||||
ContentUrlEntity contentUrlEntity = new ContentUrlEntity();
|
||||
contentUrlEntity.setId(id);
|
||||
contentUrlEntity = (ContentUrlEntity) template.selectOne(SELECT_CONTENT_URL_BY_ID, contentUrlEntity);
|
||||
contentUrlEntity = template.selectOne(SELECT_CONTENT_URL_BY_ID, contentUrlEntity);
|
||||
// Done
|
||||
return contentUrlEntity;
|
||||
}
|
||||
@@ -117,7 +117,7 @@ public class ContentDataDAOImpl extends AbstractContentDataDAOImpl
|
||||
{
|
||||
contentUrlEntity.setContentUrlShort(contentUrlEntity.getContentUrlShort().toLowerCase());
|
||||
}
|
||||
contentUrlEntity = (ContentUrlEntity) template.selectOne(SELECT_CONTENT_URL_BY_KEY, contentUrlEntity);
|
||||
contentUrlEntity = template.selectOne(SELECT_CONTENT_URL_BY_KEY, contentUrlEntity);
|
||||
// Done
|
||||
return contentUrlEntity;
|
||||
}
|
||||
@@ -132,7 +132,7 @@ public class ContentDataDAOImpl extends AbstractContentDataDAOImpl
|
||||
|
||||
ContentUrlOrphanQuery query = new ContentUrlOrphanQuery();
|
||||
query.setMaxOrphanTimeExclusive(maxOrphanTimeExclusive);
|
||||
List<ContentUrlEntity> results = (List<ContentUrlEntity>) template.selectList(SELECT_CONTENT_URLS_ORPHANED,
|
||||
List<ContentUrlEntity> results = template.selectList(SELECT_CONTENT_URLS_ORPHANED,
|
||||
query,
|
||||
new RowBounds(0, maxResults));
|
||||
// Pass the result to the callback
|
||||
@@ -171,7 +171,7 @@ public class ContentDataDAOImpl extends AbstractContentDataDAOImpl
|
||||
{
|
||||
contentUrlEntity.setContentUrlShort(contentUrlEntity.getContentUrlShort().toLowerCase());
|
||||
}
|
||||
contentUrlEntity = (ContentUrlEntity) template.selectOne(SELECT_CONTENT_URL_BY_KEY_UNREFERENCED, contentUrlEntity);
|
||||
contentUrlEntity = template.selectOne(SELECT_CONTENT_URL_BY_KEY_UNREFERENCED, contentUrlEntity);
|
||||
// Done
|
||||
return contentUrlEntity;
|
||||
}
|
||||
@@ -206,7 +206,7 @@ public class ContentDataDAOImpl extends AbstractContentDataDAOImpl
|
||||
{
|
||||
Map<String, Object> params = new HashMap<String, Object>(11);
|
||||
params.put("id", id);
|
||||
ContentDataEntity contentDataEntity = (ContentDataEntity) template.selectOne(SELECT_CONTENT_DATA_BY_ID, params);
|
||||
ContentDataEntity contentDataEntity = template.selectOne(SELECT_CONTENT_DATA_BY_ID, params);
|
||||
// Done
|
||||
return contentDataEntity;
|
||||
}
|
||||
@@ -222,7 +222,7 @@ public class ContentDataDAOImpl extends AbstractContentDataDAOImpl
|
||||
}
|
||||
IdsEntity idsEntity = new IdsEntity();
|
||||
idsEntity.setIds(new ArrayList<Long>(nodeIds));
|
||||
return (List<ContentDataEntity>)template.selectList(SELECT_CONTENT_DATA_BY_NODE_IDS, idsEntity);
|
||||
return template.selectList(SELECT_CONTENT_DATA_BY_NODE_IDS, idsEntity);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -267,7 +267,7 @@ public class ContentDataDAOImpl extends AbstractContentDataDAOImpl
|
||||
idsEntity.setIdOne(nodeId);
|
||||
idsEntity.setIds(new ArrayList<Long>(qnameIds));
|
||||
@SuppressWarnings("unchecked")
|
||||
List<Long> ids = (List<Long>) template.selectList(SELECT_CONTENT_DATA_BY_NODE_AND_QNAME, idsEntity);
|
||||
List<Long> ids = template.selectList(SELECT_CONTENT_DATA_BY_NODE_AND_QNAME, idsEntity);
|
||||
// Delete each one
|
||||
for (Long id : ids)
|
||||
{
|
||||
|
@@ -49,7 +49,7 @@ public class EncodingDAOImpl extends AbstractEncodingDAOImpl
|
||||
{
|
||||
EncodingEntity encodingEntity = new EncodingEntity();
|
||||
encodingEntity.setId(id);
|
||||
encodingEntity = (EncodingEntity) template.selectOne(SELECT_ENCODING_BY_ID, encodingEntity);
|
||||
encodingEntity = template.selectOne(SELECT_ENCODING_BY_ID, encodingEntity);
|
||||
// Done
|
||||
return encodingEntity;
|
||||
}
|
||||
@@ -59,7 +59,7 @@ public class EncodingDAOImpl extends AbstractEncodingDAOImpl
|
||||
{
|
||||
EncodingEntity encodingEntity = new EncodingEntity();
|
||||
encodingEntity.setEncoding(encoding == null ? null : encoding.toLowerCase());
|
||||
encodingEntity = (EncodingEntity) template.selectOne(SELECT_ENCODING_BY_KEY, encodingEntity);
|
||||
encodingEntity = template.selectOne(SELECT_ENCODING_BY_KEY, encodingEntity);
|
||||
// Could be null
|
||||
return encodingEntity;
|
||||
}
|
||||
|
@@ -52,7 +52,7 @@ public class LocaleDAOImpl extends AbstractLocaleDAOImpl
|
||||
Map<String, Object> params = new HashMap<String, Object>(1);
|
||||
params.put("id", id);
|
||||
|
||||
return (LocaleEntity) template.selectOne(SELECT_LOCALE_BY_ID, params);
|
||||
return template.selectOne(SELECT_LOCALE_BY_ID, params);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -61,7 +61,7 @@ public class LocaleDAOImpl extends AbstractLocaleDAOImpl
|
||||
Map<String, Object> params = new HashMap<String, Object>(1);
|
||||
params.put("str", localeStr);
|
||||
|
||||
return (LocaleEntity) template.selectOne(SELECT_LOCALE_BY_NAME, params);
|
||||
return template.selectOne(SELECT_LOCALE_BY_NAME, params);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@@ -60,7 +60,7 @@ public class LockDAOImpl extends AbstractLockDAOImpl
|
||||
LockResourceEntity lockResource = new LockResourceEntity();
|
||||
lockResource.setQnameNamespaceId(qnameNamespaceId);
|
||||
lockResource.setQnameLocalName(qnameLocalName == null ? null : qnameLocalName.toLowerCase());
|
||||
lockResource = (LockResourceEntity) template.selectOne(SELECT_LOCKRESOURCE_BY_QNAME, lockResource);
|
||||
lockResource = template.selectOne(SELECT_LOCKRESOURCE_BY_QNAME, lockResource);
|
||||
// Could be null
|
||||
return lockResource;
|
||||
}
|
||||
@@ -81,7 +81,7 @@ public class LockDAOImpl extends AbstractLockDAOImpl
|
||||
@Override
|
||||
protected List<LockEntity> getLocksBySharedResourceIds(List<Long> sharedLockResourceIds)
|
||||
{
|
||||
List<LockEntity> locks = (List<LockEntity>) template.selectList(SELECT_LOCK_BY_SHARED_IDS, sharedLockResourceIds);
|
||||
List<LockEntity> locks = template.selectList(SELECT_LOCK_BY_SHARED_IDS, sharedLockResourceIds);
|
||||
// Done
|
||||
return locks;
|
||||
}
|
||||
@@ -91,7 +91,7 @@ public class LockDAOImpl extends AbstractLockDAOImpl
|
||||
{
|
||||
LockEntity lock = new LockEntity();
|
||||
lock.setId(id);
|
||||
lock = (LockEntity) template.selectOne(SELECT_LOCK_BY_ID, lock);
|
||||
lock = template.selectOne(SELECT_LOCK_BY_ID, lock);
|
||||
// Done
|
||||
return lock;
|
||||
}
|
||||
@@ -102,7 +102,7 @@ public class LockDAOImpl extends AbstractLockDAOImpl
|
||||
LockEntity lock = new LockEntity();
|
||||
lock.setSharedResourceId(sharedResourceId);
|
||||
lock.setExclusiveResourceId(exclusiveResourceId);
|
||||
lock = (LockEntity) template.selectOne(SELECT_LOCK_BY_KEY, lock);
|
||||
lock = template.selectOne(SELECT_LOCK_BY_KEY, lock);
|
||||
// Done
|
||||
return lock;
|
||||
}
|
||||
|
@@ -50,7 +50,7 @@ public class MimetypeDAOImpl extends AbstractMimetypeDAOImpl
|
||||
{
|
||||
MimetypeEntity mimetypeEntity = new MimetypeEntity();
|
||||
mimetypeEntity.setId(id);
|
||||
mimetypeEntity = (MimetypeEntity) template.selectOne(SELECT_MIMETYPE_BY_ID, mimetypeEntity);
|
||||
mimetypeEntity = template.selectOne(SELECT_MIMETYPE_BY_ID, mimetypeEntity);
|
||||
// Done
|
||||
return mimetypeEntity;
|
||||
}
|
||||
@@ -60,7 +60,7 @@ public class MimetypeDAOImpl extends AbstractMimetypeDAOImpl
|
||||
{
|
||||
MimetypeEntity mimetypeEntity = new MimetypeEntity();
|
||||
mimetypeEntity.setMimetype(mimetype == null ? null : mimetype.toLowerCase());
|
||||
mimetypeEntity = (MimetypeEntity) template.selectOne(SELECT_MIMETYPE_BY_KEY, mimetypeEntity);
|
||||
mimetypeEntity = template.selectOne(SELECT_MIMETYPE_BY_KEY, mimetypeEntity);
|
||||
// Could be null
|
||||
return mimetypeEntity;
|
||||
}
|
||||
|
@@ -98,9 +98,9 @@ public class NodeDAOImpl extends AbstractNodeDAOImpl
|
||||
private static final String SELECT_NODE_PROPERTIES = "alfresco.node.select_NodeProperties";
|
||||
private static final String SELECT_PROPERTIES_BY_TYPES = "alfresco.node.select_PropertiesByTypes";
|
||||
private static final String SELECT_NODE_ASPECTS = "alfresco.node.select_NodeAspects";
|
||||
private static final String INSERT_NODE_PROPERTY = "alfresco.node.insert.insert_NodeProperty";
|
||||
private static final String INSERT_NODE_PROPERTY = "alfresco.node.insert_NodeProperty";
|
||||
private static final String UPDATE_PRIMARY_CHILDREN_SHARED_ACL = "alfresco.node.update.update_PrimaryChildrenSharedAcl";
|
||||
private static final String INSERT_NODE_ASPECT = "alfresco.node.insert.insert_NodeAspect";
|
||||
private static final String INSERT_NODE_ASPECT = "alfresco.node.insert_NodeAspect";
|
||||
private static final String DELETE_NODE_ASPECTS = "alfresco.node.delete_NodeAspects";
|
||||
private static final String DELETE_NODE_PROPERTIES = "alfresco.node.delete_NodeProperties";
|
||||
private static final String SELECT_NODES_WITH_ASPECT_IDS = "alfresco.node.select_NodesWithAspectIds";
|
||||
@@ -212,7 +212,7 @@ public class NodeDAOImpl extends AbstractNodeDAOImpl
|
||||
ServerEntity entity = new ServerEntity();
|
||||
entity.setIpAddress(ipAddress);
|
||||
// Potentially more results if there is a case issue (unlikely)
|
||||
List<ServerEntity> results = (List<ServerEntity>) template.selectList(SELECT_SERVER_BY_IPADDRESS, entity);
|
||||
List<ServerEntity> results = template.selectList(SELECT_SERVER_BY_IPADDRESS, entity);
|
||||
for (ServerEntity serverEntity : results)
|
||||
{
|
||||
// Take the first one that matches regardless of case
|
||||
@@ -270,7 +270,7 @@ public class NodeDAOImpl extends AbstractNodeDAOImpl
|
||||
@Override
|
||||
protected List<StoreEntity> selectAllStores()
|
||||
{
|
||||
return (List<StoreEntity>) template.selectList(SELECT_STORE_ALL);
|
||||
return template.selectList(SELECT_STORE_ALL);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -279,7 +279,7 @@ public class NodeDAOImpl extends AbstractNodeDAOImpl
|
||||
StoreEntity store = new StoreEntity();
|
||||
store.setProtocol(storeRef.getProtocol());
|
||||
store.setIdentifier(storeRef.getIdentifier());
|
||||
return (StoreEntity) template.selectOne(SELECT_STORE_BY_REF, store);
|
||||
return template.selectOne(SELECT_STORE_BY_REF, store);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -288,7 +288,7 @@ public class NodeDAOImpl extends AbstractNodeDAOImpl
|
||||
StoreEntity store = new StoreEntity();
|
||||
store.setProtocol(storeRef.getProtocol());
|
||||
store.setIdentifier(storeRef.getIdentifier());
|
||||
return (NodeEntity) template.selectOne(SELECT_STORE_ROOT_NODE_BY_REF, store);
|
||||
return template.selectOne(SELECT_STORE_ROOT_NODE_BY_REF, store);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -399,7 +399,7 @@ public class NodeDAOImpl extends AbstractNodeDAOImpl
|
||||
NodeEntity node = new NodeEntity();
|
||||
node.setId(id);
|
||||
|
||||
return (NodeEntity) template.selectOne(SELECT_NODE_BY_ID, node);
|
||||
return template.selectOne(SELECT_NODE_BY_ID, node);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -421,7 +421,7 @@ public class NodeDAOImpl extends AbstractNodeDAOImpl
|
||||
}
|
||||
node.setUuid(uuid);
|
||||
|
||||
return (NodeEntity) template.selectOne(SELECT_NODE_BY_NODEREF, node);
|
||||
return template.selectOne(SELECT_NODE_BY_NODEREF, node);
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
@@ -434,7 +434,7 @@ public class NodeDAOImpl extends AbstractNodeDAOImpl
|
||||
// UUID
|
||||
nodeBatchLoadEntity.setUuids(new ArrayList<String>(uuids));
|
||||
|
||||
return (List<Node>) template.selectList(SELECT_NODES_BY_UUIDS, nodeBatchLoadEntity);
|
||||
return template.selectList(SELECT_NODES_BY_UUIDS, nodeBatchLoadEntity);
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
@@ -445,7 +445,7 @@ public class NodeDAOImpl extends AbstractNodeDAOImpl
|
||||
// IDs
|
||||
nodeBatchLoadEntity.setIds(new ArrayList<Long>(ids));
|
||||
|
||||
return (List<Node>) template.selectList(SELECT_NODES_BY_IDS, nodeBatchLoadEntity);
|
||||
return template.selectList(SELECT_NODES_BY_IDS, nodeBatchLoadEntity);
|
||||
}
|
||||
|
||||
|
||||
@@ -505,7 +505,7 @@ public class NodeDAOImpl extends AbstractNodeDAOImpl
|
||||
NodePropertyEntity prop = new NodePropertyEntity();
|
||||
prop.setNodeIds(new ArrayList<Long>(nodeIds));
|
||||
|
||||
List<NodePropertyEntity> rows = (List<NodePropertyEntity>) template.selectList(SELECT_NODE_PROPERTIES, prop);
|
||||
List<NodePropertyEntity> rows = template.selectList(SELECT_NODE_PROPERTIES, prop);
|
||||
return makePersistentPropertiesMap(rows);
|
||||
}
|
||||
@Override
|
||||
@@ -534,7 +534,7 @@ public class NodeDAOImpl extends AbstractNodeDAOImpl
|
||||
prop.setQnameIds(new ArrayList<Long>(qnameIds));
|
||||
}
|
||||
|
||||
List<NodePropertyEntity> rows = (List<NodePropertyEntity>) template.selectList(SELECT_NODE_PROPERTIES, prop);
|
||||
List<NodePropertyEntity> rows = template.selectList(SELECT_NODE_PROPERTIES, prop);
|
||||
return makePersistentPropertiesMap(rows);
|
||||
}
|
||||
|
||||
@@ -624,7 +624,7 @@ public class NodeDAOImpl extends AbstractNodeDAOImpl
|
||||
NodeAspectsEntity aspects = new NodeAspectsEntity();
|
||||
aspects.setNodeIds(new ArrayList<Long>(nodeIds));
|
||||
|
||||
List<NodeAspectsEntity> rows = (List<NodeAspectsEntity>) template.selectList(SELECT_NODE_ASPECTS, aspects);
|
||||
List<NodeAspectsEntity> rows = template.selectList(SELECT_NODE_ASPECTS, aspects);
|
||||
|
||||
Map<NodeVersionKey, Set<QName>> results = new HashMap<NodeVersionKey, Set<QName>>(rows.size()*2);
|
||||
for (NodeAspectsEntity nodeAspectsEntity : rows)
|
||||
@@ -751,7 +751,7 @@ public class NodeDAOImpl extends AbstractNodeDAOImpl
|
||||
NodeEntity node = new NodeEntity();
|
||||
node.setId(nodeId);
|
||||
|
||||
return (List<NodeAssocEntity>) template.selectList(SELECT_NODE_ASSOCS, node);
|
||||
return template.selectList(SELECT_NODE_ASSOCS, node);
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
@@ -766,7 +766,7 @@ public class NodeDAOImpl extends AbstractNodeDAOImpl
|
||||
// Type
|
||||
assoc.setTypeQNameId(typeQNameId);
|
||||
|
||||
return (List<NodeAssocEntity>) template.selectList(SELECT_NODE_ASSOCS_BY_SOURCE, assoc);
|
||||
return template.selectList(SELECT_NODE_ASSOCS_BY_SOURCE, assoc);
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
@@ -781,7 +781,7 @@ public class NodeDAOImpl extends AbstractNodeDAOImpl
|
||||
// Type
|
||||
assoc.setTypeQNameId(typeQNameId);
|
||||
|
||||
return (List<NodeAssocEntity>) template.selectList(SELECT_NODE_ASSOCS_BY_TARGET, assoc);
|
||||
return template.selectList(SELECT_NODE_ASSOCS_BY_TARGET, assoc);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -790,7 +790,7 @@ public class NodeDAOImpl extends AbstractNodeDAOImpl
|
||||
NodeAssocEntity assoc = new NodeAssocEntity();
|
||||
assoc.setId(assocId);
|
||||
|
||||
return (NodeAssocEntity) template.selectOne(SELECT_NODE_ASSOC_BY_ID, assoc);
|
||||
return template.selectOne(SELECT_NODE_ASSOC_BY_ID, assoc);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -804,7 +804,7 @@ public class NodeDAOImpl extends AbstractNodeDAOImpl
|
||||
// Assoc
|
||||
assoc.setTypeQNameId(assocTypeQNameId);
|
||||
|
||||
Integer maxIndex = (Integer) template.selectOne(SELECT_NODE_ASSOCS_MAX_INDEX, assoc);
|
||||
Integer maxIndex = template.selectOne(SELECT_NODE_ASSOCS_MAX_INDEX, assoc);
|
||||
return maxIndex == null ? 0 : maxIndex.intValue();
|
||||
}
|
||||
|
||||
@@ -869,7 +869,7 @@ public class NodeDAOImpl extends AbstractNodeDAOImpl
|
||||
ChildAssocEntity assoc = new ChildAssocEntity();
|
||||
assoc.setId(assocId);
|
||||
|
||||
return (ChildAssocEntity) template.selectOne(SELECT_CHILD_ASSOC_BY_ID, assoc);
|
||||
return template.selectOne(SELECT_CHILD_ASSOC_BY_ID, assoc);
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
@@ -888,7 +888,7 @@ public class NodeDAOImpl extends AbstractNodeDAOImpl
|
||||
assoc.setId(minAssocIdInclusive);
|
||||
|
||||
RowBounds rowBounds = new RowBounds(0, maxResults);
|
||||
return (List<ChildAssocEntity>) template.selectList(SELECT_CHILD_NODE_IDS, assoc, rowBounds);
|
||||
return template.selectList(SELECT_CHILD_NODE_IDS, assoc, rowBounds);
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
@@ -903,7 +903,7 @@ public class NodeDAOImpl extends AbstractNodeDAOImpl
|
||||
// Primary
|
||||
assoc.setPrimary(true);
|
||||
|
||||
return (List<NodeIdAndAclId>) template.selectList(SELECT_NODE_PRIMARY_CHILD_ACLS, assoc);
|
||||
return template.selectList(SELECT_NODE_PRIMARY_CHILD_ACLS, assoc);
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
@@ -936,7 +936,7 @@ public class NodeDAOImpl extends AbstractNodeDAOImpl
|
||||
// Ordered
|
||||
assoc.setOrdered(false);
|
||||
|
||||
return (List<ChildAssocEntity>) template.selectList(SELECT_CHILD_ASSOCS_OF_PARENT, assoc);
|
||||
return template.selectList(SELECT_CHILD_ASSOCS_OF_PARENT, assoc);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1156,7 +1156,7 @@ public class NodeDAOImpl extends AbstractNodeDAOImpl
|
||||
assoc.setOrdered(false);
|
||||
|
||||
// Note: This single results was assumed from inception of the original method. It's correct.
|
||||
return (ChildAssocEntity) template.selectOne(SELECT_CHILD_ASSOC_OF_PARENT_BY_NAME, assoc);
|
||||
return template.selectOne(SELECT_CHILD_ASSOC_OF_PARENT_BY_NAME, assoc);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -1313,7 +1313,7 @@ public class NodeDAOImpl extends AbstractNodeDAOImpl
|
||||
// Primary
|
||||
assoc.setPrimary(Boolean.TRUE);
|
||||
|
||||
return (List<ChildAssocEntity>) template.selectList(SELECT_PARENT_ASSOCS_OF_CHILD, assoc);
|
||||
return template.selectList(SELECT_PARENT_ASSOCS_OF_CHILD, assoc);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -1370,7 +1370,7 @@ public class NodeDAOImpl extends AbstractNodeDAOImpl
|
||||
childNode.setId(childNodeId);
|
||||
assoc.setChildNode(childNode);
|
||||
|
||||
return (List<ChildAssocEntity>) template.selectList(SELECT_PARENT_ASSOCS_OF_CHILD, assoc);
|
||||
return template.selectList(SELECT_PARENT_ASSOCS_OF_CHILD, assoc);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -1455,7 +1455,7 @@ public class NodeDAOImpl extends AbstractNodeDAOImpl
|
||||
TransactionQueryEntity query = new TransactionQueryEntity();
|
||||
query.setMaxCommitTime(maxCommitTime);
|
||||
|
||||
List<Transaction> txns = (List<Transaction>) template.selectList(SELECT_TXN_LAST, query, new RowBounds(0, 1));
|
||||
List<Transaction> txns = template.selectList(SELECT_TXN_LAST, query, new RowBounds(0, 1));
|
||||
if (txns.size() > 0)
|
||||
{
|
||||
return txns.get(0);
|
||||
@@ -1469,7 +1469,7 @@ public class NodeDAOImpl extends AbstractNodeDAOImpl
|
||||
@Override
|
||||
protected int selectTransactionCount()
|
||||
{
|
||||
return (Integer) template.selectOne(SELECT_TXN_COUNT);
|
||||
return template.selectOne(SELECT_TXN_COUNT);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -1478,7 +1478,7 @@ public class NodeDAOImpl extends AbstractNodeDAOImpl
|
||||
TransactionQueryEntity query = new TransactionQueryEntity();
|
||||
query.setId(txnId);
|
||||
|
||||
return (Transaction) template.selectOne(SELECT_TXNS, query);
|
||||
return template.selectOne(SELECT_TXNS, query);
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
@@ -1493,7 +1493,7 @@ public class NodeDAOImpl extends AbstractNodeDAOImpl
|
||||
}
|
||||
|
||||
// TODO: Return List<Node> for quicker node_deleted access
|
||||
return (List<NodeEntity>) template.selectList(SELECT_TXN_NODES, query);
|
||||
return template.selectList(SELECT_TXN_NODES, query);
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
@@ -1526,11 +1526,11 @@ public class NodeDAOImpl extends AbstractNodeDAOImpl
|
||||
|
||||
if (count == null)
|
||||
{
|
||||
return (List<Transaction>) template.selectList(SELECT_TXNS, query);
|
||||
return template.selectList(SELECT_TXNS, query);
|
||||
}
|
||||
else
|
||||
{
|
||||
return (List<Transaction>) template.selectList(SELECT_TXNS, query, new RowBounds(0, count));
|
||||
return template.selectList(SELECT_TXNS, query, new RowBounds(0, count));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1543,11 +1543,11 @@ public class NodeDAOImpl extends AbstractNodeDAOImpl
|
||||
query.setMaxCommitTime(maxCommitTime);
|
||||
if (count == null)
|
||||
{
|
||||
return (List<Long>) template.selectList(SELECT_TXNS_UNUSED, query);
|
||||
return template.selectList(SELECT_TXNS_UNUSED, query);
|
||||
}
|
||||
else
|
||||
{
|
||||
return (List<Long>) template.selectList(SELECT_TXNS_UNUSED, query, new RowBounds(0, count));
|
||||
return template.selectList(SELECT_TXNS_UNUSED, query, new RowBounds(0, count));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1564,31 +1564,31 @@ public class NodeDAOImpl extends AbstractNodeDAOImpl
|
||||
@Override
|
||||
protected Long selectMinTxnCommitTime()
|
||||
{
|
||||
return (Long) template.selectOne(SELECT_TXN_MIN_COMMIT_TIME);
|
||||
return template.selectOne(SELECT_TXN_MIN_COMMIT_TIME);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected Long selectMaxTxnCommitTime()
|
||||
{
|
||||
return (Long) template.selectOne(SELECT_TXN_MAX_COMMIT_TIME);
|
||||
return template.selectOne(SELECT_TXN_MAX_COMMIT_TIME);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected Long selectMinTxnId()
|
||||
{
|
||||
return (Long) template.selectOne(SELECT_TXN_MIN_ID);
|
||||
return template.selectOne(SELECT_TXN_MIN_ID);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected Long selectMinUnusedTxnCommitTime()
|
||||
{
|
||||
return (Long) template.selectOne(SELECT_TXN_UNUSED_MIN_COMMIT_TIME);
|
||||
return template.selectOne(SELECT_TXN_UNUSED_MIN_COMMIT_TIME);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected Long selectMaxTxnId()
|
||||
{
|
||||
return (Long) template.selectOne(SELECT_TXN_MAX_ID);
|
||||
return template.selectOne(SELECT_TXN_MAX_ID);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -1629,7 +1629,7 @@ public class NodeDAOImpl extends AbstractNodeDAOImpl
|
||||
ChildAssocEntity childAssoc = new ChildAssocEntity();
|
||||
childAssoc.setParentNode(parentNode);
|
||||
childAssoc.setPrimary(Boolean.valueOf(isPrimary));
|
||||
return (Integer)template.selectOne(COUNT_CHILD_ASSOC_BY_PARENT_ID, childAssoc);
|
||||
return template.selectOne(COUNT_CHILD_ASSOC_BY_PARENT_ID, childAssoc);
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -1699,7 +1699,7 @@ public class NodeDAOImpl extends AbstractNodeDAOImpl
|
||||
query.setMinCommitTime(fromTimeInclusive);
|
||||
query.setMaxCommitTime(toTimeExclusive);
|
||||
query.setExcludeServerId(serverId);
|
||||
return (List<Transaction>) template.selectList(SELECT_ONE_TXNS_BY_COMMIT_TIME_DESC, query);
|
||||
return template.selectList(SELECT_ONE_TXNS_BY_COMMIT_TIME_DESC, query);
|
||||
}
|
||||
|
||||
}
|
@@ -62,7 +62,7 @@ public class AppliedPatchDAOImpl extends AbstractAppliedPatchDAOImpl
|
||||
{
|
||||
AppliedPatchEntity entity = new AppliedPatchEntity();
|
||||
entity.setId(id);
|
||||
entity = (AppliedPatchEntity) template.selectOne(SELECT_APPLIED_PATCH_BY_ID, entity);
|
||||
entity = template.selectOne(SELECT_APPLIED_PATCH_BY_ID, entity);
|
||||
// Could be null
|
||||
return entity;
|
||||
}
|
||||
@@ -71,6 +71,6 @@ public class AppliedPatchDAOImpl extends AbstractAppliedPatchDAOImpl
|
||||
@Override
|
||||
protected List<AppliedPatchEntity> getAppliedPatchEntities()
|
||||
{
|
||||
return (List<AppliedPatchEntity>) template.selectList(SELECT_ALL_APPLIED_PATCH);
|
||||
return template.selectList(SELECT_ALL_APPLIED_PATCH);
|
||||
}
|
||||
}
|
||||
|
@@ -153,7 +153,7 @@ public class PatchDAOImpl extends AbstractPatchDAOImpl
|
||||
|
||||
public long getMaxAdmNodeID()
|
||||
{
|
||||
Long count = (Long) template.selectOne(SELECT_ADM_MAX_NODE_ID);
|
||||
Long count = template.selectOne(SELECT_ADM_MAX_NODE_ID);
|
||||
return count == null ? 0L : count;
|
||||
}
|
||||
|
||||
@@ -164,7 +164,7 @@ public class PatchDAOImpl extends AbstractPatchDAOImpl
|
||||
IdsEntity ids = new IdsEntity();
|
||||
ids.setIdOne(minNodeId);
|
||||
ids.setIdTwo(maxNodeId);
|
||||
return (List<Map<String, Object>>) template.selectList(SELECT_ADM_OLD_CONTENT_PROPERTIES, ids);
|
||||
return template.selectList(SELECT_ADM_OLD_CONTENT_PROPERTIES, ids);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -210,14 +210,14 @@ public class PatchDAOImpl extends AbstractPatchDAOImpl
|
||||
@Override
|
||||
protected long getMaxAclEntityId()
|
||||
{
|
||||
Long count = (Long) template.selectOne(SELECT_PERMISSIONS_MAX_ACL_ID, null);
|
||||
Long count = template.selectOne(SELECT_PERMISSIONS_MAX_ACL_ID, null);
|
||||
return count == null ? 0L : count;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected long getDmNodeEntitiesCount()
|
||||
{
|
||||
Long count = (Long) template.selectOne(SELECT_PERMISSIONS_DM_NODE_COUNT, null);
|
||||
Long count = template.selectOne(SELECT_PERMISSIONS_DM_NODE_COUNT, null);
|
||||
return count == null ? 0L : count;
|
||||
}
|
||||
|
||||
@@ -226,7 +226,7 @@ public class PatchDAOImpl extends AbstractPatchDAOImpl
|
||||
{
|
||||
Map<String, Object> params = new HashMap<String, Object>(1);
|
||||
params.put("id", above);
|
||||
Long count = (Long) template.selectOne(SELECT_PERMISSIONS_DM_NODE_COUNT_WITH_NEW_ACLS, params);
|
||||
Long count = template.selectOne(SELECT_PERMISSIONS_DM_NODE_COUNT_WITH_NEW_ACLS, params);
|
||||
return count == null ? 0L : count;
|
||||
}
|
||||
|
||||
@@ -256,13 +256,13 @@ public class PatchDAOImpl extends AbstractPatchDAOImpl
|
||||
|
||||
public int getChildAssocCount()
|
||||
{
|
||||
return (Integer) template.selectOne(SELECT_CHILD_ASSOCS_COUNT);
|
||||
return template.selectOne(SELECT_CHILD_ASSOCS_COUNT);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Long getMaxChildAssocId()
|
||||
{
|
||||
Long maxAssocId = (Long) template.selectOne(SELECT_CHILD_ASSOCS_MAX_ID);
|
||||
Long maxAssocId = template.selectOne(SELECT_CHILD_ASSOCS_MAX_ID);
|
||||
return maxAssocId == null ? 0L : maxAssocId;
|
||||
}
|
||||
|
||||
@@ -301,7 +301,7 @@ public class PatchDAOImpl extends AbstractPatchDAOImpl
|
||||
|
||||
try
|
||||
{
|
||||
List<Map<String, Object>> rows = (List<Map<String, Object>>) template.selectList(SELECT_CHILD_ASSOCS_FOR_CRCS, entity, new RowBounds(0, queryMaxResults));
|
||||
List<Map<String, Object>> rows = template.selectList(SELECT_CHILD_ASSOCS_FOR_CRCS, entity, new RowBounds(0, queryMaxResults));
|
||||
if (results.size() == 0 && rows.size() >= maxResults)
|
||||
{
|
||||
// We have all we need
|
||||
@@ -421,7 +421,7 @@ public class PatchDAOImpl extends AbstractPatchDAOImpl
|
||||
@Override
|
||||
protected List<String> getOldAttrCustomNamesImpl()
|
||||
{
|
||||
return (List<String>)template.selectList(SELECT_OLD_ATTR_CUSTOM_NAMES);
|
||||
return template.selectList(SELECT_OLD_ATTR_CUSTOM_NAMES);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -469,7 +469,7 @@ public class PatchDAOImpl extends AbstractPatchDAOImpl
|
||||
@Override
|
||||
public List<Map<String, Object>> getAclsThatInheritFromNonPrimaryParent()
|
||||
{
|
||||
List<Map<String, Object>> rows = (List<Map<String, Object>>) template.selectList(
|
||||
List<Map<String, Object>> rows = template.selectList(
|
||||
SELECT_ACLS_THAT_INHERIT_FROM_NON_PRIMARY_PARENT,
|
||||
Boolean.TRUE);
|
||||
return rows;
|
||||
@@ -479,7 +479,7 @@ public class PatchDAOImpl extends AbstractPatchDAOImpl
|
||||
@Override
|
||||
public List<Map<String, Object>> getAclsThatInheritWithInheritanceUnset()
|
||||
{
|
||||
List<Map<String, Object>> rows = (List<Map<String, Object>>) template.selectList(
|
||||
List<Map<String, Object>> rows = template.selectList(
|
||||
SELECT_ACLS_THAT_INHERIT_WITH_INHERITANCE_UNSET,
|
||||
Boolean.TRUE);
|
||||
return rows;
|
||||
@@ -489,7 +489,7 @@ public class PatchDAOImpl extends AbstractPatchDAOImpl
|
||||
@Override
|
||||
public List<Map<String, Object>> getDefiningAclsThatDoNotInheritCorrectlyFromThePrimaryParent()
|
||||
{
|
||||
List<Map<String, Object>> rows = (List<Map<String, Object>>) template.selectList(
|
||||
List<Map<String, Object>> rows = template.selectList(
|
||||
SELECT_DEFINING_ACLS_THAT_DO_NOT_INHERIT_CORRECTLY_FROM_THE_PRIMARY_PARENT,
|
||||
Boolean.TRUE);
|
||||
return rows;
|
||||
@@ -499,7 +499,7 @@ public class PatchDAOImpl extends AbstractPatchDAOImpl
|
||||
@Override
|
||||
public List<Map<String, Object>> getSharedAclsThatDoNotInheritCorrectlyFromThePrimaryParent()
|
||||
{
|
||||
List<Map<String, Object>> rows = (List<Map<String, Object>>) template.selectList(
|
||||
List<Map<String, Object>> rows = template.selectList(
|
||||
SELECT_SHARED_ACLS_THAT_DO_NOT_INHERIT_CORRECTLY_FROM_THE_PRIMARY_PARENT,
|
||||
Boolean.TRUE);
|
||||
return rows;
|
||||
@@ -509,7 +509,7 @@ public class PatchDAOImpl extends AbstractPatchDAOImpl
|
||||
@Override
|
||||
public List<Map<String, Object>> getSharedAclsThatDoNotInheritCorrectlyFromTheirDefiningAcl()
|
||||
{
|
||||
List<Map<String, Object>> rows = (List<Map<String, Object>>) template.selectList(
|
||||
List<Map<String, Object>> rows = template.selectList(
|
||||
SELECT_SHARED_ACLS_THAT_DO_NOT_INHERIT_CORRECTLY_FROM_THEIR_DEFINING_ACL,
|
||||
Boolean.TRUE);
|
||||
return rows;
|
||||
@@ -526,7 +526,7 @@ public class PatchDAOImpl extends AbstractPatchDAOImpl
|
||||
}
|
||||
IdsEntity params = new IdsEntity();
|
||||
params.setIds(new ArrayList<Long>(qnameIds));
|
||||
Long count = (Long) template.selectOne(SELECT_COUNT_NODES_WITH_ASPECTS, params);
|
||||
Long count = template.selectOne(SELECT_COUNT_NODES_WITH_ASPECTS, params);
|
||||
if (count == null)
|
||||
{
|
||||
return 0L;
|
||||
@@ -546,7 +546,7 @@ public class PatchDAOImpl extends AbstractPatchDAOImpl
|
||||
params.put("qnameId", typeQNameId);
|
||||
params.put("minNodeId", minNodeId);
|
||||
params.put("maxNodeId", maxNodeId);
|
||||
return (List<Long>) template.selectList(SELECT_NODES_BY_TYPE_QNAME, params);
|
||||
return template.selectList(SELECT_NODES_BY_TYPE_QNAME, params);
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
@@ -557,7 +557,7 @@ public class PatchDAOImpl extends AbstractPatchDAOImpl
|
||||
params.put("nsId", nsId);
|
||||
params.put("minNodeId", minNodeId);
|
||||
params.put("maxNodeId", maxNodeId);
|
||||
return (List<Long>) template.selectList(SELECT_NODES_BY_TYPE_URI, params);
|
||||
return template.selectList(SELECT_NODES_BY_TYPE_URI, params);
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
@@ -568,7 +568,7 @@ public class PatchDAOImpl extends AbstractPatchDAOImpl
|
||||
params.put("qnameId", aspectQNameId);
|
||||
params.put("minNodeId", minNodeId);
|
||||
params.put("maxNodeId", maxNodeId);
|
||||
return (List<Long>) template.selectList(SELECT_NODES_BY_ASPECT_QNAME, params);
|
||||
return template.selectList(SELECT_NODES_BY_ASPECT_QNAME, params);
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
@@ -579,7 +579,7 @@ public class PatchDAOImpl extends AbstractPatchDAOImpl
|
||||
params.put("mimetypeId", mimetypeId);
|
||||
params.put("minNodeId", minNodeId);
|
||||
params.put("maxNodeId", maxNodeId);
|
||||
return (List<Long>) template.selectList(SELECT_NODES_BY_CONTENT_MIMETYPE, params);
|
||||
return template.selectList(SELECT_NODES_BY_CONTENT_MIMETYPE, params);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@@ -121,7 +121,7 @@ public class AclCrudDAOImpl extends AbstractAclCrudDAOImpl
|
||||
Map<String, Object> params = new HashMap<String, Object>(1);
|
||||
params.put("id", aclEntityId);
|
||||
|
||||
return (AclEntity)template.selectOne(SELECT_ACL_BY_ID, params);
|
||||
return template.selectOne(SELECT_ACL_BY_ID, params);
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
@@ -132,7 +132,7 @@ public class AclCrudDAOImpl extends AbstractAclCrudDAOImpl
|
||||
params.put("id", aclEntityId);
|
||||
params.put("bool", true);
|
||||
|
||||
return (List<Long>)template.selectList(SELECT_ACLS_THAT_INHERIT_FROM_ACL, params);
|
||||
return template.selectList(SELECT_ACLS_THAT_INHERIT_FROM_ACL, params);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -142,7 +142,7 @@ public class AclCrudDAOImpl extends AbstractAclCrudDAOImpl
|
||||
params.put("name", aclGuid);
|
||||
params.put("bool", true);
|
||||
|
||||
return (Long)template.selectOne(SELECT_LATEST_ACL_BY_GUID, params);
|
||||
return template.selectOne(SELECT_LATEST_ACL_BY_GUID, params);
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
@@ -157,7 +157,7 @@ public class AclCrudDAOImpl extends AbstractAclCrudDAOImpl
|
||||
Map<String, Object> params = new HashMap<String, Object>(1);
|
||||
params.put("id", aclEntityId);
|
||||
|
||||
return (List<Long>)template.selectList(SELECT_ADM_NODES_BY_ACL, params, new RowBounds(0 , maxResults));
|
||||
return template.selectList(SELECT_ADM_NODES_BY_ACL, params, new RowBounds(0 , maxResults));
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -211,7 +211,7 @@ public class AclCrudDAOImpl extends AbstractAclCrudDAOImpl
|
||||
Map<String, Object> params = new HashMap<String, Object>(1);
|
||||
params.put("id", aclEntityId);
|
||||
|
||||
return (List<AclMemberEntity>) template.selectList(SELECT_ACL_MEMBERS_BY_ACL, params);
|
||||
return template.selectList(SELECT_ACL_MEMBERS_BY_ACL, params);
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
@@ -221,7 +221,7 @@ public class AclCrudDAOImpl extends AbstractAclCrudDAOImpl
|
||||
Map<String, Object> params = new HashMap<String, Object>(1);
|
||||
params.put("name", authorityName);
|
||||
|
||||
return (List<AclMemberEntity>) template.selectList(SELECT_ACL_MEMBERS_BY_AUTHORITY, params);
|
||||
return template.selectList(SELECT_ACL_MEMBERS_BY_AUTHORITY, params);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -266,7 +266,7 @@ public class AclCrudDAOImpl extends AbstractAclCrudDAOImpl
|
||||
Map<String, Object> params = new HashMap<String, Object>(1);
|
||||
params.put("id", aclChangeSetEntityId);
|
||||
|
||||
return (AclChangeSetEntity)template.selectOne(SELECT_ACL_CHANGESET_BY_ID, params);
|
||||
return template.selectOne(SELECT_ACL_CHANGESET_BY_ID, params);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -303,7 +303,7 @@ public class AclCrudDAOImpl extends AbstractAclCrudDAOImpl
|
||||
Map<String, Object> params = new HashMap<String, Object>(1);
|
||||
params.put("id", aceEntityId);
|
||||
|
||||
return (AceEntity)template.selectOne(SELECT_ACE_BY_ID, params);
|
||||
return template.selectOne(SELECT_ACE_BY_ID, params);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -315,7 +315,7 @@ public class AclCrudDAOImpl extends AbstractAclCrudDAOImpl
|
||||
params.put("bool", allowed);
|
||||
params.put("int", type.getId());
|
||||
|
||||
return (AceEntity)template.selectOne(SELECT_ACE_WITH_NO_CONTEXT, params);
|
||||
return template.selectOne(SELECT_ACE_WITH_NO_CONTEXT, params);
|
||||
}
|
||||
|
||||
|
||||
@@ -337,7 +337,7 @@ public class AclCrudDAOImpl extends AbstractAclCrudDAOImpl
|
||||
Map<String, Object> params = new HashMap<String, Object>(1);
|
||||
params.put("id", authorityEntityId);
|
||||
|
||||
return (List<Ace>) template.selectList(SELECT_ACES_BY_AUTHORITY, params);
|
||||
return template.selectList(SELECT_ACES_BY_AUTHORITY, params);
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
@@ -347,7 +347,7 @@ public class AclCrudDAOImpl extends AbstractAclCrudDAOImpl
|
||||
Map<String, Object> params = new HashMap<String, Object>(1);
|
||||
params.put("id", aclEntityId);
|
||||
|
||||
return (List<Map<String, Object>>) template.selectList(SELECT_ACES_AND_AUTHORIES_BY_ACL, params);
|
||||
return template.selectList(SELECT_ACES_AND_AUTHORIES_BY_ACL, params);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -371,7 +371,7 @@ public class AclCrudDAOImpl extends AbstractAclCrudDAOImpl
|
||||
Map<String, Object> params = new HashMap<String, Object>(1);
|
||||
params.put("id", aceContextEntityId);
|
||||
|
||||
return (AceContextEntity)template.selectOne(SELECT_ACE_CONTEXT_BY_ID, params);
|
||||
return template.selectOne(SELECT_ACE_CONTEXT_BY_ID, params);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -397,7 +397,7 @@ public class AclCrudDAOImpl extends AbstractAclCrudDAOImpl
|
||||
Map<String, Object> params = new HashMap<String, Object>(1);
|
||||
params.put("id", permissionEntityId);
|
||||
|
||||
return (PermissionEntity)template.selectOne(SELECT_PERMISSION_BY_ID, params);
|
||||
return template.selectOne(SELECT_PERMISSION_BY_ID, params);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -407,7 +407,7 @@ public class AclCrudDAOImpl extends AbstractAclCrudDAOImpl
|
||||
params.put("id", qnameId);
|
||||
params.put("name", name);
|
||||
|
||||
return (PermissionEntity)template.selectOne(SELECT_PERMISSION_BY_TYPE_AND_NAME, params);
|
||||
return template.selectOne(SELECT_PERMISSION_BY_TYPE_AND_NAME, params);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -441,7 +441,7 @@ public class AclCrudDAOImpl extends AbstractAclCrudDAOImpl
|
||||
Map<String, Object> params = new HashMap<String, Object>(1);
|
||||
params.put("id", authorityEntityId);
|
||||
|
||||
return (AuthorityEntity)template.selectOne(SELECT_AUTHORITY_BY_ID, params);
|
||||
return template.selectOne(SELECT_AUTHORITY_BY_ID, params);
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
@@ -454,7 +454,7 @@ public class AclCrudDAOImpl extends AbstractAclCrudDAOImpl
|
||||
|
||||
// note: allow for list (non-unique name) in case of upgrade of old schemas
|
||||
AuthorityEntity result = null;
|
||||
List<AuthorityEntity> authorities = (List<AuthorityEntity>)template.selectList(SELECT_AUTHORITY_BY_NAME, params);
|
||||
List<AuthorityEntity> authorities = template.selectList(SELECT_AUTHORITY_BY_NAME, params);
|
||||
for (AuthorityEntity found : authorities)
|
||||
{
|
||||
if (found.getAuthority().equals(authorityName))
|
||||
@@ -520,7 +520,7 @@ public class AclCrudDAOImpl extends AbstractAclCrudDAOImpl
|
||||
@Override
|
||||
protected Long selectMaxChangeSetCommitTime()
|
||||
{
|
||||
return (Long) template.selectOne(SELECT_CHANGE_SET_MAX_COMMIT_TIME);
|
||||
return template.selectOne(SELECT_CHANGE_SET_MAX_COMMIT_TIME);
|
||||
}
|
||||
|
||||
|
||||
@@ -535,7 +535,7 @@ public class AclCrudDAOImpl extends AbstractAclCrudDAOImpl
|
||||
Map<String, Object> params = new HashMap<String, Object>(1);
|
||||
params.put("commit_time_ms", maxCommitTime);
|
||||
|
||||
List<Long> sets = (List<Long>) template.selectList(SELECT_CHANGE_SET_LAST, params, new RowBounds(0, 1));
|
||||
List<Long> sets = template.selectList(SELECT_CHANGE_SET_LAST, params, new RowBounds(0, 1));
|
||||
if (sets.size() > 0)
|
||||
{
|
||||
return sets.get(0);
|
||||
|
@@ -40,6 +40,7 @@ import org.alfresco.repo.domain.propval.PropertyValueEntity;
|
||||
import org.alfresco.repo.domain.propval.PropertyValueEntity.PersistedType;
|
||||
import org.alfresco.repo.domain.schema.script.ScriptBundleExecutor;
|
||||
import org.alfresco.util.Pair;
|
||||
import org.apache.ibatis.session.Configuration;
|
||||
import org.apache.ibatis.session.ResultContext;
|
||||
import org.apache.ibatis.session.ResultHandler;
|
||||
import org.apache.ibatis.session.RowBounds;
|
||||
@@ -60,7 +61,7 @@ public class PropertyValueDAOImpl extends AbstractPropertyValueDAOImpl
|
||||
|
||||
private static final String SELECT_PROPERTY_DATE_VALUE_BY_ID = "alfresco.propval.select_PropertyDateValueByID";
|
||||
private static final String SELECT_PROPERTY_DATE_VALUE_BY_VALUE = "alfresco.propval.select_PropertyDateValueByValue";
|
||||
private static final String INSERT_PROPERTY_DATE_VALUE = "alfresco.propval.insert.insert_PropertyDateValue";
|
||||
private static final String INSERT_PROPERTY_DATE_VALUE = "alfresco.propval.insert_PropertyDateValue";
|
||||
|
||||
private static final String SELECT_PROPERTY_STRING_VALUE_BY_ID = "alfresco.propval.select_PropertyStringValueByID";
|
||||
private static final String SELECT_PROPERTY_STRING_VALUE_BY_VALUE = "alfresco.propval.select_PropertyStringValueByValue";
|
||||
@@ -93,7 +94,7 @@ public class PropertyValueDAOImpl extends AbstractPropertyValueDAOImpl
|
||||
private static final String DELETE_PROPERTY_UNIQUE_CTX_BY_ID = "alfresco.propval.delete_PropertyUniqueContextById";
|
||||
private static final String DELETE_PROPERTY_UNIQUE_CTX_BY_VALUES = "alfresco.propval.delete_PropertyUniqueContextByValues";
|
||||
|
||||
private static final String INSERT_PROPERTY_LINK = "alfresco.propval.insert.insert_PropertyLink";
|
||||
private static final String INSERT_PROPERTY_LINK = "alfresco.propval.insert_PropertyLink";
|
||||
private static final String DELETE_PROPERTY_LINKS_BY_ROOT_ID = "alfresco.propval.delete_PropertyLinksByRootId";
|
||||
|
||||
|
||||
@@ -121,7 +122,7 @@ public class PropertyValueDAOImpl extends AbstractPropertyValueDAOImpl
|
||||
{
|
||||
PropertyClassEntity entity = new PropertyClassEntity();
|
||||
entity.setId(id);
|
||||
entity = (PropertyClassEntity) template.selectOne(
|
||||
entity = template.selectOne(
|
||||
SELECT_PROPERTY_CLASS_BY_ID,
|
||||
entity);
|
||||
// Done
|
||||
@@ -133,7 +134,7 @@ public class PropertyValueDAOImpl extends AbstractPropertyValueDAOImpl
|
||||
{
|
||||
PropertyClassEntity entity = new PropertyClassEntity();
|
||||
entity.setJavaClass(value);
|
||||
entity = (PropertyClassEntity) template.selectOne(
|
||||
entity = template.selectOne(
|
||||
SELECT_PROPERTY_CLASS_BY_NAME,
|
||||
entity);
|
||||
// Done
|
||||
@@ -157,7 +158,7 @@ public class PropertyValueDAOImpl extends AbstractPropertyValueDAOImpl
|
||||
@Override
|
||||
protected PropertyDateValueEntity findDateValueById(Long id)
|
||||
{
|
||||
PropertyDateValueEntity entity = (PropertyDateValueEntity) template.selectOne(
|
||||
PropertyDateValueEntity entity = template.selectOne(
|
||||
SELECT_PROPERTY_DATE_VALUE_BY_ID,
|
||||
id);
|
||||
// Done
|
||||
@@ -167,7 +168,7 @@ public class PropertyValueDAOImpl extends AbstractPropertyValueDAOImpl
|
||||
@Override
|
||||
protected PropertyDateValueEntity findDateValueByValue(Date value)
|
||||
{
|
||||
PropertyDateValueEntity result = (PropertyDateValueEntity) template.selectOne(
|
||||
PropertyDateValueEntity result = template.selectOne(
|
||||
SELECT_PROPERTY_DATE_VALUE_BY_VALUE,
|
||||
new Long(value.getTime()));
|
||||
// The ID is the actual time in ms (GMT)
|
||||
@@ -193,7 +194,7 @@ public class PropertyValueDAOImpl extends AbstractPropertyValueDAOImpl
|
||||
{
|
||||
PropertyStringValueEntity entity = new PropertyStringValueEntity();
|
||||
entity.setId(id);
|
||||
String value = (String) template.selectOne(
|
||||
String value = template.selectOne(
|
||||
SELECT_PROPERTY_STRING_VALUE_BY_ID,
|
||||
entity);
|
||||
// Done
|
||||
@@ -206,7 +207,7 @@ public class PropertyValueDAOImpl extends AbstractPropertyValueDAOImpl
|
||||
{
|
||||
PropertyStringValueEntity entity = new PropertyStringValueEntity();
|
||||
entity.setValue(value);
|
||||
List<Long> rows = (List<Long>) template.selectList(
|
||||
List<Long> rows = template.selectList(
|
||||
SELECT_PROPERTY_STRING_VALUE_BY_VALUE,
|
||||
entity,
|
||||
new RowBounds(0, 1));
|
||||
@@ -241,7 +242,7 @@ public class PropertyValueDAOImpl extends AbstractPropertyValueDAOImpl
|
||||
{
|
||||
PropertyDoubleValueEntity entity = new PropertyDoubleValueEntity();
|
||||
entity.setId(id);
|
||||
entity = (PropertyDoubleValueEntity) template.selectOne(
|
||||
entity = template.selectOne(
|
||||
SELECT_PROPERTY_DOUBLE_VALUE_BY_ID,
|
||||
entity);
|
||||
// Done
|
||||
@@ -254,7 +255,7 @@ public class PropertyValueDAOImpl extends AbstractPropertyValueDAOImpl
|
||||
{
|
||||
PropertyDoubleValueEntity entity = new PropertyDoubleValueEntity();
|
||||
entity.setDoubleValue(value);
|
||||
List<PropertyDoubleValueEntity> results = (List<PropertyDoubleValueEntity>) template.selectList(
|
||||
List<PropertyDoubleValueEntity> results = template.selectList(
|
||||
SELECT_PROPERTY_DOUBLE_VALUE_BY_VALUE,
|
||||
entity,
|
||||
new RowBounds(0, 1));
|
||||
@@ -289,7 +290,7 @@ public class PropertyValueDAOImpl extends AbstractPropertyValueDAOImpl
|
||||
{
|
||||
PropertySerializableValueEntity entity = new PropertySerializableValueEntity();
|
||||
entity.setId(id);
|
||||
entity = (PropertySerializableValueEntity) template.selectOne(
|
||||
entity = template.selectOne(
|
||||
SELECT_PROPERTY_SERIALIZABLE_VALUE_BY_ID,
|
||||
entity);
|
||||
// Done
|
||||
@@ -316,7 +317,7 @@ public class PropertyValueDAOImpl extends AbstractPropertyValueDAOImpl
|
||||
{
|
||||
PropertyValueEntity entity = new PropertyValueEntity();
|
||||
entity.setId(id);
|
||||
List<PropertyValueEntity> results = (List<PropertyValueEntity>) template.selectList(
|
||||
List<PropertyValueEntity> results = template.selectList(
|
||||
SELECT_PROPERTY_VALUE_BY_ID,
|
||||
entity);
|
||||
// At most one of the results represents a real value
|
||||
@@ -397,7 +398,7 @@ public class PropertyValueDAOImpl extends AbstractPropertyValueDAOImpl
|
||||
if (query != null)
|
||||
{
|
||||
// Uniqueness is guaranteed by the tables, so we get one value only
|
||||
result = (PropertyValueEntity) template.selectOne(query, queryObject);
|
||||
result = template.selectOne(query, queryObject);
|
||||
}
|
||||
|
||||
// Done
|
||||
@@ -460,7 +461,7 @@ public class PropertyValueDAOImpl extends AbstractPropertyValueDAOImpl
|
||||
{
|
||||
PropertyValueEntity entity = new PropertyValueEntity();
|
||||
entity.setId(id);
|
||||
List<PropertyIdSearchRow> results = (List<PropertyIdSearchRow>) template.selectList(
|
||||
List<PropertyIdSearchRow> results = template.selectList(
|
||||
SELECT_PROPERTY_BY_ID,
|
||||
entity);
|
||||
return results;
|
||||
@@ -483,7 +484,9 @@ public class PropertyValueDAOImpl extends AbstractPropertyValueDAOImpl
|
||||
}
|
||||
};
|
||||
// A row handler to roll up individual rows
|
||||
Configuration configuration = template.getConfiguration();
|
||||
RollupResultHandler rollupResultHandler = new RollupResultHandler(
|
||||
configuration,
|
||||
KEY_COLUMNS_FINDBYIDS,
|
||||
"propValues",
|
||||
valueResultHandler);
|
||||
@@ -510,7 +513,7 @@ public class PropertyValueDAOImpl extends AbstractPropertyValueDAOImpl
|
||||
{
|
||||
PropertyRootEntity entity = new PropertyRootEntity();
|
||||
entity.setId(id);
|
||||
return (PropertyRootEntity) template.selectOne(SELECT_PROPERTY_ROOT_BY_ID, entity);
|
||||
return template.selectOne(SELECT_PROPERTY_ROOT_BY_ID, entity);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -553,7 +556,7 @@ public class PropertyValueDAOImpl extends AbstractPropertyValueDAOImpl
|
||||
{
|
||||
PropertyUniqueContextEntity entity = new PropertyUniqueContextEntity();
|
||||
entity.setId(id);
|
||||
entity = (PropertyUniqueContextEntity) template.selectOne(SELECT_PROPERTY_UNIQUE_CTX_BY_ID, entity);
|
||||
entity = template.selectOne(SELECT_PROPERTY_UNIQUE_CTX_BY_ID, entity);
|
||||
return entity;
|
||||
}
|
||||
|
||||
@@ -564,7 +567,7 @@ public class PropertyValueDAOImpl extends AbstractPropertyValueDAOImpl
|
||||
entity.setValue1PropId(valueId1);
|
||||
entity.setValue2PropId(valueId2);
|
||||
entity.setValue3PropId(valueId3);
|
||||
entity = (PropertyUniqueContextEntity) template.selectOne(SELECT_PROPERTY_UNIQUE_CTX_BY_VALUES, entity);
|
||||
entity = template.selectOne(SELECT_PROPERTY_UNIQUE_CTX_BY_VALUES, entity);
|
||||
return entity;
|
||||
}
|
||||
|
||||
|
@@ -53,7 +53,7 @@ public class QNameDAOImpl extends AbstractQNameDAOImpl
|
||||
{
|
||||
NamespaceEntity entity = new NamespaceEntity();
|
||||
entity.setId(id);
|
||||
entity = (NamespaceEntity) template.selectOne(SELECT_NS_BY_ID, entity);
|
||||
entity = template.selectOne(SELECT_NS_BY_ID, entity);
|
||||
return entity;
|
||||
}
|
||||
|
||||
@@ -62,7 +62,7 @@ public class QNameDAOImpl extends AbstractQNameDAOImpl
|
||||
{
|
||||
NamespaceEntity entity = new NamespaceEntity();
|
||||
entity.setUriSafe(uri);
|
||||
entity = (NamespaceEntity) template.selectOne(SELECT_NS_BY_URI, entity);
|
||||
entity = template.selectOne(SELECT_NS_BY_URI, entity);
|
||||
return entity;
|
||||
}
|
||||
|
||||
@@ -89,7 +89,7 @@ public class QNameDAOImpl extends AbstractQNameDAOImpl
|
||||
{
|
||||
QNameEntity entity = new QNameEntity();
|
||||
entity.setId(id);
|
||||
entity = (QNameEntity) template.selectOne(SELECT_QNAME_BY_ID, entity);
|
||||
entity = template.selectOne(SELECT_QNAME_BY_ID, entity);
|
||||
return entity;
|
||||
}
|
||||
|
||||
@@ -99,7 +99,7 @@ public class QNameDAOImpl extends AbstractQNameDAOImpl
|
||||
QNameEntity entity = new QNameEntity();
|
||||
entity.setNamespaceId(nsId);
|
||||
entity.setLocalNameSafe(localName);
|
||||
entity = (QNameEntity) template.selectOne(SELECT_QNAME_BY_NS_AND_LOCALNAME, entity);
|
||||
entity = template.selectOne(SELECT_QNAME_BY_NS_AND_LOCALNAME, entity);
|
||||
return entity;
|
||||
}
|
||||
|
||||
|
@@ -69,7 +69,7 @@ public class CannedQueryDAOImpl extends AbstractCannedQueryDAOImpl
|
||||
String query = makeQueryName(sqlNamespace, queryName);
|
||||
try
|
||||
{
|
||||
Long result = (Long) template.selectOne(query, parameterObj);
|
||||
Long result = template.selectOne(query, parameterObj);
|
||||
if (result == null)
|
||||
{
|
||||
result = 0L;
|
||||
|
@@ -96,7 +96,7 @@ public class SOLRDAOImpl implements SOLRDAO
|
||||
params.setToIdExclusive(maxAclChangeSetId);
|
||||
params.setToCommitTimeExclusive(toCommitTime);
|
||||
|
||||
return (List<AclChangeSet>) template.selectList(SELECT_CHANGESETS_SUMMARY, params, new RowBounds(0, maxResults));
|
||||
return template.selectList(SELECT_CHANGESETS_SUMMARY, params, new RowBounds(0, maxResults));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -127,11 +127,11 @@ public class SOLRDAOImpl implements SOLRDAO
|
||||
List<Acl> source;
|
||||
if (maxResults <= 0 || maxResults == Integer.MAX_VALUE)
|
||||
{
|
||||
source = (List<Acl>) template.selectList(SELECT_ACLS_BY_CHANGESET_IDS, params);
|
||||
source = template.selectList(SELECT_ACLS_BY_CHANGESET_IDS, params);
|
||||
}
|
||||
else
|
||||
{
|
||||
source = (List<Acl>) template.selectList(SELECT_ACLS_BY_CHANGESET_IDS, params, new RowBounds(0, maxResults));
|
||||
source = template.selectList(SELECT_ACLS_BY_CHANGESET_IDS, params, new RowBounds(0, maxResults));
|
||||
}
|
||||
// Add any unlinked shared ACLs from defining nodes to index them now
|
||||
TreeSet<Acl> sorted = new TreeSet<Acl>(source);
|
||||
@@ -183,7 +183,7 @@ public class SOLRDAOImpl implements SOLRDAO
|
||||
params.setToIdExclusive(maxTxnId);
|
||||
params.setToCommitTimeExclusive(toCommitTime);
|
||||
|
||||
return (List<Transaction>) template.selectList(SELECT_TRANSACTIONS, params, new RowBounds(0, maxResults));
|
||||
return template.selectList(SELECT_TRANSACTIONS, params, new RowBounds(0, maxResults));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -196,13 +196,13 @@ public class SOLRDAOImpl implements SOLRDAO
|
||||
|
||||
if(nodeParameters.getMaxResults() != 0 && nodeParameters.getMaxResults() != Integer.MAX_VALUE)
|
||||
{
|
||||
return (List<Node>) template.selectList(
|
||||
return template.selectList(
|
||||
SELECT_NODES, params,
|
||||
new RowBounds(0, nodeParameters.getMaxResults()));
|
||||
}
|
||||
else
|
||||
{
|
||||
return (List<Node>) template.selectList(SELECT_NODES, params);
|
||||
return template.selectList(SELECT_NODES, params);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -87,7 +87,7 @@ public class SubscriptionsDAOImpl extends AbstractSubscriptionsDAO
|
||||
: pagingRequest.getMaxItems() + 1);
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
List<SubscriptionNodeEntity> nodeList = (List<SubscriptionNodeEntity>) template.selectList(
|
||||
List<SubscriptionNodeEntity> nodeList = template.selectList(
|
||||
"alfresco.subscriptions.select_Subscriptions", map, new RowBounds(pagingRequest.getSkipCount(),
|
||||
maxItems + 1));
|
||||
|
||||
@@ -136,7 +136,7 @@ public class SubscriptionsDAOImpl extends AbstractSubscriptionsDAO
|
||||
Map<String, Object> map = new HashMap<String, Object>();
|
||||
map.put("userNodeId", dbid);
|
||||
|
||||
Number count = (Number) template.selectOne("alfresco.subscriptions.select_countSubscriptions", map);
|
||||
Number count = template.selectOne("alfresco.subscriptions.select_countSubscriptions", map);
|
||||
return count == null ? 0 : count.intValue();
|
||||
}
|
||||
|
||||
@@ -166,7 +166,7 @@ public class SubscriptionsDAOImpl extends AbstractSubscriptionsDAO
|
||||
se.setUserNodeId(dbid);
|
||||
se.setNodeId(nodedbid);
|
||||
|
||||
Number count = (Number) template.selectOne("alfresco.subscriptions.select_hasSubscribed", se);
|
||||
Number count = template.selectOne("alfresco.subscriptions.select_hasSubscribed", se);
|
||||
if (count == null || count.intValue() == 0)
|
||||
{
|
||||
template.insert("alfresco.subscriptions.insert_Subscription", se);
|
||||
@@ -228,7 +228,7 @@ public class SubscriptionsDAOImpl extends AbstractSubscriptionsDAO
|
||||
se.setUserNodeId(dbid);
|
||||
se.setNodeId(nodedbid);
|
||||
|
||||
Number count = (Number) template.selectOne("alfresco.subscriptions.select_hasSubscribed", se);
|
||||
Number count = template.selectOne("alfresco.subscriptions.select_hasSubscribed", se);
|
||||
return count == null ? false : count.intValue() > 0;
|
||||
}
|
||||
|
||||
@@ -262,7 +262,7 @@ public class SubscriptionsDAOImpl extends AbstractSubscriptionsDAO
|
||||
: pagingRequest.getMaxItems() + 1);
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
List<String> userList = (List<String>) template.selectList("alfresco.subscriptions.select_Following", map,
|
||||
List<String> userList = template.selectList("alfresco.subscriptions.select_Following", map,
|
||||
new RowBounds(pagingRequest.getSkipCount(), maxItems + 1));
|
||||
|
||||
boolean hasMore = userList.size() > maxItems;
|
||||
@@ -310,7 +310,7 @@ public class SubscriptionsDAOImpl extends AbstractSubscriptionsDAO
|
||||
: pagingRequest.getMaxItems() + 1);
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
List<String> userList = (List<String>) template.selectList("alfresco.subscriptions.select_Followers", map,
|
||||
List<String> userList = template.selectList("alfresco.subscriptions.select_Followers", map,
|
||||
new RowBounds(pagingRequest.getSkipCount(), maxItems + 1));
|
||||
|
||||
boolean hasMore = userList.size() > maxItems;
|
||||
@@ -347,7 +347,7 @@ public class SubscriptionsDAOImpl extends AbstractSubscriptionsDAO
|
||||
Map<String, Object> map = new HashMap<String, Object>();
|
||||
map.put("userNodeId", dbid);
|
||||
|
||||
Number count = (Number) template.selectOne("alfresco.subscriptions.select_countFollowers", map);
|
||||
Number count = template.selectOne("alfresco.subscriptions.select_countFollowers", map);
|
||||
return count == null ? 0 : count.intValue();
|
||||
}
|
||||
}
|
||||
|
@@ -63,7 +63,7 @@ public class TenantAdminDAOImpl extends AbstractTenantAdminDAOImpl
|
||||
Map<String, Object> params = new HashMap<String, Object>(1);
|
||||
params.put("tenantDomain", tenantDomain);
|
||||
|
||||
return (TenantEntity)template.selectOne(SELECT_TENANT, params);
|
||||
return template.selectOne(SELECT_TENANT, params);
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
@@ -72,7 +72,7 @@ public class TenantAdminDAOImpl extends AbstractTenantAdminDAOImpl
|
||||
{
|
||||
TenantQueryEntity entity = new TenantQueryEntity();
|
||||
entity.setEnabled(enabled);
|
||||
return (List<TenantEntity>)template.selectList(SELECT_TENANTS, entity);
|
||||
return template.selectList(SELECT_TENANTS, entity);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@@ -83,14 +83,14 @@ public class UsageDAOImpl extends AbstractUsageDAOImpl
|
||||
Map<String, Object> params = new HashMap<String, Object>(1);
|
||||
params.put("id", nodeEntityId);
|
||||
|
||||
return (UsageDeltaEntity) template.selectOne(SELECT_USAGE_DELTA_TOTAL_SIZE_BY_NODE, params);
|
||||
return template.selectOne(SELECT_USAGE_DELTA_TOTAL_SIZE_BY_NODE, params);
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
@Override
|
||||
protected List<Long> selectUsageDeltaNodes()
|
||||
{
|
||||
return (List<Long>) template.selectList(SELECT_USAGE_DELTA_NODES);
|
||||
return template.selectList(SELECT_USAGE_DELTA_NODES);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -228,7 +228,7 @@ public class UsageDAOImpl extends AbstractUsageDAOImpl
|
||||
params.put("userName2", userName);
|
||||
|
||||
// Query for the 'new' (FK) style content data properties (stored in 'string_value')
|
||||
return (Long)template.selectOne(SELECT_CONTENT_SIZE_NEW_USER, params);
|
||||
return template.selectOne(SELECT_CONTENT_SIZE_NEW_USER, params);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@@ -180,7 +180,7 @@ public class DBQueryEngine implements QueryEngine
|
||||
dbQuery.setSinceTxId(sinceTxId);
|
||||
|
||||
dbQuery.prepare(namespaceService, dictionaryService, qnameDAO, nodeDAO, tenantService, selectorGroup, null, functionContext);
|
||||
List<Node> nodes = (List<Node>)template.selectList(SELECT_BY_DYNAMIC_QUERY, dbQuery);
|
||||
List<Node> nodes = template.selectList(SELECT_BY_DYNAMIC_QUERY, dbQuery);
|
||||
LinkedHashSet<Long> set = new LinkedHashSet<Long>(nodes.size());
|
||||
for(Node node : nodes)
|
||||
{
|
||||
|
@@ -54,7 +54,7 @@ public class AuthorityBridgeDAOImpl extends AbstractAuthorityBridgeDAO
|
||||
|
||||
AuthorityBridgeParametersEntity authorityBridgeParametersEntity = new AuthorityBridgeParametersEntity(authorityContainerTypeQNameId, memberAssocQNameId, authorityNameQNameId, storeId);
|
||||
|
||||
List<AuthorityBridgeLink> links = (List<AuthorityBridgeLink>) template.selectList(QUERY_SELECT_GET_AUTHORITY_BRIDGE_ENTRIES, authorityBridgeParametersEntity);
|
||||
List<AuthorityBridgeLink> links = template.selectList(QUERY_SELECT_GET_AUTHORITY_BRIDGE_ENTRIES, authorityBridgeParametersEntity);
|
||||
|
||||
if (start != null)
|
||||
{
|
||||
@@ -76,7 +76,7 @@ public class AuthorityBridgeDAOImpl extends AbstractAuthorityBridgeDAO
|
||||
|
||||
AuthorityBridgeParametersEntity authorityBridgeParametersEntity = new AuthorityBridgeParametersEntity(authorityContainerTypeQNameId, memberAssocQNameId, authorityNameQNameId, storeId, nodeId);
|
||||
|
||||
List<AuthorityBridgeLink> links = (List<AuthorityBridgeLink>) template.selectList(QUERY_SELECT_GET_DIRECT_AUTHORITIES_FOR_UESR, authorityBridgeParametersEntity);
|
||||
List<AuthorityBridgeLink> links = template.selectList(QUERY_SELECT_GET_DIRECT_AUTHORITIES_FOR_UESR, authorityBridgeParametersEntity);
|
||||
|
||||
if (start != null)
|
||||
{
|
||||
|
@@ -19,10 +19,8 @@
|
||||
package org.alfresco.repo.tenant;
|
||||
|
||||
import java.sql.SQLException;
|
||||
import java.sql.SQLFeatureNotSupportedException;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
import javax.sql.DataSource;
|
||||
|
||||
@@ -124,11 +122,5 @@ public class TenantRoutingDataSource extends AbstractRoutingDataSource
|
||||
|
||||
super.afterPropertiesSet(); // to update resolved data sources
|
||||
}
|
||||
|
||||
@Override
|
||||
public Logger getParentLogger() throws SQLFeatureNotSupportedException
|
||||
{
|
||||
throw new SQLFeatureNotSupportedException();
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -5,7 +5,6 @@
|
||||
|
||||
<!-- MyBatis config for Alfresco testing (using common datasource) -->
|
||||
<bean id="repoSqlSessionFactoryTesting" class="org.alfresco.ibatis.HierarchicalSqlSessionFactoryBean">
|
||||
<property name="useLocalCaches" value="${mybatis.useLocalCaches}"/>
|
||||
<property name="resourceLoader" ref="dialectResourceLoader"/>
|
||||
<property name="dataSource" ref="dataSource"/>
|
||||
<property name="mapperLocations">
|
||||
|
Reference in New Issue
Block a user