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