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 aQute.bnd.annotation.ProviderType; 018 019 import com.liferay.portal.model.VirtualHost; 020 021 /** 022 * The persistence interface for the virtual host service. 023 * 024 * <p> 025 * Caching information and settings can be found in <code>portal.properties</code> 026 * </p> 027 * 028 * @author Brian Wing Shun Chan 029 * @see VirtualHostPersistenceImpl 030 * @see VirtualHostUtil 031 * @generated 032 */ 033 @ProviderType 034 public interface VirtualHostPersistence extends BasePersistence<VirtualHost> { 035 /* 036 * NOTE FOR DEVELOPERS: 037 * 038 * Never modify or reference this interface directly. Always use {@link VirtualHostUtil} to access the virtual host persistence. Modify <code>service.xml</code> and rerun ServiceBuilder to regenerate this interface. 039 */ 040 041 /** 042 * Returns the virtual host where hostname = ? or throws a {@link com.liferay.portal.NoSuchVirtualHostException} if it could not be found. 043 * 044 * @param hostname the hostname 045 * @return the matching virtual host 046 * @throws com.liferay.portal.NoSuchVirtualHostException if a matching virtual host could not be found 047 * @throws SystemException if a system exception occurred 048 */ 049 public com.liferay.portal.model.VirtualHost findByHostname( 050 java.lang.String hostname) 051 throws com.liferay.portal.NoSuchVirtualHostException, 052 com.liferay.portal.kernel.exception.SystemException; 053 054 /** 055 * Returns the virtual host where hostname = ? or returns <code>null</code> if it could not be found. Uses the finder cache. 056 * 057 * @param hostname the hostname 058 * @return the matching virtual host, or <code>null</code> if a matching virtual host could not be found 059 * @throws SystemException if a system exception occurred 060 */ 061 public com.liferay.portal.model.VirtualHost fetchByHostname( 062 java.lang.String hostname) 063 throws com.liferay.portal.kernel.exception.SystemException; 064 065 /** 066 * Returns the virtual host where hostname = ? or returns <code>null</code> if it could not be found, optionally using the finder cache. 067 * 068 * @param hostname the hostname 069 * @param retrieveFromCache whether to use the finder cache 070 * @return the matching virtual host, or <code>null</code> if a matching virtual host could not be found 071 * @throws SystemException if a system exception occurred 072 */ 073 public com.liferay.portal.model.VirtualHost fetchByHostname( 074 java.lang.String hostname, boolean retrieveFromCache) 075 throws com.liferay.portal.kernel.exception.SystemException; 076 077 /** 078 * Removes the virtual host where hostname = ? from the database. 079 * 080 * @param hostname the hostname 081 * @return the virtual host that was removed 082 * @throws SystemException if a system exception occurred 083 */ 084 public com.liferay.portal.model.VirtualHost removeByHostname( 085 java.lang.String hostname) 086 throws com.liferay.portal.NoSuchVirtualHostException, 087 com.liferay.portal.kernel.exception.SystemException; 088 089 /** 090 * Returns the number of virtual hosts where hostname = ?. 091 * 092 * @param hostname the hostname 093 * @return the number of matching virtual hosts 094 * @throws SystemException if a system exception occurred 095 */ 096 public int countByHostname(java.lang.String hostname) 097 throws com.liferay.portal.kernel.exception.SystemException; 098 099 /** 100 * Returns the virtual host where companyId = ? and layoutSetId = ? or throws a {@link com.liferay.portal.NoSuchVirtualHostException} if it could not be found. 101 * 102 * @param companyId the company ID 103 * @param layoutSetId the layout set ID 104 * @return the matching virtual host 105 * @throws com.liferay.portal.NoSuchVirtualHostException if a matching virtual host could not be found 106 * @throws SystemException if a system exception occurred 107 */ 108 public com.liferay.portal.model.VirtualHost findByC_L(long companyId, 109 long layoutSetId) 110 throws com.liferay.portal.NoSuchVirtualHostException, 111 com.liferay.portal.kernel.exception.SystemException; 112 113 /** 114 * Returns the virtual host where companyId = ? and layoutSetId = ? or returns <code>null</code> if it could not be found. Uses the finder cache. 115 * 116 * @param companyId the company ID 117 * @param layoutSetId the layout set ID 118 * @return the matching virtual host, or <code>null</code> if a matching virtual host could not be found 119 * @throws SystemException if a system exception occurred 120 */ 121 public com.liferay.portal.model.VirtualHost fetchByC_L(long companyId, 122 long layoutSetId) 123 throws com.liferay.portal.kernel.exception.SystemException; 124 125 /** 126 * Returns the virtual host where companyId = ? and layoutSetId = ? or returns <code>null</code> if it could not be found, optionally using the finder cache. 127 * 128 * @param companyId the company ID 129 * @param layoutSetId the layout set ID 130 * @param retrieveFromCache whether to use the finder cache 131 * @return the matching virtual host, or <code>null</code> if a matching virtual host could not be found 132 * @throws SystemException if a system exception occurred 133 */ 134 public com.liferay.portal.model.VirtualHost fetchByC_L(long companyId, 135 long layoutSetId, boolean retrieveFromCache) 136 throws com.liferay.portal.kernel.exception.SystemException; 137 138 /** 139 * Removes the virtual host where companyId = ? and layoutSetId = ? from the database. 140 * 141 * @param companyId the company ID 142 * @param layoutSetId the layout set ID 143 * @return the virtual host that was removed 144 * @throws SystemException if a system exception occurred 145 */ 146 public com.liferay.portal.model.VirtualHost removeByC_L(long companyId, 147 long layoutSetId) 148 throws com.liferay.portal.NoSuchVirtualHostException, 149 com.liferay.portal.kernel.exception.SystemException; 150 151 /** 152 * Returns the number of virtual hosts where companyId = ? and layoutSetId = ?. 153 * 154 * @param companyId the company ID 155 * @param layoutSetId the layout set ID 156 * @return the number of matching virtual hosts 157 * @throws SystemException if a system exception occurred 158 */ 159 public int countByC_L(long companyId, long layoutSetId) 160 throws com.liferay.portal.kernel.exception.SystemException; 161 162 /** 163 * Caches the virtual host in the entity cache if it is enabled. 164 * 165 * @param virtualHost the virtual host 166 */ 167 public void cacheResult(com.liferay.portal.model.VirtualHost virtualHost); 168 169 /** 170 * Caches the virtual hosts in the entity cache if it is enabled. 171 * 172 * @param virtualHosts the virtual hosts 173 */ 174 public void cacheResult( 175 java.util.List<com.liferay.portal.model.VirtualHost> virtualHosts); 176 177 /** 178 * Creates a new virtual host with the primary key. Does not add the virtual host to the database. 179 * 180 * @param virtualHostId the primary key for the new virtual host 181 * @return the new virtual host 182 */ 183 public com.liferay.portal.model.VirtualHost create(long virtualHostId); 184 185 /** 186 * Removes the virtual host with the primary key from the database. Also notifies the appropriate model listeners. 187 * 188 * @param virtualHostId the primary key of the virtual host 189 * @return the virtual host that was removed 190 * @throws com.liferay.portal.NoSuchVirtualHostException if a virtual host with the primary key could not be found 191 * @throws SystemException if a system exception occurred 192 */ 193 public com.liferay.portal.model.VirtualHost remove(long virtualHostId) 194 throws com.liferay.portal.NoSuchVirtualHostException, 195 com.liferay.portal.kernel.exception.SystemException; 196 197 public com.liferay.portal.model.VirtualHost updateImpl( 198 com.liferay.portal.model.VirtualHost virtualHost) 199 throws com.liferay.portal.kernel.exception.SystemException; 200 201 /** 202 * Returns the virtual host with the primary key or throws a {@link com.liferay.portal.NoSuchVirtualHostException} if it could not be found. 203 * 204 * @param virtualHostId the primary key of the virtual host 205 * @return the virtual host 206 * @throws com.liferay.portal.NoSuchVirtualHostException if a virtual host with the primary key could not be found 207 * @throws SystemException if a system exception occurred 208 */ 209 public com.liferay.portal.model.VirtualHost findByPrimaryKey( 210 long virtualHostId) 211 throws com.liferay.portal.NoSuchVirtualHostException, 212 com.liferay.portal.kernel.exception.SystemException; 213 214 /** 215 * Returns the virtual host with the primary key or returns <code>null</code> if it could not be found. 216 * 217 * @param virtualHostId the primary key of the virtual host 218 * @return the virtual host, or <code>null</code> if a virtual host with the primary key could not be found 219 * @throws SystemException if a system exception occurred 220 */ 221 public com.liferay.portal.model.VirtualHost fetchByPrimaryKey( 222 long virtualHostId) 223 throws com.liferay.portal.kernel.exception.SystemException; 224 225 /** 226 * Returns all the virtual hosts. 227 * 228 * @return the virtual hosts 229 * @throws SystemException if a system exception occurred 230 */ 231 public java.util.List<com.liferay.portal.model.VirtualHost> findAll() 232 throws com.liferay.portal.kernel.exception.SystemException; 233 234 /** 235 * Returns a range of all the virtual hosts. 236 * 237 * <p> 238 * 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.VirtualHostModelImpl}. 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. 239 * </p> 240 * 241 * @param start the lower bound of the range of virtual hosts 242 * @param end the upper bound of the range of virtual hosts (not inclusive) 243 * @return the range of virtual hosts 244 * @throws SystemException if a system exception occurred 245 */ 246 public java.util.List<com.liferay.portal.model.VirtualHost> findAll( 247 int start, int end) 248 throws com.liferay.portal.kernel.exception.SystemException; 249 250 /** 251 * Returns an ordered range of all the virtual hosts. 252 * 253 * <p> 254 * 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.VirtualHostModelImpl}. 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. 255 * </p> 256 * 257 * @param start the lower bound of the range of virtual hosts 258 * @param end the upper bound of the range of virtual hosts (not inclusive) 259 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 260 * @return the ordered range of virtual hosts 261 * @throws SystemException if a system exception occurred 262 */ 263 public java.util.List<com.liferay.portal.model.VirtualHost> findAll( 264 int start, int end, 265 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 266 throws com.liferay.portal.kernel.exception.SystemException; 267 268 /** 269 * Removes all the virtual hosts from the database. 270 * 271 * @throws SystemException if a system exception occurred 272 */ 273 public void removeAll() 274 throws com.liferay.portal.kernel.exception.SystemException; 275 276 /** 277 * Returns the number of virtual hosts. 278 * 279 * @return the number of virtual hosts 280 * @throws SystemException if a system exception occurred 281 */ 282 public int countAll() 283 throws com.liferay.portal.kernel.exception.SystemException; 284 }