public class ContactUtil
extends Object
com.liferay.portal.service.persistence.impl.ContactPersistenceImpl
and provides direct access to the database for CRUD operations. This utility should only be used by the service layer, as it must operate within a transaction. Never access this utility in a JSP, controller, model, or other front-end class.
Caching information and settings can be found in portal.properties
ContactPersistence
Constructor and Description |
---|
ContactUtil() |
Modifier and Type | Method and Description |
---|---|
static void |
cacheResult(Contact contact)
Caches the contact in the entity cache if it is enabled.
|
static void |
cacheResult(List<Contact> contacts)
Caches the contacts in the entity cache if it is enabled.
|
static void |
clearCache() |
static void |
clearCache(Contact contact) |
static int |
countAll()
Returns the number of contacts.
|
static int |
countByC_C(long classNameId,
long classPK)
Returns the number of contacts where classNameId = ? and classPK = ?.
|
static int |
countByC_U(long companyId,
long userId)
Returns the number of contacts where companyId = ? and userId = ?.
|
static int |
countByCompanyId(long companyId)
Returns the number of contacts where companyId = ?.
|
static int |
countByUserId(long userId)
Returns the number of contacts where userId = ?.
|
static long |
countWithDynamicQuery(DynamicQuery dynamicQuery) |
static Contact |
create(long contactId)
Creates a new contact with the primary key.
|
static Contact |
fetchByC_C_First(long classNameId,
long classPK,
OrderByComparator<Contact> orderByComparator)
Returns the first contact in the ordered set where classNameId = ? and classPK = ?.
|
static Contact |
fetchByC_C_Last(long classNameId,
long classPK,
OrderByComparator<Contact> orderByComparator)
Returns the last contact in the ordered set where classNameId = ? and classPK = ?.
|
static Contact |
fetchByC_U_First(long companyId,
long userId,
OrderByComparator<Contact> orderByComparator)
Returns the first contact in the ordered set where companyId = ? and userId = ?.
|
static Contact |
fetchByC_U_Last(long companyId,
long userId,
OrderByComparator<Contact> orderByComparator)
Returns the last contact in the ordered set where companyId = ? and userId = ?.
|
static Contact |
fetchByCompanyId_First(long companyId,
OrderByComparator<Contact> orderByComparator)
Returns the first contact in the ordered set where companyId = ?.
|
static Contact |
fetchByCompanyId_Last(long companyId,
OrderByComparator<Contact> orderByComparator)
Returns the last contact in the ordered set where companyId = ?.
|
static Contact |
fetchByPrimaryKey(long contactId)
Returns the contact with the primary key or returns
null if it could not be found. |
static Map<Serializable,Contact> |
fetchByPrimaryKeys(Set<Serializable> primaryKeys) |
static Contact |
fetchByUserId_First(long userId,
OrderByComparator<Contact> orderByComparator)
Returns the first contact in the ordered set where userId = ?.
|
static Contact |
fetchByUserId_Last(long userId,
OrderByComparator<Contact> orderByComparator)
Returns the last contact in the ordered set where userId = ?.
|
static List<Contact> |
findAll()
Returns all the contacts.
|
static List<Contact> |
findAll(int start,
int end)
Returns a range of all the contacts.
|
static List<Contact> |
findAll(int start,
int end,
OrderByComparator<Contact> orderByComparator)
Returns an ordered range of all the contacts.
|
static List<Contact> |
findAll(int start,
int end,
OrderByComparator<Contact> orderByComparator,
boolean useFinderCache)
Returns an ordered range of all the contacts.
|
static Contact |
findByC_C_First(long classNameId,
long classPK,
OrderByComparator<Contact> orderByComparator)
Returns the first contact in the ordered set where classNameId = ? and classPK = ?.
|
static Contact |
findByC_C_Last(long classNameId,
long classPK,
OrderByComparator<Contact> orderByComparator)
Returns the last contact in the ordered set where classNameId = ? and classPK = ?.
|
static 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 = ?.
|
static List<Contact> |
findByC_C(long classNameId,
long classPK)
Returns all the contacts where classNameId = ? and classPK = ?.
|
static List<Contact> |
findByC_C(long classNameId,
long classPK,
int start,
int end)
Returns a range of all the contacts where classNameId = ? and classPK = ?.
|
static 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 = ?.
|
static 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 = ?.
|
static Contact |
findByC_U_First(long companyId,
long userId,
OrderByComparator<Contact> orderByComparator)
Returns the first contact in the ordered set where companyId = ? and userId = ?.
|
static Contact |
findByC_U_Last(long companyId,
long userId,
OrderByComparator<Contact> orderByComparator)
Returns the last contact in the ordered set where companyId = ? and userId = ?.
|
static 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 = ?.
|
static List<Contact> |
findByC_U(long companyId,
long userId)
Returns all the contacts where companyId = ? and userId = ?.
|
static List<Contact> |
findByC_U(long companyId,
long userId,
int start,
int end)
Returns a range of all the contacts where companyId = ? and userId = ?.
|
static 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 = ?.
|
static 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 = ?.
|
static Contact |
findByCompanyId_First(long companyId,
OrderByComparator<Contact> orderByComparator)
Returns the first contact in the ordered set where companyId = ?.
|
static Contact |
findByCompanyId_Last(long companyId,
OrderByComparator<Contact> orderByComparator)
Returns the last contact in the ordered set where companyId = ?.
|
static 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 = ?.
|
static List<Contact> |
findByCompanyId(long companyId)
Returns all the contacts where companyId = ?.
|
static List<Contact> |
findByCompanyId(long companyId,
int start,
int end)
Returns a range of all the contacts where companyId = ?.
|
static List<Contact> |
findByCompanyId(long companyId,
int start,
int end,
OrderByComparator<Contact> orderByComparator)
Returns an ordered range of all the contacts where companyId = ?.
|
static List<Contact> |
findByCompanyId(long companyId,
int start,
int end,
OrderByComparator<Contact> orderByComparator,
boolean useFinderCache)
Returns an ordered range of all the contacts where companyId = ?.
|
static Contact |
findByPrimaryKey(long contactId)
Returns the contact with the primary key or throws a
NoSuchContactException if it could not be found. |
static Contact |
findByUserId_First(long userId,
OrderByComparator<Contact> orderByComparator)
Returns the first contact in the ordered set where userId = ?.
|
static Contact |
findByUserId_Last(long userId,
OrderByComparator<Contact> orderByComparator)
Returns the last contact in the ordered set where userId = ?.
|
static 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 = ?.
|
static List<Contact> |
findByUserId(long userId)
Returns all the contacts where userId = ?.
|
static List<Contact> |
findByUserId(long userId,
int start,
int end)
Returns a range of all the contacts where userId = ?.
|
static List<Contact> |
findByUserId(long userId,
int start,
int end,
OrderByComparator<Contact> orderByComparator)
Returns an ordered range of all the contacts where userId = ?.
|
static List<Contact> |
findByUserId(long userId,
int start,
int end,
OrderByComparator<Contact> orderByComparator,
boolean useFinderCache)
Returns an ordered range of all the contacts where userId = ?.
|
static List<Contact> |
findWithDynamicQuery(DynamicQuery dynamicQuery) |
static List<Contact> |
findWithDynamicQuery(DynamicQuery dynamicQuery,
int start,
int end) |
static List<Contact> |
findWithDynamicQuery(DynamicQuery dynamicQuery,
int start,
int end,
OrderByComparator<Contact> orderByComparator) |
static ContactPersistence |
getPersistence() |
static Contact |
remove(long contactId)
Removes the contact with the primary key from the database.
|
static void |
removeAll()
Removes all the contacts from the database.
|
static void |
removeByC_C(long classNameId,
long classPK)
Removes all the contacts where classNameId = ? and classPK = ? from the database.
|
static void |
removeByC_U(long companyId,
long userId)
Removes all the contacts where companyId = ? and userId = ? from the database.
|
static void |
removeByCompanyId(long companyId)
Removes all the contacts where companyId = ? from the database.
|
static void |
removeByUserId(long userId)
Removes all the contacts where userId = ? from the database.
|
static void |
setPersistence(ContactPersistence persistence) |
static Contact |
update(Contact contact) |
static Contact |
update(Contact contact,
ServiceContext serviceContext) |
static Contact |
updateImpl(Contact contact) |
public static void clearCache()
BasePersistence.clearCache()
public static void clearCache(Contact contact)
public static long countWithDynamicQuery(DynamicQuery dynamicQuery)
public static Map<Serializable,Contact> fetchByPrimaryKeys(Set<Serializable> primaryKeys)
BasePersistence.fetchByPrimaryKeys(Set)
public static List<Contact> findWithDynamicQuery(DynamicQuery dynamicQuery)
public static List<Contact> findWithDynamicQuery(DynamicQuery dynamicQuery, int start, int end)
public static List<Contact> findWithDynamicQuery(DynamicQuery dynamicQuery, int start, int end, OrderByComparator<Contact> orderByComparator)
public static Contact update(Contact contact, ServiceContext serviceContext)
public static List<Contact> findByCompanyId(long companyId)
companyId
- the company IDpublic static List<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, then the query will include the default ORDER BY logic from ContactModelImpl
.
companyId
- the company IDstart
- the lower bound of the range of contactsend
- the upper bound of the range of contacts (not inclusive)public static 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, then the query will include the default ORDER BY logic from ContactModelImpl
.
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
)public static List<Contact> findByCompanyId(long companyId, int start, int end, OrderByComparator<Contact> orderByComparator, boolean useFinderCache)
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, then the query will include the default ORDER BY logic from ContactModelImpl
.
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
)useFinderCache
- whether to use the finder cachepublic static Contact 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 foundpublic static Contact 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 foundpublic static Contact 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 foundpublic static Contact 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 foundpublic static Contact[] 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 foundpublic static void removeByCompanyId(long companyId)
companyId
- the company IDpublic static int countByCompanyId(long companyId)
companyId
- the company IDpublic static List<Contact> findByUserId(long userId)
userId
- the user IDpublic static List<Contact> findByUserId(long userId, 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, then the query will include the default ORDER BY logic from ContactModelImpl
.
userId
- the user IDstart
- the lower bound of the range of contactsend
- the upper bound of the range of contacts (not inclusive)public static List<Contact> findByUserId(long userId, 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, then the query will include the default ORDER BY logic from ContactModelImpl
.
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 (optionally null
)public static List<Contact> findByUserId(long userId, int start, int end, OrderByComparator<Contact> orderByComparator, boolean useFinderCache)
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, then the query will include the default ORDER BY logic from ContactModelImpl
.
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 (optionally null
)useFinderCache
- whether to use the finder cachepublic static Contact findByUserId_First(long userId, OrderByComparator<Contact> orderByComparator) throws NoSuchContactException
userId
- the user IDorderByComparator
- the comparator to order the set by (optionally null
)NoSuchContactException
- if a matching contact could not be foundpublic static Contact fetchByUserId_First(long userId, OrderByComparator<Contact> orderByComparator)
userId
- the user IDorderByComparator
- the comparator to order the set by (optionally null
)null
if a matching contact could not be foundpublic static Contact findByUserId_Last(long userId, OrderByComparator<Contact> orderByComparator) throws NoSuchContactException
userId
- the user IDorderByComparator
- the comparator to order the set by (optionally null
)NoSuchContactException
- if a matching contact could not be foundpublic static Contact fetchByUserId_Last(long userId, OrderByComparator<Contact> orderByComparator)
userId
- the user IDorderByComparator
- the comparator to order the set by (optionally null
)null
if a matching contact could not be foundpublic static Contact[] findByUserId_PrevAndNext(long contactId, long userId, OrderByComparator<Contact> orderByComparator) throws NoSuchContactException
contactId
- the primary key of the current contactuserId
- the user IDorderByComparator
- the comparator to order the set by (optionally null
)NoSuchContactException
- if a contact with the primary key could not be foundpublic static void removeByUserId(long userId)
userId
- the user IDpublic static int countByUserId(long userId)
userId
- the user IDpublic static List<Contact> findByC_U(long companyId, long userId)
companyId
- the company IDuserId
- the user IDpublic static List<Contact> findByC_U(long companyId, long userId, 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, then the query will include the default ORDER BY logic from ContactModelImpl
.
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)public static List<Contact> findByC_U(long companyId, long userId, 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, then the query will include the default ORDER BY logic from ContactModelImpl
.
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 (optionally null
)public static List<Contact> findByC_U(long companyId, long userId, int start, int end, OrderByComparator<Contact> orderByComparator, boolean useFinderCache)
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, then the query will include the default ORDER BY logic from ContactModelImpl
.
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 (optionally null
)useFinderCache
- whether to use the finder cachepublic static Contact findByC_U_First(long companyId, long userId, OrderByComparator<Contact> orderByComparator) throws NoSuchContactException
companyId
- the company IDuserId
- the user IDorderByComparator
- the comparator to order the set by (optionally null
)NoSuchContactException
- if a matching contact could not be foundpublic static Contact fetchByC_U_First(long companyId, long userId, OrderByComparator<Contact> orderByComparator)
companyId
- the company IDuserId
- the user IDorderByComparator
- the comparator to order the set by (optionally null
)null
if a matching contact could not be foundpublic static Contact findByC_U_Last(long companyId, long userId, OrderByComparator<Contact> orderByComparator) throws NoSuchContactException
companyId
- the company IDuserId
- the user IDorderByComparator
- the comparator to order the set by (optionally null
)NoSuchContactException
- if a matching contact could not be foundpublic static Contact fetchByC_U_Last(long companyId, long userId, OrderByComparator<Contact> orderByComparator)
companyId
- the company IDuserId
- the user IDorderByComparator
- the comparator to order the set by (optionally null
)null
if a matching contact could not be foundpublic static Contact[] findByC_U_PrevAndNext(long contactId, long companyId, long userId, OrderByComparator<Contact> orderByComparator) throws NoSuchContactException
contactId
- the primary key of the current contactcompanyId
- the company IDuserId
- the user IDorderByComparator
- the comparator to order the set by (optionally null
)NoSuchContactException
- if a contact with the primary key could not be foundpublic static void removeByC_U(long companyId, long userId)
companyId
- the company IDuserId
- the user IDpublic static int countByC_U(long companyId, long userId)
companyId
- the company IDuserId
- the user IDpublic static List<Contact> findByC_C(long classNameId, long classPK)
classNameId
- the class name IDclassPK
- the class pkpublic static List<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, then the query will include the default ORDER BY logic from ContactModelImpl
.
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)public static 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, then the query will include the default ORDER BY logic from ContactModelImpl
.
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
)public static List<Contact> findByC_C(long classNameId, long classPK, int start, int end, OrderByComparator<Contact> orderByComparator, boolean useFinderCache)
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, then the query will include the default ORDER BY logic from ContactModelImpl
.
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
)useFinderCache
- whether to use the finder cachepublic static Contact 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 foundpublic static Contact 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 foundpublic static Contact 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 foundpublic static Contact 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 foundpublic static Contact[] 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 foundpublic static void removeByC_C(long classNameId, long classPK)
classNameId
- the class name IDclassPK
- the class pkpublic static int countByC_C(long classNameId, long classPK)
classNameId
- the class name IDclassPK
- the class pkpublic static void cacheResult(Contact contact)
contact
- the contactpublic static void cacheResult(List<Contact> contacts)
contacts
- the contactspublic static Contact create(long contactId)
contactId
- the primary key for the new contactpublic static Contact remove(long contactId) throws NoSuchContactException
contactId
- the primary key of the contactNoSuchContactException
- if a contact with the primary key could not be foundpublic static Contact 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 foundpublic static Contact 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 foundpublic static List<Contact> findAll()
public static 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, then the query will include the default ORDER BY logic from ContactModelImpl
.
start
- the lower bound of the range of contactsend
- the upper bound of the range of contacts (not inclusive)public static 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, then the query will include the default ORDER BY logic from ContactModelImpl
.
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
)public static List<Contact> findAll(int start, int end, OrderByComparator<Contact> orderByComparator, boolean useFinderCache)
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, then the query will include the default ORDER BY logic from ContactModelImpl
.
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
)useFinderCache
- whether to use the finder cachepublic static void removeAll()
public static int countAll()
public static ContactPersistence getPersistence()
public static void setPersistence(ContactPersistence persistence)