@ProviderType public interface ContactPersistence extends BasePersistence<Contact>
Caching information and settings can be found in portal.properties
ContactPersistenceImpl
,
ContactUtil
Modifier and Type | Method and Description |
---|---|
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 |
countByAccountId(long accountId)
Returns the number of contacts where accountId = ?.
|
int |
countByC_C(long classNameId,
long classPK)
Returns the number of contacts where classNameId = ? and classPK = ?.
|
int |
countByCompanyId(long companyId)
Returns the number of contacts where companyId = ?.
|
Contact |
create(long contactId)
Creates a new contact with the primary key.
|
Contact |
fetchByAccountId_First(long accountId,
OrderByComparator<Contact> orderByComparator)
Returns the first contact in the ordered set where accountId = ?.
|
Contact |
fetchByAccountId_Last(long accountId,
OrderByComparator<Contact> orderByComparator)
Returns the last contact in the ordered set where accountId = ?.
|
Contact |
fetchByC_C_First(long classNameId,
long classPK,
OrderByComparator<Contact> orderByComparator)
Returns the first contact in the ordered set where classNameId = ? and classPK = ?.
|
Contact |
fetchByC_C_Last(long classNameId,
long classPK,
OrderByComparator<Contact> orderByComparator)
Returns the last contact in the ordered set where classNameId = ? and classPK = ?.
|
Contact |
fetchByCompanyId_First(long companyId,
OrderByComparator<Contact> orderByComparator)
Returns the first contact in the ordered set where companyId = ?.
|
Contact |
fetchByCompanyId_Last(long companyId,
OrderByComparator<Contact> orderByComparator)
Returns the last contact in the ordered set where companyId = ?.
|
Contact |
fetchByPrimaryKey(long contactId)
Returns the contact with the primary key or returns
null if it could not be found. |
Map<Serializable,Contact> |
fetchByPrimaryKeys(Set<Serializable> primaryKeys) |
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<Contact> orderByComparator)
Returns an ordered range of all the contacts.
|
List<Contact> |
findAll(int start,
int end,
OrderByComparator<Contact> orderByComparator,
boolean retrieveFromCache)
Returns an ordered range of all the contacts.
|
Contact |
findByAccountId_First(long accountId,
OrderByComparator<Contact> orderByComparator)
Returns the first contact in the ordered set where accountId = ?.
|
Contact |
findByAccountId_Last(long accountId,
OrderByComparator<Contact> orderByComparator)
Returns the last contact in the ordered set where accountId = ?.
|
Contact[] |
findByAccountId_PrevAndNext(long contactId,
long accountId,
OrderByComparator<Contact> orderByComparator)
Returns the contacts before and after the current contact in the ordered set where accountId = ?.
|
List<Contact> |
findByAccountId(long accountId)
Returns all the contacts where accountId = ?.
|
List<Contact> |
findByAccountId(long accountId,
int start,
int end)
Returns a range of all the contacts where accountId = ?.
|
List<Contact> |
findByAccountId(long accountId,
int start,
int end,
OrderByComparator<Contact> orderByComparator)
Returns an ordered range of all the contacts where accountId = ?.
|
List<Contact> |
findByAccountId(long accountId,
int start,
int end,
OrderByComparator<Contact> orderByComparator,
boolean retrieveFromCache)
Returns an ordered range of all the contacts where accountId = ?.
|
Contact |
findByC_C_First(long classNameId,
long classPK,
OrderByComparator<Contact> orderByComparator)
Returns the first contact in the ordered set where classNameId = ? and classPK = ?.
|
Contact |
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 = ?.
|
List<Contact> |
findByC_C(long classNameId,
long classPK)
Returns all the contacts where classNameId = ? and classPK = ?.
|
List<Contact> |
findByC_C(long classNameId,
long classPK,
int start,
int end)
Returns a range of all the contacts where classNameId = ? and classPK = ?.
|
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 = ?.
|
List<Contact> |
findByC_C(long classNameId,
long classPK,
int start,
int end,
OrderByComparator<Contact> orderByComparator,
boolean retrieveFromCache)
Returns an ordered range of all the contacts where classNameId = ? and classPK = ?.
|
Contact |
findByCompanyId_First(long companyId,
OrderByComparator<Contact> orderByComparator)
Returns the first contact in the ordered set where companyId = ?.
|
Contact |
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 = ?.
|
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<Contact> orderByComparator)
Returns an ordered range of all the contacts where companyId = ?.
|
List<Contact> |
findByCompanyId(long companyId,
int start,
int end,
OrderByComparator<Contact> orderByComparator,
boolean retrieveFromCache)
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(long contactId)
Removes the contact with the primary key from the database.
|
void |
removeAll()
Removes all the contacts from the database.
|
void |
removeByAccountId(long accountId)
Removes all the contacts where accountId = ? from the database.
|
void |
removeByC_C(long classNameId,
long classPK)
Removes all the contacts where classNameId = ? and classPK = ? from the database.
|
void |
removeByCompanyId(long companyId)
Removes all the contacts where companyId = ? from the database.
|
Contact |
updateImpl(Contact contact) |
clearCache, clearCache, clearCache, closeSession, countWithDynamicQuery, countWithDynamicQuery, fetchByPrimaryKey, findByPrimaryKey, findWithDynamicQuery, findWithDynamicQuery, findWithDynamicQuery, flush, getBadColumnNames, getCurrentSession, getDataSource, getListeners, getModelClass, openSession, processException, registerListener, remove, remove, setDataSource, unregisterListener, update, update
List<Contact> findByCompanyId(long companyId)
companyId
- the company IDList<Contact> findByCompanyId(long companyId, int start, int end)
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. If orderByComparator
is specified, then the query will include the given ORDER BY logic. If orderByComparator
is absent and pagination is required (start
and end
are not QueryUtil#ALL_POS
), then the query will include the default ORDER BY logic from ContactModelImpl
. If both orderByComparator
and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
companyId
- the company IDstart
- the lower bound of the range of contactsend
- the upper bound of the range of contacts (not inclusive)List<Contact> findByCompanyId(long companyId, int start, int end, OrderByComparator<Contact> orderByComparator)
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. If orderByComparator
is specified, then the query will include the given ORDER BY logic. If orderByComparator
is absent and pagination is required (start
and end
are not QueryUtil#ALL_POS
), then the query will include the default ORDER BY logic from ContactModelImpl
. If both orderByComparator
and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
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
)List<Contact> findByCompanyId(long companyId, int start, int end, OrderByComparator<Contact> orderByComparator, boolean retrieveFromCache)
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. If orderByComparator
is specified, then the query will include the given ORDER BY logic. If orderByComparator
is absent and pagination is required (start
and end
are not QueryUtil#ALL_POS
), then the query will include the default ORDER BY logic from ContactModelImpl
. If both orderByComparator
and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
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
)retrieveFromCache
- whether to retrieve from the finder cacheContact findByCompanyId_First(long companyId, OrderByComparator<Contact> orderByComparator) throws NoSuchContactException
companyId
- the company IDorderByComparator
- the comparator to order the set by (optionally null
)NoSuchContactException
- if a matching contact could not be foundContact fetchByCompanyId_First(long companyId, OrderByComparator<Contact> orderByComparator)
companyId
- the company IDorderByComparator
- the comparator to order the set by (optionally null
)null
if a matching contact could not be foundContact findByCompanyId_Last(long companyId, OrderByComparator<Contact> orderByComparator) throws NoSuchContactException
companyId
- the company IDorderByComparator
- the comparator to order the set by (optionally null
)NoSuchContactException
- if a matching contact could not be foundContact fetchByCompanyId_Last(long companyId, OrderByComparator<Contact> orderByComparator)
companyId
- the company IDorderByComparator
- the comparator to order the set by (optionally null
)null
if a matching contact could not be foundContact[] findByCompanyId_PrevAndNext(long contactId, long companyId, OrderByComparator<Contact> orderByComparator) throws NoSuchContactException
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 foundvoid removeByCompanyId(long companyId)
companyId
- the company IDint countByCompanyId(long companyId)
companyId
- the company IDList<Contact> findByAccountId(long accountId)
accountId
- the account IDList<Contact> findByAccountId(long accountId, int start, int end)
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. If orderByComparator
is specified, then the query will include the given ORDER BY logic. If orderByComparator
is absent and pagination is required (start
and end
are not QueryUtil#ALL_POS
), then the query will include the default ORDER BY logic from ContactModelImpl
. If both orderByComparator
and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
accountId
- the account IDstart
- the lower bound of the range of contactsend
- the upper bound of the range of contacts (not inclusive)List<Contact> findByAccountId(long accountId, int start, int end, OrderByComparator<Contact> orderByComparator)
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. If orderByComparator
is specified, then the query will include the given ORDER BY logic. If orderByComparator
is absent and pagination is required (start
and end
are not QueryUtil#ALL_POS
), then the query will include the default ORDER BY logic from ContactModelImpl
. If both orderByComparator
and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
accountId
- the account 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
)List<Contact> findByAccountId(long accountId, int start, int end, OrderByComparator<Contact> orderByComparator, boolean retrieveFromCache)
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. If orderByComparator
is specified, then the query will include the given ORDER BY logic. If orderByComparator
is absent and pagination is required (start
and end
are not QueryUtil#ALL_POS
), then the query will include the default ORDER BY logic from ContactModelImpl
. If both orderByComparator
and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
accountId
- the account 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
)retrieveFromCache
- whether to retrieve from the finder cacheContact findByAccountId_First(long accountId, OrderByComparator<Contact> orderByComparator) throws NoSuchContactException
accountId
- the account IDorderByComparator
- the comparator to order the set by (optionally null
)NoSuchContactException
- if a matching contact could not be foundContact fetchByAccountId_First(long accountId, OrderByComparator<Contact> orderByComparator)
accountId
- the account IDorderByComparator
- the comparator to order the set by (optionally null
)null
if a matching contact could not be foundContact findByAccountId_Last(long accountId, OrderByComparator<Contact> orderByComparator) throws NoSuchContactException
accountId
- the account IDorderByComparator
- the comparator to order the set by (optionally null
)NoSuchContactException
- if a matching contact could not be foundContact fetchByAccountId_Last(long accountId, OrderByComparator<Contact> orderByComparator)
accountId
- the account IDorderByComparator
- the comparator to order the set by (optionally null
)null
if a matching contact could not be foundContact[] findByAccountId_PrevAndNext(long contactId, long accountId, OrderByComparator<Contact> orderByComparator) throws NoSuchContactException
contactId
- the primary key of the current contactaccountId
- the account IDorderByComparator
- the comparator to order the set by (optionally null
)NoSuchContactException
- if a contact with the primary key could not be foundvoid removeByAccountId(long accountId)
accountId
- the account IDint countByAccountId(long accountId)
accountId
- the account IDList<Contact> findByC_C(long classNameId, long classPK)
classNameId
- the class name IDclassPK
- the class pkList<Contact> findByC_C(long classNameId, long classPK, int start, int end)
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. If orderByComparator
is specified, then the query will include the given ORDER BY logic. If orderByComparator
is absent and pagination is required (start
and end
are not QueryUtil#ALL_POS
), then the query will include the default ORDER BY logic from ContactModelImpl
. If both orderByComparator
and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
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)List<Contact> findByC_C(long classNameId, long classPK, int start, int end, OrderByComparator<Contact> orderByComparator)
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. If orderByComparator
is specified, then the query will include the given ORDER BY logic. If orderByComparator
is absent and pagination is required (start
and end
are not QueryUtil#ALL_POS
), then the query will include the default ORDER BY logic from ContactModelImpl
. If both orderByComparator
and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
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 (optionally null
)List<Contact> findByC_C(long classNameId, long classPK, int start, int end, OrderByComparator<Contact> orderByComparator, boolean retrieveFromCache)
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. If orderByComparator
is specified, then the query will include the given ORDER BY logic. If orderByComparator
is absent and pagination is required (start
and end
are not QueryUtil#ALL_POS
), then the query will include the default ORDER BY logic from ContactModelImpl
. If both orderByComparator
and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
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 (optionally null
)retrieveFromCache
- whether to retrieve from the finder cacheContact findByC_C_First(long classNameId, long classPK, OrderByComparator<Contact> orderByComparator) throws NoSuchContactException
classNameId
- the class name IDclassPK
- the class pkorderByComparator
- the comparator to order the set by (optionally null
)NoSuchContactException
- if a matching contact could not be foundContact fetchByC_C_First(long classNameId, long classPK, OrderByComparator<Contact> orderByComparator)
classNameId
- the class name IDclassPK
- the class pkorderByComparator
- the comparator to order the set by (optionally null
)null
if a matching contact could not be foundContact findByC_C_Last(long classNameId, long classPK, OrderByComparator<Contact> orderByComparator) throws NoSuchContactException
classNameId
- the class name IDclassPK
- the class pkorderByComparator
- the comparator to order the set by (optionally null
)NoSuchContactException
- if a matching contact could not be foundContact fetchByC_C_Last(long classNameId, long classPK, OrderByComparator<Contact> orderByComparator)
classNameId
- the class name IDclassPK
- the class pkorderByComparator
- the comparator to order the set by (optionally null
)null
if a matching contact could not be foundContact[] findByC_C_PrevAndNext(long contactId, long classNameId, long classPK, OrderByComparator<Contact> orderByComparator) throws NoSuchContactException
contactId
- the primary key of the current contactclassNameId
- the class name IDclassPK
- the class pkorderByComparator
- the comparator to order the set by (optionally null
)NoSuchContactException
- if a contact with the primary key could not be foundvoid removeByC_C(long classNameId, long classPK)
classNameId
- the class name IDclassPK
- the class pkint countByC_C(long classNameId, long classPK)
classNameId
- the class name IDclassPK
- the class pkvoid cacheResult(Contact contact)
contact
- the contactvoid cacheResult(List<Contact> contacts)
contacts
- the contactsContact create(long contactId)
contactId
- the primary key for the new contactContact remove(long contactId) throws NoSuchContactException
contactId
- the primary key of the contactNoSuchContactException
- if a contact with the primary key could not be foundContact findByPrimaryKey(long contactId) throws NoSuchContactException
NoSuchContactException
if it could not be found.contactId
- the primary key of the contactNoSuchContactException
- if a contact with the primary key could not be foundContact fetchByPrimaryKey(long contactId)
null
if it could not be found.contactId
- the primary key of the contactnull
if a contact with the primary key could not be foundMap<Serializable,Contact> fetchByPrimaryKeys(Set<Serializable> primaryKeys)
fetchByPrimaryKeys
in interface BasePersistence<Contact>
List<Contact> findAll()
List<Contact> findAll(int start, int end)
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. If orderByComparator
is specified, then the query will include the given ORDER BY logic. If orderByComparator
is absent and pagination is required (start
and end
are not QueryUtil#ALL_POS
), then the query will include the default ORDER BY logic from ContactModelImpl
. If both orderByComparator
and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
start
- the lower bound of the range of contactsend
- the upper bound of the range of contacts (not inclusive)List<Contact> findAll(int start, int end, OrderByComparator<Contact> orderByComparator)
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. If orderByComparator
is specified, then the query will include the given ORDER BY logic. If orderByComparator
is absent and pagination is required (start
and end
are not QueryUtil#ALL_POS
), then the query will include the default ORDER BY logic from ContactModelImpl
. If both orderByComparator
and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
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
)List<Contact> findAll(int start, int end, OrderByComparator<Contact> orderByComparator, boolean retrieveFromCache)
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. If orderByComparator
is specified, then the query will include the given ORDER BY logic. If orderByComparator
is absent and pagination is required (start
and end
are not QueryUtil#ALL_POS
), then the query will include the default ORDER BY logic from ContactModelImpl
. If both orderByComparator
and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
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
)retrieveFromCache
- whether to retrieve from the finder cachevoid removeAll()
int countAll()