@Activate
  protected void activate(BundleContext bundleContext) {
    _bundleContext = bundleContext;

    String filter =
        "(&(objectClass="
            + PanelApp.class.getName()
            + ")"
            + "(panel.category.key="
            + PanelCategoryKeys.SITE_ADMINISTRATION
            + "*))";

    _serviceTracker =
        ServiceTrackerFactory.open(bundleContext, filter, new PanelAppServiceTrackerCustomizer());
  }
/**
 * Provides the local service utility for KBFolder. This utility wraps {@link
 * com.liferay.knowledge.base.service.impl.KBFolderLocalServiceImpl} and is the primary access point
 * for service operations in application layer code running on the local server. 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 Brian Wing Shun Chan
 * @see KBFolderLocalService
 * @see com.liferay.knowledge.base.service.base.KBFolderLocalServiceBaseImpl
 * @see com.liferay.knowledge.base.service.impl.KBFolderLocalServiceImpl
 * @generated
 */
@ProviderType
public class KBFolderLocalServiceUtil {
  /*
   * NOTE FOR DEVELOPERS:
   *
   * Never modify this class directly. Add custom service methods to {@link com.liferay.knowledge.base.service.impl.KBFolderLocalServiceImpl} and rerun ServiceBuilder to regenerate this class.
   */

  /**
   * Adds the kb folder to the database. Also notifies the appropriate model listeners.
   *
   * @param kbFolder the kb folder
   * @return the kb folder that was added
   */
  public static com.liferay.knowledge.base.model.KBFolder addKBFolder(
      com.liferay.knowledge.base.model.KBFolder kbFolder) {
    return getService().addKBFolder(kbFolder);
  }

  public static com.liferay.knowledge.base.model.KBFolder addKBFolder(
      long userId,
      long groupId,
      long parentResourceClassNameId,
      long parentResourcePrimKey,
      java.lang.String name,
      java.lang.String description,
      com.liferay.portal.kernel.service.ServiceContext serviceContext)
      throws com.liferay.portal.kernel.exception.PortalException {
    return getService()
        .addKBFolder(
            userId,
            groupId,
            parentResourceClassNameId,
            parentResourcePrimKey,
            name,
            description,
            serviceContext);
  }

  /**
   * Creates a new kb folder with the primary key. Does not add the kb folder to the database.
   *
   * @param kbFolderId the primary key for the new kb folder
   * @return the new kb folder
   */
  public static com.liferay.knowledge.base.model.KBFolder createKBFolder(long kbFolderId) {
    return getService().createKBFolder(kbFolderId);
  }

  /**
   * Deletes the kb folder from the database. Also notifies the appropriate model listeners.
   *
   * @param kbFolder the kb folder
   * @return the kb folder that was removed
   */
  public static com.liferay.knowledge.base.model.KBFolder deleteKBFolder(
      com.liferay.knowledge.base.model.KBFolder kbFolder) {
    return getService().deleteKBFolder(kbFolder);
  }

  /**
   * Deletes the kb folder with the primary key from the database. Also notifies the appropriate
   * model listeners.
   *
   * @param kbFolderId the primary key of the kb folder
   * @return the kb folder that was removed
   * @throws PortalException if a kb folder with the primary key could not be found
   */
  public static com.liferay.knowledge.base.model.KBFolder deleteKBFolder(long kbFolderId)
      throws com.liferay.portal.kernel.exception.PortalException {
    return getService().deleteKBFolder(kbFolderId);
  }

  public static com.liferay.knowledge.base.model.KBFolder fetchFirstChildKBFolder(
      long groupId, long kbFolderId) throws com.liferay.portal.kernel.exception.PortalException {
    return getService().fetchFirstChildKBFolder(groupId, kbFolderId);
  }

  public static com.liferay.knowledge.base.model.KBFolder fetchFirstChildKBFolder(
      long groupId,
      long kbFolderId,
      com.liferay.portal.kernel.util.OrderByComparator<com.liferay.knowledge.base.model.KBFolder>
          obc)
      throws com.liferay.portal.kernel.exception.PortalException {
    return getService().fetchFirstChildKBFolder(groupId, kbFolderId, obc);
  }

  public static com.liferay.knowledge.base.model.KBFolder fetchKBFolder(
      java.lang.String uuid, long groupId) {
    return getService().fetchKBFolder(uuid, groupId);
  }

  public static com.liferay.knowledge.base.model.KBFolder fetchKBFolder(long kbFolderId) {
    return getService().fetchKBFolder(kbFolderId);
  }

  public static com.liferay.knowledge.base.model.KBFolder fetchKBFolderByUrlTitle(
      long groupId, long parentKbFolderId, java.lang.String urlTitle)
      throws com.liferay.portal.kernel.exception.PortalException {
    return getService().fetchKBFolderByUrlTitle(groupId, parentKbFolderId, urlTitle);
  }

  /**
   * Returns the kb folder matching the UUID and group.
   *
   * @param uuid the kb folder's UUID
   * @param groupId the primary key of the group
   * @return the matching kb folder, or <code>null</code> if a matching kb folder could not be found
   */
  public static com.liferay.knowledge.base.model.KBFolder fetchKBFolderByUuidAndGroupId(
      java.lang.String uuid, long groupId) {
    return getService().fetchKBFolderByUuidAndGroupId(uuid, groupId);
  }

  /**
   * Returns the kb folder with the primary key.
   *
   * @param kbFolderId the primary key of the kb folder
   * @return the kb folder
   * @throws PortalException if a kb folder with the primary key could not be found
   */
  public static com.liferay.knowledge.base.model.KBFolder getKBFolder(long kbFolderId)
      throws com.liferay.portal.kernel.exception.PortalException {
    return getService().getKBFolder(kbFolderId);
  }

  public static com.liferay.knowledge.base.model.KBFolder getKBFolderByUrlTitle(
      long groupId, long parentKbFolderId, java.lang.String urlTitle)
      throws com.liferay.portal.kernel.exception.PortalException {
    return getService().getKBFolderByUrlTitle(groupId, parentKbFolderId, urlTitle);
  }

  /**
   * Returns the kb folder matching the UUID and group.
   *
   * @param uuid the kb folder's UUID
   * @param groupId the primary key of the group
   * @return the matching kb folder
   * @throws PortalException if a matching kb folder could not be found
   */
  public static com.liferay.knowledge.base.model.KBFolder getKBFolderByUuidAndGroupId(
      java.lang.String uuid, long groupId)
      throws com.liferay.portal.kernel.exception.PortalException {
    return getService().getKBFolderByUuidAndGroupId(uuid, groupId);
  }

  /**
   * Updates the kb folder in the database or adds it if it does not yet exist. Also notifies the
   * appropriate model listeners.
   *
   * @param kbFolder the kb folder
   * @return the kb folder that was updated
   */
  public static com.liferay.knowledge.base.model.KBFolder updateKBFolder(
      com.liferay.knowledge.base.model.KBFolder kbFolder) {
    return getService().updateKBFolder(kbFolder);
  }

  /**
   * @deprecated As of 1.1.0, replaced by {@link #updateKBFolder(long, long, long, String, String,
   *     ServiceContext)}
   */
  @Deprecated
  public static com.liferay.knowledge.base.model.KBFolder updateKBFolder(
      long parentResourceClassNameId,
      long parentResourcePrimKey,
      long kbFolderId,
      java.lang.String name,
      java.lang.String description)
      throws com.liferay.portal.kernel.exception.PortalException {
    return getService()
        .updateKBFolder(
            parentResourceClassNameId, parentResourcePrimKey, kbFolderId, name, description);
  }

  public static com.liferay.knowledge.base.model.KBFolder updateKBFolder(
      long parentResourceClassNameId,
      long parentResourcePrimKey,
      long kbFolderId,
      java.lang.String name,
      java.lang.String description,
      com.liferay.portal.kernel.service.ServiceContext serviceContext)
      throws com.liferay.portal.kernel.exception.PortalException {
    return getService()
        .updateKBFolder(
            parentResourceClassNameId,
            parentResourcePrimKey,
            kbFolderId,
            name,
            description,
            serviceContext);
  }

  public static com.liferay.portal.kernel.dao.orm.ActionableDynamicQuery
      getActionableDynamicQuery() {
    return getService().getActionableDynamicQuery();
  }

  public static com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery() {
    return getService().dynamicQuery();
  }

  public static com.liferay.portal.kernel.dao.orm.ExportActionableDynamicQuery
      getExportActionableDynamicQuery(
          com.liferay.exportimport.kernel.lar.PortletDataContext portletDataContext) {
    return getService().getExportActionableDynamicQuery(portletDataContext);
  }

  public static com.liferay.portal.kernel.dao.orm.IndexableActionableDynamicQuery
      getIndexableActionableDynamicQuery() {
    return getService().getIndexableActionableDynamicQuery();
  }

  /** @throws PortalException */
  public static com.liferay.portal.kernel.model.PersistedModel deletePersistedModel(
      com.liferay.portal.kernel.model.PersistedModel persistedModel)
      throws com.liferay.portal.kernel.exception.PortalException {
    return getService().deletePersistedModel(persistedModel);
  }

  public static com.liferay.portal.kernel.model.PersistedModel getPersistedModel(
      java.io.Serializable primaryKeyObj)
      throws com.liferay.portal.kernel.exception.PortalException {
    return getService().getPersistedModel(primaryKeyObj);
  }

  public static int getKBFoldersAndKBArticlesCount(
      long groupId, long parentResourcePrimKey, int status) {
    return getService().getKBFoldersAndKBArticlesCount(groupId, parentResourcePrimKey, status);
  }

  /**
   * Returns the number of kb folders.
   *
   * @return the number of kb folders
   */
  public static int getKBFoldersCount() {
    return getService().getKBFoldersCount();
  }

  public static int getKBFoldersCount(long groupId, long parentKBFolderId)
      throws com.liferay.portal.kernel.exception.PortalException {
    return getService().getKBFoldersCount(groupId, parentKBFolderId);
  }

  /**
   * Returns the OSGi service identifier.
   *
   * @return the OSGi service identifier
   */
  public static java.lang.String getOSGiServiceIdentifier() {
    return getService().getOSGiServiceIdentifier();
  }

  /**
   * Performs a dynamic query on the database and returns the matching rows.
   *
   * @param dynamicQuery the dynamic query
   * @return the matching rows
   */
  public static <T> java.util.List<T> dynamicQuery(
      com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery) {
    return getService().dynamicQuery(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.knowledge.base.model.impl.KBFolderModelImpl}. 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.
   *
   * @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
   */
  public static <T> java.util.List<T> dynamicQuery(
      com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start, int end) {
    return getService().dynamicQuery(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.knowledge.base.model.impl.KBFolderModelImpl}. 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.
   *
   * @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
   */
  public static <T> java.util.List<T> dynamicQuery(
      com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery,
      int start,
      int end,
      com.liferay.portal.kernel.util.OrderByComparator<T> orderByComparator) {
    return getService().dynamicQuery(dynamicQuery, start, end, orderByComparator);
  }

  /**
   * Returns a range of all the kb folders.
   *
   * <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.knowledge.base.model.impl.KBFolderModelImpl}. 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.
   *
   * @param start the lower bound of the range of kb folders
   * @param end the upper bound of the range of kb folders (not inclusive)
   * @return the range of kb folders
   */
  public static java.util.List<com.liferay.knowledge.base.model.KBFolder> getKBFolders(
      int start, int end) {
    return getService().getKBFolders(start, end);
  }

  public static java.util.List<com.liferay.knowledge.base.model.KBFolder> getKBFolders(
      long groupId, long parentKBFolderId, int start, int end)
      throws com.liferay.portal.kernel.exception.PortalException {
    return getService().getKBFolders(groupId, parentKBFolderId, start, end);
  }

  public static java.util.List<java.lang.Object> getKBFoldersAndKBArticles(
      long groupId,
      long parentResourcePrimKey,
      int status,
      int start,
      int end,
      com.liferay.portal.kernel.util.OrderByComparator<?> orderByComparator) {
    return getService()
        .getKBFoldersAndKBArticles(
            groupId, parentResourcePrimKey, status, start, end, orderByComparator);
  }

  /**
   * Returns all the kb folders matching the UUID and company.
   *
   * @param uuid the UUID of the kb folders
   * @param companyId the primary key of the company
   * @return the matching kb folders, or an empty list if no matches were found
   */
  public static java.util.List<com.liferay.knowledge.base.model.KBFolder>
      getKBFoldersByUuidAndCompanyId(java.lang.String uuid, long companyId) {
    return getService().getKBFoldersByUuidAndCompanyId(uuid, companyId);
  }

  /**
   * Returns a range of kb folders matching the UUID and company.
   *
   * @param uuid the UUID of the kb folders
   * @param companyId the primary key of the company
   * @param start the lower bound of the range of kb folders
   * @param end the upper bound of the range of kb folders (not inclusive)
   * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
   * @return the range of matching kb folders, or an empty list if no matches were found
   */
  public static java.util.List<com.liferay.knowledge.base.model.KBFolder>
      getKBFoldersByUuidAndCompanyId(
          java.lang.String uuid,
          long companyId,
          int start,
          int end,
          com.liferay.portal.kernel.util.OrderByComparator<
                  com.liferay.knowledge.base.model.KBFolder>
              orderByComparator) {
    return getService()
        .getKBFoldersByUuidAndCompanyId(uuid, companyId, start, end, orderByComparator);
  }

  /**
   * Returns the number of rows matching the dynamic query.
   *
   * @param dynamicQuery the dynamic query
   * @return the number of rows matching the dynamic query
   */
  public static long dynamicQueryCount(
      com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery) {
    return getService().dynamicQueryCount(dynamicQuery);
  }

  /**
   * Returns the number of rows matching the dynamic query.
   *
   * @param dynamicQuery the dynamic query
   * @param projection the projection to apply to the query
   * @return the number of rows matching the dynamic query
   */
  public static long dynamicQueryCount(
      com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery,
      com.liferay.portal.kernel.dao.orm.Projection projection) {
    return getService().dynamicQueryCount(dynamicQuery, projection);
  }

  public static void moveKBFolder(long kbFolderId, long parentKBFolderId)
      throws com.liferay.portal.kernel.exception.PortalException {
    getService().moveKBFolder(kbFolderId, parentKBFolderId);
  }

  public static KBFolderLocalService getService() {
    return _serviceTracker.getService();
  }

  private static ServiceTracker<KBFolderLocalService, KBFolderLocalService> _serviceTracker =
      ServiceTrackerFactory.open(KBFolderLocalService.class);
}
/**
 * Provides the local service utility for MicroblogsEntry. This utility wraps {@link
 * com.liferay.microblogs.service.impl.MicroblogsEntryLocalServiceImpl} and is the primary access
 * point for service operations in application layer code running on the local server. 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 Brian Wing Shun Chan
 * @see MicroblogsEntryLocalService
 * @see com.liferay.microblogs.service.base.MicroblogsEntryLocalServiceBaseImpl
 * @see com.liferay.microblogs.service.impl.MicroblogsEntryLocalServiceImpl
 * @generated
 */
@ProviderType
public class MicroblogsEntryLocalServiceUtil {
  /*
   * NOTE FOR DEVELOPERS:
   *
   * Never modify this class directly. Add custom service methods to {@link com.liferay.microblogs.service.impl.MicroblogsEntryLocalServiceImpl} and rerun ServiceBuilder to regenerate this class.
   */

  /**
   * Adds the microblogs entry to the database. Also notifies the appropriate model listeners.
   *
   * @param microblogsEntry the microblogs entry
   * @return the microblogs entry that was added
   */
  public static com.liferay.microblogs.model.MicroblogsEntry addMicroblogsEntry(
      com.liferay.microblogs.model.MicroblogsEntry microblogsEntry) {
    return getService().addMicroblogsEntry(microblogsEntry);
  }

  public static com.liferay.microblogs.model.MicroblogsEntry addMicroblogsEntry(
      long userId,
      java.lang.String content,
      int type,
      long parentMicroblogsEntryId,
      int socialRelationType,
      com.liferay.portal.kernel.service.ServiceContext serviceContext)
      throws com.liferay.portal.kernel.exception.PortalException {
    return getService()
        .addMicroblogsEntry(
            userId, content, type, parentMicroblogsEntryId, socialRelationType, serviceContext);
  }

  public static com.liferay.microblogs.model.MicroblogsEntry addMicroblogsEntry(
      long userId,
      long creatorClassNameId,
      long creatorClassPK,
      java.lang.String content,
      int type,
      long parentMicroblogsEntryId,
      int socialRelationType,
      com.liferay.portal.kernel.service.ServiceContext serviceContext)
      throws com.liferay.portal.kernel.exception.PortalException {
    return getService()
        .addMicroblogsEntry(
            userId,
            creatorClassNameId,
            creatorClassPK,
            content,
            type,
            parentMicroblogsEntryId,
            socialRelationType,
            serviceContext);
  }

  /**
   * Creates a new microblogs entry with the primary key. Does not add the microblogs entry to the
   * database.
   *
   * @param microblogsEntryId the primary key for the new microblogs entry
   * @return the new microblogs entry
   */
  public static com.liferay.microblogs.model.MicroblogsEntry createMicroblogsEntry(
      long microblogsEntryId) {
    return getService().createMicroblogsEntry(microblogsEntryId);
  }

  /**
   * Deletes the microblogs entry from the database. Also notifies the appropriate model listeners.
   *
   * @param microblogsEntry the microblogs entry
   * @return the microblogs entry that was removed
   * @throws PortalException
   */
  public static com.liferay.microblogs.model.MicroblogsEntry deleteMicroblogsEntry(
      com.liferay.microblogs.model.MicroblogsEntry microblogsEntry)
      throws com.liferay.portal.kernel.exception.PortalException {
    return getService().deleteMicroblogsEntry(microblogsEntry);
  }

  /**
   * Deletes the microblogs entry with the primary key from the database. Also notifies the
   * appropriate model listeners.
   *
   * @param microblogsEntryId the primary key of the microblogs entry
   * @return the microblogs entry that was removed
   * @throws PortalException if a microblogs entry with the primary key could not be found
   */
  public static com.liferay.microblogs.model.MicroblogsEntry deleteMicroblogsEntry(
      long microblogsEntryId) throws com.liferay.portal.kernel.exception.PortalException {
    return getService().deleteMicroblogsEntry(microblogsEntryId);
  }

  public static com.liferay.microblogs.model.MicroblogsEntry fetchMicroblogsEntry(
      long microblogsEntryId) {
    return getService().fetchMicroblogsEntry(microblogsEntryId);
  }

  /**
   * Returns the microblogs entry with the primary key.
   *
   * @param microblogsEntryId the primary key of the microblogs entry
   * @return the microblogs entry
   * @throws PortalException if a microblogs entry with the primary key could not be found
   */
  public static com.liferay.microblogs.model.MicroblogsEntry getMicroblogsEntry(
      long microblogsEntryId) throws com.liferay.portal.kernel.exception.PortalException {
    return getService().getMicroblogsEntry(microblogsEntryId);
  }

  /**
   * Updates the microblogs entry in the database or adds it if it does not yet exist. Also notifies
   * the appropriate model listeners.
   *
   * @param microblogsEntry the microblogs entry
   * @return the microblogs entry that was updated
   */
  public static com.liferay.microblogs.model.MicroblogsEntry updateMicroblogsEntry(
      com.liferay.microblogs.model.MicroblogsEntry microblogsEntry) {
    return getService().updateMicroblogsEntry(microblogsEntry);
  }

  public static com.liferay.microblogs.model.MicroblogsEntry updateMicroblogsEntry(
      long microblogsEntryId,
      java.lang.String content,
      int socialRelationType,
      com.liferay.portal.kernel.service.ServiceContext serviceContext)
      throws com.liferay.portal.kernel.exception.PortalException {
    return getService()
        .updateMicroblogsEntry(microblogsEntryId, content, socialRelationType, serviceContext);
  }

  public static com.liferay.portal.kernel.dao.orm.ActionableDynamicQuery
      getActionableDynamicQuery() {
    return getService().getActionableDynamicQuery();
  }

  public static com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery() {
    return getService().dynamicQuery();
  }

  public static com.liferay.portal.kernel.dao.orm.IndexableActionableDynamicQuery
      getIndexableActionableDynamicQuery() {
    return getService().getIndexableActionableDynamicQuery();
  }

  /** @throws PortalException */
  public static com.liferay.portal.kernel.model.PersistedModel deletePersistedModel(
      com.liferay.portal.kernel.model.PersistedModel persistedModel)
      throws com.liferay.portal.kernel.exception.PortalException {
    return getService().deletePersistedModel(persistedModel);
  }

  public static com.liferay.portal.kernel.model.PersistedModel getPersistedModel(
      java.io.Serializable primaryKeyObj)
      throws com.liferay.portal.kernel.exception.PortalException {
    return getService().getPersistedModel(primaryKeyObj);
  }

  public static int getCompanyMicroblogsEntriesCount(long companyId) {
    return getService().getCompanyMicroblogsEntriesCount(companyId);
  }

  /**
   * Returns the number of microblogs entries.
   *
   * @return the number of microblogs entries
   */
  public static int getMicroblogsEntriesCount() {
    return getService().getMicroblogsEntriesCount();
  }

  public static int getMicroblogsEntriesCount(
      long creatorClassNameId, java.lang.String assetTagName) {
    return getService().getMicroblogsEntriesCount(creatorClassNameId, assetTagName);
  }

  public static int getMicroblogsEntriesCount(long creatorClassNameId, long creatorClassPK) {
    return getService().getMicroblogsEntriesCount(creatorClassNameId, creatorClassPK);
  }

  public static int getMicroblogsEntriesCount(
      long creatorClassNameId, long creatorClassPK, int type) {
    return getService().getMicroblogsEntriesCount(creatorClassNameId, creatorClassPK, type);
  }

  public static int getMicroblogsEntriesCount(
      long creatorClassNameId,
      long creatorClassPK,
      java.lang.String assetTagName,
      boolean andOperator) {
    return getService()
        .getMicroblogsEntriesCount(creatorClassNameId, creatorClassPK, assetTagName, andOperator);
  }

  public static int getParentMicroblogsEntryMicroblogsEntriesCount(
      int type, long parentMicroblogsEntryId) {
    return getService()
        .getParentMicroblogsEntryMicroblogsEntriesCount(type, parentMicroblogsEntryId);
  }

  public static int getUserMicroblogsEntriesCount(long userId) {
    return getService().getUserMicroblogsEntriesCount(userId);
  }

  public static int getUserMicroblogsEntriesCount(long userId, int type) {
    return getService().getUserMicroblogsEntriesCount(userId, type);
  }

  /**
   * Returns the OSGi service identifier.
   *
   * @return the OSGi service identifier
   */
  public static java.lang.String getOSGiServiceIdentifier() {
    return getService().getOSGiServiceIdentifier();
  }

  /**
   * Performs a dynamic query on the database and returns the matching rows.
   *
   * @param dynamicQuery the dynamic query
   * @return the matching rows
   */
  public static <T> java.util.List<T> dynamicQuery(
      com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery) {
    return getService().dynamicQuery(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.microblogs.model.impl.MicroblogsEntryModelImpl}. 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.
   *
   * @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
   */
  public static <T> java.util.List<T> dynamicQuery(
      com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start, int end) {
    return getService().dynamicQuery(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.microblogs.model.impl.MicroblogsEntryModelImpl}. 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.
   *
   * @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
   */
  public static <T> java.util.List<T> dynamicQuery(
      com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery,
      int start,
      int end,
      com.liferay.portal.kernel.util.OrderByComparator<T> orderByComparator) {
    return getService().dynamicQuery(dynamicQuery, start, end, orderByComparator);
  }

  public static java.util.List<com.liferay.microblogs.model.MicroblogsEntry>
      getCompanyMicroblogsEntries(long companyId, int start, int end) {
    return getService().getCompanyMicroblogsEntries(companyId, start, end);
  }

  /**
   * Returns a range of all the microblogs entries.
   *
   * <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.microblogs.model.impl.MicroblogsEntryModelImpl}. 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.
   *
   * @param start the lower bound of the range of microblogs entries
   * @param end the upper bound of the range of microblogs entries (not inclusive)
   * @return the range of microblogs entries
   */
  public static java.util.List<com.liferay.microblogs.model.MicroblogsEntry> getMicroblogsEntries(
      int start, int end) {
    return getService().getMicroblogsEntries(start, end);
  }

  public static java.util.List<com.liferay.microblogs.model.MicroblogsEntry> getMicroblogsEntries(
      long creatorClassNameId,
      int type,
      int start,
      int end,
      com.liferay.portal.kernel.util.OrderByComparator obc) {
    return getService().getMicroblogsEntries(creatorClassNameId, type, start, end, obc);
  }

  public static java.util.List<com.liferay.microblogs.model.MicroblogsEntry> getMicroblogsEntries(
      long creatorClassNameId, java.lang.String assetTagName, int start, int end) {
    return getService().getMicroblogsEntries(creatorClassNameId, assetTagName, start, end);
  }

  public static java.util.List<com.liferay.microblogs.model.MicroblogsEntry> getMicroblogsEntries(
      long creatorClassNameId, long creatorClassPK, int start, int end) {
    return getService().getMicroblogsEntries(creatorClassNameId, creatorClassPK, start, end);
  }

  public static java.util.List<com.liferay.microblogs.model.MicroblogsEntry> getMicroblogsEntries(
      long creatorClassNameId, long creatorClassPK, int type, int start, int end) {
    return getService().getMicroblogsEntries(creatorClassNameId, creatorClassPK, type, start, end);
  }

  public static java.util.List<com.liferay.microblogs.model.MicroblogsEntry> getMicroblogsEntries(
      long creatorClassNameId,
      long creatorClassPK,
      java.lang.String assetTagName,
      boolean andOperator,
      int start,
      int end) {
    return getService()
        .getMicroblogsEntries(
            creatorClassNameId, creatorClassPK, assetTagName, andOperator, start, end);
  }

  public static java.util.List<com.liferay.microblogs.model.MicroblogsEntry>
      getParentMicroblogsEntryMicroblogsEntries(
          int type, long parentMicroblogsEntryId, int start, int end) {
    return getService()
        .getParentMicroblogsEntryMicroblogsEntries(type, parentMicroblogsEntryId, start, end);
  }

  public static java.util.List<com.liferay.microblogs.model.MicroblogsEntry>
      getParentMicroblogsEntryMicroblogsEntries(
          int type,
          long parentMicroblogsEntryId,
          int start,
          int end,
          com.liferay.portal.kernel.util.OrderByComparator<
                  com.liferay.microblogs.model.MicroblogsEntry>
              orderByComparator) {
    return getService()
        .getParentMicroblogsEntryMicroblogsEntries(
            type, parentMicroblogsEntryId, start, end, orderByComparator);
  }

  public static java.util.List<com.liferay.microblogs.model.MicroblogsEntry>
      getUserMicroblogsEntries(long userId, int start, int end) {
    return getService().getUserMicroblogsEntries(userId, start, end);
  }

  public static java.util.List<com.liferay.microblogs.model.MicroblogsEntry>
      getUserMicroblogsEntries(long userId, int type, int start, int end) {
    return getService().getUserMicroblogsEntries(userId, type, start, end);
  }

  /**
   * Returns the number of rows matching the dynamic query.
   *
   * @param dynamicQuery the dynamic query
   * @return the number of rows matching the dynamic query
   */
  public static long dynamicQueryCount(
      com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery) {
    return getService().dynamicQueryCount(dynamicQuery);
  }

  /**
   * Returns the number of rows matching the dynamic query.
   *
   * @param dynamicQuery the dynamic query
   * @param projection the projection to apply to the query
   * @return the number of rows matching the dynamic query
   */
  public static long dynamicQueryCount(
      com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery,
      com.liferay.portal.kernel.dao.orm.Projection projection) {
    return getService().dynamicQueryCount(dynamicQuery, projection);
  }

  public static void deleteMicroblogsEntries(long creatorClassNameId, long creatorClassPK)
      throws com.liferay.portal.kernel.exception.PortalException {
    getService().deleteMicroblogsEntries(creatorClassNameId, creatorClassPK);
  }

  public static void deleteUserMicroblogsEntries(long userId)
      throws com.liferay.portal.kernel.exception.PortalException {
    getService().deleteUserMicroblogsEntries(userId);
  }

  public static void updateAsset(
      com.liferay.microblogs.model.MicroblogsEntry microblogsEntry,
      long[] assetCategoryIds,
      java.lang.String[] assetTagNames)
      throws com.liferay.portal.kernel.exception.PortalException {
    getService().updateAsset(microblogsEntry, assetCategoryIds, assetTagNames);
  }

  public static MicroblogsEntryLocalService getService() {
    return _serviceTracker.getService();
  }

  private static ServiceTracker<MicroblogsEntryLocalService, MicroblogsEntryLocalService>
      _serviceTracker = ServiceTrackerFactory.open(MicroblogsEntryLocalService.class);
}
/**
 * Provides the remote service utility for DDMDataProviderInstance. This utility wraps {@link
 * com.liferay.dynamic.data.mapping.service.impl.DDMDataProviderInstanceServiceImpl} and is the
 * primary access point for service operations in application layer code running on a remote server.
 * Methods of this service are expected to have security checks based on the propagated JAAS
 * credentials because this service can be accessed remotely.
 *
 * @author Brian Wing Shun Chan
 * @see DDMDataProviderInstanceService
 * @see com.liferay.dynamic.data.mapping.service.base.DDMDataProviderInstanceServiceBaseImpl
 * @see com.liferay.dynamic.data.mapping.service.impl.DDMDataProviderInstanceServiceImpl
 * @generated
 */
@ProviderType
public class DDMDataProviderInstanceServiceUtil {
  /*
   * NOTE FOR DEVELOPERS:
   *
   * Never modify this class directly. Add custom service methods to {@link com.liferay.dynamic.data.mapping.service.impl.DDMDataProviderInstanceServiceImpl} and rerun ServiceBuilder to regenerate this class.
   */
  public static com.liferay.dynamic.data.mapping.model.DDMDataProviderInstance
      addDataProviderInstance(
          long groupId,
          java.util.Map<java.util.Locale, java.lang.String> nameMap,
          java.util.Map<java.util.Locale, java.lang.String> descriptionMap,
          com.liferay.dynamic.data.mapping.storage.DDMFormValues ddmFormValues,
          java.lang.String type,
          com.liferay.portal.kernel.service.ServiceContext serviceContext)
          throws com.liferay.portal.kernel.exception.PortalException {
    return getService()
        .addDataProviderInstance(
            groupId, nameMap, descriptionMap, ddmFormValues, type, serviceContext);
  }

  public static com.liferay.dynamic.data.mapping.model.DDMDataProviderInstance
      fetchDataProviderInstance(long dataProviderInstanceId)
          throws com.liferay.portal.kernel.exception.PortalException {
    return getService().fetchDataProviderInstance(dataProviderInstanceId);
  }

  public static com.liferay.dynamic.data.mapping.model.DDMDataProviderInstance
      fetchDataProviderInstanceByUuid(java.lang.String uuid)
          throws com.liferay.portal.kernel.exception.PortalException {
    return getService().fetchDataProviderInstanceByUuid(uuid);
  }

  public static com.liferay.dynamic.data.mapping.model.DDMDataProviderInstance
      getDataProviderInstance(long dataProviderInstanceId)
          throws com.liferay.portal.kernel.exception.PortalException {
    return getService().getDataProviderInstance(dataProviderInstanceId);
  }

  public static com.liferay.dynamic.data.mapping.model.DDMDataProviderInstance
      getDataProviderInstanceByUuid(java.lang.String uuid)
          throws com.liferay.portal.kernel.exception.PortalException {
    return getService().getDataProviderInstanceByUuid(uuid);
  }

  public static com.liferay.dynamic.data.mapping.model.DDMDataProviderInstance
      updateDataProviderInstance(
          long dataProviderInstanceId,
          java.util.Map<java.util.Locale, java.lang.String> nameMap,
          java.util.Map<java.util.Locale, java.lang.String> descriptionMap,
          com.liferay.dynamic.data.mapping.storage.DDMFormValues ddmFormValues,
          com.liferay.portal.kernel.service.ServiceContext serviceContext)
          throws com.liferay.portal.kernel.exception.PortalException {
    return getService()
        .updateDataProviderInstance(
            dataProviderInstanceId, nameMap, descriptionMap, ddmFormValues, serviceContext);
  }

  public static int searchCount(long companyId, long[] groupIds, java.lang.String keywords) {
    return getService().searchCount(companyId, groupIds, keywords);
  }

  public static int searchCount(
      long companyId,
      long[] groupIds,
      java.lang.String name,
      java.lang.String description,
      boolean andOperator) {
    return getService().searchCount(companyId, groupIds, name, description, andOperator);
  }

  /**
   * Returns the OSGi service identifier.
   *
   * @return the OSGi service identifier
   */
  public static java.lang.String getOSGiServiceIdentifier() {
    return getService().getOSGiServiceIdentifier();
  }

  public static java.util.List<com.liferay.dynamic.data.mapping.model.DDMDataProviderInstance>
      search(
          long companyId,
          long[] groupIds,
          java.lang.String keywords,
          int start,
          int end,
          com.liferay.portal.kernel.util.OrderByComparator<
                  com.liferay.dynamic.data.mapping.model.DDMDataProviderInstance>
              orderByComparator) {
    return getService().search(companyId, groupIds, keywords, start, end, orderByComparator);
  }

  public static java.util.List<com.liferay.dynamic.data.mapping.model.DDMDataProviderInstance>
      search(
          long companyId,
          long[] groupIds,
          java.lang.String name,
          java.lang.String description,
          boolean andOperator,
          int start,
          int end,
          com.liferay.portal.kernel.util.OrderByComparator<
                  com.liferay.dynamic.data.mapping.model.DDMDataProviderInstance>
              orderByComparator) {
    return getService()
        .search(companyId, groupIds, name, description, andOperator, start, end, orderByComparator);
  }

  public static void deleteDataProviderInstance(long dataProviderInstanceId)
      throws com.liferay.portal.kernel.exception.PortalException {
    getService().deleteDataProviderInstance(dataProviderInstanceId);
  }

  public static DDMDataProviderInstanceService getService() {
    return _serviceTracker.getService();
  }

  private static ServiceTracker<DDMDataProviderInstanceService, DDMDataProviderInstanceService>
      _serviceTracker = ServiceTrackerFactory.open(DDMDataProviderInstanceService.class);
}
 public static <T> T throwException(Throwable throwable) {
   return ServiceTrackerFactory.<T, RuntimeException>_throwException(throwable);
 }
  @Override
  public void start() throws Exception {
    final BundleContext bundleContext = _bundle.getBundleContext();

    String filter =
        "(&(objectClass="
            + ServletContext.class.getName()
            + ")(osgi.web.symbolicname="
            + _bundle.getSymbolicName()
            + "))";

    _serviceTracker =
        ServiceTrackerFactory.open(
            bundleContext,
            filter,
            new ServiceTrackerCustomizer<ServletContext, Collection<ServiceRegistration<?>>>() {

              @Override
              public Collection<ServiceRegistration<?>> addingService(
                  ServiceReference<ServletContext> serviceReference) {

                Collection<ServiceRegistration<?>> serviceRegistrations = new ArrayList<>();

                ServletContext servletContext = bundleContext.getService(serviceReference);

                serviceRegistrations.add(
                    bundleContext.registerService(
                        PortalWebResources.class.getName(),
                        new ThemeContributorPortalWebResources(servletContext),
                        null));

                String contextPath = servletContext.getContextPath();

                _bundleWebResources.setServletContextPath(contextPath);

                serviceRegistrations.add(
                    bundleContext.registerService(
                        BundleWebResources.class, _bundleWebResources, null));

                return serviceRegistrations;
              }

              @Override
              public void modifiedService(
                  ServiceReference<ServletContext> serviceReference,
                  Collection<ServiceRegistration<?>> service) {

                removedService(serviceReference, service);

                addingService(serviceReference);
              }

              @Override
              public void removedService(
                  ServiceReference<ServletContext> serviceReference,
                  Collection<ServiceRegistration<?>> serviceRegistrations) {

                for (ServiceRegistration<?> serviceRegistration : serviceRegistrations) {

                  serviceRegistration.unregister();
                }

                bundleContext.ungetService(serviceReference);
              }
            });
  }
/**
 * The persistence utility for the d d m structure version service. This utility wraps {@link
 * com.liferay.dynamic.data.mapping.service.persistence.impl.DDMStructureVersionPersistenceImpl} and
 * provides direct access to the database for CRUD operations. This utility should only be used by
 * the service layer, as it must operate within a transaction. Never access this utility in a JSP,
 * controller, model, or other front-end class.
 *
 * <p>Caching information and settings can be found in <code>portal.properties</code>
 *
 * @author Brian Wing Shun Chan
 * @see DDMStructureVersionPersistence
 * @see com.liferay.dynamic.data.mapping.service.persistence.impl.DDMStructureVersionPersistenceImpl
 * @generated
 */
@ProviderType
public class DDMStructureVersionUtil {
  /*
   * NOTE FOR DEVELOPERS:
   *
   * Never modify this class directly. Modify <code>service.xml</code> and rerun ServiceBuilder to regenerate this class.
   */

  /** @see com.liferay.portal.kernel.service.persistence.BasePersistence#clearCache() */
  public static void clearCache() {
    getPersistence().clearCache();
  }

  /**
   * @see
   *     com.liferay.portal.kernel.service.persistence.BasePersistence#clearCache(com.liferay.portal.kernel.model.BaseModel)
   */
  public static void clearCache(DDMStructureVersion ddmStructureVersion) {
    getPersistence().clearCache(ddmStructureVersion);
  }

  /**
   * @see
   *     com.liferay.portal.kernel.service.persistence.BasePersistence#countWithDynamicQuery(DynamicQuery)
   */
  public static long countWithDynamicQuery(DynamicQuery dynamicQuery) {
    return getPersistence().countWithDynamicQuery(dynamicQuery);
  }

  /**
   * @see
   *     com.liferay.portal.kernel.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery)
   */
  public static List<DDMStructureVersion> findWithDynamicQuery(DynamicQuery dynamicQuery) {
    return getPersistence().findWithDynamicQuery(dynamicQuery);
  }

  /**
   * @see
   *     com.liferay.portal.kernel.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery,
   *     int, int)
   */
  public static List<DDMStructureVersion> findWithDynamicQuery(
      DynamicQuery dynamicQuery, int start, int end) {
    return getPersistence().findWithDynamicQuery(dynamicQuery, start, end);
  }

  /**
   * @see
   *     com.liferay.portal.kernel.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery,
   *     int, int, OrderByComparator)
   */
  public static List<DDMStructureVersion> findWithDynamicQuery(
      DynamicQuery dynamicQuery,
      int start,
      int end,
      OrderByComparator<DDMStructureVersion> orderByComparator) {
    return getPersistence().findWithDynamicQuery(dynamicQuery, start, end, orderByComparator);
  }

  /**
   * @see
   *     com.liferay.portal.kernel.service.persistence.BasePersistence#update(com.liferay.portal.kernel.model.BaseModel)
   */
  public static DDMStructureVersion update(DDMStructureVersion ddmStructureVersion) {
    return getPersistence().update(ddmStructureVersion);
  }

  /**
   * @see
   *     com.liferay.portal.kernel.service.persistence.BasePersistence#update(com.liferay.portal.kernel.model.BaseModel,
   *     ServiceContext)
   */
  public static DDMStructureVersion update(
      DDMStructureVersion ddmStructureVersion, ServiceContext serviceContext) {
    return getPersistence().update(ddmStructureVersion, serviceContext);
  }

  /**
   * Returns all the d d m structure versions where structureId = &#63;.
   *
   * @param structureId the structure ID
   * @return the matching d d m structure versions
   */
  public static List<DDMStructureVersion> findByStructureId(long structureId) {
    return getPersistence().findByStructureId(structureId);
  }

  /**
   * Returns a range of all the d d m structure versions where structureId = &#63;.
   *
   * <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 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 QueryUtil#ALL_POS}), then the query will include
   * the default ORDER BY logic from {@link DDMStructureVersionModelImpl}. 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.
   *
   * @param structureId the structure ID
   * @param start the lower bound of the range of d d m structure versions
   * @param end the upper bound of the range of d d m structure versions (not inclusive)
   * @return the range of matching d d m structure versions
   */
  public static List<DDMStructureVersion> findByStructureId(long structureId, int start, int end) {
    return getPersistence().findByStructureId(structureId, start, end);
  }

  /**
   * Returns an ordered range of all the d d m structure versions where structureId = &#63;.
   *
   * <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 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 QueryUtil#ALL_POS}), then the query will include
   * the default ORDER BY logic from {@link DDMStructureVersionModelImpl}. 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.
   *
   * @param structureId the structure ID
   * @param start the lower bound of the range of d d m structure versions
   * @param end the upper bound of the range of d d m structure versions (not inclusive)
   * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
   * @return the ordered range of matching d d m structure versions
   */
  public static List<DDMStructureVersion> findByStructureId(
      long structureId,
      int start,
      int end,
      OrderByComparator<DDMStructureVersion> orderByComparator) {
    return getPersistence().findByStructureId(structureId, start, end, orderByComparator);
  }

  /**
   * Returns an ordered range of all the d d m structure versions where structureId = &#63;.
   *
   * <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 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 QueryUtil#ALL_POS}), then the query will include
   * the default ORDER BY logic from {@link DDMStructureVersionModelImpl}. 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.
   *
   * @param structureId the structure ID
   * @param start the lower bound of the range of d d m structure versions
   * @param end the upper bound of the range of d d m structure versions (not inclusive)
   * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
   * @param retrieveFromCache whether to retrieve from the finder cache
   * @return the ordered range of matching d d m structure versions
   */
  public static List<DDMStructureVersion> findByStructureId(
      long structureId,
      int start,
      int end,
      OrderByComparator<DDMStructureVersion> orderByComparator,
      boolean retrieveFromCache) {
    return getPersistence()
        .findByStructureId(structureId, start, end, orderByComparator, retrieveFromCache);
  }

  /**
   * Returns the first d d m structure version in the ordered set where structureId = &#63;.
   *
   * @param structureId the structure ID
   * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
   * @return the first matching d d m structure version
   * @throws NoSuchStructureVersionException if a matching d d m structure version could not be
   *     found
   */
  public static DDMStructureVersion findByStructureId_First(
      long structureId, OrderByComparator<DDMStructureVersion> orderByComparator)
      throws com.liferay.dynamic.data.mapping.exception.NoSuchStructureVersionException {
    return getPersistence().findByStructureId_First(structureId, orderByComparator);
  }

  /**
   * Returns the first d d m structure version in the ordered set where structureId = &#63;.
   *
   * @param structureId the structure ID
   * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
   * @return the first matching d d m structure version, or <code>null</code> if a matching d d m
   *     structure version could not be found
   */
  public static DDMStructureVersion fetchByStructureId_First(
      long structureId, OrderByComparator<DDMStructureVersion> orderByComparator) {
    return getPersistence().fetchByStructureId_First(structureId, orderByComparator);
  }

  /**
   * Returns the last d d m structure version in the ordered set where structureId = &#63;.
   *
   * @param structureId the structure ID
   * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
   * @return the last matching d d m structure version
   * @throws NoSuchStructureVersionException if a matching d d m structure version could not be
   *     found
   */
  public static DDMStructureVersion findByStructureId_Last(
      long structureId, OrderByComparator<DDMStructureVersion> orderByComparator)
      throws com.liferay.dynamic.data.mapping.exception.NoSuchStructureVersionException {
    return getPersistence().findByStructureId_Last(structureId, orderByComparator);
  }

  /**
   * Returns the last d d m structure version in the ordered set where structureId = &#63;.
   *
   * @param structureId the structure ID
   * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
   * @return the last matching d d m structure version, or <code>null</code> if a matching d d m
   *     structure version could not be found
   */
  public static DDMStructureVersion fetchByStructureId_Last(
      long structureId, OrderByComparator<DDMStructureVersion> orderByComparator) {
    return getPersistence().fetchByStructureId_Last(structureId, orderByComparator);
  }

  /**
   * Returns the d d m structure versions before and after the current d d m structure version in
   * the ordered set where structureId = &#63;.
   *
   * @param structureVersionId the primary key of the current d d m structure version
   * @param structureId the structure ID
   * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
   * @return the previous, current, and next d d m structure version
   * @throws NoSuchStructureVersionException if a d d m structure version with the primary key could
   *     not be found
   */
  public static DDMStructureVersion[] findByStructureId_PrevAndNext(
      long structureVersionId,
      long structureId,
      OrderByComparator<DDMStructureVersion> orderByComparator)
      throws com.liferay.dynamic.data.mapping.exception.NoSuchStructureVersionException {
    return getPersistence()
        .findByStructureId_PrevAndNext(structureVersionId, structureId, orderByComparator);
  }

  /**
   * Removes all the d d m structure versions where structureId = &#63; from the database.
   *
   * @param structureId the structure ID
   */
  public static void removeByStructureId(long structureId) {
    getPersistence().removeByStructureId(structureId);
  }

  /**
   * Returns the number of d d m structure versions where structureId = &#63;.
   *
   * @param structureId the structure ID
   * @return the number of matching d d m structure versions
   */
  public static int countByStructureId(long structureId) {
    return getPersistence().countByStructureId(structureId);
  }

  /**
   * Returns the d d m structure version where structureId = &#63; and version = &#63; or throws a
   * {@link NoSuchStructureVersionException} if it could not be found.
   *
   * @param structureId the structure ID
   * @param version the version
   * @return the matching d d m structure version
   * @throws NoSuchStructureVersionException if a matching d d m structure version could not be
   *     found
   */
  public static DDMStructureVersion findByS_V(long structureId, java.lang.String version)
      throws com.liferay.dynamic.data.mapping.exception.NoSuchStructureVersionException {
    return getPersistence().findByS_V(structureId, version);
  }

  /**
   * Returns the d d m structure version where structureId = &#63; and version = &#63; or returns
   * <code>null</code> if it could not be found. Uses the finder cache.
   *
   * @param structureId the structure ID
   * @param version the version
   * @return the matching d d m structure version, or <code>null</code> if a matching d d m
   *     structure version could not be found
   */
  public static DDMStructureVersion fetchByS_V(long structureId, java.lang.String version) {
    return getPersistence().fetchByS_V(structureId, version);
  }

  /**
   * Returns the d d m structure version where structureId = &#63; and version = &#63; or returns
   * <code>null</code> if it could not be found, optionally using the finder cache.
   *
   * @param structureId the structure ID
   * @param version the version
   * @param retrieveFromCache whether to retrieve from the finder cache
   * @return the matching d d m structure version, or <code>null</code> if a matching d d m
   *     structure version could not be found
   */
  public static DDMStructureVersion fetchByS_V(
      long structureId, java.lang.String version, boolean retrieveFromCache) {
    return getPersistence().fetchByS_V(structureId, version, retrieveFromCache);
  }

  /**
   * Removes the d d m structure version where structureId = &#63; and version = &#63; from the
   * database.
   *
   * @param structureId the structure ID
   * @param version the version
   * @return the d d m structure version that was removed
   */
  public static DDMStructureVersion removeByS_V(long structureId, java.lang.String version)
      throws com.liferay.dynamic.data.mapping.exception.NoSuchStructureVersionException {
    return getPersistence().removeByS_V(structureId, version);
  }

  /**
   * Returns the number of d d m structure versions where structureId = &#63; and version = &#63;.
   *
   * @param structureId the structure ID
   * @param version the version
   * @return the number of matching d d m structure versions
   */
  public static int countByS_V(long structureId, java.lang.String version) {
    return getPersistence().countByS_V(structureId, version);
  }

  /**
   * Returns all the d d m structure versions where structureId = &#63; and status = &#63;.
   *
   * @param structureId the structure ID
   * @param status the status
   * @return the matching d d m structure versions
   */
  public static List<DDMStructureVersion> findByS_S(long structureId, int status) {
    return getPersistence().findByS_S(structureId, status);
  }

  /**
   * Returns a range of all the d d m structure versions where structureId = &#63; and status =
   * &#63;.
   *
   * <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 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 QueryUtil#ALL_POS}), then the query will include
   * the default ORDER BY logic from {@link DDMStructureVersionModelImpl}. 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.
   *
   * @param structureId the structure ID
   * @param status the status
   * @param start the lower bound of the range of d d m structure versions
   * @param end the upper bound of the range of d d m structure versions (not inclusive)
   * @return the range of matching d d m structure versions
   */
  public static List<DDMStructureVersion> findByS_S(
      long structureId, int status, int start, int end) {
    return getPersistence().findByS_S(structureId, status, start, end);
  }

  /**
   * Returns an ordered range of all the d d m structure versions where structureId = &#63; and
   * status = &#63;.
   *
   * <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 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 QueryUtil#ALL_POS}), then the query will include
   * the default ORDER BY logic from {@link DDMStructureVersionModelImpl}. 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.
   *
   * @param structureId the structure ID
   * @param status the status
   * @param start the lower bound of the range of d d m structure versions
   * @param end the upper bound of the range of d d m structure versions (not inclusive)
   * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
   * @return the ordered range of matching d d m structure versions
   */
  public static List<DDMStructureVersion> findByS_S(
      long structureId,
      int status,
      int start,
      int end,
      OrderByComparator<DDMStructureVersion> orderByComparator) {
    return getPersistence().findByS_S(structureId, status, start, end, orderByComparator);
  }

  /**
   * Returns an ordered range of all the d d m structure versions where structureId = &#63; and
   * status = &#63;.
   *
   * <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 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 QueryUtil#ALL_POS}), then the query will include
   * the default ORDER BY logic from {@link DDMStructureVersionModelImpl}. 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.
   *
   * @param structureId the structure ID
   * @param status the status
   * @param start the lower bound of the range of d d m structure versions
   * @param end the upper bound of the range of d d m structure versions (not inclusive)
   * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
   * @param retrieveFromCache whether to retrieve from the finder cache
   * @return the ordered range of matching d d m structure versions
   */
  public static List<DDMStructureVersion> findByS_S(
      long structureId,
      int status,
      int start,
      int end,
      OrderByComparator<DDMStructureVersion> orderByComparator,
      boolean retrieveFromCache) {
    return getPersistence()
        .findByS_S(structureId, status, start, end, orderByComparator, retrieveFromCache);
  }

  /**
   * Returns the first d d m structure version in the ordered set where structureId = &#63; and
   * status = &#63;.
   *
   * @param structureId the structure ID
   * @param status the status
   * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
   * @return the first matching d d m structure version
   * @throws NoSuchStructureVersionException if a matching d d m structure version could not be
   *     found
   */
  public static DDMStructureVersion findByS_S_First(
      long structureId, int status, OrderByComparator<DDMStructureVersion> orderByComparator)
      throws com.liferay.dynamic.data.mapping.exception.NoSuchStructureVersionException {
    return getPersistence().findByS_S_First(structureId, status, orderByComparator);
  }

  /**
   * Returns the first d d m structure version in the ordered set where structureId = &#63; and
   * status = &#63;.
   *
   * @param structureId the structure ID
   * @param status the status
   * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
   * @return the first matching d d m structure version, or <code>null</code> if a matching d d m
   *     structure version could not be found
   */
  public static DDMStructureVersion fetchByS_S_First(
      long structureId, int status, OrderByComparator<DDMStructureVersion> orderByComparator) {
    return getPersistence().fetchByS_S_First(structureId, status, orderByComparator);
  }

  /**
   * Returns the last d d m structure version in the ordered set where structureId = &#63; and
   * status = &#63;.
   *
   * @param structureId the structure ID
   * @param status the status
   * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
   * @return the last matching d d m structure version
   * @throws NoSuchStructureVersionException if a matching d d m structure version could not be
   *     found
   */
  public static DDMStructureVersion findByS_S_Last(
      long structureId, int status, OrderByComparator<DDMStructureVersion> orderByComparator)
      throws com.liferay.dynamic.data.mapping.exception.NoSuchStructureVersionException {
    return getPersistence().findByS_S_Last(structureId, status, orderByComparator);
  }

  /**
   * Returns the last d d m structure version in the ordered set where structureId = &#63; and
   * status = &#63;.
   *
   * @param structureId the structure ID
   * @param status the status
   * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
   * @return the last matching d d m structure version, or <code>null</code> if a matching d d m
   *     structure version could not be found
   */
  public static DDMStructureVersion fetchByS_S_Last(
      long structureId, int status, OrderByComparator<DDMStructureVersion> orderByComparator) {
    return getPersistence().fetchByS_S_Last(structureId, status, orderByComparator);
  }

  /**
   * Returns the d d m structure versions before and after the current d d m structure version in
   * the ordered set where structureId = &#63; and status = &#63;.
   *
   * @param structureVersionId the primary key of the current d d m structure version
   * @param structureId the structure ID
   * @param status the status
   * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
   * @return the previous, current, and next d d m structure version
   * @throws NoSuchStructureVersionException if a d d m structure version with the primary key could
   *     not be found
   */
  public static DDMStructureVersion[] findByS_S_PrevAndNext(
      long structureVersionId,
      long structureId,
      int status,
      OrderByComparator<DDMStructureVersion> orderByComparator)
      throws com.liferay.dynamic.data.mapping.exception.NoSuchStructureVersionException {
    return getPersistence()
        .findByS_S_PrevAndNext(structureVersionId, structureId, status, orderByComparator);
  }

  /**
   * Removes all the d d m structure versions where structureId = &#63; and status = &#63; from the
   * database.
   *
   * @param structureId the structure ID
   * @param status the status
   */
  public static void removeByS_S(long structureId, int status) {
    getPersistence().removeByS_S(structureId, status);
  }

  /**
   * Returns the number of d d m structure versions where structureId = &#63; and status = &#63;.
   *
   * @param structureId the structure ID
   * @param status the status
   * @return the number of matching d d m structure versions
   */
  public static int countByS_S(long structureId, int status) {
    return getPersistence().countByS_S(structureId, status);
  }

  /**
   * Caches the d d m structure version in the entity cache if it is enabled.
   *
   * @param ddmStructureVersion the d d m structure version
   */
  public static void cacheResult(DDMStructureVersion ddmStructureVersion) {
    getPersistence().cacheResult(ddmStructureVersion);
  }

  /**
   * Caches the d d m structure versions in the entity cache if it is enabled.
   *
   * @param ddmStructureVersions the d d m structure versions
   */
  public static void cacheResult(List<DDMStructureVersion> ddmStructureVersions) {
    getPersistence().cacheResult(ddmStructureVersions);
  }

  /**
   * Creates a new d d m structure version with the primary key. Does not add the d d m structure
   * version to the database.
   *
   * @param structureVersionId the primary key for the new d d m structure version
   * @return the new d d m structure version
   */
  public static DDMStructureVersion create(long structureVersionId) {
    return getPersistence().create(structureVersionId);
  }

  /**
   * Removes the d d m structure version with the primary key from the database. Also notifies the
   * appropriate model listeners.
   *
   * @param structureVersionId the primary key of the d d m structure version
   * @return the d d m structure version that was removed
   * @throws NoSuchStructureVersionException if a d d m structure version with the primary key could
   *     not be found
   */
  public static DDMStructureVersion remove(long structureVersionId)
      throws com.liferay.dynamic.data.mapping.exception.NoSuchStructureVersionException {
    return getPersistence().remove(structureVersionId);
  }

  public static DDMStructureVersion updateImpl(DDMStructureVersion ddmStructureVersion) {
    return getPersistence().updateImpl(ddmStructureVersion);
  }

  /**
   * Returns the d d m structure version with the primary key or throws a {@link
   * NoSuchStructureVersionException} if it could not be found.
   *
   * @param structureVersionId the primary key of the d d m structure version
   * @return the d d m structure version
   * @throws NoSuchStructureVersionException if a d d m structure version with the primary key could
   *     not be found
   */
  public static DDMStructureVersion findByPrimaryKey(long structureVersionId)
      throws com.liferay.dynamic.data.mapping.exception.NoSuchStructureVersionException {
    return getPersistence().findByPrimaryKey(structureVersionId);
  }

  /**
   * Returns the d d m structure version with the primary key or returns <code>null</code> if it
   * could not be found.
   *
   * @param structureVersionId the primary key of the d d m structure version
   * @return the d d m structure version, or <code>null</code> if a d d m structure version with the
   *     primary key could not be found
   */
  public static DDMStructureVersion fetchByPrimaryKey(long structureVersionId) {
    return getPersistence().fetchByPrimaryKey(structureVersionId);
  }

  public static java.util.Map<java.io.Serializable, DDMStructureVersion> fetchByPrimaryKeys(
      java.util.Set<java.io.Serializable> primaryKeys) {
    return getPersistence().fetchByPrimaryKeys(primaryKeys);
  }

  /**
   * Returns all the d d m structure versions.
   *
   * @return the d d m structure versions
   */
  public static List<DDMStructureVersion> findAll() {
    return getPersistence().findAll();
  }

  /**
   * Returns a range of all the d d m structure versions.
   *
   * <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 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 QueryUtil#ALL_POS}), then the query will include
   * the default ORDER BY logic from {@link DDMStructureVersionModelImpl}. 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.
   *
   * @param start the lower bound of the range of d d m structure versions
   * @param end the upper bound of the range of d d m structure versions (not inclusive)
   * @return the range of d d m structure versions
   */
  public static List<DDMStructureVersion> findAll(int start, int end) {
    return getPersistence().findAll(start, end);
  }

  /**
   * Returns an ordered range of all the d d m structure versions.
   *
   * <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 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 QueryUtil#ALL_POS}), then the query will include
   * the default ORDER BY logic from {@link DDMStructureVersionModelImpl}. 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.
   *
   * @param start the lower bound of the range of d d m structure versions
   * @param end the upper bound of the range of d d m structure versions (not inclusive)
   * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
   * @return the ordered range of d d m structure versions
   */
  public static List<DDMStructureVersion> findAll(
      int start, int end, OrderByComparator<DDMStructureVersion> orderByComparator) {
    return getPersistence().findAll(start, end, orderByComparator);
  }

  /**
   * Returns an ordered range of all the d d m structure versions.
   *
   * <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 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 QueryUtil#ALL_POS}), then the query will include
   * the default ORDER BY logic from {@link DDMStructureVersionModelImpl}. 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.
   *
   * @param start the lower bound of the range of d d m structure versions
   * @param end the upper bound of the range of d d m structure versions (not inclusive)
   * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
   * @param retrieveFromCache whether to retrieve from the finder cache
   * @return the ordered range of d d m structure versions
   */
  public static List<DDMStructureVersion> findAll(
      int start,
      int end,
      OrderByComparator<DDMStructureVersion> orderByComparator,
      boolean retrieveFromCache) {
    return getPersistence().findAll(start, end, orderByComparator, retrieveFromCache);
  }

  /** Removes all the d d m structure versions from the database. */
  public static void removeAll() {
    getPersistence().removeAll();
  }

  /**
   * Returns the number of d d m structure versions.
   *
   * @return the number of d d m structure versions
   */
  public static int countAll() {
    return getPersistence().countAll();
  }

  public static java.util.Set<java.lang.String> getBadColumnNames() {
    return getPersistence().getBadColumnNames();
  }

  public static DDMStructureVersionPersistence getPersistence() {
    return _serviceTracker.getService();
  }

  private static ServiceTracker<DDMStructureVersionPersistence, DDMStructureVersionPersistence>
      _serviceTracker = ServiceTrackerFactory.open(DDMStructureVersionPersistence.class);
}
/**
 * Provides the remote service utility for ShoppingItem. This utility wraps {@link
 * com.liferay.shopping.service.impl.ShoppingItemServiceImpl} and is the primary access point for
 * service operations in application layer code running on a remote server. Methods of this service
 * are expected to have security checks based on the propagated JAAS credentials because this
 * service can be accessed remotely.
 *
 * @author Brian Wing Shun Chan
 * @see ShoppingItemService
 * @see com.liferay.shopping.service.base.ShoppingItemServiceBaseImpl
 * @see com.liferay.shopping.service.impl.ShoppingItemServiceImpl
 * @generated
 */
@ProviderType
public class ShoppingItemServiceUtil {
  /*
   * NOTE FOR DEVELOPERS:
   *
   * Never modify this class directly. Add custom service methods to {@link com.liferay.shopping.service.impl.ShoppingItemServiceImpl} and rerun ServiceBuilder to regenerate this class.
   */
  public static com.liferay.shopping.model.ShoppingItem addItem(
      long groupId,
      long categoryId,
      java.lang.String sku,
      java.lang.String name,
      java.lang.String description,
      java.lang.String properties,
      java.lang.String fieldsQuantities,
      boolean requiresShipping,
      int stockQuantity,
      boolean featured,
      java.lang.Boolean sale,
      boolean smallImage,
      java.lang.String smallImageURL,
      java.io.File smallFile,
      boolean mediumImage,
      java.lang.String mediumImageURL,
      java.io.File mediumFile,
      boolean largeImage,
      java.lang.String largeImageURL,
      java.io.File largeFile,
      java.util.List<com.liferay.shopping.model.ShoppingItemField> itemFields,
      java.util.List<com.liferay.shopping.model.ShoppingItemPrice> itemPrices,
      com.liferay.portal.service.ServiceContext serviceContext)
      throws com.liferay.portal.kernel.exception.PortalException {
    return getService()
        .addItem(
            groupId,
            categoryId,
            sku,
            name,
            description,
            properties,
            fieldsQuantities,
            requiresShipping,
            stockQuantity,
            featured,
            sale,
            smallImage,
            smallImageURL,
            smallFile,
            mediumImage,
            mediumImageURL,
            mediumFile,
            largeImage,
            largeImageURL,
            largeFile,
            itemFields,
            itemPrices,
            serviceContext);
  }

  public static void deleteItem(long itemId)
      throws com.liferay.portal.kernel.exception.PortalException {
    getService().deleteItem(itemId);
  }

  public static int getCategoriesItemsCount(
      long groupId, java.util.List<java.lang.Long> categoryIds) {
    return getService().getCategoriesItemsCount(groupId, categoryIds);
  }

  public static com.liferay.shopping.model.ShoppingItem getItem(long itemId)
      throws com.liferay.portal.kernel.exception.PortalException {
    return getService().getItem(itemId);
  }

  public static java.util.List<com.liferay.shopping.model.ShoppingItem> getItems(
      long groupId, long categoryId) {
    return getService().getItems(groupId, categoryId);
  }

  public static java.util.List<com.liferay.shopping.model.ShoppingItem> getItems(
      long groupId,
      long categoryId,
      int start,
      int end,
      com.liferay.portal.kernel.util.OrderByComparator<com.liferay.shopping.model.ShoppingItem>
          obc) {
    return getService().getItems(groupId, categoryId, start, end, obc);
  }

  public static int getItemsCount(long groupId, long categoryId) {
    return getService().getItemsCount(groupId, categoryId);
  }

  public static com.liferay.shopping.model.ShoppingItem[] getItemsPrevAndNext(
      long itemId,
      com.liferay.portal.kernel.util.OrderByComparator<com.liferay.shopping.model.ShoppingItem> obc)
      throws com.liferay.portal.kernel.exception.PortalException {
    return getService().getItemsPrevAndNext(itemId, obc);
  }

  /**
   * Returns the OSGi service identifier.
   *
   * @return the OSGi service identifier
   */
  public static java.lang.String getOSGiServiceIdentifier() {
    return getService().getOSGiServiceIdentifier();
  }

  public static com.liferay.shopping.model.ShoppingItem updateItem(
      long itemId,
      long groupId,
      long categoryId,
      java.lang.String sku,
      java.lang.String name,
      java.lang.String description,
      java.lang.String properties,
      java.lang.String fieldsQuantities,
      boolean requiresShipping,
      int stockQuantity,
      boolean featured,
      java.lang.Boolean sale,
      boolean smallImage,
      java.lang.String smallImageURL,
      java.io.File smallFile,
      boolean mediumImage,
      java.lang.String mediumImageURL,
      java.io.File mediumFile,
      boolean largeImage,
      java.lang.String largeImageURL,
      java.io.File largeFile,
      java.util.List<com.liferay.shopping.model.ShoppingItemField> itemFields,
      java.util.List<com.liferay.shopping.model.ShoppingItemPrice> itemPrices,
      com.liferay.portal.service.ServiceContext serviceContext)
      throws com.liferay.portal.kernel.exception.PortalException {
    return getService()
        .updateItem(
            itemId,
            groupId,
            categoryId,
            sku,
            name,
            description,
            properties,
            fieldsQuantities,
            requiresShipping,
            stockQuantity,
            featured,
            sale,
            smallImage,
            smallImageURL,
            smallFile,
            mediumImage,
            mediumImageURL,
            mediumFile,
            largeImage,
            largeImageURL,
            largeFile,
            itemFields,
            itemPrices,
            serviceContext);
  }

  public static ShoppingItemService getService() {
    return _serviceTracker.getService();
  }

  private static ServiceTracker<ShoppingItemService, ShoppingItemService> _serviceTracker =
      ServiceTrackerFactory.open(ShoppingItemService.class);
}
/**
 * Provides the local service utility for Curriculum. This utility wraps {@link
 * hu.unideb.inf.service.impl.CurriculumLocalServiceImpl} and is the primary access point for
 * service operations in application layer code running on the local server. 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 Adam Kiss
 * @see CurriculumLocalService
 * @see hu.unideb.inf.service.base.CurriculumLocalServiceBaseImpl
 * @see hu.unideb.inf.service.impl.CurriculumLocalServiceImpl
 * @generated
 */
@ProviderType
public class CurriculumLocalServiceUtil {
  /*
   * NOTE FOR DEVELOPERS:
   *
   * Never modify this class directly. Add custom service methods to {@link hu.unideb.inf.service.impl.CurriculumLocalServiceImpl} and rerun ServiceBuilder to regenerate this class.
   */
  public static com.liferay.portal.kernel.dao.orm.ActionableDynamicQuery
      getActionableDynamicQuery() {
    return getService().getActionableDynamicQuery();
  }

  public static com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery() {
    return getService().dynamicQuery();
  }

  public static com.liferay.portal.kernel.dao.orm.IndexableActionableDynamicQuery
      getIndexableActionableDynamicQuery() {
    return getService().getIndexableActionableDynamicQuery();
  }

  /** @throws PortalException */
  public static com.liferay.portal.kernel.model.PersistedModel deletePersistedModel(
      com.liferay.portal.kernel.model.PersistedModel persistedModel)
      throws com.liferay.portal.kernel.exception.PortalException {
    return getService().deletePersistedModel(persistedModel);
  }

  public static com.liferay.portal.kernel.model.PersistedModel getPersistedModel(
      java.io.Serializable primaryKeyObj)
      throws com.liferay.portal.kernel.exception.PortalException {
    return getService().getPersistedModel(primaryKeyObj);
  }

  /**
   * Adds the curriculum to the database. Also notifies the appropriate model listeners.
   *
   * @param curriculum the curriculum
   * @return the curriculum that was added
   */
  public static hu.unideb.inf.model.Curriculum addCurriculum(
      hu.unideb.inf.model.Curriculum curriculum) {
    return getService().addCurriculum(curriculum);
  }

  public static hu.unideb.inf.model.Curriculum addCurriculum(
      java.lang.String curriculumCode,
      java.lang.String curriculumName,
      com.liferay.portal.kernel.service.ServiceContext serviceContext)
      throws com.liferay.portal.kernel.exception.PortalException,
          com.liferay.portal.kernel.exception.SystemException {
    return getService().addCurriculum(curriculumCode, curriculumName, serviceContext);
  }

  /**
   * Creates a new curriculum with the primary key. Does not add the curriculum to the database.
   *
   * @param curriculumId the primary key for the new curriculum
   * @return the new curriculum
   */
  public static hu.unideb.inf.model.Curriculum createCurriculum(long curriculumId) {
    return getService().createCurriculum(curriculumId);
  }

  /**
   * Deletes the curriculum from the database. Also notifies the appropriate model listeners.
   *
   * @param curriculum the curriculum
   * @return the curriculum that was removed
   */
  public static hu.unideb.inf.model.Curriculum deleteCurriculum(
      hu.unideb.inf.model.Curriculum curriculum) {
    return getService().deleteCurriculum(curriculum);
  }

  /**
   * Deletes the curriculum with the primary key from the database. Also notifies the appropriate
   * model listeners.
   *
   * @param curriculumId the primary key of the curriculum
   * @return the curriculum that was removed
   * @throws PortalException if a curriculum with the primary key could not be found
   */
  public static hu.unideb.inf.model.Curriculum deleteCurriculum(long curriculumId)
      throws com.liferay.portal.kernel.exception.PortalException {
    return getService().deleteCurriculum(curriculumId);
  }

  public static hu.unideb.inf.model.Curriculum deleteCurriculum(
      long curriculumId, com.liferay.portal.kernel.service.ServiceContext serviceContext)
      throws com.liferay.portal.kernel.exception.PortalException,
          com.liferay.portal.kernel.exception.SystemException {
    return getService().deleteCurriculum(curriculumId, serviceContext);
  }

  public static hu.unideb.inf.model.Curriculum fetchCurriculum(long curriculumId) {
    return getService().fetchCurriculum(curriculumId);
  }

  public static hu.unideb.inf.model.Curriculum fetchCurriculumByCode(
      java.lang.String curriculumCode) throws com.liferay.portal.kernel.exception.SystemException {
    return getService().fetchCurriculumByCode(curriculumCode);
  }

  /**
   * Returns the curriculum with the primary key.
   *
   * @param curriculumId the primary key of the curriculum
   * @return the curriculum
   * @throws PortalException if a curriculum with the primary key could not be found
   */
  public static hu.unideb.inf.model.Curriculum getCurriculum(long curriculumId)
      throws com.liferay.portal.kernel.exception.PortalException {
    return getService().getCurriculum(curriculumId);
  }

  public static hu.unideb.inf.model.Curriculum getCurriculumByCode(java.lang.String curriculumCode)
      throws com.liferay.portal.kernel.exception.SystemException,
          hu.unideb.inf.exception.NoSuchCurriculumException {
    return getService().getCurriculumByCode(curriculumCode);
  }

  /**
   * Updates the curriculum in the database or adds it if it does not yet exist. Also notifies the
   * appropriate model listeners.
   *
   * @param curriculum the curriculum
   * @return the curriculum that was updated
   */
  public static hu.unideb.inf.model.Curriculum updateCurriculum(
      hu.unideb.inf.model.Curriculum curriculum) {
    return getService().updateCurriculum(curriculum);
  }

  public static hu.unideb.inf.model.Curriculum updateCurriculum(
      long userId,
      long curriculumId,
      java.lang.String curriculumCode,
      java.lang.String curriculumName,
      com.liferay.portal.kernel.service.ServiceContext serviceContext)
      throws com.liferay.portal.kernel.exception.PortalException,
          com.liferay.portal.kernel.exception.SystemException {
    return getService()
        .updateCurriculum(userId, curriculumId, curriculumCode, curriculumName, serviceContext);
  }

  /**
   * Returns the number of curriculums.
   *
   * @return the number of curriculums
   */
  public static int getCurriculumsCount() {
    return getService().getCurriculumsCount();
  }

  /**
   * Returns the OSGi service identifier.
   *
   * @return the OSGi service identifier
   */
  public static java.lang.String getOSGiServiceIdentifier() {
    return getService().getOSGiServiceIdentifier();
  }

  /**
   * Performs a dynamic query on the database and returns the matching rows.
   *
   * @param dynamicQuery the dynamic query
   * @return the matching rows
   */
  public static <T> java.util.List<T> dynamicQuery(
      com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery) {
    return getService().dynamicQuery(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 hu.unideb.inf.model.impl.CurriculumModelImpl}. 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.
   *
   * @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
   */
  public static <T> java.util.List<T> dynamicQuery(
      com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start, int end) {
    return getService().dynamicQuery(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 hu.unideb.inf.model.impl.CurriculumModelImpl}. 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.
   *
   * @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
   */
  public static <T> java.util.List<T> dynamicQuery(
      com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery,
      int start,
      int end,
      com.liferay.portal.kernel.util.OrderByComparator<T> orderByComparator) {
    return getService().dynamicQuery(dynamicQuery, start, end, orderByComparator);
  }

  public static java.util.List<hu.unideb.inf.model.Curriculum> getCurriculums()
      throws com.liferay.portal.kernel.exception.SystemException {
    return getService().getCurriculums();
  }

  /**
   * Returns a range of all the curriculums.
   *
   * <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 hu.unideb.inf.model.impl.CurriculumModelImpl}. 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.
   *
   * @param start the lower bound of the range of curriculums
   * @param end the upper bound of the range of curriculums (not inclusive)
   * @return the range of curriculums
   */
  public static java.util.List<hu.unideb.inf.model.Curriculum> getCurriculums(int start, int end) {
    return getService().getCurriculums(start, end);
  }

  /**
   * Returns the number of rows matching the dynamic query.
   *
   * @param dynamicQuery the dynamic query
   * @return the number of rows matching the dynamic query
   */
  public static long dynamicQueryCount(
      com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery) {
    return getService().dynamicQueryCount(dynamicQuery);
  }

  /**
   * Returns the number of rows matching the dynamic query.
   *
   * @param dynamicQuery the dynamic query
   * @param projection the projection to apply to the query
   * @return the number of rows matching the dynamic query
   */
  public static long dynamicQueryCount(
      com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery,
      com.liferay.portal.kernel.dao.orm.Projection projection) {
    return getService().dynamicQueryCount(dynamicQuery, projection);
  }

  public static CurriculumLocalService getService() {
    return _serviceTracker.getService();
  }

  private static ServiceTracker<CurriculumLocalService, CurriculumLocalService> _serviceTracker =
      ServiceTrackerFactory.open(CurriculumLocalService.class);
}
/**
 * Provides the local service utility for WikiPageResource. This utility wraps {@link
 * com.liferay.wiki.service.impl.WikiPageResourceLocalServiceImpl} and is the primary access point
 * for service operations in application layer code running on the local server. 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 Brian Wing Shun Chan
 * @see WikiPageResourceLocalService
 * @see com.liferay.wiki.service.base.WikiPageResourceLocalServiceBaseImpl
 * @see com.liferay.wiki.service.impl.WikiPageResourceLocalServiceImpl
 * @generated
 */
@ProviderType
public class WikiPageResourceLocalServiceUtil {
  /*
   * NOTE FOR DEVELOPERS:
   *
   * Never modify this class directly. Add custom service methods to {@link com.liferay.wiki.service.impl.WikiPageResourceLocalServiceImpl} and rerun ServiceBuilder to regenerate this class.
   */
  public static com.liferay.wiki.model.WikiPageResource addPageResource(
      long groupId, long nodeId, java.lang.String title) {
    return getService().addPageResource(groupId, nodeId, title);
  }

  /** @deprecated As of 7.0.0, replaced by {@link #addPageResource(long, long, String)} */
  @Deprecated
  public static com.liferay.wiki.model.WikiPageResource addPageResource(
      long nodeId, java.lang.String title) {
    return getService().addPageResource(nodeId, title);
  }

  /**
   * Adds the wiki page resource to the database. Also notifies the appropriate model listeners.
   *
   * @param wikiPageResource the wiki page resource
   * @return the wiki page resource that was added
   */
  public static com.liferay.wiki.model.WikiPageResource addWikiPageResource(
      com.liferay.wiki.model.WikiPageResource wikiPageResource) {
    return getService().addWikiPageResource(wikiPageResource);
  }

  /**
   * Creates a new wiki page resource with the primary key. Does not add the wiki page resource to
   * the database.
   *
   * @param resourcePrimKey the primary key for the new wiki page resource
   * @return the new wiki page resource
   */
  public static com.liferay.wiki.model.WikiPageResource createWikiPageResource(
      long resourcePrimKey) {
    return getService().createWikiPageResource(resourcePrimKey);
  }

  public static void deletePageResource(long nodeId, java.lang.String title)
      throws com.liferay.portal.kernel.exception.PortalException {
    getService().deletePageResource(nodeId, title);
  }

  /** @throws PortalException */
  public static com.liferay.portal.kernel.model.PersistedModel deletePersistedModel(
      com.liferay.portal.kernel.model.PersistedModel persistedModel)
      throws com.liferay.portal.kernel.exception.PortalException {
    return getService().deletePersistedModel(persistedModel);
  }

  /**
   * Deletes the wiki page resource with the primary key from the database. Also notifies the
   * appropriate model listeners.
   *
   * @param resourcePrimKey the primary key of the wiki page resource
   * @return the wiki page resource that was removed
   * @throws PortalException if a wiki page resource with the primary key could not be found
   */
  public static com.liferay.wiki.model.WikiPageResource deleteWikiPageResource(long resourcePrimKey)
      throws com.liferay.portal.kernel.exception.PortalException {
    return getService().deleteWikiPageResource(resourcePrimKey);
  }

  /**
   * Deletes the wiki page resource from the database. Also notifies the appropriate model
   * listeners.
   *
   * @param wikiPageResource the wiki page resource
   * @return the wiki page resource that was removed
   */
  public static com.liferay.wiki.model.WikiPageResource deleteWikiPageResource(
      com.liferay.wiki.model.WikiPageResource wikiPageResource) {
    return getService().deleteWikiPageResource(wikiPageResource);
  }

  public static com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery() {
    return getService().dynamicQuery();
  }

  /**
   * Performs a dynamic query on the database and returns the matching rows.
   *
   * @param dynamicQuery the dynamic query
   * @return the matching rows
   */
  public static <T> java.util.List<T> dynamicQuery(
      com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery) {
    return getService().dynamicQuery(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.wiki.model.impl.WikiPageResourceModelImpl}. 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.
   *
   * @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
   */
  public static <T> java.util.List<T> dynamicQuery(
      com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start, int end) {
    return getService().dynamicQuery(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.wiki.model.impl.WikiPageResourceModelImpl}. 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.
   *
   * @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
   */
  public static <T> java.util.List<T> dynamicQuery(
      com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery,
      int start,
      int end,
      com.liferay.portal.kernel.util.OrderByComparator<T> orderByComparator) {
    return getService().dynamicQuery(dynamicQuery, start, end, orderByComparator);
  }

  /**
   * Returns the number of rows matching the dynamic query.
   *
   * @param dynamicQuery the dynamic query
   * @return the number of rows matching the dynamic query
   */
  public static long dynamicQueryCount(
      com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery) {
    return getService().dynamicQueryCount(dynamicQuery);
  }

  /**
   * Returns the number of rows matching the dynamic query.
   *
   * @param dynamicQuery the dynamic query
   * @param projection the projection to apply to the query
   * @return the number of rows matching the dynamic query
   */
  public static long dynamicQueryCount(
      com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery,
      com.liferay.portal.kernel.dao.orm.Projection projection) {
    return getService().dynamicQueryCount(dynamicQuery, projection);
  }

  public static com.liferay.wiki.model.WikiPageResource fetchPageResource(
      long nodeId, java.lang.String title) {
    return getService().fetchPageResource(nodeId, title);
  }

  public static com.liferay.wiki.model.WikiPageResource fetchPageResource(java.lang.String uuid) {
    return getService().fetchPageResource(uuid);
  }

  public static com.liferay.wiki.model.WikiPageResource fetchWikiPageResource(
      long resourcePrimKey) {
    return getService().fetchWikiPageResource(resourcePrimKey);
  }

  /**
   * Returns the wiki page resource matching the UUID and group.
   *
   * @param uuid the wiki page resource's UUID
   * @param groupId the primary key of the group
   * @return the matching wiki page resource, or <code>null</code> if a matching wiki page resource
   *     could not be found
   */
  public static com.liferay.wiki.model.WikiPageResource fetchWikiPageResourceByUuidAndGroupId(
      java.lang.String uuid, long groupId) {
    return getService().fetchWikiPageResourceByUuidAndGroupId(uuid, groupId);
  }

  public static com.liferay.portal.kernel.dao.orm.ActionableDynamicQuery
      getActionableDynamicQuery() {
    return getService().getActionableDynamicQuery();
  }

  public static com.liferay.portal.kernel.dao.orm.IndexableActionableDynamicQuery
      getIndexableActionableDynamicQuery() {
    return getService().getIndexableActionableDynamicQuery();
  }

  /**
   * Returns the OSGi service identifier.
   *
   * @return the OSGi service identifier
   */
  public static java.lang.String getOSGiServiceIdentifier() {
    return getService().getOSGiServiceIdentifier();
  }

  public static com.liferay.wiki.model.WikiPageResource getPageResource(
      long nodeId, java.lang.String title)
      throws com.liferay.portal.kernel.exception.PortalException {
    return getService().getPageResource(nodeId, title);
  }

  public static com.liferay.wiki.model.WikiPageResource getPageResource(long pageResourcePrimKey)
      throws com.liferay.portal.kernel.exception.PortalException {
    return getService().getPageResource(pageResourcePrimKey);
  }

  public static long getPageResourcePrimKey(long groupId, long nodeId, java.lang.String title) {
    return getService().getPageResourcePrimKey(groupId, nodeId, title);
  }

  /** @deprecated As of 7.0.0, replaced by {@link #getPageResourcePrimKey(long, long, String)} */
  @Deprecated
  public static long getPageResourcePrimKey(long nodeId, java.lang.String title) {
    return getService().getPageResourcePrimKey(nodeId, title);
  }

  public static com.liferay.portal.kernel.model.PersistedModel getPersistedModel(
      java.io.Serializable primaryKeyObj)
      throws com.liferay.portal.kernel.exception.PortalException {
    return getService().getPersistedModel(primaryKeyObj);
  }

  /**
   * Returns the wiki page resource with the primary key.
   *
   * @param resourcePrimKey the primary key of the wiki page resource
   * @return the wiki page resource
   * @throws PortalException if a wiki page resource with the primary key could not be found
   */
  public static com.liferay.wiki.model.WikiPageResource getWikiPageResource(long resourcePrimKey)
      throws com.liferay.portal.kernel.exception.PortalException {
    return getService().getWikiPageResource(resourcePrimKey);
  }

  /**
   * Returns the wiki page resource matching the UUID and group.
   *
   * @param uuid the wiki page resource's UUID
   * @param groupId the primary key of the group
   * @return the matching wiki page resource
   * @throws PortalException if a matching wiki page resource could not be found
   */
  public static com.liferay.wiki.model.WikiPageResource getWikiPageResourceByUuidAndGroupId(
      java.lang.String uuid, long groupId)
      throws com.liferay.portal.kernel.exception.PortalException {
    return getService().getWikiPageResourceByUuidAndGroupId(uuid, groupId);
  }

  /**
   * Returns a range of all the wiki page resources.
   *
   * <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.wiki.model.impl.WikiPageResourceModelImpl}. 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.
   *
   * @param start the lower bound of the range of wiki page resources
   * @param end the upper bound of the range of wiki page resources (not inclusive)
   * @return the range of wiki page resources
   */
  public static java.util.List<com.liferay.wiki.model.WikiPageResource> getWikiPageResources(
      int start, int end) {
    return getService().getWikiPageResources(start, end);
  }

  /**
   * Returns all the wiki page resources matching the UUID and company.
   *
   * @param uuid the UUID of the wiki page resources
   * @param companyId the primary key of the company
   * @return the matching wiki page resources, or an empty list if no matches were found
   */
  public static java.util.List<com.liferay.wiki.model.WikiPageResource>
      getWikiPageResourcesByUuidAndCompanyId(java.lang.String uuid, long companyId) {
    return getService().getWikiPageResourcesByUuidAndCompanyId(uuid, companyId);
  }

  /**
   * Returns a range of wiki page resources matching the UUID and company.
   *
   * @param uuid the UUID of the wiki page resources
   * @param companyId the primary key of the company
   * @param start the lower bound of the range of wiki page resources
   * @param end the upper bound of the range of wiki page resources (not inclusive)
   * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
   * @return the range of matching wiki page resources, or an empty list if no matches were found
   */
  public static java.util.List<com.liferay.wiki.model.WikiPageResource>
      getWikiPageResourcesByUuidAndCompanyId(
          java.lang.String uuid,
          long companyId,
          int start,
          int end,
          com.liferay.portal.kernel.util.OrderByComparator<com.liferay.wiki.model.WikiPageResource>
              orderByComparator) {
    return getService()
        .getWikiPageResourcesByUuidAndCompanyId(uuid, companyId, start, end, orderByComparator);
  }

  /**
   * Returns the number of wiki page resources.
   *
   * @return the number of wiki page resources
   */
  public static int getWikiPageResourcesCount() {
    return getService().getWikiPageResourcesCount();
  }

  /**
   * Updates the wiki page resource in the database or adds it if it does not yet exist. Also
   * notifies the appropriate model listeners.
   *
   * @param wikiPageResource the wiki page resource
   * @return the wiki page resource that was updated
   */
  public static com.liferay.wiki.model.WikiPageResource updateWikiPageResource(
      com.liferay.wiki.model.WikiPageResource wikiPageResource) {
    return getService().updateWikiPageResource(wikiPageResource);
  }

  public static WikiPageResourceLocalService getService() {
    return _serviceTracker.getService();
  }

  private static ServiceTracker<WikiPageResourceLocalService, WikiPageResourceLocalService>
      _serviceTracker = ServiceTrackerFactory.open(WikiPageResourceLocalService.class);
}
/**
 * Provides the local service utility for KBArticle. This utility wraps {@link
 * com.liferay.knowledge.base.service.impl.KBArticleLocalServiceImpl} and is the primary access
 * point for service operations in application layer code running on the local server. 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 Brian Wing Shun Chan
 * @see KBArticleLocalService
 * @see com.liferay.knowledge.base.service.base.KBArticleLocalServiceBaseImpl
 * @see com.liferay.knowledge.base.service.impl.KBArticleLocalServiceImpl
 * @generated
 */
@ProviderType
public class KBArticleLocalServiceUtil {
  /*
   * NOTE FOR DEVELOPERS:
   *
   * Never modify this class directly. Add custom service methods to {@link com.liferay.knowledge.base.service.impl.KBArticleLocalServiceImpl} and rerun ServiceBuilder to regenerate this class.
   */

  /**
   * 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
   */
  public static com.liferay.knowledge.base.model.KBArticle addKBArticle(
      com.liferay.knowledge.base.model.KBArticle kbArticle) {
    return getService().addKBArticle(kbArticle);
  }

  public static com.liferay.knowledge.base.model.KBArticle addKBArticle(
      long userId,
      long parentResourceClassNameId,
      long parentResourcePrimKey,
      java.lang.String title,
      java.lang.String urlTitle,
      java.lang.String content,
      java.lang.String description,
      java.lang.String sourceURL,
      java.lang.String[] sections,
      java.lang.String[] selectedFileNames,
      com.liferay.portal.kernel.service.ServiceContext serviceContext)
      throws com.liferay.portal.kernel.exception.PortalException {
    return getService()
        .addKBArticle(
            userId,
            parentResourceClassNameId,
            parentResourcePrimKey,
            title,
            urlTitle,
            content,
            description,
            sourceURL,
            sections,
            selectedFileNames,
            serviceContext);
  }

  /**
   * 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
   */
  public static com.liferay.knowledge.base.model.KBArticle createKBArticle(long kbArticleId) {
    return getService().createKBArticle(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
   */
  public static com.liferay.knowledge.base.model.KBArticle deleteKBArticle(
      com.liferay.knowledge.base.model.KBArticle kbArticle)
      throws com.liferay.portal.kernel.exception.PortalException {
    return getService().deleteKBArticle(kbArticle);
  }

  /**
   * 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
   */
  public static com.liferay.knowledge.base.model.KBArticle deleteKBArticle(long kbArticleId)
      throws com.liferay.portal.kernel.exception.PortalException {
    return getService().deleteKBArticle(kbArticleId);
  }

  public static com.liferay.knowledge.base.model.KBArticle fetchFirstChildKBArticle(
      long groupId, long parentResourcePrimKey) {
    return getService().fetchFirstChildKBArticle(groupId, parentResourcePrimKey);
  }

  public static com.liferay.knowledge.base.model.KBArticle fetchKBArticle(long kbArticleId) {
    return getService().fetchKBArticle(kbArticleId);
  }

  public static com.liferay.knowledge.base.model.KBArticle fetchKBArticleByUrlTitle(
      long groupId, java.lang.String kbFolderUrlTitle, java.lang.String urlTitle)
      throws com.liferay.portal.kernel.exception.PortalException {
    return getService().fetchKBArticleByUrlTitle(groupId, kbFolderUrlTitle, urlTitle);
  }

  public static com.liferay.knowledge.base.model.KBArticle fetchKBArticleByUrlTitle(
      long groupId, long kbFolderId, java.lang.String urlTitle) {
    return getService().fetchKBArticleByUrlTitle(groupId, kbFolderId, urlTitle);
  }

  /**
   * 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
   */
  public static com.liferay.knowledge.base.model.KBArticle fetchKBArticleByUuidAndGroupId(
      java.lang.String uuid, long groupId) {
    return getService().fetchKBArticleByUuidAndGroupId(uuid, groupId);
  }

  public static com.liferay.knowledge.base.model.KBArticle fetchLatestKBArticle(
      long resourcePrimKey, int status) {
    return getService().fetchLatestKBArticle(resourcePrimKey, status);
  }

  public static com.liferay.knowledge.base.model.KBArticle fetchLatestKBArticleByUrlTitle(
      long groupId, long kbFolderId, java.lang.String urlTitle, int status) {
    return getService().fetchLatestKBArticleByUrlTitle(groupId, kbFolderId, urlTitle, status);
  }

  /**
   * 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
   */
  public static com.liferay.knowledge.base.model.KBArticle getKBArticle(long kbArticleId)
      throws com.liferay.portal.kernel.exception.PortalException {
    return getService().getKBArticle(kbArticleId);
  }

  public static com.liferay.knowledge.base.model.KBArticle getKBArticle(
      long resourcePrimKey, int version)
      throws com.liferay.portal.kernel.exception.PortalException {
    return getService().getKBArticle(resourcePrimKey, version);
  }

  public static com.liferay.knowledge.base.model.KBArticle getKBArticleByUrlTitle(
      long groupId, java.lang.String kbFolderUrlTitle, java.lang.String urlTitle)
      throws com.liferay.portal.kernel.exception.PortalException {
    return getService().getKBArticleByUrlTitle(groupId, kbFolderUrlTitle, urlTitle);
  }

  public static com.liferay.knowledge.base.model.KBArticle getKBArticleByUrlTitle(
      long groupId, long kbFolderId, java.lang.String urlTitle)
      throws com.liferay.portal.kernel.exception.PortalException {
    return getService().getKBArticleByUrlTitle(groupId, kbFolderId, urlTitle);
  }

  /**
   * 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
   */
  public static com.liferay.knowledge.base.model.KBArticle getKBArticleByUuidAndGroupId(
      java.lang.String uuid, long groupId)
      throws com.liferay.portal.kernel.exception.PortalException {
    return getService().getKBArticleByUuidAndGroupId(uuid, groupId);
  }

  public static com.liferay.knowledge.base.model.KBArticle getLatestKBArticle(
      long resourcePrimKey, int status) throws com.liferay.portal.kernel.exception.PortalException {
    return getService().getLatestKBArticle(resourcePrimKey, status);
  }

  public static com.liferay.knowledge.base.model.KBArticle getLatestKBArticleByUrlTitle(
      long groupId, long kbFolderId, java.lang.String urlTitle, int status)
      throws com.liferay.portal.kernel.exception.PortalException {
    return getService().getLatestKBArticleByUrlTitle(groupId, kbFolderId, urlTitle, status);
  }

  public static com.liferay.knowledge.base.model.KBArticle revertKBArticle(
      long userId,
      long resourcePrimKey,
      int version,
      com.liferay.portal.kernel.service.ServiceContext serviceContext)
      throws com.liferay.portal.kernel.exception.PortalException {
    return getService().revertKBArticle(userId, resourcePrimKey, version, serviceContext);
  }

  /**
   * 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
   */
  public static com.liferay.knowledge.base.model.KBArticle updateKBArticle(
      com.liferay.knowledge.base.model.KBArticle kbArticle) {
    return getService().updateKBArticle(kbArticle);
  }

  public static com.liferay.knowledge.base.model.KBArticle updateKBArticle(
      long userId,
      long resourcePrimKey,
      java.lang.String title,
      java.lang.String content,
      java.lang.String description,
      java.lang.String sourceURL,
      java.lang.String[] sections,
      java.lang.String[] selectedFileNames,
      long[] removeFileEntryIds,
      com.liferay.portal.kernel.service.ServiceContext serviceContext)
      throws com.liferay.portal.kernel.exception.PortalException {
    return getService()
        .updateKBArticle(
            userId,
            resourcePrimKey,
            title,
            content,
            description,
            sourceURL,
            sections,
            selectedFileNames,
            removeFileEntryIds,
            serviceContext);
  }

  public static com.liferay.knowledge.base.model.KBArticle updateStatus(
      long userId,
      long resourcePrimKey,
      int status,
      com.liferay.portal.kernel.service.ServiceContext serviceContext)
      throws com.liferay.portal.kernel.exception.PortalException {
    return getService().updateStatus(userId, resourcePrimKey, status, serviceContext);
  }

  public static com.liferay.knowledge.base.model.KBArticle[] getPreviousAndNextKBArticles(
      long kbArticleId) throws com.liferay.portal.kernel.exception.PortalException {
    return getService().getPreviousAndNextKBArticles(kbArticleId);
  }

  public static com.liferay.portal.kernel.dao.orm.ActionableDynamicQuery
      getActionableDynamicQuery() {
    return getService().getActionableDynamicQuery();
  }

  public static com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery() {
    return getService().dynamicQuery();
  }

  public static com.liferay.portal.kernel.dao.orm.ExportActionableDynamicQuery
      getExportActionableDynamicQuery(
          com.liferay.exportimport.kernel.lar.PortletDataContext portletDataContext) {
    return getService().getExportActionableDynamicQuery(portletDataContext);
  }

  public static com.liferay.portal.kernel.dao.orm.IndexableActionableDynamicQuery
      getIndexableActionableDynamicQuery() {
    return getService().getIndexableActionableDynamicQuery();
  }

  /** @throws PortalException */
  public static com.liferay.portal.kernel.model.PersistedModel deletePersistedModel(
      com.liferay.portal.kernel.model.PersistedModel persistedModel)
      throws com.liferay.portal.kernel.exception.PortalException {
    return getService().deletePersistedModel(persistedModel);
  }

  public static com.liferay.portal.kernel.model.PersistedModel getPersistedModel(
      java.io.Serializable primaryKeyObj)
      throws com.liferay.portal.kernel.exception.PortalException {
    return getService().getPersistedModel(primaryKeyObj);
  }

  public static com.liferay.portal.kernel.repository.model.FileEntry addAttachment(
      long userId,
      long resourcePrimKey,
      java.lang.String fileName,
      java.io.InputStream inputStream,
      java.lang.String mimeType)
      throws com.liferay.portal.kernel.exception.PortalException {
    return getService().addAttachment(userId, resourcePrimKey, fileName, inputStream, mimeType);
  }

  public static int addKBArticlesMarkdown(
      long userId,
      long groupId,
      long parentKbFolderId,
      java.lang.String fileName,
      boolean prioritizeByNumericalPrefix,
      java.io.InputStream inputStream,
      com.liferay.portal.kernel.service.ServiceContext serviceContext)
      throws com.liferay.portal.kernel.exception.PortalException {
    return getService()
        .addKBArticlesMarkdown(
            userId,
            groupId,
            parentKbFolderId,
            fileName,
            prioritizeByNumericalPrefix,
            inputStream,
            serviceContext);
  }

  public static int getCompanyKBArticlesCount(long companyId, int status) {
    return getService().getCompanyKBArticlesCount(companyId, status);
  }

  public static int getGroupKBArticlesCount(long groupId, int status) {
    return getService().getGroupKBArticlesCount(groupId, status);
  }

  public static int getKBArticleVersionsCount(long resourcePrimKey, int status) {
    return getService().getKBArticleVersionsCount(resourcePrimKey, status);
  }

  /**
   * Returns the number of k b articles.
   *
   * @return the number of k b articles
   */
  public static int getKBArticlesCount() {
    return getService().getKBArticlesCount();
  }

  public static int getKBArticlesCount(long groupId, long parentResourcePrimKey, int status) {
    return getService().getKBArticlesCount(groupId, parentResourcePrimKey, status);
  }

  public static int getKBFolderKBArticlesCount(long groupId, long kbFolderId, int status) {
    return getService().getKBFolderKBArticlesCount(groupId, kbFolderId, status);
  }

  public static int getSectionsKBArticlesCount(
      long groupId, java.lang.String[] sections, int status) {
    return getService().getSectionsKBArticlesCount(groupId, sections, status);
  }

  /** @deprecated As of 7.0.0, replaced by {@link #getKBArticlesCount(long, long, int)} */
  @Deprecated
  public static int getSiblingKBArticlesCount(
      long groupId, long parentResourcePrimKey, int status) {
    return getService().getSiblingKBArticlesCount(groupId, parentResourcePrimKey, status);
  }

  /**
   * Returns the OSGi service identifier.
   *
   * @return the OSGi service identifier
   */
  public static java.lang.String getOSGiServiceIdentifier() {
    return getService().getOSGiServiceIdentifier();
  }

  public static java.lang.String[] getTempAttachmentNames(
      long groupId, long userId, java.lang.String tempFolderName)
      throws com.liferay.portal.kernel.exception.PortalException {
    return getService().getTempAttachmentNames(groupId, userId, tempFolderName);
  }

  /**
   * Performs a dynamic query on the database and returns the matching rows.
   *
   * @param dynamicQuery the dynamic query
   * @return the matching rows
   */
  public static <T> java.util.List<T> dynamicQuery(
      com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery) {
    return getService().dynamicQuery(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.knowledge.base.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.
   *
   * @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
   */
  public static <T> java.util.List<T> dynamicQuery(
      com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start, int end) {
    return getService().dynamicQuery(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.knowledge.base.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.
   *
   * @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
   */
  public static <T> java.util.List<T> dynamicQuery(
      com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery,
      int start,
      int end,
      com.liferay.portal.kernel.util.OrderByComparator<T> orderByComparator) {
    return getService().dynamicQuery(dynamicQuery, start, end, orderByComparator);
  }

  public static java.util.List<com.liferay.knowledge.base.model.KBArticle>
      getAllDescendantKBArticles(
          long resourcePrimKey,
          int status,
          com.liferay.portal.kernel.util.OrderByComparator<
                  com.liferay.knowledge.base.model.KBArticle>
              orderByComparator) {
    return getService().getAllDescendantKBArticles(resourcePrimKey, status, orderByComparator);
  }

  public static java.util.List<com.liferay.knowledge.base.model.KBArticle> getCompanyKBArticles(
      long companyId,
      int status,
      int start,
      int end,
      com.liferay.portal.kernel.util.OrderByComparator<com.liferay.knowledge.base.model.KBArticle>
          orderByComparator) {
    return getService().getCompanyKBArticles(companyId, status, start, end, orderByComparator);
  }

  public static java.util.List<com.liferay.knowledge.base.model.KBArticle> getGroupKBArticles(
      long groupId,
      int status,
      int start,
      int end,
      com.liferay.portal.kernel.util.OrderByComparator<com.liferay.knowledge.base.model.KBArticle>
          orderByComparator) {
    return getService().getGroupKBArticles(groupId, status, start, end, orderByComparator);
  }

  public static java.util.List<com.liferay.knowledge.base.model.KBArticle>
      getKBArticleAndAllDescendantKBArticles(
          long resourcePrimKey,
          int status,
          com.liferay.portal.kernel.util.OrderByComparator<
                  com.liferay.knowledge.base.model.KBArticle>
              orderByComparator) {
    return getService()
        .getKBArticleAndAllDescendantKBArticles(resourcePrimKey, status, orderByComparator);
  }

  /**
   * @deprecated As of 7.0.0, replaced by {@link #getKBArticleAndAllDescendantKBArticles(long, int,
   *     OrderByComparator)}
   */
  @Deprecated
  public static java.util.List<com.liferay.knowledge.base.model.KBArticle>
      getKBArticleAndAllDescendants(
          long resourcePrimKey,
          int status,
          com.liferay.portal.kernel.util.OrderByComparator<
                  com.liferay.knowledge.base.model.KBArticle>
              orderByComparator) {
    return getService().getKBArticleAndAllDescendants(resourcePrimKey, status, orderByComparator);
  }

  public static java.util.List<com.liferay.knowledge.base.model.KBArticle> getKBArticleVersions(
      long resourcePrimKey,
      int status,
      int start,
      int end,
      com.liferay.portal.kernel.util.OrderByComparator<com.liferay.knowledge.base.model.KBArticle>
          orderByComparator) {
    return getService()
        .getKBArticleVersions(resourcePrimKey, status, start, end, orderByComparator);
  }

  /**
   * 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.knowledge.base.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.
   *
   * @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
   */
  public static java.util.List<com.liferay.knowledge.base.model.KBArticle> getKBArticles(
      int start, int end) {
    return getService().getKBArticles(start, end);
  }

  public static java.util.List<com.liferay.knowledge.base.model.KBArticle> getKBArticles(
      long groupId,
      long parentResourcePrimKey,
      int status,
      int start,
      int end,
      com.liferay.portal.kernel.util.OrderByComparator<com.liferay.knowledge.base.model.KBArticle>
          orderByComparator) {
    return getService()
        .getKBArticles(groupId, parentResourcePrimKey, status, start, end, orderByComparator);
  }

  public static java.util.List<com.liferay.knowledge.base.model.KBArticle> getKBArticles(
      long[] resourcePrimKeys,
      int status,
      com.liferay.portal.kernel.util.OrderByComparator<com.liferay.knowledge.base.model.KBArticle>
          orderByComparator) {
    return getService().getKBArticles(resourcePrimKeys, status, orderByComparator);
  }

  /**
   * Returns all the k b articles matching the UUID and company.
   *
   * @param uuid the UUID of the k b articles
   * @param companyId the primary key of the company
   * @return the matching k b articles, or an empty list if no matches were found
   */
  public static java.util.List<com.liferay.knowledge.base.model.KBArticle>
      getKBArticlesByUuidAndCompanyId(java.lang.String uuid, long companyId) {
    return getService().getKBArticlesByUuidAndCompanyId(uuid, companyId);
  }

  /**
   * Returns a range of k b articles matching the UUID and company.
   *
   * @param uuid the UUID of the k b articles
   * @param companyId the primary key of the company
   * @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)
   * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
   * @return the range of matching k b articles, or an empty list if no matches were found
   */
  public static java.util.List<com.liferay.knowledge.base.model.KBArticle>
      getKBArticlesByUuidAndCompanyId(
          java.lang.String uuid,
          long companyId,
          int start,
          int end,
          com.liferay.portal.kernel.util.OrderByComparator<
                  com.liferay.knowledge.base.model.KBArticle>
              orderByComparator) {
    return getService()
        .getKBArticlesByUuidAndCompanyId(uuid, companyId, start, end, orderByComparator);
  }

  public static java.util.List<com.liferay.knowledge.base.model.KBArticle> getKBFolderKBArticles(
      long groupId, long kbFolderId) {
    return getService().getKBFolderKBArticles(groupId, kbFolderId);
  }

  public static java.util.List<com.liferay.knowledge.base.model.KBArticle> getSectionsKBArticles(
      long groupId,
      java.lang.String[] sections,
      int status,
      int start,
      int end,
      com.liferay.portal.kernel.util.OrderByComparator<com.liferay.knowledge.base.model.KBArticle>
          orderByComparator) {
    return getService()
        .getSectionsKBArticles(groupId, sections, status, start, end, orderByComparator);
  }

  /**
   * @deprecated As of 7.0.0, replaced by {@link #getKBArticles(long, long, int, int, int,
   *     OrderByComparator)}
   */
  @Deprecated
  public static java.util.List<com.liferay.knowledge.base.model.KBArticle> getSiblingKBArticles(
      long groupId,
      long parentResourcePrimKey,
      int status,
      int start,
      int end,
      com.liferay.portal.kernel.util.OrderByComparator<com.liferay.knowledge.base.model.KBArticle>
          orderByComparator) {
    return getService()
        .getSiblingKBArticles(
            groupId, parentResourcePrimKey, status, start, end, orderByComparator);
  }

  public static java.util.List<com.liferay.knowledge.base.model.KBArticle> search(
      long groupId,
      java.lang.String title,
      java.lang.String content,
      int status,
      java.util.Date startDate,
      java.util.Date endDate,
      boolean andOperator,
      int start,
      int end,
      com.liferay.portal.kernel.util.OrderByComparator<com.liferay.knowledge.base.model.KBArticle>
          orderByComparator) {
    return getService()
        .search(
            groupId,
            title,
            content,
            status,
            startDate,
            endDate,
            andOperator,
            start,
            end,
            orderByComparator);
  }

  /**
   * Returns the number of rows matching the dynamic query.
   *
   * @param dynamicQuery the dynamic query
   * @return the number of rows matching the dynamic query
   */
  public static long dynamicQueryCount(
      com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery) {
    return getService().dynamicQueryCount(dynamicQuery);
  }

  /**
   * Returns the number of rows matching the dynamic query.
   *
   * @param dynamicQuery the dynamic query
   * @param projection the projection to apply to the query
   * @return the number of rows matching the dynamic query
   */
  public static long dynamicQueryCount(
      com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery,
      com.liferay.portal.kernel.dao.orm.Projection projection) {
    return getService().dynamicQueryCount(dynamicQuery, projection);
  }

  public static void addKBArticleResources(
      com.liferay.knowledge.base.model.KBArticle kbArticle,
      boolean addGroupPermissions,
      boolean addGuestPermissions)
      throws com.liferay.portal.kernel.exception.PortalException {
    getService().addKBArticleResources(kbArticle, addGroupPermissions, addGuestPermissions);
  }

  public static void addKBArticleResources(
      com.liferay.knowledge.base.model.KBArticle kbArticle,
      java.lang.String[] groupPermissions,
      java.lang.String[] guestPermissions)
      throws com.liferay.portal.kernel.exception.PortalException {
    getService().addKBArticleResources(kbArticle, groupPermissions, guestPermissions);
  }

  public static void addKBArticleResources(
      long kbArticleId, boolean addGroupPermissions, boolean addGuestPermissions)
      throws com.liferay.portal.kernel.exception.PortalException {
    getService().addKBArticleResources(kbArticleId, addGroupPermissions, addGuestPermissions);
  }

  public static void addKBArticleResources(
      long kbArticleId, java.lang.String[] groupPermissions, java.lang.String[] guestPermissions)
      throws com.liferay.portal.kernel.exception.PortalException {
    getService().addKBArticleResources(kbArticleId, groupPermissions, guestPermissions);
  }

  public static void addTempAttachment(
      long groupId,
      long userId,
      java.lang.String fileName,
      java.lang.String tempFolderName,
      java.io.InputStream inputStream,
      java.lang.String mimeType)
      throws com.liferay.portal.kernel.exception.PortalException {
    getService()
        .addTempAttachment(groupId, userId, fileName, tempFolderName, inputStream, mimeType);
  }

  public static void deleteGroupKBArticles(long groupId)
      throws com.liferay.portal.kernel.exception.PortalException {
    getService().deleteGroupKBArticles(groupId);
  }

  public static void deleteKBArticles(long groupId, long parentResourcePrimKey)
      throws com.liferay.portal.kernel.exception.PortalException {
    getService().deleteKBArticles(groupId, parentResourcePrimKey);
  }

  public static void deleteKBArticles(long[] resourcePrimKeys)
      throws com.liferay.portal.kernel.exception.PortalException {
    getService().deleteKBArticles(resourcePrimKeys);
  }

  public static void deleteTempAttachment(
      long groupId, long userId, java.lang.String fileName, java.lang.String tempFolderName)
      throws com.liferay.portal.kernel.exception.PortalException {
    getService().deleteTempAttachment(groupId, userId, fileName, tempFolderName);
  }

  public static void moveKBArticle(
      long userId,
      long resourcePrimKey,
      long parentResourceClassNameId,
      long parentResourcePrimKey,
      double priority)
      throws com.liferay.portal.kernel.exception.PortalException {
    getService()
        .moveKBArticle(
            userId, resourcePrimKey, parentResourceClassNameId, parentResourcePrimKey, priority);
  }

  public static void subscribeGroupKBArticles(long userId, long groupId)
      throws com.liferay.portal.kernel.exception.PortalException {
    getService().subscribeGroupKBArticles(userId, groupId);
  }

  public static void subscribeKBArticle(long userId, long groupId, long resourcePrimKey)
      throws com.liferay.portal.kernel.exception.PortalException {
    getService().subscribeKBArticle(userId, groupId, resourcePrimKey);
  }

  public static void unsubscribeGroupKBArticles(long userId, long groupId)
      throws com.liferay.portal.kernel.exception.PortalException {
    getService().unsubscribeGroupKBArticles(userId, groupId);
  }

  public static void unsubscribeKBArticle(long userId, long resourcePrimKey)
      throws com.liferay.portal.kernel.exception.PortalException {
    getService().unsubscribeKBArticle(userId, resourcePrimKey);
  }

  public static void updateKBArticleAsset(
      long userId,
      com.liferay.knowledge.base.model.KBArticle kbArticle,
      long[] assetCategoryIds,
      java.lang.String[] assetTagNames,
      long[] assetLinkEntryIds)
      throws com.liferay.portal.kernel.exception.PortalException {
    getService()
        .updateKBArticleAsset(
            userId, kbArticle, assetCategoryIds, assetTagNames, assetLinkEntryIds);
  }

  public static void updateKBArticleResources(
      com.liferay.knowledge.base.model.KBArticle kbArticle,
      java.lang.String[] groupPermissions,
      java.lang.String[] guestPermissions)
      throws com.liferay.portal.kernel.exception.PortalException {
    getService().updateKBArticleResources(kbArticle, groupPermissions, guestPermissions);
  }

  public static void updateKBArticlesPriorities(
      java.util.Map<java.lang.Long, java.lang.Double> resourcePrimKeyToPriorityMap)
      throws com.liferay.portal.kernel.exception.PortalException {
    getService().updateKBArticlesPriorities(resourcePrimKeyToPriorityMap);
  }

  public static void updatePriority(long resourcePrimKey, double priority) {
    getService().updatePriority(resourcePrimKey, priority);
  }

  public static void updateViewCount(long userId, long resourcePrimKey, int viewCount)
      throws com.liferay.portal.kernel.exception.PortalException {
    getService().updateViewCount(userId, resourcePrimKey, viewCount);
  }

  public static KBArticleLocalService getService() {
    return _serviceTracker.getService();
  }

  private static ServiceTracker<KBArticleLocalService, KBArticleLocalService> _serviceTracker =
      ServiceTrackerFactory.open(KBArticleLocalService.class);
}
/**
 * Provides the local service utility for JournalFeed. This utility wraps {@link
 * com.liferay.journal.service.impl.JournalFeedLocalServiceImpl} and is the primary access point for
 * service operations in application layer code running on the local server. 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 Brian Wing Shun Chan
 * @see JournalFeedLocalService
 * @see com.liferay.journal.service.base.JournalFeedLocalServiceBaseImpl
 * @see com.liferay.journal.service.impl.JournalFeedLocalServiceImpl
 * @generated
 */
@ProviderType
public class JournalFeedLocalServiceUtil {
  /*
   * NOTE FOR DEVELOPERS:
   *
   * Never modify this class directly. Add custom service methods to {@link com.liferay.journal.service.impl.JournalFeedLocalServiceImpl} and rerun ServiceBuilder to regenerate this class.
   */
  public static com.liferay.journal.model.JournalFeed addFeed(
      long userId,
      long groupId,
      java.lang.String feedId,
      boolean autoFeedId,
      java.lang.String name,
      java.lang.String description,
      java.lang.String ddmStructureKey,
      java.lang.String ddmTemplateKey,
      java.lang.String ddmRendererTemplateKey,
      int delta,
      java.lang.String orderByCol,
      java.lang.String orderByType,
      java.lang.String targetLayoutFriendlyUrl,
      java.lang.String targetPortletId,
      java.lang.String contentField,
      java.lang.String feedFormat,
      double feedVersion,
      com.liferay.portal.kernel.service.ServiceContext serviceContext)
      throws com.liferay.portal.kernel.exception.PortalException {
    return getService()
        .addFeed(
            userId,
            groupId,
            feedId,
            autoFeedId,
            name,
            description,
            ddmStructureKey,
            ddmTemplateKey,
            ddmRendererTemplateKey,
            delta,
            orderByCol,
            orderByType,
            targetLayoutFriendlyUrl,
            targetPortletId,
            contentField,
            feedFormat,
            feedVersion,
            serviceContext);
  }

  /**
   * Adds the journal feed to the database. Also notifies the appropriate model listeners.
   *
   * @param journalFeed the journal feed
   * @return the journal feed that was added
   */
  public static com.liferay.journal.model.JournalFeed addJournalFeed(
      com.liferay.journal.model.JournalFeed journalFeed) {
    return getService().addJournalFeed(journalFeed);
  }

  /**
   * Creates a new journal feed with the primary key. Does not add the journal feed to the database.
   *
   * @param id the primary key for the new journal feed
   * @return the new journal feed
   */
  public static com.liferay.journal.model.JournalFeed createJournalFeed(long id) {
    return getService().createJournalFeed(id);
  }

  /**
   * Deletes the journal feed from the database. Also notifies the appropriate model listeners.
   *
   * @param journalFeed the journal feed
   * @return the journal feed that was removed
   */
  public static com.liferay.journal.model.JournalFeed deleteJournalFeed(
      com.liferay.journal.model.JournalFeed journalFeed) {
    return getService().deleteJournalFeed(journalFeed);
  }

  /**
   * Deletes the journal feed with the primary key from the database. Also notifies the appropriate
   * model listeners.
   *
   * @param id the primary key of the journal feed
   * @return the journal feed that was removed
   * @throws PortalException if a journal feed with the primary key could not be found
   */
  public static com.liferay.journal.model.JournalFeed deleteJournalFeed(long id)
      throws com.liferay.portal.kernel.exception.PortalException {
    return getService().deleteJournalFeed(id);
  }

  public static com.liferay.journal.model.JournalFeed fetchFeed(
      long groupId, java.lang.String feedId) {
    return getService().fetchFeed(groupId, feedId);
  }

  public static com.liferay.journal.model.JournalFeed fetchJournalFeed(long id) {
    return getService().fetchJournalFeed(id);
  }

  /**
   * Returns the journal feed matching the UUID and group.
   *
   * @param uuid the journal feed's UUID
   * @param groupId the primary key of the group
   * @return the matching journal feed, or <code>null</code> if a matching journal feed could not be
   *     found
   */
  public static com.liferay.journal.model.JournalFeed fetchJournalFeedByUuidAndGroupId(
      java.lang.String uuid, long groupId) {
    return getService().fetchJournalFeedByUuidAndGroupId(uuid, groupId);
  }

  public static com.liferay.journal.model.JournalFeed getFeed(long feedId)
      throws com.liferay.portal.kernel.exception.PortalException {
    return getService().getFeed(feedId);
  }

  public static com.liferay.journal.model.JournalFeed getFeed(long groupId, java.lang.String feedId)
      throws com.liferay.portal.kernel.exception.PortalException {
    return getService().getFeed(groupId, feedId);
  }

  /**
   * Returns the journal feed with the primary key.
   *
   * @param id the primary key of the journal feed
   * @return the journal feed
   * @throws PortalException if a journal feed with the primary key could not be found
   */
  public static com.liferay.journal.model.JournalFeed getJournalFeed(long id)
      throws com.liferay.portal.kernel.exception.PortalException {
    return getService().getJournalFeed(id);
  }

  /**
   * Returns the journal feed matching the UUID and group.
   *
   * @param uuid the journal feed's UUID
   * @param groupId the primary key of the group
   * @return the matching journal feed
   * @throws PortalException if a matching journal feed could not be found
   */
  public static com.liferay.journal.model.JournalFeed getJournalFeedByUuidAndGroupId(
      java.lang.String uuid, long groupId)
      throws com.liferay.portal.kernel.exception.PortalException {
    return getService().getJournalFeedByUuidAndGroupId(uuid, groupId);
  }

  public static com.liferay.journal.model.JournalFeed updateFeed(
      long groupId,
      java.lang.String feedId,
      java.lang.String name,
      java.lang.String description,
      java.lang.String ddmStructureKey,
      java.lang.String ddmTemplateKey,
      java.lang.String ddmRendererTemplateKey,
      int delta,
      java.lang.String orderByCol,
      java.lang.String orderByType,
      java.lang.String targetLayoutFriendlyUrl,
      java.lang.String targetPortletId,
      java.lang.String contentField,
      java.lang.String feedFormat,
      double feedVersion,
      com.liferay.portal.kernel.service.ServiceContext serviceContext)
      throws com.liferay.portal.kernel.exception.PortalException {
    return getService()
        .updateFeed(
            groupId,
            feedId,
            name,
            description,
            ddmStructureKey,
            ddmTemplateKey,
            ddmRendererTemplateKey,
            delta,
            orderByCol,
            orderByType,
            targetLayoutFriendlyUrl,
            targetPortletId,
            contentField,
            feedFormat,
            feedVersion,
            serviceContext);
  }

  /**
   * Updates the journal feed in the database or adds it if it does not yet exist. Also notifies the
   * appropriate model listeners.
   *
   * @param journalFeed the journal feed
   * @return the journal feed that was updated
   */
  public static com.liferay.journal.model.JournalFeed updateJournalFeed(
      com.liferay.journal.model.JournalFeed journalFeed) {
    return getService().updateJournalFeed(journalFeed);
  }

  public static com.liferay.portal.kernel.dao.orm.ActionableDynamicQuery
      getActionableDynamicQuery() {
    return getService().getActionableDynamicQuery();
  }

  public static com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery() {
    return getService().dynamicQuery();
  }

  public static com.liferay.portal.kernel.dao.orm.ExportActionableDynamicQuery
      getExportActionableDynamicQuery(
          com.liferay.exportimport.kernel.lar.PortletDataContext portletDataContext) {
    return getService().getExportActionableDynamicQuery(portletDataContext);
  }

  public static com.liferay.portal.kernel.dao.orm.IndexableActionableDynamicQuery
      getIndexableActionableDynamicQuery() {
    return getService().getIndexableActionableDynamicQuery();
  }

  /** @throws PortalException */
  public static com.liferay.portal.kernel.model.PersistedModel deletePersistedModel(
      com.liferay.portal.kernel.model.PersistedModel persistedModel)
      throws com.liferay.portal.kernel.exception.PortalException {
    return getService().deletePersistedModel(persistedModel);
  }

  public static com.liferay.portal.kernel.model.PersistedModel getPersistedModel(
      java.io.Serializable primaryKeyObj)
      throws com.liferay.portal.kernel.exception.PortalException {
    return getService().getPersistedModel(primaryKeyObj);
  }

  public static int getFeedsCount(long groupId) {
    return getService().getFeedsCount(groupId);
  }

  /**
   * Returns the number of journal feeds.
   *
   * @return the number of journal feeds
   */
  public static int getJournalFeedsCount() {
    return getService().getJournalFeedsCount();
  }

  public static int searchCount(
      long companyId,
      long groupId,
      java.lang.String feedId,
      java.lang.String name,
      java.lang.String description,
      boolean andOperator) {
    return getService().searchCount(companyId, groupId, feedId, name, description, andOperator);
  }

  public static int searchCount(long companyId, long groupId, java.lang.String keywords) {
    return getService().searchCount(companyId, groupId, keywords);
  }

  /**
   * Returns the OSGi service identifier.
   *
   * @return the OSGi service identifier
   */
  public static java.lang.String getOSGiServiceIdentifier() {
    return getService().getOSGiServiceIdentifier();
  }

  /**
   * Performs a dynamic query on the database and returns the matching rows.
   *
   * @param dynamicQuery the dynamic query
   * @return the matching rows
   */
  public static <T> java.util.List<T> dynamicQuery(
      com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery) {
    return getService().dynamicQuery(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.journal.model.impl.JournalFeedModelImpl}. 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.
   *
   * @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
   */
  public static <T> java.util.List<T> dynamicQuery(
      com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start, int end) {
    return getService().dynamicQuery(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.journal.model.impl.JournalFeedModelImpl}. 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.
   *
   * @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
   */
  public static <T> java.util.List<T> dynamicQuery(
      com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery,
      int start,
      int end,
      com.liferay.portal.kernel.util.OrderByComparator<T> orderByComparator) {
    return getService().dynamicQuery(dynamicQuery, start, end, orderByComparator);
  }

  public static java.util.List<com.liferay.journal.model.JournalFeed> getFeeds() {
    return getService().getFeeds();
  }

  public static java.util.List<com.liferay.journal.model.JournalFeed> getFeeds(long groupId) {
    return getService().getFeeds(groupId);
  }

  public static java.util.List<com.liferay.journal.model.JournalFeed> getFeeds(
      long groupId, int start, int end) {
    return getService().getFeeds(groupId, start, end);
  }

  /**
   * Returns a range of all the journal feeds.
   *
   * <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.journal.model.impl.JournalFeedModelImpl}. 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.
   *
   * @param start the lower bound of the range of journal feeds
   * @param end the upper bound of the range of journal feeds (not inclusive)
   * @return the range of journal feeds
   */
  public static java.util.List<com.liferay.journal.model.JournalFeed> getJournalFeeds(
      int start, int end) {
    return getService().getJournalFeeds(start, end);
  }

  /**
   * Returns all the journal feeds matching the UUID and company.
   *
   * @param uuid the UUID of the journal feeds
   * @param companyId the primary key of the company
   * @return the matching journal feeds, or an empty list if no matches were found
   */
  public static java.util.List<com.liferay.journal.model.JournalFeed>
      getJournalFeedsByUuidAndCompanyId(java.lang.String uuid, long companyId) {
    return getService().getJournalFeedsByUuidAndCompanyId(uuid, companyId);
  }

  /**
   * Returns a range of journal feeds matching the UUID and company.
   *
   * @param uuid the UUID of the journal feeds
   * @param companyId the primary key of the company
   * @param start the lower bound of the range of journal feeds
   * @param end the upper bound of the range of journal feeds (not inclusive)
   * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
   * @return the range of matching journal feeds, or an empty list if no matches were found
   */
  public static java.util.List<com.liferay.journal.model.JournalFeed>
      getJournalFeedsByUuidAndCompanyId(
          java.lang.String uuid,
          long companyId,
          int start,
          int end,
          com.liferay.portal.kernel.util.OrderByComparator<com.liferay.journal.model.JournalFeed>
              orderByComparator) {
    return getService()
        .getJournalFeedsByUuidAndCompanyId(uuid, companyId, start, end, orderByComparator);
  }

  public static java.util.List<com.liferay.journal.model.JournalFeed> search(
      long companyId,
      long groupId,
      java.lang.String feedId,
      java.lang.String name,
      java.lang.String description,
      boolean andOperator,
      int start,
      int end,
      com.liferay.portal.kernel.util.OrderByComparator<com.liferay.journal.model.JournalFeed> obc) {
    return getService()
        .search(companyId, groupId, feedId, name, description, andOperator, start, end, obc);
  }

  public static java.util.List<com.liferay.journal.model.JournalFeed> search(
      long companyId,
      long groupId,
      java.lang.String keywords,
      int start,
      int end,
      com.liferay.portal.kernel.util.OrderByComparator<com.liferay.journal.model.JournalFeed> obc) {
    return getService().search(companyId, groupId, keywords, start, end, obc);
  }

  /**
   * Returns the number of rows matching the dynamic query.
   *
   * @param dynamicQuery the dynamic query
   * @return the number of rows matching the dynamic query
   */
  public static long dynamicQueryCount(
      com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery) {
    return getService().dynamicQueryCount(dynamicQuery);
  }

  /**
   * Returns the number of rows matching the dynamic query.
   *
   * @param dynamicQuery the dynamic query
   * @param projection the projection to apply to the query
   * @return the number of rows matching the dynamic query
   */
  public static long dynamicQueryCount(
      com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery,
      com.liferay.portal.kernel.dao.orm.Projection projection) {
    return getService().dynamicQueryCount(dynamicQuery, projection);
  }

  public static void addFeedResources(
      com.liferay.journal.model.JournalFeed feed,
      boolean addGroupPermissions,
      boolean addGuestPermissions)
      throws com.liferay.portal.kernel.exception.PortalException {
    getService().addFeedResources(feed, addGroupPermissions, addGuestPermissions);
  }

  public static void addFeedResources(
      com.liferay.journal.model.JournalFeed feed,
      java.lang.String[] groupPermissions,
      java.lang.String[] guestPermissions)
      throws com.liferay.portal.kernel.exception.PortalException {
    getService().addFeedResources(feed, groupPermissions, guestPermissions);
  }

  public static void addFeedResources(
      long feedId, boolean addGroupPermissions, boolean addGuestPermissions)
      throws com.liferay.portal.kernel.exception.PortalException {
    getService().addFeedResources(feedId, addGroupPermissions, addGuestPermissions);
  }

  public static void addFeedResources(
      long feedId, java.lang.String[] groupPermissions, java.lang.String[] guestPermissions)
      throws com.liferay.portal.kernel.exception.PortalException {
    getService().addFeedResources(feedId, groupPermissions, guestPermissions);
  }

  public static void deleteFeed(com.liferay.journal.model.JournalFeed feed)
      throws com.liferay.portal.kernel.exception.PortalException {
    getService().deleteFeed(feed);
  }

  public static void deleteFeed(long feedId)
      throws com.liferay.portal.kernel.exception.PortalException {
    getService().deleteFeed(feedId);
  }

  public static void deleteFeed(long groupId, java.lang.String feedId)
      throws com.liferay.portal.kernel.exception.PortalException {
    getService().deleteFeed(groupId, feedId);
  }

  public static JournalFeedLocalService getService() {
    return _serviceTracker.getService();
  }

  private static ServiceTracker<JournalFeedLocalService, JournalFeedLocalService> _serviceTracker =
      ServiceTrackerFactory.open(JournalFeedLocalService.class);
}
/**
 * Provides the remote service utility for JournalFeed. This utility wraps {@link
 * com.liferay.journal.service.impl.JournalFeedServiceImpl} and is the primary access point for
 * service operations in application layer code running on a remote server. Methods of this service
 * are expected to have security checks based on the propagated JAAS credentials because this
 * service can be accessed remotely.
 *
 * @author Brian Wing Shun Chan
 * @see JournalFeedService
 * @see com.liferay.journal.service.base.JournalFeedServiceBaseImpl
 * @see com.liferay.journal.service.impl.JournalFeedServiceImpl
 * @generated
 */
@ProviderType
public class JournalFeedServiceUtil {
  /*
   * NOTE FOR DEVELOPERS:
   *
   * Never modify this class directly. Add custom service methods to {@link com.liferay.journal.service.impl.JournalFeedServiceImpl} and rerun ServiceBuilder to regenerate this class.
   */
  public static com.liferay.journal.model.JournalFeed addFeed(
      long groupId,
      java.lang.String feedId,
      boolean autoFeedId,
      java.lang.String name,
      java.lang.String description,
      java.lang.String ddmStructureKey,
      java.lang.String ddmTemplateKey,
      java.lang.String ddmRendererTemplateKey,
      int delta,
      java.lang.String orderByCol,
      java.lang.String orderByType,
      java.lang.String targetLayoutFriendlyUrl,
      java.lang.String targetPortletId,
      java.lang.String contentField,
      java.lang.String feedType,
      double feedVersion,
      com.liferay.portal.service.ServiceContext serviceContext)
      throws com.liferay.portal.kernel.exception.PortalException {
    return getService()
        .addFeed(
            groupId,
            feedId,
            autoFeedId,
            name,
            description,
            ddmStructureKey,
            ddmTemplateKey,
            ddmRendererTemplateKey,
            delta,
            orderByCol,
            orderByType,
            targetLayoutFriendlyUrl,
            targetPortletId,
            contentField,
            feedType,
            feedVersion,
            serviceContext);
  }

  public static void deleteFeed(long feedId)
      throws com.liferay.portal.kernel.exception.PortalException {
    getService().deleteFeed(feedId);
  }

  /** @deprecated As of 6.2.0, replaced by {@link #deleteFeed(long, String)} */
  @Deprecated
  public static void deleteFeed(long groupId, long feedId)
      throws com.liferay.portal.kernel.exception.PortalException {
    getService().deleteFeed(groupId, feedId);
  }

  public static void deleteFeed(long groupId, java.lang.String feedId)
      throws com.liferay.portal.kernel.exception.PortalException {
    getService().deleteFeed(groupId, feedId);
  }

  public static com.liferay.journal.model.JournalFeed getFeed(long feedId)
      throws com.liferay.portal.kernel.exception.PortalException {
    return getService().getFeed(feedId);
  }

  public static com.liferay.journal.model.JournalFeed getFeed(long groupId, java.lang.String feedId)
      throws com.liferay.portal.kernel.exception.PortalException {
    return getService().getFeed(groupId, feedId);
  }

  /** @deprecated As of 6.2.0, replaced by {@link #getFeed(long, String)} */
  @Deprecated
  public static com.liferay.journal.model.JournalFeed getFeed(long groupId, long feedId)
      throws com.liferay.portal.kernel.exception.PortalException {
    return getService().getFeed(groupId, feedId);
  }

  /**
   * Returns the OSGi service identifier.
   *
   * @return the OSGi service identifier
   */
  public static java.lang.String getOSGiServiceIdentifier() {
    return getService().getOSGiServiceIdentifier();
  }

  public static com.liferay.journal.model.JournalFeed updateFeed(
      long groupId,
      java.lang.String feedId,
      java.lang.String name,
      java.lang.String description,
      java.lang.String ddmStructureKey,
      java.lang.String ddmTemplateKey,
      java.lang.String ddmRendererTemplateKey,
      int delta,
      java.lang.String orderByCol,
      java.lang.String orderByType,
      java.lang.String targetLayoutFriendlyUrl,
      java.lang.String targetPortletId,
      java.lang.String contentField,
      java.lang.String feedType,
      double feedVersion,
      com.liferay.portal.service.ServiceContext serviceContext)
      throws com.liferay.portal.kernel.exception.PortalException {
    return getService()
        .updateFeed(
            groupId,
            feedId,
            name,
            description,
            ddmStructureKey,
            ddmTemplateKey,
            ddmRendererTemplateKey,
            delta,
            orderByCol,
            orderByType,
            targetLayoutFriendlyUrl,
            targetPortletId,
            contentField,
            feedType,
            feedVersion,
            serviceContext);
  }

  public static JournalFeedService getService() {
    return _serviceTracker.getService();
  }

  /** @deprecated As of 6.2.0 */
  @Deprecated
  public void setService(JournalFeedService service) {}

  private static ServiceTracker<JournalFeedService, JournalFeedService> _serviceTracker =
      ServiceTrackerFactory.open(JournalFeedService.class);
}
/**
 * Provides the remote service utility for PollsQuestion. This utility wraps {@link
 * com.liferay.polls.service.impl.PollsQuestionServiceImpl} and is the primary access point for
 * service operations in application layer code running on a remote server. Methods of this service
 * are expected to have security checks based on the propagated JAAS credentials because this
 * service can be accessed remotely.
 *
 * @author Brian Wing Shun Chan
 * @see PollsQuestionService
 * @see com.liferay.polls.service.base.PollsQuestionServiceBaseImpl
 * @see com.liferay.polls.service.impl.PollsQuestionServiceImpl
 * @generated
 */
@ProviderType
public class PollsQuestionServiceUtil {
  /*
   * NOTE FOR DEVELOPERS:
   *
   * Never modify this class directly. Add custom service methods to {@link com.liferay.polls.service.impl.PollsQuestionServiceImpl} and rerun ServiceBuilder to regenerate this class.
   */
  public static com.liferay.polls.model.PollsQuestion addQuestion(
      java.util.Map<java.util.Locale, java.lang.String> titleMap,
      java.util.Map<java.util.Locale, java.lang.String> descriptionMap,
      int expirationDateMonth,
      int expirationDateDay,
      int expirationDateYear,
      int expirationDateHour,
      int expirationDateMinute,
      boolean neverExpire,
      java.util.List<com.liferay.polls.model.PollsChoice> choices,
      com.liferay.portal.kernel.service.ServiceContext serviceContext)
      throws com.liferay.portal.kernel.exception.PortalException {
    return getService()
        .addQuestion(
            titleMap,
            descriptionMap,
            expirationDateMonth,
            expirationDateDay,
            expirationDateYear,
            expirationDateHour,
            expirationDateMinute,
            neverExpire,
            choices,
            serviceContext);
  }

  public static void deleteQuestion(long questionId)
      throws com.liferay.portal.kernel.exception.PortalException {
    getService().deleteQuestion(questionId);
  }

  /**
   * Returns the OSGi service identifier.
   *
   * @return the OSGi service identifier
   */
  public static java.lang.String getOSGiServiceIdentifier() {
    return getService().getOSGiServiceIdentifier();
  }

  public static com.liferay.polls.model.PollsQuestion getQuestion(long questionId)
      throws com.liferay.portal.kernel.exception.PortalException {
    return getService().getQuestion(questionId);
  }

  public static com.liferay.polls.model.PollsQuestion updateQuestion(
      long questionId,
      java.util.Map<java.util.Locale, java.lang.String> titleMap,
      java.util.Map<java.util.Locale, java.lang.String> descriptionMap,
      int expirationDateMonth,
      int expirationDateDay,
      int expirationDateYear,
      int expirationDateHour,
      int expirationDateMinute,
      boolean neverExpire,
      java.util.List<com.liferay.polls.model.PollsChoice> choices,
      com.liferay.portal.kernel.service.ServiceContext serviceContext)
      throws com.liferay.portal.kernel.exception.PortalException {
    return getService()
        .updateQuestion(
            questionId,
            titleMap,
            descriptionMap,
            expirationDateMonth,
            expirationDateDay,
            expirationDateYear,
            expirationDateHour,
            expirationDateMinute,
            neverExpire,
            choices,
            serviceContext);
  }

  public static PollsQuestionService getService() {
    return _serviceTracker.getService();
  }

  private static ServiceTracker<PollsQuestionService, PollsQuestionService> _serviceTracker =
      ServiceTrackerFactory.open(PollsQuestionService.class);
}
/**
 * Provides the local service utility for DDMTemplateVersion. This utility wraps {@link
 * com.liferay.dynamic.data.mapping.service.impl.DDMTemplateVersionLocalServiceImpl} and is the
 * primary access point for service operations in application layer code running on the local
 * server. 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 Brian Wing Shun Chan
 * @see DDMTemplateVersionLocalService
 * @see com.liferay.dynamic.data.mapping.service.base.DDMTemplateVersionLocalServiceBaseImpl
 * @see com.liferay.dynamic.data.mapping.service.impl.DDMTemplateVersionLocalServiceImpl
 * @generated
 */
@ProviderType
public class DDMTemplateVersionLocalServiceUtil {
  /*
   * NOTE FOR DEVELOPERS:
   *
   * Never modify this class directly. Add custom service methods to {@link com.liferay.dynamic.data.mapping.service.impl.DDMTemplateVersionLocalServiceImpl} and rerun ServiceBuilder to regenerate this class.
   */

  /**
   * Adds the d d m template version to the database. Also notifies the appropriate model listeners.
   *
   * @param ddmTemplateVersion the d d m template version
   * @return the d d m template version that was added
   */
  public static com.liferay.dynamic.data.mapping.model.DDMTemplateVersion addDDMTemplateVersion(
      com.liferay.dynamic.data.mapping.model.DDMTemplateVersion ddmTemplateVersion) {
    return getService().addDDMTemplateVersion(ddmTemplateVersion);
  }

  /**
   * Creates a new d d m template version with the primary key. Does not add the d d m template
   * version to the database.
   *
   * @param templateVersionId the primary key for the new d d m template version
   * @return the new d d m template version
   */
  public static com.liferay.dynamic.data.mapping.model.DDMTemplateVersion createDDMTemplateVersion(
      long templateVersionId) {
    return getService().createDDMTemplateVersion(templateVersionId);
  }

  /**
   * Deletes the d d m template version from the database. Also notifies the appropriate model
   * listeners.
   *
   * @param ddmTemplateVersion the d d m template version
   * @return the d d m template version that was removed
   */
  public static com.liferay.dynamic.data.mapping.model.DDMTemplateVersion deleteDDMTemplateVersion(
      com.liferay.dynamic.data.mapping.model.DDMTemplateVersion ddmTemplateVersion) {
    return getService().deleteDDMTemplateVersion(ddmTemplateVersion);
  }

  /**
   * Deletes the d d m template version with the primary key from the database. Also notifies the
   * appropriate model listeners.
   *
   * @param templateVersionId the primary key of the d d m template version
   * @return the d d m template version that was removed
   * @throws PortalException if a d d m template version with the primary key could not be found
   */
  public static com.liferay.dynamic.data.mapping.model.DDMTemplateVersion deleteDDMTemplateVersion(
      long templateVersionId) throws com.liferay.portal.kernel.exception.PortalException {
    return getService().deleteDDMTemplateVersion(templateVersionId);
  }

  /** @throws PortalException */
  public static com.liferay.portal.model.PersistedModel deletePersistedModel(
      com.liferay.portal.model.PersistedModel persistedModel)
      throws com.liferay.portal.kernel.exception.PortalException {
    return getService().deletePersistedModel(persistedModel);
  }

  public static com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery() {
    return getService().dynamicQuery();
  }

  /**
   * Performs a dynamic query on the database and returns the matching rows.
   *
   * @param dynamicQuery the dynamic query
   * @return the matching rows
   */
  public static <T> java.util.List<T> dynamicQuery(
      com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery) {
    return getService().dynamicQuery(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.dynamic.data.mapping.model.impl.DDMTemplateVersionModelImpl}. 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.
   *
   * @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
   */
  public static <T> java.util.List<T> dynamicQuery(
      com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start, int end) {
    return getService().dynamicQuery(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.dynamic.data.mapping.model.impl.DDMTemplateVersionModelImpl}. 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.
   *
   * @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
   */
  public static <T> java.util.List<T> dynamicQuery(
      com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery,
      int start,
      int end,
      com.liferay.portal.kernel.util.OrderByComparator<T> orderByComparator) {
    return getService().dynamicQuery(dynamicQuery, start, end, orderByComparator);
  }

  /**
   * Returns the number of rows matching the dynamic query.
   *
   * @param dynamicQuery the dynamic query
   * @return the number of rows matching the dynamic query
   */
  public static long dynamicQueryCount(
      com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery) {
    return getService().dynamicQueryCount(dynamicQuery);
  }

  /**
   * Returns the number of rows matching the dynamic query.
   *
   * @param dynamicQuery the dynamic query
   * @param projection the projection to apply to the query
   * @return the number of rows matching the dynamic query
   */
  public static long dynamicQueryCount(
      com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery,
      com.liferay.portal.kernel.dao.orm.Projection projection) {
    return getService().dynamicQueryCount(dynamicQuery, projection);
  }

  public static com.liferay.dynamic.data.mapping.model.DDMTemplateVersion fetchDDMTemplateVersion(
      long templateVersionId) {
    return getService().fetchDDMTemplateVersion(templateVersionId);
  }

  public static com.liferay.portal.kernel.dao.orm.ActionableDynamicQuery
      getActionableDynamicQuery() {
    return getService().getActionableDynamicQuery();
  }

  /**
   * Returns the d d m template version with the primary key.
   *
   * @param templateVersionId the primary key of the d d m template version
   * @return the d d m template version
   * @throws PortalException if a d d m template version with the primary key could not be found
   */
  public static com.liferay.dynamic.data.mapping.model.DDMTemplateVersion getDDMTemplateVersion(
      long templateVersionId) throws com.liferay.portal.kernel.exception.PortalException {
    return getService().getDDMTemplateVersion(templateVersionId);
  }

  /**
   * Returns a range of all the d d m template versions.
   *
   * <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.dynamic.data.mapping.model.impl.DDMTemplateVersionModelImpl}. 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.
   *
   * @param start the lower bound of the range of d d m template versions
   * @param end the upper bound of the range of d d m template versions (not inclusive)
   * @return the range of d d m template versions
   */
  public static java.util.List<com.liferay.dynamic.data.mapping.model.DDMTemplateVersion>
      getDDMTemplateVersions(int start, int end) {
    return getService().getDDMTemplateVersions(start, end);
  }

  /**
   * Returns the number of d d m template versions.
   *
   * @return the number of d d m template versions
   */
  public static int getDDMTemplateVersionsCount() {
    return getService().getDDMTemplateVersionsCount();
  }

  public static com.liferay.portal.kernel.dao.orm.IndexableActionableDynamicQuery
      getIndexableActionableDynamicQuery() {
    return getService().getIndexableActionableDynamicQuery();
  }

  public static com.liferay.dynamic.data.mapping.model.DDMTemplateVersion getLatestTemplateVersion(
      long templateId) throws com.liferay.portal.kernel.exception.PortalException {
    return getService().getLatestTemplateVersion(templateId);
  }

  /**
   * Returns the OSGi service identifier.
   *
   * @return the OSGi service identifier
   */
  public static java.lang.String getOSGiServiceIdentifier() {
    return getService().getOSGiServiceIdentifier();
  }

  public static com.liferay.portal.model.PersistedModel getPersistedModel(
      java.io.Serializable primaryKeyObj)
      throws com.liferay.portal.kernel.exception.PortalException {
    return getService().getPersistedModel(primaryKeyObj);
  }

  public static com.liferay.dynamic.data.mapping.model.DDMTemplateVersion getTemplateVersion(
      long templateId, java.lang.String version)
      throws com.liferay.portal.kernel.exception.PortalException {
    return getService().getTemplateVersion(templateId, version);
  }

  public static com.liferay.dynamic.data.mapping.model.DDMTemplateVersion getTemplateVersion(
      long templateVersionId) throws com.liferay.portal.kernel.exception.PortalException {
    return getService().getTemplateVersion(templateVersionId);
  }

  public static java.util.List<com.liferay.dynamic.data.mapping.model.DDMTemplateVersion>
      getTemplateVersions(
          long templateId,
          int start,
          int end,
          com.liferay.portal.kernel.util.OrderByComparator<
                  com.liferay.dynamic.data.mapping.model.DDMTemplateVersion>
              orderByComparator) {
    return getService().getTemplateVersions(templateId, start, end, orderByComparator);
  }

  public static int getTemplateVersionsCount(long templateId) {
    return getService().getTemplateVersionsCount(templateId);
  }

  /**
   * Updates the d d m template version in the database or adds it if it does not yet exist. Also
   * notifies the appropriate model listeners.
   *
   * @param ddmTemplateVersion the d d m template version
   * @return the d d m template version that was updated
   */
  public static com.liferay.dynamic.data.mapping.model.DDMTemplateVersion updateDDMTemplateVersion(
      com.liferay.dynamic.data.mapping.model.DDMTemplateVersion ddmTemplateVersion) {
    return getService().updateDDMTemplateVersion(ddmTemplateVersion);
  }

  public static DDMTemplateVersionLocalService getService() {
    return _serviceTracker.getService();
  }

  /** @deprecated As of 6.2.0 */
  @Deprecated
  public void setService(DDMTemplateVersionLocalService service) {}

  private static ServiceTracker<DDMTemplateVersionLocalService, DDMTemplateVersionLocalService>
      _serviceTracker = ServiceTrackerFactory.open(DDMTemplateVersionLocalService.class);
}
/**
 * Provides the local service utility for ShoppingCoupon. This utility wraps {@link
 * com.liferay.shopping.service.impl.ShoppingCouponLocalServiceImpl} and is the primary access point
 * for service operations in application layer code running on the local server. 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 Brian Wing Shun Chan
 * @see ShoppingCouponLocalService
 * @see com.liferay.shopping.service.base.ShoppingCouponLocalServiceBaseImpl
 * @see com.liferay.shopping.service.impl.ShoppingCouponLocalServiceImpl
 * @generated
 */
@ProviderType
public class ShoppingCouponLocalServiceUtil {
  /*
   * NOTE FOR DEVELOPERS:
   *
   * Never modify this class directly. Add custom service methods to {@link com.liferay.shopping.service.impl.ShoppingCouponLocalServiceImpl} and rerun ServiceBuilder to regenerate this class.
   */
  public static com.liferay.portal.kernel.dao.orm.ActionableDynamicQuery
      getActionableDynamicQuery() {
    return getService().getActionableDynamicQuery();
  }

  public static com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery() {
    return getService().dynamicQuery();
  }

  public static com.liferay.portal.kernel.dao.orm.IndexableActionableDynamicQuery
      getIndexableActionableDynamicQuery() {
    return getService().getIndexableActionableDynamicQuery();
  }

  /** @throws PortalException */
  public static com.liferay.portal.kernel.model.PersistedModel deletePersistedModel(
      com.liferay.portal.kernel.model.PersistedModel persistedModel)
      throws com.liferay.portal.kernel.exception.PortalException {
    return getService().deletePersistedModel(persistedModel);
  }

  public static com.liferay.portal.kernel.model.PersistedModel getPersistedModel(
      java.io.Serializable primaryKeyObj)
      throws com.liferay.portal.kernel.exception.PortalException {
    return getService().getPersistedModel(primaryKeyObj);
  }

  public static com.liferay.shopping.model.ShoppingCoupon addCoupon(
      long userId,
      java.lang.String code,
      boolean autoCode,
      java.lang.String name,
      java.lang.String description,
      int startDateMonth,
      int startDateDay,
      int startDateYear,
      int startDateHour,
      int startDateMinute,
      int endDateMonth,
      int endDateDay,
      int endDateYear,
      int endDateHour,
      int endDateMinute,
      boolean neverExpire,
      boolean active,
      java.lang.String limitCategories,
      java.lang.String limitSkus,
      double minOrder,
      double discount,
      java.lang.String discountType,
      com.liferay.portal.kernel.service.ServiceContext serviceContext)
      throws com.liferay.portal.kernel.exception.PortalException {
    return getService()
        .addCoupon(
            userId,
            code,
            autoCode,
            name,
            description,
            startDateMonth,
            startDateDay,
            startDateYear,
            startDateHour,
            startDateMinute,
            endDateMonth,
            endDateDay,
            endDateYear,
            endDateHour,
            endDateMinute,
            neverExpire,
            active,
            limitCategories,
            limitSkus,
            minOrder,
            discount,
            discountType,
            serviceContext);
  }

  /**
   * Adds the shopping coupon to the database. Also notifies the appropriate model listeners.
   *
   * @param shoppingCoupon the shopping coupon
   * @return the shopping coupon that was added
   */
  public static com.liferay.shopping.model.ShoppingCoupon addShoppingCoupon(
      com.liferay.shopping.model.ShoppingCoupon shoppingCoupon) {
    return getService().addShoppingCoupon(shoppingCoupon);
  }

  /**
   * Creates a new shopping coupon with the primary key. Does not add the shopping coupon to the
   * database.
   *
   * @param couponId the primary key for the new shopping coupon
   * @return the new shopping coupon
   */
  public static com.liferay.shopping.model.ShoppingCoupon createShoppingCoupon(long couponId) {
    return getService().createShoppingCoupon(couponId);
  }

  /**
   * Deletes the shopping coupon from the database. Also notifies the appropriate model listeners.
   *
   * @param shoppingCoupon the shopping coupon
   * @return the shopping coupon that was removed
   */
  public static com.liferay.shopping.model.ShoppingCoupon deleteShoppingCoupon(
      com.liferay.shopping.model.ShoppingCoupon shoppingCoupon) {
    return getService().deleteShoppingCoupon(shoppingCoupon);
  }

  /**
   * Deletes the shopping coupon with the primary key from the database. Also notifies the
   * appropriate model listeners.
   *
   * @param couponId the primary key of the shopping coupon
   * @return the shopping coupon that was removed
   * @throws PortalException if a shopping coupon with the primary key could not be found
   */
  public static com.liferay.shopping.model.ShoppingCoupon deleteShoppingCoupon(long couponId)
      throws com.liferay.portal.kernel.exception.PortalException {
    return getService().deleteShoppingCoupon(couponId);
  }

  public static com.liferay.shopping.model.ShoppingCoupon fetchShoppingCoupon(long couponId) {
    return getService().fetchShoppingCoupon(couponId);
  }

  public static com.liferay.shopping.model.ShoppingCoupon getCoupon(java.lang.String code)
      throws com.liferay.portal.kernel.exception.PortalException {
    return getService().getCoupon(code);
  }

  public static com.liferay.shopping.model.ShoppingCoupon getCoupon(long couponId)
      throws com.liferay.portal.kernel.exception.PortalException {
    return getService().getCoupon(couponId);
  }

  /**
   * Returns the shopping coupon with the primary key.
   *
   * @param couponId the primary key of the shopping coupon
   * @return the shopping coupon
   * @throws PortalException if a shopping coupon with the primary key could not be found
   */
  public static com.liferay.shopping.model.ShoppingCoupon getShoppingCoupon(long couponId)
      throws com.liferay.portal.kernel.exception.PortalException {
    return getService().getShoppingCoupon(couponId);
  }

  public static com.liferay.shopping.model.ShoppingCoupon updateCoupon(
      long userId,
      long couponId,
      java.lang.String name,
      java.lang.String description,
      int startDateMonth,
      int startDateDay,
      int startDateYear,
      int startDateHour,
      int startDateMinute,
      int endDateMonth,
      int endDateDay,
      int endDateYear,
      int endDateHour,
      int endDateMinute,
      boolean neverExpire,
      boolean active,
      java.lang.String limitCategories,
      java.lang.String limitSkus,
      double minOrder,
      double discount,
      java.lang.String discountType,
      com.liferay.portal.kernel.service.ServiceContext serviceContext)
      throws com.liferay.portal.kernel.exception.PortalException {
    return getService()
        .updateCoupon(
            userId,
            couponId,
            name,
            description,
            startDateMonth,
            startDateDay,
            startDateYear,
            startDateHour,
            startDateMinute,
            endDateMonth,
            endDateDay,
            endDateYear,
            endDateHour,
            endDateMinute,
            neverExpire,
            active,
            limitCategories,
            limitSkus,
            minOrder,
            discount,
            discountType,
            serviceContext);
  }

  /**
   * Updates the shopping coupon in the database or adds it if it does not yet exist. Also notifies
   * the appropriate model listeners.
   *
   * @param shoppingCoupon the shopping coupon
   * @return the shopping coupon that was updated
   */
  public static com.liferay.shopping.model.ShoppingCoupon updateShoppingCoupon(
      com.liferay.shopping.model.ShoppingCoupon shoppingCoupon) {
    return getService().updateShoppingCoupon(shoppingCoupon);
  }

  /**
   * Returns the number of shopping coupons.
   *
   * @return the number of shopping coupons
   */
  public static int getShoppingCouponsCount() {
    return getService().getShoppingCouponsCount();
  }

  public static int searchCount(
      long groupId,
      long companyId,
      java.lang.String code,
      boolean active,
      java.lang.String discountType,
      boolean andOperator) {
    return getService().searchCount(groupId, companyId, code, active, discountType, andOperator);
  }

  /**
   * Returns the OSGi service identifier.
   *
   * @return the OSGi service identifier
   */
  public static java.lang.String getOSGiServiceIdentifier() {
    return getService().getOSGiServiceIdentifier();
  }

  /**
   * Performs a dynamic query on the database and returns the matching rows.
   *
   * @param dynamicQuery the dynamic query
   * @return the matching rows
   */
  public static <T> java.util.List<T> dynamicQuery(
      com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery) {
    return getService().dynamicQuery(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.shopping.model.impl.ShoppingCouponModelImpl}. 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.
   *
   * @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
   */
  public static <T> java.util.List<T> dynamicQuery(
      com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start, int end) {
    return getService().dynamicQuery(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.shopping.model.impl.ShoppingCouponModelImpl}. 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.
   *
   * @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
   */
  public static <T> java.util.List<T> dynamicQuery(
      com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery,
      int start,
      int end,
      com.liferay.portal.kernel.util.OrderByComparator<T> orderByComparator) {
    return getService().dynamicQuery(dynamicQuery, start, end, orderByComparator);
  }

  /**
   * Returns a range of all the shopping coupons.
   *
   * <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.shopping.model.impl.ShoppingCouponModelImpl}. 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.
   *
   * @param start the lower bound of the range of shopping coupons
   * @param end the upper bound of the range of shopping coupons (not inclusive)
   * @return the range of shopping coupons
   */
  public static java.util.List<com.liferay.shopping.model.ShoppingCoupon> getShoppingCoupons(
      int start, int end) {
    return getService().getShoppingCoupons(start, end);
  }

  public static java.util.List<com.liferay.shopping.model.ShoppingCoupon> search(
      long groupId,
      long companyId,
      java.lang.String code,
      boolean active,
      java.lang.String discountType,
      boolean andOperator,
      int start,
      int end) {
    return getService()
        .search(groupId, companyId, code, active, discountType, andOperator, start, end);
  }

  /**
   * Returns the number of rows matching the dynamic query.
   *
   * @param dynamicQuery the dynamic query
   * @return the number of rows matching the dynamic query
   */
  public static long dynamicQueryCount(
      com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery) {
    return getService().dynamicQueryCount(dynamicQuery);
  }

  /**
   * Returns the number of rows matching the dynamic query.
   *
   * @param dynamicQuery the dynamic query
   * @param projection the projection to apply to the query
   * @return the number of rows matching the dynamic query
   */
  public static long dynamicQueryCount(
      com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery,
      com.liferay.portal.kernel.dao.orm.Projection projection) {
    return getService().dynamicQueryCount(dynamicQuery, projection);
  }

  public static void deleteCoupon(com.liferay.shopping.model.ShoppingCoupon coupon) {
    getService().deleteCoupon(coupon);
  }

  public static void deleteCoupon(long couponId)
      throws com.liferay.portal.kernel.exception.PortalException {
    getService().deleteCoupon(couponId);
  }

  public static void deleteCoupons(long groupId) {
    getService().deleteCoupons(groupId);
  }

  public static ShoppingCouponLocalService getService() {
    return _serviceTracker.getService();
  }

  private static ServiceTracker<ShoppingCouponLocalService, ShoppingCouponLocalService>
      _serviceTracker = ServiceTrackerFactory.open(ShoppingCouponLocalService.class);
}
Esempio n. 17
0
/**
 * The persistence utility for the k b template service. This utility wraps {@link
 * com.liferay.knowledge.base.service.persistence.impl.KBTemplatePersistenceImpl} and provides
 * direct access to the database for CRUD operations. This utility should only be used by the
 * service layer, as it must operate within a transaction. Never access this utility in a JSP,
 * controller, model, or other front-end class.
 *
 * <p>Caching information and settings can be found in <code>portal.properties</code>
 *
 * @author Brian Wing Shun Chan
 * @see KBTemplatePersistence
 * @see com.liferay.knowledge.base.service.persistence.impl.KBTemplatePersistenceImpl
 * @generated
 */
@ProviderType
public class KBTemplateUtil {
  /*
   * NOTE FOR DEVELOPERS:
   *
   * Never modify this class directly. Modify <code>service.xml</code> and rerun ServiceBuilder to regenerate this class.
   */

  /** @see com.liferay.portal.kernel.service.persistence.BasePersistence#clearCache() */
  public static void clearCache() {
    getPersistence().clearCache();
  }

  /**
   * @see
   *     com.liferay.portal.kernel.service.persistence.BasePersistence#clearCache(com.liferay.portal.kernel.model.BaseModel)
   */
  public static void clearCache(KBTemplate kbTemplate) {
    getPersistence().clearCache(kbTemplate);
  }

  /**
   * @see
   *     com.liferay.portal.kernel.service.persistence.BasePersistence#countWithDynamicQuery(DynamicQuery)
   */
  public static long countWithDynamicQuery(DynamicQuery dynamicQuery) {
    return getPersistence().countWithDynamicQuery(dynamicQuery);
  }

  /**
   * @see
   *     com.liferay.portal.kernel.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery)
   */
  public static List<KBTemplate> findWithDynamicQuery(DynamicQuery dynamicQuery) {
    return getPersistence().findWithDynamicQuery(dynamicQuery);
  }

  /**
   * @see
   *     com.liferay.portal.kernel.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery,
   *     int, int)
   */
  public static List<KBTemplate> findWithDynamicQuery(
      DynamicQuery dynamicQuery, int start, int end) {
    return getPersistence().findWithDynamicQuery(dynamicQuery, start, end);
  }

  /**
   * @see
   *     com.liferay.portal.kernel.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery,
   *     int, int, OrderByComparator)
   */
  public static List<KBTemplate> findWithDynamicQuery(
      DynamicQuery dynamicQuery,
      int start,
      int end,
      OrderByComparator<KBTemplate> orderByComparator) {
    return getPersistence().findWithDynamicQuery(dynamicQuery, start, end, orderByComparator);
  }

  /**
   * @see
   *     com.liferay.portal.kernel.service.persistence.BasePersistence#update(com.liferay.portal.kernel.model.BaseModel)
   */
  public static KBTemplate update(KBTemplate kbTemplate) {
    return getPersistence().update(kbTemplate);
  }

  /**
   * @see
   *     com.liferay.portal.kernel.service.persistence.BasePersistence#update(com.liferay.portal.kernel.model.BaseModel,
   *     ServiceContext)
   */
  public static KBTemplate update(KBTemplate kbTemplate, ServiceContext serviceContext) {
    return getPersistence().update(kbTemplate, serviceContext);
  }

  /**
   * Returns all the k b templates where uuid = &#63;.
   *
   * @param uuid the uuid
   * @return the matching k b templates
   */
  public static List<KBTemplate> findByUuid(java.lang.String uuid) {
    return getPersistence().findByUuid(uuid);
  }

  /**
   * Returns a range of all the k b templates where uuid = &#63;.
   *
   * <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 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 QueryUtil#ALL_POS}), then the query will include
   * the default ORDER BY logic from {@link KBTemplateModelImpl}. 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.
   *
   * @param uuid the uuid
   * @param start the lower bound of the range of k b templates
   * @param end the upper bound of the range of k b templates (not inclusive)
   * @return the range of matching k b templates
   */
  public static List<KBTemplate> findByUuid(java.lang.String uuid, int start, int end) {
    return getPersistence().findByUuid(uuid, start, end);
  }

  /**
   * Returns an ordered range of all the k b templates where uuid = &#63;.
   *
   * <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 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 QueryUtil#ALL_POS}), then the query will include
   * the default ORDER BY logic from {@link KBTemplateModelImpl}. 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.
   *
   * @param uuid the uuid
   * @param start the lower bound of the range of k b templates
   * @param end the upper bound of the range of k b templates (not inclusive)
   * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
   * @return the ordered range of matching k b templates
   */
  public static List<KBTemplate> findByUuid(
      java.lang.String uuid, int start, int end, OrderByComparator<KBTemplate> orderByComparator) {
    return getPersistence().findByUuid(uuid, start, end, orderByComparator);
  }

  /**
   * Returns an ordered range of all the k b templates where uuid = &#63;.
   *
   * <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 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 QueryUtil#ALL_POS}), then the query will include
   * the default ORDER BY logic from {@link KBTemplateModelImpl}. 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.
   *
   * @param uuid the uuid
   * @param start the lower bound of the range of k b templates
   * @param end the upper bound of the range of k b templates (not inclusive)
   * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
   * @param retrieveFromCache whether to retrieve from the finder cache
   * @return the ordered range of matching k b templates
   */
  public static List<KBTemplate> findByUuid(
      java.lang.String uuid,
      int start,
      int end,
      OrderByComparator<KBTemplate> orderByComparator,
      boolean retrieveFromCache) {
    return getPersistence().findByUuid(uuid, start, end, orderByComparator, retrieveFromCache);
  }

  /**
   * Returns the first k b template in the ordered set where uuid = &#63;.
   *
   * @param uuid the uuid
   * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
   * @return the first matching k b template
   * @throws NoSuchTemplateException if a matching k b template could not be found
   */
  public static KBTemplate findByUuid_First(
      java.lang.String uuid, OrderByComparator<KBTemplate> orderByComparator)
      throws com.liferay.knowledge.base.exception.NoSuchTemplateException {
    return getPersistence().findByUuid_First(uuid, orderByComparator);
  }

  /**
   * Returns the first k b template in the ordered set where uuid = &#63;.
   *
   * @param uuid the uuid
   * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
   * @return the first matching k b template, or <code>null</code> if a matching k b template could
   *     not be found
   */
  public static KBTemplate fetchByUuid_First(
      java.lang.String uuid, OrderByComparator<KBTemplate> orderByComparator) {
    return getPersistence().fetchByUuid_First(uuid, orderByComparator);
  }

  /**
   * Returns the last k b template in the ordered set where uuid = &#63;.
   *
   * @param uuid the uuid
   * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
   * @return the last matching k b template
   * @throws NoSuchTemplateException if a matching k b template could not be found
   */
  public static KBTemplate findByUuid_Last(
      java.lang.String uuid, OrderByComparator<KBTemplate> orderByComparator)
      throws com.liferay.knowledge.base.exception.NoSuchTemplateException {
    return getPersistence().findByUuid_Last(uuid, orderByComparator);
  }

  /**
   * Returns the last k b template in the ordered set where uuid = &#63;.
   *
   * @param uuid the uuid
   * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
   * @return the last matching k b template, or <code>null</code> if a matching k b template could
   *     not be found
   */
  public static KBTemplate fetchByUuid_Last(
      java.lang.String uuid, OrderByComparator<KBTemplate> orderByComparator) {
    return getPersistence().fetchByUuid_Last(uuid, orderByComparator);
  }

  /**
   * Returns the k b templates before and after the current k b template in the ordered set where
   * uuid = &#63;.
   *
   * @param kbTemplateId the primary key of the current k b template
   * @param uuid the uuid
   * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
   * @return the previous, current, and next k b template
   * @throws NoSuchTemplateException if a k b template with the primary key could not be found
   */
  public static KBTemplate[] findByUuid_PrevAndNext(
      long kbTemplateId, java.lang.String uuid, OrderByComparator<KBTemplate> orderByComparator)
      throws com.liferay.knowledge.base.exception.NoSuchTemplateException {
    return getPersistence().findByUuid_PrevAndNext(kbTemplateId, uuid, orderByComparator);
  }

  /**
   * Removes all the k b templates where uuid = &#63; from the database.
   *
   * @param uuid the uuid
   */
  public static void removeByUuid(java.lang.String uuid) {
    getPersistence().removeByUuid(uuid);
  }

  /**
   * Returns the number of k b templates where uuid = &#63;.
   *
   * @param uuid the uuid
   * @return the number of matching k b templates
   */
  public static int countByUuid(java.lang.String uuid) {
    return getPersistence().countByUuid(uuid);
  }

  /**
   * Returns the k b template where uuid = &#63; and groupId = &#63; or throws a {@link
   * NoSuchTemplateException} if it could not be found.
   *
   * @param uuid the uuid
   * @param groupId the group ID
   * @return the matching k b template
   * @throws NoSuchTemplateException if a matching k b template could not be found
   */
  public static KBTemplate findByUUID_G(java.lang.String uuid, long groupId)
      throws com.liferay.knowledge.base.exception.NoSuchTemplateException {
    return getPersistence().findByUUID_G(uuid, groupId);
  }

  /**
   * Returns the k b template where uuid = &#63; and groupId = &#63; or returns <code>null</code> if
   * it could not be found. Uses the finder cache.
   *
   * @param uuid the uuid
   * @param groupId the group ID
   * @return the matching k b template, or <code>null</code> if a matching k b template could not be
   *     found
   */
  public static KBTemplate fetchByUUID_G(java.lang.String uuid, long groupId) {
    return getPersistence().fetchByUUID_G(uuid, groupId);
  }

  /**
   * Returns the k b template where uuid = &#63; and groupId = &#63; or returns <code>null</code> if
   * it could not be found, optionally using the finder cache.
   *
   * @param uuid the uuid
   * @param groupId the group ID
   * @param retrieveFromCache whether to retrieve from the finder cache
   * @return the matching k b template, or <code>null</code> if a matching k b template could not be
   *     found
   */
  public static KBTemplate fetchByUUID_G(
      java.lang.String uuid, long groupId, boolean retrieveFromCache) {
    return getPersistence().fetchByUUID_G(uuid, groupId, retrieveFromCache);
  }

  /**
   * Removes the k b template where uuid = &#63; and groupId = &#63; from the database.
   *
   * @param uuid the uuid
   * @param groupId the group ID
   * @return the k b template that was removed
   */
  public static KBTemplate removeByUUID_G(java.lang.String uuid, long groupId)
      throws com.liferay.knowledge.base.exception.NoSuchTemplateException {
    return getPersistence().removeByUUID_G(uuid, groupId);
  }

  /**
   * Returns the number of k b templates where uuid = &#63; and groupId = &#63;.
   *
   * @param uuid the uuid
   * @param groupId the group ID
   * @return the number of matching k b templates
   */
  public static int countByUUID_G(java.lang.String uuid, long groupId) {
    return getPersistence().countByUUID_G(uuid, groupId);
  }

  /**
   * Returns all the k b templates where uuid = &#63; and companyId = &#63;.
   *
   * @param uuid the uuid
   * @param companyId the company ID
   * @return the matching k b templates
   */
  public static List<KBTemplate> findByUuid_C(java.lang.String uuid, long companyId) {
    return getPersistence().findByUuid_C(uuid, companyId);
  }

  /**
   * Returns a range of all the k b templates where uuid = &#63; and companyId = &#63;.
   *
   * <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 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 QueryUtil#ALL_POS}), then the query will include
   * the default ORDER BY logic from {@link KBTemplateModelImpl}. 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.
   *
   * @param uuid the uuid
   * @param companyId the company ID
   * @param start the lower bound of the range of k b templates
   * @param end the upper bound of the range of k b templates (not inclusive)
   * @return the range of matching k b templates
   */
  public static List<KBTemplate> findByUuid_C(
      java.lang.String uuid, long companyId, int start, int end) {
    return getPersistence().findByUuid_C(uuid, companyId, start, end);
  }

  /**
   * Returns an ordered range of all the k b templates where uuid = &#63; and companyId = &#63;.
   *
   * <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 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 QueryUtil#ALL_POS}), then the query will include
   * the default ORDER BY logic from {@link KBTemplateModelImpl}. 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.
   *
   * @param uuid the uuid
   * @param companyId the company ID
   * @param start the lower bound of the range of k b templates
   * @param end the upper bound of the range of k b templates (not inclusive)
   * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
   * @return the ordered range of matching k b templates
   */
  public static List<KBTemplate> findByUuid_C(
      java.lang.String uuid,
      long companyId,
      int start,
      int end,
      OrderByComparator<KBTemplate> orderByComparator) {
    return getPersistence().findByUuid_C(uuid, companyId, start, end, orderByComparator);
  }

  /**
   * Returns an ordered range of all the k b templates where uuid = &#63; and companyId = &#63;.
   *
   * <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 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 QueryUtil#ALL_POS}), then the query will include
   * the default ORDER BY logic from {@link KBTemplateModelImpl}. 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.
   *
   * @param uuid the uuid
   * @param companyId the company ID
   * @param start the lower bound of the range of k b templates
   * @param end the upper bound of the range of k b templates (not inclusive)
   * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
   * @param retrieveFromCache whether to retrieve from the finder cache
   * @return the ordered range of matching k b templates
   */
  public static List<KBTemplate> findByUuid_C(
      java.lang.String uuid,
      long companyId,
      int start,
      int end,
      OrderByComparator<KBTemplate> orderByComparator,
      boolean retrieveFromCache) {
    return getPersistence()
        .findByUuid_C(uuid, companyId, start, end, orderByComparator, retrieveFromCache);
  }

  /**
   * Returns the first k b template in the ordered set where uuid = &#63; and companyId = &#63;.
   *
   * @param uuid the uuid
   * @param companyId the company ID
   * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
   * @return the first matching k b template
   * @throws NoSuchTemplateException if a matching k b template could not be found
   */
  public static KBTemplate findByUuid_C_First(
      java.lang.String uuid, long companyId, OrderByComparator<KBTemplate> orderByComparator)
      throws com.liferay.knowledge.base.exception.NoSuchTemplateException {
    return getPersistence().findByUuid_C_First(uuid, companyId, orderByComparator);
  }

  /**
   * Returns the first k b template in the ordered set where uuid = &#63; and companyId = &#63;.
   *
   * @param uuid the uuid
   * @param companyId the company ID
   * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
   * @return the first matching k b template, or <code>null</code> if a matching k b template could
   *     not be found
   */
  public static KBTemplate fetchByUuid_C_First(
      java.lang.String uuid, long companyId, OrderByComparator<KBTemplate> orderByComparator) {
    return getPersistence().fetchByUuid_C_First(uuid, companyId, orderByComparator);
  }

  /**
   * Returns the last k b template in the ordered set where uuid = &#63; and companyId = &#63;.
   *
   * @param uuid the uuid
   * @param companyId the company ID
   * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
   * @return the last matching k b template
   * @throws NoSuchTemplateException if a matching k b template could not be found
   */
  public static KBTemplate findByUuid_C_Last(
      java.lang.String uuid, long companyId, OrderByComparator<KBTemplate> orderByComparator)
      throws com.liferay.knowledge.base.exception.NoSuchTemplateException {
    return getPersistence().findByUuid_C_Last(uuid, companyId, orderByComparator);
  }

  /**
   * Returns the last k b template in the ordered set where uuid = &#63; and companyId = &#63;.
   *
   * @param uuid the uuid
   * @param companyId the company ID
   * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
   * @return the last matching k b template, or <code>null</code> if a matching k b template could
   *     not be found
   */
  public static KBTemplate fetchByUuid_C_Last(
      java.lang.String uuid, long companyId, OrderByComparator<KBTemplate> orderByComparator) {
    return getPersistence().fetchByUuid_C_Last(uuid, companyId, orderByComparator);
  }

  /**
   * Returns the k b templates before and after the current k b template in the ordered set where
   * uuid = &#63; and companyId = &#63;.
   *
   * @param kbTemplateId the primary key of the current k b template
   * @param uuid the uuid
   * @param companyId the company ID
   * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
   * @return the previous, current, and next k b template
   * @throws NoSuchTemplateException if a k b template with the primary key could not be found
   */
  public static KBTemplate[] findByUuid_C_PrevAndNext(
      long kbTemplateId,
      java.lang.String uuid,
      long companyId,
      OrderByComparator<KBTemplate> orderByComparator)
      throws com.liferay.knowledge.base.exception.NoSuchTemplateException {
    return getPersistence()
        .findByUuid_C_PrevAndNext(kbTemplateId, uuid, companyId, orderByComparator);
  }

  /**
   * Removes all the k b templates where uuid = &#63; and companyId = &#63; from the database.
   *
   * @param uuid the uuid
   * @param companyId the company ID
   */
  public static void removeByUuid_C(java.lang.String uuid, long companyId) {
    getPersistence().removeByUuid_C(uuid, companyId);
  }

  /**
   * Returns the number of k b templates where uuid = &#63; and companyId = &#63;.
   *
   * @param uuid the uuid
   * @param companyId the company ID
   * @return the number of matching k b templates
   */
  public static int countByUuid_C(java.lang.String uuid, long companyId) {
    return getPersistence().countByUuid_C(uuid, companyId);
  }

  /**
   * Returns all the k b templates where groupId = &#63;.
   *
   * @param groupId the group ID
   * @return the matching k b templates
   */
  public static List<KBTemplate> findByGroupId(long groupId) {
    return getPersistence().findByGroupId(groupId);
  }

  /**
   * Returns a range of all the k b templates where groupId = &#63;.
   *
   * <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 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 QueryUtil#ALL_POS}), then the query will include
   * the default ORDER BY logic from {@link KBTemplateModelImpl}. 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.
   *
   * @param groupId the group ID
   * @param start the lower bound of the range of k b templates
   * @param end the upper bound of the range of k b templates (not inclusive)
   * @return the range of matching k b templates
   */
  public static List<KBTemplate> findByGroupId(long groupId, int start, int end) {
    return getPersistence().findByGroupId(groupId, start, end);
  }

  /**
   * Returns an ordered range of all the k b templates where groupId = &#63;.
   *
   * <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 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 QueryUtil#ALL_POS}), then the query will include
   * the default ORDER BY logic from {@link KBTemplateModelImpl}. 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.
   *
   * @param groupId the group ID
   * @param start the lower bound of the range of k b templates
   * @param end the upper bound of the range of k b templates (not inclusive)
   * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
   * @return the ordered range of matching k b templates
   */
  public static List<KBTemplate> findByGroupId(
      long groupId, int start, int end, OrderByComparator<KBTemplate> orderByComparator) {
    return getPersistence().findByGroupId(groupId, start, end, orderByComparator);
  }

  /**
   * Returns an ordered range of all the k b templates where groupId = &#63;.
   *
   * <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 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 QueryUtil#ALL_POS}), then the query will include
   * the default ORDER BY logic from {@link KBTemplateModelImpl}. 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.
   *
   * @param groupId the group ID
   * @param start the lower bound of the range of k b templates
   * @param end the upper bound of the range of k b templates (not inclusive)
   * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
   * @param retrieveFromCache whether to retrieve from the finder cache
   * @return the ordered range of matching k b templates
   */
  public static List<KBTemplate> findByGroupId(
      long groupId,
      int start,
      int end,
      OrderByComparator<KBTemplate> orderByComparator,
      boolean retrieveFromCache) {
    return getPersistence()
        .findByGroupId(groupId, start, end, orderByComparator, retrieveFromCache);
  }

  /**
   * Returns the first k b template in the ordered set where groupId = &#63;.
   *
   * @param groupId the group ID
   * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
   * @return the first matching k b template
   * @throws NoSuchTemplateException if a matching k b template could not be found
   */
  public static KBTemplate findByGroupId_First(
      long groupId, OrderByComparator<KBTemplate> orderByComparator)
      throws com.liferay.knowledge.base.exception.NoSuchTemplateException {
    return getPersistence().findByGroupId_First(groupId, orderByComparator);
  }

  /**
   * Returns the first k b template in the ordered set where groupId = &#63;.
   *
   * @param groupId the group ID
   * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
   * @return the first matching k b template, or <code>null</code> if a matching k b template could
   *     not be found
   */
  public static KBTemplate fetchByGroupId_First(
      long groupId, OrderByComparator<KBTemplate> orderByComparator) {
    return getPersistence().fetchByGroupId_First(groupId, orderByComparator);
  }

  /**
   * Returns the last k b template in the ordered set where groupId = &#63;.
   *
   * @param groupId the group ID
   * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
   * @return the last matching k b template
   * @throws NoSuchTemplateException if a matching k b template could not be found
   */
  public static KBTemplate findByGroupId_Last(
      long groupId, OrderByComparator<KBTemplate> orderByComparator)
      throws com.liferay.knowledge.base.exception.NoSuchTemplateException {
    return getPersistence().findByGroupId_Last(groupId, orderByComparator);
  }

  /**
   * Returns the last k b template in the ordered set where groupId = &#63;.
   *
   * @param groupId the group ID
   * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
   * @return the last matching k b template, or <code>null</code> if a matching k b template could
   *     not be found
   */
  public static KBTemplate fetchByGroupId_Last(
      long groupId, OrderByComparator<KBTemplate> orderByComparator) {
    return getPersistence().fetchByGroupId_Last(groupId, orderByComparator);
  }

  /**
   * Returns the k b templates before and after the current k b template in the ordered set where
   * groupId = &#63;.
   *
   * @param kbTemplateId the primary key of the current k b template
   * @param groupId the group ID
   * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
   * @return the previous, current, and next k b template
   * @throws NoSuchTemplateException if a k b template with the primary key could not be found
   */
  public static KBTemplate[] findByGroupId_PrevAndNext(
      long kbTemplateId, long groupId, OrderByComparator<KBTemplate> orderByComparator)
      throws com.liferay.knowledge.base.exception.NoSuchTemplateException {
    return getPersistence().findByGroupId_PrevAndNext(kbTemplateId, groupId, orderByComparator);
  }

  /**
   * Returns all the k b templates that the user has permission to view where groupId = &#63;.
   *
   * @param groupId the group ID
   * @return the matching k b templates that the user has permission to view
   */
  public static List<KBTemplate> filterFindByGroupId(long groupId) {
    return getPersistence().filterFindByGroupId(groupId);
  }

  /**
   * Returns a range of all the k b templates that the user has permission to view where groupId =
   * &#63;.
   *
   * <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 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 QueryUtil#ALL_POS}), then the query will include
   * the default ORDER BY logic from {@link KBTemplateModelImpl}. 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.
   *
   * @param groupId the group ID
   * @param start the lower bound of the range of k b templates
   * @param end the upper bound of the range of k b templates (not inclusive)
   * @return the range of matching k b templates that the user has permission to view
   */
  public static List<KBTemplate> filterFindByGroupId(long groupId, int start, int end) {
    return getPersistence().filterFindByGroupId(groupId, start, end);
  }

  /**
   * Returns an ordered range of all the k b templates that the user has permissions to view where
   * groupId = &#63;.
   *
   * <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 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 QueryUtil#ALL_POS}), then the query will include
   * the default ORDER BY logic from {@link KBTemplateModelImpl}. 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.
   *
   * @param groupId the group ID
   * @param start the lower bound of the range of k b templates
   * @param end the upper bound of the range of k b templates (not inclusive)
   * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
   * @return the ordered range of matching k b templates that the user has permission to view
   */
  public static List<KBTemplate> filterFindByGroupId(
      long groupId, int start, int end, OrderByComparator<KBTemplate> orderByComparator) {
    return getPersistence().filterFindByGroupId(groupId, start, end, orderByComparator);
  }

  /**
   * Returns the k b templates before and after the current k b template in the ordered set of k b
   * templates that the user has permission to view where groupId = &#63;.
   *
   * @param kbTemplateId the primary key of the current k b template
   * @param groupId the group ID
   * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
   * @return the previous, current, and next k b template
   * @throws NoSuchTemplateException if a k b template with the primary key could not be found
   */
  public static KBTemplate[] filterFindByGroupId_PrevAndNext(
      long kbTemplateId, long groupId, OrderByComparator<KBTemplate> orderByComparator)
      throws com.liferay.knowledge.base.exception.NoSuchTemplateException {
    return getPersistence()
        .filterFindByGroupId_PrevAndNext(kbTemplateId, groupId, orderByComparator);
  }

  /**
   * Removes all the k b templates where groupId = &#63; from the database.
   *
   * @param groupId the group ID
   */
  public static void removeByGroupId(long groupId) {
    getPersistence().removeByGroupId(groupId);
  }

  /**
   * Returns the number of k b templates where groupId = &#63;.
   *
   * @param groupId the group ID
   * @return the number of matching k b templates
   */
  public static int countByGroupId(long groupId) {
    return getPersistence().countByGroupId(groupId);
  }

  /**
   * Returns the number of k b templates that the user has permission to view where groupId = &#63;.
   *
   * @param groupId the group ID
   * @return the number of matching k b templates that the user has permission to view
   */
  public static int filterCountByGroupId(long groupId) {
    return getPersistence().filterCountByGroupId(groupId);
  }

  /**
   * Caches the k b template in the entity cache if it is enabled.
   *
   * @param kbTemplate the k b template
   */
  public static void cacheResult(KBTemplate kbTemplate) {
    getPersistence().cacheResult(kbTemplate);
  }

  /**
   * Caches the k b templates in the entity cache if it is enabled.
   *
   * @param kbTemplates the k b templates
   */
  public static void cacheResult(List<KBTemplate> kbTemplates) {
    getPersistence().cacheResult(kbTemplates);
  }

  /**
   * Creates a new k b template with the primary key. Does not add the k b template to the database.
   *
   * @param kbTemplateId the primary key for the new k b template
   * @return the new k b template
   */
  public static KBTemplate create(long kbTemplateId) {
    return getPersistence().create(kbTemplateId);
  }

  /**
   * Removes the k b template with the primary key from the database. Also notifies the appropriate
   * model listeners.
   *
   * @param kbTemplateId the primary key of the k b template
   * @return the k b template that was removed
   * @throws NoSuchTemplateException if a k b template with the primary key could not be found
   */
  public static KBTemplate remove(long kbTemplateId)
      throws com.liferay.knowledge.base.exception.NoSuchTemplateException {
    return getPersistence().remove(kbTemplateId);
  }

  public static KBTemplate updateImpl(KBTemplate kbTemplate) {
    return getPersistence().updateImpl(kbTemplate);
  }

  /**
   * Returns the k b template with the primary key or throws a {@link NoSuchTemplateException} if it
   * could not be found.
   *
   * @param kbTemplateId the primary key of the k b template
   * @return the k b template
   * @throws NoSuchTemplateException if a k b template with the primary key could not be found
   */
  public static KBTemplate findByPrimaryKey(long kbTemplateId)
      throws com.liferay.knowledge.base.exception.NoSuchTemplateException {
    return getPersistence().findByPrimaryKey(kbTemplateId);
  }

  /**
   * Returns the k b template with the primary key or returns <code>null</code> if it could not be
   * found.
   *
   * @param kbTemplateId the primary key of the k b template
   * @return the k b template, or <code>null</code> if a k b template with the primary key could not
   *     be found
   */
  public static KBTemplate fetchByPrimaryKey(long kbTemplateId) {
    return getPersistence().fetchByPrimaryKey(kbTemplateId);
  }

  public static java.util.Map<java.io.Serializable, KBTemplate> fetchByPrimaryKeys(
      java.util.Set<java.io.Serializable> primaryKeys) {
    return getPersistence().fetchByPrimaryKeys(primaryKeys);
  }

  /**
   * Returns all the k b templates.
   *
   * @return the k b templates
   */
  public static List<KBTemplate> findAll() {
    return getPersistence().findAll();
  }

  /**
   * Returns a range of all the k b templates.
   *
   * <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 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 QueryUtil#ALL_POS}), then the query will include
   * the default ORDER BY logic from {@link KBTemplateModelImpl}. 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.
   *
   * @param start the lower bound of the range of k b templates
   * @param end the upper bound of the range of k b templates (not inclusive)
   * @return the range of k b templates
   */
  public static List<KBTemplate> findAll(int start, int end) {
    return getPersistence().findAll(start, end);
  }

  /**
   * Returns an ordered range of all the k b templates.
   *
   * <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 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 QueryUtil#ALL_POS}), then the query will include
   * the default ORDER BY logic from {@link KBTemplateModelImpl}. 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.
   *
   * @param start the lower bound of the range of k b templates
   * @param end the upper bound of the range of k b templates (not inclusive)
   * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
   * @return the ordered range of k b templates
   */
  public static List<KBTemplate> findAll(
      int start, int end, OrderByComparator<KBTemplate> orderByComparator) {
    return getPersistence().findAll(start, end, orderByComparator);
  }

  /**
   * Returns an ordered range of all the k b templates.
   *
   * <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 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 QueryUtil#ALL_POS}), then the query will include
   * the default ORDER BY logic from {@link KBTemplateModelImpl}. 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.
   *
   * @param start the lower bound of the range of k b templates
   * @param end the upper bound of the range of k b templates (not inclusive)
   * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
   * @param retrieveFromCache whether to retrieve from the finder cache
   * @return the ordered range of k b templates
   */
  public static List<KBTemplate> findAll(
      int start,
      int end,
      OrderByComparator<KBTemplate> orderByComparator,
      boolean retrieveFromCache) {
    return getPersistence().findAll(start, end, orderByComparator, retrieveFromCache);
  }

  /** Removes all the k b templates from the database. */
  public static void removeAll() {
    getPersistence().removeAll();
  }

  /**
   * Returns the number of k b templates.
   *
   * @return the number of k b templates
   */
  public static int countAll() {
    return getPersistence().countAll();
  }

  public static java.util.Set<java.lang.String> getBadColumnNames() {
    return getPersistence().getBadColumnNames();
  }

  public static KBTemplatePersistence getPersistence() {
    return _serviceTracker.getService();
  }

  private static ServiceTracker<KBTemplatePersistence, KBTemplatePersistence> _serviceTracker =
      ServiceTrackerFactory.open(KBTemplatePersistence.class);
}
/**
 * Provides the local service utility for App. This utility wraps {@link
 * com.liferay.marketplace.service.impl.AppLocalServiceImpl} and is the primary access point for
 * service operations in application layer code running on the local server. 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 Ryan Park
 * @see AppLocalService
 * @see com.liferay.marketplace.service.base.AppLocalServiceBaseImpl
 * @see com.liferay.marketplace.service.impl.AppLocalServiceImpl
 * @generated
 */
@ProviderType
public class AppLocalServiceUtil {
  /*
   * NOTE FOR DEVELOPERS:
   *
   * Never modify this class directly. Add custom service methods to {@link com.liferay.marketplace.service.impl.AppLocalServiceImpl} and rerun ServiceBuilder to regenerate this class.
   */

  /**
   * Adds the app to the database. Also notifies the appropriate model listeners.
   *
   * @param app the app
   * @return the app that was added
   */
  public static com.liferay.marketplace.model.App addApp(com.liferay.marketplace.model.App app) {
    return getService().addApp(app);
  }

  /**
   * Creates a new app with the primary key. Does not add the app to the database.
   *
   * @param appId the primary key for the new app
   * @return the new app
   */
  public static com.liferay.marketplace.model.App createApp(long appId) {
    return getService().createApp(appId);
  }

  /**
   * Deletes the app from the database. Also notifies the appropriate model listeners.
   *
   * @param app the app
   * @return the app that was removed
   */
  public static com.liferay.marketplace.model.App deleteApp(com.liferay.marketplace.model.App app) {
    return getService().deleteApp(app);
  }

  /**
   * Deletes the app with the primary key from the database. Also notifies the appropriate model
   * listeners.
   *
   * @param appId the primary key of the app
   * @return the app that was removed
   * @throws PortalException if a app with the primary key could not be found
   */
  public static com.liferay.marketplace.model.App deleteApp(long appId)
      throws com.liferay.portal.kernel.exception.PortalException {
    return getService().deleteApp(appId);
  }

  public static com.liferay.marketplace.model.App fetchApp(long appId) {
    return getService().fetchApp(appId);
  }

  /**
   * Returns the app with the matching UUID and company.
   *
   * @param uuid the app's UUID
   * @param companyId the primary key of the company
   * @return the matching app, or <code>null</code> if a matching app could not be found
   */
  public static com.liferay.marketplace.model.App fetchAppByUuidAndCompanyId(
      java.lang.String uuid, long companyId) {
    return getService().fetchAppByUuidAndCompanyId(uuid, companyId);
  }

  public static com.liferay.marketplace.model.App fetchRemoteApp(long remoteAppId) {
    return getService().fetchRemoteApp(remoteAppId);
  }

  /**
   * Returns the app with the primary key.
   *
   * @param appId the primary key of the app
   * @return the app
   * @throws PortalException if a app with the primary key could not be found
   */
  public static com.liferay.marketplace.model.App getApp(long appId)
      throws com.liferay.portal.kernel.exception.PortalException {
    return getService().getApp(appId);
  }

  /**
   * Returns the app with the matching UUID and company.
   *
   * @param uuid the app's UUID
   * @param companyId the primary key of the company
   * @return the matching app
   * @throws PortalException if a matching app could not be found
   */
  public static com.liferay.marketplace.model.App getAppByUuidAndCompanyId(
      java.lang.String uuid, long companyId)
      throws com.liferay.portal.kernel.exception.PortalException {
    return getService().getAppByUuidAndCompanyId(uuid, companyId);
  }

  /**
   * Updates the app in the database or adds it if it does not yet exist. Also notifies the
   * appropriate model listeners.
   *
   * @param app the app
   * @return the app that was updated
   */
  public static com.liferay.marketplace.model.App updateApp(com.liferay.marketplace.model.App app) {
    return getService().updateApp(app);
  }

  public static com.liferay.marketplace.model.App updateApp(long userId, java.io.File file)
      throws com.liferay.portal.kernel.exception.PortalException {
    return getService().updateApp(userId, file);
  }

  public static com.liferay.marketplace.model.App updateApp(
      long userId,
      long remoteAppId,
      java.lang.String title,
      java.lang.String description,
      java.lang.String category,
      java.lang.String iconURL,
      java.lang.String version,
      boolean required,
      java.io.File file)
      throws com.liferay.portal.kernel.exception.PortalException {
    return getService()
        .updateApp(
            userId, remoteAppId, title, description, category, iconURL, version, required, file);
  }

  public static com.liferay.portal.kernel.dao.orm.ActionableDynamicQuery
      getActionableDynamicQuery() {
    return getService().getActionableDynamicQuery();
  }

  public static com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery() {
    return getService().dynamicQuery();
  }

  public static com.liferay.portal.kernel.dao.orm.ExportActionableDynamicQuery
      getExportActionableDynamicQuery(
          com.liferay.exportimport.kernel.lar.PortletDataContext portletDataContext) {
    return getService().getExportActionableDynamicQuery(portletDataContext);
  }

  public static com.liferay.portal.kernel.dao.orm.IndexableActionableDynamicQuery
      getIndexableActionableDynamicQuery() {
    return getService().getIndexableActionableDynamicQuery();
  }

  /** @throws PortalException */
  public static com.liferay.portal.kernel.model.PersistedModel deletePersistedModel(
      com.liferay.portal.kernel.model.PersistedModel persistedModel)
      throws com.liferay.portal.kernel.exception.PortalException {
    return getService().deletePersistedModel(persistedModel);
  }

  public static com.liferay.portal.kernel.model.PersistedModel getPersistedModel(
      java.io.Serializable primaryKeyObj)
      throws com.liferay.portal.kernel.exception.PortalException {
    return getService().getPersistedModel(primaryKeyObj);
  }

  /**
   * Returns the number of apps.
   *
   * @return the number of apps
   */
  public static int getAppsCount() {
    return getService().getAppsCount();
  }

  /**
   * Returns the OSGi service identifier.
   *
   * @return the OSGi service identifier
   */
  public static java.lang.String getOSGiServiceIdentifier() {
    return getService().getOSGiServiceIdentifier();
  }

  /**
   * Performs a dynamic query on the database and returns the matching rows.
   *
   * @param dynamicQuery the dynamic query
   * @return the matching rows
   */
  public static <T> java.util.List<T> dynamicQuery(
      com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery) {
    return getService().dynamicQuery(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.marketplace.model.impl.AppModelImpl}. 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.
   *
   * @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
   */
  public static <T> java.util.List<T> dynamicQuery(
      com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start, int end) {
    return getService().dynamicQuery(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.marketplace.model.impl.AppModelImpl}. 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.
   *
   * @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
   */
  public static <T> java.util.List<T> dynamicQuery(
      com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery,
      int start,
      int end,
      com.liferay.portal.kernel.util.OrderByComparator<T> orderByComparator) {
    return getService().dynamicQuery(dynamicQuery, start, end, orderByComparator);
  }

  /**
   * Returns a range of all the apps.
   *
   * <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.marketplace.model.impl.AppModelImpl}. 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.
   *
   * @param start the lower bound of the range of apps
   * @param end the upper bound of the range of apps (not inclusive)
   * @return the range of apps
   */
  public static java.util.List<com.liferay.marketplace.model.App> getApps(int start, int end) {
    return getService().getApps(start, end);
  }

  public static java.util.List<com.liferay.marketplace.model.App> getApps(
      java.lang.String category) {
    return getService().getApps(category);
  }

  public static java.util.List<com.liferay.marketplace.model.App> getInstalledApps() {
    return getService().getInstalledApps();
  }

  public static java.util.List<com.liferay.marketplace.model.App> getInstalledApps(
      java.lang.String category) {
    return getService().getInstalledApps(category);
  }

  public static java.util.Map<java.lang.String, java.lang.String> getPrepackagedApps() {
    return getService().getPrepackagedApps();
  }

  /**
   * Returns the number of rows matching the dynamic query.
   *
   * @param dynamicQuery the dynamic query
   * @return the number of rows matching the dynamic query
   */
  public static long dynamicQueryCount(
      com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery) {
    return getService().dynamicQueryCount(dynamicQuery);
  }

  /**
   * Returns the number of rows matching the dynamic query.
   *
   * @param dynamicQuery the dynamic query
   * @param projection the projection to apply to the query
   * @return the number of rows matching the dynamic query
   */
  public static long dynamicQueryCount(
      com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery,
      com.liferay.portal.kernel.dao.orm.Projection projection) {
    return getService().dynamicQueryCount(dynamicQuery, projection);
  }

  public static void clearInstalledAppsCache() {
    getService().clearInstalledAppsCache();
  }

  public static void installApp(long remoteAppId)
      throws com.liferay.portal.kernel.exception.PortalException {
    getService().installApp(remoteAppId);
  }

  public static void uninstallApp(long remoteAppId)
      throws com.liferay.portal.kernel.exception.PortalException {
    getService().uninstallApp(remoteAppId);
  }

  public static AppLocalService getService() {
    return _serviceTracker.getService();
  }

  private static ServiceTracker<AppLocalService, AppLocalService> _serviceTracker =
      ServiceTrackerFactory.open(AppLocalService.class);
}
/**
 * Provides the remote service utility for CalendarBooking. This utility wraps {@link
 * com.liferay.calendar.service.impl.CalendarBookingServiceImpl} and is the primary access point for
 * service operations in application layer code running on a remote server. Methods of this service
 * are expected to have security checks based on the propagated JAAS credentials because this
 * service can be accessed remotely.
 *
 * @author Eduardo Lundgren
 * @see CalendarBookingService
 * @see com.liferay.calendar.service.base.CalendarBookingServiceBaseImpl
 * @see com.liferay.calendar.service.impl.CalendarBookingServiceImpl
 * @generated
 */
@ProviderType
public class CalendarBookingServiceUtil {
  /*
   * NOTE FOR DEVELOPERS:
   *
   * Never modify this class directly. Add custom service methods to {@link com.liferay.calendar.service.impl.CalendarBookingServiceImpl} and rerun ServiceBuilder to regenerate this class.
   */
  public static boolean hasChildCalendarBookings(long parentCalendarBookingId) {
    return getService().hasChildCalendarBookings(parentCalendarBookingId);
  }

  public static com.liferay.calendar.model.CalendarBooking addCalendarBooking(
      long calendarId,
      long[] childCalendarIds,
      long parentCalendarBookingId,
      java.util.Map<java.util.Locale, java.lang.String> titleMap,
      java.util.Map<java.util.Locale, java.lang.String> descriptionMap,
      java.lang.String location,
      int startTimeYear,
      int startTimeMonth,
      int startTimeDay,
      int startTimeHour,
      int startTimeMinute,
      int endTimeYear,
      int endTimeMonth,
      int endTimeDay,
      int endTimeHour,
      int endTimeMinute,
      java.lang.String timeZoneId,
      boolean allDay,
      java.lang.String recurrence,
      long firstReminder,
      java.lang.String firstReminderType,
      long secondReminder,
      java.lang.String secondReminderType,
      com.liferay.portal.kernel.service.ServiceContext serviceContext)
      throws com.liferay.portal.kernel.exception.PortalException {
    return getService()
        .addCalendarBooking(
            calendarId,
            childCalendarIds,
            parentCalendarBookingId,
            titleMap,
            descriptionMap,
            location,
            startTimeYear,
            startTimeMonth,
            startTimeDay,
            startTimeHour,
            startTimeMinute,
            endTimeYear,
            endTimeMonth,
            endTimeDay,
            endTimeHour,
            endTimeMinute,
            timeZoneId,
            allDay,
            recurrence,
            firstReminder,
            firstReminderType,
            secondReminder,
            secondReminderType,
            serviceContext);
  }

  public static com.liferay.calendar.model.CalendarBooking addCalendarBooking(
      long calendarId,
      long[] childCalendarIds,
      long parentCalendarBookingId,
      java.util.Map<java.util.Locale, java.lang.String> titleMap,
      java.util.Map<java.util.Locale, java.lang.String> descriptionMap,
      java.lang.String location,
      long startTime,
      long endTime,
      boolean allDay,
      java.lang.String recurrence,
      long firstReminder,
      java.lang.String firstReminderType,
      long secondReminder,
      java.lang.String secondReminderType,
      com.liferay.portal.kernel.service.ServiceContext serviceContext)
      throws com.liferay.portal.kernel.exception.PortalException {
    return getService()
        .addCalendarBooking(
            calendarId,
            childCalendarIds,
            parentCalendarBookingId,
            titleMap,
            descriptionMap,
            location,
            startTime,
            endTime,
            allDay,
            recurrence,
            firstReminder,
            firstReminderType,
            secondReminder,
            secondReminderType,
            serviceContext);
  }

  public static com.liferay.calendar.model.CalendarBooking deleteCalendarBooking(
      long calendarBookingId) throws com.liferay.portal.kernel.exception.PortalException {
    return getService().deleteCalendarBooking(calendarBookingId);
  }

  public static com.liferay.calendar.model.CalendarBooking fetchCalendarBooking(
      long calendarBookingId) throws com.liferay.portal.kernel.exception.PortalException {
    return getService().fetchCalendarBooking(calendarBookingId);
  }

  public static com.liferay.calendar.model.CalendarBooking getCalendarBooking(
      long calendarBookingId) throws com.liferay.portal.kernel.exception.PortalException {
    return getService().getCalendarBooking(calendarBookingId);
  }

  public static com.liferay.calendar.model.CalendarBooking getCalendarBooking(
      long calendarId, long parentCalendarBookingId)
      throws com.liferay.portal.kernel.exception.PortalException {
    return getService().getCalendarBooking(calendarId, parentCalendarBookingId);
  }

  public static com.liferay.calendar.model.CalendarBooking getCalendarBookingInstance(
      long calendarBookingId, int instanceIndex)
      throws com.liferay.portal.kernel.exception.PortalException {
    return getService().getCalendarBookingInstance(calendarBookingId, instanceIndex);
  }

  public static com.liferay.calendar.model.CalendarBooking
      getNewStartTimeAndDurationCalendarBooking(long calendarBookingId, long offset, long duration)
          throws com.liferay.portal.kernel.exception.PortalException {
    return getService()
        .getNewStartTimeAndDurationCalendarBooking(calendarBookingId, offset, duration);
  }

  public static com.liferay.calendar.model.CalendarBooking moveCalendarBookingToTrash(
      long calendarBookingId) throws com.liferay.portal.kernel.exception.PortalException {
    return getService().moveCalendarBookingToTrash(calendarBookingId);
  }

  public static com.liferay.calendar.model.CalendarBooking restoreCalendarBookingFromTrash(
      long calendarBookingId) throws com.liferay.portal.kernel.exception.PortalException {
    return getService().restoreCalendarBookingFromTrash(calendarBookingId);
  }

  public static com.liferay.calendar.model.CalendarBooking updateCalendarBooking(
      long calendarBookingId,
      long calendarId,
      java.util.Map<java.util.Locale, java.lang.String> titleMap,
      java.util.Map<java.util.Locale, java.lang.String> descriptionMap,
      java.lang.String location,
      long startTime,
      long endTime,
      boolean allDay,
      java.lang.String recurrence,
      long firstReminder,
      java.lang.String firstReminderType,
      long secondReminder,
      java.lang.String secondReminderType,
      com.liferay.portal.kernel.service.ServiceContext serviceContext)
      throws com.liferay.portal.kernel.exception.PortalException {
    return getService()
        .updateCalendarBooking(
            calendarBookingId,
            calendarId,
            titleMap,
            descriptionMap,
            location,
            startTime,
            endTime,
            allDay,
            recurrence,
            firstReminder,
            firstReminderType,
            secondReminder,
            secondReminderType,
            serviceContext);
  }

  public static com.liferay.calendar.model.CalendarBooking updateCalendarBooking(
      long calendarBookingId,
      long calendarId,
      long[] childCalendarIds,
      java.util.Map<java.util.Locale, java.lang.String> titleMap,
      java.util.Map<java.util.Locale, java.lang.String> descriptionMap,
      java.lang.String location,
      long startTime,
      long endTime,
      boolean allDay,
      java.lang.String recurrence,
      long firstReminder,
      java.lang.String firstReminderType,
      long secondReminder,
      java.lang.String secondReminderType,
      com.liferay.portal.kernel.service.ServiceContext serviceContext)
      throws com.liferay.portal.kernel.exception.PortalException {
    return getService()
        .updateCalendarBooking(
            calendarBookingId,
            calendarId,
            childCalendarIds,
            titleMap,
            descriptionMap,
            location,
            startTime,
            endTime,
            allDay,
            recurrence,
            firstReminder,
            firstReminderType,
            secondReminder,
            secondReminderType,
            serviceContext);
  }

  public static com.liferay.calendar.model.CalendarBooking updateCalendarBookingInstance(
      long calendarBookingId,
      int instanceIndex,
      long calendarId,
      java.util.Map<java.util.Locale, java.lang.String> titleMap,
      java.util.Map<java.util.Locale, java.lang.String> descriptionMap,
      java.lang.String location,
      int startTimeYear,
      int startTimeMonth,
      int startTimeDay,
      int startTimeHour,
      int startTimeMinute,
      int endTimeYear,
      int endTimeMonth,
      int endTimeDay,
      int endTimeHour,
      int endTimeMinute,
      java.lang.String timeZoneId,
      boolean allDay,
      java.lang.String recurrence,
      boolean allFollowing,
      long firstReminder,
      java.lang.String firstReminderType,
      long secondReminder,
      java.lang.String secondReminderType,
      com.liferay.portal.kernel.service.ServiceContext serviceContext)
      throws com.liferay.portal.kernel.exception.PortalException {
    return getService()
        .updateCalendarBookingInstance(
            calendarBookingId,
            instanceIndex,
            calendarId,
            titleMap,
            descriptionMap,
            location,
            startTimeYear,
            startTimeMonth,
            startTimeDay,
            startTimeHour,
            startTimeMinute,
            endTimeYear,
            endTimeMonth,
            endTimeDay,
            endTimeHour,
            endTimeMinute,
            timeZoneId,
            allDay,
            recurrence,
            allFollowing,
            firstReminder,
            firstReminderType,
            secondReminder,
            secondReminderType,
            serviceContext);
  }

  public static com.liferay.calendar.model.CalendarBooking updateCalendarBookingInstance(
      long calendarBookingId,
      int instanceIndex,
      long calendarId,
      java.util.Map<java.util.Locale, java.lang.String> titleMap,
      java.util.Map<java.util.Locale, java.lang.String> descriptionMap,
      java.lang.String location,
      long startTime,
      long endTime,
      boolean allDay,
      java.lang.String recurrence,
      boolean allFollowing,
      long firstReminder,
      java.lang.String firstReminderType,
      long secondReminder,
      java.lang.String secondReminderType,
      com.liferay.portal.kernel.service.ServiceContext serviceContext)
      throws com.liferay.portal.kernel.exception.PortalException {
    return getService()
        .updateCalendarBookingInstance(
            calendarBookingId,
            instanceIndex,
            calendarId,
            titleMap,
            descriptionMap,
            location,
            startTime,
            endTime,
            allDay,
            recurrence,
            allFollowing,
            firstReminder,
            firstReminderType,
            secondReminder,
            secondReminderType,
            serviceContext);
  }

  public static com.liferay.calendar.model.CalendarBooking updateCalendarBookingInstance(
      long calendarBookingId,
      int instanceIndex,
      long calendarId,
      long[] childCalendarIds,
      java.util.Map<java.util.Locale, java.lang.String> titleMap,
      java.util.Map<java.util.Locale, java.lang.String> descriptionMap,
      java.lang.String location,
      long startTime,
      long endTime,
      boolean allDay,
      java.lang.String recurrence,
      boolean allFollowing,
      long firstReminder,
      java.lang.String firstReminderType,
      long secondReminder,
      java.lang.String secondReminderType,
      com.liferay.portal.kernel.service.ServiceContext serviceContext)
      throws com.liferay.portal.kernel.exception.PortalException {
    return getService()
        .updateCalendarBookingInstance(
            calendarBookingId,
            instanceIndex,
            calendarId,
            childCalendarIds,
            titleMap,
            descriptionMap,
            location,
            startTime,
            endTime,
            allDay,
            recurrence,
            allFollowing,
            firstReminder,
            firstReminderType,
            secondReminder,
            secondReminderType,
            serviceContext);
  }

  public static com.liferay.calendar.model.CalendarBooking updateOffsetAndDuration(
      long calendarBookingId,
      long calendarId,
      java.util.Map<java.util.Locale, java.lang.String> titleMap,
      java.util.Map<java.util.Locale, java.lang.String> descriptionMap,
      java.lang.String location,
      long offset,
      long duration,
      boolean allDay,
      java.lang.String recurrence,
      long firstReminder,
      java.lang.String firstReminderType,
      long secondReminder,
      java.lang.String secondReminderType,
      com.liferay.portal.kernel.service.ServiceContext serviceContext)
      throws com.liferay.portal.kernel.exception.PortalException {
    return getService()
        .updateOffsetAndDuration(
            calendarBookingId,
            calendarId,
            titleMap,
            descriptionMap,
            location,
            offset,
            duration,
            allDay,
            recurrence,
            firstReminder,
            firstReminderType,
            secondReminder,
            secondReminderType,
            serviceContext);
  }

  public static com.liferay.calendar.model.CalendarBooking updateOffsetAndDuration(
      long calendarBookingId,
      long calendarId,
      long[] childCalendarIds,
      java.util.Map<java.util.Locale, java.lang.String> titleMap,
      java.util.Map<java.util.Locale, java.lang.String> descriptionMap,
      java.lang.String location,
      long offset,
      long duration,
      boolean allDay,
      java.lang.String recurrence,
      long firstReminder,
      java.lang.String firstReminderType,
      long secondReminder,
      java.lang.String secondReminderType,
      com.liferay.portal.kernel.service.ServiceContext serviceContext)
      throws com.liferay.portal.kernel.exception.PortalException {
    return getService()
        .updateOffsetAndDuration(
            calendarBookingId,
            calendarId,
            childCalendarIds,
            titleMap,
            descriptionMap,
            location,
            offset,
            duration,
            allDay,
            recurrence,
            firstReminder,
            firstReminderType,
            secondReminder,
            secondReminderType,
            serviceContext);
  }

  public static int searchCount(
      long companyId,
      long[] groupIds,
      long[] calendarIds,
      long[] calendarResourceIds,
      long parentCalendarBookingId,
      java.lang.String keywords,
      long startTime,
      long endTime,
      boolean recurring,
      int[] statuses)
      throws com.liferay.portal.kernel.exception.PortalException {
    return getService()
        .searchCount(
            companyId,
            groupIds,
            calendarIds,
            calendarResourceIds,
            parentCalendarBookingId,
            keywords,
            startTime,
            endTime,
            recurring,
            statuses);
  }

  public static int searchCount(
      long companyId,
      long[] groupIds,
      long[] calendarIds,
      long[] calendarResourceIds,
      long parentCalendarBookingId,
      java.lang.String title,
      java.lang.String description,
      java.lang.String location,
      long startTime,
      long endTime,
      boolean recurring,
      int[] statuses,
      boolean andOperator)
      throws com.liferay.portal.kernel.exception.PortalException {
    return getService()
        .searchCount(
            companyId,
            groupIds,
            calendarIds,
            calendarResourceIds,
            parentCalendarBookingId,
            title,
            description,
            location,
            startTime,
            endTime,
            recurring,
            statuses,
            andOperator);
  }

  public static java.lang.String exportCalendarBooking(
      long calendarBookingId, java.lang.String type) throws java.lang.Exception {
    return getService().exportCalendarBooking(calendarBookingId, type);
  }

  public static java.lang.String getCalendarBookingsRSS(
      long calendarId,
      long startTime,
      long endTime,
      int max,
      java.lang.String type,
      double version,
      java.lang.String displayStyle,
      com.liferay.portal.kernel.theme.ThemeDisplay themeDisplay)
      throws com.liferay.portal.kernel.exception.PortalException {
    return getService()
        .getCalendarBookingsRSS(
            calendarId, startTime, endTime, max, type, version, displayStyle, themeDisplay);
  }

  /**
   * Returns the OSGi service identifier.
   *
   * @return the OSGi service identifier
   */
  public static java.lang.String getOSGiServiceIdentifier() {
    return getService().getOSGiServiceIdentifier();
  }

  public static java.util.List<com.liferay.calendar.model.CalendarBooking> getCalendarBookings(
      long calendarId, int[] statuses) throws com.liferay.portal.kernel.exception.PortalException {
    return getService().getCalendarBookings(calendarId, statuses);
  }

  public static java.util.List<com.liferay.calendar.model.CalendarBooking> getCalendarBookings(
      long calendarId, long startTime, long endTime)
      throws com.liferay.portal.kernel.exception.PortalException {
    return getService().getCalendarBookings(calendarId, startTime, endTime);
  }

  public static java.util.List<com.liferay.calendar.model.CalendarBooking> getCalendarBookings(
      long calendarId, long startTime, long endTime, int max)
      throws com.liferay.portal.kernel.exception.PortalException {
    return getService().getCalendarBookings(calendarId, startTime, endTime, max);
  }

  public static java.util.List<com.liferay.calendar.model.CalendarBooking> getChildCalendarBookings(
      long parentCalendarBookingId) throws com.liferay.portal.kernel.exception.PortalException {
    return getService().getChildCalendarBookings(parentCalendarBookingId);
  }

  public static java.util.List<com.liferay.calendar.model.CalendarBooking> getChildCalendarBookings(
      long parentCalendarBookingId, int status)
      throws com.liferay.portal.kernel.exception.PortalException {
    return getService().getChildCalendarBookings(parentCalendarBookingId, status);
  }

  public static java.util.List<com.liferay.calendar.model.CalendarBooking> search(
      long companyId,
      long[] groupIds,
      long[] calendarIds,
      long[] calendarResourceIds,
      long parentCalendarBookingId,
      java.lang.String keywords,
      long startTime,
      long endTime,
      boolean recurring,
      int[] statuses,
      int start,
      int end,
      com.liferay.portal.kernel.util.OrderByComparator<com.liferay.calendar.model.CalendarBooking>
          orderByComparator)
      throws com.liferay.portal.kernel.exception.PortalException {
    return getService()
        .search(
            companyId,
            groupIds,
            calendarIds,
            calendarResourceIds,
            parentCalendarBookingId,
            keywords,
            startTime,
            endTime,
            recurring,
            statuses,
            start,
            end,
            orderByComparator);
  }

  public static java.util.List<com.liferay.calendar.model.CalendarBooking> search(
      long companyId,
      long[] groupIds,
      long[] calendarIds,
      long[] calendarResourceIds,
      long parentCalendarBookingId,
      java.lang.String title,
      java.lang.String description,
      java.lang.String location,
      long startTime,
      long endTime,
      boolean recurring,
      int[] statuses,
      boolean andOperator,
      int start,
      int end,
      com.liferay.portal.kernel.util.OrderByComparator<com.liferay.calendar.model.CalendarBooking>
          orderByComparator)
      throws com.liferay.portal.kernel.exception.PortalException {
    return getService()
        .search(
            companyId,
            groupIds,
            calendarIds,
            calendarResourceIds,
            parentCalendarBookingId,
            title,
            description,
            location,
            startTime,
            endTime,
            recurring,
            statuses,
            andOperator,
            start,
            end,
            orderByComparator);
  }

  public static void deleteCalendarBookingInstance(
      long calendarBookingId, int instanceIndex, boolean allFollowing)
      throws com.liferay.portal.kernel.exception.PortalException {
    getService().deleteCalendarBookingInstance(calendarBookingId, instanceIndex, allFollowing);
  }

  public static void deleteCalendarBookingInstance(
      long calendarBookingId, long startTime, boolean allFollowing)
      throws com.liferay.portal.kernel.exception.PortalException {
    getService().deleteCalendarBookingInstance(calendarBookingId, startTime, allFollowing);
  }

  public static void invokeTransition(
      long calendarBookingId,
      int status,
      com.liferay.portal.kernel.service.ServiceContext serviceContext)
      throws com.liferay.portal.kernel.exception.PortalException {
    getService().invokeTransition(calendarBookingId, status, serviceContext);
  }

  public static CalendarBookingService getService() {
    return _serviceTracker.getService();
  }

  private static ServiceTracker<CalendarBookingService, CalendarBookingService> _serviceTracker =
      ServiceTrackerFactory.open(CalendarBookingService.class);
}