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.documentlibrary.service.persistence;
022:
023: /**
024: * <a href="DLFileVersionUtil.java.html"><b><i>View Source</i></b></a>
025: *
026: * @author Brian Wing Shun Chan
027: *
028: */
029: public class DLFileVersionUtil {
030: public static com.liferay.portlet.documentlibrary.model.DLFileVersion create(
031: long fileVersionId) {
032: return getPersistence().create(fileVersionId);
033: }
034:
035: public static com.liferay.portlet.documentlibrary.model.DLFileVersion remove(
036: long fileVersionId)
037: throws com.liferay.portlet.documentlibrary.NoSuchFileVersionException,
038: com.liferay.portal.SystemException {
039: return getPersistence().remove(fileVersionId);
040: }
041:
042: public static com.liferay.portlet.documentlibrary.model.DLFileVersion remove(
043: com.liferay.portlet.documentlibrary.model.DLFileVersion dlFileVersion)
044: throws com.liferay.portal.SystemException {
045: return getPersistence().remove(dlFileVersion);
046: }
047:
048: public static com.liferay.portlet.documentlibrary.model.DLFileVersion update(
049: com.liferay.portlet.documentlibrary.model.DLFileVersion dlFileVersion)
050: throws com.liferay.portal.SystemException {
051: return getPersistence().update(dlFileVersion);
052: }
053:
054: public static com.liferay.portlet.documentlibrary.model.DLFileVersion update(
055: com.liferay.portlet.documentlibrary.model.DLFileVersion dlFileVersion,
056: boolean merge) throws com.liferay.portal.SystemException {
057: return getPersistence().update(dlFileVersion, merge);
058: }
059:
060: public static com.liferay.portlet.documentlibrary.model.DLFileVersion updateImpl(
061: com.liferay.portlet.documentlibrary.model.DLFileVersion dlFileVersion,
062: boolean merge) throws com.liferay.portal.SystemException {
063: return getPersistence().updateImpl(dlFileVersion, merge);
064: }
065:
066: public static com.liferay.portlet.documentlibrary.model.DLFileVersion findByPrimaryKey(
067: long fileVersionId)
068: throws com.liferay.portlet.documentlibrary.NoSuchFileVersionException,
069: com.liferay.portal.SystemException {
070: return getPersistence().findByPrimaryKey(fileVersionId);
071: }
072:
073: public static com.liferay.portlet.documentlibrary.model.DLFileVersion fetchByPrimaryKey(
074: long fileVersionId)
075: throws com.liferay.portal.SystemException {
076: return getPersistence().fetchByPrimaryKey(fileVersionId);
077: }
078:
079: public static java.util.List findByF_N(long folderId,
080: java.lang.String name)
081: throws com.liferay.portal.SystemException {
082: return getPersistence().findByF_N(folderId, name);
083: }
084:
085: public static java.util.List findByF_N(long folderId,
086: java.lang.String name, int begin, int end)
087: throws com.liferay.portal.SystemException {
088: return getPersistence().findByF_N(folderId, name, begin, end);
089: }
090:
091: public static java.util.List findByF_N(long folderId,
092: java.lang.String name, int begin, int end,
093: com.liferay.portal.kernel.util.OrderByComparator obc)
094: throws com.liferay.portal.SystemException {
095: return getPersistence().findByF_N(folderId, name, begin, end,
096: obc);
097: }
098:
099: public static com.liferay.portlet.documentlibrary.model.DLFileVersion findByF_N_First(
100: long folderId, java.lang.String name,
101: com.liferay.portal.kernel.util.OrderByComparator obc)
102: throws com.liferay.portlet.documentlibrary.NoSuchFileVersionException,
103: com.liferay.portal.SystemException {
104: return getPersistence().findByF_N_First(folderId, name, obc);
105: }
106:
107: public static com.liferay.portlet.documentlibrary.model.DLFileVersion findByF_N_Last(
108: long folderId, java.lang.String name,
109: com.liferay.portal.kernel.util.OrderByComparator obc)
110: throws com.liferay.portlet.documentlibrary.NoSuchFileVersionException,
111: com.liferay.portal.SystemException {
112: return getPersistence().findByF_N_Last(folderId, name, obc);
113: }
114:
115: public static com.liferay.portlet.documentlibrary.model.DLFileVersion[] findByF_N_PrevAndNext(
116: long fileVersionId, long folderId, java.lang.String name,
117: com.liferay.portal.kernel.util.OrderByComparator obc)
118: throws com.liferay.portlet.documentlibrary.NoSuchFileVersionException,
119: com.liferay.portal.SystemException {
120: return getPersistence().findByF_N_PrevAndNext(fileVersionId,
121: folderId, name, obc);
122: }
123:
124: public static com.liferay.portlet.documentlibrary.model.DLFileVersion findByF_N_V(
125: long folderId, java.lang.String name, double version)
126: throws com.liferay.portlet.documentlibrary.NoSuchFileVersionException,
127: com.liferay.portal.SystemException {
128: return getPersistence().findByF_N_V(folderId, name, version);
129: }
130:
131: public static com.liferay.portlet.documentlibrary.model.DLFileVersion fetchByF_N_V(
132: long folderId, java.lang.String name, double version)
133: throws com.liferay.portal.SystemException {
134: return getPersistence().fetchByF_N_V(folderId, name, version);
135: }
136:
137: public static java.util.List findWithDynamicQuery(
138: com.liferay.portal.kernel.dao.DynamicQueryInitializer queryInitializer)
139: throws com.liferay.portal.SystemException {
140: return getPersistence().findWithDynamicQuery(queryInitializer);
141: }
142:
143: public static java.util.List findWithDynamicQuery(
144: com.liferay.portal.kernel.dao.DynamicQueryInitializer queryInitializer,
145: int begin, int end)
146: throws com.liferay.portal.SystemException {
147: return getPersistence().findWithDynamicQuery(queryInitializer,
148: begin, end);
149: }
150:
151: public static java.util.List findAll()
152: throws com.liferay.portal.SystemException {
153: return getPersistence().findAll();
154: }
155:
156: public static java.util.List findAll(int begin, int end)
157: throws com.liferay.portal.SystemException {
158: return getPersistence().findAll(begin, end);
159: }
160:
161: public static java.util.List findAll(int begin, int end,
162: com.liferay.portal.kernel.util.OrderByComparator obc)
163: throws com.liferay.portal.SystemException {
164: return getPersistence().findAll(begin, end, obc);
165: }
166:
167: public static void removeByF_N(long folderId, java.lang.String name)
168: throws com.liferay.portal.SystemException {
169: getPersistence().removeByF_N(folderId, name);
170: }
171:
172: public static void removeByF_N_V(long folderId,
173: java.lang.String name, double version)
174: throws com.liferay.portlet.documentlibrary.NoSuchFileVersionException,
175: com.liferay.portal.SystemException {
176: getPersistence().removeByF_N_V(folderId, name, version);
177: }
178:
179: public static void removeAll()
180: throws com.liferay.portal.SystemException {
181: getPersistence().removeAll();
182: }
183:
184: public static int countByF_N(long folderId, java.lang.String name)
185: throws com.liferay.portal.SystemException {
186: return getPersistence().countByF_N(folderId, name);
187: }
188:
189: public static int countByF_N_V(long folderId,
190: java.lang.String name, double version)
191: throws com.liferay.portal.SystemException {
192: return getPersistence().countByF_N_V(folderId, name, version);
193: }
194:
195: public static int countAll()
196: throws com.liferay.portal.SystemException {
197: return getPersistence().countAll();
198: }
199:
200: public static DLFileVersionPersistence getPersistence() {
201: return _getUtil()._persistence;
202: }
203:
204: public void setPersistence(DLFileVersionPersistence persistence) {
205: _persistence = persistence;
206: }
207:
208: private static DLFileVersionUtil _getUtil() {
209: if (_util == null) {
210: _util = (DLFileVersionUtil) com.liferay.portal.kernel.bean.BeanLocatorUtil
211: .locate(_UTIL);
212: }
213:
214: return _util;
215: }
216:
217: private static final String _UTIL = DLFileVersionUtil.class
218: .getName();
219: private static DLFileVersionUtil _util;
220: private DLFileVersionPersistence _persistence;
221: }
|