Liferay 6.0-ee-sp2

com.liferay.portal.service
Interface CompanyLocalService

All Superinterfaces:
PersistedModelLocalService
All Known Implementing Classes:
CompanyLocalServiceWrapper

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

The interface for the company local service.

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, com.liferay.portal.service.impl.CompanyLocalServiceImpl

Method Summary
 Company addCompany(Company company)
          Adds the company to the database.
 Company addCompany(String webId, String virtualHostname, 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)
          Returns the number of rows that match the dynamic query.
 String getBeanIdentifier()
          Returns the Spring bean ID for this bean.
 List<Company> getCompanies()
           
 List<Company> getCompanies(boolean system)
           
 List<Company> getCompanies(int start, int end)
          Returns a range of all the companies.
 int getCompaniesCount()
          Returns the number of companies.
 int getCompaniesCount(boolean system)
           
 Company getCompany(long companyId)
          Returns the company with the primary key.
 Company getCompanyById(long companyId)
           
 Company getCompanyByLogoId(long logoId)
           
 Company getCompanyByMx(String mx)
           
 Company getCompanyByVirtualHost(String virtualHostname)
           
 Company getCompanyByWebId(String webId)
           
 PersistedModel getPersistedModel(Serializable primaryKeyObj)
           
 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)
           
 void setBeanIdentifier(String beanIdentifier)
          Sets the Spring bean ID for this bean.
 Company updateCompany(Company company)
          Updates the company in the database or adds it if it does not yet exist.
 Company updateCompany(Company company, boolean merge)
          Updates the company in the database or adds it if it does not yet exist.
 Company updateCompany(long companyId, String virtualHostname, String mx, int maxUsers)
           
 Company updateCompany(long companyId, String virtualHostname, 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
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
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
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
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
start - the lower bound of the range of model instances
end - the upper bound of the range of model instances (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
start - the lower bound of the range of model instances
end - the upper bound of the range of model instances (not inclusive)
orderByComparator - the comparator to order the results by (optionally null)
Returns:
the ordered range of matching rows
Throws:
SystemException - if a system exception occurred

dynamicQueryCount

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

Parameters:
dynamicQuery - the dynamic query
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
Returns the company with the primary key.

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

getPersistedModel

@Transactional(propagation=SUPPORTS,
               readOnly=true)
PersistedModel getPersistedModel(Serializable primaryKeyObj)
                                 throws PortalException,
                                        SystemException
Specified by:
getPersistedModel in interface PersistedModelLocalService
Throws:
PortalException
SystemException

getCompanies

@Transactional(propagation=SUPPORTS,
               readOnly=true)
List<Company> getCompanies(int start,
                                                                    int end)
                           throws SystemException
Returns 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
end - the upper bound of the range of companies (not inclusive)
Returns:
the range of companies
Throws:
SystemException - if a system exception occurred

getCompaniesCount

@Transactional(propagation=SUPPORTS,
               readOnly=true)
int getCompaniesCount()
                      throws SystemException
Returns 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 or adds it if it does not yet exist. Also notifies the appropriate model listeners.

Parameters:
company - the company
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 or adds it if it does not yet exist. Also notifies the appropriate model listeners.

Parameters:
company - the company
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

getBeanIdentifier

String getBeanIdentifier()
Returns the Spring bean ID for this bean.

Returns:
the Spring bean ID for this bean

setBeanIdentifier

void setBeanIdentifier(String beanIdentifier)
Sets the Spring bean ID for this bean.

Parameters:
beanIdentifier - the Spring bean ID for this bean

addCompany

Company addCompany(String webId,
                   String virtualHostname,
                   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 virtualHostname)
                                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 virtualHostname,
                      String mx,
                      int maxUsers)
                      throws PortalException,
                             SystemException
Throws:
PortalException
SystemException

updateCompany

Company updateCompany(long companyId,
                      String virtualHostname,
                      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-ee-sp2