Class CompanyInfoUtil
com.liferay.portal.service.persistence.impl.CompanyInfoPersistenceImpl 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
- Author:
- Brian Wing Shun Chan
- See Also:
- {$generated.description}
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidcacheResult(CompanyInfo companyInfo) Caches the company info in the entity cache if it is enabled.static voidcacheResult(List<CompanyInfo> companyInfos) Caches the company infos in the entity cache if it is enabled.static voidstatic voidclearCache(CompanyInfo companyInfo) static intcountAll()Returns the number of company infos.static intcountByCompanyId(long companyId) Returns the number of company infos where companyId = ?.static longcountWithDynamicQuery(DynamicQuery dynamicQuery) static CompanyInfocreate(long companyInfoId) Creates a new company info with the primary key.static CompanyInfofetchByCompanyId(long companyId) Returns the company info where companyId = ? or returnsnullif it could not be found.static CompanyInfofetchByCompanyId(long companyId, boolean useFinderCache) Returns the company info where companyId = ? or returnsnullif it could not be found, optionally using the finder cache.static CompanyInfofetchByPrimaryKey(long companyInfoId) Returns the company info with the primary key or returnsnullif it could not be found.static Map<Serializable,CompanyInfo> fetchByPrimaryKeys(Set<Serializable> primaryKeys) static List<CompanyInfo>findAll()Returns all the company infos.static List<CompanyInfo>findAll(int start, int end) Returns a range of all the company infos.static List<CompanyInfo>findAll(int start, int end, OrderByComparator<CompanyInfo> orderByComparator) Returns an ordered range of all the company infos.static List<CompanyInfo>findAll(int start, int end, OrderByComparator<CompanyInfo> orderByComparator, boolean useFinderCache) Returns an ordered range of all the company infos.static CompanyInfofindByCompanyId(long companyId) Returns the company info where companyId = ? or throws aNoSuchCompanyInfoExceptionif it could not be found.static CompanyInfofindByPrimaryKey(long companyInfoId) Returns the company info with the primary key or throws aNoSuchCompanyInfoExceptionif it could not be found.static List<CompanyInfo>findWithDynamicQuery(DynamicQuery dynamicQuery) static List<CompanyInfo>findWithDynamicQuery(DynamicQuery dynamicQuery, int start, int end) static List<CompanyInfo>findWithDynamicQuery(DynamicQuery dynamicQuery, int start, int end, OrderByComparator<CompanyInfo> orderByComparator) static CompanyInfoPersistencestatic CompanyInforemove(long companyInfoId) Removes the company info with the primary key from the database.static voidRemoves all the company infos from the database.static CompanyInforemoveByCompanyId(long companyId) Removes the company info where companyId = ? from the database.static voidsetPersistence(CompanyInfoPersistence persistence) static CompanyInfoupdate(CompanyInfo companyInfo) static CompanyInfoupdate(CompanyInfo companyInfo, ServiceContext serviceContext) static CompanyInfoupdateImpl(CompanyInfo companyInfo)
-
Constructor Details
-
CompanyInfoUtil
public CompanyInfoUtil()
-
-
Method Details
-
clearCache
public static void clearCache()- See Also:
-
clearCache
-
countWithDynamicQuery
-
fetchByPrimaryKeys
- See Also:
-
findWithDynamicQuery
-
findWithDynamicQuery
-
findWithDynamicQuery
public static List<CompanyInfo> findWithDynamicQuery(DynamicQuery dynamicQuery, int start, int end, OrderByComparator<CompanyInfo> orderByComparator) -
update
-
update
-
findByCompanyId
Returns the company info where companyId = ? or throws aNoSuchCompanyInfoExceptionif it could not be found.- Parameters:
companyId- the company ID- Returns:
- the matching company info
- Throws:
NoSuchCompanyInfoException- if a matching company info could not be foundNoSuchCompanyInfoException
-
fetchByCompanyId
Returns the company info where companyId = ? or returnsnullif it could not be found. Uses the finder cache.- Parameters:
companyId- the company ID- Returns:
- the matching company info, or
nullif a matching company info could not be found
-
fetchByCompanyId
Returns the company info where companyId = ? or returnsnullif it could not be found, optionally using the finder cache.- Parameters:
companyId- the company IDuseFinderCache- whether to use the finder cache- Returns:
- the matching company info, or
nullif a matching company info could not be found
-
removeByCompanyId
Removes the company info where companyId = ? from the database.- Parameters:
companyId- the company ID- Returns:
- the company info that was removed
- Throws:
NoSuchCompanyInfoException
-
countByCompanyId
public static int countByCompanyId(long companyId) Returns the number of company infos where companyId = ?.- Parameters:
companyId- the company ID- Returns:
- the number of matching company infos
-
cacheResult
Caches the company info in the entity cache if it is enabled.- Parameters:
companyInfo- the company info
-
cacheResult
Caches the company infos in the entity cache if it is enabled.- Parameters:
companyInfos- the company infos
-
create
Creates a new company info with the primary key. Does not add the company info to the database.- Parameters:
companyInfoId- the primary key for the new company info- Returns:
- the new company info
-
remove
Removes the company info with the primary key from the database. Also notifies the appropriate model listeners.- Parameters:
companyInfoId- the primary key of the company info- Returns:
- the company info that was removed
- Throws:
NoSuchCompanyInfoException- if a company info with the primary key could not be foundNoSuchCompanyInfoException
-
updateImpl
-
findByPrimaryKey
Returns the company info with the primary key or throws aNoSuchCompanyInfoExceptionif it could not be found.- Parameters:
companyInfoId- the primary key of the company info- Returns:
- the company info
- Throws:
NoSuchCompanyInfoException- if a company info with the primary key could not be foundNoSuchCompanyInfoException
-
fetchByPrimaryKey
Returns the company info with the primary key or returnsnullif it could not be found.- Parameters:
companyInfoId- the primary key of the company info- Returns:
- the company info, or
nullif a company info with the primary key could not be found
-
findAll
Returns all the company infos.- Returns:
- the company infos
-
findAll
Returns a range of all the company infos.Useful when paginating results. Returns a maximum of
end - startinstances.startandendare not primary keys, they are indexes in the result set. Thus,0refers to the first result in the set. Setting bothstartandendtoQueryUtil#ALL_POSwill return the full result set. IforderByComparatoris specified, then the query will include the given ORDER BY logic. IforderByComparatoris absent, then the query will include the default ORDER BY logic fromCompanyInfoModelImpl.- Parameters:
start- the lower bound of the range of company infosend- the upper bound of the range of company infos (not inclusive)- Returns:
- the range of company infos
-
findAll
public static List<CompanyInfo> findAll(int start, int end, OrderByComparator<CompanyInfo> orderByComparator) Returns an ordered range of all the company infos.Useful when paginating results. Returns a maximum of
end - startinstances.startandendare not primary keys, they are indexes in the result set. Thus,0refers to the first result in the set. Setting bothstartandendtoQueryUtil#ALL_POSwill return the full result set. IforderByComparatoris specified, then the query will include the given ORDER BY logic. IforderByComparatoris absent, then the query will include the default ORDER BY logic fromCompanyInfoModelImpl.- Parameters:
start- the lower bound of the range of company infosend- the upper bound of the range of company infos (not inclusive)orderByComparator- the comparator to order the results by (optionallynull)- Returns:
- the ordered range of company infos
-
findAll
public static List<CompanyInfo> findAll(int start, int end, OrderByComparator<CompanyInfo> orderByComparator, boolean useFinderCache) Returns an ordered range of all the company infos.Useful when paginating results. Returns a maximum of
end - startinstances.startandendare not primary keys, they are indexes in the result set. Thus,0refers to the first result in the set. Setting bothstartandendtoQueryUtil#ALL_POSwill return the full result set. IforderByComparatoris specified, then the query will include the given ORDER BY logic. IforderByComparatoris absent, then the query will include the default ORDER BY logic fromCompanyInfoModelImpl.- Parameters:
start- the lower bound of the range of company infosend- the upper bound of the range of company infos (not inclusive)orderByComparator- the comparator to order the results by (optionallynull)useFinderCache- whether to use the finder cache- Returns:
- the ordered range of company infos
-
removeAll
public static void removeAll()Removes all the company infos from the database. -
countAll
public static int countAll()Returns the number of company infos.- Returns:
- the number of company infos
-
getPersistence
-
setPersistence
-