public class OAuth2ApplicationUtil
extends java.lang.Object
com.liferay.oauth2.provider.service.persistence.impl.OAuth2ApplicationPersistenceImpl
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
OAuth2ApplicationPersistence
Constructor and Description |
---|
OAuth2ApplicationUtil() |
Modifier and Type | Method and Description |
---|---|
static void |
cacheResult(java.util.List<OAuth2Application> oAuth2Applications)
Caches the o auth2 applications in the entity cache if it is enabled.
|
static void |
cacheResult(OAuth2Application oAuth2Application)
Caches the o auth2 application in the entity cache if it is enabled.
|
static void |
clearCache() |
static void |
clearCache(OAuth2Application oAuth2Application) |
static int |
countAll()
Returns the number of o auth2 applications.
|
static int |
countByC_C(long companyId,
java.lang.String clientId)
Returns the number of o auth2 applications where companyId = ? and clientId = ?.
|
static int |
countByCompanyId(long companyId)
Returns the number of o auth2 applications where companyId = ?.
|
static long |
countWithDynamicQuery(com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery) |
static OAuth2Application |
create(long oAuth2ApplicationId)
Creates a new o auth2 application with the primary key.
|
static OAuth2Application |
fetchByC_C(long companyId,
java.lang.String clientId)
Returns the o auth2 application where companyId = ? and clientId = ? or returns
null if it could not be found. |
static OAuth2Application |
fetchByC_C(long companyId,
java.lang.String clientId,
boolean useFinderCache)
Returns the o auth2 application where companyId = ? and clientId = ? or returns
null if it could not be found, optionally using the finder cache. |
static OAuth2Application |
fetchByCompanyId_First(long companyId,
com.liferay.portal.kernel.util.OrderByComparator<OAuth2Application> orderByComparator)
Returns the first o auth2 application in the ordered set where companyId = ?.
|
static OAuth2Application |
fetchByCompanyId_Last(long companyId,
com.liferay.portal.kernel.util.OrderByComparator<OAuth2Application> orderByComparator)
Returns the last o auth2 application in the ordered set where companyId = ?.
|
static OAuth2Application |
fetchByPrimaryKey(long oAuth2ApplicationId)
Returns the o auth2 application with the primary key or returns
null if it could not be found. |
static java.util.Map<java.io.Serializable,OAuth2Application> |
fetchByPrimaryKeys(java.util.Set<java.io.Serializable> primaryKeys) |
static int |
filterCountByCompanyId(long companyId)
Returns the number of o auth2 applications that the user has permission to view where companyId = ?.
|
static OAuth2Application[] |
filterFindByCompanyId_PrevAndNext(long oAuth2ApplicationId,
long companyId,
com.liferay.portal.kernel.util.OrderByComparator<OAuth2Application> orderByComparator)
Returns the o auth2 applications before and after the current o auth2 application in the ordered set of o auth2 applications that the user has permission to view where companyId = ?.
|
static java.util.List<OAuth2Application> |
filterFindByCompanyId(long companyId)
Returns all the o auth2 applications that the user has permission to view where companyId = ?.
|
static java.util.List<OAuth2Application> |
filterFindByCompanyId(long companyId,
int start,
int end)
Returns a range of all the o auth2 applications that the user has permission to view where companyId = ?.
|
static java.util.List<OAuth2Application> |
filterFindByCompanyId(long companyId,
int start,
int end,
com.liferay.portal.kernel.util.OrderByComparator<OAuth2Application> orderByComparator)
Returns an ordered range of all the o auth2 applications that the user has permissions to view where companyId = ?.
|
static java.util.List<OAuth2Application> |
findAll()
Returns all the o auth2 applications.
|
static java.util.List<OAuth2Application> |
findAll(int start,
int end)
Returns a range of all the o auth2 applications.
|
static java.util.List<OAuth2Application> |
findAll(int start,
int end,
com.liferay.portal.kernel.util.OrderByComparator<OAuth2Application> orderByComparator)
Returns an ordered range of all the o auth2 applications.
|
static java.util.List<OAuth2Application> |
findAll(int start,
int end,
com.liferay.portal.kernel.util.OrderByComparator<OAuth2Application> orderByComparator,
boolean useFinderCache)
Returns an ordered range of all the o auth2 applications.
|
static OAuth2Application |
findByC_C(long companyId,
java.lang.String clientId)
Returns the o auth2 application where companyId = ? and clientId = ? or throws a
NoSuchOAuth2ApplicationException if it could not be found. |
static OAuth2Application |
findByCompanyId_First(long companyId,
com.liferay.portal.kernel.util.OrderByComparator<OAuth2Application> orderByComparator)
Returns the first o auth2 application in the ordered set where companyId = ?.
|
static OAuth2Application |
findByCompanyId_Last(long companyId,
com.liferay.portal.kernel.util.OrderByComparator<OAuth2Application> orderByComparator)
Returns the last o auth2 application in the ordered set where companyId = ?.
|
static OAuth2Application[] |
findByCompanyId_PrevAndNext(long oAuth2ApplicationId,
long companyId,
com.liferay.portal.kernel.util.OrderByComparator<OAuth2Application> orderByComparator)
Returns the o auth2 applications before and after the current o auth2 application in the ordered set where companyId = ?.
|
static java.util.List<OAuth2Application> |
findByCompanyId(long companyId)
Returns all the o auth2 applications where companyId = ?.
|
static java.util.List<OAuth2Application> |
findByCompanyId(long companyId,
int start,
int end)
Returns a range of all the o auth2 applications where companyId = ?.
|
static java.util.List<OAuth2Application> |
findByCompanyId(long companyId,
int start,
int end,
com.liferay.portal.kernel.util.OrderByComparator<OAuth2Application> orderByComparator)
Returns an ordered range of all the o auth2 applications where companyId = ?.
|
static java.util.List<OAuth2Application> |
findByCompanyId(long companyId,
int start,
int end,
com.liferay.portal.kernel.util.OrderByComparator<OAuth2Application> orderByComparator,
boolean useFinderCache)
Returns an ordered range of all the o auth2 applications where companyId = ?.
|
static OAuth2Application |
findByPrimaryKey(long oAuth2ApplicationId)
Returns the o auth2 application with the primary key or throws a
NoSuchOAuth2ApplicationException if it could not be found. |
static java.util.List<OAuth2Application> |
findWithDynamicQuery(com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery) |
static java.util.List<OAuth2Application> |
findWithDynamicQuery(com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery,
int start,
int end) |
static java.util.List<OAuth2Application> |
findWithDynamicQuery(com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery,
int start,
int end,
com.liferay.portal.kernel.util.OrderByComparator<OAuth2Application> orderByComparator) |
static OAuth2ApplicationPersistence |
getPersistence() |
static OAuth2Application |
remove(long oAuth2ApplicationId)
Removes the o auth2 application with the primary key from the database.
|
static void |
removeAll()
Removes all the o auth2 applications from the database.
|
static OAuth2Application |
removeByC_C(long companyId,
java.lang.String clientId)
Removes the o auth2 application where companyId = ? and clientId = ? from the database.
|
static void |
removeByCompanyId(long companyId)
Removes all the o auth2 applications where companyId = ? from the database.
|
static OAuth2Application |
update(OAuth2Application oAuth2Application) |
static OAuth2Application |
update(OAuth2Application oAuth2Application,
com.liferay.portal.kernel.service.ServiceContext serviceContext) |
static OAuth2Application |
updateImpl(OAuth2Application oAuth2Application) |
public static void clearCache()
BasePersistence.clearCache()
public static void clearCache(OAuth2Application oAuth2Application)
BasePersistence.clearCache(com.liferay.portal.kernel.model.BaseModel)
public static long countWithDynamicQuery(com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
BasePersistence.countWithDynamicQuery(DynamicQuery)
public static java.util.Map<java.io.Serializable,OAuth2Application> fetchByPrimaryKeys(java.util.Set<java.io.Serializable> primaryKeys)
BasePersistence.fetchByPrimaryKeys(Set)
public static java.util.List<OAuth2Application> findWithDynamicQuery(com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
BasePersistence.findWithDynamicQuery(DynamicQuery)
public static java.util.List<OAuth2Application> findWithDynamicQuery(com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start, int end)
BasePersistence.findWithDynamicQuery(DynamicQuery, int, int)
public static java.util.List<OAuth2Application> findWithDynamicQuery(com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start, int end, com.liferay.portal.kernel.util.OrderByComparator<OAuth2Application> orderByComparator)
BasePersistence.findWithDynamicQuery(DynamicQuery, int, int, OrderByComparator)
public static OAuth2Application update(OAuth2Application oAuth2Application)
BasePersistence.update(com.liferay.portal.kernel.model.BaseModel)
public static OAuth2Application update(OAuth2Application oAuth2Application, com.liferay.portal.kernel.service.ServiceContext serviceContext)
BasePersistence.update(com.liferay.portal.kernel.model.BaseModel, ServiceContext)
public static java.util.List<OAuth2Application> findByCompanyId(long companyId)
companyId
- the company IDpublic static java.util.List<OAuth2Application> 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 OAuth2ApplicationModelImpl
.
companyId
- the company IDstart
- the lower bound of the range of o auth2 applicationsend
- the upper bound of the range of o auth2 applications (not inclusive)public static java.util.List<OAuth2Application> findByCompanyId(long companyId, int start, int end, com.liferay.portal.kernel.util.OrderByComparator<OAuth2Application> 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 OAuth2ApplicationModelImpl
.
companyId
- the company IDstart
- the lower bound of the range of o auth2 applicationsend
- the upper bound of the range of o auth2 applications (not inclusive)orderByComparator
- the comparator to order the results by (optionally null
)public static java.util.List<OAuth2Application> findByCompanyId(long companyId, int start, int end, com.liferay.portal.kernel.util.OrderByComparator<OAuth2Application> 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 OAuth2ApplicationModelImpl
.
companyId
- the company IDstart
- the lower bound of the range of o auth2 applicationsend
- the upper bound of the range of o auth2 applications (not inclusive)orderByComparator
- the comparator to order the results by (optionally null
)useFinderCache
- whether to use the finder cachepublic static OAuth2Application findByCompanyId_First(long companyId, com.liferay.portal.kernel.util.OrderByComparator<OAuth2Application> orderByComparator) throws NoSuchOAuth2ApplicationException
companyId
- the company IDorderByComparator
- the comparator to order the set by (optionally null
)NoSuchOAuth2ApplicationException
- if a matching o auth2 application could not be foundpublic static OAuth2Application fetchByCompanyId_First(long companyId, com.liferay.portal.kernel.util.OrderByComparator<OAuth2Application> orderByComparator)
companyId
- the company IDorderByComparator
- the comparator to order the set by (optionally null
)null
if a matching o auth2 application could not be foundpublic static OAuth2Application findByCompanyId_Last(long companyId, com.liferay.portal.kernel.util.OrderByComparator<OAuth2Application> orderByComparator) throws NoSuchOAuth2ApplicationException
companyId
- the company IDorderByComparator
- the comparator to order the set by (optionally null
)NoSuchOAuth2ApplicationException
- if a matching o auth2 application could not be foundpublic static OAuth2Application fetchByCompanyId_Last(long companyId, com.liferay.portal.kernel.util.OrderByComparator<OAuth2Application> orderByComparator)
companyId
- the company IDorderByComparator
- the comparator to order the set by (optionally null
)null
if a matching o auth2 application could not be foundpublic static OAuth2Application[] findByCompanyId_PrevAndNext(long oAuth2ApplicationId, long companyId, com.liferay.portal.kernel.util.OrderByComparator<OAuth2Application> orderByComparator) throws NoSuchOAuth2ApplicationException
oAuth2ApplicationId
- the primary key of the current o auth2 applicationcompanyId
- the company IDorderByComparator
- the comparator to order the set by (optionally null
)NoSuchOAuth2ApplicationException
- if a o auth2 application with the primary key could not be foundpublic static java.util.List<OAuth2Application> filterFindByCompanyId(long companyId)
companyId
- the company IDpublic static java.util.List<OAuth2Application> filterFindByCompanyId(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 OAuth2ApplicationModelImpl
.
companyId
- the company IDstart
- the lower bound of the range of o auth2 applicationsend
- the upper bound of the range of o auth2 applications (not inclusive)public static java.util.List<OAuth2Application> filterFindByCompanyId(long companyId, int start, int end, com.liferay.portal.kernel.util.OrderByComparator<OAuth2Application> 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 OAuth2ApplicationModelImpl
.
companyId
- the company IDstart
- the lower bound of the range of o auth2 applicationsend
- the upper bound of the range of o auth2 applications (not inclusive)orderByComparator
- the comparator to order the results by (optionally null
)public static OAuth2Application[] filterFindByCompanyId_PrevAndNext(long oAuth2ApplicationId, long companyId, com.liferay.portal.kernel.util.OrderByComparator<OAuth2Application> orderByComparator) throws NoSuchOAuth2ApplicationException
oAuth2ApplicationId
- the primary key of the current o auth2 applicationcompanyId
- the company IDorderByComparator
- the comparator to order the set by (optionally null
)NoSuchOAuth2ApplicationException
- if a o auth2 application 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 int filterCountByCompanyId(long companyId)
companyId
- the company IDpublic static OAuth2Application findByC_C(long companyId, java.lang.String clientId) throws NoSuchOAuth2ApplicationException
NoSuchOAuth2ApplicationException
if it could not be found.companyId
- the company IDclientId
- the client IDNoSuchOAuth2ApplicationException
- if a matching o auth2 application could not be foundpublic static OAuth2Application fetchByC_C(long companyId, java.lang.String clientId)
null
if it could not be found. Uses the finder cache.companyId
- the company IDclientId
- the client IDnull
if a matching o auth2 application could not be foundpublic static OAuth2Application fetchByC_C(long companyId, java.lang.String clientId, boolean useFinderCache)
null
if it could not be found, optionally using the finder cache.companyId
- the company IDclientId
- the client IDuseFinderCache
- whether to use the finder cachenull
if a matching o auth2 application could not be foundpublic static OAuth2Application removeByC_C(long companyId, java.lang.String clientId) throws NoSuchOAuth2ApplicationException
companyId
- the company IDclientId
- the client IDNoSuchOAuth2ApplicationException
public static int countByC_C(long companyId, java.lang.String clientId)
companyId
- the company IDclientId
- the client IDpublic static void cacheResult(OAuth2Application oAuth2Application)
oAuth2Application
- the o auth2 applicationpublic static void cacheResult(java.util.List<OAuth2Application> oAuth2Applications)
oAuth2Applications
- the o auth2 applicationspublic static OAuth2Application create(long oAuth2ApplicationId)
oAuth2ApplicationId
- the primary key for the new o auth2 applicationpublic static OAuth2Application remove(long oAuth2ApplicationId) throws NoSuchOAuth2ApplicationException
oAuth2ApplicationId
- the primary key of the o auth2 applicationNoSuchOAuth2ApplicationException
- if a o auth2 application with the primary key could not be foundpublic static OAuth2Application updateImpl(OAuth2Application oAuth2Application)
public static OAuth2Application findByPrimaryKey(long oAuth2ApplicationId) throws NoSuchOAuth2ApplicationException
NoSuchOAuth2ApplicationException
if it could not be found.oAuth2ApplicationId
- the primary key of the o auth2 applicationNoSuchOAuth2ApplicationException
- if a o auth2 application with the primary key could not be foundpublic static OAuth2Application fetchByPrimaryKey(long oAuth2ApplicationId)
null
if it could not be found.oAuth2ApplicationId
- the primary key of the o auth2 applicationnull
if a o auth2 application with the primary key could not be foundpublic static java.util.List<OAuth2Application> findAll()
public static java.util.List<OAuth2Application> 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 OAuth2ApplicationModelImpl
.
start
- the lower bound of the range of o auth2 applicationsend
- the upper bound of the range of o auth2 applications (not inclusive)public static java.util.List<OAuth2Application> findAll(int start, int end, com.liferay.portal.kernel.util.OrderByComparator<OAuth2Application> 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 OAuth2ApplicationModelImpl
.
start
- the lower bound of the range of o auth2 applicationsend
- the upper bound of the range of o auth2 applications (not inclusive)orderByComparator
- the comparator to order the results by (optionally null
)public static java.util.List<OAuth2Application> findAll(int start, int end, com.liferay.portal.kernel.util.OrderByComparator<OAuth2Application> 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 OAuth2ApplicationModelImpl
.
start
- the lower bound of the range of o auth2 applicationsend
- the upper bound of the range of o auth2 applications (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 OAuth2ApplicationPersistence getPersistence()