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 com.liferay.portal.model.PasswordTracker create(
30          long passwordTrackerId) {
31          return getPersistence().create(passwordTrackerId);
32      }
33  
34      public static com.liferay.portal.model.PasswordTracker remove(
35          long passwordTrackerId)
36          throws com.liferay.portal.NoSuchPasswordTrackerException,
37              com.liferay.portal.SystemException {
38          return getPersistence().remove(passwordTrackerId);
39      }
40  
41      public static com.liferay.portal.model.PasswordTracker remove(
42          com.liferay.portal.model.PasswordTracker passwordTracker)
43          throws com.liferay.portal.SystemException {
44          return getPersistence().remove(passwordTracker);
45      }
46  
47      /**
48       * @deprecated Use <code>update(PasswordTracker passwordTracker, boolean merge)</code>.
49       */
50      public static com.liferay.portal.model.PasswordTracker update(
51          com.liferay.portal.model.PasswordTracker passwordTracker)
52          throws com.liferay.portal.SystemException {
53          return getPersistence().update(passwordTracker);
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        passwordTracker 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 passwordTracker 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.portal.model.PasswordTracker update(
70          com.liferay.portal.model.PasswordTracker passwordTracker, boolean merge)
71          throws com.liferay.portal.SystemException {
72          return getPersistence().update(passwordTracker, merge);
73      }
74  
75      public static com.liferay.portal.model.PasswordTracker updateImpl(
76          com.liferay.portal.model.PasswordTracker passwordTracker, boolean merge)
77          throws com.liferay.portal.SystemException {
78          return getPersistence().updateImpl(passwordTracker, merge);
79      }
80  
81      public static com.liferay.portal.model.PasswordTracker findByPrimaryKey(
82          long passwordTrackerId)
83          throws com.liferay.portal.NoSuchPasswordTrackerException,
84              com.liferay.portal.SystemException {
85          return getPersistence().findByPrimaryKey(passwordTrackerId);
86      }
87  
88      public static com.liferay.portal.model.PasswordTracker fetchByPrimaryKey(
89          long passwordTrackerId) throws com.liferay.portal.SystemException {
90          return getPersistence().fetchByPrimaryKey(passwordTrackerId);
91      }
92  
93      public static java.util.List<com.liferay.portal.model.PasswordTracker> findByUserId(
94          long userId) throws com.liferay.portal.SystemException {
95          return getPersistence().findByUserId(userId);
96      }
97  
98      public static java.util.List<com.liferay.portal.model.PasswordTracker> findByUserId(
99          long userId, int start, int end)
100         throws com.liferay.portal.SystemException {
101         return getPersistence().findByUserId(userId, start, end);
102     }
103 
104     public static java.util.List<com.liferay.portal.model.PasswordTracker> findByUserId(
105         long userId, int start, int end,
106         com.liferay.portal.kernel.util.OrderByComparator obc)
107         throws com.liferay.portal.SystemException {
108         return getPersistence().findByUserId(userId, start, end, obc);
109     }
110 
111     public static com.liferay.portal.model.PasswordTracker findByUserId_First(
112         long userId, com.liferay.portal.kernel.util.OrderByComparator obc)
113         throws com.liferay.portal.NoSuchPasswordTrackerException,
114             com.liferay.portal.SystemException {
115         return getPersistence().findByUserId_First(userId, obc);
116     }
117 
118     public static com.liferay.portal.model.PasswordTracker findByUserId_Last(
119         long userId, com.liferay.portal.kernel.util.OrderByComparator obc)
120         throws com.liferay.portal.NoSuchPasswordTrackerException,
121             com.liferay.portal.SystemException {
122         return getPersistence().findByUserId_Last(userId, obc);
123     }
124 
125     public static com.liferay.portal.model.PasswordTracker[] findByUserId_PrevAndNext(
126         long passwordTrackerId, long userId,
127         com.liferay.portal.kernel.util.OrderByComparator obc)
128         throws com.liferay.portal.NoSuchPasswordTrackerException,
129             com.liferay.portal.SystemException {
130         return getPersistence()
131                    .findByUserId_PrevAndNext(passwordTrackerId, userId, obc);
132     }
133 
134     public static java.util.List<Object> findWithDynamicQuery(
135         com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
136         throws com.liferay.portal.SystemException {
137         return getPersistence().findWithDynamicQuery(dynamicQuery);
138     }
139 
140     public static java.util.List<Object> findWithDynamicQuery(
141         com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
142         int end) throws com.liferay.portal.SystemException {
143         return getPersistence().findWithDynamicQuery(dynamicQuery, start, end);
144     }
145 
146     public static java.util.List<com.liferay.portal.model.PasswordTracker> findAll()
147         throws com.liferay.portal.SystemException {
148         return getPersistence().findAll();
149     }
150 
151     public static java.util.List<com.liferay.portal.model.PasswordTracker> findAll(
152         int start, int end) throws com.liferay.portal.SystemException {
153         return getPersistence().findAll(start, end);
154     }
155 
156     public static java.util.List<com.liferay.portal.model.PasswordTracker> findAll(
157         int start, int end, com.liferay.portal.kernel.util.OrderByComparator obc)
158         throws com.liferay.portal.SystemException {
159         return getPersistence().findAll(start, end, obc);
160     }
161 
162     public static void removeByUserId(long userId)
163         throws com.liferay.portal.SystemException {
164         getPersistence().removeByUserId(userId);
165     }
166 
167     public static void removeAll() throws com.liferay.portal.SystemException {
168         getPersistence().removeAll();
169     }
170 
171     public static int countByUserId(long userId)
172         throws com.liferay.portal.SystemException {
173         return getPersistence().countByUserId(userId);
174     }
175 
176     public static int countAll() throws com.liferay.portal.SystemException {
177         return getPersistence().countAll();
178     }
179 
180     public static PasswordTrackerPersistence getPersistence() {
181         return _persistence;
182     }
183 
184     public void setPersistence(PasswordTrackerPersistence persistence) {
185         _persistence = persistence;
186     }
187 
188     private static PasswordTrackerPersistence _persistence;
189 }