Liferay 6.2-ce-ga5

com.liferay.portal.service.persistence
Class ServiceComponentUtil

java.lang.Object
  extended by com.liferay.portal.service.persistence.ServiceComponentUtil

@ProviderType
public class ServiceComponentUtil
extends Object

The persistence utility for the service component service. This utility wraps ServiceComponentPersistenceImpl 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

See Also:
ServiceComponentPersistence, ServiceComponentPersistenceImpl
ServiceBuilder generated this class. Modifications in this class will be overwritten the next time it is generated.

Constructor Summary
ServiceComponentUtil()
           
 
Method Summary
static void cacheResult(List<ServiceComponent> serviceComponents)
          Caches the service components in the entity cache if it is enabled.
static void cacheResult(ServiceComponent serviceComponent)
          Caches the service component in the entity cache if it is enabled.
static void clearCache()
           
static void clearCache(ServiceComponent serviceComponent)
           
static int countAll()
          Returns the number of service components.
static int countByBNS_BNU(String buildNamespace, long buildNumber)
          Returns the number of service components where buildNamespace = ? and buildNumber = ?.
static int countByBuildNamespace(String buildNamespace)
          Returns the number of service components where buildNamespace = ?.
static long countWithDynamicQuery(DynamicQuery dynamicQuery)
           
static ServiceComponent create(long serviceComponentId)
          Creates a new service component with the primary key.
static ServiceComponent fetchByBNS_BNU(String buildNamespace, long buildNumber)
          Returns the service component where buildNamespace = ? and buildNumber = ? or returns null if it could not be found.
static ServiceComponent fetchByBNS_BNU(String buildNamespace, long buildNumber, boolean retrieveFromCache)
          Returns the service component where buildNamespace = ? and buildNumber = ? or returns null if it could not be found, optionally using the finder cache.
static ServiceComponent fetchByBuildNamespace_First(String buildNamespace, OrderByComparator orderByComparator)
          Returns the first service component in the ordered set where buildNamespace = ?.
static ServiceComponent fetchByBuildNamespace_Last(String buildNamespace, OrderByComparator orderByComparator)
          Returns the last service component in the ordered set where buildNamespace = ?.
static ServiceComponent fetchByPrimaryKey(long serviceComponentId)
          Returns the service component with the primary key or returns null if it could not be found.
static List<ServiceComponent> findAll()
          Returns all the service components.
static List<ServiceComponent> findAll(int start, int end)
          Returns a range of all the service components.
static List<ServiceComponent> findAll(int start, int end, OrderByComparator orderByComparator)
          Returns an ordered range of all the service components.
static ServiceComponent findByBNS_BNU(String buildNamespace, long buildNumber)
          Returns the service component where buildNamespace = ? and buildNumber = ? or throws a NoSuchServiceComponentException if it could not be found.
static ServiceComponent findByBuildNamespace_First(String buildNamespace, OrderByComparator orderByComparator)
          Returns the first service component in the ordered set where buildNamespace = ?.
static ServiceComponent findByBuildNamespace_Last(String buildNamespace, OrderByComparator orderByComparator)
          Returns the last service component in the ordered set where buildNamespace = ?.
static ServiceComponent[] findByBuildNamespace_PrevAndNext(long serviceComponentId, String buildNamespace, OrderByComparator orderByComparator)
          Returns the service components before and after the current service component in the ordered set where buildNamespace = ?.
static List<ServiceComponent> findByBuildNamespace(String buildNamespace)
          Returns all the service components where buildNamespace = ?.
static List<ServiceComponent> findByBuildNamespace(String buildNamespace, int start, int end)
          Returns a range of all the service components where buildNamespace = ?.
static List<ServiceComponent> findByBuildNamespace(String buildNamespace, int start, int end, OrderByComparator orderByComparator)
          Returns an ordered range of all the service components where buildNamespace = ?.
static ServiceComponent findByPrimaryKey(long serviceComponentId)
          Returns the service component with the primary key or throws a NoSuchServiceComponentException if it could not be found.
static List<ServiceComponent> findWithDynamicQuery(DynamicQuery dynamicQuery)
           
static List<ServiceComponent> findWithDynamicQuery(DynamicQuery dynamicQuery, int start, int end)
           
static List<ServiceComponent> findWithDynamicQuery(DynamicQuery dynamicQuery, int start, int end, OrderByComparator orderByComparator)
           
static ServiceComponentPersistence getPersistence()
           
static ServiceComponent remove(long serviceComponentId)
          Removes the service component with the primary key from the database.
static void removeAll()
          Removes all the service components from the database.
static ServiceComponent removeByBNS_BNU(String buildNamespace, long buildNumber)
          Removes the service component where buildNamespace = ? and buildNumber = ? from the database.
static void removeByBuildNamespace(String buildNamespace)
          Removes all the service components where buildNamespace = ? from the database.
 void setPersistence(ServiceComponentPersistence persistence)
          Deprecated. As of 6.2.0
static ServiceComponent update(ServiceComponent serviceComponent)
           
static ServiceComponent update(ServiceComponent serviceComponent, ServiceContext serviceContext)
           
static ServiceComponent updateImpl(ServiceComponent serviceComponent)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ServiceComponentUtil

public ServiceComponentUtil()
Method Detail

clearCache

public static void clearCache()
See Also:
BasePersistence.clearCache()

clearCache

public static void clearCache(ServiceComponent serviceComponent)
See Also:
BasePersistence.clearCache(com.liferay.portal.model.BaseModel)

countWithDynamicQuery

public static long countWithDynamicQuery(DynamicQuery dynamicQuery)
                                  throws SystemException
Throws:
SystemException
See Also:
BasePersistence.countWithDynamicQuery(DynamicQuery)

findWithDynamicQuery

public static List<ServiceComponent> findWithDynamicQuery(DynamicQuery dynamicQuery)
                                                   throws SystemException
Throws:
SystemException
See Also:
BasePersistence.findWithDynamicQuery(DynamicQuery)

findWithDynamicQuery

public static List<ServiceComponent> findWithDynamicQuery(DynamicQuery dynamicQuery,
                                                          int start,
                                                          int end)
                                                   throws SystemException
Throws:
SystemException
See Also:
BasePersistence.findWithDynamicQuery(DynamicQuery, int, int)

findWithDynamicQuery

public static List<ServiceComponent> findWithDynamicQuery(DynamicQuery dynamicQuery,
                                                          int start,
                                                          int end,
                                                          OrderByComparator orderByComparator)
                                                   throws SystemException
Throws:
SystemException
See Also:
BasePersistence.findWithDynamicQuery(DynamicQuery, int, int, OrderByComparator)

update

public static ServiceComponent update(ServiceComponent serviceComponent)
                               throws SystemException
Throws:
SystemException
See Also:
BasePersistence.update(com.liferay.portal.model.BaseModel)

update

public static ServiceComponent update(ServiceComponent serviceComponent,
                                      ServiceContext serviceContext)
                               throws SystemException
Throws:
SystemException
See Also:
BasePersistence.update(com.liferay.portal.model.BaseModel, ServiceContext)

findByBuildNamespace

public static List<ServiceComponent> findByBuildNamespace(String buildNamespace)
                                                   throws SystemException
Returns all the service components where buildNamespace = ?.

Parameters:
buildNamespace - the build namespace
Returns:
the matching service components
Throws:
SystemException - if a system exception occurred

findByBuildNamespace

public static List<ServiceComponent> findByBuildNamespace(String buildNamespace,
                                                          int start,
                                                          int end)
                                                   throws SystemException
Returns a range of all the service components where buildNamespace = ?.

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 ServiceComponentModelImpl. 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.

Parameters:
buildNamespace - the build namespace
start - the lower bound of the range of service components
end - the upper bound of the range of service components (not inclusive)
Returns:
the range of matching service components
Throws:
SystemException - if a system exception occurred

findByBuildNamespace

public static List<ServiceComponent> findByBuildNamespace(String buildNamespace,
                                                          int start,
                                                          int end,
                                                          OrderByComparator orderByComparator)
                                                   throws SystemException
Returns an ordered range of all the service components where buildNamespace = ?.

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 ServiceComponentModelImpl. 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.

Parameters:
buildNamespace - the build namespace
start - the lower bound of the range of service components
end - the upper bound of the range of service components (not inclusive)
orderByComparator - the comparator to order the results by (optionally null)
Returns:
the ordered range of matching service components
Throws:
SystemException - if a system exception occurred

findByBuildNamespace_First

public static ServiceComponent findByBuildNamespace_First(String buildNamespace,
                                                          OrderByComparator orderByComparator)
                                                   throws NoSuchServiceComponentException,
                                                          SystemException
Returns the first service component in the ordered set where buildNamespace = ?.

Parameters:
buildNamespace - the build namespace
orderByComparator - the comparator to order the set by (optionally null)
Returns:
the first matching service component
Throws:
NoSuchServiceComponentException - if a matching service component could not be found
SystemException - if a system exception occurred

fetchByBuildNamespace_First

public static ServiceComponent fetchByBuildNamespace_First(String buildNamespace,
                                                           OrderByComparator orderByComparator)
                                                    throws SystemException
Returns the first service component in the ordered set where buildNamespace = ?.

Parameters:
buildNamespace - the build namespace
orderByComparator - the comparator to order the set by (optionally null)
Returns:
the first matching service component, or null if a matching service component could not be found
Throws:
SystemException - if a system exception occurred

findByBuildNamespace_Last

public static ServiceComponent findByBuildNamespace_Last(String buildNamespace,
                                                         OrderByComparator orderByComparator)
                                                  throws NoSuchServiceComponentException,
                                                         SystemException
Returns the last service component in the ordered set where buildNamespace = ?.

Parameters:
buildNamespace - the build namespace
orderByComparator - the comparator to order the set by (optionally null)
Returns:
the last matching service component
Throws:
NoSuchServiceComponentException - if a matching service component could not be found
SystemException - if a system exception occurred

fetchByBuildNamespace_Last

public static ServiceComponent fetchByBuildNamespace_Last(String buildNamespace,
                                                          OrderByComparator orderByComparator)
                                                   throws SystemException
Returns the last service component in the ordered set where buildNamespace = ?.

Parameters:
buildNamespace - the build namespace
orderByComparator - the comparator to order the set by (optionally null)
Returns:
the last matching service component, or null if a matching service component could not be found
Throws:
SystemException - if a system exception occurred

findByBuildNamespace_PrevAndNext

public static ServiceComponent[] findByBuildNamespace_PrevAndNext(long serviceComponentId,
                                                                  String buildNamespace,
                                                                  OrderByComparator orderByComparator)
                                                           throws NoSuchServiceComponentException,
                                                                  SystemException
Returns the service components before and after the current service component in the ordered set where buildNamespace = ?.

Parameters:
serviceComponentId - the primary key of the current service component
buildNamespace - the build namespace
orderByComparator - the comparator to order the set by (optionally null)
Returns:
the previous, current, and next service component
Throws:
NoSuchServiceComponentException - if a service component with the primary key could not be found
SystemException - if a system exception occurred

removeByBuildNamespace

public static void removeByBuildNamespace(String buildNamespace)
                                   throws SystemException
Removes all the service components where buildNamespace = ? from the database.

Parameters:
buildNamespace - the build namespace
Throws:
SystemException - if a system exception occurred

countByBuildNamespace

public static int countByBuildNamespace(String buildNamespace)
                                 throws SystemException
Returns the number of service components where buildNamespace = ?.

Parameters:
buildNamespace - the build namespace
Returns:
the number of matching service components
Throws:
SystemException - if a system exception occurred

findByBNS_BNU

public static ServiceComponent findByBNS_BNU(String buildNamespace,
                                             long buildNumber)
                                      throws NoSuchServiceComponentException,
                                             SystemException
Returns the service component where buildNamespace = ? and buildNumber = ? or throws a NoSuchServiceComponentException if it could not be found.

Parameters:
buildNamespace - the build namespace
buildNumber - the build number
Returns:
the matching service component
Throws:
NoSuchServiceComponentException - if a matching service component could not be found
SystemException - if a system exception occurred

fetchByBNS_BNU

public static ServiceComponent fetchByBNS_BNU(String buildNamespace,
                                              long buildNumber)
                                       throws SystemException
Returns the service component where buildNamespace = ? and buildNumber = ? or returns null if it could not be found. Uses the finder cache.

Parameters:
buildNamespace - the build namespace
buildNumber - the build number
Returns:
the matching service component, or null if a matching service component could not be found
Throws:
SystemException - if a system exception occurred

fetchByBNS_BNU

public static ServiceComponent fetchByBNS_BNU(String buildNamespace,
                                              long buildNumber,
                                              boolean retrieveFromCache)
                                       throws SystemException
Returns the service component where buildNamespace = ? and buildNumber = ? or returns null if it could not be found, optionally using the finder cache.

Parameters:
buildNamespace - the build namespace
buildNumber - the build number
retrieveFromCache - whether to use the finder cache
Returns:
the matching service component, or null if a matching service component could not be found
Throws:
SystemException - if a system exception occurred

removeByBNS_BNU

public static ServiceComponent removeByBNS_BNU(String buildNamespace,
                                               long buildNumber)
                                        throws NoSuchServiceComponentException,
                                               SystemException
Removes the service component where buildNamespace = ? and buildNumber = ? from the database.

Parameters:
buildNamespace - the build namespace
buildNumber - the build number
Returns:
the service component that was removed
Throws:
SystemException - if a system exception occurred
NoSuchServiceComponentException

countByBNS_BNU

public static int countByBNS_BNU(String buildNamespace,
                                 long buildNumber)
                          throws SystemException
Returns the number of service components where buildNamespace = ? and buildNumber = ?.

Parameters:
buildNamespace - the build namespace
buildNumber - the build number
Returns:
the number of matching service components
Throws:
SystemException - if a system exception occurred

cacheResult

public static void cacheResult(ServiceComponent serviceComponent)
Caches the service component in the entity cache if it is enabled.

Parameters:
serviceComponent - the service component

cacheResult

public static void cacheResult(List<ServiceComponent> serviceComponents)
Caches the service components in the entity cache if it is enabled.

Parameters:
serviceComponents - the service components

create

public static ServiceComponent create(long serviceComponentId)
Creates a new service component with the primary key. Does not add the service component to the database.

Parameters:
serviceComponentId - the primary key for the new service component
Returns:
the new service component

remove

public static ServiceComponent remove(long serviceComponentId)
                               throws NoSuchServiceComponentException,
                                      SystemException
Removes the service component with the primary key from the database. Also notifies the appropriate model listeners.

Parameters:
serviceComponentId - the primary key of the service component
Returns:
the service component that was removed
Throws:
NoSuchServiceComponentException - if a service component with the primary key could not be found
SystemException - if a system exception occurred

updateImpl

public static ServiceComponent updateImpl(ServiceComponent serviceComponent)
                                   throws SystemException
Throws:
SystemException

findByPrimaryKey

public static ServiceComponent findByPrimaryKey(long serviceComponentId)
                                         throws NoSuchServiceComponentException,
                                                SystemException
Returns the service component with the primary key or throws a NoSuchServiceComponentException if it could not be found.

Parameters:
serviceComponentId - the primary key of the service component
Returns:
the service component
Throws:
NoSuchServiceComponentException - if a service component with the primary key could not be found
SystemException - if a system exception occurred

fetchByPrimaryKey

public static ServiceComponent fetchByPrimaryKey(long serviceComponentId)
                                          throws SystemException
Returns the service component with the primary key or returns null if it could not be found.

Parameters:
serviceComponentId - the primary key of the service component
Returns:
the service component, or null if a service component with the primary key could not be found
Throws:
SystemException - if a system exception occurred

findAll

public static List<ServiceComponent> findAll()
                                      throws SystemException
Returns all the service components.

Returns:
the service components
Throws:
SystemException - if a system exception occurred

findAll

public static List<ServiceComponent> findAll(int start,
                                             int end)
                                      throws SystemException
Returns a range of all the service components.

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 ServiceComponentModelImpl. 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.

Parameters:
start - the lower bound of the range of service components
end - the upper bound of the range of service components (not inclusive)
Returns:
the range of service components
Throws:
SystemException - if a system exception occurred

findAll

public static List<ServiceComponent> findAll(int start,
                                             int end,
                                             OrderByComparator orderByComparator)
                                      throws SystemException
Returns an ordered range of all the service components.

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 ServiceComponentModelImpl. 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.

Parameters:
start - the lower bound of the range of service components
end - the upper bound of the range of service components (not inclusive)
orderByComparator - the comparator to order the results by (optionally null)
Returns:
the ordered range of service components
Throws:
SystemException - if a system exception occurred

removeAll

public static void removeAll()
                      throws SystemException
Removes all the service components from the database.

Throws:
SystemException - if a system exception occurred

countAll

public static int countAll()
                    throws SystemException
Returns the number of service components.

Returns:
the number of service components
Throws:
SystemException - if a system exception occurred

getPersistence

public static ServiceComponentPersistence getPersistence()

setPersistence

public void setPersistence(ServiceComponentPersistence persistence)
Deprecated. As of 6.2.0


Liferay 6.2-ce-ga5