public class SyncDeviceLocalServiceUtil
extends java.lang.Object
com.liferay.sync.service.impl.SyncDeviceLocalServiceImpl
and
is an access point for service operations in application layer code running
on the local server. Methods of this service will not have security checks
based on the propagated JAAS credentials because this service can only be
accessed from within the same VM.SyncDeviceLocalService
Constructor and Description |
---|
SyncDeviceLocalServiceUtil() |
Modifier and Type | Method and Description |
---|---|
static SyncDevice |
addSyncDevice(long userId,
java.lang.String type,
long buildNumber,
java.lang.String hostname,
int featureSet) |
static SyncDevice |
addSyncDevice(SyncDevice syncDevice)
Adds the sync device to the database.
|
static SyncDevice |
createSyncDevice(long syncDeviceId)
Creates a new sync device with the primary key.
|
static PersistedModel |
deletePersistedModel(PersistedModel persistedModel) |
static SyncDevice |
deleteSyncDevice(long syncDeviceId)
Deletes the sync device with the primary key from the database.
|
static SyncDevice |
deleteSyncDevice(SyncDevice syncDevice)
Deletes the sync device from the database.
|
static DynamicQuery |
dynamicQuery() |
static <T> java.util.List<T> |
dynamicQuery(DynamicQuery dynamicQuery)
Performs a dynamic query on the database and returns the matching rows.
|
static <T> java.util.List<T> |
dynamicQuery(DynamicQuery dynamicQuery,
int start,
int end)
Performs a dynamic query on the database and returns a range of the matching rows.
|
static <T> java.util.List<T> |
dynamicQuery(DynamicQuery dynamicQuery,
int start,
int end,
OrderByComparator<T> orderByComparator)
Performs a dynamic query on the database and returns an ordered range of the matching rows.
|
static long |
dynamicQueryCount(DynamicQuery dynamicQuery)
Returns the number of rows matching the dynamic query.
|
static long |
dynamicQueryCount(DynamicQuery dynamicQuery,
Projection projection)
Returns the number of rows matching the dynamic query.
|
static SyncDevice |
fetchSyncDevice(long syncDeviceId) |
static SyncDevice |
fetchSyncDeviceByUuidAndCompanyId(java.lang.String uuid,
long companyId)
Returns the sync device with the matching UUID and company.
|
static ActionableDynamicQuery |
getActionableDynamicQuery() |
static ExportActionableDynamicQuery |
getExportActionableDynamicQuery(PortletDataContext portletDataContext) |
static IndexableActionableDynamicQuery |
getIndexableActionableDynamicQuery() |
static java.lang.String |
getOSGiServiceIdentifier()
Returns the OSGi service identifier.
|
static PersistedModel |
getPersistedModel(java.io.Serializable primaryKeyObj) |
static SyncDeviceLocalService |
getService() |
static SyncDevice |
getSyncDevice(long syncDeviceId)
Returns the sync device with the primary key.
|
static SyncDevice |
getSyncDeviceByUuidAndCompanyId(java.lang.String uuid,
long companyId)
Returns the sync device with the matching UUID and company.
|
static java.util.List<SyncDevice> |
getSyncDevices(int start,
int end)
Returns a range of all the sync devices.
|
static java.util.List<SyncDevice> |
getSyncDevices(long userId,
int start,
int end,
OrderByComparator orderByComparator) |
static int |
getSyncDevicesCount()
Returns the number of sync devices.
|
static java.util.List<SyncDevice> |
search(long companyId,
java.lang.String keywords,
int start,
int end,
OrderByComparator<SyncDevice> orderByComparator) |
static void |
updateStatus(long syncDeviceId,
int status) |
static SyncDevice |
updateSyncDevice(long syncDeviceId,
java.lang.String type,
long buildNumber,
int featureSet,
java.lang.String hostname,
int status) |
static SyncDevice |
updateSyncDevice(SyncDevice syncDevice)
Updates the sync device in the database or adds it if it does not yet exist.
|
public static SyncDevice addSyncDevice(long userId, java.lang.String type, long buildNumber, java.lang.String hostname, int featureSet) throws PortalException
PortalException
public static SyncDevice addSyncDevice(SyncDevice syncDevice)
syncDevice
- the sync devicepublic static SyncDevice createSyncDevice(long syncDeviceId)
syncDeviceId
- the primary key for the new sync devicepublic static PersistedModel deletePersistedModel(PersistedModel persistedModel) throws PortalException
PortalException
public static SyncDevice deleteSyncDevice(long syncDeviceId) throws PortalException
syncDeviceId
- the primary key of the sync devicePortalException
- if a sync device with the primary key could not be foundpublic static SyncDevice deleteSyncDevice(SyncDevice syncDevice)
syncDevice
- the sync devicepublic static DynamicQuery dynamicQuery()
public static <T> java.util.List<T> dynamicQuery(DynamicQuery dynamicQuery)
dynamicQuery
- the dynamic querypublic static <T> java.util.List<T> dynamicQuery(DynamicQuery dynamicQuery, 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 com.liferay.portal.kernel.dao.orm.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 com.liferay.sync.model.impl.SyncDeviceModelImpl
.
dynamicQuery
- the dynamic querystart
- the lower bound of the range of model instancesend
- the upper bound of the range of model instances (not inclusive)public static <T> java.util.List<T> dynamicQuery(DynamicQuery dynamicQuery, int start, int end, OrderByComparator<T> 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 com.liferay.portal.kernel.dao.orm.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 com.liferay.sync.model.impl.SyncDeviceModelImpl
.
dynamicQuery
- the dynamic querystart
- the lower bound of the range of model instancesend
- the upper bound of the range of model instances (not inclusive)orderByComparator
- the comparator to order the results by (optionally null
)public static long dynamicQueryCount(DynamicQuery dynamicQuery)
dynamicQuery
- the dynamic querypublic static long dynamicQueryCount(DynamicQuery dynamicQuery, Projection projection)
dynamicQuery
- the dynamic queryprojection
- the projection to apply to the querypublic static SyncDevice fetchSyncDevice(long syncDeviceId)
public static SyncDevice fetchSyncDeviceByUuidAndCompanyId(java.lang.String uuid, long companyId)
uuid
- the sync device's UUIDcompanyId
- the primary key of the companynull
if a matching sync device could not be foundpublic static ActionableDynamicQuery getActionableDynamicQuery()
public static ExportActionableDynamicQuery getExportActionableDynamicQuery(PortletDataContext portletDataContext)
public static IndexableActionableDynamicQuery getIndexableActionableDynamicQuery()
public static java.lang.String getOSGiServiceIdentifier()
public static PersistedModel getPersistedModel(java.io.Serializable primaryKeyObj) throws PortalException
PortalException
public static SyncDevice getSyncDevice(long syncDeviceId) throws PortalException
syncDeviceId
- the primary key of the sync devicePortalException
- if a sync device with the primary key could not be foundpublic static SyncDevice getSyncDeviceByUuidAndCompanyId(java.lang.String uuid, long companyId) throws PortalException
uuid
- the sync device's UUIDcompanyId
- the primary key of the companyPortalException
- if a matching sync device could not be foundpublic static java.util.List<SyncDevice> getSyncDevices(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 com.liferay.portal.kernel.dao.orm.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 com.liferay.sync.model.impl.SyncDeviceModelImpl
.
start
- the lower bound of the range of sync devicesend
- the upper bound of the range of sync devices (not inclusive)public static java.util.List<SyncDevice> getSyncDevices(long userId, int start, int end, OrderByComparator orderByComparator) throws PortalException
PortalException
public static int getSyncDevicesCount()
public static java.util.List<SyncDevice> search(long companyId, java.lang.String keywords, int start, int end, OrderByComparator<SyncDevice> orderByComparator)
public static void updateStatus(long syncDeviceId, int status) throws PortalException
PortalException
public static SyncDevice updateSyncDevice(long syncDeviceId, java.lang.String type, long buildNumber, int featureSet, java.lang.String hostname, int status) throws PortalException
PortalException
public static SyncDevice updateSyncDevice(SyncDevice syncDevice)
syncDevice
- the sync devicepublic static SyncDeviceLocalService getService()