public class CountryLocalServiceUtil
extends Object
com.liferay.portal.service.impl.CountryLocalServiceImpl
and
is an access point for service operations in application layer code running
on the local server. 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.CountryLocalService
Constructor and Description |
---|
CountryLocalServiceUtil() |
Modifier and Type | Method and Description |
---|---|
static Country |
addCountry(Country country)
Adds the country to the database.
|
static 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) |
static Country |
createCountry(long countryId)
Creates a new country with the primary key.
|
static PersistedModel |
createPersistedModel(Serializable primaryKeyObj) |
static void |
deleteCompanyCountries(long companyId) |
static Country |
deleteCountry(Country country)
Deletes the country from the database.
|
static Country |
deleteCountry(long countryId)
Deletes the country with the primary key from the database.
|
static PersistedModel |
deletePersistedModel(PersistedModel persistedModel) |
static <T> T |
dslQuery(com.liferay.petra.sql.dsl.query.DSLQuery dslQuery) |
static int |
dslQueryCount(com.liferay.petra.sql.dsl.query.DSLQuery dslQuery) |
static DynamicQuery |
dynamicQuery() |
static <T> List<T> |
dynamicQuery(DynamicQuery dynamicQuery)
Performs a dynamic query on the database and returns the matching rows.
|
static <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.
|
static <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.
|
static long |
dynamicQueryCount(DynamicQuery dynamicQuery)
Returns the number of rows matching the dynamic query.
|
static long |
dynamicQueryCount(DynamicQuery dynamicQuery,
Projection projection)
Returns the number of rows matching the dynamic query.
|
static Country |
fetchCountry(long countryId) |
static Country |
fetchCountryByA2(long companyId,
String a2) |
static Country |
fetchCountryByA3(long companyId,
String a3) |
static Country |
fetchCountryByName(long companyId,
String name) |
static Country |
fetchCountryByNumber(long companyId,
String number) |
static Country |
fetchCountryByUuidAndCompanyId(String uuid,
long companyId)
Returns the country with the matching UUID and company.
|
static CountryLocalization |
fetchCountryLocalization(long countryId,
String languageId) |
static ActionableDynamicQuery |
getActionableDynamicQuery() |
static List<Country> |
getCompanyCountries(long companyId) |
static List<Country> |
getCompanyCountries(long companyId,
boolean active) |
static List<Country> |
getCompanyCountries(long companyId,
boolean active,
int start,
int end,
OrderByComparator<Country> orderByComparator) |
static List<Country> |
getCompanyCountries(long companyId,
int start,
int end,
OrderByComparator<Country> orderByComparator) |
static int |
getCompanyCountriesCount(long companyId) |
static int |
getCompanyCountriesCount(long companyId,
boolean active) |
static List<Country> |
getCountries(int start,
int end)
Returns a range of all the countries.
|
static int |
getCountriesCount()
Returns the number of countries.
|
static Country |
getCountry(long countryId)
Returns the country with the primary key.
|
static Country |
getCountryByA2(long companyId,
String a2) |
static Country |
getCountryByA3(long companyId,
String a3) |
static Country |
getCountryByName(long companyId,
String name) |
static Country |
getCountryByNumber(long companyId,
String number) |
static Country |
getCountryByUuidAndCompanyId(String uuid,
long companyId)
Returns the country with the matching UUID and company.
|
static CountryLocalization |
getCountryLocalization(long countryId,
String languageId) |
static List<CountryLocalization> |
getCountryLocalizations(long countryId) |
static ExportActionableDynamicQuery |
getExportActionableDynamicQuery(PortletDataContext portletDataContext) |
static IndexableActionableDynamicQuery |
getIndexableActionableDynamicQuery() |
static String |
getOSGiServiceIdentifier()
Returns the OSGi service identifier.
|
static PersistedModel |
getPersistedModel(Serializable primaryKeyObj) |
static CountryLocalService |
getService() |
static BaseModelSearchResult<Country> |
searchCountries(long companyId,
Boolean active,
String keywords,
int start,
int end,
OrderByComparator<Country> orderByComparator) |
static void |
setService(CountryLocalService service) |
static Country |
updateActive(long countryId,
boolean active) |
static Country |
updateCountry(Country country)
Updates the country in the database or adds it if it does not yet exist.
|
static Country |
updateCountry(long countryId,
String a2,
String a3,
boolean active,
boolean billingAllowed,
String idd,
String name,
String number,
double position,
boolean shippingAllowed,
boolean subjectToVAT) |
static CountryLocalization |
updateCountryLocalization(Country country,
String languageId,
String title) |
static List<CountryLocalization> |
updateCountryLocalizations(Country country,
Map<String,String> titleMap) |
static Country |
updateGroupFilterEnabled(long countryId,
boolean groupFilterEnabled) |
public static Country addCountry(Country country)
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.
country
- the countrypublic static 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
PortalException
public static Country createCountry(long countryId)
countryId
- the primary key for the new countrypublic static PersistedModel createPersistedModel(Serializable primaryKeyObj) throws PortalException
PortalException
public static void deleteCompanyCountries(long companyId) throws PortalException
PortalException
public static Country deleteCountry(Country country) throws PortalException
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.
country
- the countryPortalException
public static Country deleteCountry(long countryId) throws PortalException
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.
countryId
- the primary key of the countryPortalException
- if a country with the primary key could not be foundpublic static PersistedModel deletePersistedModel(PersistedModel persistedModel) throws PortalException
PortalException
public static <T> T dslQuery(com.liferay.petra.sql.dsl.query.DSLQuery dslQuery)
public static int dslQueryCount(com.liferay.petra.sql.dsl.query.DSLQuery dslQuery)
public static DynamicQuery dynamicQuery()
public static <T> List<T> dynamicQuery(DynamicQuery dynamicQuery)
dynamicQuery
- the dynamic querypublic static <T> List<T> dynamicQuery(DynamicQuery dynamicQuery, int start, int end)
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 com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS
will return the full result set. If orderByComparator
is specified, then the query will include the given ORDER BY logic. If orderByComparator
is absent, then the query will include the default ORDER BY logic from com.liferay.portal.model.impl.CountryModelImpl
.
dynamicQuery
- the dynamic querystart
- the lower bound of the range of model instancesend
- the upper bound of the range of model instances (not inclusive)public static <T> List<T> dynamicQuery(DynamicQuery dynamicQuery, int start, int end, OrderByComparator<T> orderByComparator)
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 com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS
will return the full result set. If orderByComparator
is specified, then the query will include the given ORDER BY logic. If orderByComparator
is absent, then the query will include the default ORDER BY logic from com.liferay.portal.model.impl.CountryModelImpl
.
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 (optionally null
)public static long dynamicQueryCount(DynamicQuery dynamicQuery)
dynamicQuery
- the dynamic querypublic static long dynamicQueryCount(DynamicQuery dynamicQuery, Projection projection)
dynamicQuery
- the dynamic queryprojection
- the projection to apply to the querypublic static Country fetchCountry(long countryId)
public static Country fetchCountryByA2(long companyId, String a2)
public static Country fetchCountryByA3(long companyId, String a3)
public static Country fetchCountryByName(long companyId, String name)
public static Country fetchCountryByNumber(long companyId, String number)
public static Country fetchCountryByUuidAndCompanyId(String uuid, long companyId)
uuid
- the country's UUIDcompanyId
- the primary key of the companynull
if a matching country could not be foundpublic static CountryLocalization fetchCountryLocalization(long countryId, String languageId)
public static ActionableDynamicQuery getActionableDynamicQuery()
public static List<Country> getCompanyCountries(long companyId)
public static List<Country> getCompanyCountries(long companyId, boolean active)
public static List<Country> getCompanyCountries(long companyId, boolean active, int start, int end, OrderByComparator<Country> orderByComparator)
public static List<Country> getCompanyCountries(long companyId, int start, int end, OrderByComparator<Country> orderByComparator)
public static int getCompanyCountriesCount(long companyId)
public static int getCompanyCountriesCount(long companyId, boolean active)
public static List<Country> getCountries(int start, int end)
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 com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS
will return the full result set. If orderByComparator
is specified, then the query will include the given ORDER BY logic. If orderByComparator
is absent, then the query will include the default ORDER BY logic from com.liferay.portal.model.impl.CountryModelImpl
.
start
- the lower bound of the range of countriesend
- the upper bound of the range of countries (not inclusive)public static int getCountriesCount()
public static Country getCountry(long countryId) throws PortalException
countryId
- the primary key of the countryPortalException
- if a country with the primary key could not be foundpublic static Country getCountryByA2(long companyId, String a2) throws PortalException
PortalException
public static Country getCountryByA3(long companyId, String a3) throws PortalException
PortalException
public static Country getCountryByName(long companyId, String name) throws PortalException
PortalException
public static Country getCountryByNumber(long companyId, String number) throws PortalException
PortalException
public static Country getCountryByUuidAndCompanyId(String uuid, long companyId) throws PortalException
uuid
- the country's UUIDcompanyId
- the primary key of the companyPortalException
- if a matching country could not be foundpublic static CountryLocalization getCountryLocalization(long countryId, String languageId) throws PortalException
PortalException
public static List<CountryLocalization> getCountryLocalizations(long countryId)
public static ExportActionableDynamicQuery getExportActionableDynamicQuery(PortletDataContext portletDataContext)
public static IndexableActionableDynamicQuery getIndexableActionableDynamicQuery()
public static String getOSGiServiceIdentifier()
public static PersistedModel getPersistedModel(Serializable primaryKeyObj) throws PortalException
PortalException
public static BaseModelSearchResult<Country> searchCountries(long companyId, Boolean active, String keywords, int start, int end, OrderByComparator<Country> orderByComparator) throws PortalException
PortalException
public static Country updateActive(long countryId, boolean active) throws PortalException
PortalException
public static Country updateCountry(Country country)
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.
country
- the countrypublic static 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
PortalException
public static CountryLocalization updateCountryLocalization(Country country, String languageId, String title) throws PortalException
PortalException
public static List<CountryLocalization> updateCountryLocalizations(Country country, Map<String,String> titleMap) throws PortalException
PortalException
public static Country updateGroupFilterEnabled(long countryId, boolean groupFilterEnabled) throws PortalException
PortalException
public static CountryLocalService getService()
public static void setService(CountryLocalService service)