001 /** 002 * Copyright (c) 2000-2011 Liferay, Inc. All rights reserved. 003 * 004 * The contents of this file are subject to the terms of the Liferay Enterprise 005 * Subscription License ("License"). You may not use this file except in 006 * compliance with the License. You can obtain a copy of the License by 007 * contacting Liferay, Inc. See the License for the specific language governing 008 * permissions and limitations under the License, including but not limited to 009 * distribution rights of the Software. 010 * 011 * 012 * 013 */ 014 015 package com.liferay.portal.service.persistence; 016 017 import com.liferay.portal.kernel.exception.SystemException; 018 import com.liferay.portal.model.ClassName; 019 020 /** 021 * The persistence interface for the class name service. 022 * 023 * <p> 024 * Caching information and settings can be found in <code>portal.properties</code> 025 * </p> 026 * 027 * @author Brian Wing Shun Chan 028 * @see ClassNamePersistenceImpl 029 * @see ClassNameUtil 030 * @generated 031 */ 032 public interface ClassNamePersistence extends BasePersistence<ClassName> { 033 /* 034 * NOTE FOR DEVELOPERS: 035 * 036 * 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. 037 */ 038 039 /** 040 * Caches the class name in the entity cache if it is enabled. 041 * 042 * @param className the class name to cache 043 */ 044 public void cacheResult(com.liferay.portal.model.ClassName className); 045 046 /** 047 * Caches the class names in the entity cache if it is enabled. 048 * 049 * @param classNames the class names to cache 050 */ 051 public void cacheResult( 052 java.util.List<com.liferay.portal.model.ClassName> classNames); 053 054 /** 055 * Creates a new class name with the primary key. Does not add the class name to the database. 056 * 057 * @param classNameId the primary key for the new class name 058 * @return the new class name 059 */ 060 public com.liferay.portal.model.ClassName create(long classNameId); 061 062 /** 063 * Removes the class name with the primary key from the database. Also notifies the appropriate model listeners. 064 * 065 * @param classNameId the primary key of the class name to remove 066 * @return the class name that was removed 067 * @throws com.liferay.portal.NoSuchClassNameException if a class name with the primary key could not be found 068 * @throws SystemException if a system exception occurred 069 */ 070 public com.liferay.portal.model.ClassName remove(long classNameId) 071 throws com.liferay.portal.NoSuchClassNameException, 072 com.liferay.portal.kernel.exception.SystemException; 073 074 public com.liferay.portal.model.ClassName updateImpl( 075 com.liferay.portal.model.ClassName className, boolean merge) 076 throws com.liferay.portal.kernel.exception.SystemException; 077 078 /** 079 * Finds the class name with the primary key or throws a {@link com.liferay.portal.NoSuchClassNameException} if it could not be found. 080 * 081 * @param classNameId the primary key of the class name to find 082 * @return the class name 083 * @throws com.liferay.portal.NoSuchClassNameException if a class name with the primary key could not be found 084 * @throws SystemException if a system exception occurred 085 */ 086 public com.liferay.portal.model.ClassName findByPrimaryKey(long classNameId) 087 throws com.liferay.portal.NoSuchClassNameException, 088 com.liferay.portal.kernel.exception.SystemException; 089 090 /** 091 * Finds the class name with the primary key or returns <code>null</code> if it could not be found. 092 * 093 * @param classNameId the primary key of the class name to find 094 * @return the class name, or <code>null</code> if a class name with the primary key could not be found 095 * @throws SystemException if a system exception occurred 096 */ 097 public com.liferay.portal.model.ClassName fetchByPrimaryKey( 098 long classNameId) 099 throws com.liferay.portal.kernel.exception.SystemException; 100 101 /** 102 * Finds the class name where value = ? or throws a {@link com.liferay.portal.NoSuchClassNameException} if it could not be found. 103 * 104 * @param value the value to search with 105 * @return the matching class name 106 * @throws com.liferay.portal.NoSuchClassNameException if a matching class name could not be found 107 * @throws SystemException if a system exception occurred 108 */ 109 public com.liferay.portal.model.ClassName findByValue( 110 java.lang.String value) 111 throws com.liferay.portal.NoSuchClassNameException, 112 com.liferay.portal.kernel.exception.SystemException; 113 114 /** 115 * Finds the class name where value = ? or returns <code>null</code> if it could not be found. Uses the finder cache. 116 * 117 * @param value the value to search with 118 * @return the matching class name, or <code>null</code> if a matching class name could not be found 119 * @throws SystemException if a system exception occurred 120 */ 121 public com.liferay.portal.model.ClassName fetchByValue( 122 java.lang.String value) 123 throws com.liferay.portal.kernel.exception.SystemException; 124 125 /** 126 * Finds the class name where value = ? or returns <code>null</code> if it could not be found, optionally using the finder cache. 127 * 128 * @param value the value to search with 129 * @return the matching class name, or <code>null</code> if a matching class name could not be found 130 * @throws SystemException if a system exception occurred 131 */ 132 public com.liferay.portal.model.ClassName fetchByValue( 133 java.lang.String value, boolean retrieveFromCache) 134 throws com.liferay.portal.kernel.exception.SystemException; 135 136 /** 137 * Finds all the class names. 138 * 139 * @return the class names 140 * @throws SystemException if a system exception occurred 141 */ 142 public java.util.List<com.liferay.portal.model.ClassName> findAll() 143 throws com.liferay.portal.kernel.exception.SystemException; 144 145 /** 146 * Finds a range of all the class names. 147 * 148 * <p> 149 * 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. 150 * </p> 151 * 152 * @param start the lower bound of the range of class names to return 153 * @param end the upper bound of the range of class names to return (not inclusive) 154 * @return the range of class names 155 * @throws SystemException if a system exception occurred 156 */ 157 public java.util.List<com.liferay.portal.model.ClassName> findAll( 158 int start, int end) 159 throws com.liferay.portal.kernel.exception.SystemException; 160 161 /** 162 * Finds an ordered range of all the class names. 163 * 164 * <p> 165 * 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. 166 * </p> 167 * 168 * @param start the lower bound of the range of class names to return 169 * @param end the upper bound of the range of class names to return (not inclusive) 170 * @param orderByComparator the comparator to order the results by 171 * @return the ordered range of class names 172 * @throws SystemException if a system exception occurred 173 */ 174 public java.util.List<com.liferay.portal.model.ClassName> findAll( 175 int start, int end, 176 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 177 throws com.liferay.portal.kernel.exception.SystemException; 178 179 /** 180 * Removes the class name where value = ? from the database. 181 * 182 * @param value the value to search with 183 * @throws SystemException if a system exception occurred 184 */ 185 public void removeByValue(java.lang.String value) 186 throws com.liferay.portal.NoSuchClassNameException, 187 com.liferay.portal.kernel.exception.SystemException; 188 189 /** 190 * Removes all the class names from the database. 191 * 192 * @throws SystemException if a system exception occurred 193 */ 194 public void removeAll() 195 throws com.liferay.portal.kernel.exception.SystemException; 196 197 /** 198 * Counts all the class names where value = ?. 199 * 200 * @param value the value to search with 201 * @return the number of matching class names 202 * @throws SystemException if a system exception occurred 203 */ 204 public int countByValue(java.lang.String value) 205 throws com.liferay.portal.kernel.exception.SystemException; 206 207 /** 208 * Counts all the class names. 209 * 210 * @return the number of class names 211 * @throws SystemException if a system exception occurred 212 */ 213 public int countAll() 214 throws com.liferay.portal.kernel.exception.SystemException; 215 216 public ClassName remove(ClassName className) throws SystemException; 217 }