1
22
23 package com.liferay.portal.service.persistence;
24
25 import com.liferay.portal.PortalException;
26 import com.liferay.portal.SystemException;
27 import com.liferay.portal.kernel.annotation.Propagation;
28 import com.liferay.portal.kernel.annotation.Transactional;
29
30
36 @Transactional(rollbackFor = {
37 PortalException.class, SystemException.class})
38 public interface ResourcePersistence extends BasePersistence {
39 public com.liferay.portal.model.Resource create(long resourceId);
40
41 public com.liferay.portal.model.Resource remove(long resourceId)
42 throws com.liferay.portal.NoSuchResourceException,
43 com.liferay.portal.SystemException;
44
45 public com.liferay.portal.model.Resource remove(
46 com.liferay.portal.model.Resource resource)
47 throws com.liferay.portal.SystemException;
48
49
52 public com.liferay.portal.model.Resource update(
53 com.liferay.portal.model.Resource resource)
54 throws com.liferay.portal.SystemException;
55
56
69 public com.liferay.portal.model.Resource update(
70 com.liferay.portal.model.Resource resource, boolean merge)
71 throws com.liferay.portal.SystemException;
72
73 public com.liferay.portal.model.Resource updateImpl(
74 com.liferay.portal.model.Resource resource, boolean merge)
75 throws com.liferay.portal.SystemException;
76
77 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
78 public com.liferay.portal.model.Resource findByPrimaryKey(long resourceId)
79 throws com.liferay.portal.NoSuchResourceException,
80 com.liferay.portal.SystemException;
81
82 public com.liferay.portal.model.Resource fetchByPrimaryKey(long resourceId)
83 throws com.liferay.portal.SystemException;
84
85 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
86 public java.util.List<com.liferay.portal.model.Resource> findByCodeId(
87 long codeId) throws com.liferay.portal.SystemException;
88
89 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
90 public java.util.List<com.liferay.portal.model.Resource> findByCodeId(
91 long codeId, 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.Resource> findByCodeId(
96 long codeId, 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.Resource findByCodeId_First(long codeId,
102 com.liferay.portal.kernel.util.OrderByComparator obc)
103 throws com.liferay.portal.NoSuchResourceException,
104 com.liferay.portal.SystemException;
105
106 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
107 public com.liferay.portal.model.Resource findByCodeId_Last(long codeId,
108 com.liferay.portal.kernel.util.OrderByComparator obc)
109 throws com.liferay.portal.NoSuchResourceException,
110 com.liferay.portal.SystemException;
111
112 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
113 public com.liferay.portal.model.Resource[] findByCodeId_PrevAndNext(
114 long resourceId, long codeId,
115 com.liferay.portal.kernel.util.OrderByComparator obc)
116 throws com.liferay.portal.NoSuchResourceException,
117 com.liferay.portal.SystemException;
118
119 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
120 public com.liferay.portal.model.Resource findByC_P(long codeId,
121 java.lang.String primKey)
122 throws com.liferay.portal.NoSuchResourceException,
123 com.liferay.portal.SystemException;
124
125 public com.liferay.portal.model.Resource fetchByC_P(long codeId,
126 java.lang.String primKey) throws com.liferay.portal.SystemException;
127
128 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
129 public java.util.List<Object> findWithDynamicQuery(
130 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
131 throws com.liferay.portal.SystemException;
132
133 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
134 public java.util.List<Object> findWithDynamicQuery(
135 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
136 int end) throws com.liferay.portal.SystemException;
137
138 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
139 public java.util.List<com.liferay.portal.model.Resource> findAll()
140 throws com.liferay.portal.SystemException;
141
142 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
143 public java.util.List<com.liferay.portal.model.Resource> findAll(
144 int start, int end) throws com.liferay.portal.SystemException;
145
146 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
147 public java.util.List<com.liferay.portal.model.Resource> findAll(
148 int start, int end, com.liferay.portal.kernel.util.OrderByComparator obc)
149 throws com.liferay.portal.SystemException;
150
151 public void removeByCodeId(long codeId)
152 throws com.liferay.portal.SystemException;
153
154 public void removeByC_P(long codeId, java.lang.String primKey)
155 throws com.liferay.portal.NoSuchResourceException,
156 com.liferay.portal.SystemException;
157
158 public void removeAll() throws com.liferay.portal.SystemException;
159
160 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
161 public int countByCodeId(long codeId)
162 throws com.liferay.portal.SystemException;
163
164 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
165 public int countByC_P(long codeId, java.lang.String primKey)
166 throws com.liferay.portal.SystemException;
167
168 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
169 public int countAll() throws com.liferay.portal.SystemException;
170 }