public class SharepointOAuth2TokenEntryUtil
extends java.lang.Object
com.liferay.sharepoint.rest.oauth2.service.persistence.impl.SharepointOAuth2TokenEntryPersistenceImpl
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
SharepointOAuth2TokenEntryPersistence
Constructor and Description |
---|
SharepointOAuth2TokenEntryUtil() |
Modifier and Type | Method and Description |
---|---|
static void |
cacheResult(java.util.List<SharepointOAuth2TokenEntry> sharepointOAuth2TokenEntries)
Caches the sharepoint o auth2 token entries in the entity cache if it is enabled.
|
static void |
cacheResult(SharepointOAuth2TokenEntry sharepointOAuth2TokenEntry)
Caches the sharepoint o auth2 token entry in the entity cache if it is enabled.
|
static void |
clearCache() |
static void |
clearCache(SharepointOAuth2TokenEntry sharepointOAuth2TokenEntry) |
static int |
countAll()
Returns the number of sharepoint o auth2 token entries.
|
static int |
countByU_C(long userId,
java.lang.String configurationPid)
Returns the number of sharepoint o auth2 token entries where userId = ? and configurationPid = ?.
|
static int |
countByUserId(long userId)
Returns the number of sharepoint o auth2 token entries where userId = ?.
|
static long |
countWithDynamicQuery(com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery) |
static SharepointOAuth2TokenEntry |
create(long sharepointOAuth2TokenEntryId)
Creates a new sharepoint o auth2 token entry with the primary key.
|
static SharepointOAuth2TokenEntry |
fetchByPrimaryKey(long sharepointOAuth2TokenEntryId)
Returns the sharepoint o auth2 token entry with the primary key or returns
null if it could not be found. |
static java.util.Map<java.io.Serializable,SharepointOAuth2TokenEntry> |
fetchByPrimaryKeys(java.util.Set<java.io.Serializable> primaryKeys) |
static SharepointOAuth2TokenEntry |
fetchByU_C(long userId,
java.lang.String configurationPid)
Returns the sharepoint o auth2 token entry where userId = ? and configurationPid = ? or returns
null if it could not be found. |
static SharepointOAuth2TokenEntry |
fetchByU_C(long userId,
java.lang.String configurationPid,
boolean useFinderCache)
Returns the sharepoint o auth2 token entry where userId = ? and configurationPid = ? or returns
null if it could not be found, optionally using the finder cache. |
static SharepointOAuth2TokenEntry |
fetchByUserId_First(long userId,
com.liferay.portal.kernel.util.OrderByComparator<SharepointOAuth2TokenEntry> orderByComparator)
Returns the first sharepoint o auth2 token entry in the ordered set where userId = ?.
|
static SharepointOAuth2TokenEntry |
fetchByUserId_Last(long userId,
com.liferay.portal.kernel.util.OrderByComparator<SharepointOAuth2TokenEntry> orderByComparator)
Returns the last sharepoint o auth2 token entry in the ordered set where userId = ?.
|
static java.util.List<SharepointOAuth2TokenEntry> |
findAll()
Returns all the sharepoint o auth2 token entries.
|
static java.util.List<SharepointOAuth2TokenEntry> |
findAll(int start,
int end)
Returns a range of all the sharepoint o auth2 token entries.
|
static java.util.List<SharepointOAuth2TokenEntry> |
findAll(int start,
int end,
com.liferay.portal.kernel.util.OrderByComparator<SharepointOAuth2TokenEntry> orderByComparator)
Returns an ordered range of all the sharepoint o auth2 token entries.
|
static java.util.List<SharepointOAuth2TokenEntry> |
findAll(int start,
int end,
com.liferay.portal.kernel.util.OrderByComparator<SharepointOAuth2TokenEntry> orderByComparator,
boolean useFinderCache)
Returns an ordered range of all the sharepoint o auth2 token entries.
|
static SharepointOAuth2TokenEntry |
findByPrimaryKey(long sharepointOAuth2TokenEntryId)
Returns the sharepoint o auth2 token entry with the primary key or throws a
NoSuch2TokenEntryException if it could not be found. |
static SharepointOAuth2TokenEntry |
findByU_C(long userId,
java.lang.String configurationPid)
Returns the sharepoint o auth2 token entry where userId = ? and configurationPid = ? or throws a
NoSuch2TokenEntryException if it could not be found. |
static SharepointOAuth2TokenEntry |
findByUserId_First(long userId,
com.liferay.portal.kernel.util.OrderByComparator<SharepointOAuth2TokenEntry> orderByComparator)
Returns the first sharepoint o auth2 token entry in the ordered set where userId = ?.
|
static SharepointOAuth2TokenEntry |
findByUserId_Last(long userId,
com.liferay.portal.kernel.util.OrderByComparator<SharepointOAuth2TokenEntry> orderByComparator)
Returns the last sharepoint o auth2 token entry in the ordered set where userId = ?.
|
static SharepointOAuth2TokenEntry[] |
findByUserId_PrevAndNext(long sharepointOAuth2TokenEntryId,
long userId,
com.liferay.portal.kernel.util.OrderByComparator<SharepointOAuth2TokenEntry> orderByComparator)
Returns the sharepoint o auth2 token entries before and after the current sharepoint o auth2 token entry in the ordered set where userId = ?.
|
static java.util.List<SharepointOAuth2TokenEntry> |
findByUserId(long userId)
Returns all the sharepoint o auth2 token entries where userId = ?.
|
static java.util.List<SharepointOAuth2TokenEntry> |
findByUserId(long userId,
int start,
int end)
Returns a range of all the sharepoint o auth2 token entries where userId = ?.
|
static java.util.List<SharepointOAuth2TokenEntry> |
findByUserId(long userId,
int start,
int end,
com.liferay.portal.kernel.util.OrderByComparator<SharepointOAuth2TokenEntry> orderByComparator)
Returns an ordered range of all the sharepoint o auth2 token entries where userId = ?.
|
static java.util.List<SharepointOAuth2TokenEntry> |
findByUserId(long userId,
int start,
int end,
com.liferay.portal.kernel.util.OrderByComparator<SharepointOAuth2TokenEntry> orderByComparator,
boolean useFinderCache)
Returns an ordered range of all the sharepoint o auth2 token entries where userId = ?.
|
static java.util.List<SharepointOAuth2TokenEntry> |
findWithDynamicQuery(com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery) |
static java.util.List<SharepointOAuth2TokenEntry> |
findWithDynamicQuery(com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery,
int start,
int end) |
static java.util.List<SharepointOAuth2TokenEntry> |
findWithDynamicQuery(com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery,
int start,
int end,
com.liferay.portal.kernel.util.OrderByComparator<SharepointOAuth2TokenEntry> orderByComparator) |
static SharepointOAuth2TokenEntryPersistence |
getPersistence() |
static SharepointOAuth2TokenEntry |
remove(long sharepointOAuth2TokenEntryId)
Removes the sharepoint o auth2 token entry with the primary key from the database.
|
static void |
removeAll()
Removes all the sharepoint o auth2 token entries from the database.
|
static SharepointOAuth2TokenEntry |
removeByU_C(long userId,
java.lang.String configurationPid)
Removes the sharepoint o auth2 token entry where userId = ? and configurationPid = ? from the database.
|
static void |
removeByUserId(long userId)
Removes all the sharepoint o auth2 token entries where userId = ? from the database.
|
static SharepointOAuth2TokenEntry |
update(SharepointOAuth2TokenEntry sharepointOAuth2TokenEntry) |
static SharepointOAuth2TokenEntry |
update(SharepointOAuth2TokenEntry sharepointOAuth2TokenEntry,
com.liferay.portal.kernel.service.ServiceContext serviceContext) |
static SharepointOAuth2TokenEntry |
updateImpl(SharepointOAuth2TokenEntry sharepointOAuth2TokenEntry) |
public static void clearCache()
BasePersistence.clearCache()
public static void clearCache(SharepointOAuth2TokenEntry sharepointOAuth2TokenEntry)
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,SharepointOAuth2TokenEntry> fetchByPrimaryKeys(java.util.Set<java.io.Serializable> primaryKeys)
BasePersistence.fetchByPrimaryKeys(Set)
public static java.util.List<SharepointOAuth2TokenEntry> findWithDynamicQuery(com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
BasePersistence.findWithDynamicQuery(DynamicQuery)
public static java.util.List<SharepointOAuth2TokenEntry> findWithDynamicQuery(com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start, int end)
BasePersistence.findWithDynamicQuery(DynamicQuery, int, int)
public static java.util.List<SharepointOAuth2TokenEntry> findWithDynamicQuery(com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start, int end, com.liferay.portal.kernel.util.OrderByComparator<SharepointOAuth2TokenEntry> orderByComparator)
BasePersistence.findWithDynamicQuery(DynamicQuery, int, int, OrderByComparator)
public static SharepointOAuth2TokenEntry update(SharepointOAuth2TokenEntry sharepointOAuth2TokenEntry)
BasePersistence.update(com.liferay.portal.kernel.model.BaseModel)
public static SharepointOAuth2TokenEntry update(SharepointOAuth2TokenEntry sharepointOAuth2TokenEntry, com.liferay.portal.kernel.service.ServiceContext serviceContext)
BasePersistence.update(com.liferay.portal.kernel.model.BaseModel, ServiceContext)
public static java.util.List<SharepointOAuth2TokenEntry> findByUserId(long userId)
userId
- the user IDpublic static java.util.List<SharepointOAuth2TokenEntry> 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 SharepointOAuth2TokenEntryModelImpl
.
userId
- the user IDstart
- the lower bound of the range of sharepoint o auth2 token entriesend
- the upper bound of the range of sharepoint o auth2 token entries (not inclusive)public static java.util.List<SharepointOAuth2TokenEntry> findByUserId(long userId, int start, int end, com.liferay.portal.kernel.util.OrderByComparator<SharepointOAuth2TokenEntry> 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 SharepointOAuth2TokenEntryModelImpl
.
userId
- the user IDstart
- the lower bound of the range of sharepoint o auth2 token entriesend
- the upper bound of the range of sharepoint o auth2 token entries (not inclusive)orderByComparator
- the comparator to order the results by (optionally null
)public static java.util.List<SharepointOAuth2TokenEntry> findByUserId(long userId, int start, int end, com.liferay.portal.kernel.util.OrderByComparator<SharepointOAuth2TokenEntry> 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 SharepointOAuth2TokenEntryModelImpl
.
userId
- the user IDstart
- the lower bound of the range of sharepoint o auth2 token entriesend
- the upper bound of the range of sharepoint o auth2 token entries (not inclusive)orderByComparator
- the comparator to order the results by (optionally null
)useFinderCache
- whether to use the finder cachepublic static SharepointOAuth2TokenEntry findByUserId_First(long userId, com.liferay.portal.kernel.util.OrderByComparator<SharepointOAuth2TokenEntry> orderByComparator) throws NoSuch2TokenEntryException
userId
- the user IDorderByComparator
- the comparator to order the set by (optionally null
)NoSuch2TokenEntryException
- if a matching sharepoint o auth2 token entry could not be foundpublic static SharepointOAuth2TokenEntry fetchByUserId_First(long userId, com.liferay.portal.kernel.util.OrderByComparator<SharepointOAuth2TokenEntry> orderByComparator)
userId
- the user IDorderByComparator
- the comparator to order the set by (optionally null
)null
if a matching sharepoint o auth2 token entry could not be foundpublic static SharepointOAuth2TokenEntry findByUserId_Last(long userId, com.liferay.portal.kernel.util.OrderByComparator<SharepointOAuth2TokenEntry> orderByComparator) throws NoSuch2TokenEntryException
userId
- the user IDorderByComparator
- the comparator to order the set by (optionally null
)NoSuch2TokenEntryException
- if a matching sharepoint o auth2 token entry could not be foundpublic static SharepointOAuth2TokenEntry fetchByUserId_Last(long userId, com.liferay.portal.kernel.util.OrderByComparator<SharepointOAuth2TokenEntry> orderByComparator)
userId
- the user IDorderByComparator
- the comparator to order the set by (optionally null
)null
if a matching sharepoint o auth2 token entry could not be foundpublic static SharepointOAuth2TokenEntry[] findByUserId_PrevAndNext(long sharepointOAuth2TokenEntryId, long userId, com.liferay.portal.kernel.util.OrderByComparator<SharepointOAuth2TokenEntry> orderByComparator) throws NoSuch2TokenEntryException
sharepointOAuth2TokenEntryId
- the primary key of the current sharepoint o auth2 token entryuserId
- the user IDorderByComparator
- the comparator to order the set by (optionally null
)NoSuch2TokenEntryException
- if a sharepoint o auth2 token entry 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 SharepointOAuth2TokenEntry findByU_C(long userId, java.lang.String configurationPid) throws NoSuch2TokenEntryException
NoSuch2TokenEntryException
if it could not be found.userId
- the user IDconfigurationPid
- the configuration pidNoSuch2TokenEntryException
- if a matching sharepoint o auth2 token entry could not be foundpublic static SharepointOAuth2TokenEntry fetchByU_C(long userId, java.lang.String configurationPid)
null
if it could not be found. Uses the finder cache.userId
- the user IDconfigurationPid
- the configuration pidnull
if a matching sharepoint o auth2 token entry could not be foundpublic static SharepointOAuth2TokenEntry fetchByU_C(long userId, java.lang.String configurationPid, boolean useFinderCache)
null
if it could not be found, optionally using the finder cache.userId
- the user IDconfigurationPid
- the configuration piduseFinderCache
- whether to use the finder cachenull
if a matching sharepoint o auth2 token entry could not be foundpublic static SharepointOAuth2TokenEntry removeByU_C(long userId, java.lang.String configurationPid) throws NoSuch2TokenEntryException
userId
- the user IDconfigurationPid
- the configuration pidNoSuch2TokenEntryException
public static int countByU_C(long userId, java.lang.String configurationPid)
userId
- the user IDconfigurationPid
- the configuration pidpublic static void cacheResult(SharepointOAuth2TokenEntry sharepointOAuth2TokenEntry)
sharepointOAuth2TokenEntry
- the sharepoint o auth2 token entrypublic static void cacheResult(java.util.List<SharepointOAuth2TokenEntry> sharepointOAuth2TokenEntries)
sharepointOAuth2TokenEntries
- the sharepoint o auth2 token entriespublic static SharepointOAuth2TokenEntry create(long sharepointOAuth2TokenEntryId)
sharepointOAuth2TokenEntryId
- the primary key for the new sharepoint o auth2 token entrypublic static SharepointOAuth2TokenEntry remove(long sharepointOAuth2TokenEntryId) throws NoSuch2TokenEntryException
sharepointOAuth2TokenEntryId
- the primary key of the sharepoint o auth2 token entryNoSuch2TokenEntryException
- if a sharepoint o auth2 token entry with the primary key could not be foundpublic static SharepointOAuth2TokenEntry updateImpl(SharepointOAuth2TokenEntry sharepointOAuth2TokenEntry)
public static SharepointOAuth2TokenEntry findByPrimaryKey(long sharepointOAuth2TokenEntryId) throws NoSuch2TokenEntryException
NoSuch2TokenEntryException
if it could not be found.sharepointOAuth2TokenEntryId
- the primary key of the sharepoint o auth2 token entryNoSuch2TokenEntryException
- if a sharepoint o auth2 token entry with the primary key could not be foundpublic static SharepointOAuth2TokenEntry fetchByPrimaryKey(long sharepointOAuth2TokenEntryId)
null
if it could not be found.sharepointOAuth2TokenEntryId
- the primary key of the sharepoint o auth2 token entrynull
if a sharepoint o auth2 token entry with the primary key could not be foundpublic static java.util.List<SharepointOAuth2TokenEntry> findAll()
public static java.util.List<SharepointOAuth2TokenEntry> 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 SharepointOAuth2TokenEntryModelImpl
.
start
- the lower bound of the range of sharepoint o auth2 token entriesend
- the upper bound of the range of sharepoint o auth2 token entries (not inclusive)public static java.util.List<SharepointOAuth2TokenEntry> findAll(int start, int end, com.liferay.portal.kernel.util.OrderByComparator<SharepointOAuth2TokenEntry> 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 SharepointOAuth2TokenEntryModelImpl
.
start
- the lower bound of the range of sharepoint o auth2 token entriesend
- the upper bound of the range of sharepoint o auth2 token entries (not inclusive)orderByComparator
- the comparator to order the results by (optionally null
)public static java.util.List<SharepointOAuth2TokenEntry> findAll(int start, int end, com.liferay.portal.kernel.util.OrderByComparator<SharepointOAuth2TokenEntry> 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 SharepointOAuth2TokenEntryModelImpl
.
start
- the lower bound of the range of sharepoint o auth2 token entriesend
- the upper bound of the range of sharepoint o auth2 token entries (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 SharepointOAuth2TokenEntryPersistence getPersistence()