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.wiki.service.persistence;
21  
22  import com.liferay.portal.service.persistence.BasePersistence;
23  
24  /**
25   * <a href="WikiPageResourcePersistence.java.html"><b><i>View Source</i></b></a>
26   *
27   * @author Brian Wing Shun Chan
28   *
29   */
30  public interface WikiPageResourcePersistence extends BasePersistence {
31      public void cacheResult(
32          com.liferay.portlet.wiki.model.WikiPageResource wikiPageResource);
33  
34      public void cacheResult(
35          java.util.List<com.liferay.portlet.wiki.model.WikiPageResource> wikiPageResources);
36  
37      public void clearCache();
38  
39      public com.liferay.portlet.wiki.model.WikiPageResource create(
40          long resourcePrimKey);
41  
42      public com.liferay.portlet.wiki.model.WikiPageResource remove(
43          long resourcePrimKey)
44          throws com.liferay.portal.SystemException,
45              com.liferay.portlet.wiki.NoSuchPageResourceException;
46  
47      public com.liferay.portlet.wiki.model.WikiPageResource remove(
48          com.liferay.portlet.wiki.model.WikiPageResource wikiPageResource)
49          throws com.liferay.portal.SystemException;
50  
51      /**
52       * @deprecated Use <code>update(WikiPageResource wikiPageResource, boolean merge)</code>.
53       */
54      public com.liferay.portlet.wiki.model.WikiPageResource update(
55          com.liferay.portlet.wiki.model.WikiPageResource wikiPageResource)
56          throws com.liferay.portal.SystemException;
57  
58      /**
59       * Add, update, or merge, the entity. This method also calls the model
60       * listeners to trigger the proper events associated with adding, deleting,
61       * or updating an entity.
62       *
63       * @param        wikiPageResource the entity to add, update, or merge
64       * @param        merge boolean value for whether to merge the entity. The
65       *                default value is false. Setting merge to true is more
66       *                expensive and should only be true when wikiPageResource is
67       *                transient. See LEP-5473 for a detailed discussion of this
68       *                method.
69       * @return        true if the portlet can be displayed via Ajax
70       */
71      public com.liferay.portlet.wiki.model.WikiPageResource update(
72          com.liferay.portlet.wiki.model.WikiPageResource wikiPageResource,
73          boolean merge) throws com.liferay.portal.SystemException;
74  
75      public com.liferay.portlet.wiki.model.WikiPageResource updateImpl(
76          com.liferay.portlet.wiki.model.WikiPageResource wikiPageResource,
77          boolean merge) throws com.liferay.portal.SystemException;
78  
79      public com.liferay.portlet.wiki.model.WikiPageResource findByPrimaryKey(
80          long resourcePrimKey)
81          throws com.liferay.portal.SystemException,
82              com.liferay.portlet.wiki.NoSuchPageResourceException;
83  
84      public com.liferay.portlet.wiki.model.WikiPageResource fetchByPrimaryKey(
85          long resourcePrimKey) throws com.liferay.portal.SystemException;
86  
87      public com.liferay.portlet.wiki.model.WikiPageResource findByN_T(
88          long nodeId, java.lang.String title)
89          throws com.liferay.portal.SystemException,
90              com.liferay.portlet.wiki.NoSuchPageResourceException;
91  
92      public com.liferay.portlet.wiki.model.WikiPageResource fetchByN_T(
93          long nodeId, java.lang.String title)
94          throws com.liferay.portal.SystemException;
95  
96      public com.liferay.portlet.wiki.model.WikiPageResource fetchByN_T(
97          long nodeId, java.lang.String title, boolean retrieveFromCache)
98          throws com.liferay.portal.SystemException;
99  
100     public java.util.List<Object> findWithDynamicQuery(
101         com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
102         throws com.liferay.portal.SystemException;
103 
104     public java.util.List<Object> findWithDynamicQuery(
105         com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
106         int end) throws com.liferay.portal.SystemException;
107 
108     public java.util.List<com.liferay.portlet.wiki.model.WikiPageResource> findAll()
109         throws com.liferay.portal.SystemException;
110 
111     public java.util.List<com.liferay.portlet.wiki.model.WikiPageResource> findAll(
112         int start, int end) throws com.liferay.portal.SystemException;
113 
114     public java.util.List<com.liferay.portlet.wiki.model.WikiPageResource> findAll(
115         int start, int end, com.liferay.portal.kernel.util.OrderByComparator obc)
116         throws com.liferay.portal.SystemException;
117 
118     public void removeByN_T(long nodeId, java.lang.String title)
119         throws com.liferay.portal.SystemException,
120             com.liferay.portlet.wiki.NoSuchPageResourceException;
121 
122     public void removeAll() throws com.liferay.portal.SystemException;
123 
124     public int countByN_T(long nodeId, java.lang.String title)
125         throws com.liferay.portal.SystemException;
126 
127     public int countAll() throws com.liferay.portal.SystemException;
128 }