Liferay 6.0.5

com.liferay.portal.service
Class CompanyLocalServiceUtil

java.lang.Object
  extended by com.liferay.portal.service.CompanyLocalServiceUtil

public class CompanyLocalServiceUtil
extends Object

The utility for the company local service. This utility wraps CompanyLocalServiceImpl and is the primary access point for service operations in application layer code running on the local server.

Never modify this class directly. Add custom service methods to CompanyLocalServiceImpl and rerun ServiceBuilder to regenerate this class.

This is a local service. 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.

See Also:
CompanyLocalService, CompanyLocalServiceBaseImpl, CompanyLocalServiceImpl
ServiceBuilder generated this class. Modifications in this class will be overwritten the next time is generated.

Constructor Summary
CompanyLocalServiceUtil()
           
 
Method Summary
static Company addCompany(Company company)
          Adds the company to the database.
static Company addCompany(String webId, String virtualHost, String mx, String shardName, boolean system, int maxUsers)
           
static Company checkCompany(String webId)
           
static Company checkCompany(String webId, String mx, String shardName)
           
static void checkCompanyKey(long companyId)
           
static Company createCompany(long companyId)
          Creates a new company with the primary key.
static void deleteCompany(Company company)
          Deletes the company from the database.
static void deleteCompany(long companyId)
          Deletes the company with the primary key from the database.
static void deleteLogo(long companyId)
           
static List dynamicQuery(DynamicQuery dynamicQuery)
          Performs a dynamic query on the database and returns the matching rows.
static List dynamicQuery(DynamicQuery dynamicQuery, int start, int end)
          Performs a dynamic query on the database and returns a range of the matching rows.
static List dynamicQuery(DynamicQuery dynamicQuery, int start, int end, OrderByComparator orderByComparator)
          Performs a dynamic query on the database and returns an ordered range of the matching rows.
static long dynamicQueryCount(DynamicQuery dynamicQuery)
          Counts the number of rows that match the dynamic query.
static List<Company> getCompanies()
           
static List<Company> getCompanies(boolean system)
           
static List<Company> getCompanies(int start, int end)
          Gets a range of all the companies.
static int getCompaniesCount()
          Gets the number of companies.
static int getCompaniesCount(boolean system)
           
static Company getCompany(long companyId)
          Gets the company with the primary key.
static Company getCompanyById(long companyId)
           
static Company getCompanyByLogoId(long logoId)
           
static Company getCompanyByMx(String mx)
           
static Company getCompanyByVirtualHost(String virtualHost)
           
static Company getCompanyByWebId(String webId)
           
static CompanyLocalService getService()
           
static void removePreferences(long companyId, String[] keys)
           
static Hits search(long companyId, long userId, String keywords, int start, int end)
           
static Hits search(long companyId, long userId, String portletId, long groupId, String type, String keywords, int start, int end)
           
 void setService(CompanyLocalService service)
           
static Company updateCompany(Company company)
          Updates the company in the database.
static Company updateCompany(Company company, boolean merge)
          Updates the company in the database.
static Company updateCompany(long companyId, String virtualHost, String mx, int maxUsers)
           
static Company updateCompany(long companyId, String virtualHost, String mx, String homeURL, String name, String legalName, String legalId, String legalType, String sicCode, String tickerSymbol, String industry, String type, String size)
           
static void updateDisplay(long companyId, String languageId, String timeZoneId)
           
static void updateLogo(long companyId, byte[] bytes)
           
static void updateLogo(long companyId, File file)
           
static void updateLogo(long companyId, InputStream is)
           
static void updatePreferences(long companyId, UnicodeProperties properties)
           
static void updateSecurity(long companyId, String authType, boolean autoLogin, boolean sendPassword, boolean strangers, boolean strangersWithMx, boolean strangersVerify, boolean communityLogo)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CompanyLocalServiceUtil

public CompanyLocalServiceUtil()
Method Detail

addCompany

public static Company addCompany(Company company)
                          throws SystemException
Adds the company to the database. Also notifies the appropriate model listeners.

Parameters:
company - the company to add
Returns:
the company that was added
Throws:
SystemException - if a system exception occurred

createCompany

public static Company createCompany(long companyId)
Creates a new company with the primary key. Does not add the company to the database.

Parameters:
companyId - the primary key for the new company
Returns:
the new company

deleteCompany

public static void deleteCompany(long companyId)
                          throws PortalException,
                                 SystemException
Deletes the company with the primary key from the database. Also notifies the appropriate model listeners.

Parameters:
companyId - the primary key of the company to delete
Throws:
PortalException - if a company with the primary key could not be found
SystemException - if a system exception occurred

deleteCompany

public static void deleteCompany(Company company)
                          throws SystemException
Deletes the company from the database. Also notifies the appropriate model listeners.

Parameters:
company - the company to delete
Throws:
SystemException - if a system exception occurred

dynamicQuery

public static List dynamicQuery(DynamicQuery dynamicQuery)
                         throws SystemException
Performs a dynamic query on the database and returns the matching rows.

Parameters:
dynamicQuery - the dynamic query to search with
Returns:
the matching rows
Throws:
SystemException - if a system exception occurred

dynamicQuery

public static List dynamicQuery(DynamicQuery dynamicQuery,
                                int start,
                                int end)
                         throws SystemException
Performs a dynamic query on the database and returns a range of the matching rows.

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.

Parameters:
dynamicQuery - the dynamic query to search with
start - the lower bound of the range of model instances to return
end - the upper bound of the range of model instances to return (not inclusive)
Returns:
the range of matching rows
Throws:
SystemException - if a system exception occurred

dynamicQuery

public static List dynamicQuery(DynamicQuery dynamicQuery,
                                int start,
                                int end,
                                OrderByComparator orderByComparator)
                         throws SystemException
Performs a dynamic query on the database and returns an ordered range of the matching rows.

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.

Parameters:
dynamicQuery - the dynamic query to search with
start - the lower bound of the range of model instances to return
end - the upper bound of the range of model instances to return (not inclusive)
orderByComparator - the comparator to order the results by
Returns:
the ordered range of matching rows
Throws:
SystemException - if a system exception occurred

dynamicQueryCount

public static long dynamicQueryCount(DynamicQuery dynamicQuery)
                              throws SystemException
Counts the number of rows that match the dynamic query.

Parameters:
dynamicQuery - the dynamic query to search with
Returns:
the number of rows that match the dynamic query
Throws:
SystemException - if a system exception occurred

getCompany

public static Company getCompany(long companyId)
                          throws PortalException,
                                 SystemException
Gets the company with the primary key.

Parameters:
companyId - the primary key of the company to get
Returns:
the company
Throws:
PortalException - if a company with the primary key could not be found
SystemException - if a system exception occurred

getCompanies

public static List<Company> getCompanies(int start,
                                         int end)
                                  throws SystemException
Gets a range of all the companies.

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.

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

getCompaniesCount

public static int getCompaniesCount()
                             throws SystemException
Gets the number of companies.

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

updateCompany

public static Company updateCompany(Company company)
                             throws SystemException
Updates the company in the database. Also notifies the appropriate model listeners.

Parameters:
company - the company to update
Returns:
the company that was updated
Throws:
SystemException - if a system exception occurred

updateCompany

public static Company updateCompany(Company company,
                                    boolean merge)
                             throws SystemException
Updates the company in the database. Also notifies the appropriate model listeners.

Parameters:
company - the company to update
merge - whether to merge the company with the current session. See BatchSession.update(com.liferay.portal.kernel.dao.orm.Session, com.liferay.portal.model.BaseModel, boolean) for an explanation.
Returns:
the company that was updated
Throws:
SystemException - if a system exception occurred

addCompany

public static Company addCompany(String webId,
                                 String virtualHost,
                                 String mx,
                                 String shardName,
                                 boolean system,
                                 int maxUsers)
                          throws PortalException,
                                 SystemException
Throws:
PortalException
SystemException

checkCompany

public static Company checkCompany(String webId)
                            throws PortalException,
                                   SystemException
Throws:
PortalException
SystemException

checkCompany

public static Company checkCompany(String webId,
                                   String mx,
                                   String shardName)
                            throws PortalException,
                                   SystemException
Throws:
PortalException
SystemException

checkCompanyKey

public static void checkCompanyKey(long companyId)
                            throws PortalException,
                                   SystemException
Throws:
PortalException
SystemException

deleteLogo

public static void deleteLogo(long companyId)
                       throws PortalException,
                              SystemException
Throws:
PortalException
SystemException

getCompanies

public static List<Company> getCompanies()
                                  throws SystemException
Throws:
SystemException

getCompanies

public static List<Company> getCompanies(boolean system)
                                  throws SystemException
Throws:
SystemException

getCompaniesCount

public static int getCompaniesCount(boolean system)
                             throws SystemException
Throws:
SystemException

getCompanyById

public static Company getCompanyById(long companyId)
                              throws PortalException,
                                     SystemException
Throws:
PortalException
SystemException

getCompanyByLogoId

public static Company getCompanyByLogoId(long logoId)
                                  throws PortalException,
                                         SystemException
Throws:
PortalException
SystemException

getCompanyByMx

public static Company getCompanyByMx(String mx)
                              throws PortalException,
                                     SystemException
Throws:
PortalException
SystemException

getCompanyByVirtualHost

public static Company getCompanyByVirtualHost(String virtualHost)
                                       throws PortalException,
                                              SystemException
Throws:
PortalException
SystemException

getCompanyByWebId

public static Company getCompanyByWebId(String webId)
                                 throws PortalException,
                                        SystemException
Throws:
PortalException
SystemException

removePreferences

public static void removePreferences(long companyId,
                                     String[] keys)
                              throws SystemException
Throws:
SystemException

search

public static Hits search(long companyId,
                          long userId,
                          String keywords,
                          int start,
                          int end)
                   throws SystemException
Throws:
SystemException

search

public static Hits search(long companyId,
                          long userId,
                          String portletId,
                          long groupId,
                          String type,
                          String keywords,
                          int start,
                          int end)
                   throws SystemException
Throws:
SystemException

updateCompany

public static Company updateCompany(long companyId,
                                    String virtualHost,
                                    String mx,
                                    int maxUsers)
                             throws PortalException,
                                    SystemException
Throws:
PortalException
SystemException

updateCompany

public static Company updateCompany(long companyId,
                                    String virtualHost,
                                    String mx,
                                    String homeURL,
                                    String name,
                                    String legalName,
                                    String legalId,
                                    String legalType,
                                    String sicCode,
                                    String tickerSymbol,
                                    String industry,
                                    String type,
                                    String size)
                             throws PortalException,
                                    SystemException
Throws:
PortalException
SystemException

updateDisplay

public static void updateDisplay(long companyId,
                                 String languageId,
                                 String timeZoneId)
                          throws PortalException,
                                 SystemException
Throws:
PortalException
SystemException

updateLogo

public static void updateLogo(long companyId,
                              byte[] bytes)
                       throws PortalException,
                              SystemException
Throws:
PortalException
SystemException

updateLogo

public static void updateLogo(long companyId,
                              File file)
                       throws PortalException,
                              SystemException
Throws:
PortalException
SystemException

updateLogo

public static void updateLogo(long companyId,
                              InputStream is)
                       throws PortalException,
                              SystemException
Throws:
PortalException
SystemException

updatePreferences

public static void updatePreferences(long companyId,
                                     UnicodeProperties properties)
                              throws SystemException
Throws:
SystemException

updateSecurity

public static void updateSecurity(long companyId,
                                  String authType,
                                  boolean autoLogin,
                                  boolean sendPassword,
                                  boolean strangers,
                                  boolean strangersWithMx,
                                  boolean strangersVerify,
                                  boolean communityLogo)
                           throws SystemException
Throws:
SystemException

getService

public static CompanyLocalService getService()

setService

public void setService(CompanyLocalService service)

Liferay 6.0.5