001 /** 002 * Copyright (c) 2000-2010 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.portlet.expando.service.persistence; 016 017 import com.liferay.portal.service.persistence.BasePersistence; 018 019 import com.liferay.portlet.expando.model.ExpandoColumn; 020 021 /** 022 * The persistence interface for the expando column service. 023 * 024 * <p> 025 * Never modify or reference this interface directly. Always use {@link ExpandoColumnUtil} to access the expando column persistence. Modify <code>service.xml</code> and rerun ServiceBuilder to regenerate this interface. 026 * </p> 027 * 028 * <p> 029 * Caching information and settings can be found in <code>portal.properties</code> 030 * </p> 031 * 032 * @author Brian Wing Shun Chan 033 * @see ExpandoColumnPersistenceImpl 034 * @see ExpandoColumnUtil 035 * @generated 036 */ 037 public interface ExpandoColumnPersistence extends BasePersistence<ExpandoColumn> { 038 /** 039 * Caches the expando column in the entity cache if it is enabled. 040 * 041 * @param expandoColumn the expando column to cache 042 */ 043 public void cacheResult( 044 com.liferay.portlet.expando.model.ExpandoColumn expandoColumn); 045 046 /** 047 * Caches the expando columns in the entity cache if it is enabled. 048 * 049 * @param expandoColumns the expando columns to cache 050 */ 051 public void cacheResult( 052 java.util.List<com.liferay.portlet.expando.model.ExpandoColumn> expandoColumns); 053 054 /** 055 * Creates a new expando column with the primary key. Does not add the expando column to the database. 056 * 057 * @param columnId the primary key for the new expando column 058 * @return the new expando column 059 */ 060 public com.liferay.portlet.expando.model.ExpandoColumn create(long columnId); 061 062 /** 063 * Removes the expando column with the primary key from the database. Also notifies the appropriate model listeners. 064 * 065 * @param columnId the primary key of the expando column to remove 066 * @return the expando column that was removed 067 * @throws com.liferay.portlet.expando.NoSuchColumnException if a expando column with the primary key could not be found 068 * @throws SystemException if a system exception occurred 069 */ 070 public com.liferay.portlet.expando.model.ExpandoColumn remove(long columnId) 071 throws com.liferay.portal.kernel.exception.SystemException, 072 com.liferay.portlet.expando.NoSuchColumnException; 073 074 public com.liferay.portlet.expando.model.ExpandoColumn updateImpl( 075 com.liferay.portlet.expando.model.ExpandoColumn expandoColumn, 076 boolean merge) 077 throws com.liferay.portal.kernel.exception.SystemException; 078 079 /** 080 * Finds the expando column with the primary key or throws a {@link com.liferay.portlet.expando.NoSuchColumnException} if it could not be found. 081 * 082 * @param columnId the primary key of the expando column to find 083 * @return the expando column 084 * @throws com.liferay.portlet.expando.NoSuchColumnException if a expando column with the primary key could not be found 085 * @throws SystemException if a system exception occurred 086 */ 087 public com.liferay.portlet.expando.model.ExpandoColumn findByPrimaryKey( 088 long columnId) 089 throws com.liferay.portal.kernel.exception.SystemException, 090 com.liferay.portlet.expando.NoSuchColumnException; 091 092 /** 093 * Finds the expando column with the primary key or returns <code>null</code> if it could not be found. 094 * 095 * @param columnId the primary key of the expando column to find 096 * @return the expando column, or <code>null</code> if a expando column with the primary key could not be found 097 * @throws SystemException if a system exception occurred 098 */ 099 public com.liferay.portlet.expando.model.ExpandoColumn fetchByPrimaryKey( 100 long columnId) 101 throws com.liferay.portal.kernel.exception.SystemException; 102 103 /** 104 * Finds all the expando columns where tableId = ?. 105 * 106 * @param tableId the table id to search with 107 * @return the matching expando columns 108 * @throws SystemException if a system exception occurred 109 */ 110 public java.util.List<com.liferay.portlet.expando.model.ExpandoColumn> findByTableId( 111 long tableId) 112 throws com.liferay.portal.kernel.exception.SystemException; 113 114 /** 115 * Finds a range of all the expando columns where tableId = ?. 116 * 117 * <p> 118 * 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. 119 * </p> 120 * 121 * @param tableId the table id to search with 122 * @param start the lower bound of the range of expando columns to return 123 * @param end the upper bound of the range of expando columns to return (not inclusive) 124 * @return the range of matching expando columns 125 * @throws SystemException if a system exception occurred 126 */ 127 public java.util.List<com.liferay.portlet.expando.model.ExpandoColumn> findByTableId( 128 long tableId, int start, int end) 129 throws com.liferay.portal.kernel.exception.SystemException; 130 131 /** 132 * Finds an ordered range of all the expando columns where tableId = ?. 133 * 134 * <p> 135 * 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. 136 * </p> 137 * 138 * @param tableId the table id to search with 139 * @param start the lower bound of the range of expando columns to return 140 * @param end the upper bound of the range of expando columns to return (not inclusive) 141 * @param orderByComparator the comparator to order the results by 142 * @return the ordered range of matching expando columns 143 * @throws SystemException if a system exception occurred 144 */ 145 public java.util.List<com.liferay.portlet.expando.model.ExpandoColumn> findByTableId( 146 long tableId, int start, int end, 147 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 148 throws com.liferay.portal.kernel.exception.SystemException; 149 150 /** 151 * Finds the first expando column in the ordered set where tableId = ?. 152 * 153 * <p> 154 * 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. 155 * </p> 156 * 157 * @param tableId the table id to search with 158 * @param orderByComparator the comparator to order the set by 159 * @return the first matching expando column 160 * @throws com.liferay.portlet.expando.NoSuchColumnException if a matching expando column could not be found 161 * @throws SystemException if a system exception occurred 162 */ 163 public com.liferay.portlet.expando.model.ExpandoColumn findByTableId_First( 164 long tableId, 165 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 166 throws com.liferay.portal.kernel.exception.SystemException, 167 com.liferay.portlet.expando.NoSuchColumnException; 168 169 /** 170 * Finds the last expando column in the ordered set where tableId = ?. 171 * 172 * <p> 173 * 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. 174 * </p> 175 * 176 * @param tableId the table id to search with 177 * @param orderByComparator the comparator to order the set by 178 * @return the last matching expando column 179 * @throws com.liferay.portlet.expando.NoSuchColumnException if a matching expando column could not be found 180 * @throws SystemException if a system exception occurred 181 */ 182 public com.liferay.portlet.expando.model.ExpandoColumn findByTableId_Last( 183 long tableId, 184 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 185 throws com.liferay.portal.kernel.exception.SystemException, 186 com.liferay.portlet.expando.NoSuchColumnException; 187 188 /** 189 * Finds the expando columns before and after the current expando column in the ordered set where tableId = ?. 190 * 191 * <p> 192 * 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. 193 * </p> 194 * 195 * @param columnId the primary key of the current expando column 196 * @param tableId the table id to search with 197 * @param orderByComparator the comparator to order the set by 198 * @return the previous, current, and next expando column 199 * @throws com.liferay.portlet.expando.NoSuchColumnException if a expando column with the primary key could not be found 200 * @throws SystemException if a system exception occurred 201 */ 202 public com.liferay.portlet.expando.model.ExpandoColumn[] findByTableId_PrevAndNext( 203 long columnId, long tableId, 204 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 205 throws com.liferay.portal.kernel.exception.SystemException, 206 com.liferay.portlet.expando.NoSuchColumnException; 207 208 /** 209 * Finds the expando column where tableId = ? and name = ? or throws a {@link com.liferay.portlet.expando.NoSuchColumnException} if it could not be found. 210 * 211 * @param tableId the table id to search with 212 * @param name the name to search with 213 * @return the matching expando column 214 * @throws com.liferay.portlet.expando.NoSuchColumnException if a matching expando column could not be found 215 * @throws SystemException if a system exception occurred 216 */ 217 public com.liferay.portlet.expando.model.ExpandoColumn findByT_N( 218 long tableId, java.lang.String name) 219 throws com.liferay.portal.kernel.exception.SystemException, 220 com.liferay.portlet.expando.NoSuchColumnException; 221 222 /** 223 * Finds the expando column where tableId = ? and name = ? or returns <code>null</code> if it could not be found. Uses the finder cache. 224 * 225 * @param tableId the table id to search with 226 * @param name the name to search with 227 * @return the matching expando column, or <code>null</code> if a matching expando column could not be found 228 * @throws SystemException if a system exception occurred 229 */ 230 public com.liferay.portlet.expando.model.ExpandoColumn fetchByT_N( 231 long tableId, java.lang.String name) 232 throws com.liferay.portal.kernel.exception.SystemException; 233 234 /** 235 * Finds the expando column where tableId = ? and name = ? or returns <code>null</code> if it could not be found, optionally using the finder cache. 236 * 237 * @param tableId the table id to search with 238 * @param name the name to search with 239 * @return the matching expando column, or <code>null</code> if a matching expando column could not be found 240 * @throws SystemException if a system exception occurred 241 */ 242 public com.liferay.portlet.expando.model.ExpandoColumn fetchByT_N( 243 long tableId, java.lang.String name, boolean retrieveFromCache) 244 throws com.liferay.portal.kernel.exception.SystemException; 245 246 /** 247 * Finds all the expando columns. 248 * 249 * @return the expando columns 250 * @throws SystemException if a system exception occurred 251 */ 252 public java.util.List<com.liferay.portlet.expando.model.ExpandoColumn> findAll() 253 throws com.liferay.portal.kernel.exception.SystemException; 254 255 /** 256 * Finds a range of all the expando columns. 257 * 258 * <p> 259 * 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. 260 * </p> 261 * 262 * @param start the lower bound of the range of expando columns to return 263 * @param end the upper bound of the range of expando columns to return (not inclusive) 264 * @return the range of expando columns 265 * @throws SystemException if a system exception occurred 266 */ 267 public java.util.List<com.liferay.portlet.expando.model.ExpandoColumn> findAll( 268 int start, int end) 269 throws com.liferay.portal.kernel.exception.SystemException; 270 271 /** 272 * Finds an ordered range of all the expando columns. 273 * 274 * <p> 275 * 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. 276 * </p> 277 * 278 * @param start the lower bound of the range of expando columns to return 279 * @param end the upper bound of the range of expando columns to return (not inclusive) 280 * @param orderByComparator the comparator to order the results by 281 * @return the ordered range of expando columns 282 * @throws SystemException if a system exception occurred 283 */ 284 public java.util.List<com.liferay.portlet.expando.model.ExpandoColumn> findAll( 285 int start, int end, 286 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 287 throws com.liferay.portal.kernel.exception.SystemException; 288 289 /** 290 * Removes all the expando columns where tableId = ? from the database. 291 * 292 * @param tableId the table id to search with 293 * @throws SystemException if a system exception occurred 294 */ 295 public void removeByTableId(long tableId) 296 throws com.liferay.portal.kernel.exception.SystemException; 297 298 /** 299 * Removes the expando column where tableId = ? and name = ? from the database. 300 * 301 * @param tableId the table id to search with 302 * @param name the name to search with 303 * @throws SystemException if a system exception occurred 304 */ 305 public void removeByT_N(long tableId, java.lang.String name) 306 throws com.liferay.portal.kernel.exception.SystemException, 307 com.liferay.portlet.expando.NoSuchColumnException; 308 309 /** 310 * Removes all the expando columns from the database. 311 * 312 * @throws SystemException if a system exception occurred 313 */ 314 public void removeAll() 315 throws com.liferay.portal.kernel.exception.SystemException; 316 317 /** 318 * Counts all the expando columns where tableId = ?. 319 * 320 * @param tableId the table id to search with 321 * @return the number of matching expando columns 322 * @throws SystemException if a system exception occurred 323 */ 324 public int countByTableId(long tableId) 325 throws com.liferay.portal.kernel.exception.SystemException; 326 327 /** 328 * Counts all the expando columns where tableId = ? and name = ?. 329 * 330 * @param tableId the table id to search with 331 * @param name the name to search with 332 * @return the number of matching expando columns 333 * @throws SystemException if a system exception occurred 334 */ 335 public int countByT_N(long tableId, java.lang.String name) 336 throws com.liferay.portal.kernel.exception.SystemException; 337 338 /** 339 * Counts all the expando columns. 340 * 341 * @return the number of expando columns 342 * @throws SystemException if a system exception occurred 343 */ 344 public int countAll() 345 throws com.liferay.portal.kernel.exception.SystemException; 346 }