Interface ContactPersistence
- All Superinterfaces:
BasePersistence<Contact>
Caching information and settings can be found in portal.properties
- Author:
- Brian Wing Shun Chan
- See Also:
- {$generated.description}
-
Method Summary
Modifier and TypeMethodDescriptionvoid
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
countByC_C
(long classNameId, long classPK) Returns the number of contacts where classNameId = ? and classPK = ?.int
countByC_U
(long companyId, long userId) Returns the number of contacts where companyId = ? and userId = ?.int
countByCompanyId
(long companyId) Returns the number of contacts where companyId = ?.int
countByUserId
(long userId) Returns the number of contacts where userId = ?.create
(long contactId) Creates a new contact with the primary key.fetchByC_C_First
(long classNameId, long classPK, OrderByComparator<Contact> orderByComparator) Returns the first contact in the ordered set where classNameId = ? and classPK = ?.fetchByC_C_Last
(long classNameId, long classPK, OrderByComparator<Contact> orderByComparator) Returns the last contact in the ordered set where classNameId = ? and classPK = ?.fetchByC_U_First
(long companyId, long userId, OrderByComparator<Contact> orderByComparator) Returns the first contact in the ordered set where companyId = ? and userId = ?.fetchByC_U_Last
(long companyId, long userId, OrderByComparator<Contact> orderByComparator) Returns the last contact in the ordered set where companyId = ? and userId = ?.fetchByCompanyId_First
(long companyId, OrderByComparator<Contact> orderByComparator) Returns the first contact in the ordered set where companyId = ?.fetchByCompanyId_Last
(long companyId, OrderByComparator<Contact> orderByComparator) Returns the last contact in the ordered set where companyId = ?.fetchByPrimaryKey
(long contactId) Returns the contact with the primary key or returnsnull
if it could not be found.fetchByUserId_First
(long userId, OrderByComparator<Contact> orderByComparator) Returns the first contact in the ordered set where userId = ?.fetchByUserId_Last
(long userId, OrderByComparator<Contact> orderByComparator) Returns the last contact in the ordered set where userId = ?.findAll()
Returns all the contacts.findAll
(int start, int end) Returns a range of all the contacts.findAll
(int start, int end, OrderByComparator<Contact> orderByComparator) Returns an ordered range of all the contacts.findAll
(int start, int end, OrderByComparator<Contact> orderByComparator, boolean useFinderCache) Returns an ordered range of all the contacts.findByC_C
(long classNameId, long classPK) Returns all the contacts where classNameId = ? and classPK = ?.findByC_C
(long classNameId, long classPK, int start, int end) Returns a range of all the contacts where classNameId = ? and classPK = ?.findByC_C
(long classNameId, long classPK, int start, int end, OrderByComparator<Contact> orderByComparator) Returns an ordered range of all the contacts where classNameId = ? and classPK = ?.findByC_C
(long classNameId, long classPK, int start, int end, OrderByComparator<Contact> orderByComparator, boolean useFinderCache) Returns an ordered range of all the contacts where classNameId = ? and classPK = ?.findByC_C_First
(long classNameId, long classPK, OrderByComparator<Contact> orderByComparator) Returns the first contact in the ordered set where classNameId = ? and classPK = ?.findByC_C_Last
(long classNameId, long classPK, OrderByComparator<Contact> orderByComparator) Returns the last contact in the ordered set where classNameId = ? and classPK = ?.Contact[]
findByC_C_PrevAndNext
(long contactId, long classNameId, long classPK, OrderByComparator<Contact> orderByComparator) Returns the contacts before and after the current contact in the ordered set where classNameId = ? and classPK = ?.findByC_U
(long companyId, long userId) Returns all the contacts where companyId = ? and userId = ?.findByC_U
(long companyId, long userId, int start, int end) Returns a range of all the contacts where companyId = ? and userId = ?.findByC_U
(long companyId, long userId, int start, int end, OrderByComparator<Contact> orderByComparator) Returns an ordered range of all the contacts where companyId = ? and userId = ?.findByC_U
(long companyId, long userId, int start, int end, OrderByComparator<Contact> orderByComparator, boolean useFinderCache) Returns an ordered range of all the contacts where companyId = ? and userId = ?.findByC_U_First
(long companyId, long userId, OrderByComparator<Contact> orderByComparator) Returns the first contact in the ordered set where companyId = ? and userId = ?.findByC_U_Last
(long companyId, long userId, OrderByComparator<Contact> orderByComparator) Returns the last contact in the ordered set where companyId = ? and userId = ?.Contact[]
findByC_U_PrevAndNext
(long contactId, long companyId, long userId, OrderByComparator<Contact> orderByComparator) Returns the contacts before and after the current contact in the ordered set where companyId = ? and userId = ?.findByCompanyId
(long companyId) Returns all the contacts where companyId = ?.findByCompanyId
(long companyId, int start, int end) Returns a range of all the contacts where companyId = ?.findByCompanyId
(long companyId, int start, int end, OrderByComparator<Contact> orderByComparator) Returns an ordered range of all the contacts where companyId = ?.findByCompanyId
(long companyId, int start, int end, OrderByComparator<Contact> orderByComparator, boolean useFinderCache) Returns an ordered range of all the contacts where companyId = ?.findByCompanyId_First
(long companyId, OrderByComparator<Contact> orderByComparator) Returns the first contact in the ordered set where companyId = ?.findByCompanyId_Last
(long companyId, OrderByComparator<Contact> orderByComparator) Returns the last contact in the ordered set where companyId = ?.Contact[]
findByCompanyId_PrevAndNext
(long contactId, long companyId, OrderByComparator<Contact> orderByComparator) Returns the contacts before and after the current contact in the ordered set where companyId = ?.findByPrimaryKey
(long contactId) Returns the contact with the primary key or throws aNoSuchContactException
if it could not be found.findByUserId
(long userId) Returns all the contacts where userId = ?.findByUserId
(long userId, int start, int end) Returns a range of all the contacts where userId = ?.findByUserId
(long userId, int start, int end, OrderByComparator<Contact> orderByComparator) Returns an ordered range of all the contacts where userId = ?.findByUserId
(long userId, int start, int end, OrderByComparator<Contact> orderByComparator, boolean useFinderCache) Returns an ordered range of all the contacts where userId = ?.findByUserId_First
(long userId, OrderByComparator<Contact> orderByComparator) Returns the first contact in the ordered set where userId = ?.findByUserId_Last
(long userId, OrderByComparator<Contact> orderByComparator) Returns the last contact in the ordered set where userId = ?.Contact[]
findByUserId_PrevAndNext
(long contactId, long userId, OrderByComparator<Contact> orderByComparator) Returns the contacts before and after the current contact in the ordered set where userId = ?.remove
(long contactId) Removes the contact with the primary key from the database.void
Removes all the contacts from the database.void
removeByC_C
(long classNameId, long classPK) Removes all the contacts where classNameId = ? and classPK = ? from the database.void
removeByC_U
(long companyId, long userId) Removes all the contacts where companyId = ? and userId = ? from the database.void
removeByCompanyId
(long companyId) Removes all the contacts where companyId = ? from the database.void
removeByUserId
(long userId) Removes all the contacts where userId = ? from the database.updateImpl
(Contact contact) Methods inherited from interface com.liferay.portal.kernel.service.persistence.BasePersistence
clearCache, clearCache, clearCache, clearCache, closeSession, countWithDynamicQuery, countWithDynamicQuery, dslQuery, dslQueryCount, fetchByPrimaryKey, fetchByPrimaryKeys, findByPrimaryKey, findWithDynamicQuery, findWithDynamicQuery, findWithDynamicQuery, flush, getBadColumnNames, getCurrentSession, getDataSource, getDB, getDialect, getListeners, getModelClass, openSession, processException, registerListener, remove, remove, removeByFunction, setDataSource, unregisterListener, update, update
-
Method Details
-
findByCompanyId
Returns all the contacts where companyId = ?.- Parameters:
companyId
- the company ID- Returns:
- the matching contacts
-
findByCompanyId
Returns a range of all the contacts where companyId = ?.Useful when paginating results. Returns a maximum of
end - start
instances.start
andend
are not primary keys, they are indexes in the result set. Thus,0
refers to the first result in the set. Setting bothstart
andend
toQueryUtil#ALL_POS
will return the full result set. IforderByComparator
is specified, then the query will include the given ORDER BY logic. IforderByComparator
is absent, then the query will include the default ORDER BY logic fromContactModelImpl
.- Parameters:
companyId
- the company IDstart
- the lower bound of the range of contactsend
- the upper bound of the range of contacts (not inclusive)- Returns:
- the range of matching contacts
-
findByCompanyId
List<Contact> findByCompanyId(long companyId, int start, int end, OrderByComparator<Contact> orderByComparator) Returns an ordered range of all the contacts where companyId = ?.Useful when paginating results. Returns a maximum of
end - start
instances.start
andend
are not primary keys, they are indexes in the result set. Thus,0
refers to the first result in the set. Setting bothstart
andend
toQueryUtil#ALL_POS
will return the full result set. IforderByComparator
is specified, then the query will include the given ORDER BY logic. IforderByComparator
is absent, then the query will include the default ORDER BY logic fromContactModelImpl
.- Parameters:
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 (optionallynull
)- Returns:
- the ordered range of matching contacts
-
findByCompanyId
List<Contact> findByCompanyId(long companyId, int start, int end, OrderByComparator<Contact> orderByComparator, boolean useFinderCache) Returns an ordered range of all the contacts where companyId = ?.Useful when paginating results. Returns a maximum of
end - start
instances.start
andend
are not primary keys, they are indexes in the result set. Thus,0
refers to the first result in the set. Setting bothstart
andend
toQueryUtil#ALL_POS
will return the full result set. IforderByComparator
is specified, then the query will include the given ORDER BY logic. IforderByComparator
is absent, then the query will include the default ORDER BY logic fromContactModelImpl
.- Parameters:
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 (optionallynull
)useFinderCache
- whether to use the finder cache- Returns:
- the ordered range of matching contacts
-
findByCompanyId_First
Contact findByCompanyId_First(long companyId, OrderByComparator<Contact> orderByComparator) throws NoSuchContactException Returns the first contact in the ordered set where companyId = ?.- Parameters:
companyId
- the company IDorderByComparator
- the comparator to order the set by (optionallynull
)- Returns:
- the first matching contact
- Throws:
NoSuchContactException
- if a matching contact could not be found
-
fetchByCompanyId_First
Returns the first contact in the ordered set where companyId = ?.- Parameters:
companyId
- the company IDorderByComparator
- the comparator to order the set by (optionallynull
)- Returns:
- the first matching contact, or
null
if a matching contact could not be found
-
findByCompanyId_Last
Contact findByCompanyId_Last(long companyId, OrderByComparator<Contact> orderByComparator) throws NoSuchContactException Returns the last contact in the ordered set where companyId = ?.- Parameters:
companyId
- the company IDorderByComparator
- the comparator to order the set by (optionallynull
)- Returns:
- the last matching contact
- Throws:
NoSuchContactException
- if a matching contact could not be found
-
fetchByCompanyId_Last
Returns the last contact in the ordered set where companyId = ?.- Parameters:
companyId
- the company IDorderByComparator
- the comparator to order the set by (optionallynull
)- Returns:
- the last matching contact, or
null
if a matching contact could not be found
-
findByCompanyId_PrevAndNext
Contact[] findByCompanyId_PrevAndNext(long contactId, long companyId, OrderByComparator<Contact> orderByComparator) throws NoSuchContactException Returns the contacts before and after the current contact in the ordered set where companyId = ?.- Parameters:
contactId
- the primary key of the current contactcompanyId
- the company IDorderByComparator
- the comparator to order the set by (optionallynull
)- Returns:
- the previous, current, and next contact
- Throws:
NoSuchContactException
- if a contact with the primary key could not be found
-
removeByCompanyId
void removeByCompanyId(long companyId) Removes all the contacts where companyId = ? from the database.- Parameters:
companyId
- the company ID
-
countByCompanyId
int countByCompanyId(long companyId) Returns the number of contacts where companyId = ?.- Parameters:
companyId
- the company ID- Returns:
- the number of matching contacts
-
findByUserId
Returns all the contacts where userId = ?.- Parameters:
userId
- the user ID- Returns:
- the matching contacts
-
findByUserId
Returns a range of all the contacts where userId = ?.Useful when paginating results. Returns a maximum of
end - start
instances.start
andend
are not primary keys, they are indexes in the result set. Thus,0
refers to the first result in the set. Setting bothstart
andend
toQueryUtil#ALL_POS
will return the full result set. IforderByComparator
is specified, then the query will include the given ORDER BY logic. IforderByComparator
is absent, then the query will include the default ORDER BY logic fromContactModelImpl
.- Parameters:
userId
- the user IDstart
- the lower bound of the range of contactsend
- the upper bound of the range of contacts (not inclusive)- Returns:
- the range of matching contacts
-
findByUserId
List<Contact> findByUserId(long userId, int start, int end, OrderByComparator<Contact> orderByComparator) Returns an ordered range of all the contacts where userId = ?.Useful when paginating results. Returns a maximum of
end - start
instances.start
andend
are not primary keys, they are indexes in the result set. Thus,0
refers to the first result in the set. Setting bothstart
andend
toQueryUtil#ALL_POS
will return the full result set. IforderByComparator
is specified, then the query will include the given ORDER BY logic. IforderByComparator
is absent, then the query will include the default ORDER BY logic fromContactModelImpl
.- Parameters:
userId
- the user 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 (optionallynull
)- Returns:
- the ordered range of matching contacts
-
findByUserId
List<Contact> findByUserId(long userId, int start, int end, OrderByComparator<Contact> orderByComparator, boolean useFinderCache) Returns an ordered range of all the contacts where userId = ?.Useful when paginating results. Returns a maximum of
end - start
instances.start
andend
are not primary keys, they are indexes in the result set. Thus,0
refers to the first result in the set. Setting bothstart
andend
toQueryUtil#ALL_POS
will return the full result set. IforderByComparator
is specified, then the query will include the given ORDER BY logic. IforderByComparator
is absent, then the query will include the default ORDER BY logic fromContactModelImpl
.- Parameters:
userId
- the user 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 (optionallynull
)useFinderCache
- whether to use the finder cache- Returns:
- the ordered range of matching contacts
-
findByUserId_First
Contact findByUserId_First(long userId, OrderByComparator<Contact> orderByComparator) throws NoSuchContactException Returns the first contact in the ordered set where userId = ?.- Parameters:
userId
- the user IDorderByComparator
- the comparator to order the set by (optionallynull
)- Returns:
- the first matching contact
- Throws:
NoSuchContactException
- if a matching contact could not be found
-
fetchByUserId_First
Returns the first contact in the ordered set where userId = ?.- Parameters:
userId
- the user IDorderByComparator
- the comparator to order the set by (optionallynull
)- Returns:
- the first matching contact, or
null
if a matching contact could not be found
-
findByUserId_Last
Contact findByUserId_Last(long userId, OrderByComparator<Contact> orderByComparator) throws NoSuchContactException Returns the last contact in the ordered set where userId = ?.- Parameters:
userId
- the user IDorderByComparator
- the comparator to order the set by (optionallynull
)- Returns:
- the last matching contact
- Throws:
NoSuchContactException
- if a matching contact could not be found
-
fetchByUserId_Last
Returns the last contact in the ordered set where userId = ?.- Parameters:
userId
- the user IDorderByComparator
- the comparator to order the set by (optionallynull
)- Returns:
- the last matching contact, or
null
if a matching contact could not be found
-
findByUserId_PrevAndNext
Contact[] findByUserId_PrevAndNext(long contactId, long userId, OrderByComparator<Contact> orderByComparator) throws NoSuchContactException Returns the contacts before and after the current contact in the ordered set where userId = ?.- Parameters:
contactId
- the primary key of the current contactuserId
- the user IDorderByComparator
- the comparator to order the set by (optionallynull
)- Returns:
- the previous, current, and next contact
- Throws:
NoSuchContactException
- if a contact with the primary key could not be found
-
removeByUserId
void removeByUserId(long userId) Removes all the contacts where userId = ? from the database.- Parameters:
userId
- the user ID
-
countByUserId
int countByUserId(long userId) Returns the number of contacts where userId = ?.- Parameters:
userId
- the user ID- Returns:
- the number of matching contacts
-
findByC_U
Returns all the contacts where companyId = ? and userId = ?.- Parameters:
companyId
- the company IDuserId
- the user ID- Returns:
- the matching contacts
-
findByC_U
Returns a range of all the contacts where companyId = ? and userId = ?.Useful when paginating results. Returns a maximum of
end - start
instances.start
andend
are not primary keys, they are indexes in the result set. Thus,0
refers to the first result in the set. Setting bothstart
andend
toQueryUtil#ALL_POS
will return the full result set. IforderByComparator
is specified, then the query will include the given ORDER BY logic. IforderByComparator
is absent, then the query will include the default ORDER BY logic fromContactModelImpl
.- Parameters:
companyId
- the company IDuserId
- the user IDstart
- the lower bound of the range of contactsend
- the upper bound of the range of contacts (not inclusive)- Returns:
- the range of matching contacts
-
findByC_U
List<Contact> findByC_U(long companyId, long userId, int start, int end, OrderByComparator<Contact> orderByComparator) Returns an ordered range of all the contacts where companyId = ? and userId = ?.Useful when paginating results. Returns a maximum of
end - start
instances.start
andend
are not primary keys, they are indexes in the result set. Thus,0
refers to the first result in the set. Setting bothstart
andend
toQueryUtil#ALL_POS
will return the full result set. IforderByComparator
is specified, then the query will include the given ORDER BY logic. IforderByComparator
is absent, then the query will include the default ORDER BY logic fromContactModelImpl
.- Parameters:
companyId
- the company IDuserId
- the user 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 (optionallynull
)- Returns:
- the ordered range of matching contacts
-
findByC_U
List<Contact> findByC_U(long companyId, long userId, int start, int end, OrderByComparator<Contact> orderByComparator, boolean useFinderCache) Returns an ordered range of all the contacts where companyId = ? and userId = ?.Useful when paginating results. Returns a maximum of
end - start
instances.start
andend
are not primary keys, they are indexes in the result set. Thus,0
refers to the first result in the set. Setting bothstart
andend
toQueryUtil#ALL_POS
will return the full result set. IforderByComparator
is specified, then the query will include the given ORDER BY logic. IforderByComparator
is absent, then the query will include the default ORDER BY logic fromContactModelImpl
.- Parameters:
companyId
- the company IDuserId
- the user 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 (optionallynull
)useFinderCache
- whether to use the finder cache- Returns:
- the ordered range of matching contacts
-
findByC_U_First
Contact findByC_U_First(long companyId, long userId, OrderByComparator<Contact> orderByComparator) throws NoSuchContactException Returns the first contact in the ordered set where companyId = ? and userId = ?.- Parameters:
companyId
- the company IDuserId
- the user IDorderByComparator
- the comparator to order the set by (optionallynull
)- Returns:
- the first matching contact
- Throws:
NoSuchContactException
- if a matching contact could not be found
-
fetchByC_U_First
Returns the first contact in the ordered set where companyId = ? and userId = ?.- Parameters:
companyId
- the company IDuserId
- the user IDorderByComparator
- the comparator to order the set by (optionallynull
)- Returns:
- the first matching contact, or
null
if a matching contact could not be found
-
findByC_U_Last
Contact findByC_U_Last(long companyId, long userId, OrderByComparator<Contact> orderByComparator) throws NoSuchContactException Returns the last contact in the ordered set where companyId = ? and userId = ?.- Parameters:
companyId
- the company IDuserId
- the user IDorderByComparator
- the comparator to order the set by (optionallynull
)- Returns:
- the last matching contact
- Throws:
NoSuchContactException
- if a matching contact could not be found
-
fetchByC_U_Last
Returns the last contact in the ordered set where companyId = ? and userId = ?.- Parameters:
companyId
- the company IDuserId
- the user IDorderByComparator
- the comparator to order the set by (optionallynull
)- Returns:
- the last matching contact, or
null
if a matching contact could not be found
-
findByC_U_PrevAndNext
Contact[] findByC_U_PrevAndNext(long contactId, long companyId, long userId, OrderByComparator<Contact> orderByComparator) throws NoSuchContactException Returns the contacts before and after the current contact in the ordered set where companyId = ? and userId = ?.- Parameters:
contactId
- the primary key of the current contactcompanyId
- the company IDuserId
- the user IDorderByComparator
- the comparator to order the set by (optionallynull
)- Returns:
- the previous, current, and next contact
- Throws:
NoSuchContactException
- if a contact with the primary key could not be found
-
removeByC_U
void removeByC_U(long companyId, long userId) Removes all the contacts where companyId = ? and userId = ? from the database.- Parameters:
companyId
- the company IDuserId
- the user ID
-
countByC_U
int countByC_U(long companyId, long userId) Returns the number of contacts where companyId = ? and userId = ?.- Parameters:
companyId
- the company IDuserId
- the user ID- Returns:
- the number of matching contacts
-
findByC_C
Returns all the contacts where classNameId = ? and classPK = ?.- Parameters:
classNameId
- the class name IDclassPK
- the class pk- Returns:
- the matching contacts
-
findByC_C
Returns a range of all the contacts where classNameId = ? and classPK = ?.Useful when paginating results. Returns a maximum of
end - start
instances.start
andend
are not primary keys, they are indexes in the result set. Thus,0
refers to the first result in the set. Setting bothstart
andend
toQueryUtil#ALL_POS
will return the full result set. IforderByComparator
is specified, then the query will include the given ORDER BY logic. IforderByComparator
is absent, then the query will include the default ORDER BY logic fromContactModelImpl
.- Parameters:
classNameId
- the class name IDclassPK
- the class pkstart
- the lower bound of the range of contactsend
- the upper bound of the range of contacts (not inclusive)- Returns:
- the range of matching contacts
-
findByC_C
List<Contact> findByC_C(long classNameId, long classPK, int start, int end, OrderByComparator<Contact> orderByComparator) Returns an ordered range of all the contacts where classNameId = ? and classPK = ?.Useful when paginating results. Returns a maximum of
end - start
instances.start
andend
are not primary keys, they are indexes in the result set. Thus,0
refers to the first result in the set. Setting bothstart
andend
toQueryUtil#ALL_POS
will return the full result set. IforderByComparator
is specified, then the query will include the given ORDER BY logic. IforderByComparator
is absent, then the query will include the default ORDER BY logic fromContactModelImpl
.- Parameters:
classNameId
- the class name IDclassPK
- the class pkstart
- 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 (optionallynull
)- Returns:
- the ordered range of matching contacts
-
findByC_C
List<Contact> findByC_C(long classNameId, long classPK, int start, int end, OrderByComparator<Contact> orderByComparator, boolean useFinderCache) Returns an ordered range of all the contacts where classNameId = ? and classPK = ?.Useful when paginating results. Returns a maximum of
end - start
instances.start
andend
are not primary keys, they are indexes in the result set. Thus,0
refers to the first result in the set. Setting bothstart
andend
toQueryUtil#ALL_POS
will return the full result set. IforderByComparator
is specified, then the query will include the given ORDER BY logic. IforderByComparator
is absent, then the query will include the default ORDER BY logic fromContactModelImpl
.- Parameters:
classNameId
- the class name IDclassPK
- the class pkstart
- 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 (optionallynull
)useFinderCache
- whether to use the finder cache- Returns:
- the ordered range of matching contacts
-
findByC_C_First
Contact findByC_C_First(long classNameId, long classPK, OrderByComparator<Contact> orderByComparator) throws NoSuchContactException Returns the first contact in the ordered set where classNameId = ? and classPK = ?.- Parameters:
classNameId
- the class name IDclassPK
- the class pkorderByComparator
- the comparator to order the set by (optionallynull
)- Returns:
- the first matching contact
- Throws:
NoSuchContactException
- if a matching contact could not be found
-
fetchByC_C_First
Contact fetchByC_C_First(long classNameId, long classPK, OrderByComparator<Contact> orderByComparator) Returns the first contact in the ordered set where classNameId = ? and classPK = ?.- Parameters:
classNameId
- the class name IDclassPK
- the class pkorderByComparator
- the comparator to order the set by (optionallynull
)- Returns:
- the first matching contact, or
null
if a matching contact could not be found
-
findByC_C_Last
Contact findByC_C_Last(long classNameId, long classPK, OrderByComparator<Contact> orderByComparator) throws NoSuchContactException Returns the last contact in the ordered set where classNameId = ? and classPK = ?.- Parameters:
classNameId
- the class name IDclassPK
- the class pkorderByComparator
- the comparator to order the set by (optionallynull
)- Returns:
- the last matching contact
- Throws:
NoSuchContactException
- if a matching contact could not be found
-
fetchByC_C_Last
Contact fetchByC_C_Last(long classNameId, long classPK, OrderByComparator<Contact> orderByComparator) Returns the last contact in the ordered set where classNameId = ? and classPK = ?.- Parameters:
classNameId
- the class name IDclassPK
- the class pkorderByComparator
- the comparator to order the set by (optionallynull
)- Returns:
- the last matching contact, or
null
if a matching contact could not be found
-
findByC_C_PrevAndNext
Contact[] findByC_C_PrevAndNext(long contactId, long classNameId, long classPK, OrderByComparator<Contact> orderByComparator) throws NoSuchContactException Returns the contacts before and after the current contact in the ordered set where classNameId = ? and classPK = ?.- Parameters:
contactId
- the primary key of the current contactclassNameId
- the class name IDclassPK
- the class pkorderByComparator
- the comparator to order the set by (optionallynull
)- Returns:
- the previous, current, and next contact
- Throws:
NoSuchContactException
- if a contact with the primary key could not be found
-
removeByC_C
void removeByC_C(long classNameId, long classPK) Removes all the contacts where classNameId = ? and classPK = ? from the database.- Parameters:
classNameId
- the class name IDclassPK
- the class pk
-
countByC_C
int countByC_C(long classNameId, long classPK) Returns the number of contacts where classNameId = ? and classPK = ?.- Parameters:
classNameId
- the class name IDclassPK
- the class pk- Returns:
- the number of matching contacts
-
cacheResult
Caches the contact in the entity cache if it is enabled.- Parameters:
contact
- the contact
-
cacheResult
Caches the contacts in the entity cache if it is enabled.- Parameters:
contacts
- the contacts
-
create
Creates a new contact with the primary key. Does not add the contact to the database.- Parameters:
contactId
- the primary key for the new contact- Returns:
- the new contact
-
remove
Removes the contact with the primary key from the database. Also notifies the appropriate model listeners.- Parameters:
contactId
- the primary key of the contact- Returns:
- the contact that was removed
- Throws:
NoSuchContactException
- if a contact with the primary key could not be found
-
updateImpl
-
findByPrimaryKey
Returns the contact with the primary key or throws aNoSuchContactException
if it could not be found.- Parameters:
contactId
- the primary key of the contact- Returns:
- the contact
- Throws:
NoSuchContactException
- if a contact with the primary key could not be found
-
fetchByPrimaryKey
Returns the contact with the primary key or returnsnull
if it could not be found.- Parameters:
contactId
- the primary key of the contact- Returns:
- the contact, or
null
if a contact with the primary key could not be found
-
findAll
Returns all the contacts.- Returns:
- the contacts
-
findAll
Returns a range of all the contacts.Useful when paginating results. Returns a maximum of
end - start
instances.start
andend
are not primary keys, they are indexes in the result set. Thus,0
refers to the first result in the set. Setting bothstart
andend
toQueryUtil#ALL_POS
will return the full result set. IforderByComparator
is specified, then the query will include the given ORDER BY logic. IforderByComparator
is absent, then the query will include the default ORDER BY logic fromContactModelImpl
.- Parameters:
start
- the lower bound of the range of contactsend
- the upper bound of the range of contacts (not inclusive)- Returns:
- the range of contacts
-
findAll
Returns an ordered range of all the contacts.Useful when paginating results. Returns a maximum of
end - start
instances.start
andend
are not primary keys, they are indexes in the result set. Thus,0
refers to the first result in the set. Setting bothstart
andend
toQueryUtil#ALL_POS
will return the full result set. IforderByComparator
is specified, then the query will include the given ORDER BY logic. IforderByComparator
is absent, then the query will include the default ORDER BY logic fromContactModelImpl
.- Parameters:
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 (optionallynull
)- Returns:
- the ordered range of contacts
-
findAll
List<Contact> findAll(int start, int end, OrderByComparator<Contact> orderByComparator, boolean useFinderCache) Returns an ordered range of all the contacts.Useful when paginating results. Returns a maximum of
end - start
instances.start
andend
are not primary keys, they are indexes in the result set. Thus,0
refers to the first result in the set. Setting bothstart
andend
toQueryUtil#ALL_POS
will return the full result set. IforderByComparator
is specified, then the query will include the given ORDER BY logic. IforderByComparator
is absent, then the query will include the default ORDER BY logic fromContactModelImpl
.- Parameters:
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 (optionallynull
)useFinderCache
- whether to use the finder cache- Returns:
- the ordered range of contacts
-
removeAll
void removeAll()Removes all the contacts from the database. -
countAll
int countAll()Returns the number of contacts.- Returns:
- the number of contacts
-