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  import com.liferay.portal.PortalException;
23  import com.liferay.portal.SystemException;
24  import com.liferay.portal.kernel.annotation.Propagation;
25  import com.liferay.portal.kernel.annotation.Transactional;
26  
27  /**
28   * <a href="PasswordTrackerPersistence.java.html"><b><i>View Source</i></b></a>
29   *
30   * @author Brian Wing Shun Chan
31   *
32   */
33  @Transactional(rollbackFor =  {
34      PortalException.class, SystemException.class})
35  public interface PasswordTrackerPersistence extends BasePersistence {
36      public com.liferay.portal.model.PasswordTracker create(
37          long passwordTrackerId);
38  
39      public com.liferay.portal.model.PasswordTracker remove(
40          long passwordTrackerId)
41          throws com.liferay.portal.NoSuchPasswordTrackerException,
42              com.liferay.portal.SystemException;
43  
44      public com.liferay.portal.model.PasswordTracker remove(
45          com.liferay.portal.model.PasswordTracker passwordTracker)
46          throws com.liferay.portal.SystemException;
47  
48      /**
49       * @deprecated Use <code>update(PasswordTracker passwordTracker, boolean merge)</code>.
50       */
51      public com.liferay.portal.model.PasswordTracker update(
52          com.liferay.portal.model.PasswordTracker passwordTracker)
53          throws com.liferay.portal.SystemException;
54  
55      /**
56       * Add, update, or merge, the entity. This method also calls the model
57       * listeners to trigger the proper events associated with adding, deleting,
58       * or updating an entity.
59       *
60       * @param        passwordTracker the entity to add, update, or merge
61       * @param        merge boolean value for whether to merge the entity. The
62       *                default value is false. Setting merge to true is more
63       *                expensive and should only be true when passwordTracker is
64       *                transient. See LEP-5473 for a detailed discussion of this
65       *                method.
66       * @return        true if the portlet can be displayed via Ajax
67       */
68      public com.liferay.portal.model.PasswordTracker update(
69          com.liferay.portal.model.PasswordTracker passwordTracker, boolean merge)
70          throws com.liferay.portal.SystemException;
71  
72      public com.liferay.portal.model.PasswordTracker updateImpl(
73          com.liferay.portal.model.PasswordTracker passwordTracker, boolean merge)
74          throws com.liferay.portal.SystemException;
75  
76      @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
77      public com.liferay.portal.model.PasswordTracker findByPrimaryKey(
78          long passwordTrackerId)
79          throws com.liferay.portal.NoSuchPasswordTrackerException,
80              com.liferay.portal.SystemException;
81  
82      public com.liferay.portal.model.PasswordTracker fetchByPrimaryKey(
83          long passwordTrackerId) throws com.liferay.portal.SystemException;
84  
85      @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
86      public java.util.List<com.liferay.portal.model.PasswordTracker> findByUserId(
87          long userId) throws com.liferay.portal.SystemException;
88  
89      @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
90      public java.util.List<com.liferay.portal.model.PasswordTracker> findByUserId(
91          long userId, int start, int end)
92          throws com.liferay.portal.SystemException;
93  
94      @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
95      public java.util.List<com.liferay.portal.model.PasswordTracker> findByUserId(
96          long userId, int start, int end,
97          com.liferay.portal.kernel.util.OrderByComparator obc)
98          throws com.liferay.portal.SystemException;
99  
100     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
101     public com.liferay.portal.model.PasswordTracker findByUserId_First(
102         long userId, com.liferay.portal.kernel.util.OrderByComparator obc)
103         throws com.liferay.portal.NoSuchPasswordTrackerException,
104             com.liferay.portal.SystemException;
105 
106     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
107     public com.liferay.portal.model.PasswordTracker findByUserId_Last(
108         long userId, com.liferay.portal.kernel.util.OrderByComparator obc)
109         throws com.liferay.portal.NoSuchPasswordTrackerException,
110             com.liferay.portal.SystemException;
111 
112     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
113     public com.liferay.portal.model.PasswordTracker[] findByUserId_PrevAndNext(
114         long passwordTrackerId, long userId,
115         com.liferay.portal.kernel.util.OrderByComparator obc)
116         throws com.liferay.portal.NoSuchPasswordTrackerException,
117             com.liferay.portal.SystemException;
118 
119     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
120     public java.util.List<Object> findWithDynamicQuery(
121         com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
122         throws com.liferay.portal.SystemException;
123 
124     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
125     public java.util.List<Object> findWithDynamicQuery(
126         com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
127         int end) throws com.liferay.portal.SystemException;
128 
129     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
130     public java.util.List<com.liferay.portal.model.PasswordTracker> findAll()
131         throws com.liferay.portal.SystemException;
132 
133     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
134     public java.util.List<com.liferay.portal.model.PasswordTracker> findAll(
135         int start, int end) throws com.liferay.portal.SystemException;
136 
137     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
138     public java.util.List<com.liferay.portal.model.PasswordTracker> findAll(
139         int start, int end, com.liferay.portal.kernel.util.OrderByComparator obc)
140         throws com.liferay.portal.SystemException;
141 
142     public void removeByUserId(long userId)
143         throws com.liferay.portal.SystemException;
144 
145     public void removeAll() throws com.liferay.portal.SystemException;
146 
147     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
148     public int countByUserId(long userId)
149         throws com.liferay.portal.SystemException;
150 
151     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
152     public int countAll() throws com.liferay.portal.SystemException;
153 }