1   /**
2    * Copyright (c) 2000-2009 Liferay, Inc. All rights reserved.
3    *
4    * The contents of this file are subject to the terms of the Liferay Enterprise
5    * Subscription License ("License"). You may not use this file except in
6    * compliance with the License. You can obtain a copy of the License by
7    * contacting Liferay, Inc. See the License for the specific language governing
8    * permissions and limitations under the License, including but not limited to
9    * distribution rights of the Software.
10   *
11   * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
12   * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
13   * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
14   * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
15   * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
16   * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
17   * SOFTWARE.
18   */
19  
20  package com.liferay.portlet.tags.service.persistence;
21  
22  /**
23   * <a href="TagsSourceUtil.java.html"><b><i>View Source</i></b></a>
24   *
25   * @author Brian Wing Shun Chan
26   *
27   */
28  public class TagsSourceUtil {
29      public static com.liferay.portlet.tags.model.TagsSource create(
30          long sourceId) {
31          return getPersistence().create(sourceId);
32      }
33  
34      public static com.liferay.portlet.tags.model.TagsSource remove(
35          long sourceId)
36          throws com.liferay.portal.SystemException,
37              com.liferay.portlet.tags.NoSuchSourceException {
38          return getPersistence().remove(sourceId);
39      }
40  
41      public static com.liferay.portlet.tags.model.TagsSource remove(
42          com.liferay.portlet.tags.model.TagsSource tagsSource)
43          throws com.liferay.portal.SystemException {
44          return getPersistence().remove(tagsSource);
45      }
46  
47      /**
48       * @deprecated Use <code>update(TagsSource tagsSource, boolean merge)</code>.
49       */
50      public static com.liferay.portlet.tags.model.TagsSource update(
51          com.liferay.portlet.tags.model.TagsSource tagsSource)
52          throws com.liferay.portal.SystemException {
53          return getPersistence().update(tagsSource);
54      }
55  
56      /**
57       * Add, update, or merge, the entity. This method also calls the model
58       * listeners to trigger the proper events associated with adding, deleting,
59       * or updating an entity.
60       *
61       * @param        tagsSource the entity to add, update, or merge
62       * @param        merge boolean value for whether to merge the entity. The
63       *                default value is false. Setting merge to true is more
64       *                expensive and should only be true when tagsSource is
65       *                transient. See LEP-5473 for a detailed discussion of this
66       *                method.
67       * @return        true if the portlet can be displayed via Ajax
68       */
69      public static com.liferay.portlet.tags.model.TagsSource update(
70          com.liferay.portlet.tags.model.TagsSource tagsSource, boolean merge)
71          throws com.liferay.portal.SystemException {
72          return getPersistence().update(tagsSource, merge);
73      }
74  
75      public static com.liferay.portlet.tags.model.TagsSource updateImpl(
76          com.liferay.portlet.tags.model.TagsSource tagsSource, boolean merge)
77          throws com.liferay.portal.SystemException {
78          return getPersistence().updateImpl(tagsSource, merge);
79      }
80  
81      public static com.liferay.portlet.tags.model.TagsSource findByPrimaryKey(
82          long sourceId)
83          throws com.liferay.portal.SystemException,
84              com.liferay.portlet.tags.NoSuchSourceException {
85          return getPersistence().findByPrimaryKey(sourceId);
86      }
87  
88      public static com.liferay.portlet.tags.model.TagsSource fetchByPrimaryKey(
89          long sourceId) throws com.liferay.portal.SystemException {
90          return getPersistence().fetchByPrimaryKey(sourceId);
91      }
92  
93      public static java.util.List<Object> findWithDynamicQuery(
94          com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
95          throws com.liferay.portal.SystemException {
96          return getPersistence().findWithDynamicQuery(dynamicQuery);
97      }
98  
99      public static java.util.List<Object> findWithDynamicQuery(
100         com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
101         int end) throws com.liferay.portal.SystemException {
102         return getPersistence().findWithDynamicQuery(dynamicQuery, start, end);
103     }
104 
105     public static java.util.List<com.liferay.portlet.tags.model.TagsSource> findAll()
106         throws com.liferay.portal.SystemException {
107         return getPersistence().findAll();
108     }
109 
110     public static java.util.List<com.liferay.portlet.tags.model.TagsSource> findAll(
111         int start, int end) throws com.liferay.portal.SystemException {
112         return getPersistence().findAll(start, end);
113     }
114 
115     public static java.util.List<com.liferay.portlet.tags.model.TagsSource> findAll(
116         int start, int end, com.liferay.portal.kernel.util.OrderByComparator obc)
117         throws com.liferay.portal.SystemException {
118         return getPersistence().findAll(start, end, obc);
119     }
120 
121     public static void removeAll() throws com.liferay.portal.SystemException {
122         getPersistence().removeAll();
123     }
124 
125     public static int countAll() throws com.liferay.portal.SystemException {
126         return getPersistence().countAll();
127     }
128 
129     public static TagsSourcePersistence getPersistence() {
130         return _persistence;
131     }
132 
133     public void setPersistence(TagsSourcePersistence persistence) {
134         _persistence = persistence;
135     }
136 
137     private static TagsSourcePersistence _persistence;
138 }