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