@ProviderType
public class ServiceComponentUtil
extends Object
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
ServiceComponentPersistence
,
ServiceComponentPersistenceImpl
Constructor and Description |
---|
ServiceComponentUtil() |
Modifier and Type | Method and Description |
---|---|
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<ServiceComponent> orderByComparator)
Returns the first service component in the ordered set where buildNamespace = ?.
|
static ServiceComponent |
fetchByBuildNamespace_Last(String buildNamespace,
OrderByComparator<ServiceComponent> 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 Map<Serializable,ServiceComponent> |
fetchByPrimaryKeys(Set<Serializable> primaryKeys) |
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<ServiceComponent> orderByComparator)
Returns an ordered range of all the service components.
|
static List<ServiceComponent> |
findAll(int start,
int end,
OrderByComparator<ServiceComponent> orderByComparator,
boolean retrieveFromCache)
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<ServiceComponent> orderByComparator)
Returns the first service component in the ordered set where buildNamespace = ?.
|
static ServiceComponent |
findByBuildNamespace_Last(String buildNamespace,
OrderByComparator<ServiceComponent> orderByComparator)
Returns the last service component in the ordered set where buildNamespace = ?.
|
static ServiceComponent[] |
findByBuildNamespace_PrevAndNext(long serviceComponentId,
String buildNamespace,
OrderByComparator<ServiceComponent> 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<ServiceComponent> orderByComparator)
Returns an ordered range of all the service components where buildNamespace = ?.
|
static List<ServiceComponent> |
findByBuildNamespace(String buildNamespace,
int start,
int end,
OrderByComparator<ServiceComponent> orderByComparator,
boolean retrieveFromCache)
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<ServiceComponent> orderByComparator) |
static Set<String> |
getBadColumnNames() |
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.
|
static ServiceComponent |
update(ServiceComponent serviceComponent) |
static ServiceComponent |
update(ServiceComponent serviceComponent,
ServiceContext serviceContext) |
static ServiceComponent |
updateImpl(ServiceComponent serviceComponent) |
public static void clearCache()
BasePersistence.clearCache()
public static void clearCache(ServiceComponent serviceComponent)
public static long countWithDynamicQuery(DynamicQuery dynamicQuery)
public static List<ServiceComponent> findWithDynamicQuery(DynamicQuery dynamicQuery)
public static List<ServiceComponent> findWithDynamicQuery(DynamicQuery dynamicQuery, int start, int end)
public static List<ServiceComponent> findWithDynamicQuery(DynamicQuery dynamicQuery, int start, int end, OrderByComparator<ServiceComponent> orderByComparator)
public static ServiceComponent update(ServiceComponent serviceComponent)
public static ServiceComponent update(ServiceComponent serviceComponent, ServiceContext serviceContext)
public static List<ServiceComponent> findByBuildNamespace(String buildNamespace)
buildNamespace
- the build namespacepublic static List<ServiceComponent> findByBuildNamespace(String buildNamespace, 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 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.
buildNamespace
- the build namespacestart
- the lower bound of the range of service componentsend
- the upper bound of the range of service components (not inclusive)public static List<ServiceComponent> findByBuildNamespace(String buildNamespace, int start, int end, OrderByComparator<ServiceComponent> 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 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.
buildNamespace
- the build namespacestart
- the lower bound of the range of service componentsend
- the upper bound of the range of service components (not inclusive)orderByComparator
- the comparator to order the results by (optionally null
)public static List<ServiceComponent> findByBuildNamespace(String buildNamespace, int start, int end, OrderByComparator<ServiceComponent> orderByComparator, boolean retrieveFromCache)
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.
buildNamespace
- the build namespacestart
- the lower bound of the range of service componentsend
- the upper bound of the range of service components (not inclusive)orderByComparator
- the comparator to order the results by (optionally null
)retrieveFromCache
- whether to retrieve from the finder cachepublic static ServiceComponent findByBuildNamespace_First(String buildNamespace, OrderByComparator<ServiceComponent> orderByComparator) throws NoSuchServiceComponentException
buildNamespace
- the build namespaceorderByComparator
- the comparator to order the set by (optionally null
)NoSuchServiceComponentException
- if a matching service component could not be foundpublic static ServiceComponent fetchByBuildNamespace_First(String buildNamespace, OrderByComparator<ServiceComponent> orderByComparator)
buildNamespace
- the build namespaceorderByComparator
- the comparator to order the set by (optionally null
)null
if a matching service component could not be foundpublic static ServiceComponent findByBuildNamespace_Last(String buildNamespace, OrderByComparator<ServiceComponent> orderByComparator) throws NoSuchServiceComponentException
buildNamespace
- the build namespaceorderByComparator
- the comparator to order the set by (optionally null
)NoSuchServiceComponentException
- if a matching service component could not be foundpublic static ServiceComponent fetchByBuildNamespace_Last(String buildNamespace, OrderByComparator<ServiceComponent> orderByComparator)
buildNamespace
- the build namespaceorderByComparator
- the comparator to order the set by (optionally null
)null
if a matching service component could not be foundpublic static ServiceComponent[] findByBuildNamespace_PrevAndNext(long serviceComponentId, String buildNamespace, OrderByComparator<ServiceComponent> orderByComparator) throws NoSuchServiceComponentException
serviceComponentId
- the primary key of the current service componentbuildNamespace
- the build namespaceorderByComparator
- the comparator to order the set by (optionally null
)NoSuchServiceComponentException
- if a service component with the primary key could not be foundpublic static void removeByBuildNamespace(String buildNamespace)
buildNamespace
- the build namespacepublic static int countByBuildNamespace(String buildNamespace)
buildNamespace
- the build namespacepublic static ServiceComponent findByBNS_BNU(String buildNamespace, long buildNumber) throws NoSuchServiceComponentException
NoSuchServiceComponentException
if it could not be found.buildNamespace
- the build namespacebuildNumber
- the build numberNoSuchServiceComponentException
- if a matching service component could not be foundpublic static ServiceComponent fetchByBNS_BNU(String buildNamespace, long buildNumber)
null
if it could not be found. Uses the finder cache.buildNamespace
- the build namespacebuildNumber
- the build numbernull
if a matching service component could not be foundpublic static ServiceComponent fetchByBNS_BNU(String buildNamespace, long buildNumber, boolean retrieveFromCache)
null
if it could not be found, optionally using the finder cache.buildNamespace
- the build namespacebuildNumber
- the build numberretrieveFromCache
- whether to retrieve from the finder cachenull
if a matching service component could not be foundpublic static ServiceComponent removeByBNS_BNU(String buildNamespace, long buildNumber) throws NoSuchServiceComponentException
buildNamespace
- the build namespacebuildNumber
- the build numberNoSuchServiceComponentException
public static int countByBNS_BNU(String buildNamespace, long buildNumber)
buildNamespace
- the build namespacebuildNumber
- the build numberpublic static void cacheResult(ServiceComponent serviceComponent)
serviceComponent
- the service componentpublic static void cacheResult(List<ServiceComponent> serviceComponents)
serviceComponents
- the service componentspublic static ServiceComponent create(long serviceComponentId)
serviceComponentId
- the primary key for the new service componentpublic static ServiceComponent remove(long serviceComponentId) throws NoSuchServiceComponentException
serviceComponentId
- the primary key of the service componentNoSuchServiceComponentException
- if a service component with the primary key could not be foundpublic static ServiceComponent updateImpl(ServiceComponent serviceComponent)
public static ServiceComponent findByPrimaryKey(long serviceComponentId) throws NoSuchServiceComponentException
NoSuchServiceComponentException
if it could not be found.serviceComponentId
- the primary key of the service componentNoSuchServiceComponentException
- if a service component with the primary key could not be foundpublic static ServiceComponent fetchByPrimaryKey(long serviceComponentId)
null
if it could not be found.serviceComponentId
- the primary key of the service componentnull
if a service component with the primary key could not be foundpublic static Map<Serializable,ServiceComponent> fetchByPrimaryKeys(Set<Serializable> primaryKeys)
public static List<ServiceComponent> findAll()
public static List<ServiceComponent> 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 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.
start
- the lower bound of the range of service componentsend
- the upper bound of the range of service components (not inclusive)public static List<ServiceComponent> findAll(int start, int end, OrderByComparator<ServiceComponent> 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 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.
start
- the lower bound of the range of service componentsend
- the upper bound of the range of service components (not inclusive)orderByComparator
- the comparator to order the results by (optionally null
)public static List<ServiceComponent> findAll(int start, int end, OrderByComparator<ServiceComponent> orderByComparator, boolean retrieveFromCache)
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.
start
- the lower bound of the range of service componentsend
- the upper bound of the range of service components (not inclusive)orderByComparator
- the comparator to order the results by (optionally null
)retrieveFromCache
- whether to retrieve from the finder cachepublic static void removeAll()
public static int countAll()
public static Set<String> getBadColumnNames()
public static ServiceComponentPersistence getPersistence()