/** * 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 com.liferay.knowledgebase.service.base; import com.liferay.knowledgebase.model.KBArticle; import com.liferay.knowledgebase.service.KBArticleLocalService; import com.liferay.knowledgebase.service.persistence.KBArticleFinder; import com.liferay.knowledgebase.service.persistence.KBArticlePersistence; import com.liferay.knowledgebase.service.persistence.KBCommentPersistence; import com.liferay.knowledgebase.service.persistence.KBFolderPersistence; import com.liferay.knowledgebase.service.persistence.KBTemplatePersistence; 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.ClassNamePersistence; import com.liferay.portal.service.persistence.CompanyPersistence; import com.liferay.portal.service.persistence.GroupPersistence; import com.liferay.portal.service.persistence.LayoutPersistence; import com.liferay.portal.service.persistence.PortletPreferencesPersistence; import com.liferay.portal.service.persistence.SubscriptionPersistence; import com.liferay.portal.service.persistence.TicketPersistence; import com.liferay.portal.service.persistence.UserPersistence; import com.liferay.portal.service.persistence.WorkflowInstanceLinkPersistence; import com.liferay.portlet.asset.service.persistence.AssetEntryPersistence; import com.liferay.portlet.asset.service.persistence.AssetLinkPersistence; import com.liferay.portlet.ratings.service.persistence.RatingsStatsPersistence; import com.liferay.portlet.social.service.persistence.SocialActivityPersistence; import java.io.Serializable; import java.util.List; import javax.sql.DataSource; /** * Provides the base implementation for the k b article local service. * * <p> * This implementation exists only as a container for the default service methods generated by ServiceBuilder. All custom service methods should be put in {@link com.liferay.knowledgebase.service.impl.KBArticleLocalServiceImpl}. * </p> * * @author Brian Wing Shun Chan * @see com.liferay.knowledgebase.service.impl.KBArticleLocalServiceImpl * @see com.liferay.knowledgebase.service.KBArticleLocalServiceUtil * @generated */ public abstract class KBArticleLocalServiceBaseImpl extends BaseLocalServiceImpl implements KBArticleLocalService, IdentifiableBean { /* * NOTE FOR DEVELOPERS: * * Never modify or reference this class directly. Always use {@link com.liferay.knowledgebase.service.KBArticleLocalServiceUtil} to access the k b article local service. */ /** * Adds the k b article to the database. Also notifies the appropriate model listeners. * * @param kbArticle the k b article * @return the k b article that was added * @throws SystemException if a system exception occurred */ @Indexable(type = IndexableType.REINDEX) @Override public KBArticle addKBArticle(KBArticle kbArticle) throws SystemException { kbArticle.setNew(true); return kbArticlePersistence.update(kbArticle); } /** * Creates a new k b article with the primary key. Does not add the k b article to the database. * * @param kbArticleId the primary key for the new k b article * @return the new k b article */ @Override public KBArticle createKBArticle(long kbArticleId) { return kbArticlePersistence.create(kbArticleId); } /** * Deletes the k b article with the primary key from the database. Also notifies the appropriate model listeners. * * @param kbArticleId the primary key of the k b article * @return the k b article that was removed * @throws PortalException if a k b article with the primary key could not be found * @throws SystemException if a system exception occurred */ @Indexable(type = IndexableType.DELETE) @Override public KBArticle deleteKBArticle(long kbArticleId) throws PortalException, SystemException { return kbArticlePersistence.remove(kbArticleId); } /** * Deletes the k b article from the database. Also notifies the appropriate model listeners. * * @param kbArticle the k b article * @return the k b article that was removed * @throws PortalException * @throws SystemException if a system exception occurred */ @Indexable(type = IndexableType.DELETE) @Override public KBArticle deleteKBArticle(KBArticle kbArticle) throws PortalException, SystemException { return kbArticlePersistence.remove(kbArticle); } @Override public DynamicQuery dynamicQuery() { Class<?> clazz = getClass(); return DynamicQueryFactoryUtil.forClass(KBArticle.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 kbArticlePersistence.findWithDynamicQuery(dynamicQuery); } /** * Performs a dynamic query on the database and returns a range of the matching rows. * * <p> * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both <code>orderByComparator</code> 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. * </p> * * @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 kbArticlePersistence.findWithDynamicQuery(dynamicQuery, start, end); } /** * Performs a dynamic query on the database and returns an ordered range of the matching rows. * * <p> * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both <code>orderByComparator</code> 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. * </p> * * @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 <code>null</code>) * @return the ordered range of matching rows * @throws SystemException if a system exception occurred */ @Override @SuppressWarnings("rawtypes") public List dynamicQuery(DynamicQuery dynamicQuery, int start, int end, OrderByComparator orderByComparator) throws SystemException { return kbArticlePersistence.findWithDynamicQuery(dynamicQuery, start, end, orderByComparator); } /** * Returns the number of rows that match the dynamic query. * * @param dynamicQuery the dynamic query * @return the number of rows that match the dynamic query * @throws SystemException if a system exception occurred */ @Override public long dynamicQueryCount(DynamicQuery dynamicQuery) throws SystemException { return kbArticlePersistence.countWithDynamicQuery(dynamicQuery); } /** * Returns the number of rows that match the dynamic query. * * @param dynamicQuery the dynamic query * @param projection the projection to apply to the query * @return the number of rows that match the dynamic query * @throws SystemException if a system exception occurred */ @Override public long dynamicQueryCount(DynamicQuery dynamicQuery, Projection projection) throws SystemException { return kbArticlePersistence.countWithDynamicQuery(dynamicQuery, projection); } @Override public KBArticle fetchKBArticle(long kbArticleId) throws SystemException { return kbArticlePersistence.fetchByPrimaryKey(kbArticleId); } /** * Returns the k b article with the matching UUID and company. * * @param uuid the k b article's UUID * @param companyId the primary key of the company * @return the matching k b article, or <code>null</code> if a matching k b article could not be found * @throws SystemException if a system exception occurred */ @Override public KBArticle fetchKBArticleByUuidAndCompanyId(String uuid, long companyId) throws SystemException { return kbArticlePersistence.fetchByUuid_C_First(uuid, companyId, null); } /** * Returns the k b article matching the UUID and group. * * @param uuid the k b article's UUID * @param groupId the primary key of the group * @return the matching k b article, or <code>null</code> if a matching k b article could not be found * @throws SystemException if a system exception occurred */ @Override public KBArticle fetchKBArticleByUuidAndGroupId(String uuid, long groupId) throws SystemException { return kbArticlePersistence.fetchByUUID_G(uuid, groupId); } /** * Returns the k b article with the primary key. * * @param kbArticleId the primary key of the k b article * @return the k b article * @throws PortalException if a k b article with the primary key could not be found * @throws SystemException if a system exception occurred */ @Override public KBArticle getKBArticle(long kbArticleId) throws PortalException, SystemException { return kbArticlePersistence.findByPrimaryKey(kbArticleId); } @Override public PersistedModel getPersistedModel(Serializable primaryKeyObj) throws PortalException, SystemException { return kbArticlePersistence.findByPrimaryKey(primaryKeyObj); } /** * Returns the k b article with the matching UUID and company. * * @param uuid the k b article's UUID * @param companyId the primary key of the company * @return the matching k b article * @throws PortalException if a matching k b article could not be found * @throws SystemException if a system exception occurred */ @Override public KBArticle getKBArticleByUuidAndCompanyId(String uuid, long companyId) throws PortalException, SystemException { return kbArticlePersistence.findByUuid_C_First(uuid, companyId, null); } /** * Returns the k b article matching the UUID and group. * * @param uuid the k b article's UUID * @param groupId the primary key of the group * @return the matching k b article * @throws PortalException if a matching k b article could not be found * @throws SystemException if a system exception occurred */ @Override public KBArticle getKBArticleByUuidAndGroupId(String uuid, long groupId) throws PortalException, SystemException { return kbArticlePersistence.findByUUID_G(uuid, groupId); } /** * Returns a range of all the k b articles. * * <p> * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.knowledgebase.model.impl.KBArticleModelImpl}. If both <code>orderByComparator</code> 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. * </p> * * @param start the lower bound of the range of k b articles * @param end the upper bound of the range of k b articles (not inclusive) * @return the range of k b articles * @throws SystemException if a system exception occurred */ @Override public List<KBArticle> getKBArticles(int start, int end) throws SystemException { return kbArticlePersistence.findAll(start, end); } /** * Returns the number of k b articles. * * @return the number of k b articles * @throws SystemException if a system exception occurred */ @Override public int getKBArticlesCount() throws SystemException { return kbArticlePersistence.countAll(); } /** * Updates the k b article in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners. * * @param kbArticle the k b article * @return the k b article that was updated * @throws SystemException if a system exception occurred */ @Indexable(type = IndexableType.REINDEX) @Override public KBArticle updateKBArticle(KBArticle kbArticle) throws SystemException { return kbArticlePersistence.update(kbArticle); } /** * Returns the k b article local service. * * @return the k b article local service */ public com.liferay.knowledgebase.service.KBArticleLocalService getKBArticleLocalService() { return kbArticleLocalService; } /** * Sets the k b article local service. * * @param kbArticleLocalService the k b article local service */ public void setKBArticleLocalService( com.liferay.knowledgebase.service.KBArticleLocalService kbArticleLocalService) { this.kbArticleLocalService = kbArticleLocalService; } /** * Returns the k b article remote service. * * @return the k b article remote service */ public com.liferay.knowledgebase.service.KBArticleService getKBArticleService() { return kbArticleService; } /** * Sets the k b article remote service. * * @param kbArticleService the k b article remote service */ public void setKBArticleService( com.liferay.knowledgebase.service.KBArticleService kbArticleService) { this.kbArticleService = kbArticleService; } /** * Returns the k b article persistence. * * @return the k b article persistence */ public KBArticlePersistence getKBArticlePersistence() { return kbArticlePersistence; } /** * Sets the k b article persistence. * * @param kbArticlePersistence the k b article persistence */ public void setKBArticlePersistence( KBArticlePersistence kbArticlePersistence) { this.kbArticlePersistence = kbArticlePersistence; } /** * Returns the k b article finder. * * @return the k b article finder */ public KBArticleFinder getKBArticleFinder() { return kbArticleFinder; } /** * Sets the k b article finder. * * @param kbArticleFinder the k b article finder */ public void setKBArticleFinder(KBArticleFinder kbArticleFinder) { this.kbArticleFinder = kbArticleFinder; } /** * Returns the k b comment local service. * * @return the k b comment local service */ public com.liferay.knowledgebase.service.KBCommentLocalService getKBCommentLocalService() { return kbCommentLocalService; } /** * Sets the k b comment local service. * * @param kbCommentLocalService the k b comment local service */ public void setKBCommentLocalService( com.liferay.knowledgebase.service.KBCommentLocalService kbCommentLocalService) { this.kbCommentLocalService = kbCommentLocalService; } /** * Returns the k b comment remote service. * * @return the k b comment remote service */ public com.liferay.knowledgebase.service.KBCommentService getKBCommentService() { return kbCommentService; } /** * Sets the k b comment remote service. * * @param kbCommentService the k b comment remote service */ public void setKBCommentService( com.liferay.knowledgebase.service.KBCommentService kbCommentService) { this.kbCommentService = kbCommentService; } /** * Returns the k b comment persistence. * * @return the k b comment persistence */ public KBCommentPersistence getKBCommentPersistence() { return kbCommentPersistence; } /** * Sets the k b comment persistence. * * @param kbCommentPersistence the k b comment persistence */ public void setKBCommentPersistence( KBCommentPersistence kbCommentPersistence) { this.kbCommentPersistence = kbCommentPersistence; } /** * Returns the k b folder local service. * * @return the k b folder local service */ public com.liferay.knowledgebase.service.KBFolderLocalService getKBFolderLocalService() { return kbFolderLocalService; } /** * Sets the k b folder local service. * * @param kbFolderLocalService the k b folder local service */ public void setKBFolderLocalService( com.liferay.knowledgebase.service.KBFolderLocalService kbFolderLocalService) { this.kbFolderLocalService = kbFolderLocalService; } /** * Returns the k b folder remote service. * * @return the k b folder remote service */ public com.liferay.knowledgebase.service.KBFolderService getKBFolderService() { return kbFolderService; } /** * Sets the k b folder remote service. * * @param kbFolderService the k b folder remote service */ public void setKBFolderService( com.liferay.knowledgebase.service.KBFolderService kbFolderService) { this.kbFolderService = kbFolderService; } /** * Returns the k b folder persistence. * * @return the k b folder persistence */ public KBFolderPersistence getKBFolderPersistence() { return kbFolderPersistence; } /** * Sets the k b folder persistence. * * @param kbFolderPersistence the k b folder persistence */ public void setKBFolderPersistence(KBFolderPersistence kbFolderPersistence) { this.kbFolderPersistence = kbFolderPersistence; } /** * Returns the k b template local service. * * @return the k b template local service */ public com.liferay.knowledgebase.service.KBTemplateLocalService getKBTemplateLocalService() { return kbTemplateLocalService; } /** * Sets the k b template local service. * * @param kbTemplateLocalService the k b template local service */ public void setKBTemplateLocalService( com.liferay.knowledgebase.service.KBTemplateLocalService kbTemplateLocalService) { this.kbTemplateLocalService = kbTemplateLocalService; } /** * Returns the k b template remote service. * * @return the k b template remote service */ public com.liferay.knowledgebase.service.KBTemplateService getKBTemplateService() { return kbTemplateService; } /** * Sets the k b template remote service. * * @param kbTemplateService the k b template remote service */ public void setKBTemplateService( com.liferay.knowledgebase.service.KBTemplateService kbTemplateService) { this.kbTemplateService = kbTemplateService; } /** * Returns the k b template persistence. * * @return the k b template persistence */ public KBTemplatePersistence getKBTemplatePersistence() { return kbTemplatePersistence; } /** * Sets the k b template persistence. * * @param kbTemplatePersistence the k b template persistence */ public void setKBTemplatePersistence( KBTemplatePersistence kbTemplatePersistence) { this.kbTemplatePersistence = kbTemplatePersistence; } /** * 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 class name local service. * * @return the class name local service */ public com.liferay.portal.service.ClassNameLocalService getClassNameLocalService() { return classNameLocalService; } /** * Sets the class name local service. * * @param classNameLocalService the class name local service */ public void setClassNameLocalService( com.liferay.portal.service.ClassNameLocalService classNameLocalService) { this.classNameLocalService = classNameLocalService; } /** * Returns the class name remote service. * * @return the class name remote service */ public com.liferay.portal.service.ClassNameService getClassNameService() { return classNameService; } /** * Sets the class name remote service. * * @param classNameService the class name remote service */ public void setClassNameService( com.liferay.portal.service.ClassNameService classNameService) { this.classNameService = classNameService; } /** * Returns the class name persistence. * * @return the class name persistence */ public ClassNamePersistence getClassNamePersistence() { return classNamePersistence; } /** * Sets the class name persistence. * * @param classNamePersistence the class name persistence */ public void setClassNamePersistence( ClassNamePersistence classNamePersistence) { this.classNamePersistence = classNamePersistence; } /** * Returns the company local service. * * @return the company local service */ public com.liferay.portal.service.CompanyLocalService getCompanyLocalService() { return companyLocalService; } /** * Sets the company local service. * * @param companyLocalService the company local service */ public void setCompanyLocalService( com.liferay.portal.service.CompanyLocalService companyLocalService) { this.companyLocalService = companyLocalService; } /** * Returns the company remote service. * * @return the company remote service */ public com.liferay.portal.service.CompanyService getCompanyService() { return companyService; } /** * Sets the company remote service. * * @param companyService the company remote service */ public void setCompanyService( com.liferay.portal.service.CompanyService companyService) { this.companyService = companyService; } /** * Returns the company persistence. * * @return the company persistence */ public CompanyPersistence getCompanyPersistence() { return companyPersistence; } /** * Sets the company persistence. * * @param companyPersistence the company persistence */ public void setCompanyPersistence(CompanyPersistence companyPersistence) { this.companyPersistence = companyPersistence; } /** * Returns the group local service. * * @return the group local service */ public com.liferay.portal.service.GroupLocalService getGroupLocalService() { return groupLocalService; } /** * Sets the group local service. * * @param groupLocalService the group local service */ public void setGroupLocalService( com.liferay.portal.service.GroupLocalService groupLocalService) { this.groupLocalService = groupLocalService; } /** * Returns the group remote service. * * @return the group remote service */ public com.liferay.portal.service.GroupService getGroupService() { return groupService; } /** * Sets the group remote service. * * @param groupService the group remote service */ public void setGroupService( com.liferay.portal.service.GroupService groupService) { this.groupService = groupService; } /** * Returns the group persistence. * * @return the group persistence */ public GroupPersistence getGroupPersistence() { return groupPersistence; } /** * Sets the group persistence. * * @param groupPersistence the group persistence */ public void setGroupPersistence(GroupPersistence groupPersistence) { this.groupPersistence = groupPersistence; } /** * Returns the layout local service. * * @return the layout local service */ public com.liferay.portal.service.LayoutLocalService getLayoutLocalService() { return layoutLocalService; } /** * Sets the layout local service. * * @param layoutLocalService the layout local service */ public void setLayoutLocalService( com.liferay.portal.service.LayoutLocalService layoutLocalService) { this.layoutLocalService = layoutLocalService; } /** * Returns the layout remote service. * * @return the layout remote service */ public com.liferay.portal.service.LayoutService getLayoutService() { return layoutService; } /** * Sets the layout remote service. * * @param layoutService the layout remote service */ public void setLayoutService( com.liferay.portal.service.LayoutService layoutService) { this.layoutService = layoutService; } /** * Returns the layout persistence. * * @return the layout persistence */ public LayoutPersistence getLayoutPersistence() { return layoutPersistence; } /** * Sets the layout persistence. * * @param layoutPersistence the layout persistence */ public void setLayoutPersistence(LayoutPersistence layoutPersistence) { this.layoutPersistence = layoutPersistence; } /** * Returns the portlet preferences local service. * * @return the portlet preferences local service */ public com.liferay.portal.service.PortletPreferencesLocalService getPortletPreferencesLocalService() { return portletPreferencesLocalService; } /** * Sets the portlet preferences local service. * * @param portletPreferencesLocalService the portlet preferences local service */ public void setPortletPreferencesLocalService( com.liferay.portal.service.PortletPreferencesLocalService portletPreferencesLocalService) { this.portletPreferencesLocalService = portletPreferencesLocalService; } /** * Returns the portlet preferences remote service. * * @return the portlet preferences remote service */ public com.liferay.portal.service.PortletPreferencesService getPortletPreferencesService() { return portletPreferencesService; } /** * Sets the portlet preferences remote service. * * @param portletPreferencesService the portlet preferences remote service */ public void setPortletPreferencesService( com.liferay.portal.service.PortletPreferencesService portletPreferencesService) { this.portletPreferencesService = portletPreferencesService; } /** * Returns the portlet preferences persistence. * * @return the portlet preferences persistence */ public PortletPreferencesPersistence getPortletPreferencesPersistence() { return portletPreferencesPersistence; } /** * Sets the portlet preferences persistence. * * @param portletPreferencesPersistence the portlet preferences persistence */ public void setPortletPreferencesPersistence( PortletPreferencesPersistence portletPreferencesPersistence) { this.portletPreferencesPersistence = portletPreferencesPersistence; } /** * 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 subscription local service. * * @return the subscription local service */ public com.liferay.portal.service.SubscriptionLocalService getSubscriptionLocalService() { return subscriptionLocalService; } /** * Sets the subscription local service. * * @param subscriptionLocalService the subscription local service */ public void setSubscriptionLocalService( com.liferay.portal.service.SubscriptionLocalService subscriptionLocalService) { this.subscriptionLocalService = subscriptionLocalService; } /** * Returns the subscription persistence. * * @return the subscription persistence */ public SubscriptionPersistence getSubscriptionPersistence() { return subscriptionPersistence; } /** * Sets the subscription persistence. * * @param subscriptionPersistence the subscription persistence */ public void setSubscriptionPersistence( SubscriptionPersistence subscriptionPersistence) { this.subscriptionPersistence = subscriptionPersistence; } /** * Returns the ticket local service. * * @return the ticket local service */ public com.liferay.portal.service.TicketLocalService getTicketLocalService() { return ticketLocalService; } /** * Sets the ticket local service. * * @param ticketLocalService the ticket local service */ public void setTicketLocalService( com.liferay.portal.service.TicketLocalService ticketLocalService) { this.ticketLocalService = ticketLocalService; } /** * Returns the ticket persistence. * * @return the ticket persistence */ public TicketPersistence getTicketPersistence() { return ticketPersistence; } /** * Sets the ticket persistence. * * @param ticketPersistence the ticket persistence */ public void setTicketPersistence(TicketPersistence ticketPersistence) { this.ticketPersistence = ticketPersistence; } /** * 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; } /** * Returns the workflow instance link local service. * * @return the workflow instance link local service */ public com.liferay.portal.service.WorkflowInstanceLinkLocalService getWorkflowInstanceLinkLocalService() { return workflowInstanceLinkLocalService; } /** * Sets the workflow instance link local service. * * @param workflowInstanceLinkLocalService the workflow instance link local service */ public void setWorkflowInstanceLinkLocalService( com.liferay.portal.service.WorkflowInstanceLinkLocalService workflowInstanceLinkLocalService) { this.workflowInstanceLinkLocalService = workflowInstanceLinkLocalService; } /** * Returns the workflow instance link persistence. * * @return the workflow instance link persistence */ public WorkflowInstanceLinkPersistence getWorkflowInstanceLinkPersistence() { return workflowInstanceLinkPersistence; } /** * Sets the workflow instance link persistence. * * @param workflowInstanceLinkPersistence the workflow instance link persistence */ public void setWorkflowInstanceLinkPersistence( WorkflowInstanceLinkPersistence workflowInstanceLinkPersistence) { this.workflowInstanceLinkPersistence = workflowInstanceLinkPersistence; } /** * Returns the asset entry local service. * * @return the asset entry local service */ public com.liferay.portlet.asset.service.AssetEntryLocalService getAssetEntryLocalService() { return assetEntryLocalService; } /** * Sets the asset entry local service. * * @param assetEntryLocalService the asset entry local service */ public void setAssetEntryLocalService( com.liferay.portlet.asset.service.AssetEntryLocalService assetEntryLocalService) { this.assetEntryLocalService = assetEntryLocalService; } /** * Returns the asset entry remote service. * * @return the asset entry remote service */ public com.liferay.portlet.asset.service.AssetEntryService getAssetEntryService() { return assetEntryService; } /** * Sets the asset entry remote service. * * @param assetEntryService the asset entry remote service */ public void setAssetEntryService( com.liferay.portlet.asset.service.AssetEntryService assetEntryService) { this.assetEntryService = assetEntryService; } /** * Returns the asset entry persistence. * * @return the asset entry persistence */ public AssetEntryPersistence getAssetEntryPersistence() { return assetEntryPersistence; } /** * Sets the asset entry persistence. * * @param assetEntryPersistence the asset entry persistence */ public void setAssetEntryPersistence( AssetEntryPersistence assetEntryPersistence) { this.assetEntryPersistence = assetEntryPersistence; } /** * Returns the asset link local service. * * @return the asset link local service */ public com.liferay.portlet.asset.service.AssetLinkLocalService getAssetLinkLocalService() { return assetLinkLocalService; } /** * Sets the asset link local service. * * @param assetLinkLocalService the asset link local service */ public void setAssetLinkLocalService( com.liferay.portlet.asset.service.AssetLinkLocalService assetLinkLocalService) { this.assetLinkLocalService = assetLinkLocalService; } /** * Returns the asset link persistence. * * @return the asset link persistence */ public AssetLinkPersistence getAssetLinkPersistence() { return assetLinkPersistence; } /** * Sets the asset link persistence. * * @param assetLinkPersistence the asset link persistence */ public void setAssetLinkPersistence( AssetLinkPersistence assetLinkPersistence) { this.assetLinkPersistence = assetLinkPersistence; } /** * Returns the ratings stats local service. * * @return the ratings stats local service */ public com.liferay.portlet.ratings.service.RatingsStatsLocalService getRatingsStatsLocalService() { return ratingsStatsLocalService; } /** * Sets the ratings stats local service. * * @param ratingsStatsLocalService the ratings stats local service */ public void setRatingsStatsLocalService( com.liferay.portlet.ratings.service.RatingsStatsLocalService ratingsStatsLocalService) { this.ratingsStatsLocalService = ratingsStatsLocalService; } /** * Returns the ratings stats persistence. * * @return the ratings stats persistence */ public RatingsStatsPersistence getRatingsStatsPersistence() { return ratingsStatsPersistence; } /** * Sets the ratings stats persistence. * * @param ratingsStatsPersistence the ratings stats persistence */ public void setRatingsStatsPersistence( RatingsStatsPersistence ratingsStatsPersistence) { this.ratingsStatsPersistence = ratingsStatsPersistence; } /** * Returns the social activity local service. * * @return the social activity local service */ public com.liferay.portlet.social.service.SocialActivityLocalService getSocialActivityLocalService() { return socialActivityLocalService; } /** * Sets the social activity local service. * * @param socialActivityLocalService the social activity local service */ public void setSocialActivityLocalService( com.liferay.portlet.social.service.SocialActivityLocalService socialActivityLocalService) { this.socialActivityLocalService = socialActivityLocalService; } /** * Returns the social activity remote service. * * @return the social activity remote service */ public com.liferay.portlet.social.service.SocialActivityService getSocialActivityService() { return socialActivityService; } /** * Sets the social activity remote service. * * @param socialActivityService the social activity remote service */ public void setSocialActivityService( com.liferay.portlet.social.service.SocialActivityService socialActivityService) { this.socialActivityService = socialActivityService; } /** * Returns the social activity persistence. * * @return the social activity persistence */ public SocialActivityPersistence getSocialActivityPersistence() { return socialActivityPersistence; } /** * Sets the social activity persistence. * * @param socialActivityPersistence the social activity persistence */ public void setSocialActivityPersistence( SocialActivityPersistence socialActivityPersistence) { this.socialActivityPersistence = socialActivityPersistence; } public void afterPropertiesSet() { Class<?> clazz = getClass(); _classLoader = clazz.getClassLoader(); PersistedModelLocalServiceRegistryUtil.register("com.liferay.knowledgebase.model.KBArticle", kbArticleLocalService); } public void destroy() { PersistedModelLocalServiceRegistryUtil.unregister( "com.liferay.knowledgebase.model.KBArticle"); } /** * 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 KBArticle.class; } protected String getModelClassName() { return KBArticle.class.getName(); } /** * Performs an SQL query. * * @param sql the sql query */ protected void runSQL(String sql) throws SystemException { try { DataSource dataSource = kbArticlePersistence.getDataSource(); SqlUpdate sqlUpdate = SqlUpdateFactoryUtil.getSqlUpdate(dataSource, sql, new int[0]); sqlUpdate.update(); } catch (Exception e) { throw new SystemException(e); } } @BeanReference(type = com.liferay.knowledgebase.service.KBArticleLocalService.class) protected com.liferay.knowledgebase.service.KBArticleLocalService kbArticleLocalService; @BeanReference(type = com.liferay.knowledgebase.service.KBArticleService.class) protected com.liferay.knowledgebase.service.KBArticleService kbArticleService; @BeanReference(type = KBArticlePersistence.class) protected KBArticlePersistence kbArticlePersistence; @BeanReference(type = KBArticleFinder.class) protected KBArticleFinder kbArticleFinder; @BeanReference(type = com.liferay.knowledgebase.service.KBCommentLocalService.class) protected com.liferay.knowledgebase.service.KBCommentLocalService kbCommentLocalService; @BeanReference(type = com.liferay.knowledgebase.service.KBCommentService.class) protected com.liferay.knowledgebase.service.KBCommentService kbCommentService; @BeanReference(type = KBCommentPersistence.class) protected KBCommentPersistence kbCommentPersistence; @BeanReference(type = com.liferay.knowledgebase.service.KBFolderLocalService.class) protected com.liferay.knowledgebase.service.KBFolderLocalService kbFolderLocalService; @BeanReference(type = com.liferay.knowledgebase.service.KBFolderService.class) protected com.liferay.knowledgebase.service.KBFolderService kbFolderService; @BeanReference(type = KBFolderPersistence.class) protected KBFolderPersistence kbFolderPersistence; @BeanReference(type = com.liferay.knowledgebase.service.KBTemplateLocalService.class) protected com.liferay.knowledgebase.service.KBTemplateLocalService kbTemplateLocalService; @BeanReference(type = com.liferay.knowledgebase.service.KBTemplateService.class) protected com.liferay.knowledgebase.service.KBTemplateService kbTemplateService; @BeanReference(type = KBTemplatePersistence.class) protected KBTemplatePersistence kbTemplatePersistence; @BeanReference(type = com.liferay.counter.service.CounterLocalService.class) protected com.liferay.counter.service.CounterLocalService counterLocalService; @BeanReference(type = com.liferay.portal.service.ClassNameLocalService.class) protected com.liferay.portal.service.ClassNameLocalService classNameLocalService; @BeanReference(type = com.liferay.portal.service.ClassNameService.class) protected com.liferay.portal.service.ClassNameService classNameService; @BeanReference(type = ClassNamePersistence.class) protected ClassNamePersistence classNamePersistence; @BeanReference(type = com.liferay.portal.service.CompanyLocalService.class) protected com.liferay.portal.service.CompanyLocalService companyLocalService; @BeanReference(type = com.liferay.portal.service.CompanyService.class) protected com.liferay.portal.service.CompanyService companyService; @BeanReference(type = CompanyPersistence.class) protected CompanyPersistence companyPersistence; @BeanReference(type = com.liferay.portal.service.GroupLocalService.class) protected com.liferay.portal.service.GroupLocalService groupLocalService; @BeanReference(type = com.liferay.portal.service.GroupService.class) protected com.liferay.portal.service.GroupService groupService; @BeanReference(type = GroupPersistence.class) protected GroupPersistence groupPersistence; @BeanReference(type = com.liferay.portal.service.LayoutLocalService.class) protected com.liferay.portal.service.LayoutLocalService layoutLocalService; @BeanReference(type = com.liferay.portal.service.LayoutService.class) protected com.liferay.portal.service.LayoutService layoutService; @BeanReference(type = LayoutPersistence.class) protected LayoutPersistence layoutPersistence; @BeanReference(type = com.liferay.portal.service.PortletPreferencesLocalService.class) protected com.liferay.portal.service.PortletPreferencesLocalService portletPreferencesLocalService; @BeanReference(type = com.liferay.portal.service.PortletPreferencesService.class) protected com.liferay.portal.service.PortletPreferencesService portletPreferencesService; @BeanReference(type = PortletPreferencesPersistence.class) protected PortletPreferencesPersistence portletPreferencesPersistence; @BeanReference(type = com.liferay.portal.service.ResourceLocalService.class) protected com.liferay.portal.service.ResourceLocalService resourceLocalService; @BeanReference(type = com.liferay.portal.service.SubscriptionLocalService.class) protected com.liferay.portal.service.SubscriptionLocalService subscriptionLocalService; @BeanReference(type = SubscriptionPersistence.class) protected SubscriptionPersistence subscriptionPersistence; @BeanReference(type = com.liferay.portal.service.TicketLocalService.class) protected com.liferay.portal.service.TicketLocalService ticketLocalService; @BeanReference(type = TicketPersistence.class) protected TicketPersistence ticketPersistence; @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; @BeanReference(type = com.liferay.portal.service.WorkflowInstanceLinkLocalService.class) protected com.liferay.portal.service.WorkflowInstanceLinkLocalService workflowInstanceLinkLocalService; @BeanReference(type = WorkflowInstanceLinkPersistence.class) protected WorkflowInstanceLinkPersistence workflowInstanceLinkPersistence; @BeanReference(type = com.liferay.portlet.asset.service.AssetEntryLocalService.class) protected com.liferay.portlet.asset.service.AssetEntryLocalService assetEntryLocalService; @BeanReference(type = com.liferay.portlet.asset.service.AssetEntryService.class) protected com.liferay.portlet.asset.service.AssetEntryService assetEntryService; @BeanReference(type = AssetEntryPersistence.class) protected AssetEntryPersistence assetEntryPersistence; @BeanReference(type = com.liferay.portlet.asset.service.AssetLinkLocalService.class) protected com.liferay.portlet.asset.service.AssetLinkLocalService assetLinkLocalService; @BeanReference(type = AssetLinkPersistence.class) protected AssetLinkPersistence assetLinkPersistence; @BeanReference(type = com.liferay.portlet.ratings.service.RatingsStatsLocalService.class) protected com.liferay.portlet.ratings.service.RatingsStatsLocalService ratingsStatsLocalService; @BeanReference(type = RatingsStatsPersistence.class) protected RatingsStatsPersistence ratingsStatsPersistence; @BeanReference(type = com.liferay.portlet.social.service.SocialActivityLocalService.class) protected com.liferay.portlet.social.service.SocialActivityLocalService socialActivityLocalService; @BeanReference(type = com.liferay.portlet.social.service.SocialActivityService.class) protected com.liferay.portlet.social.service.SocialActivityService socialActivityService; @BeanReference(type = SocialActivityPersistence.class) protected SocialActivityPersistence socialActivityPersistence; private String _beanIdentifier; private ClassLoader _classLoader; private KBArticleLocalServiceClpInvoker _clpInvoker = new KBArticleLocalServiceClpInvoker(); }