Interface CountryLocalService
- All Superinterfaces:
BaseLocalService
,CTService<Country>
,PersistedModelLocalService
- All Known Implementing Classes:
CountryLocalServiceWrapper
- Author:
- Brian Wing Shun Chan
- See Also:
- {$generated.description}
-
Method Summary
Modifier and TypeMethodDescriptionaddCountry
(Country country) Adds the country to the database.addCountry
(String a2, String a3, boolean active, boolean billingAllowed, String idd, String name, String number, double position, boolean shippingAllowed, boolean subjectToVAT, boolean zipRequired, ServiceContext serviceContext) createCountry
(long countryId) Creates a new country with the primary key.createPersistedModel
(Serializable primaryKeyObj) void
deleteCompanyCountries
(long companyId) deleteCountry
(long countryId) Deletes the country with the primary key from the database.deleteCountry
(Country country) Deletes the country from the database.deletePersistedModel
(PersistedModel persistedModel) <T> T
dslQuery
(com.liferay.petra.sql.dsl.query.DSLQuery dslQuery) int
dslQueryCount
(com.liferay.petra.sql.dsl.query.DSLQuery dslQuery) <T> List<T>
dynamicQuery
(DynamicQuery dynamicQuery) Performs a dynamic query on the database and returns the matching rows.<T> List<T>
dynamicQuery
(DynamicQuery dynamicQuery, int start, int end) Performs a dynamic query on the database and returns a range of the matching rows.<T> List<T>
dynamicQuery
(DynamicQuery dynamicQuery, int start, int end, OrderByComparator<T> 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 matching the dynamic query.long
dynamicQueryCount
(DynamicQuery dynamicQuery, Projection projection) Returns the number of rows matching the dynamic query.fetchCountry
(long countryId) fetchCountryByA2
(long companyId, String a2) fetchCountryByA3
(long companyId, String a3) fetchCountryByName
(long companyId, String name) fetchCountryByNumber
(long companyId, String number) fetchCountryByUuidAndCompanyId
(String uuid, long companyId) Returns the country with the matching UUID and company.fetchCountryLocalization
(long countryId, String languageId) getCompanyCountries
(long companyId) getCompanyCountries
(long companyId, boolean active) getCompanyCountries
(long companyId, boolean active, int start, int end, OrderByComparator<Country> orderByComparator) getCompanyCountries
(long companyId, int start, int end, OrderByComparator<Country> orderByComparator) int
getCompanyCountriesCount
(long companyId) int
getCompanyCountriesCount
(long companyId, boolean active) getCountries
(int start, int end) Returns a range of all the countries.int
Returns the number of countries.getCountry
(long countryId) Returns the country with the primary key.getCountryByA2
(long companyId, String a2) getCountryByA3
(long companyId, String a3) getCountryByName
(long companyId, String name) getCountryByNumber
(long companyId, String number) getCountryByUuidAndCompanyId
(String uuid, long companyId) Returns the country with the matching UUID and company.getCountryLocalization
(long countryId, String languageId) getCountryLocalizations
(long countryId) getExportActionableDynamicQuery
(PortletDataContext portletDataContext) Returns the OSGi service identifier.getPersistedModel
(Serializable primaryKeyObj) searchCountries
(long companyId, Boolean active, String keywords, int start, int end, OrderByComparator<Country> orderByComparator) updateActive
(long countryId, boolean active) updateCountry
(long countryId, String a2, String a3, boolean active, boolean billingAllowed, String idd, String name, String number, double position, boolean shippingAllowed, boolean subjectToVAT) updateCountry
(Country country) Updates the country in the database or adds it if it does not yet exist.updateCountryLocalization
(Country country, String languageId, String title) updateCountryLocalizations
(Country country, Map<String, String> titleMap) updateGroupFilterEnabled
(long countryId, boolean groupFilterEnabled) <R,
E extends Throwable>
RupdateWithUnsafeFunction
(com.liferay.petra.function.UnsafeFunction<CTPersistence<Country>, R, E> updateUnsafeFunction) Methods inherited from interface com.liferay.portal.kernel.service.PersistedModelLocalService
fetchPersistedModel, getBasePersistence
-
Method Details
-
addCountry
Adds the country to the database. Also notifies the appropriate model listeners.Important: Inspect CountryLocalServiceImpl for overloaded versions of the method. If provided, use these entry points to the API, as the implementation logic may require the additional parameters defined there.
- Parameters:
country
- the country- Returns:
- the country that was added
-
addCountry
Country addCountry(String a2, String a3, boolean active, boolean billingAllowed, String idd, String name, String number, double position, boolean shippingAllowed, boolean subjectToVAT, boolean zipRequired, ServiceContext serviceContext) throws PortalException - Throws:
PortalException
-
createCountry
Creates a new country with the primary key. Does not add the country to the database.- Parameters:
countryId
- the primary key for the new country- Returns:
- the new country
-
createPersistedModel
- Specified by:
createPersistedModel
in interfacePersistedModelLocalService
- Throws:
PortalException
-
deleteCompanyCountries
- Throws:
PortalException
-
deleteCountry
@Indexable(type=DELETE) @SystemEvent(type=1) Country deleteCountry(Country country) throws PortalException Deletes the country from the database. Also notifies the appropriate model listeners.Important: Inspect CountryLocalServiceImpl for overloaded versions of the method. If provided, use these entry points to the API, as the implementation logic may require the additional parameters defined there.
- Parameters:
country
- the country- Returns:
- the country that was removed
- Throws:
PortalException
-
deleteCountry
Deletes the country with the primary key from the database. Also notifies the appropriate model listeners.Important: Inspect CountryLocalServiceImpl for overloaded versions of the method. If provided, use these entry points to the API, as the implementation logic may require the additional parameters defined there.
- Parameters:
countryId
- the primary key of the country- Returns:
- the country that was removed
- Throws:
PortalException
- if a country with the primary key could not be found
-
deletePersistedModel
- Specified by:
deletePersistedModel
in interfacePersistedModelLocalService
- Throws:
PortalException
-
dslQuery
@Transactional(propagation=SUPPORTS, readOnly=true) <T> T dslQuery(com.liferay.petra.sql.dsl.query.DSLQuery dslQuery) - Specified by:
dslQuery
in interfacePersistedModelLocalService
-
dslQueryCount
@Transactional(propagation=SUPPORTS, readOnly=true) int dslQueryCount(com.liferay.petra.sql.dsl.query.DSLQuery dslQuery) - Specified by:
dslQueryCount
in interfacePersistedModelLocalService
-
dynamicQuery
-
dynamicQuery
@Transactional(propagation=SUPPORTS, readOnly=true) <T> List<T> dynamicQuery(DynamicQuery dynamicQuery) Performs a dynamic query on the database and returns the matching rows.- Parameters:
dynamicQuery
- the dynamic query- Returns:
- the matching rows
-
dynamicQuery
@Transactional(propagation=SUPPORTS, readOnly=true) <T> List<T> dynamicQuery(DynamicQuery dynamicQuery, int start, int end) 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
andend
are not primary keys, they are indexes in the result set. Thus,0
refers to the first result in the set. Setting bothstart
andend
tocom.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS
will return the full result set. IforderByComparator
is specified, then the query will include the given ORDER BY logic. IforderByComparator
is absent, then the query will include the default ORDER BY logic fromcom.liferay.portal.model.impl.CountryModelImpl
.- Parameters:
dynamicQuery
- the dynamic querystart
- the lower bound of the range of model instancesend
- the upper bound of the range of model instances (not inclusive)- Returns:
- the range of matching rows
-
dynamicQuery
@Transactional(propagation=SUPPORTS, readOnly=true) <T> List<T> dynamicQuery(DynamicQuery dynamicQuery, int start, int end, OrderByComparator<T> orderByComparator) 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
andend
are not primary keys, they are indexes in the result set. Thus,0
refers to the first result in the set. Setting bothstart
andend
tocom.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS
will return the full result set. IforderByComparator
is specified, then the query will include the given ORDER BY logic. IforderByComparator
is absent, then the query will include the default ORDER BY logic fromcom.liferay.portal.model.impl.CountryModelImpl
.- Parameters:
dynamicQuery
- the dynamic querystart
- the lower bound of the range of model instancesend
- the upper bound of the range of model instances (not inclusive)orderByComparator
- the comparator to order the results by (optionallynull
)- Returns:
- the ordered range of matching rows
-
dynamicQueryCount
@Transactional(propagation=SUPPORTS, readOnly=true) long dynamicQueryCount(DynamicQuery dynamicQuery) Returns the number of rows matching the dynamic query.- Parameters:
dynamicQuery
- the dynamic query- Returns:
- the number of rows matching the dynamic query
-
dynamicQueryCount
@Transactional(propagation=SUPPORTS, readOnly=true) long dynamicQueryCount(DynamicQuery dynamicQuery, Projection projection) Returns the number of rows matching the dynamic query.- Parameters:
dynamicQuery
- the dynamic queryprojection
- the projection to apply to the query- Returns:
- the number of rows matching the dynamic query
-
fetchCountry
-
fetchCountryByA2
@Transactional(propagation=SUPPORTS, readOnly=true) Country fetchCountryByA2(long companyId, String a2) -
fetchCountryByA3
@Transactional(propagation=SUPPORTS, readOnly=true) Country fetchCountryByA3(long companyId, String a3) -
fetchCountryByName
@Transactional(propagation=SUPPORTS, readOnly=true) Country fetchCountryByName(long companyId, String name) -
fetchCountryByNumber
@Transactional(propagation=SUPPORTS, readOnly=true) Country fetchCountryByNumber(long companyId, String number) -
fetchCountryByUuidAndCompanyId
@Transactional(propagation=SUPPORTS, readOnly=true) Country fetchCountryByUuidAndCompanyId(String uuid, long companyId) Returns the country with the matching UUID and company.- Parameters:
uuid
- the country's UUIDcompanyId
- the primary key of the company- Returns:
- the matching country, or
null
if a matching country could not be found
-
fetchCountryLocalization
@Transactional(propagation=SUPPORTS, readOnly=true) CountryLocalization fetchCountryLocalization(long countryId, String languageId) -
getActionableDynamicQuery
@Transactional(propagation=SUPPORTS, readOnly=true) ActionableDynamicQuery getActionableDynamicQuery() -
getCompanyCountries
@Transactional(propagation=SUPPORTS, readOnly=true) List<Country> getCompanyCountries(long companyId) -
getCompanyCountries
@Transactional(propagation=SUPPORTS, readOnly=true) List<Country> getCompanyCountries(long companyId, boolean active) -
getCompanyCountries
@Transactional(propagation=SUPPORTS, readOnly=true) List<Country> getCompanyCountries(long companyId, boolean active, int start, int end, OrderByComparator<Country> orderByComparator) -
getCompanyCountries
@Transactional(propagation=SUPPORTS, readOnly=true) List<Country> getCompanyCountries(long companyId, int start, int end, OrderByComparator<Country> orderByComparator) -
getCompanyCountriesCount
-
getCompanyCountriesCount
@Transactional(propagation=SUPPORTS, readOnly=true) int getCompanyCountriesCount(long companyId, boolean active) -
getCountries
Returns a range of all the countries.Useful when paginating results. Returns a maximum of
end - start
instances.start
andend
are not primary keys, they are indexes in the result set. Thus,0
refers to the first result in the set. Setting bothstart
andend
tocom.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS
will return the full result set. IforderByComparator
is specified, then the query will include the given ORDER BY logic. IforderByComparator
is absent, then the query will include the default ORDER BY logic fromcom.liferay.portal.model.impl.CountryModelImpl
.- Parameters:
start
- the lower bound of the range of countriesend
- the upper bound of the range of countries (not inclusive)- Returns:
- the range of countries
-
getCountriesCount
Returns the number of countries.- Returns:
- the number of countries
-
getCountry
@Transactional(propagation=SUPPORTS, readOnly=true) Country getCountry(long countryId) throws PortalException Returns the country with the primary key.- Parameters:
countryId
- the primary key of the country- Returns:
- the country
- Throws:
PortalException
- if a country with the primary key could not be found
-
getCountryByA2
@Transactional(propagation=SUPPORTS, readOnly=true) Country getCountryByA2(long companyId, String a2) throws PortalException - Throws:
PortalException
-
getCountryByA3
@Transactional(propagation=SUPPORTS, readOnly=true) Country getCountryByA3(long companyId, String a3) throws PortalException - Throws:
PortalException
-
getCountryByName
@Transactional(propagation=SUPPORTS, readOnly=true) Country getCountryByName(long companyId, String name) throws PortalException - Throws:
PortalException
-
getCountryByNumber
@Transactional(propagation=SUPPORTS, readOnly=true) Country getCountryByNumber(long companyId, String number) throws PortalException - Throws:
PortalException
-
getCountryByUuidAndCompanyId
@Transactional(propagation=SUPPORTS, readOnly=true) Country getCountryByUuidAndCompanyId(String uuid, long companyId) throws PortalException Returns the country with the matching UUID and company.- Parameters:
uuid
- the country's UUIDcompanyId
- the primary key of the company- Returns:
- the matching country
- Throws:
PortalException
- if a matching country could not be found
-
getCountryLocalization
@Transactional(propagation=SUPPORTS, readOnly=true) CountryLocalization getCountryLocalization(long countryId, String languageId) throws PortalException - Throws:
PortalException
-
getCountryLocalizations
@Transactional(propagation=SUPPORTS, readOnly=true) List<CountryLocalization> getCountryLocalizations(long countryId) -
getExportActionableDynamicQuery
@Transactional(propagation=SUPPORTS, readOnly=true) ExportActionableDynamicQuery getExportActionableDynamicQuery(PortletDataContext portletDataContext) -
getIndexableActionableDynamicQuery
@Transactional(propagation=SUPPORTS, readOnly=true) IndexableActionableDynamicQuery getIndexableActionableDynamicQuery() -
getOSGiServiceIdentifier
String getOSGiServiceIdentifier()Returns the OSGi service identifier.- Returns:
- the OSGi service identifier
-
getPersistedModel
@Transactional(propagation=SUPPORTS, readOnly=true) PersistedModel getPersistedModel(Serializable primaryKeyObj) throws PortalException - Specified by:
getPersistedModel
in interfacePersistedModelLocalService
- Throws:
PortalException
-
searchCountries
@Transactional(propagation=SUPPORTS, readOnly=true) BaseModelSearchResult<Country> searchCountries(long companyId, Boolean active, String keywords, int start, int end, OrderByComparator<Country> orderByComparator) throws PortalException - Throws:
PortalException
-
updateActive
- Throws:
PortalException
-
updateCountry
Updates the country in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners.Important: Inspect CountryLocalServiceImpl for overloaded versions of the method. If provided, use these entry points to the API, as the implementation logic may require the additional parameters defined there.
- Parameters:
country
- the country- Returns:
- the country that was updated
-
updateCountry
Country updateCountry(long countryId, String a2, String a3, boolean active, boolean billingAllowed, String idd, String name, String number, double position, boolean shippingAllowed, boolean subjectToVAT) throws PortalException - Throws:
PortalException
-
updateCountryLocalization
CountryLocalization updateCountryLocalization(Country country, String languageId, String title) throws PortalException - Throws:
PortalException
-
updateCountryLocalizations
List<CountryLocalization> updateCountryLocalizations(Country country, Map<String, String> titleMap) throws PortalException- Throws:
PortalException
-
updateGroupFilterEnabled
- Throws:
PortalException
-
getCTPersistence
- Specified by:
getCTPersistence
in interfaceCTService<Country>
-
getModelClass
- Specified by:
getModelClass
in interfaceCTService<Country>
-
updateWithUnsafeFunction
@Transactional(rollbackFor=java.lang.Throwable.class) <R,E extends Throwable> R updateWithUnsafeFunction(com.liferay.petra.function.UnsafeFunction<CTPersistence<Country>, R, throws EE> updateUnsafeFunction) - Specified by:
updateWithUnsafeFunction
in interfaceCTService<Country>
- Throws:
E extends Throwable
-