|
Liferay 6.0.4 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface ContactPersistence
The persistence interface for the contact service.
Never modify this interface directly. Modify service.xml and rerun ServiceBuilder to regnerate this interface.
ContactPersistenceImpl,
ContactUtil| Method Summary | |
|---|---|
void |
cacheResult(Contact contact)
Caches the contact in the entity cache if it is enabled. |
void |
cacheResult(List<Contact> contacts)
Caches the contacts in the entity cache if it is enabled. |
int |
countAll()
Counts all the contacts. |
int |
countByCompanyId(long companyId)
Counts all the contacts where companyId = ?. |
Contact |
create(long contactId)
Creates a new contact with the primary key. |
Contact |
fetchByPrimaryKey(long contactId)
Finds the contact with the primary key or returns null if it could not be found. |
List<Contact> |
findAll()
Finds all the contacts. |
List<Contact> |
findAll(int start,
int end)
Finds a range of all the contacts. |
List<Contact> |
findAll(int start,
int end,
OrderByComparator orderByComparator)
Finds an ordered range of all the contacts. |
Contact |
findByCompanyId_First(long companyId,
OrderByComparator orderByComparator)
Finds the first contact in the ordered set where companyId = ?. |
Contact |
findByCompanyId_Last(long companyId,
OrderByComparator orderByComparator)
Finds the last contact in the ordered set where companyId = ?. |
Contact[] |
findByCompanyId_PrevAndNext(long contactId,
long companyId,
OrderByComparator orderByComparator)
Finds the contacts before and after the current contact in the ordered set where companyId = ?. |
List<Contact> |
findByCompanyId(long companyId)
Finds all the contacts where companyId = ?. |
List<Contact> |
findByCompanyId(long companyId,
int start,
int end)
Finds a range of all the contacts where companyId = ?. |
List<Contact> |
findByCompanyId(long companyId,
int start,
int end,
OrderByComparator orderByComparator)
Finds an ordered range of all the contacts where companyId = ?. |
Contact |
findByPrimaryKey(long contactId)
Finds the contact with the primary key or throws a NoSuchContactException if it could not be found. |
Contact |
remove(long contactId)
Removes the contact with the primary key from the database. |
void |
removeAll()
Removes all the contacts from the database. |
void |
removeByCompanyId(long companyId)
Removes all the contacts where companyId = ? from the database. |
Contact |
updateImpl(Contact contact,
boolean merge)
|
| Methods inherited from interface com.liferay.portal.service.persistence.BasePersistence |
|---|
clearCache, clearCache, countWithDynamicQuery, fetchByPrimaryKey, findByPrimaryKey, findWithDynamicQuery, findWithDynamicQuery, findWithDynamicQuery, getDataSource, getListeners, registerListener, remove, remove, setDataSource, unregisterListener, update, update |
| Method Detail |
|---|
void cacheResult(Contact contact)
contact - the contact to cachevoid cacheResult(List<Contact> contacts)
contacts - the contacts to cacheContact create(long contactId)
contactId - the primary key for the new contact
Contact remove(long contactId)
throws NoSuchContactException,
SystemException
contactId - the primary key of the contact to remove
NoSuchContactException - if a contact with the primary key could not be found
SystemException - if a system exception occurred
Contact updateImpl(Contact contact,
boolean merge)
throws SystemException
SystemException
Contact findByPrimaryKey(long contactId)
throws NoSuchContactException,
SystemException
NoSuchContactException if it could not be found.
contactId - the primary key of the contact to find
NoSuchContactException - if a contact with the primary key could not be found
SystemException - if a system exception occurred
Contact fetchByPrimaryKey(long contactId)
throws SystemException
null if it could not be found.
contactId - the primary key of the contact to find
null if a contact with the primary key could not be found
SystemException - if a system exception occurred
List<Contact> findByCompanyId(long companyId)
throws SystemException
companyId - the company id to search with
SystemException - if a system exception occurred
List<Contact> findByCompanyId(long companyId,
int start,
int end)
throws SystemException
Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to QueryUtil.ALL_POS will return the full result set.
companyId - the company id to search withstart - the lower bound of the range of contacts to returnend - the upper bound of the range of contacts to return (not inclusive)
SystemException - if a system exception occurred
List<Contact> findByCompanyId(long companyId,
int start,
int end,
OrderByComparator orderByComparator)
throws SystemException
Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to QueryUtil.ALL_POS will return the full result set.
companyId - the company id to search withstart - the lower bound of the range of contacts to returnend - the upper bound of the range of contacts to return (not inclusive)orderByComparator - the comparator to order the results by
SystemException - if a system exception occurred
Contact findByCompanyId_First(long companyId,
OrderByComparator orderByComparator)
throws NoSuchContactException,
SystemException
Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to QueryUtil.ALL_POS will return the full result set.
companyId - the company id to search withorderByComparator - the comparator to order the set by
NoSuchContactException - if a matching contact could not be found
SystemException - if a system exception occurred
Contact findByCompanyId_Last(long companyId,
OrderByComparator orderByComparator)
throws NoSuchContactException,
SystemException
Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to QueryUtil.ALL_POS will return the full result set.
companyId - the company id to search withorderByComparator - the comparator to order the set by
NoSuchContactException - if a matching contact could not be found
SystemException - if a system exception occurred
Contact[] findByCompanyId_PrevAndNext(long contactId,
long companyId,
OrderByComparator orderByComparator)
throws NoSuchContactException,
SystemException
Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to QueryUtil.ALL_POS will return the full result set.
contactId - the primary key of the current contactcompanyId - the company id to search withorderByComparator - the comparator to order the set by
NoSuchContactException - if a contact with the primary key could not be found
SystemException - if a system exception occurred
List<Contact> findAll()
throws SystemException
SystemException - if a system exception occurred
List<Contact> findAll(int start,
int end)
throws SystemException
Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to QueryUtil.ALL_POS will return the full result set.
start - the lower bound of the range of contacts to returnend - the upper bound of the range of contacts to return (not inclusive)
SystemException - if a system exception occurred
List<Contact> findAll(int start,
int end,
OrderByComparator orderByComparator)
throws SystemException
Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to QueryUtil.ALL_POS will return the full result set.
start - the lower bound of the range of contacts to returnend - the upper bound of the range of contacts to return (not inclusive)orderByComparator - the comparator to order the results by
SystemException - if a system exception occurred
void removeByCompanyId(long companyId)
throws SystemException
companyId - the company id to search with
SystemException - if a system exception occurred
void removeAll()
throws SystemException
SystemException - if a system exception occurred
int countByCompanyId(long companyId)
throws SystemException
companyId - the company id to search with
SystemException - if a system exception occurred
int countAll()
throws SystemException
SystemException - if a system exception occurred
|
Liferay 6.0.4 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||