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.portal.service.persistence;
022:
023: /**
024: * <a href="ReleaseUtil.java.html"><b><i>View Source</i></b></a>
025: *
026: * @author Brian Wing Shun Chan
027: *
028: */
029: public class ReleaseUtil {
030: public static com.liferay.portal.model.Release create(long releaseId) {
031: return getPersistence().create(releaseId);
032: }
033:
034: public static com.liferay.portal.model.Release remove(long releaseId)
035: throws com.liferay.portal.NoSuchReleaseException,
036: com.liferay.portal.SystemException {
037: return getPersistence().remove(releaseId);
038: }
039:
040: public static com.liferay.portal.model.Release remove(
041: com.liferay.portal.model.Release release)
042: throws com.liferay.portal.SystemException {
043: return getPersistence().remove(release);
044: }
045:
046: public static com.liferay.portal.model.Release update(
047: com.liferay.portal.model.Release release)
048: throws com.liferay.portal.SystemException {
049: return getPersistence().update(release);
050: }
051:
052: public static com.liferay.portal.model.Release update(
053: com.liferay.portal.model.Release release, boolean merge)
054: throws com.liferay.portal.SystemException {
055: return getPersistence().update(release, merge);
056: }
057:
058: public static com.liferay.portal.model.Release updateImpl(
059: com.liferay.portal.model.Release release, boolean merge)
060: throws com.liferay.portal.SystemException {
061: return getPersistence().updateImpl(release, merge);
062: }
063:
064: public static com.liferay.portal.model.Release findByPrimaryKey(
065: long releaseId)
066: throws com.liferay.portal.NoSuchReleaseException,
067: com.liferay.portal.SystemException {
068: return getPersistence().findByPrimaryKey(releaseId);
069: }
070:
071: public static com.liferay.portal.model.Release fetchByPrimaryKey(
072: long releaseId) throws com.liferay.portal.SystemException {
073: return getPersistence().fetchByPrimaryKey(releaseId);
074: }
075:
076: public static java.util.List findWithDynamicQuery(
077: com.liferay.portal.kernel.dao.DynamicQueryInitializer queryInitializer)
078: throws com.liferay.portal.SystemException {
079: return getPersistence().findWithDynamicQuery(queryInitializer);
080: }
081:
082: public static java.util.List findWithDynamicQuery(
083: com.liferay.portal.kernel.dao.DynamicQueryInitializer queryInitializer,
084: int begin, int end)
085: throws com.liferay.portal.SystemException {
086: return getPersistence().findWithDynamicQuery(queryInitializer,
087: begin, end);
088: }
089:
090: public static java.util.List findAll()
091: throws com.liferay.portal.SystemException {
092: return getPersistence().findAll();
093: }
094:
095: public static java.util.List findAll(int begin, int end)
096: throws com.liferay.portal.SystemException {
097: return getPersistence().findAll(begin, end);
098: }
099:
100: public static java.util.List findAll(int begin, int end,
101: com.liferay.portal.kernel.util.OrderByComparator obc)
102: throws com.liferay.portal.SystemException {
103: return getPersistence().findAll(begin, end, obc);
104: }
105:
106: public static void removeAll()
107: throws com.liferay.portal.SystemException {
108: getPersistence().removeAll();
109: }
110:
111: public static int countAll()
112: throws com.liferay.portal.SystemException {
113: return getPersistence().countAll();
114: }
115:
116: public static ReleasePersistence getPersistence() {
117: return _getUtil()._persistence;
118: }
119:
120: public void setPersistence(ReleasePersistence persistence) {
121: _persistence = persistence;
122: }
123:
124: private static ReleaseUtil _getUtil() {
125: if (_util == null) {
126: _util = (ReleaseUtil) com.liferay.portal.kernel.bean.BeanLocatorUtil
127: .locate(_UTIL);
128: }
129:
130: return _util;
131: }
132:
133: private static final String _UTIL = ReleaseUtil.class.getName();
134: private static ReleaseUtil _util;
135: private ReleasePersistence _persistence;
136: }
|