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="ListTypeUtil.java.html"><b><i>View Source</i></b></a>
025: *
026: * @author Brian Wing Shun Chan
027: *
028: */
029: public class ListTypeUtil {
030: public static com.liferay.portal.model.ListType create(
031: int listTypeId) {
032: return getPersistence().create(listTypeId);
033: }
034:
035: public static com.liferay.portal.model.ListType remove(
036: int listTypeId) throws com.liferay.portal.SystemException,
037: com.liferay.portal.NoSuchListTypeException {
038: return getPersistence().remove(listTypeId);
039: }
040:
041: public static com.liferay.portal.model.ListType remove(
042: com.liferay.portal.model.ListType listType)
043: throws com.liferay.portal.SystemException {
044: return getPersistence().remove(listType);
045: }
046:
047: public static com.liferay.portal.model.ListType update(
048: com.liferay.portal.model.ListType listType)
049: throws com.liferay.portal.SystemException {
050: return getPersistence().update(listType);
051: }
052:
053: public static com.liferay.portal.model.ListType update(
054: com.liferay.portal.model.ListType listType, boolean merge)
055: throws com.liferay.portal.SystemException {
056: return getPersistence().update(listType, merge);
057: }
058:
059: public static com.liferay.portal.model.ListType updateImpl(
060: com.liferay.portal.model.ListType listType, boolean merge)
061: throws com.liferay.portal.SystemException {
062: return getPersistence().updateImpl(listType, merge);
063: }
064:
065: public static com.liferay.portal.model.ListType findByPrimaryKey(
066: int listTypeId) throws com.liferay.portal.SystemException,
067: com.liferay.portal.NoSuchListTypeException {
068: return getPersistence().findByPrimaryKey(listTypeId);
069: }
070:
071: public static com.liferay.portal.model.ListType fetchByPrimaryKey(
072: int listTypeId) throws com.liferay.portal.SystemException {
073: return getPersistence().fetchByPrimaryKey(listTypeId);
074: }
075:
076: public static java.util.List findByType(java.lang.String type)
077: throws com.liferay.portal.SystemException {
078: return getPersistence().findByType(type);
079: }
080:
081: public static java.util.List findByType(java.lang.String type,
082: int begin, int end)
083: throws com.liferay.portal.SystemException {
084: return getPersistence().findByType(type, begin, end);
085: }
086:
087: public static java.util.List findByType(java.lang.String type,
088: int begin, int end,
089: com.liferay.portal.kernel.util.OrderByComparator obc)
090: throws com.liferay.portal.SystemException {
091: return getPersistence().findByType(type, begin, end, obc);
092: }
093:
094: public static com.liferay.portal.model.ListType findByType_First(
095: java.lang.String type,
096: com.liferay.portal.kernel.util.OrderByComparator obc)
097: throws com.liferay.portal.SystemException,
098: com.liferay.portal.NoSuchListTypeException {
099: return getPersistence().findByType_First(type, obc);
100: }
101:
102: public static com.liferay.portal.model.ListType findByType_Last(
103: java.lang.String type,
104: com.liferay.portal.kernel.util.OrderByComparator obc)
105: throws com.liferay.portal.SystemException,
106: com.liferay.portal.NoSuchListTypeException {
107: return getPersistence().findByType_Last(type, obc);
108: }
109:
110: public static com.liferay.portal.model.ListType[] findByType_PrevAndNext(
111: int listTypeId, java.lang.String type,
112: com.liferay.portal.kernel.util.OrderByComparator obc)
113: throws com.liferay.portal.SystemException,
114: com.liferay.portal.NoSuchListTypeException {
115: return getPersistence().findByType_PrevAndNext(listTypeId,
116: type, obc);
117: }
118:
119: public static java.util.List findWithDynamicQuery(
120: com.liferay.portal.kernel.dao.DynamicQueryInitializer queryInitializer)
121: throws com.liferay.portal.SystemException {
122: return getPersistence().findWithDynamicQuery(queryInitializer);
123: }
124:
125: public static java.util.List findWithDynamicQuery(
126: com.liferay.portal.kernel.dao.DynamicQueryInitializer queryInitializer,
127: int begin, int end)
128: throws com.liferay.portal.SystemException {
129: return getPersistence().findWithDynamicQuery(queryInitializer,
130: begin, end);
131: }
132:
133: public static java.util.List findAll()
134: throws com.liferay.portal.SystemException {
135: return getPersistence().findAll();
136: }
137:
138: public static java.util.List findAll(int begin, int end)
139: throws com.liferay.portal.SystemException {
140: return getPersistence().findAll(begin, end);
141: }
142:
143: public static java.util.List findAll(int begin, int end,
144: com.liferay.portal.kernel.util.OrderByComparator obc)
145: throws com.liferay.portal.SystemException {
146: return getPersistence().findAll(begin, end, obc);
147: }
148:
149: public static void removeByType(java.lang.String type)
150: throws com.liferay.portal.SystemException {
151: getPersistence().removeByType(type);
152: }
153:
154: public static void removeAll()
155: throws com.liferay.portal.SystemException {
156: getPersistence().removeAll();
157: }
158:
159: public static int countByType(java.lang.String type)
160: throws com.liferay.portal.SystemException {
161: return getPersistence().countByType(type);
162: }
163:
164: public static int countAll()
165: throws com.liferay.portal.SystemException {
166: return getPersistence().countAll();
167: }
168:
169: public static ListTypePersistence getPersistence() {
170: return _getUtil()._persistence;
171: }
172:
173: public void setPersistence(ListTypePersistence persistence) {
174: _persistence = persistence;
175: }
176:
177: private static ListTypeUtil _getUtil() {
178: if (_util == null) {
179: _util = (ListTypeUtil) com.liferay.portal.kernel.bean.BeanLocatorUtil
180: .locate(_UTIL);
181: }
182:
183: return _util;
184: }
185:
186: private static final String _UTIL = ListTypeUtil.class.getName();
187: private static ListTypeUtil _util;
188: private ListTypePersistence _persistence;
189: }
|