001 /** 002 * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved. 003 * 004 * This library is free software; you can redistribute it and/or modify it under 005 * the terms of the GNU Lesser General Public License as published by the Free 006 * Software Foundation; either version 2.1 of the License, or (at your option) 007 * any later version. 008 * 009 * This library is distributed in the hope that it will be useful, but WITHOUT 010 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 011 * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more 012 * details. 013 */ 014 015 package com.liferay.portal.service.persistence; 016 017 import com.liferay.portal.model.ClassName; 018 019 /** 020 * The persistence interface for the class name service. 021 * 022 * <p> 023 * Caching information and settings can be found in <code>portal.properties</code> 024 * </p> 025 * 026 * @author Brian Wing Shun Chan 027 * @see ClassNamePersistenceImpl 028 * @see ClassNameUtil 029 * @generated 030 */ 031 public interface ClassNamePersistence extends BasePersistence<ClassName> { 032 /* 033 * NOTE FOR DEVELOPERS: 034 * 035 * Never modify or reference this interface directly. Always use {@link ClassNameUtil} to access the class name persistence. Modify <code>service.xml</code> and rerun ServiceBuilder to regenerate this interface. 036 */ 037 038 /** 039 * Returns the class name where value = ? or throws a {@link com.liferay.portal.NoSuchClassNameException} if it could not be found. 040 * 041 * @param value the value 042 * @return the matching class name 043 * @throws com.liferay.portal.NoSuchClassNameException if a matching class name could not be found 044 * @throws SystemException if a system exception occurred 045 */ 046 public com.liferay.portal.model.ClassName findByValue( 047 java.lang.String value) 048 throws com.liferay.portal.NoSuchClassNameException, 049 com.liferay.portal.kernel.exception.SystemException; 050 051 /** 052 * Returns the class name where value = ? or returns <code>null</code> if it could not be found. Uses the finder cache. 053 * 054 * @param value the value 055 * @return the matching class name, or <code>null</code> if a matching class name could not be found 056 * @throws SystemException if a system exception occurred 057 */ 058 public com.liferay.portal.model.ClassName fetchByValue( 059 java.lang.String value) 060 throws com.liferay.portal.kernel.exception.SystemException; 061 062 /** 063 * Returns the class name where value = ? or returns <code>null</code> if it could not be found, optionally using the finder cache. 064 * 065 * @param value the value 066 * @param retrieveFromCache whether to use the finder cache 067 * @return the matching class name, or <code>null</code> if a matching class name could not be found 068 * @throws SystemException if a system exception occurred 069 */ 070 public com.liferay.portal.model.ClassName fetchByValue( 071 java.lang.String value, boolean retrieveFromCache) 072 throws com.liferay.portal.kernel.exception.SystemException; 073 074 /** 075 * Removes the class name where value = ? from the database. 076 * 077 * @param value the value 078 * @return the class name that was removed 079 * @throws SystemException if a system exception occurred 080 */ 081 public com.liferay.portal.model.ClassName removeByValue( 082 java.lang.String value) 083 throws com.liferay.portal.NoSuchClassNameException, 084 com.liferay.portal.kernel.exception.SystemException; 085 086 /** 087 * Returns the number of class names where value = ?. 088 * 089 * @param value the value 090 * @return the number of matching class names 091 * @throws SystemException if a system exception occurred 092 */ 093 public int countByValue(java.lang.String value) 094 throws com.liferay.portal.kernel.exception.SystemException; 095 096 /** 097 * Caches the class name in the entity cache if it is enabled. 098 * 099 * @param className the class name 100 */ 101 public void cacheResult(com.liferay.portal.model.ClassName className); 102 103 /** 104 * Caches the class names in the entity cache if it is enabled. 105 * 106 * @param classNames the class names 107 */ 108 public void cacheResult( 109 java.util.List<com.liferay.portal.model.ClassName> classNames); 110 111 /** 112 * Creates a new class name with the primary key. Does not add the class name to the database. 113 * 114 * @param classNameId the primary key for the new class name 115 * @return the new class name 116 */ 117 public com.liferay.portal.model.ClassName create(long classNameId); 118 119 /** 120 * Removes the class name with the primary key from the database. Also notifies the appropriate model listeners. 121 * 122 * @param classNameId the primary key of the class name 123 * @return the class name that was removed 124 * @throws com.liferay.portal.NoSuchClassNameException if a class name with the primary key could not be found 125 * @throws SystemException if a system exception occurred 126 */ 127 public com.liferay.portal.model.ClassName remove(long classNameId) 128 throws com.liferay.portal.NoSuchClassNameException, 129 com.liferay.portal.kernel.exception.SystemException; 130 131 public com.liferay.portal.model.ClassName updateImpl( 132 com.liferay.portal.model.ClassName className) 133 throws com.liferay.portal.kernel.exception.SystemException; 134 135 /** 136 * Returns the class name with the primary key or throws a {@link com.liferay.portal.NoSuchClassNameException} if it could not be found. 137 * 138 * @param classNameId the primary key of the class name 139 * @return the class name 140 * @throws com.liferay.portal.NoSuchClassNameException if a class name with the primary key could not be found 141 * @throws SystemException if a system exception occurred 142 */ 143 public com.liferay.portal.model.ClassName findByPrimaryKey(long classNameId) 144 throws com.liferay.portal.NoSuchClassNameException, 145 com.liferay.portal.kernel.exception.SystemException; 146 147 /** 148 * Returns the class name with the primary key or returns <code>null</code> if it could not be found. 149 * 150 * @param classNameId the primary key of the class name 151 * @return the class name, or <code>null</code> if a class name with the primary key could not be found 152 * @throws SystemException if a system exception occurred 153 */ 154 public com.liferay.portal.model.ClassName fetchByPrimaryKey( 155 long classNameId) 156 throws com.liferay.portal.kernel.exception.SystemException; 157 158 /** 159 * Returns all the class names. 160 * 161 * @return the class names 162 * @throws SystemException if a system exception occurred 163 */ 164 public java.util.List<com.liferay.portal.model.ClassName> findAll() 165 throws com.liferay.portal.kernel.exception.SystemException; 166 167 /** 168 * Returns a range of all the class names. 169 * 170 * <p> 171 * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portal.model.impl.ClassNameModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. 172 * </p> 173 * 174 * @param start the lower bound of the range of class names 175 * @param end the upper bound of the range of class names (not inclusive) 176 * @return the range of class names 177 * @throws SystemException if a system exception occurred 178 */ 179 public java.util.List<com.liferay.portal.model.ClassName> findAll( 180 int start, int end) 181 throws com.liferay.portal.kernel.exception.SystemException; 182 183 /** 184 * Returns an ordered range of all the class names. 185 * 186 * <p> 187 * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portal.model.impl.ClassNameModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. 188 * </p> 189 * 190 * @param start the lower bound of the range of class names 191 * @param end the upper bound of the range of class names (not inclusive) 192 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 193 * @return the ordered range of class names 194 * @throws SystemException if a system exception occurred 195 */ 196 public java.util.List<com.liferay.portal.model.ClassName> findAll( 197 int start, int end, 198 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 199 throws com.liferay.portal.kernel.exception.SystemException; 200 201 /** 202 * Removes all the class names from the database. 203 * 204 * @throws SystemException if a system exception occurred 205 */ 206 public void removeAll() 207 throws com.liferay.portal.kernel.exception.SystemException; 208 209 /** 210 * Returns the number of class names. 211 * 212 * @return the number of class names 213 * @throws SystemException if a system exception occurred 214 */ 215 public int countAll() 216 throws com.liferay.portal.kernel.exception.SystemException; 217 }