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