001    /**
002     * Copyright (c) 2000-2010 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.model.Account;
018    
019    /**
020     * The persistence interface for the account service.
021     *
022     * <p>
023     * Never modify or reference this interface directly. Always use {@link AccountUtil} to access the account persistence. Modify <code>service.xml</code> and rerun ServiceBuilder to regenerate this interface.
024     * </p>
025     *
026     * <p>
027     * Caching information and settings can be found in <code>portal.properties</code>
028     * </p>
029     *
030     * @author Brian Wing Shun Chan
031     * @see AccountPersistenceImpl
032     * @see AccountUtil
033     * @generated
034     */
035    public interface AccountPersistence extends BasePersistence<Account> {
036            /**
037            * Caches the account in the entity cache if it is enabled.
038            *
039            * @param account the account to cache
040            */
041            public void cacheResult(com.liferay.portal.model.Account account);
042    
043            /**
044            * Caches the accounts in the entity cache if it is enabled.
045            *
046            * @param accounts the accounts to cache
047            */
048            public void cacheResult(
049                    java.util.List<com.liferay.portal.model.Account> accounts);
050    
051            /**
052            * Creates a new account with the primary key. Does not add the account to the database.
053            *
054            * @param accountId the primary key for the new account
055            * @return the new account
056            */
057            public com.liferay.portal.model.Account create(long accountId);
058    
059            /**
060            * Removes the account with the primary key from the database. Also notifies the appropriate model listeners.
061            *
062            * @param accountId the primary key of the account to remove
063            * @return the account that was removed
064            * @throws com.liferay.portal.NoSuchAccountException if a account with the primary key could not be found
065            * @throws SystemException if a system exception occurred
066            */
067            public com.liferay.portal.model.Account remove(long accountId)
068                    throws com.liferay.portal.NoSuchAccountException,
069                            com.liferay.portal.kernel.exception.SystemException;
070    
071            public com.liferay.portal.model.Account updateImpl(
072                    com.liferay.portal.model.Account account, boolean merge)
073                    throws com.liferay.portal.kernel.exception.SystemException;
074    
075            /**
076            * Finds the account with the primary key or throws a {@link com.liferay.portal.NoSuchAccountException} if it could not be found.
077            *
078            * @param accountId the primary key of the account to find
079            * @return the account
080            * @throws com.liferay.portal.NoSuchAccountException if a account with the primary key could not be found
081            * @throws SystemException if a system exception occurred
082            */
083            public com.liferay.portal.model.Account findByPrimaryKey(long accountId)
084                    throws com.liferay.portal.NoSuchAccountException,
085                            com.liferay.portal.kernel.exception.SystemException;
086    
087            /**
088            * Finds the account with the primary key or returns <code>null</code> if it could not be found.
089            *
090            * @param accountId the primary key of the account to find
091            * @return the account, or <code>null</code> if a account with the primary key could not be found
092            * @throws SystemException if a system exception occurred
093            */
094            public com.liferay.portal.model.Account fetchByPrimaryKey(long accountId)
095                    throws com.liferay.portal.kernel.exception.SystemException;
096    
097            /**
098            * Finds all the accounts.
099            *
100            * @return the accounts
101            * @throws SystemException if a system exception occurred
102            */
103            public java.util.List<com.liferay.portal.model.Account> findAll()
104                    throws com.liferay.portal.kernel.exception.SystemException;
105    
106            /**
107            * Finds a range of all the accounts.
108            *
109            * <p>
110            * 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.
111            * </p>
112            *
113            * @param start the lower bound of the range of accounts to return
114            * @param end the upper bound of the range of accounts to return (not inclusive)
115            * @return the range of accounts
116            * @throws SystemException if a system exception occurred
117            */
118            public java.util.List<com.liferay.portal.model.Account> findAll(int start,
119                    int end) throws com.liferay.portal.kernel.exception.SystemException;
120    
121            /**
122            * Finds an ordered range of all the accounts.
123            *
124            * <p>
125            * 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.
126            * </p>
127            *
128            * @param start the lower bound of the range of accounts to return
129            * @param end the upper bound of the range of accounts to return (not inclusive)
130            * @param orderByComparator the comparator to order the results by
131            * @return the ordered range of accounts
132            * @throws SystemException if a system exception occurred
133            */
134            public java.util.List<com.liferay.portal.model.Account> findAll(int start,
135                    int end,
136                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
137                    throws com.liferay.portal.kernel.exception.SystemException;
138    
139            /**
140            * Removes all the accounts from the database.
141            *
142            * @throws SystemException if a system exception occurred
143            */
144            public void removeAll()
145                    throws com.liferay.portal.kernel.exception.SystemException;
146    
147            /**
148            * Counts all the accounts.
149            *
150            * @return the number of accounts
151            * @throws SystemException if a system exception occurred
152            */
153            public int countAll()
154                    throws com.liferay.portal.kernel.exception.SystemException;
155    }