+ * This implementation exists only as a container for the default service methods generated by ServiceBuilder. All custom service methods should be put in {@link ir.ac.iut.sccportal.guestdiscussion.service.impl.PortletTitleServiceImpl}.
+ *
+ *
+ * @author Alireza
+ * @see ir.ac.iut.sccportal.guestdiscussion.service.impl.PortletTitleServiceImpl
+ * @see ir.ac.iut.sccportal.guestdiscussion.service.PortletTitleServiceUtil
+ * @generated
+ */
+public abstract class PortletTitleServiceBaseImpl extends BaseServiceImpl
+ implements PortletTitleService, IdentifiableBean {
+ /*
+ * NOTE FOR DEVELOPERS:
+ *
+ * Never modify or reference this class directly. Always use {@link ir.ac.iut.sccportal.guestdiscussion.service.PortletTitleServiceUtil} to access the portlet title remote service.
+ */
+
+ /**
+ * Returns the comment local service.
+ *
+ * @return the comment local service
+ */
+ public ir.ac.iut.sccportal.guestdiscussion.service.CommentLocalService getCommentLocalService() {
+ return commentLocalService;
+ }
+
+ /**
+ * Sets the comment local service.
+ *
+ * @param commentLocalService the comment local service
+ */
+ public void setCommentLocalService(
+ ir.ac.iut.sccportal.guestdiscussion.service.CommentLocalService commentLocalService) {
+ this.commentLocalService = commentLocalService;
+ }
+
+ /**
+ * Returns the comment remote service.
+ *
+ * @return the comment remote service
+ */
+ public ir.ac.iut.sccportal.guestdiscussion.service.CommentService getCommentService() {
+ return commentService;
+ }
+
+ /**
+ * Sets the comment remote service.
+ *
+ * @param commentService the comment remote service
+ */
+ public void setCommentService(
+ ir.ac.iut.sccportal.guestdiscussion.service.CommentService commentService) {
+ this.commentService = commentService;
+ }
+
+ /**
+ * Returns the comment persistence.
+ *
+ * @return the comment persistence
+ */
+ public CommentPersistence getCommentPersistence() {
+ return commentPersistence;
+ }
+
+ /**
+ * Sets the comment persistence.
+ *
+ * @param commentPersistence the comment persistence
+ */
+ public void setCommentPersistence(CommentPersistence commentPersistence) {
+ this.commentPersistence = commentPersistence;
+ }
+
+ /**
+ * Returns the portlet title local service.
+ *
+ * @return the portlet title local service
+ */
+ public ir.ac.iut.sccportal.guestdiscussion.service.PortletTitleLocalService getPortletTitleLocalService() {
+ return portletTitleLocalService;
+ }
+
+ /**
+ * Sets the portlet title local service.
+ *
+ * @param portletTitleLocalService the portlet title local service
+ */
+ public void setPortletTitleLocalService(
+ ir.ac.iut.sccportal.guestdiscussion.service.PortletTitleLocalService portletTitleLocalService) {
+ this.portletTitleLocalService = portletTitleLocalService;
+ }
+
+ /**
+ * Returns the portlet title remote service.
+ *
+ * @return the portlet title remote service
+ */
+ public ir.ac.iut.sccportal.guestdiscussion.service.PortletTitleService getPortletTitleService() {
+ return portletTitleService;
+ }
+
+ /**
+ * Sets the portlet title remote service.
+ *
+ * @param portletTitleService the portlet title remote service
+ */
+ public void setPortletTitleService(
+ ir.ac.iut.sccportal.guestdiscussion.service.PortletTitleService portletTitleService) {
+ this.portletTitleService = portletTitleService;
+ }
+
+ /**
+ * Returns the portlet title persistence.
+ *
+ * @return the portlet title persistence
+ */
+ public PortletTitlePersistence getPortletTitlePersistence() {
+ return portletTitlePersistence;
+ }
+
+ /**
+ * Sets the portlet title persistence.
+ *
+ * @param portletTitlePersistence the portlet title persistence
+ */
+ public void setPortletTitlePersistence(
+ PortletTitlePersistence portletTitlePersistence) {
+ this.portletTitlePersistence = portletTitlePersistence;
+ }
+
+ /**
+ * Returns the title local service.
+ *
+ * @return the title local service
+ */
+ public ir.ac.iut.sccportal.guestdiscussion.service.TitleLocalService getTitleLocalService() {
+ return titleLocalService;
+ }
+
+ /**
+ * Sets the title local service.
+ *
+ * @param titleLocalService the title local service
+ */
+ public void setTitleLocalService(
+ ir.ac.iut.sccportal.guestdiscussion.service.TitleLocalService titleLocalService) {
+ this.titleLocalService = titleLocalService;
+ }
+
+ /**
+ * Returns the title remote service.
+ *
+ * @return the title remote service
+ */
+ public ir.ac.iut.sccportal.guestdiscussion.service.TitleService getTitleService() {
+ return titleService;
+ }
+
+ /**
+ * Sets the title remote service.
+ *
+ * @param titleService the title remote service
+ */
+ public void setTitleService(
+ ir.ac.iut.sccportal.guestdiscussion.service.TitleService titleService) {
+ this.titleService = titleService;
+ }
+
+ /**
+ * Returns the title persistence.
+ *
+ * @return the title persistence
+ */
+ public TitlePersistence getTitlePersistence() {
+ return titlePersistence;
+ }
+
+ /**
+ * Sets the title persistence.
+ *
+ * @param titlePersistence the title persistence
+ */
+ public void setTitlePersistence(TitlePersistence titlePersistence) {
+ this.titlePersistence = titlePersistence;
+ }
+
+ /**
+ * Returns the counter local service.
+ *
+ * @return the counter local service
+ */
+ public com.liferay.counter.service.CounterLocalService getCounterLocalService() {
+ return counterLocalService;
+ }
+
+ /**
+ * Sets the counter local service.
+ *
+ * @param counterLocalService the counter local service
+ */
+ public void setCounterLocalService(
+ com.liferay.counter.service.CounterLocalService counterLocalService) {
+ this.counterLocalService = counterLocalService;
+ }
+
+ /**
+ * Returns the resource local service.
+ *
+ * @return the resource local service
+ */
+ public com.liferay.portal.service.ResourceLocalService getResourceLocalService() {
+ return resourceLocalService;
+ }
+
+ /**
+ * Sets the resource local service.
+ *
+ * @param resourceLocalService the resource local service
+ */
+ public void setResourceLocalService(
+ com.liferay.portal.service.ResourceLocalService resourceLocalService) {
+ this.resourceLocalService = resourceLocalService;
+ }
+
+ /**
+ * Returns the user local service.
+ *
+ * @return the user local service
+ */
+ public com.liferay.portal.service.UserLocalService getUserLocalService() {
+ return userLocalService;
+ }
+
+ /**
+ * Sets the user local service.
+ *
+ * @param userLocalService the user local service
+ */
+ public void setUserLocalService(
+ com.liferay.portal.service.UserLocalService userLocalService) {
+ this.userLocalService = userLocalService;
+ }
+
+ /**
+ * Returns the user remote service.
+ *
+ * @return the user remote service
+ */
+ public com.liferay.portal.service.UserService getUserService() {
+ return userService;
+ }
+
+ /**
+ * Sets the user remote service.
+ *
+ * @param userService the user remote service
+ */
+ public void setUserService(
+ com.liferay.portal.service.UserService userService) {
+ this.userService = userService;
+ }
+
+ /**
+ * Returns the user persistence.
+ *
+ * @return the user persistence
+ */
+ public UserPersistence getUserPersistence() {
+ return userPersistence;
+ }
+
+ /**
+ * Sets the user persistence.
+ *
+ * @param userPersistence the user persistence
+ */
+ public void setUserPersistence(UserPersistence userPersistence) {
+ this.userPersistence = userPersistence;
+ }
+
+ public void afterPropertiesSet() {
+ Class> clazz = getClass();
+
+ _classLoader = clazz.getClassLoader();
+ }
+
+ public void destroy() {
+ }
+
+ /**
+ * Returns the Spring bean ID for this bean.
+ *
+ * @return the Spring bean ID for this bean
+ */
+ @Override
+ public String getBeanIdentifier() {
+ return _beanIdentifier;
+ }
+
+ /**
+ * Sets the Spring bean ID for this bean.
+ *
+ * @param beanIdentifier the Spring bean ID for this bean
+ */
+ @Override
+ public void setBeanIdentifier(String beanIdentifier) {
+ _beanIdentifier = beanIdentifier;
+ }
+
+ @Override
+ public Object invokeMethod(String name, String[] parameterTypes,
+ Object[] arguments) throws Throwable {
+ Thread currentThread = Thread.currentThread();
+
+ ClassLoader contextClassLoader = currentThread.getContextClassLoader();
+
+ if (contextClassLoader != _classLoader) {
+ currentThread.setContextClassLoader(_classLoader);
+ }
+
+ try {
+ return _clpInvoker.invokeMethod(name, parameterTypes, arguments);
+ }
+ finally {
+ if (contextClassLoader != _classLoader) {
+ currentThread.setContextClassLoader(contextClassLoader);
+ }
+ }
+ }
+
+ protected Class> getModelClass() {
+ return PortletTitle.class;
+ }
+
+ protected String getModelClassName() {
+ return PortletTitle.class.getName();
+ }
+
+ /**
+ * Performs an SQL query.
+ *
+ * @param sql the sql query
+ */
+ protected void runSQL(String sql) throws SystemException {
+ try {
+ DataSource dataSource = portletTitlePersistence.getDataSource();
+
+ SqlUpdate sqlUpdate = SqlUpdateFactoryUtil.getSqlUpdate(dataSource,
+ sql, new int[0]);
+
+ sqlUpdate.update();
+ }
+ catch (Exception e) {
+ throw new SystemException(e);
+ }
+ }
+
+ @BeanReference(type = ir.ac.iut.sccportal.guestdiscussion.service.CommentLocalService.class)
+ protected ir.ac.iut.sccportal.guestdiscussion.service.CommentLocalService commentLocalService;
+ @BeanReference(type = ir.ac.iut.sccportal.guestdiscussion.service.CommentService.class)
+ protected ir.ac.iut.sccportal.guestdiscussion.service.CommentService commentService;
+ @BeanReference(type = CommentPersistence.class)
+ protected CommentPersistence commentPersistence;
+ @BeanReference(type = ir.ac.iut.sccportal.guestdiscussion.service.PortletTitleLocalService.class)
+ protected ir.ac.iut.sccportal.guestdiscussion.service.PortletTitleLocalService portletTitleLocalService;
+ @BeanReference(type = ir.ac.iut.sccportal.guestdiscussion.service.PortletTitleService.class)
+ protected ir.ac.iut.sccportal.guestdiscussion.service.PortletTitleService portletTitleService;
+ @BeanReference(type = PortletTitlePersistence.class)
+ protected PortletTitlePersistence portletTitlePersistence;
+ @BeanReference(type = ir.ac.iut.sccportal.guestdiscussion.service.TitleLocalService.class)
+ protected ir.ac.iut.sccportal.guestdiscussion.service.TitleLocalService titleLocalService;
+ @BeanReference(type = ir.ac.iut.sccportal.guestdiscussion.service.TitleService.class)
+ protected ir.ac.iut.sccportal.guestdiscussion.service.TitleService titleService;
+ @BeanReference(type = TitlePersistence.class)
+ protected TitlePersistence titlePersistence;
+ @BeanReference(type = com.liferay.counter.service.CounterLocalService.class)
+ protected com.liferay.counter.service.CounterLocalService counterLocalService;
+ @BeanReference(type = com.liferay.portal.service.ResourceLocalService.class)
+ protected com.liferay.portal.service.ResourceLocalService resourceLocalService;
+ @BeanReference(type = com.liferay.portal.service.UserLocalService.class)
+ protected com.liferay.portal.service.UserLocalService userLocalService;
+ @BeanReference(type = com.liferay.portal.service.UserService.class)
+ protected com.liferay.portal.service.UserService userService;
+ @BeanReference(type = UserPersistence.class)
+ protected UserPersistence userPersistence;
+ private String _beanIdentifier;
+ private ClassLoader _classLoader;
+ private PortletTitleServiceClpInvoker _clpInvoker = new PortletTitleServiceClpInvoker();
+}
\ No newline at end of file
diff --git a/docroot/WEB-INF/src/ir/ac/iut/sccportal/guestdiscussion/service/base/PortletTitleServiceClpInvoker.java b/docroot/WEB-INF/src/ir/ac/iut/sccportal/guestdiscussion/service/base/PortletTitleServiceClpInvoker.java
new file mode 100644
index 0000000..0aff9ce
--- /dev/null
+++ b/docroot/WEB-INF/src/ir/ac/iut/sccportal/guestdiscussion/service/base/PortletTitleServiceClpInvoker.java
@@ -0,0 +1,57 @@
+/**
+ * Copyright (c) 2000-present 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 ir.ac.iut.sccportal.guestdiscussion.service.base;
+
+import ir.ac.iut.sccportal.guestdiscussion.service.PortletTitleServiceUtil;
+
+import java.util.Arrays;
+
+/**
+ * @author Alireza
+ * @generated
+ */
+public class PortletTitleServiceClpInvoker {
+ public PortletTitleServiceClpInvoker() {
+ _methodName30 = "getBeanIdentifier";
+
+ _methodParameterTypes30 = new String[] { };
+
+ _methodName31 = "setBeanIdentifier";
+
+ _methodParameterTypes31 = new String[] { "java.lang.String" };
+ }
+
+ public Object invokeMethod(String name, String[] parameterTypes,
+ Object[] arguments) throws Throwable {
+ if (_methodName30.equals(name) &&
+ Arrays.deepEquals(_methodParameterTypes30, parameterTypes)) {
+ return PortletTitleServiceUtil.getBeanIdentifier();
+ }
+
+ if (_methodName31.equals(name) &&
+ Arrays.deepEquals(_methodParameterTypes31, parameterTypes)) {
+ PortletTitleServiceUtil.setBeanIdentifier((java.lang.String)arguments[0]);
+
+ return null;
+ }
+
+ throw new UnsupportedOperationException();
+ }
+
+ private String _methodName30;
+ private String[] _methodParameterTypes30;
+ private String _methodName31;
+ private String[] _methodParameterTypes31;
+}
\ No newline at end of file
diff --git a/docroot/WEB-INF/src/ir/ac/iut/sccportal/guestdiscussion/service/base/TitleLocalServiceBaseImpl.java b/docroot/WEB-INF/src/ir/ac/iut/sccportal/guestdiscussion/service/base/TitleLocalServiceBaseImpl.java
new file mode 100644
index 0000000..d3e6cf8
--- /dev/null
+++ b/docroot/WEB-INF/src/ir/ac/iut/sccportal/guestdiscussion/service/base/TitleLocalServiceBaseImpl.java
@@ -0,0 +1,652 @@
+/**
+ * Copyright (c) 2000-present 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 ir.ac.iut.sccportal.guestdiscussion.service.base;
+
+import com.liferay.portal.kernel.bean.BeanReference;
+import com.liferay.portal.kernel.bean.IdentifiableBean;
+import com.liferay.portal.kernel.dao.jdbc.SqlUpdate;
+import com.liferay.portal.kernel.dao.jdbc.SqlUpdateFactoryUtil;
+import com.liferay.portal.kernel.dao.orm.DynamicQuery;
+import com.liferay.portal.kernel.dao.orm.DynamicQueryFactoryUtil;
+import com.liferay.portal.kernel.dao.orm.Projection;
+import com.liferay.portal.kernel.exception.PortalException;
+import com.liferay.portal.kernel.exception.SystemException;
+import com.liferay.portal.kernel.search.Indexable;
+import com.liferay.portal.kernel.search.IndexableType;
+import com.liferay.portal.kernel.util.OrderByComparator;
+import com.liferay.portal.model.PersistedModel;
+import com.liferay.portal.service.BaseLocalServiceImpl;
+import com.liferay.portal.service.PersistedModelLocalServiceRegistryUtil;
+import com.liferay.portal.service.persistence.UserPersistence;
+
+import ir.ac.iut.sccportal.guestdiscussion.model.Title;
+import ir.ac.iut.sccportal.guestdiscussion.service.TitleLocalService;
+import ir.ac.iut.sccportal.guestdiscussion.service.persistence.CommentPersistence;
+import ir.ac.iut.sccportal.guestdiscussion.service.persistence.PortletTitlePersistence;
+import ir.ac.iut.sccportal.guestdiscussion.service.persistence.TitlePersistence;
+
+import java.io.Serializable;
+
+import java.util.List;
+
+import javax.sql.DataSource;
+
+/**
+ * Provides the base implementation for the title local service.
+ *
+ *
+ * This implementation exists only as a container for the default service methods generated by ServiceBuilder. All custom service methods should be put in {@link ir.ac.iut.sccportal.guestdiscussion.service.impl.TitleLocalServiceImpl}.
+ *
+ *
+ * @author Alireza
+ * @see ir.ac.iut.sccportal.guestdiscussion.service.impl.TitleLocalServiceImpl
+ * @see ir.ac.iut.sccportal.guestdiscussion.service.TitleLocalServiceUtil
+ * @generated
+ */
+public abstract class TitleLocalServiceBaseImpl extends BaseLocalServiceImpl
+ implements TitleLocalService, IdentifiableBean {
+ /*
+ * NOTE FOR DEVELOPERS:
+ *
+ * Never modify or reference this class directly. Always use {@link ir.ac.iut.sccportal.guestdiscussion.service.TitleLocalServiceUtil} to access the title local service.
+ */
+
+ /**
+ * Adds the title to the database. Also notifies the appropriate model listeners.
+ *
+ * @param title the title
+ * @return the title that was added
+ * @throws SystemException if a system exception occurred
+ */
+ @Indexable(type = IndexableType.REINDEX)
+ @Override
+ public Title addTitle(Title title) throws SystemException {
+ title.setNew(true);
+
+ return titlePersistence.update(title);
+ }
+
+ /**
+ * Creates a new title with the primary key. Does not add the title to the database.
+ *
+ * @param titleId the primary key for the new title
+ * @return the new title
+ */
+ @Override
+ public Title createTitle(long titleId) {
+ return titlePersistence.create(titleId);
+ }
+
+ /**
+ * Deletes the title with the primary key from the database. Also notifies the appropriate model listeners.
+ *
+ * @param titleId the primary key of the title
+ * @return the title that was removed
+ * @throws PortalException if a title with the primary key could not be found
+ * @throws SystemException if a system exception occurred
+ */
+ @Indexable(type = IndexableType.DELETE)
+ @Override
+ public Title deleteTitle(long titleId)
+ throws PortalException, SystemException {
+ return titlePersistence.remove(titleId);
+ }
+
+ /**
+ * Deletes the title from the database. Also notifies the appropriate model listeners.
+ *
+ * @param title the title
+ * @return the title that was removed
+ * @throws SystemException if a system exception occurred
+ */
+ @Indexable(type = IndexableType.DELETE)
+ @Override
+ public Title deleteTitle(Title title) throws SystemException {
+ return titlePersistence.remove(title);
+ }
+
+ @Override
+ public DynamicQuery dynamicQuery() {
+ Class> clazz = getClass();
+
+ return DynamicQueryFactoryUtil.forClass(Title.class,
+ clazz.getClassLoader());
+ }
+
+ /**
+ * Performs a dynamic query on the database and returns the matching rows.
+ *
+ * @param dynamicQuery the dynamic query
+ * @return the matching rows
+ * @throws SystemException if a system exception occurred
+ */
+ @Override
+ @SuppressWarnings("rawtypes")
+ public List dynamicQuery(DynamicQuery dynamicQuery)
+ throws SystemException {
+ return titlePersistence.findWithDynamicQuery(dynamicQuery);
+ }
+
+ /**
+ * Performs a dynamic query on the database and returns a range of the matching rows.
+ *
+ *
+ * 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 ir.ac.iut.sccportal.guestdiscussion.model.impl.TitleModelImpl}. 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 dynamicQuery the dynamic query
+ * @param start the lower bound of the range of model instances
+ * @param end the upper bound of the range of model instances (not inclusive)
+ * @return the range of matching rows
+ * @throws SystemException if a system exception occurred
+ */
+ @Override
+ @SuppressWarnings("rawtypes")
+ public List dynamicQuery(DynamicQuery dynamicQuery, int start, int end)
+ throws SystemException {
+ return titlePersistence.findWithDynamicQuery(dynamicQuery, start, end);
+ }
+
+ /**
+ * Performs a dynamic query on the database and returns an ordered range of the matching rows.
+ *
+ *
+ * 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 ir.ac.iut.sccportal.guestdiscussion.model.impl.TitleModelImpl}. 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 dynamicQuery the dynamic query
+ * @param start the lower bound of the range of model instances
+ * @param end the upper bound of the range of model instances (not inclusive)
+ * @param orderByComparator the comparator to order the results by (optionally
+ * 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 ir.ac.iut.sccportal.guestdiscussion.model.impl.TitleModelImpl}. 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 start the lower bound of the range of titles
+ * @param end the upper bound of the range of titles (not inclusive)
+ * @return the range of titles
+ * @throws SystemException if a system exception occurred
+ */
+ @Override
+ public List getTitles(int start, int end) throws SystemException {
+ return titlePersistence.findAll(start, end);
+ }
+
+ /**
+ * Returns the number of titles.
+ *
+ * @return the number of titles
+ * @throws SystemException if a system exception occurred
+ */
+ @Override
+ public int getTitlesCount() throws SystemException {
+ return titlePersistence.countAll();
+ }
+
+ /**
+ * Updates the title in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners.
+ *
+ * @param title the title
+ * @return the title that was updated
+ * @throws SystemException if a system exception occurred
+ */
+ @Indexable(type = IndexableType.REINDEX)
+ @Override
+ public Title updateTitle(Title title) throws SystemException {
+ return titlePersistence.update(title);
+ }
+
+ /**
+ * Returns the comment local service.
+ *
+ * @return the comment local service
+ */
+ public ir.ac.iut.sccportal.guestdiscussion.service.CommentLocalService getCommentLocalService() {
+ return commentLocalService;
+ }
+
+ /**
+ * Sets the comment local service.
+ *
+ * @param commentLocalService the comment local service
+ */
+ public void setCommentLocalService(
+ ir.ac.iut.sccportal.guestdiscussion.service.CommentLocalService commentLocalService) {
+ this.commentLocalService = commentLocalService;
+ }
+
+ /**
+ * Returns the comment remote service.
+ *
+ * @return the comment remote service
+ */
+ public ir.ac.iut.sccportal.guestdiscussion.service.CommentService getCommentService() {
+ return commentService;
+ }
+
+ /**
+ * Sets the comment remote service.
+ *
+ * @param commentService the comment remote service
+ */
+ public void setCommentService(
+ ir.ac.iut.sccportal.guestdiscussion.service.CommentService commentService) {
+ this.commentService = commentService;
+ }
+
+ /**
+ * Returns the comment persistence.
+ *
+ * @return the comment persistence
+ */
+ public CommentPersistence getCommentPersistence() {
+ return commentPersistence;
+ }
+
+ /**
+ * Sets the comment persistence.
+ *
+ * @param commentPersistence the comment persistence
+ */
+ public void setCommentPersistence(CommentPersistence commentPersistence) {
+ this.commentPersistence = commentPersistence;
+ }
+
+ /**
+ * Returns the portlet title local service.
+ *
+ * @return the portlet title local service
+ */
+ public ir.ac.iut.sccportal.guestdiscussion.service.PortletTitleLocalService getPortletTitleLocalService() {
+ return portletTitleLocalService;
+ }
+
+ /**
+ * Sets the portlet title local service.
+ *
+ * @param portletTitleLocalService the portlet title local service
+ */
+ public void setPortletTitleLocalService(
+ ir.ac.iut.sccportal.guestdiscussion.service.PortletTitleLocalService portletTitleLocalService) {
+ this.portletTitleLocalService = portletTitleLocalService;
+ }
+
+ /**
+ * Returns the portlet title remote service.
+ *
+ * @return the portlet title remote service
+ */
+ public ir.ac.iut.sccportal.guestdiscussion.service.PortletTitleService getPortletTitleService() {
+ return portletTitleService;
+ }
+
+ /**
+ * Sets the portlet title remote service.
+ *
+ * @param portletTitleService the portlet title remote service
+ */
+ public void setPortletTitleService(
+ ir.ac.iut.sccportal.guestdiscussion.service.PortletTitleService portletTitleService) {
+ this.portletTitleService = portletTitleService;
+ }
+
+ /**
+ * Returns the portlet title persistence.
+ *
+ * @return the portlet title persistence
+ */
+ public PortletTitlePersistence getPortletTitlePersistence() {
+ return portletTitlePersistence;
+ }
+
+ /**
+ * Sets the portlet title persistence.
+ *
+ * @param portletTitlePersistence the portlet title persistence
+ */
+ public void setPortletTitlePersistence(
+ PortletTitlePersistence portletTitlePersistence) {
+ this.portletTitlePersistence = portletTitlePersistence;
+ }
+
+ /**
+ * Returns the title local service.
+ *
+ * @return the title local service
+ */
+ public ir.ac.iut.sccportal.guestdiscussion.service.TitleLocalService getTitleLocalService() {
+ return titleLocalService;
+ }
+
+ /**
+ * Sets the title local service.
+ *
+ * @param titleLocalService the title local service
+ */
+ public void setTitleLocalService(
+ ir.ac.iut.sccportal.guestdiscussion.service.TitleLocalService titleLocalService) {
+ this.titleLocalService = titleLocalService;
+ }
+
+ /**
+ * Returns the title remote service.
+ *
+ * @return the title remote service
+ */
+ public ir.ac.iut.sccportal.guestdiscussion.service.TitleService getTitleService() {
+ return titleService;
+ }
+
+ /**
+ * Sets the title remote service.
+ *
+ * @param titleService the title remote service
+ */
+ public void setTitleService(
+ ir.ac.iut.sccportal.guestdiscussion.service.TitleService titleService) {
+ this.titleService = titleService;
+ }
+
+ /**
+ * Returns the title persistence.
+ *
+ * @return the title persistence
+ */
+ public TitlePersistence getTitlePersistence() {
+ return titlePersistence;
+ }
+
+ /**
+ * Sets the title persistence.
+ *
+ * @param titlePersistence the title persistence
+ */
+ public void setTitlePersistence(TitlePersistence titlePersistence) {
+ this.titlePersistence = titlePersistence;
+ }
+
+ /**
+ * Returns the counter local service.
+ *
+ * @return the counter local service
+ */
+ public com.liferay.counter.service.CounterLocalService getCounterLocalService() {
+ return counterLocalService;
+ }
+
+ /**
+ * Sets the counter local service.
+ *
+ * @param counterLocalService the counter local service
+ */
+ public void setCounterLocalService(
+ com.liferay.counter.service.CounterLocalService counterLocalService) {
+ this.counterLocalService = counterLocalService;
+ }
+
+ /**
+ * Returns the resource local service.
+ *
+ * @return the resource local service
+ */
+ public com.liferay.portal.service.ResourceLocalService getResourceLocalService() {
+ return resourceLocalService;
+ }
+
+ /**
+ * Sets the resource local service.
+ *
+ * @param resourceLocalService the resource local service
+ */
+ public void setResourceLocalService(
+ com.liferay.portal.service.ResourceLocalService resourceLocalService) {
+ this.resourceLocalService = resourceLocalService;
+ }
+
+ /**
+ * Returns the user local service.
+ *
+ * @return the user local service
+ */
+ public com.liferay.portal.service.UserLocalService getUserLocalService() {
+ return userLocalService;
+ }
+
+ /**
+ * Sets the user local service.
+ *
+ * @param userLocalService the user local service
+ */
+ public void setUserLocalService(
+ com.liferay.portal.service.UserLocalService userLocalService) {
+ this.userLocalService = userLocalService;
+ }
+
+ /**
+ * Returns the user remote service.
+ *
+ * @return the user remote service
+ */
+ public com.liferay.portal.service.UserService getUserService() {
+ return userService;
+ }
+
+ /**
+ * Sets the user remote service.
+ *
+ * @param userService the user remote service
+ */
+ public void setUserService(
+ com.liferay.portal.service.UserService userService) {
+ this.userService = userService;
+ }
+
+ /**
+ * Returns the user persistence.
+ *
+ * @return the user persistence
+ */
+ public UserPersistence getUserPersistence() {
+ return userPersistence;
+ }
+
+ /**
+ * Sets the user persistence.
+ *
+ * @param userPersistence the user persistence
+ */
+ public void setUserPersistence(UserPersistence userPersistence) {
+ this.userPersistence = userPersistence;
+ }
+
+ public void afterPropertiesSet() {
+ Class> clazz = getClass();
+
+ _classLoader = clazz.getClassLoader();
+
+ PersistedModelLocalServiceRegistryUtil.register("ir.ac.iut.sccportal.guestdiscussion.model.Title",
+ titleLocalService);
+ }
+
+ public void destroy() {
+ PersistedModelLocalServiceRegistryUtil.unregister(
+ "ir.ac.iut.sccportal.guestdiscussion.model.Title");
+ }
+
+ /**
+ * Returns the Spring bean ID for this bean.
+ *
+ * @return the Spring bean ID for this bean
+ */
+ @Override
+ public String getBeanIdentifier() {
+ return _beanIdentifier;
+ }
+
+ /**
+ * Sets the Spring bean ID for this bean.
+ *
+ * @param beanIdentifier the Spring bean ID for this bean
+ */
+ @Override
+ public void setBeanIdentifier(String beanIdentifier) {
+ _beanIdentifier = beanIdentifier;
+ }
+
+ @Override
+ public Object invokeMethod(String name, String[] parameterTypes,
+ Object[] arguments) throws Throwable {
+ Thread currentThread = Thread.currentThread();
+
+ ClassLoader contextClassLoader = currentThread.getContextClassLoader();
+
+ if (contextClassLoader != _classLoader) {
+ currentThread.setContextClassLoader(_classLoader);
+ }
+
+ try {
+ return _clpInvoker.invokeMethod(name, parameterTypes, arguments);
+ }
+ finally {
+ if (contextClassLoader != _classLoader) {
+ currentThread.setContextClassLoader(contextClassLoader);
+ }
+ }
+ }
+
+ protected Class> getModelClass() {
+ return Title.class;
+ }
+
+ protected String getModelClassName() {
+ return Title.class.getName();
+ }
+
+ /**
+ * Performs an SQL query.
+ *
+ * @param sql the sql query
+ */
+ protected void runSQL(String sql) throws SystemException {
+ try {
+ DataSource dataSource = titlePersistence.getDataSource();
+
+ SqlUpdate sqlUpdate = SqlUpdateFactoryUtil.getSqlUpdate(dataSource,
+ sql, new int[0]);
+
+ sqlUpdate.update();
+ }
+ catch (Exception e) {
+ throw new SystemException(e);
+ }
+ }
+
+ @BeanReference(type = ir.ac.iut.sccportal.guestdiscussion.service.CommentLocalService.class)
+ protected ir.ac.iut.sccportal.guestdiscussion.service.CommentLocalService commentLocalService;
+ @BeanReference(type = ir.ac.iut.sccportal.guestdiscussion.service.CommentService.class)
+ protected ir.ac.iut.sccportal.guestdiscussion.service.CommentService commentService;
+ @BeanReference(type = CommentPersistence.class)
+ protected CommentPersistence commentPersistence;
+ @BeanReference(type = ir.ac.iut.sccportal.guestdiscussion.service.PortletTitleLocalService.class)
+ protected ir.ac.iut.sccportal.guestdiscussion.service.PortletTitleLocalService portletTitleLocalService;
+ @BeanReference(type = ir.ac.iut.sccportal.guestdiscussion.service.PortletTitleService.class)
+ protected ir.ac.iut.sccportal.guestdiscussion.service.PortletTitleService portletTitleService;
+ @BeanReference(type = PortletTitlePersistence.class)
+ protected PortletTitlePersistence portletTitlePersistence;
+ @BeanReference(type = ir.ac.iut.sccportal.guestdiscussion.service.TitleLocalService.class)
+ protected ir.ac.iut.sccportal.guestdiscussion.service.TitleLocalService titleLocalService;
+ @BeanReference(type = ir.ac.iut.sccportal.guestdiscussion.service.TitleService.class)
+ protected ir.ac.iut.sccportal.guestdiscussion.service.TitleService titleService;
+ @BeanReference(type = TitlePersistence.class)
+ protected TitlePersistence titlePersistence;
+ @BeanReference(type = com.liferay.counter.service.CounterLocalService.class)
+ protected com.liferay.counter.service.CounterLocalService counterLocalService;
+ @BeanReference(type = com.liferay.portal.service.ResourceLocalService.class)
+ protected com.liferay.portal.service.ResourceLocalService resourceLocalService;
+ @BeanReference(type = com.liferay.portal.service.UserLocalService.class)
+ protected com.liferay.portal.service.UserLocalService userLocalService;
+ @BeanReference(type = com.liferay.portal.service.UserService.class)
+ protected com.liferay.portal.service.UserService userService;
+ @BeanReference(type = UserPersistence.class)
+ protected UserPersistence userPersistence;
+ private String _beanIdentifier;
+ private ClassLoader _classLoader;
+ private TitleLocalServiceClpInvoker _clpInvoker = new TitleLocalServiceClpInvoker();
+}
\ No newline at end of file
diff --git a/docroot/WEB-INF/src/ir/ac/iut/sccportal/guestdiscussion/service/base/TitleLocalServiceClpInvoker.java b/docroot/WEB-INF/src/ir/ac/iut/sccportal/guestdiscussion/service/base/TitleLocalServiceClpInvoker.java
new file mode 100644
index 0000000..ba6035f
--- /dev/null
+++ b/docroot/WEB-INF/src/ir/ac/iut/sccportal/guestdiscussion/service/base/TitleLocalServiceClpInvoker.java
@@ -0,0 +1,285 @@
+/**
+ * Copyright (c) 2000-present 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 ir.ac.iut.sccportal.guestdiscussion.service.base;
+
+import ir.ac.iut.sccportal.guestdiscussion.service.TitleLocalServiceUtil;
+
+import java.util.Arrays;
+
+/**
+ * @author Alireza
+ * @generated
+ */
+public class TitleLocalServiceClpInvoker {
+ public TitleLocalServiceClpInvoker() {
+ _methodName0 = "addTitle";
+
+ _methodParameterTypes0 = new String[] {
+ "ir.ac.iut.sccportal.guestdiscussion.model.Title"
+ };
+
+ _methodName1 = "createTitle";
+
+ _methodParameterTypes1 = new String[] { "long" };
+
+ _methodName2 = "deleteTitle";
+
+ _methodParameterTypes2 = new String[] { "long" };
+
+ _methodName3 = "deleteTitle";
+
+ _methodParameterTypes3 = new String[] {
+ "ir.ac.iut.sccportal.guestdiscussion.model.Title"
+ };
+
+ _methodName4 = "dynamicQuery";
+
+ _methodParameterTypes4 = new String[] { };
+
+ _methodName5 = "dynamicQuery";
+
+ _methodParameterTypes5 = new String[] {
+ "com.liferay.portal.kernel.dao.orm.DynamicQuery"
+ };
+
+ _methodName6 = "dynamicQuery";
+
+ _methodParameterTypes6 = new String[] {
+ "com.liferay.portal.kernel.dao.orm.DynamicQuery", "int", "int"
+ };
+
+ _methodName7 = "dynamicQuery";
+
+ _methodParameterTypes7 = new String[] {
+ "com.liferay.portal.kernel.dao.orm.DynamicQuery", "int", "int",
+ "com.liferay.portal.kernel.util.OrderByComparator"
+ };
+
+ _methodName8 = "dynamicQueryCount";
+
+ _methodParameterTypes8 = new String[] {
+ "com.liferay.portal.kernel.dao.orm.DynamicQuery"
+ };
+
+ _methodName9 = "dynamicQueryCount";
+
+ _methodParameterTypes9 = new String[] {
+ "com.liferay.portal.kernel.dao.orm.DynamicQuery",
+ "com.liferay.portal.kernel.dao.orm.Projection"
+ };
+
+ _methodName10 = "fetchTitle";
+
+ _methodParameterTypes10 = new String[] { "long" };
+
+ _methodName11 = "getTitle";
+
+ _methodParameterTypes11 = new String[] { "long" };
+
+ _methodName12 = "getPersistedModel";
+
+ _methodParameterTypes12 = new String[] { "java.io.Serializable" };
+
+ _methodName13 = "getTitles";
+
+ _methodParameterTypes13 = new String[] { "int", "int" };
+
+ _methodName14 = "getTitlesCount";
+
+ _methodParameterTypes14 = new String[] { };
+
+ _methodName15 = "updateTitle";
+
+ _methodParameterTypes15 = new String[] {
+ "ir.ac.iut.sccportal.guestdiscussion.model.Title"
+ };
+
+ _methodName46 = "getBeanIdentifier";
+
+ _methodParameterTypes46 = new String[] { };
+
+ _methodName47 = "setBeanIdentifier";
+
+ _methodParameterTypes47 = new String[] { "java.lang.String" };
+
+ _methodName52 = "addTitle";
+
+ _methodParameterTypes52 = new String[] {
+ "long", "long", "long", "java.lang.String", "java.lang.String"
+ };
+
+ _methodName53 = "getTitlesByCompanyId";
+
+ _methodParameterTypes53 = new String[] { "long" };
+ }
+
+ public Object invokeMethod(String name, String[] parameterTypes,
+ Object[] arguments) throws Throwable {
+ if (_methodName0.equals(name) &&
+ Arrays.deepEquals(_methodParameterTypes0, parameterTypes)) {
+ return TitleLocalServiceUtil.addTitle((ir.ac.iut.sccportal.guestdiscussion.model.Title)arguments[0]);
+ }
+
+ if (_methodName1.equals(name) &&
+ Arrays.deepEquals(_methodParameterTypes1, parameterTypes)) {
+ return TitleLocalServiceUtil.createTitle(((Long)arguments[0]).longValue());
+ }
+
+ if (_methodName2.equals(name) &&
+ Arrays.deepEquals(_methodParameterTypes2, parameterTypes)) {
+ return TitleLocalServiceUtil.deleteTitle(((Long)arguments[0]).longValue());
+ }
+
+ if (_methodName3.equals(name) &&
+ Arrays.deepEquals(_methodParameterTypes3, parameterTypes)) {
+ return TitleLocalServiceUtil.deleteTitle((ir.ac.iut.sccportal.guestdiscussion.model.Title)arguments[0]);
+ }
+
+ if (_methodName4.equals(name) &&
+ Arrays.deepEquals(_methodParameterTypes4, parameterTypes)) {
+ return TitleLocalServiceUtil.dynamicQuery();
+ }
+
+ if (_methodName5.equals(name) &&
+ Arrays.deepEquals(_methodParameterTypes5, parameterTypes)) {
+ return TitleLocalServiceUtil.dynamicQuery((com.liferay.portal.kernel.dao.orm.DynamicQuery)arguments[0]);
+ }
+
+ if (_methodName6.equals(name) &&
+ Arrays.deepEquals(_methodParameterTypes6, parameterTypes)) {
+ return TitleLocalServiceUtil.dynamicQuery((com.liferay.portal.kernel.dao.orm.DynamicQuery)arguments[0],
+ ((Integer)arguments[1]).intValue(),
+ ((Integer)arguments[2]).intValue());
+ }
+
+ if (_methodName7.equals(name) &&
+ Arrays.deepEquals(_methodParameterTypes7, parameterTypes)) {
+ return TitleLocalServiceUtil.dynamicQuery((com.liferay.portal.kernel.dao.orm.DynamicQuery)arguments[0],
+ ((Integer)arguments[1]).intValue(),
+ ((Integer)arguments[2]).intValue(),
+ (com.liferay.portal.kernel.util.OrderByComparator)arguments[3]);
+ }
+
+ if (_methodName8.equals(name) &&
+ Arrays.deepEquals(_methodParameterTypes8, parameterTypes)) {
+ return TitleLocalServiceUtil.dynamicQueryCount((com.liferay.portal.kernel.dao.orm.DynamicQuery)arguments[0]);
+ }
+
+ if (_methodName9.equals(name) &&
+ Arrays.deepEquals(_methodParameterTypes9, parameterTypes)) {
+ return TitleLocalServiceUtil.dynamicQueryCount((com.liferay.portal.kernel.dao.orm.DynamicQuery)arguments[0],
+ (com.liferay.portal.kernel.dao.orm.Projection)arguments[1]);
+ }
+
+ if (_methodName10.equals(name) &&
+ Arrays.deepEquals(_methodParameterTypes10, parameterTypes)) {
+ return TitleLocalServiceUtil.fetchTitle(((Long)arguments[0]).longValue());
+ }
+
+ if (_methodName11.equals(name) &&
+ Arrays.deepEquals(_methodParameterTypes11, parameterTypes)) {
+ return TitleLocalServiceUtil.getTitle(((Long)arguments[0]).longValue());
+ }
+
+ if (_methodName12.equals(name) &&
+ Arrays.deepEquals(_methodParameterTypes12, parameterTypes)) {
+ return TitleLocalServiceUtil.getPersistedModel((java.io.Serializable)arguments[0]);
+ }
+
+ if (_methodName13.equals(name) &&
+ Arrays.deepEquals(_methodParameterTypes13, parameterTypes)) {
+ return TitleLocalServiceUtil.getTitles(((Integer)arguments[0]).intValue(),
+ ((Integer)arguments[1]).intValue());
+ }
+
+ if (_methodName14.equals(name) &&
+ Arrays.deepEquals(_methodParameterTypes14, parameterTypes)) {
+ return TitleLocalServiceUtil.getTitlesCount();
+ }
+
+ if (_methodName15.equals(name) &&
+ Arrays.deepEquals(_methodParameterTypes15, parameterTypes)) {
+ return TitleLocalServiceUtil.updateTitle((ir.ac.iut.sccportal.guestdiscussion.model.Title)arguments[0]);
+ }
+
+ if (_methodName46.equals(name) &&
+ Arrays.deepEquals(_methodParameterTypes46, parameterTypes)) {
+ return TitleLocalServiceUtil.getBeanIdentifier();
+ }
+
+ if (_methodName47.equals(name) &&
+ Arrays.deepEquals(_methodParameterTypes47, parameterTypes)) {
+ TitleLocalServiceUtil.setBeanIdentifier((java.lang.String)arguments[0]);
+
+ return null;
+ }
+
+ if (_methodName52.equals(name) &&
+ Arrays.deepEquals(_methodParameterTypes52, parameterTypes)) {
+ return TitleLocalServiceUtil.addTitle(((Long)arguments[0]).longValue(),
+ ((Long)arguments[1]).longValue(),
+ ((Long)arguments[2]).longValue(),
+ (java.lang.String)arguments[3], (java.lang.String)arguments[4]);
+ }
+
+ if (_methodName53.equals(name) &&
+ Arrays.deepEquals(_methodParameterTypes53, parameterTypes)) {
+ return TitleLocalServiceUtil.getTitlesByCompanyId(((Long)arguments[0]).longValue());
+ }
+
+ throw new UnsupportedOperationException();
+ }
+
+ private String _methodName0;
+ private String[] _methodParameterTypes0;
+ private String _methodName1;
+ private String[] _methodParameterTypes1;
+ private String _methodName2;
+ private String[] _methodParameterTypes2;
+ private String _methodName3;
+ private String[] _methodParameterTypes3;
+ private String _methodName4;
+ private String[] _methodParameterTypes4;
+ private String _methodName5;
+ private String[] _methodParameterTypes5;
+ private String _methodName6;
+ private String[] _methodParameterTypes6;
+ private String _methodName7;
+ private String[] _methodParameterTypes7;
+ private String _methodName8;
+ private String[] _methodParameterTypes8;
+ private String _methodName9;
+ private String[] _methodParameterTypes9;
+ private String _methodName10;
+ private String[] _methodParameterTypes10;
+ private String _methodName11;
+ private String[] _methodParameterTypes11;
+ private String _methodName12;
+ private String[] _methodParameterTypes12;
+ private String _methodName13;
+ private String[] _methodParameterTypes13;
+ private String _methodName14;
+ private String[] _methodParameterTypes14;
+ private String _methodName15;
+ private String[] _methodParameterTypes15;
+ private String _methodName46;
+ private String[] _methodParameterTypes46;
+ private String _methodName47;
+ private String[] _methodParameterTypes47;
+ private String _methodName52;
+ private String[] _methodParameterTypes52;
+ private String _methodName53;
+ private String[] _methodParameterTypes53;
+}
\ No newline at end of file
diff --git a/docroot/WEB-INF/src/ir/ac/iut/sccportal/guestdiscussion/service/base/TitleServiceBaseImpl.java b/docroot/WEB-INF/src/ir/ac/iut/sccportal/guestdiscussion/service/base/TitleServiceBaseImpl.java
new file mode 100644
index 0000000..00eb149
--- /dev/null
+++ b/docroot/WEB-INF/src/ir/ac/iut/sccportal/guestdiscussion/service/base/TitleServiceBaseImpl.java
@@ -0,0 +1,424 @@
+/**
+ * Copyright (c) 2000-present 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 ir.ac.iut.sccportal.guestdiscussion.service.base;
+
+import com.liferay.portal.kernel.bean.BeanReference;
+import com.liferay.portal.kernel.bean.IdentifiableBean;
+import com.liferay.portal.kernel.dao.jdbc.SqlUpdate;
+import com.liferay.portal.kernel.dao.jdbc.SqlUpdateFactoryUtil;
+import com.liferay.portal.kernel.exception.SystemException;
+import com.liferay.portal.service.BaseServiceImpl;
+import com.liferay.portal.service.persistence.UserPersistence;
+
+import ir.ac.iut.sccportal.guestdiscussion.model.Title;
+import ir.ac.iut.sccportal.guestdiscussion.service.TitleService;
+import ir.ac.iut.sccportal.guestdiscussion.service.persistence.CommentPersistence;
+import ir.ac.iut.sccportal.guestdiscussion.service.persistence.PortletTitlePersistence;
+import ir.ac.iut.sccportal.guestdiscussion.service.persistence.TitlePersistence;
+
+import javax.sql.DataSource;
+
+/**
+ * Provides the base implementation for the title remote service.
+ *
+ *
+ * This implementation exists only as a container for the default service methods generated by ServiceBuilder. All custom service methods should be put in {@link ir.ac.iut.sccportal.guestdiscussion.service.impl.TitleServiceImpl}.
+ *
+ *
+ * @author Alireza
+ * @see ir.ac.iut.sccportal.guestdiscussion.service.impl.TitleServiceImpl
+ * @see ir.ac.iut.sccportal.guestdiscussion.service.TitleServiceUtil
+ * @generated
+ */
+public abstract class TitleServiceBaseImpl extends BaseServiceImpl
+ implements TitleService, IdentifiableBean {
+ /*
+ * NOTE FOR DEVELOPERS:
+ *
+ * Never modify or reference this class directly. Always use {@link ir.ac.iut.sccportal.guestdiscussion.service.TitleServiceUtil} to access the title remote service.
+ */
+
+ /**
+ * Returns the comment local service.
+ *
+ * @return the comment local service
+ */
+ public ir.ac.iut.sccportal.guestdiscussion.service.CommentLocalService getCommentLocalService() {
+ return commentLocalService;
+ }
+
+ /**
+ * Sets the comment local service.
+ *
+ * @param commentLocalService the comment local service
+ */
+ public void setCommentLocalService(
+ ir.ac.iut.sccportal.guestdiscussion.service.CommentLocalService commentLocalService) {
+ this.commentLocalService = commentLocalService;
+ }
+
+ /**
+ * Returns the comment remote service.
+ *
+ * @return the comment remote service
+ */
+ public ir.ac.iut.sccportal.guestdiscussion.service.CommentService getCommentService() {
+ return commentService;
+ }
+
+ /**
+ * Sets the comment remote service.
+ *
+ * @param commentService the comment remote service
+ */
+ public void setCommentService(
+ ir.ac.iut.sccportal.guestdiscussion.service.CommentService commentService) {
+ this.commentService = commentService;
+ }
+
+ /**
+ * Returns the comment persistence.
+ *
+ * @return the comment persistence
+ */
+ public CommentPersistence getCommentPersistence() {
+ return commentPersistence;
+ }
+
+ /**
+ * Sets the comment persistence.
+ *
+ * @param commentPersistence the comment persistence
+ */
+ public void setCommentPersistence(CommentPersistence commentPersistence) {
+ this.commentPersistence = commentPersistence;
+ }
+
+ /**
+ * Returns the portlet title local service.
+ *
+ * @return the portlet title local service
+ */
+ public ir.ac.iut.sccportal.guestdiscussion.service.PortletTitleLocalService getPortletTitleLocalService() {
+ return portletTitleLocalService;
+ }
+
+ /**
+ * Sets the portlet title local service.
+ *
+ * @param portletTitleLocalService the portlet title local service
+ */
+ public void setPortletTitleLocalService(
+ ir.ac.iut.sccportal.guestdiscussion.service.PortletTitleLocalService portletTitleLocalService) {
+ this.portletTitleLocalService = portletTitleLocalService;
+ }
+
+ /**
+ * Returns the portlet title remote service.
+ *
+ * @return the portlet title remote service
+ */
+ public ir.ac.iut.sccportal.guestdiscussion.service.PortletTitleService getPortletTitleService() {
+ return portletTitleService;
+ }
+
+ /**
+ * Sets the portlet title remote service.
+ *
+ * @param portletTitleService the portlet title remote service
+ */
+ public void setPortletTitleService(
+ ir.ac.iut.sccportal.guestdiscussion.service.PortletTitleService portletTitleService) {
+ this.portletTitleService = portletTitleService;
+ }
+
+ /**
+ * Returns the portlet title persistence.
+ *
+ * @return the portlet title persistence
+ */
+ public PortletTitlePersistence getPortletTitlePersistence() {
+ return portletTitlePersistence;
+ }
+
+ /**
+ * Sets the portlet title persistence.
+ *
+ * @param portletTitlePersistence the portlet title persistence
+ */
+ public void setPortletTitlePersistence(
+ PortletTitlePersistence portletTitlePersistence) {
+ this.portletTitlePersistence = portletTitlePersistence;
+ }
+
+ /**
+ * Returns the title local service.
+ *
+ * @return the title local service
+ */
+ public ir.ac.iut.sccportal.guestdiscussion.service.TitleLocalService getTitleLocalService() {
+ return titleLocalService;
+ }
+
+ /**
+ * Sets the title local service.
+ *
+ * @param titleLocalService the title local service
+ */
+ public void setTitleLocalService(
+ ir.ac.iut.sccportal.guestdiscussion.service.TitleLocalService titleLocalService) {
+ this.titleLocalService = titleLocalService;
+ }
+
+ /**
+ * Returns the title remote service.
+ *
+ * @return the title remote service
+ */
+ public ir.ac.iut.sccportal.guestdiscussion.service.TitleService getTitleService() {
+ return titleService;
+ }
+
+ /**
+ * Sets the title remote service.
+ *
+ * @param titleService the title remote service
+ */
+ public void setTitleService(
+ ir.ac.iut.sccportal.guestdiscussion.service.TitleService titleService) {
+ this.titleService = titleService;
+ }
+
+ /**
+ * Returns the title persistence.
+ *
+ * @return the title persistence
+ */
+ public TitlePersistence getTitlePersistence() {
+ return titlePersistence;
+ }
+
+ /**
+ * Sets the title persistence.
+ *
+ * @param titlePersistence the title persistence
+ */
+ public void setTitlePersistence(TitlePersistence titlePersistence) {
+ this.titlePersistence = titlePersistence;
+ }
+
+ /**
+ * Returns the counter local service.
+ *
+ * @return the counter local service
+ */
+ public com.liferay.counter.service.CounterLocalService getCounterLocalService() {
+ return counterLocalService;
+ }
+
+ /**
+ * Sets the counter local service.
+ *
+ * @param counterLocalService the counter local service
+ */
+ public void setCounterLocalService(
+ com.liferay.counter.service.CounterLocalService counterLocalService) {
+ this.counterLocalService = counterLocalService;
+ }
+
+ /**
+ * Returns the resource local service.
+ *
+ * @return the resource local service
+ */
+ public com.liferay.portal.service.ResourceLocalService getResourceLocalService() {
+ return resourceLocalService;
+ }
+
+ /**
+ * Sets the resource local service.
+ *
+ * @param resourceLocalService the resource local service
+ */
+ public void setResourceLocalService(
+ com.liferay.portal.service.ResourceLocalService resourceLocalService) {
+ this.resourceLocalService = resourceLocalService;
+ }
+
+ /**
+ * Returns the user local service.
+ *
+ * @return the user local service
+ */
+ public com.liferay.portal.service.UserLocalService getUserLocalService() {
+ return userLocalService;
+ }
+
+ /**
+ * Sets the user local service.
+ *
+ * @param userLocalService the user local service
+ */
+ public void setUserLocalService(
+ com.liferay.portal.service.UserLocalService userLocalService) {
+ this.userLocalService = userLocalService;
+ }
+
+ /**
+ * Returns the user remote service.
+ *
+ * @return the user remote service
+ */
+ public com.liferay.portal.service.UserService getUserService() {
+ return userService;
+ }
+
+ /**
+ * Sets the user remote service.
+ *
+ * @param userService the user remote service
+ */
+ public void setUserService(
+ com.liferay.portal.service.UserService userService) {
+ this.userService = userService;
+ }
+
+ /**
+ * Returns the user persistence.
+ *
+ * @return the user persistence
+ */
+ public UserPersistence getUserPersistence() {
+ return userPersistence;
+ }
+
+ /**
+ * Sets the user persistence.
+ *
+ * @param userPersistence the user persistence
+ */
+ public void setUserPersistence(UserPersistence userPersistence) {
+ this.userPersistence = userPersistence;
+ }
+
+ public void afterPropertiesSet() {
+ Class> clazz = getClass();
+
+ _classLoader = clazz.getClassLoader();
+ }
+
+ public void destroy() {
+ }
+
+ /**
+ * Returns the Spring bean ID for this bean.
+ *
+ * @return the Spring bean ID for this bean
+ */
+ @Override
+ public String getBeanIdentifier() {
+ return _beanIdentifier;
+ }
+
+ /**
+ * Sets the Spring bean ID for this bean.
+ *
+ * @param beanIdentifier the Spring bean ID for this bean
+ */
+ @Override
+ public void setBeanIdentifier(String beanIdentifier) {
+ _beanIdentifier = beanIdentifier;
+ }
+
+ @Override
+ public Object invokeMethod(String name, String[] parameterTypes,
+ Object[] arguments) throws Throwable {
+ Thread currentThread = Thread.currentThread();
+
+ ClassLoader contextClassLoader = currentThread.getContextClassLoader();
+
+ if (contextClassLoader != _classLoader) {
+ currentThread.setContextClassLoader(_classLoader);
+ }
+
+ try {
+ return _clpInvoker.invokeMethod(name, parameterTypes, arguments);
+ }
+ finally {
+ if (contextClassLoader != _classLoader) {
+ currentThread.setContextClassLoader(contextClassLoader);
+ }
+ }
+ }
+
+ protected Class> getModelClass() {
+ return Title.class;
+ }
+
+ protected String getModelClassName() {
+ return Title.class.getName();
+ }
+
+ /**
+ * Performs an SQL query.
+ *
+ * @param sql the sql query
+ */
+ protected void runSQL(String sql) throws SystemException {
+ try {
+ DataSource dataSource = titlePersistence.getDataSource();
+
+ SqlUpdate sqlUpdate = SqlUpdateFactoryUtil.getSqlUpdate(dataSource,
+ sql, new int[0]);
+
+ sqlUpdate.update();
+ }
+ catch (Exception e) {
+ throw new SystemException(e);
+ }
+ }
+
+ @BeanReference(type = ir.ac.iut.sccportal.guestdiscussion.service.CommentLocalService.class)
+ protected ir.ac.iut.sccportal.guestdiscussion.service.CommentLocalService commentLocalService;
+ @BeanReference(type = ir.ac.iut.sccportal.guestdiscussion.service.CommentService.class)
+ protected ir.ac.iut.sccportal.guestdiscussion.service.CommentService commentService;
+ @BeanReference(type = CommentPersistence.class)
+ protected CommentPersistence commentPersistence;
+ @BeanReference(type = ir.ac.iut.sccportal.guestdiscussion.service.PortletTitleLocalService.class)
+ protected ir.ac.iut.sccportal.guestdiscussion.service.PortletTitleLocalService portletTitleLocalService;
+ @BeanReference(type = ir.ac.iut.sccportal.guestdiscussion.service.PortletTitleService.class)
+ protected ir.ac.iut.sccportal.guestdiscussion.service.PortletTitleService portletTitleService;
+ @BeanReference(type = PortletTitlePersistence.class)
+ protected PortletTitlePersistence portletTitlePersistence;
+ @BeanReference(type = ir.ac.iut.sccportal.guestdiscussion.service.TitleLocalService.class)
+ protected ir.ac.iut.sccportal.guestdiscussion.service.TitleLocalService titleLocalService;
+ @BeanReference(type = ir.ac.iut.sccportal.guestdiscussion.service.TitleService.class)
+ protected ir.ac.iut.sccportal.guestdiscussion.service.TitleService titleService;
+ @BeanReference(type = TitlePersistence.class)
+ protected TitlePersistence titlePersistence;
+ @BeanReference(type = com.liferay.counter.service.CounterLocalService.class)
+ protected com.liferay.counter.service.CounterLocalService counterLocalService;
+ @BeanReference(type = com.liferay.portal.service.ResourceLocalService.class)
+ protected com.liferay.portal.service.ResourceLocalService resourceLocalService;
+ @BeanReference(type = com.liferay.portal.service.UserLocalService.class)
+ protected com.liferay.portal.service.UserLocalService userLocalService;
+ @BeanReference(type = com.liferay.portal.service.UserService.class)
+ protected com.liferay.portal.service.UserService userService;
+ @BeanReference(type = UserPersistence.class)
+ protected UserPersistence userPersistence;
+ private String _beanIdentifier;
+ private ClassLoader _classLoader;
+ private TitleServiceClpInvoker _clpInvoker = new TitleServiceClpInvoker();
+}
\ No newline at end of file
diff --git a/docroot/WEB-INF/src/ir/ac/iut/sccportal/guestdiscussion/service/base/TitleServiceClpInvoker.java b/docroot/WEB-INF/src/ir/ac/iut/sccportal/guestdiscussion/service/base/TitleServiceClpInvoker.java
new file mode 100644
index 0000000..675b283
--- /dev/null
+++ b/docroot/WEB-INF/src/ir/ac/iut/sccportal/guestdiscussion/service/base/TitleServiceClpInvoker.java
@@ -0,0 +1,57 @@
+/**
+ * Copyright (c) 2000-present 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 ir.ac.iut.sccportal.guestdiscussion.service.base;
+
+import ir.ac.iut.sccportal.guestdiscussion.service.TitleServiceUtil;
+
+import java.util.Arrays;
+
+/**
+ * @author Alireza
+ * @generated
+ */
+public class TitleServiceClpInvoker {
+ public TitleServiceClpInvoker() {
+ _methodName30 = "getBeanIdentifier";
+
+ _methodParameterTypes30 = new String[] { };
+
+ _methodName31 = "setBeanIdentifier";
+
+ _methodParameterTypes31 = new String[] { "java.lang.String" };
+ }
+
+ public Object invokeMethod(String name, String[] parameterTypes,
+ Object[] arguments) throws Throwable {
+ if (_methodName30.equals(name) &&
+ Arrays.deepEquals(_methodParameterTypes30, parameterTypes)) {
+ return TitleServiceUtil.getBeanIdentifier();
+ }
+
+ if (_methodName31.equals(name) &&
+ Arrays.deepEquals(_methodParameterTypes31, parameterTypes)) {
+ TitleServiceUtil.setBeanIdentifier((java.lang.String)arguments[0]);
+
+ return null;
+ }
+
+ throw new UnsupportedOperationException();
+ }
+
+ private String _methodName30;
+ private String[] _methodParameterTypes30;
+ private String _methodName31;
+ private String[] _methodParameterTypes31;
+}
\ No newline at end of file
diff --git a/docroot/WEB-INF/src/ir/ac/iut/sccportal/guestdiscussion/service/http/CommentServiceSoap.java b/docroot/WEB-INF/src/ir/ac/iut/sccportal/guestdiscussion/service/http/CommentServiceSoap.java
new file mode 100644
index 0000000..0487ebb
--- /dev/null
+++ b/docroot/WEB-INF/src/ir/ac/iut/sccportal/guestdiscussion/service/http/CommentServiceSoap.java
@@ -0,0 +1,58 @@
+/**
+ * Copyright (c) 2000-present 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 ir.ac.iut.sccportal.guestdiscussion.service.http;
+
+/**
+ * Provides the SOAP utility for the
+ * {@link ir.ac.iut.sccportal.guestdiscussion.service.CommentServiceUtil} service utility. The
+ * static methods of this class calls the same methods of the service utility.
+ * However, the signatures are different because it is difficult for SOAP to
+ * support certain types.
+ *
+ *
+ * ServiceBuilder follows certain rules in translating the methods. For example,
+ * if the method in the service utility returns a {@link java.util.List}, that
+ * is translated to an array of {@link ir.ac.iut.sccportal.guestdiscussion.model.CommentSoap}.
+ * If the method in the service utility returns a
+ * {@link ir.ac.iut.sccportal.guestdiscussion.model.Comment}, that is translated to a
+ * {@link ir.ac.iut.sccportal.guestdiscussion.model.CommentSoap}. Methods that SOAP cannot
+ * safely wire are skipped.
+ *
+ *
+ *
+ * The benefits of using the SOAP utility is that it is cross platform
+ * compatible. SOAP allows different languages like Java, .NET, C++, PHP, and
+ * even Perl, to call the generated services. One drawback of SOAP is that it is
+ * slow because it needs to serialize all calls into a text format (XML).
+ *
+ *
+ *
+ * You can see a list of services at http://localhost:8080/api/axis. Set the
+ * property axis.servlet.hosts.allowed in portal.properties to configure
+ * security.
+ *
+ *
+ *
+ * The SOAP utility is only generated for remote services.
+ *
+ *
+ * @author Alireza
+ * @see CommentServiceHttp
+ * @see ir.ac.iut.sccportal.guestdiscussion.model.CommentSoap
+ * @see ir.ac.iut.sccportal.guestdiscussion.service.CommentServiceUtil
+ * @generated
+ */
+public class CommentServiceSoap {
+}
\ No newline at end of file
diff --git a/docroot/WEB-INF/src/ir/ac/iut/sccportal/guestdiscussion/service/http/PortletTitleServiceSoap.java b/docroot/WEB-INF/src/ir/ac/iut/sccportal/guestdiscussion/service/http/PortletTitleServiceSoap.java
new file mode 100644
index 0000000..1b7bfd1
--- /dev/null
+++ b/docroot/WEB-INF/src/ir/ac/iut/sccportal/guestdiscussion/service/http/PortletTitleServiceSoap.java
@@ -0,0 +1,58 @@
+/**
+ * Copyright (c) 2000-present 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 ir.ac.iut.sccportal.guestdiscussion.service.http;
+
+/**
+ * Provides the SOAP utility for the
+ * {@link ir.ac.iut.sccportal.guestdiscussion.service.PortletTitleServiceUtil} service utility. The
+ * static methods of this class calls the same methods of the service utility.
+ * However, the signatures are different because it is difficult for SOAP to
+ * support certain types.
+ *
+ *
+ * ServiceBuilder follows certain rules in translating the methods. For example,
+ * if the method in the service utility returns a {@link java.util.List}, that
+ * is translated to an array of {@link ir.ac.iut.sccportal.guestdiscussion.model.PortletTitleSoap}.
+ * If the method in the service utility returns a
+ * {@link ir.ac.iut.sccportal.guestdiscussion.model.PortletTitle}, that is translated to a
+ * {@link ir.ac.iut.sccportal.guestdiscussion.model.PortletTitleSoap}. Methods that SOAP cannot
+ * safely wire are skipped.
+ *
+ *
+ *
+ * The benefits of using the SOAP utility is that it is cross platform
+ * compatible. SOAP allows different languages like Java, .NET, C++, PHP, and
+ * even Perl, to call the generated services. One drawback of SOAP is that it is
+ * slow because it needs to serialize all calls into a text format (XML).
+ *
+ *
+ *
+ * You can see a list of services at http://localhost:8080/api/axis. Set the
+ * property axis.servlet.hosts.allowed in portal.properties to configure
+ * security.
+ *
+ *
+ *
+ * The SOAP utility is only generated for remote services.
+ *
+ *
+ * @author Alireza
+ * @see PortletTitleServiceHttp
+ * @see ir.ac.iut.sccportal.guestdiscussion.model.PortletTitleSoap
+ * @see ir.ac.iut.sccportal.guestdiscussion.service.PortletTitleServiceUtil
+ * @generated
+ */
+public class PortletTitleServiceSoap {
+}
\ No newline at end of file
diff --git a/docroot/WEB-INF/src/ir/ac/iut/sccportal/guestdiscussion/service/http/TitleServiceSoap.java b/docroot/WEB-INF/src/ir/ac/iut/sccportal/guestdiscussion/service/http/TitleServiceSoap.java
new file mode 100644
index 0000000..632f593
--- /dev/null
+++ b/docroot/WEB-INF/src/ir/ac/iut/sccportal/guestdiscussion/service/http/TitleServiceSoap.java
@@ -0,0 +1,58 @@
+/**
+ * Copyright (c) 2000-present 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 ir.ac.iut.sccportal.guestdiscussion.service.http;
+
+/**
+ * Provides the SOAP utility for the
+ * {@link ir.ac.iut.sccportal.guestdiscussion.service.TitleServiceUtil} service utility. The
+ * static methods of this class calls the same methods of the service utility.
+ * However, the signatures are different because it is difficult for SOAP to
+ * support certain types.
+ *
+ *
+ * ServiceBuilder follows certain rules in translating the methods. For example,
+ * if the method in the service utility returns a {@link java.util.List}, that
+ * is translated to an array of {@link ir.ac.iut.sccportal.guestdiscussion.model.TitleSoap}.
+ * If the method in the service utility returns a
+ * {@link ir.ac.iut.sccportal.guestdiscussion.model.Title}, that is translated to a
+ * {@link ir.ac.iut.sccportal.guestdiscussion.model.TitleSoap}. Methods that SOAP cannot
+ * safely wire are skipped.
+ *
+ *
+ *
+ * The benefits of using the SOAP utility is that it is cross platform
+ * compatible. SOAP allows different languages like Java, .NET, C++, PHP, and
+ * even Perl, to call the generated services. One drawback of SOAP is that it is
+ * slow because it needs to serialize all calls into a text format (XML).
+ *
+ *
+ *
+ * You can see a list of services at http://localhost:8080/api/axis. Set the
+ * property axis.servlet.hosts.allowed in portal.properties to configure
+ * security.
+ *
+ *
+ *
+ * The SOAP utility is only generated for remote services.
+ *
+ *
+ * @author Alireza
+ * @see TitleServiceHttp
+ * @see ir.ac.iut.sccportal.guestdiscussion.model.TitleSoap
+ * @see ir.ac.iut.sccportal.guestdiscussion.service.TitleServiceUtil
+ * @generated
+ */
+public class TitleServiceSoap {
+}
\ No newline at end of file
diff --git a/docroot/WEB-INF/src/ir/ac/iut/sccportal/guestdiscussion/service/impl/CommentLocalServiceImpl.java b/docroot/WEB-INF/src/ir/ac/iut/sccportal/guestdiscussion/service/impl/CommentLocalServiceImpl.java
new file mode 100644
index 0000000..56d1dd7
--- /dev/null
+++ b/docroot/WEB-INF/src/ir/ac/iut/sccportal/guestdiscussion/service/impl/CommentLocalServiceImpl.java
@@ -0,0 +1,94 @@
+/**
+ * Copyright (c) 2000-present 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 ir.ac.iut.sccportal.guestdiscussion.service.impl;
+
+import java.util.Date;
+import java.util.List;
+
+import com.liferay.portal.kernel.exception.SystemException;
+
+import ir.ac.iut.sccportal.guestdiscussion.model.Comment;
+import ir.ac.iut.sccportal.guestdiscussion.service.base.CommentLocalServiceBaseImpl;
+
+/**
+ * The implementation of the comment local service.
+ *
+ *
+ * All custom service methods should be put in this class. Whenever methods are
+ * added, rerun ServiceBuilder to copy their definitions into the
+ * {@link ir.ac.iut.sccportal.guestdiscussion.service.CommentLocalService}
+ * interface.
+ *
+ *
+ * This is a local service. Methods of this service will not have security
+ * checks based on the propagated JAAS credentials because this service can only
+ * be accessed from within the same VM.
+ *
+ *
+ * @author Alireza
+ * @see ir.ac.iut.sccportal.guestdiscussion.service.base.CommentLocalServiceBaseImpl
+ * @see ir.ac.iut.sccportal.guestdiscussion.service.CommentLocalServiceUtil
+ */
+public class CommentLocalServiceImpl extends CommentLocalServiceBaseImpl {
+ /*
+ * NOTE FOR DEVELOPERS:
+ *
+ * Never reference this interface directly. Always use {@link
+ * ir.ac.iut.sccportal.guestdiscussion.service.CommentLocalServiceUtil} to
+ * access the comment local service.
+ */
+
+ public Comment addComment(long groupId, long companyId, Date modifiedDate,
+ long parentId, String commentText, String guestName,
+ long likeCount, long titleId, boolean verified, boolean hasChild, String parentName, String guestEmailAddress, boolean guestEmailNotification)
+ throws SystemException {
+
+ Comment comment = commentPersistence.create(0);
+
+ comment.setGroupId(groupId);
+ comment.setCompanyId(companyId);
+ comment.setModifiedDate(modifiedDate);
+ comment.setParentId(parentId);
+ comment.setCommentText(commentText);
+ comment.setGuestName(guestName);
+ comment.setLikeCount(likeCount);
+ comment.setTitleId(titleId);
+ comment.setVerified(verified);
+ comment.setHasAnswer(hasChild);
+ comment.setParentName(parentName);
+ comment.setGuestEmailAddress(guestEmailAddress);
+ comment.setGuestEmailNotification(guestEmailNotification);
+
+ return super.addComment(comment);
+
+ }
+
+ public List getCommentsByParentId_TitleId_Verified (long parentId, long titleId, boolean verified) throws SystemException {
+ return commentPersistence.findByParentId_TitleId_Verified(parentId, titleId, verified);
+ }
+
+ public List getCommentsByTitleId_Verified (long titleId, boolean verified) throws SystemException {
+ return commentPersistence.findByTitleId_Virified(titleId, verified);
+ }
+
+ public List getCommentsByTitleId (long titleId) throws SystemException {
+ return commentPersistence.findByTitleId(titleId);
+ }
+
+ public void deleteCommentsByTitleId (long titleId) throws SystemException {
+ commentPersistence.removeByTitleId(titleId);
+ }
+
+}
\ No newline at end of file
diff --git a/docroot/WEB-INF/src/ir/ac/iut/sccportal/guestdiscussion/service/impl/CommentServiceImpl.java b/docroot/WEB-INF/src/ir/ac/iut/sccportal/guestdiscussion/service/impl/CommentServiceImpl.java
new file mode 100644
index 0000000..feb779f
--- /dev/null
+++ b/docroot/WEB-INF/src/ir/ac/iut/sccportal/guestdiscussion/service/impl/CommentServiceImpl.java
@@ -0,0 +1,39 @@
+/**
+ * Copyright (c) 2000-present 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 ir.ac.iut.sccportal.guestdiscussion.service.impl;
+
+import ir.ac.iut.sccportal.guestdiscussion.service.base.CommentServiceBaseImpl;
+
+/**
+ * The implementation of the comment remote service.
+ *
+ *
+ * All custom service methods should be put in this class. Whenever methods are added, rerun ServiceBuilder to copy their definitions into the {@link ir.ac.iut.sccportal.guestdiscussion.service.CommentService} interface.
+ *
+ *
+ * This is a remote service. Methods of this service are expected to have security checks based on the propagated JAAS credentials because this service can be accessed remotely.
+ *
+ *
+ * @author Alireza
+ * @see ir.ac.iut.sccportal.guestdiscussion.service.base.CommentServiceBaseImpl
+ * @see ir.ac.iut.sccportal.guestdiscussion.service.CommentServiceUtil
+ */
+public class CommentServiceImpl extends CommentServiceBaseImpl {
+ /*
+ * NOTE FOR DEVELOPERS:
+ *
+ * Never reference this interface directly. Always use {@link ir.ac.iut.sccportal.guestdiscussion.service.CommentServiceUtil} to access the comment remote service.
+ */
+}
\ No newline at end of file
diff --git a/docroot/WEB-INF/src/ir/ac/iut/sccportal/guestdiscussion/service/impl/PortletTitleLocalServiceImpl.java b/docroot/WEB-INF/src/ir/ac/iut/sccportal/guestdiscussion/service/impl/PortletTitleLocalServiceImpl.java
new file mode 100644
index 0000000..c1fb42b
--- /dev/null
+++ b/docroot/WEB-INF/src/ir/ac/iut/sccportal/guestdiscussion/service/impl/PortletTitleLocalServiceImpl.java
@@ -0,0 +1,46 @@
+/**
+ * Copyright (c) 2000-present 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 ir.ac.iut.sccportal.guestdiscussion.service.impl;
+
+import com.liferay.portal.kernel.exception.SystemException;
+
+import ir.ac.iut.sccportal.guestdiscussion.service.base.PortletTitleLocalServiceBaseImpl;
+
+/**
+ * The implementation of the portlet title local service.
+ *
+ *
+ * All custom service methods should be put in this class. Whenever methods are added, rerun ServiceBuilder to copy their definitions into the {@link ir.ac.iut.sccportal.guestdiscussion.service.PortletTitleLocalService} interface.
+ *
+ *
+ * This is a local service. Methods of this service will not have security checks based on the propagated JAAS credentials because this service can only be accessed from within the same VM.
+ *
+ *
+ * @author Alireza
+ * @see ir.ac.iut.sccportal.guestdiscussion.service.base.PortletTitleLocalServiceBaseImpl
+ * @see ir.ac.iut.sccportal.guestdiscussion.service.PortletTitleLocalServiceUtil
+ */
+public class PortletTitleLocalServiceImpl
+ extends PortletTitleLocalServiceBaseImpl {
+ /*
+ * NOTE FOR DEVELOPERS:
+ *
+ * Never reference this interface directly. Always use {@link ir.ac.iut.sccportal.guestdiscussion.service.PortletTitleLocalServiceUtil} to access the portlet title local service.
+ */
+
+ public void deletePortletTitleByTitleId (long titleId) throws SystemException {
+ portletTitlePersistence.removeByTitleId(titleId);
+ }
+}
\ No newline at end of file
diff --git a/docroot/WEB-INF/src/ir/ac/iut/sccportal/guestdiscussion/service/impl/PortletTitleServiceImpl.java b/docroot/WEB-INF/src/ir/ac/iut/sccportal/guestdiscussion/service/impl/PortletTitleServiceImpl.java
new file mode 100644
index 0000000..ae493bb
--- /dev/null
+++ b/docroot/WEB-INF/src/ir/ac/iut/sccportal/guestdiscussion/service/impl/PortletTitleServiceImpl.java
@@ -0,0 +1,39 @@
+/**
+ * Copyright (c) 2000-present 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 ir.ac.iut.sccportal.guestdiscussion.service.impl;
+
+import ir.ac.iut.sccportal.guestdiscussion.service.base.PortletTitleServiceBaseImpl;
+
+/**
+ * The implementation of the portlet title remote service.
+ *
+ *
+ * All custom service methods should be put in this class. Whenever methods are added, rerun ServiceBuilder to copy their definitions into the {@link ir.ac.iut.sccportal.guestdiscussion.service.PortletTitleService} interface.
+ *
+ *
+ * This is a remote service. Methods of this service are expected to have security checks based on the propagated JAAS credentials because this service can be accessed remotely.
+ *
+ *
+ * @author Alireza
+ * @see ir.ac.iut.sccportal.guestdiscussion.service.base.PortletTitleServiceBaseImpl
+ * @see ir.ac.iut.sccportal.guestdiscussion.service.PortletTitleServiceUtil
+ */
+public class PortletTitleServiceImpl extends PortletTitleServiceBaseImpl {
+ /*
+ * NOTE FOR DEVELOPERS:
+ *
+ * Never reference this interface directly. Always use {@link ir.ac.iut.sccportal.guestdiscussion.service.PortletTitleServiceUtil} to access the portlet title remote service.
+ */
+}
\ No newline at end of file
diff --git a/docroot/WEB-INF/src/ir/ac/iut/sccportal/guestdiscussion/service/impl/TitleLocalServiceImpl.java b/docroot/WEB-INF/src/ir/ac/iut/sccportal/guestdiscussion/service/impl/TitleLocalServiceImpl.java
new file mode 100644
index 0000000..2497ea7
--- /dev/null
+++ b/docroot/WEB-INF/src/ir/ac/iut/sccportal/guestdiscussion/service/impl/TitleLocalServiceImpl.java
@@ -0,0 +1,66 @@
+/**
+ * Copyright (c) 2000-present 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 ir.ac.iut.sccportal.guestdiscussion.service.impl;
+
+import java.util.Date;
+import java.util.List;
+
+import com.liferay.portal.NoSuchUserException;
+import com.liferay.portal.kernel.exception.SystemException;
+
+import ir.ac.iut.sccportal.guestdiscussion.model.Title;
+import ir.ac.iut.sccportal.guestdiscussion.service.base.TitleLocalServiceBaseImpl;
+
+/**
+ * The implementation of the title local service.
+ *
+ *
+ * All custom service methods should be put in this class. Whenever methods are added, rerun ServiceBuilder to copy their definitions into the {@link ir.ac.iut.sccportal.guestdiscussion.service.TitleLocalService} interface.
+ *
+ *
+ * This is a local service. Methods of this service will not have security checks based on the propagated JAAS credentials because this service can only be accessed from within the same VM.
+ *
+ *
+ * @author Alireza
+ * @see ir.ac.iut.sccportal.guestdiscussion.service.base.TitleLocalServiceBaseImpl
+ * @see ir.ac.iut.sccportal.guestdiscussion.service.TitleLocalServiceUtil
+ */
+public class TitleLocalServiceImpl extends TitleLocalServiceBaseImpl {
+ /*
+ * NOTE FOR DEVELOPERS:
+ *
+ * Never reference this interface directly. Always use {@link ir.ac.iut.sccportal.guestdiscussion.service.TitleLocalServiceUtil} to access the title local service.
+ */
+
+ public Title addTitle(long groupId, long companyId, long userId, String userName, String titleText) throws SystemException, NoSuchUserException
+ {
+ Title title=titlePersistence.create(0);
+ title.setGroupId(groupId);
+ title.setCompanyId(companyId);
+ title.setUserId(userId);
+ title.setUserName(userName);
+ title.setCreateDate(new Date());
+ title.setTitleText(titleText);
+
+ return super.addTitle(title);
+
+ }
+
+ public List getTitlesByCompanyId (long companyId) throws SystemException {
+ return titlePersistence.findByCompanyId(companyId);
+ }
+
+
+}
\ No newline at end of file
diff --git a/docroot/WEB-INF/src/ir/ac/iut/sccportal/guestdiscussion/service/impl/TitleServiceImpl.java b/docroot/WEB-INF/src/ir/ac/iut/sccportal/guestdiscussion/service/impl/TitleServiceImpl.java
new file mode 100644
index 0000000..d1c640a
--- /dev/null
+++ b/docroot/WEB-INF/src/ir/ac/iut/sccportal/guestdiscussion/service/impl/TitleServiceImpl.java
@@ -0,0 +1,39 @@
+/**
+ * Copyright (c) 2000-present 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 ir.ac.iut.sccportal.guestdiscussion.service.impl;
+
+import ir.ac.iut.sccportal.guestdiscussion.service.base.TitleServiceBaseImpl;
+
+/**
+ * The implementation of the title remote service.
+ *
+ *
+ * All custom service methods should be put in this class. Whenever methods are added, rerun ServiceBuilder to copy their definitions into the {@link ir.ac.iut.sccportal.guestdiscussion.service.TitleService} interface.
+ *
+ *
+ * This is a remote service. Methods of this service are expected to have security checks based on the propagated JAAS credentials because this service can be accessed remotely.
+ *
+ *
+ * @author Alireza
+ * @see ir.ac.iut.sccportal.guestdiscussion.service.base.TitleServiceBaseImpl
+ * @see ir.ac.iut.sccportal.guestdiscussion.service.TitleServiceUtil
+ */
+public class TitleServiceImpl extends TitleServiceBaseImpl {
+ /*
+ * NOTE FOR DEVELOPERS:
+ *
+ * Never reference this interface directly. Always use {@link ir.ac.iut.sccportal.guestdiscussion.service.TitleServiceUtil} to access the title remote service.
+ */
+}
\ No newline at end of file
diff --git a/docroot/WEB-INF/src/ir/ac/iut/sccportal/guestdiscussion/service/persistence/CommentPersistenceImpl.java b/docroot/WEB-INF/src/ir/ac/iut/sccportal/guestdiscussion/service/persistence/CommentPersistenceImpl.java
new file mode 100644
index 0000000..d88dc95
--- /dev/null
+++ b/docroot/WEB-INF/src/ir/ac/iut/sccportal/guestdiscussion/service/persistence/CommentPersistenceImpl.java
@@ -0,0 +1,2341 @@
+/**
+ * Copyright (c) 2000-present 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 ir.ac.iut.sccportal.guestdiscussion.service.persistence;
+
+import com.liferay.portal.kernel.cache.CacheRegistryUtil;
+import com.liferay.portal.kernel.dao.orm.EntityCacheUtil;
+import com.liferay.portal.kernel.dao.orm.FinderCacheUtil;
+import com.liferay.portal.kernel.dao.orm.FinderPath;
+import com.liferay.portal.kernel.dao.orm.Query;
+import com.liferay.portal.kernel.dao.orm.QueryPos;
+import com.liferay.portal.kernel.dao.orm.QueryUtil;
+import com.liferay.portal.kernel.dao.orm.Session;
+import com.liferay.portal.kernel.exception.SystemException;
+import com.liferay.portal.kernel.log.Log;
+import com.liferay.portal.kernel.log.LogFactoryUtil;
+import com.liferay.portal.kernel.util.GetterUtil;
+import com.liferay.portal.kernel.util.InstanceFactory;
+import com.liferay.portal.kernel.util.OrderByComparator;
+import com.liferay.portal.kernel.util.PropsKeys;
+import com.liferay.portal.kernel.util.PropsUtil;
+import com.liferay.portal.kernel.util.StringBundler;
+import com.liferay.portal.kernel.util.StringPool;
+import com.liferay.portal.kernel.util.StringUtil;
+import com.liferay.portal.kernel.util.UnmodifiableList;
+import com.liferay.portal.model.CacheModel;
+import com.liferay.portal.model.ModelListener;
+import com.liferay.portal.service.persistence.impl.BasePersistenceImpl;
+
+import ir.ac.iut.sccportal.guestdiscussion.NoSuchCommentException;
+import ir.ac.iut.sccportal.guestdiscussion.model.Comment;
+import ir.ac.iut.sccportal.guestdiscussion.model.impl.CommentImpl;
+import ir.ac.iut.sccportal.guestdiscussion.model.impl.CommentModelImpl;
+
+import java.io.Serializable;
+
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.List;
+
+/**
+ * The persistence implementation for the comment service.
+ *
+ *
+ * Caching information and settings can be found in portal.properties
+ *
+ *
+ * @author Alireza
+ * @see CommentPersistence
+ * @see CommentUtil
+ * @generated
+ */
+public class CommentPersistenceImpl extends BasePersistenceImpl
+ implements CommentPersistence {
+ /*
+ * NOTE FOR DEVELOPERS:
+ *
+ * Never modify or reference this class directly. Always use {@link CommentUtil} to access the comment persistence. Modify service.xml
and rerun ServiceBuilder to regenerate this class.
+ */
+ public static final String FINDER_CLASS_NAME_ENTITY = CommentImpl.class.getName();
+ public static final String FINDER_CLASS_NAME_LIST_WITH_PAGINATION = FINDER_CLASS_NAME_ENTITY +
+ ".List1";
+ public static final String FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION = FINDER_CLASS_NAME_ENTITY +
+ ".List2";
+ public static final FinderPath FINDER_PATH_WITH_PAGINATION_FIND_ALL = new FinderPath(CommentModelImpl.ENTITY_CACHE_ENABLED,
+ CommentModelImpl.FINDER_CACHE_ENABLED, CommentImpl.class,
+ FINDER_CLASS_NAME_LIST_WITH_PAGINATION, "findAll", new String[0]);
+ public static final FinderPath FINDER_PATH_WITHOUT_PAGINATION_FIND_ALL = new FinderPath(CommentModelImpl.ENTITY_CACHE_ENABLED,
+ CommentModelImpl.FINDER_CACHE_ENABLED, CommentImpl.class,
+ FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION, "findAll", new String[0]);
+ public static final FinderPath FINDER_PATH_COUNT_ALL = new FinderPath(CommentModelImpl.ENTITY_CACHE_ENABLED,
+ CommentModelImpl.FINDER_CACHE_ENABLED, Long.class,
+ FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION, "countAll", new String[0]);
+ public static final FinderPath FINDER_PATH_WITH_PAGINATION_FIND_BY_PARENTID_TITLEID_VERIFIED =
+ new FinderPath(CommentModelImpl.ENTITY_CACHE_ENABLED,
+ CommentModelImpl.FINDER_CACHE_ENABLED, CommentImpl.class,
+ FINDER_CLASS_NAME_LIST_WITH_PAGINATION,
+ "findByParentId_TitleId_Verified",
+ new String[] {
+ Long.class.getName(), Long.class.getName(),
+ Boolean.class.getName(),
+
+ Integer.class.getName(), Integer.class.getName(),
+ OrderByComparator.class.getName()
+ });
+ public static final FinderPath FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_PARENTID_TITLEID_VERIFIED =
+ new FinderPath(CommentModelImpl.ENTITY_CACHE_ENABLED,
+ CommentModelImpl.FINDER_CACHE_ENABLED, CommentImpl.class,
+ FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION,
+ "findByParentId_TitleId_Verified",
+ new String[] {
+ Long.class.getName(), Long.class.getName(),
+ Boolean.class.getName()
+ },
+ CommentModelImpl.PARENTID_COLUMN_BITMASK |
+ CommentModelImpl.TITLEID_COLUMN_BITMASK |
+ CommentModelImpl.VERIFIED_COLUMN_BITMASK);
+ public static final FinderPath FINDER_PATH_COUNT_BY_PARENTID_TITLEID_VERIFIED =
+ new FinderPath(CommentModelImpl.ENTITY_CACHE_ENABLED,
+ CommentModelImpl.FINDER_CACHE_ENABLED, Long.class,
+ FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION,
+ "countByParentId_TitleId_Verified",
+ new String[] {
+ Long.class.getName(), Long.class.getName(),
+ Boolean.class.getName()
+ });
+
+ /**
+ * Returns all the comments where parentId = ? and titleId = ? and verified = ?.
+ *
+ * @param parentId the parent ID
+ * @param titleId the title ID
+ * @param verified the verified
+ * @return the matching comments
+ * @throws SystemException if a system exception occurred
+ */
+ @Override
+ public List findByParentId_TitleId_Verified(long parentId,
+ long titleId, boolean verified) throws SystemException {
+ return findByParentId_TitleId_Verified(parentId, titleId, verified,
+ QueryUtil.ALL_POS, QueryUtil.ALL_POS, null);
+ }
+
+ /**
+ * Returns a range of all the comments where parentId = ? and titleId = ? and verified = ?.
+ *
+ *
+ * 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 ir.ac.iut.sccportal.guestdiscussion.model.impl.CommentModelImpl}. 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 parentId the parent ID
+ * @param titleId the title ID
+ * @param verified the verified
+ * @param start the lower bound of the range of comments
+ * @param end the upper bound of the range of comments (not inclusive)
+ * @return the range of matching comments
+ * @throws SystemException if a system exception occurred
+ */
+ @Override
+ public List findByParentId_TitleId_Verified(long parentId,
+ long titleId, boolean verified, int start, int end)
+ throws SystemException {
+ return findByParentId_TitleId_Verified(parentId, titleId, verified,
+ start, end, null);
+ }
+
+ /**
+ * Returns an ordered range of all the comments where parentId = ? and titleId = ? and verified = ?.
+ *
+ *
+ * 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 ir.ac.iut.sccportal.guestdiscussion.model.impl.CommentModelImpl}. 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 parentId the parent ID
+ * @param titleId the title ID
+ * @param verified the verified
+ * @param start the lower bound of the range of comments
+ * @param end the upper bound of the range of comments (not inclusive)
+ * @param orderByComparator the comparator to order the results by (optionally null
)
+ * @return the ordered range of matching comments
+ * @throws SystemException if a system exception occurred
+ */
+ @Override
+ public List findByParentId_TitleId_Verified(long parentId,
+ long titleId, boolean verified, 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_PARENTID_TITLEID_VERIFIED;
+ finderArgs = new Object[] { parentId, titleId, verified };
+ }
+ else {
+ finderPath = FINDER_PATH_WITH_PAGINATION_FIND_BY_PARENTID_TITLEID_VERIFIED;
+ finderArgs = new Object[] {
+ parentId, titleId, verified,
+
+ start, end, orderByComparator
+ };
+ }
+
+ List list = (List