|
Liferay 6.1.0-ce-b4 | |||||||||
| 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.
Caching information and settings can be found in portal.properties
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()
Returns the number of contacts. |
int |
countByCompanyId(long companyId)
Returns the number of contacts where companyId = ?. |
Contact |
create(long contactId)
Creates a new contact with the primary key. |
Contact |
fetchByPrimaryKey(long contactId)
Returns the contact with the primary key or returns null if it could not be found. |
List<Contact> |
findAll()
Returns all the contacts. |
List<Contact> |
findAll(int start,
int end)
Returns a range of all the contacts. |
List<Contact> |
findAll(int start,
int end,
OrderByComparator orderByComparator)
Returns an ordered range of all the contacts. |
Contact |
findByCompanyId_First(long companyId,
OrderByComparator orderByComparator)
Returns the first contact in the ordered set where companyId = ?. |
Contact |
findByCompanyId_Last(long companyId,
OrderByComparator orderByComparator)
Returns the last contact in the ordered set where companyId = ?. |
Contact[] |
findByCompanyId_PrevAndNext(long contactId,
long companyId,
OrderByComparator orderByComparator)
Returns the contacts before and after the current contact in the ordered set where companyId = ?. |
List<Contact> |
findByCompanyId(long companyId)
Returns all the contacts where companyId = ?. |
List<Contact> |
findByCompanyId(long companyId,
int start,
int end)
Returns a range of all the contacts where companyId = ?. |
List<Contact> |
findByCompanyId(long companyId,
int start,
int end,
OrderByComparator orderByComparator)
Returns an ordered range of all the contacts where companyId = ?. |
Contact |
findByPrimaryKey(long contactId)
Returns the contact with the primary key or throws a NoSuchContactException if it could not be found. |
Contact |
remove(Contact contact)
Removes the model instance from the database. |
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, closeSession, countWithDynamicQuery, fetchByPrimaryKey, findByPrimaryKey, findWithDynamicQuery, findWithDynamicQuery, findWithDynamicQuery, getDataSource, getListeners, openSession, processException, registerListener, remove, setDataSource, unregisterListener, update, update |
| Method Detail |
|---|
void cacheResult(Contact contact)
contact - the contactvoid cacheResult(List<Contact> contacts)
contacts - the contactsContact 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
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
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
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
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 IDstart - the lower bound of the range of contactsend - the upper bound of the range of contacts (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 IDstart - the lower bound of the range of contactsend - the upper bound of the range of contacts (not inclusive)orderByComparator - the comparator to order the results by (optionally null)
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 IDorderByComparator - the comparator to order the set by (optionally null)
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 IDorderByComparator - the comparator to order the set by (optionally null)
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 IDorderByComparator - the comparator to order the set by (optionally null)
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 contactsend - the upper bound of the range of contacts (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 contactsend - the upper bound of the range of contacts (not inclusive)orderByComparator - the comparator to order the results by (optionally null)
SystemException - if a system exception occurred
void removeByCompanyId(long companyId)
throws SystemException
companyId - the company ID
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
SystemException - if a system exception occurred
int countAll()
throws SystemException
SystemException - if a system exception occurred
Contact remove(Contact contact)
throws SystemException
BasePersistence
remove in interface BasePersistence<Contact>contact - the model instance to remove
SystemException - if a system exception occurred
|
Liferay 6.1.0-ce-b4 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||