Liferay 6.0.5

com.liferay.portal.service
Interface CompanyLocalService

All Known Implementing Classes:
CompanyLocalServiceBaseImpl, CompanyLocalServiceImpl, CompanyLocalServiceWrapper

@Transactional(isolation=PORTAL,
               rollbackFor={PortalException.class,SystemException.class})
public interface CompanyLocalService

The interface for the company local service.

Never modify or reference this interface directly. Always use CompanyLocalServiceUtil to access the company local service. Add custom service methods to CompanyLocalServiceImpl and rerun ServiceBuilder to automatically copy the method declarations to this interface.

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:
CompanyLocalServiceUtil, CompanyLocalServiceBaseImpl, CompanyLocalServiceImpl
ServiceBuilder generated this class. Modifications in this class will be overwritten the next time is generated.

Method Summary
 Company addCompany(Company company)
          Adds the company to the database.
 Company addCompany(String webId, String virtualHost, String mx, String shardName, boolean system, int maxUsers)
           
 Company checkCompany(String webId)
           
 Company checkCompany(String webId, String mx, String shardName)
           
 void checkCompanyKey(long companyId)
           
 Company createCompany(long companyId)
          Creates a new company with the primary key.
 void deleteCompany(Company company)
          Deletes the company from the database.
 void deleteCompany(long companyId)
          Deletes the company with the primary key from the database.
 void deleteLogo(long companyId)
           
 List dynamicQuery(DynamicQuery dynamicQuery)
          Performs a dynamic query on the database and returns the matching rows.
 List dynamicQuery(DynamicQuery dynamicQuery, int start, int end)
          Performs a dynamic query on the database and returns a range of the matching rows.
 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.
 long dynamicQueryCount(DynamicQuery dynamicQuery)
          Counts the number of rows that match the dynamic query.
 List<Company> getCompanies()
           
 List<Company> getCompanies(boolean system)
           
 List<Company> getCompanies(int start, int end)
          Gets a range of all the companies.
 int getCompaniesCount()
          Gets the number of companies.
 int getCompaniesCount(boolean system)
           
 Company getCompany(long companyId)
          Gets the company with the primary key.
 Company getCompanyById(long companyId)
           
 Company getCompanyByLogoId(long logoId)
           
 Company getCompanyByMx(String mx)
           
 Company getCompanyByVirtualHost(String virtualHost)
           
 Company getCompanyByWebId(String webId)
           
 void removePreferences(long companyId, String[] keys)
           
 Hits search(long companyId, long userId, String keywords, int start, int end)
           
 Hits search(long companyId, long userId, String portletId, long groupId, String type, String keywords, int start, int end)
           
 Company updateCompany(Company company)
          Updates the company in the database.
 Company updateCompany(Company company, boolean merge)
          Updates the company in the database.
 Company updateCompany(long companyId, String virtualHost, String mx, int maxUsers)
           
 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)
           
 void updateDisplay(long companyId, String languageId, String timeZoneId)
           
 void updateLogo(long companyId, byte[] bytes)
           
 void updateLogo(long companyId, File file)
           
 void updateLogo(long companyId, InputStream is)
           
 void updatePreferences(long companyId, UnicodeProperties properties)
           
 void updateSecurity(long companyId, String authType, boolean autoLogin, boolean sendPassword, boolean strangers, boolean strangersWithMx, boolean strangersVerify, boolean communityLogo)
           
 

Method Detail

addCompany

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

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

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

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

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

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

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

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

@Transactional(propagation=SUPPORTS,
               readOnly=true)
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

@Transactional(propagation=SUPPORTS,
               readOnly=true)
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

@Transactional(propagation=SUPPORTS,
               readOnly=true)
int getCompaniesCount()
                      throws SystemException
Gets the number of companies.

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

updateCompany

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

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

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

checkCompany

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

checkCompany

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

checkCompanyKey

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

deleteLogo

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

getCompanies

@Transactional(propagation=SUPPORTS,
               readOnly=true)
List<Company> getCompanies()
                           throws SystemException
Throws:
SystemException

getCompanies

@Transactional(propagation=SUPPORTS,
               readOnly=true)
List<Company> getCompanies(boolean system)
                           throws SystemException
Throws:
SystemException

getCompaniesCount

@Transactional(propagation=SUPPORTS,
               readOnly=true)
int getCompaniesCount(boolean system)
                      throws SystemException
Throws:
SystemException

getCompanyById

@Transactional(propagation=SUPPORTS,
               readOnly=true)
Company getCompanyById(long companyId)
                       throws PortalException,
                              SystemException
Throws:
PortalException
SystemException

getCompanyByLogoId

@Transactional(propagation=SUPPORTS,
               readOnly=true)
Company getCompanyByLogoId(long logoId)
                           throws PortalException,
                                  SystemException
Throws:
PortalException
SystemException

getCompanyByMx

@Transactional(propagation=SUPPORTS,
               readOnly=true)
Company getCompanyByMx(String mx)
                       throws PortalException,
                              SystemException
Throws:
PortalException
SystemException

getCompanyByVirtualHost

@Transactional(propagation=SUPPORTS,
               readOnly=true)
Company getCompanyByVirtualHost(String virtualHost)
                                throws PortalException,
                                       SystemException
Throws:
PortalException
SystemException

getCompanyByWebId

@Transactional(propagation=SUPPORTS,
               readOnly=true)
Company getCompanyByWebId(String webId)
                          throws PortalException,
                                 SystemException
Throws:
PortalException
SystemException

removePreferences

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

search

@Transactional(propagation=SUPPORTS,
               readOnly=true)
Hits search(long companyId,
                                                     long userId,
                                                     String keywords,
                                                     int start,
                                                     int end)
            throws SystemException
Throws:
SystemException

search

@Transactional(propagation=SUPPORTS,
               readOnly=true)
Hits search(long companyId,
                                                     long userId,
                                                     String portletId,
                                                     long groupId,
                                                     String type,
                                                     String keywords,
                                                     int start,
                                                     int end)
            throws SystemException
Throws:
SystemException

updateCompany

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

updateCompany

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

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

updateLogo

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

updateLogo

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

updateLogo

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

updatePreferences

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

updateSecurity

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

Liferay 6.0.5