1   /**
2    * Copyright (c) 2000-2010 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   *
12   *
13   */
14  
15  package com.liferay.portal.service.persistence;
16  
17  import com.liferay.portal.model.Resource;
18  
19  /**
20   * <a href="ResourcePersistence.java.html"><b><i>View Source</i></b></a>
21   *
22   * <p>
23   * ServiceBuilder generated this class. Modifications in this class will be
24   * overwritten the next time is generated.
25   * </p>
26   *
27   * @author    Brian Wing Shun Chan
28   * @see       ResourcePersistenceImpl
29   * @see       ResourceUtil
30   * @generated
31   */
32  public interface ResourcePersistence extends BasePersistence<Resource> {
33      public void cacheResult(com.liferay.portal.model.Resource resource);
34  
35      public void cacheResult(
36          java.util.List<com.liferay.portal.model.Resource> resources);
37  
38      public com.liferay.portal.model.Resource create(long resourceId);
39  
40      public com.liferay.portal.model.Resource remove(long resourceId)
41          throws com.liferay.portal.NoSuchResourceException,
42              com.liferay.portal.SystemException;
43  
44      /**
45       * @deprecated Use {@link BasePersistence#update(com.liferay.portal.model.BaseModel, boolean)}.
46       */
47      public com.liferay.portal.model.Resource update(
48          com.liferay.portal.model.Resource resource)
49          throws com.liferay.portal.SystemException;
50  
51      public com.liferay.portal.model.Resource updateImpl(
52          com.liferay.portal.model.Resource resource, boolean merge)
53          throws com.liferay.portal.SystemException;
54  
55      public com.liferay.portal.model.Resource findByPrimaryKey(long resourceId)
56          throws com.liferay.portal.NoSuchResourceException,
57              com.liferay.portal.SystemException;
58  
59      public com.liferay.portal.model.Resource fetchByPrimaryKey(long resourceId)
60          throws com.liferay.portal.SystemException;
61  
62      public java.util.List<com.liferay.portal.model.Resource> findByCodeId(
63          long codeId) throws com.liferay.portal.SystemException;
64  
65      public java.util.List<com.liferay.portal.model.Resource> findByCodeId(
66          long codeId, int start, int end)
67          throws com.liferay.portal.SystemException;
68  
69      public java.util.List<com.liferay.portal.model.Resource> findByCodeId(
70          long codeId, int start, int end,
71          com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
72          throws com.liferay.portal.SystemException;
73  
74      public com.liferay.portal.model.Resource findByCodeId_First(long codeId,
75          com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
76          throws com.liferay.portal.NoSuchResourceException,
77              com.liferay.portal.SystemException;
78  
79      public com.liferay.portal.model.Resource findByCodeId_Last(long codeId,
80          com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
81          throws com.liferay.portal.NoSuchResourceException,
82              com.liferay.portal.SystemException;
83  
84      public com.liferay.portal.model.Resource[] findByCodeId_PrevAndNext(
85          long resourceId, long codeId,
86          com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
87          throws com.liferay.portal.NoSuchResourceException,
88              com.liferay.portal.SystemException;
89  
90      public com.liferay.portal.model.Resource findByC_P(long codeId,
91          java.lang.String primKey)
92          throws com.liferay.portal.NoSuchResourceException,
93              com.liferay.portal.SystemException;
94  
95      public com.liferay.portal.model.Resource fetchByC_P(long codeId,
96          java.lang.String primKey) throws com.liferay.portal.SystemException;
97  
98      public com.liferay.portal.model.Resource fetchByC_P(long codeId,
99          java.lang.String primKey, boolean retrieveFromCache)
100         throws com.liferay.portal.SystemException;
101 
102     public java.util.List<com.liferay.portal.model.Resource> findAll()
103         throws com.liferay.portal.SystemException;
104 
105     public java.util.List<com.liferay.portal.model.Resource> findAll(
106         int start, int end) throws com.liferay.portal.SystemException;
107 
108     public java.util.List<com.liferay.portal.model.Resource> findAll(
109         int start, int end,
110         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
111         throws com.liferay.portal.SystemException;
112 
113     public void removeByCodeId(long codeId)
114         throws com.liferay.portal.SystemException;
115 
116     public void removeByC_P(long codeId, java.lang.String primKey)
117         throws com.liferay.portal.NoSuchResourceException,
118             com.liferay.portal.SystemException;
119 
120     public void removeAll() throws com.liferay.portal.SystemException;
121 
122     public int countByCodeId(long codeId)
123         throws com.liferay.portal.SystemException;
124 
125     public int countByC_P(long codeId, java.lang.String primKey)
126         throws com.liferay.portal.SystemException;
127 
128     public int countAll() throws com.liferay.portal.SystemException;
129 }