Skip to content

Commit

Permalink
LPS-79634 Update SampleSQLBuilder according to LPS-76191
Browse files Browse the repository at this point in the history
  • Loading branch information
slnn authored and shuyangzhou committed Apr 20, 2018
1 parent f2f5656 commit 4faf0ea
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,8 @@
import com.liferay.portal.kernel.model.RoleModel;
import com.liferay.portal.kernel.model.User;
import com.liferay.portal.kernel.model.UserModel;
import com.liferay.portal.kernel.model.UserNotificationDeliveryConstants;
import com.liferay.portal.kernel.model.UserNotificationDeliveryModel;
import com.liferay.portal.kernel.model.VirtualHostModel;
import com.liferay.portal.kernel.portlet.PortletIdCodec;
import com.liferay.portal.kernel.portlet.PortletPreferencesFactory;
Expand Down Expand Up @@ -190,6 +192,7 @@
import com.liferay.portal.model.impl.ResourcePermissionModelImpl;
import com.liferay.portal.model.impl.RoleModelImpl;
import com.liferay.portal.model.impl.UserModelImpl;
import com.liferay.portal.model.impl.UserNotificationDeliveryModelImpl;
import com.liferay.portal.model.impl.VirtualHostModelImpl;
import com.liferay.portal.util.PropsValues;
import com.liferay.portlet.PortletPreferencesFactoryImpl;
Expand Down Expand Up @@ -2810,6 +2813,24 @@ public List<UserModel> newUserModels() {
return userModels;
}

public UserNotificationDeliveryModel newUserNotificationDeliveryModel(
String portletId) {

UserNotificationDeliveryModel userNotificationDeliveryModel =
new UserNotificationDeliveryModelImpl();

userNotificationDeliveryModel.setUserNotificationDeliveryId(
_counter.get());
userNotificationDeliveryModel.setCompanyId(_companyId);
userNotificationDeliveryModel.setUserId(_sampleUserId);
userNotificationDeliveryModel.setPortletId(portletId);
userNotificationDeliveryModel.setDeliveryType(
UserNotificationDeliveryConstants.TYPE_WEBSITE);
userNotificationDeliveryModel.setDeliver(true);

return userNotificationDeliveryModel;
}

public List<WikiNodeModel> newWikiNodeModels(long groupId) {
List<WikiNodeModel> wikiNodeModels = new ArrayList<>(_maxWikiNodeCount);

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
<#assign blogsEntryModels = dataFactory.newBlogsEntryModels(groupId) />
<#assign
blogsEntryModels = dataFactory.newBlogsEntryModels(groupId)

userNotificationDeliveryModel = dataFactory.newUserNotificationDeliveryModel("com_liferay_comment_web_portlet_CommentPortlet")
/>

${dataFactory.toInsertSQL(userNotificationDeliveryModel)}

<#list blogsEntryModels as blogsEntryModel>
${dataFactory.toInsertSQL(blogsEntryModel)}
Expand Down

0 comments on commit 4faf0ea

Please sign in to comment.