001: /**
002: * Copyright (c) 2000-2008 Liferay, Inc. All rights reserved.
003: *
004: * Permission is hereby granted, free of charge, to any person obtaining a copy
005: * of this software and associated documentation files (the "Software"), to deal
006: * in the Software without restriction, including without limitation the rights
007: * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
008: * copies of the Software, and to permit persons to whom the Software is
009: * furnished to do so, subject to the following conditions:
010: *
011: * The above copyright notice and this permission notice shall be included in
012: * all copies or substantial portions of the Software.
013: *
014: * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
015: * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
016: * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
017: * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
018: * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
019: * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
020: * SOFTWARE.
021: */package com.liferay.portlet.journal.service.persistence;
022:
023: /**
024: * <a href="JournalArticleResourceUtil.java.html"><b><i>View Source</i></b></a>
025: *
026: * @author Brian Wing Shun Chan
027: *
028: */
029: public class JournalArticleResourceUtil {
030: public static com.liferay.portlet.journal.model.JournalArticleResource create(
031: long resourcePrimKey) {
032: return getPersistence().create(resourcePrimKey);
033: }
034:
035: public static com.liferay.portlet.journal.model.JournalArticleResource remove(
036: long resourcePrimKey)
037: throws com.liferay.portal.SystemException,
038: com.liferay.portlet.journal.NoSuchArticleResourceException {
039: return getPersistence().remove(resourcePrimKey);
040: }
041:
042: public static com.liferay.portlet.journal.model.JournalArticleResource remove(
043: com.liferay.portlet.journal.model.JournalArticleResource journalArticleResource)
044: throws com.liferay.portal.SystemException {
045: return getPersistence().remove(journalArticleResource);
046: }
047:
048: public static com.liferay.portlet.journal.model.JournalArticleResource update(
049: com.liferay.portlet.journal.model.JournalArticleResource journalArticleResource)
050: throws com.liferay.portal.SystemException {
051: return getPersistence().update(journalArticleResource);
052: }
053:
054: public static com.liferay.portlet.journal.model.JournalArticleResource update(
055: com.liferay.portlet.journal.model.JournalArticleResource journalArticleResource,
056: boolean merge) throws com.liferay.portal.SystemException {
057: return getPersistence().update(journalArticleResource, merge);
058: }
059:
060: public static com.liferay.portlet.journal.model.JournalArticleResource updateImpl(
061: com.liferay.portlet.journal.model.JournalArticleResource journalArticleResource,
062: boolean merge) throws com.liferay.portal.SystemException {
063: return getPersistence().updateImpl(journalArticleResource,
064: merge);
065: }
066:
067: public static com.liferay.portlet.journal.model.JournalArticleResource findByPrimaryKey(
068: long resourcePrimKey)
069: throws com.liferay.portal.SystemException,
070: com.liferay.portlet.journal.NoSuchArticleResourceException {
071: return getPersistence().findByPrimaryKey(resourcePrimKey);
072: }
073:
074: public static com.liferay.portlet.journal.model.JournalArticleResource fetchByPrimaryKey(
075: long resourcePrimKey)
076: throws com.liferay.portal.SystemException {
077: return getPersistence().fetchByPrimaryKey(resourcePrimKey);
078: }
079:
080: public static java.util.List findByGroupId(long groupId)
081: throws com.liferay.portal.SystemException {
082: return getPersistence().findByGroupId(groupId);
083: }
084:
085: public static java.util.List findByGroupId(long groupId, int begin,
086: int end) throws com.liferay.portal.SystemException {
087: return getPersistence().findByGroupId(groupId, begin, end);
088: }
089:
090: public static java.util.List findByGroupId(long groupId, int begin,
091: int end,
092: com.liferay.portal.kernel.util.OrderByComparator obc)
093: throws com.liferay.portal.SystemException {
094: return getPersistence().findByGroupId(groupId, begin, end, obc);
095: }
096:
097: public static com.liferay.portlet.journal.model.JournalArticleResource findByGroupId_First(
098: long groupId,
099: com.liferay.portal.kernel.util.OrderByComparator obc)
100: throws com.liferay.portal.SystemException,
101: com.liferay.portlet.journal.NoSuchArticleResourceException {
102: return getPersistence().findByGroupId_First(groupId, obc);
103: }
104:
105: public static com.liferay.portlet.journal.model.JournalArticleResource findByGroupId_Last(
106: long groupId,
107: com.liferay.portal.kernel.util.OrderByComparator obc)
108: throws com.liferay.portal.SystemException,
109: com.liferay.portlet.journal.NoSuchArticleResourceException {
110: return getPersistence().findByGroupId_Last(groupId, obc);
111: }
112:
113: public static com.liferay.portlet.journal.model.JournalArticleResource[] findByGroupId_PrevAndNext(
114: long resourcePrimKey, long groupId,
115: com.liferay.portal.kernel.util.OrderByComparator obc)
116: throws com.liferay.portal.SystemException,
117: com.liferay.portlet.journal.NoSuchArticleResourceException {
118: return getPersistence().findByGroupId_PrevAndNext(
119: resourcePrimKey, groupId, obc);
120: }
121:
122: public static com.liferay.portlet.journal.model.JournalArticleResource findByG_A(
123: long groupId, java.lang.String articleId)
124: throws com.liferay.portal.SystemException,
125: com.liferay.portlet.journal.NoSuchArticleResourceException {
126: return getPersistence().findByG_A(groupId, articleId);
127: }
128:
129: public static com.liferay.portlet.journal.model.JournalArticleResource fetchByG_A(
130: long groupId, java.lang.String articleId)
131: throws com.liferay.portal.SystemException {
132: return getPersistence().fetchByG_A(groupId, articleId);
133: }
134:
135: public static java.util.List findWithDynamicQuery(
136: com.liferay.portal.kernel.dao.DynamicQueryInitializer queryInitializer)
137: throws com.liferay.portal.SystemException {
138: return getPersistence().findWithDynamicQuery(queryInitializer);
139: }
140:
141: public static java.util.List findWithDynamicQuery(
142: com.liferay.portal.kernel.dao.DynamicQueryInitializer queryInitializer,
143: int begin, int end)
144: throws com.liferay.portal.SystemException {
145: return getPersistence().findWithDynamicQuery(queryInitializer,
146: begin, end);
147: }
148:
149: public static java.util.List findAll()
150: throws com.liferay.portal.SystemException {
151: return getPersistence().findAll();
152: }
153:
154: public static java.util.List findAll(int begin, int end)
155: throws com.liferay.portal.SystemException {
156: return getPersistence().findAll(begin, end);
157: }
158:
159: public static java.util.List findAll(int begin, int end,
160: com.liferay.portal.kernel.util.OrderByComparator obc)
161: throws com.liferay.portal.SystemException {
162: return getPersistence().findAll(begin, end, obc);
163: }
164:
165: public static void removeByGroupId(long groupId)
166: throws com.liferay.portal.SystemException {
167: getPersistence().removeByGroupId(groupId);
168: }
169:
170: public static void removeByG_A(long groupId,
171: java.lang.String articleId)
172: throws com.liferay.portal.SystemException,
173: com.liferay.portlet.journal.NoSuchArticleResourceException {
174: getPersistence().removeByG_A(groupId, articleId);
175: }
176:
177: public static void removeAll()
178: throws com.liferay.portal.SystemException {
179: getPersistence().removeAll();
180: }
181:
182: public static int countByGroupId(long groupId)
183: throws com.liferay.portal.SystemException {
184: return getPersistence().countByGroupId(groupId);
185: }
186:
187: public static int countByG_A(long groupId,
188: java.lang.String articleId)
189: throws com.liferay.portal.SystemException {
190: return getPersistence().countByG_A(groupId, articleId);
191: }
192:
193: public static int countAll()
194: throws com.liferay.portal.SystemException {
195: return getPersistence().countAll();
196: }
197:
198: public static JournalArticleResourcePersistence getPersistence() {
199: return _getUtil()._persistence;
200: }
201:
202: public void setPersistence(
203: JournalArticleResourcePersistence persistence) {
204: _persistence = persistence;
205: }
206:
207: private static JournalArticleResourceUtil _getUtil() {
208: if (_util == null) {
209: _util = (JournalArticleResourceUtil) com.liferay.portal.kernel.bean.BeanLocatorUtil
210: .locate(_UTIL);
211: }
212:
213: return _util;
214: }
215:
216: private static final String _UTIL = JournalArticleResourceUtil.class
217: .getName();
218: private static JournalArticleResourceUtil _util;
219: private JournalArticleResourcePersistence _persistence;
220: }
|