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.portal.service.persistence;
21  
22  /**
23   * <a href="PasswordTrackerUtil.java.html"><b><i>View Source</i></b></a>
24   *
25   * @author Brian Wing Shun Chan
26   *
27   */
28  public class PasswordTrackerUtil {
29      public static void cacheResult(
30          com.liferay.portal.model.PasswordTracker passwordTracker) {
31          getPersistence().cacheResult(passwordTracker);
32      }
33  
34      public static void cacheResult(
35          java.util.List<com.liferay.portal.model.PasswordTracker> passwordTrackers) {
36          getPersistence().cacheResult(passwordTrackers);
37      }
38  
39      public static void clearCache() {
40          getPersistence().clearCache();
41      }
42  
43      public static com.liferay.portal.model.PasswordTracker create(
44          long passwordTrackerId) {
45          return getPersistence().create(passwordTrackerId);
46      }
47  
48      public static com.liferay.portal.model.PasswordTracker remove(
49          long passwordTrackerId)
50          throws com.liferay.portal.NoSuchPasswordTrackerException,
51              com.liferay.portal.SystemException {
52          return getPersistence().remove(passwordTrackerId);
53      }
54  
55      public static com.liferay.portal.model.PasswordTracker remove(
56          com.liferay.portal.model.PasswordTracker passwordTracker)
57          throws com.liferay.portal.SystemException {
58          return getPersistence().remove(passwordTracker);
59      }
60  
61      /**
62       * @deprecated Use <code>update(PasswordTracker passwordTracker, boolean merge)</code>.
63       */
64      public static com.liferay.portal.model.PasswordTracker update(
65          com.liferay.portal.model.PasswordTracker passwordTracker)
66          throws com.liferay.portal.SystemException {
67          return getPersistence().update(passwordTracker);
68      }
69  
70      /**
71       * Add, update, or merge, the entity. This method also calls the model
72       * listeners to trigger the proper events associated with adding, deleting,
73       * or updating an entity.
74       *
75       * @param        passwordTracker the entity to add, update, or merge
76       * @param        merge boolean value for whether to merge the entity. The
77       *                default value is false. Setting merge to true is more
78       *                expensive and should only be true when passwordTracker is
79       *                transient. See LEP-5473 for a detailed discussion of this
80       *                method.
81       * @return        true if the portlet can be displayed via Ajax
82       */
83      public static com.liferay.portal.model.PasswordTracker update(
84          com.liferay.portal.model.PasswordTracker passwordTracker, boolean merge)
85          throws com.liferay.portal.SystemException {
86          return getPersistence().update(passwordTracker, merge);
87      }
88  
89      public static com.liferay.portal.model.PasswordTracker updateImpl(
90          com.liferay.portal.model.PasswordTracker passwordTracker, boolean merge)
91          throws com.liferay.portal.SystemException {
92          return getPersistence().updateImpl(passwordTracker, merge);
93      }
94  
95      public static com.liferay.portal.model.PasswordTracker findByPrimaryKey(
96          long passwordTrackerId)
97          throws com.liferay.portal.NoSuchPasswordTrackerException,
98              com.liferay.portal.SystemException {
99          return getPersistence().findByPrimaryKey(passwordTrackerId);
100     }
101 
102     public static com.liferay.portal.model.PasswordTracker fetchByPrimaryKey(
103         long passwordTrackerId) throws com.liferay.portal.SystemException {
104         return getPersistence().fetchByPrimaryKey(passwordTrackerId);
105     }
106 
107     public static java.util.List<com.liferay.portal.model.PasswordTracker> findByUserId(
108         long userId) throws com.liferay.portal.SystemException {
109         return getPersistence().findByUserId(userId);
110     }
111 
112     public static java.util.List<com.liferay.portal.model.PasswordTracker> findByUserId(
113         long userId, int start, int end)
114         throws com.liferay.portal.SystemException {
115         return getPersistence().findByUserId(userId, start, end);
116     }
117 
118     public static java.util.List<com.liferay.portal.model.PasswordTracker> findByUserId(
119         long userId, int start, int end,
120         com.liferay.portal.kernel.util.OrderByComparator obc)
121         throws com.liferay.portal.SystemException {
122         return getPersistence().findByUserId(userId, start, end, obc);
123     }
124 
125     public static com.liferay.portal.model.PasswordTracker findByUserId_First(
126         long userId, com.liferay.portal.kernel.util.OrderByComparator obc)
127         throws com.liferay.portal.NoSuchPasswordTrackerException,
128             com.liferay.portal.SystemException {
129         return getPersistence().findByUserId_First(userId, obc);
130     }
131 
132     public static com.liferay.portal.model.PasswordTracker findByUserId_Last(
133         long userId, com.liferay.portal.kernel.util.OrderByComparator obc)
134         throws com.liferay.portal.NoSuchPasswordTrackerException,
135             com.liferay.portal.SystemException {
136         return getPersistence().findByUserId_Last(userId, obc);
137     }
138 
139     public static com.liferay.portal.model.PasswordTracker[] findByUserId_PrevAndNext(
140         long passwordTrackerId, long userId,
141         com.liferay.portal.kernel.util.OrderByComparator obc)
142         throws com.liferay.portal.NoSuchPasswordTrackerException,
143             com.liferay.portal.SystemException {
144         return getPersistence()
145                    .findByUserId_PrevAndNext(passwordTrackerId, userId, obc);
146     }
147 
148     public static java.util.List<Object> findWithDynamicQuery(
149         com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
150         throws com.liferay.portal.SystemException {
151         return getPersistence().findWithDynamicQuery(dynamicQuery);
152     }
153 
154     public static java.util.List<Object> findWithDynamicQuery(
155         com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
156         int end) throws com.liferay.portal.SystemException {
157         return getPersistence().findWithDynamicQuery(dynamicQuery, start, end);
158     }
159 
160     public static java.util.List<com.liferay.portal.model.PasswordTracker> findAll()
161         throws com.liferay.portal.SystemException {
162         return getPersistence().findAll();
163     }
164 
165     public static java.util.List<com.liferay.portal.model.PasswordTracker> findAll(
166         int start, int end) throws com.liferay.portal.SystemException {
167         return getPersistence().findAll(start, end);
168     }
169 
170     public static java.util.List<com.liferay.portal.model.PasswordTracker> findAll(
171         int start, int end, com.liferay.portal.kernel.util.OrderByComparator obc)
172         throws com.liferay.portal.SystemException {
173         return getPersistence().findAll(start, end, obc);
174     }
175 
176     public static void removeByUserId(long userId)
177         throws com.liferay.portal.SystemException {
178         getPersistence().removeByUserId(userId);
179     }
180 
181     public static void removeAll() throws com.liferay.portal.SystemException {
182         getPersistence().removeAll();
183     }
184 
185     public static int countByUserId(long userId)
186         throws com.liferay.portal.SystemException {
187         return getPersistence().countByUserId(userId);
188     }
189 
190     public static int countAll() throws com.liferay.portal.SystemException {
191         return getPersistence().countAll();
192     }
193 
194     public static PasswordTrackerPersistence getPersistence() {
195         return _persistence;
196     }
197 
198     public void setPersistence(PasswordTrackerPersistence persistence) {
199         _persistence = persistence;
200     }
201 
202     private static PasswordTrackerPersistence _persistence;
203 }