From 7c06e8d8c04fabcb4e5c537aded037ac38fd16b8 Mon Sep 17 00:00:00 2001 From: Jonathan Lee Date: Tue, 30 Apr 2013 20:49:18 -0700 Subject: [PATCH] LPS-34887 Generated --- portal-impl/src/META-INF/portal-spring.xml | 1 + ...tivityAchievementLocalServiceBaseImpl.java | 22 + ...alActivityCounterLocalServiceBaseImpl.java | 22 + ...tivityInterpreterLocalServiceBaseImpl.java | 22 + ...cialActivityLimitLocalServiceBaseImpl.java | 22 + .../SocialActivityLocalServiceBaseImpl.java | 22 + ...SocialActivitySetLocalServiceBaseImpl.java | 22 + ...alActivitySettingLocalServiceBaseImpl.java | 22 + .../SocialActivitySettingServiceBaseImpl.java | 22 + .../SocialRelationLocalServiceBaseImpl.java | 22 + ...equestInterpreterLocalServiceBaseImpl.java | 22 + .../SocialRequestLocalServiceBaseImpl.java | 22 + .../base/SocialRequestServiceBaseImpl.java | 22 + ...alActivityInterpreterLocalServiceImpl.java | 2 + .../SocialActivitySetPersistenceImpl.java | 496 ++++++++++++++++++ .../SocialActivitySetLocalService.java | 45 ++ .../SocialActivitySetLocalServiceUtil.java | 55 ++ .../SocialActivitySetLocalServiceWrapper.java | 61 +++ .../persistence/SocialActivitySetFinder.java | 48 ++ .../SocialActivitySetFinderUtil.java | 87 +++ .../SocialActivitySetPersistence.java | 138 +++++ .../persistence/SocialActivitySetUtil.java | 161 ++++++ sql/indexes.properties | 5 + sql/indexes.sql | 4 + 24 files changed, 1367 insertions(+) create mode 100644 portal-service/src/com/liferay/portlet/social/service/persistence/SocialActivitySetFinder.java create mode 100644 portal-service/src/com/liferay/portlet/social/service/persistence/SocialActivitySetFinderUtil.java diff --git a/portal-impl/src/META-INF/portal-spring.xml b/portal-impl/src/META-INF/portal-spring.xml index 1c60e0bbd47e60..a087eb26d413aa 100644 --- a/portal-impl/src/META-INF/portal-spring.xml +++ b/portal-impl/src/META-INF/portal-spring.xml @@ -419,6 +419,7 @@ + diff --git a/portal-impl/src/com/liferay/portlet/social/service/base/SocialActivityAchievementLocalServiceBaseImpl.java b/portal-impl/src/com/liferay/portlet/social/service/base/SocialActivityAchievementLocalServiceBaseImpl.java index 23ea3ee3c6e5f8..afa2734bd04038 100644 --- a/portal-impl/src/com/liferay/portlet/social/service/base/SocialActivityAchievementLocalServiceBaseImpl.java +++ b/portal-impl/src/com/liferay/portlet/social/service/base/SocialActivityAchievementLocalServiceBaseImpl.java @@ -59,6 +59,7 @@ import com.liferay.portlet.social.service.persistence.SocialActivityFinder; import com.liferay.portlet.social.service.persistence.SocialActivityLimitPersistence; import com.liferay.portlet.social.service.persistence.SocialActivityPersistence; +import com.liferay.portlet.social.service.persistence.SocialActivitySetFinder; import com.liferay.portlet.social.service.persistence.SocialActivitySetPersistence; import com.liferay.portlet.social.service.persistence.SocialActivitySettingPersistence; import com.liferay.portlet.social.service.persistence.SocialRelationPersistence; @@ -530,6 +531,25 @@ public void setSocialActivitySetPersistence( this.socialActivitySetPersistence = socialActivitySetPersistence; } + /** + * Returns the social activity set finder. + * + * @return the social activity set finder + */ + public SocialActivitySetFinder getSocialActivitySetFinder() { + return socialActivitySetFinder; + } + + /** + * Sets the social activity set finder. + * + * @param socialActivitySetFinder the social activity set finder + */ + public void setSocialActivitySetFinder( + SocialActivitySetFinder socialActivitySetFinder) { + this.socialActivitySetFinder = socialActivitySetFinder; + } + /** * Returns the social activity setting local service. * @@ -963,6 +983,8 @@ protected void runSQL(String sql) throws SystemException { protected SocialActivitySetLocalService socialActivitySetLocalService; @BeanReference(type = SocialActivitySetPersistence.class) protected SocialActivitySetPersistence socialActivitySetPersistence; + @BeanReference(type = SocialActivitySetFinder.class) + protected SocialActivitySetFinder socialActivitySetFinder; @BeanReference(type = SocialActivitySettingLocalService.class) protected SocialActivitySettingLocalService socialActivitySettingLocalService; @BeanReference(type = SocialActivitySettingService.class) diff --git a/portal-impl/src/com/liferay/portlet/social/service/base/SocialActivityCounterLocalServiceBaseImpl.java b/portal-impl/src/com/liferay/portlet/social/service/base/SocialActivityCounterLocalServiceBaseImpl.java index be9240cf7fbb79..e0f7173ff395d3 100644 --- a/portal-impl/src/com/liferay/portlet/social/service/base/SocialActivityCounterLocalServiceBaseImpl.java +++ b/portal-impl/src/com/liferay/portlet/social/service/base/SocialActivityCounterLocalServiceBaseImpl.java @@ -66,6 +66,7 @@ import com.liferay.portlet.social.service.persistence.SocialActivityFinder; import com.liferay.portlet.social.service.persistence.SocialActivityLimitPersistence; import com.liferay.portlet.social.service.persistence.SocialActivityPersistence; +import com.liferay.portlet.social.service.persistence.SocialActivitySetFinder; import com.liferay.portlet.social.service.persistence.SocialActivitySetPersistence; import com.liferay.portlet.social.service.persistence.SocialActivitySettingPersistence; import com.liferay.portlet.social.service.persistence.SocialRelationPersistence; @@ -534,6 +535,25 @@ public void setSocialActivitySetPersistence( this.socialActivitySetPersistence = socialActivitySetPersistence; } + /** + * Returns the social activity set finder. + * + * @return the social activity set finder + */ + public SocialActivitySetFinder getSocialActivitySetFinder() { + return socialActivitySetFinder; + } + + /** + * Sets the social activity set finder. + * + * @param socialActivitySetFinder the social activity set finder + */ + public void setSocialActivitySetFinder( + SocialActivitySetFinder socialActivitySetFinder) { + this.socialActivitySetFinder = socialActivitySetFinder; + } + /** * Returns the social activity setting local service. * @@ -1095,6 +1115,8 @@ protected void runSQL(String sql) throws SystemException { protected SocialActivitySetLocalService socialActivitySetLocalService; @BeanReference(type = SocialActivitySetPersistence.class) protected SocialActivitySetPersistence socialActivitySetPersistence; + @BeanReference(type = SocialActivitySetFinder.class) + protected SocialActivitySetFinder socialActivitySetFinder; @BeanReference(type = SocialActivitySettingLocalService.class) protected SocialActivitySettingLocalService socialActivitySettingLocalService; @BeanReference(type = SocialActivitySettingService.class) diff --git a/portal-impl/src/com/liferay/portlet/social/service/base/SocialActivityInterpreterLocalServiceBaseImpl.java b/portal-impl/src/com/liferay/portlet/social/service/base/SocialActivityInterpreterLocalServiceBaseImpl.java index 643882fdb694fa..9d7d89ef91fdca 100644 --- a/portal-impl/src/com/liferay/portlet/social/service/base/SocialActivityInterpreterLocalServiceBaseImpl.java +++ b/portal-impl/src/com/liferay/portlet/social/service/base/SocialActivityInterpreterLocalServiceBaseImpl.java @@ -47,6 +47,7 @@ import com.liferay.portlet.social.service.persistence.SocialActivityFinder; import com.liferay.portlet.social.service.persistence.SocialActivityLimitPersistence; import com.liferay.portlet.social.service.persistence.SocialActivityPersistence; +import com.liferay.portlet.social.service.persistence.SocialActivitySetFinder; import com.liferay.portlet.social.service.persistence.SocialActivitySetPersistence; import com.liferay.portlet.social.service.persistence.SocialActivitySettingPersistence; import com.liferay.portlet.social.service.persistence.SocialRelationPersistence; @@ -322,6 +323,25 @@ public void setSocialActivitySetPersistence( this.socialActivitySetPersistence = socialActivitySetPersistence; } + /** + * Returns the social activity set finder. + * + * @return the social activity set finder + */ + public SocialActivitySetFinder getSocialActivitySetFinder() { + return socialActivitySetFinder; + } + + /** + * Sets the social activity set finder. + * + * @param socialActivitySetFinder the social activity set finder + */ + public void setSocialActivitySetFinder( + SocialActivitySetFinder socialActivitySetFinder) { + this.socialActivitySetFinder = socialActivitySetFinder; + } + /** * Returns the social activity setting local service. * @@ -671,6 +691,8 @@ protected void runSQL(String sql) throws SystemException { protected SocialActivitySetLocalService socialActivitySetLocalService; @BeanReference(type = SocialActivitySetPersistence.class) protected SocialActivitySetPersistence socialActivitySetPersistence; + @BeanReference(type = SocialActivitySetFinder.class) + protected SocialActivitySetFinder socialActivitySetFinder; @BeanReference(type = SocialActivitySettingLocalService.class) protected SocialActivitySettingLocalService socialActivitySettingLocalService; @BeanReference(type = SocialActivitySettingService.class) diff --git a/portal-impl/src/com/liferay/portlet/social/service/base/SocialActivityLimitLocalServiceBaseImpl.java b/portal-impl/src/com/liferay/portlet/social/service/base/SocialActivityLimitLocalServiceBaseImpl.java index 5d77dec1f66692..fc7f5a61b03bfe 100644 --- a/portal-impl/src/com/liferay/portlet/social/service/base/SocialActivityLimitLocalServiceBaseImpl.java +++ b/portal-impl/src/com/liferay/portlet/social/service/base/SocialActivityLimitLocalServiceBaseImpl.java @@ -59,6 +59,7 @@ import com.liferay.portlet.social.service.persistence.SocialActivityFinder; import com.liferay.portlet.social.service.persistence.SocialActivityLimitPersistence; import com.liferay.portlet.social.service.persistence.SocialActivityPersistence; +import com.liferay.portlet.social.service.persistence.SocialActivitySetFinder; import com.liferay.portlet.social.service.persistence.SocialActivitySetPersistence; import com.liferay.portlet.social.service.persistence.SocialActivitySettingPersistence; import com.liferay.portlet.social.service.persistence.SocialRelationPersistence; @@ -526,6 +527,25 @@ public void setSocialActivitySetPersistence( this.socialActivitySetPersistence = socialActivitySetPersistence; } + /** + * Returns the social activity set finder. + * + * @return the social activity set finder + */ + public SocialActivitySetFinder getSocialActivitySetFinder() { + return socialActivitySetFinder; + } + + /** + * Sets the social activity set finder. + * + * @param socialActivitySetFinder the social activity set finder + */ + public void setSocialActivitySetFinder( + SocialActivitySetFinder socialActivitySetFinder) { + this.socialActivitySetFinder = socialActivitySetFinder; + } + /** * Returns the social activity setting local service. * @@ -959,6 +979,8 @@ protected void runSQL(String sql) throws SystemException { protected SocialActivitySetLocalService socialActivitySetLocalService; @BeanReference(type = SocialActivitySetPersistence.class) protected SocialActivitySetPersistence socialActivitySetPersistence; + @BeanReference(type = SocialActivitySetFinder.class) + protected SocialActivitySetFinder socialActivitySetFinder; @BeanReference(type = SocialActivitySettingLocalService.class) protected SocialActivitySettingLocalService socialActivitySettingLocalService; @BeanReference(type = SocialActivitySettingService.class) diff --git a/portal-impl/src/com/liferay/portlet/social/service/base/SocialActivityLocalServiceBaseImpl.java b/portal-impl/src/com/liferay/portlet/social/service/base/SocialActivityLocalServiceBaseImpl.java index 5e5f14dd49ca69..de2484b94a9504 100644 --- a/portal-impl/src/com/liferay/portlet/social/service/base/SocialActivityLocalServiceBaseImpl.java +++ b/portal-impl/src/com/liferay/portlet/social/service/base/SocialActivityLocalServiceBaseImpl.java @@ -67,6 +67,7 @@ import com.liferay.portlet.social.service.persistence.SocialActivityFinder; import com.liferay.portlet.social.service.persistence.SocialActivityLimitPersistence; import com.liferay.portlet.social.service.persistence.SocialActivityPersistence; +import com.liferay.portlet.social.service.persistence.SocialActivitySetFinder; import com.liferay.portlet.social.service.persistence.SocialActivitySetPersistence; import com.liferay.portlet.social.service.persistence.SocialActivitySettingPersistence; import com.liferay.portlet.social.service.persistence.SocialRelationPersistence; @@ -534,6 +535,25 @@ public void setSocialActivitySetPersistence( this.socialActivitySetPersistence = socialActivitySetPersistence; } + /** + * Returns the social activity set finder. + * + * @return the social activity set finder + */ + public SocialActivitySetFinder getSocialActivitySetFinder() { + return socialActivitySetFinder; + } + + /** + * Sets the social activity set finder. + * + * @param socialActivitySetFinder the social activity set finder + */ + public void setSocialActivitySetFinder( + SocialActivitySetFinder socialActivitySetFinder) { + this.socialActivitySetFinder = socialActivitySetFinder; + } + /** * Returns the social activity setting local service. * @@ -1113,6 +1133,8 @@ protected void runSQL(String sql) throws SystemException { protected SocialActivitySetLocalService socialActivitySetLocalService; @BeanReference(type = SocialActivitySetPersistence.class) protected SocialActivitySetPersistence socialActivitySetPersistence; + @BeanReference(type = SocialActivitySetFinder.class) + protected SocialActivitySetFinder socialActivitySetFinder; @BeanReference(type = SocialActivitySettingLocalService.class) protected SocialActivitySettingLocalService socialActivitySettingLocalService; @BeanReference(type = SocialActivitySettingService.class) diff --git a/portal-impl/src/com/liferay/portlet/social/service/base/SocialActivitySetLocalServiceBaseImpl.java b/portal-impl/src/com/liferay/portlet/social/service/base/SocialActivitySetLocalServiceBaseImpl.java index b3018d2bf24b41..c7149ab734aba5 100644 --- a/portal-impl/src/com/liferay/portlet/social/service/base/SocialActivitySetLocalServiceBaseImpl.java +++ b/portal-impl/src/com/liferay/portlet/social/service/base/SocialActivitySetLocalServiceBaseImpl.java @@ -55,6 +55,7 @@ import com.liferay.portlet.social.service.persistence.SocialActivityFinder; import com.liferay.portlet.social.service.persistence.SocialActivityLimitPersistence; import com.liferay.portlet.social.service.persistence.SocialActivityPersistence; +import com.liferay.portlet.social.service.persistence.SocialActivitySetFinder; import com.liferay.portlet.social.service.persistence.SocialActivitySetPersistence; import com.liferay.portlet.social.service.persistence.SocialActivitySettingPersistence; import com.liferay.portlet.social.service.persistence.SocialRelationPersistence; @@ -522,6 +523,25 @@ public void setSocialActivitySetPersistence( this.socialActivitySetPersistence = socialActivitySetPersistence; } + /** + * Returns the social activity set finder. + * + * @return the social activity set finder + */ + public SocialActivitySetFinder getSocialActivitySetFinder() { + return socialActivitySetFinder; + } + + /** + * Sets the social activity set finder. + * + * @param socialActivitySetFinder the social activity set finder + */ + public void setSocialActivitySetFinder( + SocialActivitySetFinder socialActivitySetFinder) { + this.socialActivitySetFinder = socialActivitySetFinder; + } + /** * Returns the social activity setting local service. * @@ -883,6 +903,8 @@ protected void runSQL(String sql) throws SystemException { protected SocialActivitySetLocalService socialActivitySetLocalService; @BeanReference(type = SocialActivitySetPersistence.class) protected SocialActivitySetPersistence socialActivitySetPersistence; + @BeanReference(type = SocialActivitySetFinder.class) + protected SocialActivitySetFinder socialActivitySetFinder; @BeanReference(type = SocialActivitySettingLocalService.class) protected SocialActivitySettingLocalService socialActivitySettingLocalService; @BeanReference(type = SocialActivitySettingService.class) diff --git a/portal-impl/src/com/liferay/portlet/social/service/base/SocialActivitySettingLocalServiceBaseImpl.java b/portal-impl/src/com/liferay/portlet/social/service/base/SocialActivitySettingLocalServiceBaseImpl.java index 4a7154dc2bc348..788b8bc2a9d46e 100644 --- a/portal-impl/src/com/liferay/portlet/social/service/base/SocialActivitySettingLocalServiceBaseImpl.java +++ b/portal-impl/src/com/liferay/portlet/social/service/base/SocialActivitySettingLocalServiceBaseImpl.java @@ -59,6 +59,7 @@ import com.liferay.portlet.social.service.persistence.SocialActivityFinder; import com.liferay.portlet.social.service.persistence.SocialActivityLimitPersistence; import com.liferay.portlet.social.service.persistence.SocialActivityPersistence; +import com.liferay.portlet.social.service.persistence.SocialActivitySetFinder; import com.liferay.portlet.social.service.persistence.SocialActivitySetPersistence; import com.liferay.portlet.social.service.persistence.SocialActivitySettingPersistence; import com.liferay.portlet.social.service.persistence.SocialRelationPersistence; @@ -527,6 +528,25 @@ public void setSocialActivitySetPersistence( this.socialActivitySetPersistence = socialActivitySetPersistence; } + /** + * Returns the social activity set finder. + * + * @return the social activity set finder + */ + public SocialActivitySetFinder getSocialActivitySetFinder() { + return socialActivitySetFinder; + } + + /** + * Sets the social activity set finder. + * + * @param socialActivitySetFinder the social activity set finder + */ + public void setSocialActivitySetFinder( + SocialActivitySetFinder socialActivitySetFinder) { + this.socialActivitySetFinder = socialActivitySetFinder; + } + /** * Returns the social activity setting local service. * @@ -960,6 +980,8 @@ protected void runSQL(String sql) throws SystemException { protected SocialActivitySetLocalService socialActivitySetLocalService; @BeanReference(type = SocialActivitySetPersistence.class) protected SocialActivitySetPersistence socialActivitySetPersistence; + @BeanReference(type = SocialActivitySetFinder.class) + protected SocialActivitySetFinder socialActivitySetFinder; @BeanReference(type = SocialActivitySettingLocalService.class) protected SocialActivitySettingLocalService socialActivitySettingLocalService; @BeanReference(type = SocialActivitySettingService.class) diff --git a/portal-impl/src/com/liferay/portlet/social/service/base/SocialActivitySettingServiceBaseImpl.java b/portal-impl/src/com/liferay/portlet/social/service/base/SocialActivitySettingServiceBaseImpl.java index 3e656e389c6c51..6399410cc5cf35 100644 --- a/portal-impl/src/com/liferay/portlet/social/service/base/SocialActivitySettingServiceBaseImpl.java +++ b/portal-impl/src/com/liferay/portlet/social/service/base/SocialActivitySettingServiceBaseImpl.java @@ -51,6 +51,7 @@ import com.liferay.portlet.social.service.persistence.SocialActivityFinder; import com.liferay.portlet.social.service.persistence.SocialActivityLimitPersistence; import com.liferay.portlet.social.service.persistence.SocialActivityPersistence; +import com.liferay.portlet.social.service.persistence.SocialActivitySetFinder; import com.liferay.portlet.social.service.persistence.SocialActivitySetPersistence; import com.liferay.portlet.social.service.persistence.SocialActivitySettingPersistence; import com.liferay.portlet.social.service.persistence.SocialRelationPersistence; @@ -326,6 +327,25 @@ public void setSocialActivitySetPersistence( this.socialActivitySetPersistence = socialActivitySetPersistence; } + /** + * Returns the social activity set finder. + * + * @return the social activity set finder + */ + public SocialActivitySetFinder getSocialActivitySetFinder() { + return socialActivitySetFinder; + } + + /** + * Sets the social activity set finder. + * + * @param socialActivitySetFinder the social activity set finder + */ + public void setSocialActivitySetFinder( + SocialActivitySetFinder socialActivitySetFinder) { + this.socialActivitySetFinder = socialActivitySetFinder; + } + /** * Returns the social activity setting local service. * @@ -755,6 +775,8 @@ protected void runSQL(String sql) throws SystemException { protected SocialActivitySetLocalService socialActivitySetLocalService; @BeanReference(type = SocialActivitySetPersistence.class) protected SocialActivitySetPersistence socialActivitySetPersistence; + @BeanReference(type = SocialActivitySetFinder.class) + protected SocialActivitySetFinder socialActivitySetFinder; @BeanReference(type = SocialActivitySettingLocalService.class) protected SocialActivitySettingLocalService socialActivitySettingLocalService; @BeanReference(type = SocialActivitySettingService.class) diff --git a/portal-impl/src/com/liferay/portlet/social/service/base/SocialRelationLocalServiceBaseImpl.java b/portal-impl/src/com/liferay/portlet/social/service/base/SocialRelationLocalServiceBaseImpl.java index 2d6d3335ed6608..d327c5e02c6d34 100644 --- a/portal-impl/src/com/liferay/portlet/social/service/base/SocialRelationLocalServiceBaseImpl.java +++ b/portal-impl/src/com/liferay/portlet/social/service/base/SocialRelationLocalServiceBaseImpl.java @@ -55,6 +55,7 @@ import com.liferay.portlet.social.service.persistence.SocialActivityFinder; import com.liferay.portlet.social.service.persistence.SocialActivityLimitPersistence; import com.liferay.portlet.social.service.persistence.SocialActivityPersistence; +import com.liferay.portlet.social.service.persistence.SocialActivitySetFinder; import com.liferay.portlet.social.service.persistence.SocialActivitySetPersistence; import com.liferay.portlet.social.service.persistence.SocialActivitySettingPersistence; import com.liferay.portlet.social.service.persistence.SocialRelationPersistence; @@ -522,6 +523,25 @@ public void setSocialActivitySetPersistence( this.socialActivitySetPersistence = socialActivitySetPersistence; } + /** + * Returns the social activity set finder. + * + * @return the social activity set finder + */ + public SocialActivitySetFinder getSocialActivitySetFinder() { + return socialActivitySetFinder; + } + + /** + * Sets the social activity set finder. + * + * @param socialActivitySetFinder the social activity set finder + */ + public void setSocialActivitySetFinder( + SocialActivitySetFinder socialActivitySetFinder) { + this.socialActivitySetFinder = socialActivitySetFinder; + } + /** * Returns the social activity setting local service. * @@ -883,6 +903,8 @@ protected void runSQL(String sql) throws SystemException { protected SocialActivitySetLocalService socialActivitySetLocalService; @BeanReference(type = SocialActivitySetPersistence.class) protected SocialActivitySetPersistence socialActivitySetPersistence; + @BeanReference(type = SocialActivitySetFinder.class) + protected SocialActivitySetFinder socialActivitySetFinder; @BeanReference(type = SocialActivitySettingLocalService.class) protected SocialActivitySettingLocalService socialActivitySettingLocalService; @BeanReference(type = SocialActivitySettingService.class) diff --git a/portal-impl/src/com/liferay/portlet/social/service/base/SocialRequestInterpreterLocalServiceBaseImpl.java b/portal-impl/src/com/liferay/portlet/social/service/base/SocialRequestInterpreterLocalServiceBaseImpl.java index d6e9e57d1d34cc..7b7ae4bd18132b 100644 --- a/portal-impl/src/com/liferay/portlet/social/service/base/SocialRequestInterpreterLocalServiceBaseImpl.java +++ b/portal-impl/src/com/liferay/portlet/social/service/base/SocialRequestInterpreterLocalServiceBaseImpl.java @@ -47,6 +47,7 @@ import com.liferay.portlet.social.service.persistence.SocialActivityFinder; import com.liferay.portlet.social.service.persistence.SocialActivityLimitPersistence; import com.liferay.portlet.social.service.persistence.SocialActivityPersistence; +import com.liferay.portlet.social.service.persistence.SocialActivitySetFinder; import com.liferay.portlet.social.service.persistence.SocialActivitySetPersistence; import com.liferay.portlet.social.service.persistence.SocialActivitySettingPersistence; import com.liferay.portlet.social.service.persistence.SocialRelationPersistence; @@ -322,6 +323,25 @@ public void setSocialActivitySetPersistence( this.socialActivitySetPersistence = socialActivitySetPersistence; } + /** + * Returns the social activity set finder. + * + * @return the social activity set finder + */ + public SocialActivitySetFinder getSocialActivitySetFinder() { + return socialActivitySetFinder; + } + + /** + * Sets the social activity set finder. + * + * @param socialActivitySetFinder the social activity set finder + */ + public void setSocialActivitySetFinder( + SocialActivitySetFinder socialActivitySetFinder) { + this.socialActivitySetFinder = socialActivitySetFinder; + } + /** * Returns the social activity setting local service. * @@ -671,6 +691,8 @@ protected void runSQL(String sql) throws SystemException { protected SocialActivitySetLocalService socialActivitySetLocalService; @BeanReference(type = SocialActivitySetPersistence.class) protected SocialActivitySetPersistence socialActivitySetPersistence; + @BeanReference(type = SocialActivitySetFinder.class) + protected SocialActivitySetFinder socialActivitySetFinder; @BeanReference(type = SocialActivitySettingLocalService.class) protected SocialActivitySettingLocalService socialActivitySettingLocalService; @BeanReference(type = SocialActivitySettingService.class) diff --git a/portal-impl/src/com/liferay/portlet/social/service/base/SocialRequestLocalServiceBaseImpl.java b/portal-impl/src/com/liferay/portlet/social/service/base/SocialRequestLocalServiceBaseImpl.java index 1e616fdbafdb0e..868ee404e27b24 100644 --- a/portal-impl/src/com/liferay/portlet/social/service/base/SocialRequestLocalServiceBaseImpl.java +++ b/portal-impl/src/com/liferay/portlet/social/service/base/SocialRequestLocalServiceBaseImpl.java @@ -55,6 +55,7 @@ import com.liferay.portlet.social.service.persistence.SocialActivityFinder; import com.liferay.portlet.social.service.persistence.SocialActivityLimitPersistence; import com.liferay.portlet.social.service.persistence.SocialActivityPersistence; +import com.liferay.portlet.social.service.persistence.SocialActivitySetFinder; import com.liferay.portlet.social.service.persistence.SocialActivitySetPersistence; import com.liferay.portlet.social.service.persistence.SocialActivitySettingPersistence; import com.liferay.portlet.social.service.persistence.SocialRelationPersistence; @@ -536,6 +537,25 @@ public void setSocialActivitySetPersistence( this.socialActivitySetPersistence = socialActivitySetPersistence; } + /** + * Returns the social activity set finder. + * + * @return the social activity set finder + */ + public SocialActivitySetFinder getSocialActivitySetFinder() { + return socialActivitySetFinder; + } + + /** + * Sets the social activity set finder. + * + * @param socialActivitySetFinder the social activity set finder + */ + public void setSocialActivitySetFinder( + SocialActivitySetFinder socialActivitySetFinder) { + this.socialActivitySetFinder = socialActivitySetFinder; + } + /** * Returns the social activity setting local service. * @@ -897,6 +917,8 @@ protected void runSQL(String sql) throws SystemException { protected SocialActivitySetLocalService socialActivitySetLocalService; @BeanReference(type = SocialActivitySetPersistence.class) protected SocialActivitySetPersistence socialActivitySetPersistence; + @BeanReference(type = SocialActivitySetFinder.class) + protected SocialActivitySetFinder socialActivitySetFinder; @BeanReference(type = SocialActivitySettingLocalService.class) protected SocialActivitySettingLocalService socialActivitySettingLocalService; @BeanReference(type = SocialActivitySettingService.class) diff --git a/portal-impl/src/com/liferay/portlet/social/service/base/SocialRequestServiceBaseImpl.java b/portal-impl/src/com/liferay/portlet/social/service/base/SocialRequestServiceBaseImpl.java index 1e1b68ce54e5e7..6a86b42e2b31a4 100644 --- a/portal-impl/src/com/liferay/portlet/social/service/base/SocialRequestServiceBaseImpl.java +++ b/portal-impl/src/com/liferay/portlet/social/service/base/SocialRequestServiceBaseImpl.java @@ -47,6 +47,7 @@ import com.liferay.portlet.social.service.persistence.SocialActivityFinder; import com.liferay.portlet.social.service.persistence.SocialActivityLimitPersistence; import com.liferay.portlet.social.service.persistence.SocialActivityPersistence; +import com.liferay.portlet.social.service.persistence.SocialActivitySetFinder; import com.liferay.portlet.social.service.persistence.SocialActivitySetPersistence; import com.liferay.portlet.social.service.persistence.SocialActivitySettingPersistence; import com.liferay.portlet.social.service.persistence.SocialRelationPersistence; @@ -321,6 +322,25 @@ public void setSocialActivitySetPersistence( this.socialActivitySetPersistence = socialActivitySetPersistence; } + /** + * Returns the social activity set finder. + * + * @return the social activity set finder + */ + public SocialActivitySetFinder getSocialActivitySetFinder() { + return socialActivitySetFinder; + } + + /** + * Sets the social activity set finder. + * + * @param socialActivitySetFinder the social activity set finder + */ + public void setSocialActivitySetFinder( + SocialActivitySetFinder socialActivitySetFinder) { + this.socialActivitySetFinder = socialActivitySetFinder; + } + /** * Returns the social activity setting local service. * @@ -678,6 +698,8 @@ protected void runSQL(String sql) throws SystemException { protected SocialActivitySetLocalService socialActivitySetLocalService; @BeanReference(type = SocialActivitySetPersistence.class) protected SocialActivitySetPersistence socialActivitySetPersistence; + @BeanReference(type = SocialActivitySetFinder.class) + protected SocialActivitySetFinder socialActivitySetFinder; @BeanReference(type = SocialActivitySettingLocalService.class) protected SocialActivitySettingLocalService socialActivitySettingLocalService; @BeanReference(type = SocialActivitySettingService.class) diff --git a/portal-impl/src/com/liferay/portlet/social/service/impl/SocialActivityInterpreterLocalServiceImpl.java b/portal-impl/src/com/liferay/portlet/social/service/impl/SocialActivityInterpreterLocalServiceImpl.java index c80f44431926dd..2749097b75d8ee 100644 --- a/portal-impl/src/com/liferay/portlet/social/service/impl/SocialActivityInterpreterLocalServiceImpl.java +++ b/portal-impl/src/com/liferay/portlet/social/service/impl/SocialActivityInterpreterLocalServiceImpl.java @@ -277,6 +277,8 @@ public void updateActivitySet(long activityId) if (activityInterpreter.hasClassName(className)) { activityInterpreter.updateActivitySet(activityId); + + return; } } } diff --git a/portal-impl/src/com/liferay/portlet/social/service/persistence/SocialActivitySetPersistenceImpl.java b/portal-impl/src/com/liferay/portlet/social/service/persistence/SocialActivitySetPersistenceImpl.java index 0908c484bae17a..788bfa9df2b51c 100644 --- a/portal-impl/src/com/liferay/portlet/social/service/persistence/SocialActivitySetPersistenceImpl.java +++ b/portal-impl/src/com/liferay/portlet/social/service/persistence/SocialActivitySetPersistenceImpl.java @@ -84,6 +84,485 @@ public class SocialActivitySetPersistenceImpl extends BasePersistenceImpl findByGroupId(long groupId) + throws SystemException { + return findByGroupId(groupId, QueryUtil.ALL_POS, QueryUtil.ALL_POS, null); + } + + /** + * Returns a range of all the social activity sets where groupId = ?. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portlet.social.model.impl.SocialActivitySetModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param groupId the group ID + * @param start the lower bound of the range of social activity sets + * @param end the upper bound of the range of social activity sets (not inclusive) + * @return the range of matching social activity sets + * @throws SystemException if a system exception occurred + */ + public List findByGroupId(long groupId, int start, + int end) throws SystemException { + return findByGroupId(groupId, start, end, null); + } + + /** + * Returns an ordered range of all the social activity sets where groupId = ?. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portlet.social.model.impl.SocialActivitySetModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param groupId the group ID + * @param start the lower bound of the range of social activity sets + * @param end the upper bound of the range of social activity sets (not inclusive) + * @param orderByComparator the comparator to order the results by (optionally null) + * @return the ordered range of matching social activity sets + * @throws SystemException if a system exception occurred + */ + public List findByGroupId(long groupId, int start, + int end, OrderByComparator orderByComparator) throws SystemException { + boolean pagination = true; + FinderPath finderPath = null; + Object[] finderArgs = null; + + if ((start == QueryUtil.ALL_POS) && (end == QueryUtil.ALL_POS) && + (orderByComparator == null)) { + pagination = false; + finderPath = FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_GROUPID; + finderArgs = new Object[] { groupId }; + } + else { + finderPath = FINDER_PATH_WITH_PAGINATION_FIND_BY_GROUPID; + finderArgs = new Object[] { groupId, start, end, orderByComparator }; + } + + List list = (List)FinderCacheUtil.getResult(finderPath, + finderArgs, this); + + if ((list != null) && !list.isEmpty()) { + for (SocialActivitySet socialActivitySet : list) { + if ((groupId != socialActivitySet.getGroupId())) { + list = null; + + break; + } + } + } + + if (list == null) { + StringBundler query = null; + + if (orderByComparator != null) { + query = new StringBundler(3 + + (orderByComparator.getOrderByFields().length * 3)); + } + else { + query = new StringBundler(3); + } + + query.append(_SQL_SELECT_SOCIALACTIVITYSET_WHERE); + + query.append(_FINDER_COLUMN_GROUPID_GROUPID_2); + + if (orderByComparator != null) { + appendOrderByComparator(query, _ORDER_BY_ENTITY_ALIAS, + orderByComparator); + } + else + if (pagination) { + query.append(SocialActivitySetModelImpl.ORDER_BY_JPQL); + } + + String sql = query.toString(); + + Session session = null; + + try { + session = openSession(); + + Query q = session.createQuery(sql); + + QueryPos qPos = QueryPos.getInstance(q); + + qPos.add(groupId); + + if (!pagination) { + list = (List)QueryUtil.list(q, + getDialect(), start, end, false); + + Collections.sort(list); + + list = new UnmodifiableList(list); + } + else { + list = (List)QueryUtil.list(q, + getDialect(), start, end); + } + + cacheResult(list); + + FinderCacheUtil.putResult(finderPath, finderArgs, list); + } + catch (Exception e) { + FinderCacheUtil.removeResult(finderPath, finderArgs); + + throw processException(e); + } + finally { + closeSession(session); + } + } + + return list; + } + + /** + * Returns the first social activity set in the ordered set where groupId = ?. + * + * @param groupId the group ID + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the first matching social activity set + * @throws com.liferay.portlet.social.NoSuchActivitySetException if a matching social activity set could not be found + * @throws SystemException if a system exception occurred + */ + public SocialActivitySet findByGroupId_First(long groupId, + OrderByComparator orderByComparator) + throws NoSuchActivitySetException, SystemException { + SocialActivitySet socialActivitySet = fetchByGroupId_First(groupId, + orderByComparator); + + if (socialActivitySet != null) { + return socialActivitySet; + } + + StringBundler msg = new StringBundler(4); + + msg.append(_NO_SUCH_ENTITY_WITH_KEY); + + msg.append("groupId="); + msg.append(groupId); + + msg.append(StringPool.CLOSE_CURLY_BRACE); + + throw new NoSuchActivitySetException(msg.toString()); + } + + /** + * Returns the first social activity set in the ordered set where groupId = ?. + * + * @param groupId the group ID + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the first matching social activity set, or null if a matching social activity set could not be found + * @throws SystemException if a system exception occurred + */ + public SocialActivitySet fetchByGroupId_First(long groupId, + OrderByComparator orderByComparator) throws SystemException { + List list = findByGroupId(groupId, 0, 1, + orderByComparator); + + if (!list.isEmpty()) { + return list.get(0); + } + + return null; + } + + /** + * Returns the last social activity set in the ordered set where groupId = ?. + * + * @param groupId the group ID + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the last matching social activity set + * @throws com.liferay.portlet.social.NoSuchActivitySetException if a matching social activity set could not be found + * @throws SystemException if a system exception occurred + */ + public SocialActivitySet findByGroupId_Last(long groupId, + OrderByComparator orderByComparator) + throws NoSuchActivitySetException, SystemException { + SocialActivitySet socialActivitySet = fetchByGroupId_Last(groupId, + orderByComparator); + + if (socialActivitySet != null) { + return socialActivitySet; + } + + StringBundler msg = new StringBundler(4); + + msg.append(_NO_SUCH_ENTITY_WITH_KEY); + + msg.append("groupId="); + msg.append(groupId); + + msg.append(StringPool.CLOSE_CURLY_BRACE); + + throw new NoSuchActivitySetException(msg.toString()); + } + + /** + * Returns the last social activity set in the ordered set where groupId = ?. + * + * @param groupId the group ID + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the last matching social activity set, or null if a matching social activity set could not be found + * @throws SystemException if a system exception occurred + */ + public SocialActivitySet fetchByGroupId_Last(long groupId, + OrderByComparator orderByComparator) throws SystemException { + int count = countByGroupId(groupId); + + List list = findByGroupId(groupId, count - 1, count, + orderByComparator); + + if (!list.isEmpty()) { + return list.get(0); + } + + return null; + } + + /** + * Returns the social activity sets before and after the current social activity set in the ordered set where groupId = ?. + * + * @param activitySetId the primary key of the current social activity set + * @param groupId the group ID + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the previous, current, and next social activity set + * @throws com.liferay.portlet.social.NoSuchActivitySetException if a social activity set with the primary key could not be found + * @throws SystemException if a system exception occurred + */ + public SocialActivitySet[] findByGroupId_PrevAndNext(long activitySetId, + long groupId, OrderByComparator orderByComparator) + throws NoSuchActivitySetException, SystemException { + SocialActivitySet socialActivitySet = findByPrimaryKey(activitySetId); + + Session session = null; + + try { + session = openSession(); + + SocialActivitySet[] array = new SocialActivitySetImpl[3]; + + array[0] = getByGroupId_PrevAndNext(session, socialActivitySet, + groupId, orderByComparator, true); + + array[1] = socialActivitySet; + + array[2] = getByGroupId_PrevAndNext(session, socialActivitySet, + groupId, orderByComparator, false); + + return array; + } + catch (Exception e) { + throw processException(e); + } + finally { + closeSession(session); + } + } + + protected SocialActivitySet getByGroupId_PrevAndNext(Session session, + SocialActivitySet socialActivitySet, long groupId, + OrderByComparator orderByComparator, boolean previous) { + StringBundler query = null; + + if (orderByComparator != null) { + query = new StringBundler(6 + + (orderByComparator.getOrderByFields().length * 6)); + } + else { + query = new StringBundler(3); + } + + query.append(_SQL_SELECT_SOCIALACTIVITYSET_WHERE); + + query.append(_FINDER_COLUMN_GROUPID_GROUPID_2); + + if (orderByComparator != null) { + String[] orderByConditionFields = orderByComparator.getOrderByConditionFields(); + + if (orderByConditionFields.length > 0) { + query.append(WHERE_AND); + } + + for (int i = 0; i < orderByConditionFields.length; i++) { + query.append(_ORDER_BY_ENTITY_ALIAS); + query.append(orderByConditionFields[i]); + + if ((i + 1) < orderByConditionFields.length) { + if (orderByComparator.isAscending() ^ previous) { + query.append(WHERE_GREATER_THAN_HAS_NEXT); + } + else { + query.append(WHERE_LESSER_THAN_HAS_NEXT); + } + } + else { + if (orderByComparator.isAscending() ^ previous) { + query.append(WHERE_GREATER_THAN); + } + else { + query.append(WHERE_LESSER_THAN); + } + } + } + + query.append(ORDER_BY_CLAUSE); + + String[] orderByFields = orderByComparator.getOrderByFields(); + + for (int i = 0; i < orderByFields.length; i++) { + query.append(_ORDER_BY_ENTITY_ALIAS); + query.append(orderByFields[i]); + + if ((i + 1) < orderByFields.length) { + if (orderByComparator.isAscending() ^ previous) { + query.append(ORDER_BY_ASC_HAS_NEXT); + } + else { + query.append(ORDER_BY_DESC_HAS_NEXT); + } + } + else { + if (orderByComparator.isAscending() ^ previous) { + query.append(ORDER_BY_ASC); + } + else { + query.append(ORDER_BY_DESC); + } + } + } + } + else { + query.append(SocialActivitySetModelImpl.ORDER_BY_JPQL); + } + + String sql = query.toString(); + + Query q = session.createQuery(sql); + + q.setFirstResult(0); + q.setMaxResults(2); + + QueryPos qPos = QueryPos.getInstance(q); + + qPos.add(groupId); + + if (orderByComparator != null) { + Object[] values = orderByComparator.getOrderByConditionValues(socialActivitySet); + + for (Object value : values) { + qPos.add(value); + } + } + + List list = q.list(); + + if (list.size() == 2) { + return list.get(1); + } + else { + return null; + } + } + + /** + * Removes all the social activity sets where groupId = ? from the database. + * + * @param groupId the group ID + * @throws SystemException if a system exception occurred + */ + public void removeByGroupId(long groupId) throws SystemException { + for (SocialActivitySet socialActivitySet : findByGroupId(groupId, + QueryUtil.ALL_POS, QueryUtil.ALL_POS, null)) { + remove(socialActivitySet); + } + } + + /** + * Returns the number of social activity sets where groupId = ?. + * + * @param groupId the group ID + * @return the number of matching social activity sets + * @throws SystemException if a system exception occurred + */ + public int countByGroupId(long groupId) throws SystemException { + FinderPath finderPath = FINDER_PATH_COUNT_BY_GROUPID; + + Object[] finderArgs = new Object[] { groupId }; + + Long count = (Long)FinderCacheUtil.getResult(finderPath, finderArgs, + this); + + if (count == null) { + StringBundler query = new StringBundler(2); + + query.append(_SQL_COUNT_SOCIALACTIVITYSET_WHERE); + + query.append(_FINDER_COLUMN_GROUPID_GROUPID_2); + + String sql = query.toString(); + + Session session = null; + + try { + session = openSession(); + + Query q = session.createQuery(sql); + + QueryPos qPos = QueryPos.getInstance(q); + + qPos.add(groupId); + + count = (Long)q.uniqueResult(); + + FinderCacheUtil.putResult(finderPath, finderArgs, count); + } + catch (Exception e) { + FinderCacheUtil.removeResult(finderPath, finderArgs); + + throw processException(e); + } + finally { + closeSession(session); + } + } + + return count.intValue(); + } + + private static final String _FINDER_COLUMN_GROUPID_GROUPID_2 = "socialActivitySet.groupId = ?"; public static final FinderPath FINDER_PATH_WITH_PAGINATION_FIND_BY_G_U_T = new FinderPath(SocialActivitySetModelImpl.ENTITY_CACHE_ENABLED, SocialActivitySetModelImpl.FINDER_CACHE_ENABLED, SocialActivitySetImpl.class, @@ -2012,6 +2491,23 @@ public SocialActivitySet updateImpl( } else { + if ((socialActivitySetModelImpl.getColumnBitmask() & + FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_GROUPID.getColumnBitmask()) != 0) { + Object[] args = new Object[] { + socialActivitySetModelImpl.getOriginalGroupId() + }; + + FinderCacheUtil.removeResult(FINDER_PATH_COUNT_BY_GROUPID, args); + FinderCacheUtil.removeResult(FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_GROUPID, + args); + + args = new Object[] { socialActivitySetModelImpl.getGroupId() }; + + FinderCacheUtil.removeResult(FINDER_PATH_COUNT_BY_GROUPID, args); + FinderCacheUtil.removeResult(FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_GROUPID, + args); + } + if ((socialActivitySetModelImpl.getColumnBitmask() & FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_G_U_T.getColumnBitmask()) != 0) { Object[] args = new Object[] { diff --git a/portal-service/src/com/liferay/portlet/social/service/SocialActivitySetLocalService.java b/portal-service/src/com/liferay/portlet/social/service/SocialActivitySetLocalService.java index 8384ecb5e8e687..8ad613600429eb 100644 --- a/portal-service/src/com/liferay/portlet/social/service/SocialActivitySetLocalService.java +++ b/portal-service/src/com/liferay/portlet/social/service/SocialActivitySetLocalService.java @@ -253,11 +253,56 @@ public com.liferay.portlet.social.model.SocialActivitySet getClassActivitySet( long userId, long classNameId, long classPK, int type) throws com.liferay.portal.kernel.exception.SystemException; + @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) + public java.util.List getGroupActivitySets( + long groupId, int start, int end) + throws com.liferay.portal.kernel.exception.SystemException; + + @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) + public int getGroupActivitySetsCount(long groupId) + throws com.liferay.portal.kernel.exception.SystemException; + + @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) + public java.util.List getRelationActivitySets( + long userId, int start, int end) + throws com.liferay.portal.kernel.exception.SystemException; + + @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) + public java.util.List getRelationActivitySets( + long userId, int type, int start, int end) + throws com.liferay.portal.kernel.exception.SystemException; + + @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) + public int getRelationActivitySetsCount(long userId) + throws com.liferay.portal.kernel.exception.SystemException; + + @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) + public int getRelationActivitySetsCount(long userId, int type) + throws com.liferay.portal.kernel.exception.SystemException; + @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) public com.liferay.portlet.social.model.SocialActivitySet getUserActivitySet( long groupId, long userId, int type) throws com.liferay.portal.kernel.exception.SystemException; + @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) + public java.util.List getUserActivitySets( + long userId, int start, int end) + throws com.liferay.portal.kernel.exception.SystemException; + + @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) + public int getUserActivitySetsCount(long userId) + throws com.liferay.portal.kernel.exception.SystemException; + + @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) + public java.util.List getUserGroupsActivitySets( + long userId, int start, int end) + throws com.liferay.portal.kernel.exception.SystemException; + + @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) + public int getUserGroupsActivitySetsCount(long userId) + throws com.liferay.portal.kernel.exception.SystemException; + public void incrementActivityCount(long activitySetId, long activityId) throws com.liferay.portal.kernel.exception.PortalException, com.liferay.portal.kernel.exception.SystemException; diff --git a/portal-service/src/com/liferay/portlet/social/service/SocialActivitySetLocalServiceUtil.java b/portal-service/src/com/liferay/portlet/social/service/SocialActivitySetLocalServiceUtil.java index ef7695ceba8657..8de84ca37858f1 100644 --- a/portal-service/src/com/liferay/portlet/social/service/SocialActivitySetLocalServiceUtil.java +++ b/portal-service/src/com/liferay/portlet/social/service/SocialActivitySetLocalServiceUtil.java @@ -284,12 +284,67 @@ public static com.liferay.portlet.social.model.SocialActivitySet getClassActivit .getClassActivitySet(userId, classNameId, classPK, type); } + public static java.util.List getGroupActivitySets( + long groupId, int start, int end) + throws com.liferay.portal.kernel.exception.SystemException { + return getService().getGroupActivitySets(groupId, start, end); + } + + public static int getGroupActivitySetsCount(long groupId) + throws com.liferay.portal.kernel.exception.SystemException { + return getService().getGroupActivitySetsCount(groupId); + } + + public static java.util.List getRelationActivitySets( + long userId, int start, int end) + throws com.liferay.portal.kernel.exception.SystemException { + return getService().getRelationActivitySets(userId, start, end); + } + + public static java.util.List getRelationActivitySets( + long userId, int type, int start, int end) + throws com.liferay.portal.kernel.exception.SystemException { + return getService().getRelationActivitySets(userId, type, start, end); + } + + public static int getRelationActivitySetsCount(long userId) + throws com.liferay.portal.kernel.exception.SystemException { + return getService().getRelationActivitySetsCount(userId); + } + + public static int getRelationActivitySetsCount(long userId, int type) + throws com.liferay.portal.kernel.exception.SystemException { + return getService().getRelationActivitySetsCount(userId, type); + } + public static com.liferay.portlet.social.model.SocialActivitySet getUserActivitySet( long groupId, long userId, int type) throws com.liferay.portal.kernel.exception.SystemException { return getService().getUserActivitySet(groupId, userId, type); } + public static java.util.List getUserActivitySets( + long userId, int start, int end) + throws com.liferay.portal.kernel.exception.SystemException { + return getService().getUserActivitySets(userId, start, end); + } + + public static int getUserActivitySetsCount(long userId) + throws com.liferay.portal.kernel.exception.SystemException { + return getService().getUserActivitySetsCount(userId); + } + + public static java.util.List getUserGroupsActivitySets( + long userId, int start, int end) + throws com.liferay.portal.kernel.exception.SystemException { + return getService().getUserGroupsActivitySets(userId, start, end); + } + + public static int getUserGroupsActivitySetsCount(long userId) + throws com.liferay.portal.kernel.exception.SystemException { + return getService().getUserGroupsActivitySetsCount(userId); + } + public static void incrementActivityCount(long activitySetId, long activityId) throws com.liferay.portal.kernel.exception.PortalException, diff --git a/portal-service/src/com/liferay/portlet/social/service/SocialActivitySetLocalServiceWrapper.java b/portal-service/src/com/liferay/portlet/social/service/SocialActivitySetLocalServiceWrapper.java index 6a47ec0305b66a..0a2211fa34bd5f 100644 --- a/portal-service/src/com/liferay/portlet/social/service/SocialActivitySetLocalServiceWrapper.java +++ b/portal-service/src/com/liferay/portlet/social/service/SocialActivitySetLocalServiceWrapper.java @@ -283,6 +283,43 @@ public com.liferay.portlet.social.model.SocialActivitySet getClassActivitySet( classNameId, classPK, type); } + public java.util.List getGroupActivitySets( + long groupId, int start, int end) + throws com.liferay.portal.kernel.exception.SystemException { + return _socialActivitySetLocalService.getGroupActivitySets(groupId, + start, end); + } + + public int getGroupActivitySetsCount(long groupId) + throws com.liferay.portal.kernel.exception.SystemException { + return _socialActivitySetLocalService.getGroupActivitySetsCount(groupId); + } + + public java.util.List getRelationActivitySets( + long userId, int start, int end) + throws com.liferay.portal.kernel.exception.SystemException { + return _socialActivitySetLocalService.getRelationActivitySets(userId, + start, end); + } + + public java.util.List getRelationActivitySets( + long userId, int type, int start, int end) + throws com.liferay.portal.kernel.exception.SystemException { + return _socialActivitySetLocalService.getRelationActivitySets(userId, + type, start, end); + } + + public int getRelationActivitySetsCount(long userId) + throws com.liferay.portal.kernel.exception.SystemException { + return _socialActivitySetLocalService.getRelationActivitySetsCount(userId); + } + + public int getRelationActivitySetsCount(long userId, int type) + throws com.liferay.portal.kernel.exception.SystemException { + return _socialActivitySetLocalService.getRelationActivitySetsCount(userId, + type); + } + public com.liferay.portlet.social.model.SocialActivitySet getUserActivitySet( long groupId, long userId, int type) throws com.liferay.portal.kernel.exception.SystemException { @@ -290,6 +327,30 @@ public com.liferay.portlet.social.model.SocialActivitySet getUserActivitySet( userId, type); } + public java.util.List getUserActivitySets( + long userId, int start, int end) + throws com.liferay.portal.kernel.exception.SystemException { + return _socialActivitySetLocalService.getUserActivitySets(userId, + start, end); + } + + public int getUserActivitySetsCount(long userId) + throws com.liferay.portal.kernel.exception.SystemException { + return _socialActivitySetLocalService.getUserActivitySetsCount(userId); + } + + public java.util.List getUserGroupsActivitySets( + long userId, int start, int end) + throws com.liferay.portal.kernel.exception.SystemException { + return _socialActivitySetLocalService.getUserGroupsActivitySets(userId, + start, end); + } + + public int getUserGroupsActivitySetsCount(long userId) + throws com.liferay.portal.kernel.exception.SystemException { + return _socialActivitySetLocalService.getUserGroupsActivitySetsCount(userId); + } + public void incrementActivityCount(long activitySetId, long activityId) throws com.liferay.portal.kernel.exception.PortalException, com.liferay.portal.kernel.exception.SystemException { diff --git a/portal-service/src/com/liferay/portlet/social/service/persistence/SocialActivitySetFinder.java b/portal-service/src/com/liferay/portlet/social/service/persistence/SocialActivitySetFinder.java new file mode 100644 index 00000000000000..2bc9393cf385d6 --- /dev/null +++ b/portal-service/src/com/liferay/portlet/social/service/persistence/SocialActivitySetFinder.java @@ -0,0 +1,48 @@ +/** + * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved. + * + * This library is free software; you can redistribute it and/or modify it under + * the terms of the GNU Lesser General Public License as published by the Free + * Software Foundation; either version 2.1 of the License, or (at your option) + * any later version. + * + * This library is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more + * details. + */ + +package com.liferay.portlet.social.service.persistence; + +/** + * @author Brian Wing Shun Chan + */ +public interface SocialActivitySetFinder { + public int countByRelation(long userId) + throws com.liferay.portal.kernel.exception.SystemException; + + public int countByRelationType(long userId, int type) + throws com.liferay.portal.kernel.exception.SystemException; + + public int countByUser(long userId) + throws com.liferay.portal.kernel.exception.SystemException; + + public int countByUserGroups(long userId) + throws com.liferay.portal.kernel.exception.SystemException; + + public java.util.List findByRelation( + long userId, int start, int end) + throws com.liferay.portal.kernel.exception.SystemException; + + public java.util.List findByRelationType( + long userId, int type, int start, int end) + throws com.liferay.portal.kernel.exception.SystemException; + + public java.util.List findByUser( + long userId, int start, int end) + throws com.liferay.portal.kernel.exception.SystemException; + + public java.util.List findByUserGroups( + long userId, int start, int end) + throws com.liferay.portal.kernel.exception.SystemException; +} \ No newline at end of file diff --git a/portal-service/src/com/liferay/portlet/social/service/persistence/SocialActivitySetFinderUtil.java b/portal-service/src/com/liferay/portlet/social/service/persistence/SocialActivitySetFinderUtil.java new file mode 100644 index 00000000000000..3376de58631497 --- /dev/null +++ b/portal-service/src/com/liferay/portlet/social/service/persistence/SocialActivitySetFinderUtil.java @@ -0,0 +1,87 @@ +/** + * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved. + * + * This library is free software; you can redistribute it and/or modify it under + * the terms of the GNU Lesser General Public License as published by the Free + * Software Foundation; either version 2.1 of the License, or (at your option) + * any later version. + * + * This library is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more + * details. + */ + +package com.liferay.portlet.social.service.persistence; + +import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil; +import com.liferay.portal.kernel.util.ReferenceRegistry; + +/** + * @author Brian Wing Shun Chan + */ +public class SocialActivitySetFinderUtil { + public static int countByRelation(long userId) + throws com.liferay.portal.kernel.exception.SystemException { + return getFinder().countByRelation(userId); + } + + public static int countByRelationType(long userId, int type) + throws com.liferay.portal.kernel.exception.SystemException { + return getFinder().countByRelationType(userId, type); + } + + public static int countByUser(long userId) + throws com.liferay.portal.kernel.exception.SystemException { + return getFinder().countByUser(userId); + } + + public static int countByUserGroups(long userId) + throws com.liferay.portal.kernel.exception.SystemException { + return getFinder().countByUserGroups(userId); + } + + public static java.util.List findByRelation( + long userId, int start, int end) + throws com.liferay.portal.kernel.exception.SystemException { + return getFinder().findByRelation(userId, start, end); + } + + public static java.util.List findByRelationType( + long userId, int type, int start, int end) + throws com.liferay.portal.kernel.exception.SystemException { + return getFinder().findByRelationType(userId, type, start, end); + } + + public static java.util.List findByUser( + long userId, int start, int end) + throws com.liferay.portal.kernel.exception.SystemException { + return getFinder().findByUser(userId, start, end); + } + + public static java.util.List findByUserGroups( + long userId, int start, int end) + throws com.liferay.portal.kernel.exception.SystemException { + return getFinder().findByUserGroups(userId, start, end); + } + + public static SocialActivitySetFinder getFinder() { + if (_finder == null) { + _finder = (SocialActivitySetFinder)PortalBeanLocatorUtil.locate(SocialActivitySetFinder.class.getName()); + + ReferenceRegistry.registerReference(SocialActivitySetFinderUtil.class, + "_finder"); + } + + return _finder; + } + + public void setFinder(SocialActivitySetFinder finder) { + _finder = finder; + + ReferenceRegistry.registerReference(SocialActivitySetFinderUtil.class, + "_finder"); + } + + private static SocialActivitySetFinder _finder; +} \ No newline at end of file diff --git a/portal-service/src/com/liferay/portlet/social/service/persistence/SocialActivitySetPersistence.java b/portal-service/src/com/liferay/portlet/social/service/persistence/SocialActivitySetPersistence.java index 2dc27abb9ffec8..6bfa2541ed05f4 100644 --- a/portal-service/src/com/liferay/portlet/social/service/persistence/SocialActivitySetPersistence.java +++ b/portal-service/src/com/liferay/portlet/social/service/persistence/SocialActivitySetPersistence.java @@ -37,6 +37,144 @@ public interface SocialActivitySetPersistence extends BasePersistenceservice.xml and rerun ServiceBuilder to regenerate this interface. */ + /** + * Returns all the social activity sets where groupId = ?. + * + * @param groupId the group ID + * @return the matching social activity sets + * @throws SystemException if a system exception occurred + */ + public java.util.List findByGroupId( + long groupId) + throws com.liferay.portal.kernel.exception.SystemException; + + /** + * Returns a range of all the social activity sets where groupId = ?. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portlet.social.model.impl.SocialActivitySetModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param groupId the group ID + * @param start the lower bound of the range of social activity sets + * @param end the upper bound of the range of social activity sets (not inclusive) + * @return the range of matching social activity sets + * @throws SystemException if a system exception occurred + */ + public java.util.List findByGroupId( + long groupId, int start, int end) + throws com.liferay.portal.kernel.exception.SystemException; + + /** + * Returns an ordered range of all the social activity sets where groupId = ?. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portlet.social.model.impl.SocialActivitySetModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param groupId the group ID + * @param start the lower bound of the range of social activity sets + * @param end the upper bound of the range of social activity sets (not inclusive) + * @param orderByComparator the comparator to order the results by (optionally null) + * @return the ordered range of matching social activity sets + * @throws SystemException if a system exception occurred + */ + public java.util.List findByGroupId( + long groupId, int start, int end, + com.liferay.portal.kernel.util.OrderByComparator orderByComparator) + throws com.liferay.portal.kernel.exception.SystemException; + + /** + * Returns the first social activity set in the ordered set where groupId = ?. + * + * @param groupId the group ID + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the first matching social activity set + * @throws com.liferay.portlet.social.NoSuchActivitySetException if a matching social activity set could not be found + * @throws SystemException if a system exception occurred + */ + public com.liferay.portlet.social.model.SocialActivitySet findByGroupId_First( + long groupId, + com.liferay.portal.kernel.util.OrderByComparator orderByComparator) + throws com.liferay.portal.kernel.exception.SystemException, + com.liferay.portlet.social.NoSuchActivitySetException; + + /** + * Returns the first social activity set in the ordered set where groupId = ?. + * + * @param groupId the group ID + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the first matching social activity set, or null if a matching social activity set could not be found + * @throws SystemException if a system exception occurred + */ + public com.liferay.portlet.social.model.SocialActivitySet fetchByGroupId_First( + long groupId, + com.liferay.portal.kernel.util.OrderByComparator orderByComparator) + throws com.liferay.portal.kernel.exception.SystemException; + + /** + * Returns the last social activity set in the ordered set where groupId = ?. + * + * @param groupId the group ID + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the last matching social activity set + * @throws com.liferay.portlet.social.NoSuchActivitySetException if a matching social activity set could not be found + * @throws SystemException if a system exception occurred + */ + public com.liferay.portlet.social.model.SocialActivitySet findByGroupId_Last( + long groupId, + com.liferay.portal.kernel.util.OrderByComparator orderByComparator) + throws com.liferay.portal.kernel.exception.SystemException, + com.liferay.portlet.social.NoSuchActivitySetException; + + /** + * Returns the last social activity set in the ordered set where groupId = ?. + * + * @param groupId the group ID + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the last matching social activity set, or null if a matching social activity set could not be found + * @throws SystemException if a system exception occurred + */ + public com.liferay.portlet.social.model.SocialActivitySet fetchByGroupId_Last( + long groupId, + com.liferay.portal.kernel.util.OrderByComparator orderByComparator) + throws com.liferay.portal.kernel.exception.SystemException; + + /** + * Returns the social activity sets before and after the current social activity set in the ordered set where groupId = ?. + * + * @param activitySetId the primary key of the current social activity set + * @param groupId the group ID + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the previous, current, and next social activity set + * @throws com.liferay.portlet.social.NoSuchActivitySetException if a social activity set with the primary key could not be found + * @throws SystemException if a system exception occurred + */ + public com.liferay.portlet.social.model.SocialActivitySet[] findByGroupId_PrevAndNext( + long activitySetId, long groupId, + com.liferay.portal.kernel.util.OrderByComparator orderByComparator) + throws com.liferay.portal.kernel.exception.SystemException, + com.liferay.portlet.social.NoSuchActivitySetException; + + /** + * Removes all the social activity sets where groupId = ? from the database. + * + * @param groupId the group ID + * @throws SystemException if a system exception occurred + */ + public void removeByGroupId(long groupId) + throws com.liferay.portal.kernel.exception.SystemException; + + /** + * Returns the number of social activity sets where groupId = ?. + * + * @param groupId the group ID + * @return the number of matching social activity sets + * @throws SystemException if a system exception occurred + */ + public int countByGroupId(long groupId) + throws com.liferay.portal.kernel.exception.SystemException; + /** * Returns all the social activity sets where groupId = ? and userId = ? and type = ?. * diff --git a/portal-service/src/com/liferay/portlet/social/service/persistence/SocialActivitySetUtil.java b/portal-service/src/com/liferay/portlet/social/service/persistence/SocialActivitySetUtil.java index 7275a27486b178..ee619a1b6b845c 100644 --- a/portal-service/src/com/liferay/portlet/social/service/persistence/SocialActivitySetUtil.java +++ b/portal-service/src/com/liferay/portlet/social/service/persistence/SocialActivitySetUtil.java @@ -111,6 +111,167 @@ public static SocialActivitySet update( return getPersistence().update(socialActivitySet, serviceContext); } + /** + * Returns all the social activity sets where groupId = ?. + * + * @param groupId the group ID + * @return the matching social activity sets + * @throws SystemException if a system exception occurred + */ + public static java.util.List findByGroupId( + long groupId) + throws com.liferay.portal.kernel.exception.SystemException { + return getPersistence().findByGroupId(groupId); + } + + /** + * Returns a range of all the social activity sets where groupId = ?. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portlet.social.model.impl.SocialActivitySetModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param groupId the group ID + * @param start the lower bound of the range of social activity sets + * @param end the upper bound of the range of social activity sets (not inclusive) + * @return the range of matching social activity sets + * @throws SystemException if a system exception occurred + */ + public static java.util.List findByGroupId( + long groupId, int start, int end) + throws com.liferay.portal.kernel.exception.SystemException { + return getPersistence().findByGroupId(groupId, start, end); + } + + /** + * Returns an ordered range of all the social activity sets where groupId = ?. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portlet.social.model.impl.SocialActivitySetModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param groupId the group ID + * @param start the lower bound of the range of social activity sets + * @param end the upper bound of the range of social activity sets (not inclusive) + * @param orderByComparator the comparator to order the results by (optionally null) + * @return the ordered range of matching social activity sets + * @throws SystemException if a system exception occurred + */ + public static java.util.List findByGroupId( + long groupId, int start, int end, + com.liferay.portal.kernel.util.OrderByComparator orderByComparator) + throws com.liferay.portal.kernel.exception.SystemException { + return getPersistence() + .findByGroupId(groupId, start, end, orderByComparator); + } + + /** + * Returns the first social activity set in the ordered set where groupId = ?. + * + * @param groupId the group ID + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the first matching social activity set + * @throws com.liferay.portlet.social.NoSuchActivitySetException if a matching social activity set could not be found + * @throws SystemException if a system exception occurred + */ + public static com.liferay.portlet.social.model.SocialActivitySet findByGroupId_First( + long groupId, + com.liferay.portal.kernel.util.OrderByComparator orderByComparator) + throws com.liferay.portal.kernel.exception.SystemException, + com.liferay.portlet.social.NoSuchActivitySetException { + return getPersistence().findByGroupId_First(groupId, orderByComparator); + } + + /** + * Returns the first social activity set in the ordered set where groupId = ?. + * + * @param groupId the group ID + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the first matching social activity set, or null if a matching social activity set could not be found + * @throws SystemException if a system exception occurred + */ + public static com.liferay.portlet.social.model.SocialActivitySet fetchByGroupId_First( + long groupId, + com.liferay.portal.kernel.util.OrderByComparator orderByComparator) + throws com.liferay.portal.kernel.exception.SystemException { + return getPersistence().fetchByGroupId_First(groupId, orderByComparator); + } + + /** + * Returns the last social activity set in the ordered set where groupId = ?. + * + * @param groupId the group ID + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the last matching social activity set + * @throws com.liferay.portlet.social.NoSuchActivitySetException if a matching social activity set could not be found + * @throws SystemException if a system exception occurred + */ + public static com.liferay.portlet.social.model.SocialActivitySet findByGroupId_Last( + long groupId, + com.liferay.portal.kernel.util.OrderByComparator orderByComparator) + throws com.liferay.portal.kernel.exception.SystemException, + com.liferay.portlet.social.NoSuchActivitySetException { + return getPersistence().findByGroupId_Last(groupId, orderByComparator); + } + + /** + * Returns the last social activity set in the ordered set where groupId = ?. + * + * @param groupId the group ID + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the last matching social activity set, or null if a matching social activity set could not be found + * @throws SystemException if a system exception occurred + */ + public static com.liferay.portlet.social.model.SocialActivitySet fetchByGroupId_Last( + long groupId, + com.liferay.portal.kernel.util.OrderByComparator orderByComparator) + throws com.liferay.portal.kernel.exception.SystemException { + return getPersistence().fetchByGroupId_Last(groupId, orderByComparator); + } + + /** + * Returns the social activity sets before and after the current social activity set in the ordered set where groupId = ?. + * + * @param activitySetId the primary key of the current social activity set + * @param groupId the group ID + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the previous, current, and next social activity set + * @throws com.liferay.portlet.social.NoSuchActivitySetException if a social activity set with the primary key could not be found + * @throws SystemException if a system exception occurred + */ + public static com.liferay.portlet.social.model.SocialActivitySet[] findByGroupId_PrevAndNext( + long activitySetId, long groupId, + com.liferay.portal.kernel.util.OrderByComparator orderByComparator) + throws com.liferay.portal.kernel.exception.SystemException, + com.liferay.portlet.social.NoSuchActivitySetException { + return getPersistence() + .findByGroupId_PrevAndNext(activitySetId, groupId, + orderByComparator); + } + + /** + * Removes all the social activity sets where groupId = ? from the database. + * + * @param groupId the group ID + * @throws SystemException if a system exception occurred + */ + public static void removeByGroupId(long groupId) + throws com.liferay.portal.kernel.exception.SystemException { + getPersistence().removeByGroupId(groupId); + } + + /** + * Returns the number of social activity sets where groupId = ?. + * + * @param groupId the group ID + * @return the number of matching social activity sets + * @throws SystemException if a system exception occurred + */ + public static int countByGroupId(long groupId) + throws com.liferay.portal.kernel.exception.SystemException { + return getPersistence().countByGroupId(groupId); + } + /** * Returns all the social activity sets where groupId = ? and userId = ? and type = ?. * diff --git a/sql/indexes.properties b/sql/indexes.properties index 921c6d585048f3..4595c96f9212c0 100644 --- a/sql/indexes.properties +++ b/sql/indexes.properties @@ -822,8 +822,13 @@ IX_F1C1A617=SocialActivityLimit.G_U_C_C_A_A IX_6F9EDE9F=SocialActivityLimit.UserId IX_4460FA14=SocialActivitySet.C_C_T +IX_61B53D82=SocialActivitySet.ClassNameId +IX_61B53D82=SocialActivitySet.G_C +IX_49178D18=SocialActivitySet.G_U IX_F71071BD=SocialActivitySet.G_U_T +IX_9E13F2DE=SocialActivitySet.GroupId IX_62AC101A=SocialActivitySet.U_C_C_T +IX_F80C4386=SocialActivitySet.UserId IX_384788CD=SocialActivitySetting.G_A IX_9D22151E=SocialActivitySetting.G_C diff --git a/sql/indexes.sql b/sql/indexes.sql index debad33bda5830..b01bf816e24a5b 100644 --- a/sql/indexes.sql +++ b/sql/indexes.sql @@ -806,8 +806,12 @@ create index IX_B15863FA on SocialActivityLimit (classNameId, classPK); create unique index IX_F1C1A617 on SocialActivityLimit (groupId, userId, classNameId, classPK, activityType, activityCounterName); create index IX_6F9EDE9F on SocialActivityLimit (userId); +create index IX_61B53D82 on SocialActivitySet (classNameId); create index IX_4460FA14 on SocialActivitySet (classNameId, classPK, type_); +create index IX_9E13F2DE on SocialActivitySet (groupId); +create index IX_49178D18 on SocialActivitySet (groupId, userId); create index IX_F71071BD on SocialActivitySet (groupId, userId, type_); +create index IX_F80C4386 on SocialActivitySet (userId); create index IX_62AC101A on SocialActivitySet (userId, classNameId, classPK, type_); create index IX_8BE5F230 on SocialActivitySetting (groupId);