@CTAware @ProviderType @Transactional(isolation=PORTAL, rollbackFor={PortalException.class,SystemException.class}) public interface RegionLocalService extends BaseLocalService, CTService<Region>, PersistedModelLocalService
RegionLocalServiceUtil
Modifier and Type | Method and Description |
---|---|
Region |
addRegion(long countryId,
boolean active,
String name,
double position,
String regionCode,
ServiceContext serviceContext) |
Region |
addRegion(Region region)
Adds the region to the database.
|
PersistedModel |
createPersistedModel(Serializable primaryKeyObj) |
Region |
createRegion(long regionId)
Creates a new region with the primary key.
|
void |
deleteCountryRegions(long countryId) |
PersistedModel |
deletePersistedModel(PersistedModel persistedModel) |
Region |
deleteRegion(long regionId)
Deletes the region with the primary key from the database.
|
Region |
deleteRegion(Region region)
Deletes the region from the database.
|
<T> T |
dslQuery(com.liferay.petra.sql.dsl.query.DSLQuery dslQuery) |
int |
dslQueryCount(com.liferay.petra.sql.dsl.query.DSLQuery dslQuery) |
DynamicQuery |
dynamicQuery() |
<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.
|
Region |
fetchRegion(long regionId) |
Region |
fetchRegion(long countryId,
String regionCode) |
Region |
fetchRegionByUuidAndCompanyId(String uuid,
long companyId)
Returns the region with the matching UUID and company.
|
RegionLocalization |
fetchRegionLocalization(long regionId,
String languageId) |
ActionableDynamicQuery |
getActionableDynamicQuery() |
CTPersistence<Region> |
getCTPersistence() |
ExportActionableDynamicQuery |
getExportActionableDynamicQuery(PortletDataContext portletDataContext) |
IndexableActionableDynamicQuery |
getIndexableActionableDynamicQuery() |
Class<Region> |
getModelClass() |
String |
getOSGiServiceIdentifier()
Returns the OSGi service identifier.
|
PersistedModel |
getPersistedModel(Serializable primaryKeyObj) |
Region |
getRegion(long regionId)
Returns the region with the primary key.
|
Region |
getRegion(long countryId,
String regionCode) |
Region |
getRegionByUuidAndCompanyId(String uuid,
long companyId)
Returns the region with the matching UUID and company.
|
RegionLocalization |
getRegionLocalization(long regionId,
String languageId) |
List<RegionLocalization> |
getRegionLocalizations(long regionId) |
List<Region> |
getRegions(int start,
int end)
Returns a range of all the regions.
|
List<Region> |
getRegions(long countryId,
boolean active) |
List<Region> |
getRegions(long countryId,
boolean active,
int start,
int end,
OrderByComparator<Region> orderByComparator) |
List<Region> |
getRegions(long countryId,
int start,
int end,
OrderByComparator<Region> orderByComparator) |
List<Region> |
getRegions(long companyId,
String a2,
boolean active) |
int |
getRegionsCount()
Returns the number of regions.
|
int |
getRegionsCount(long countryId) |
int |
getRegionsCount(long countryId,
boolean active) |
BaseModelSearchResult<Region> |
searchRegions(long companyId,
Boolean active,
String keywords,
LinkedHashMap<String,Object> params,
int start,
int end,
OrderByComparator<Region> orderByComparator) |
Region |
updateActive(long regionId,
boolean active) |
Region |
updateRegion(long regionId,
boolean active,
String name,
double position,
String regionCode) |
Region |
updateRegion(Region region)
Updates the region in the database or adds it if it does not yet exist.
|
RegionLocalization |
updateRegionLocalization(Region region,
String languageId,
String title) |
List<RegionLocalization> |
updateRegionLocalizations(Region region,
Map<String,String> titleMap) |
<R,E extends Throwable> |
updateWithUnsafeFunction(com.liferay.petra.function.UnsafeFunction<CTPersistence<Region>,R,E> updateUnsafeFunction) |
fetchPersistedModel, getBasePersistence
Region addRegion(long countryId, boolean active, String name, double position, String regionCode, ServiceContext serviceContext) throws PortalException
PortalException
@Indexable(type=REINDEX) Region addRegion(Region region)
Important: Inspect RegionLocalServiceImpl 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.
region
- the regionPersistedModel createPersistedModel(Serializable primaryKeyObj) throws PortalException
createPersistedModel
in interface PersistedModelLocalService
PortalException
@Transactional(enabled=false) Region createRegion(long regionId)
regionId
- the primary key for the new regionvoid deleteCountryRegions(long countryId)
PersistedModel deletePersistedModel(PersistedModel persistedModel) throws PortalException
deletePersistedModel
in interface PersistedModelLocalService
PortalException
@Indexable(type=DELETE) Region deleteRegion(long regionId) throws PortalException
Important: Inspect RegionLocalServiceImpl 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.
regionId
- the primary key of the regionPortalException
- if a region with the primary key could not be found@Indexable(type=DELETE) @SystemEvent(type=1) Region deleteRegion(Region region)
Important: Inspect RegionLocalServiceImpl 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.
region
- the region@Transactional(propagation=SUPPORTS, readOnly=true) <T> T dslQuery(com.liferay.petra.sql.dsl.query.DSLQuery dslQuery)
dslQuery
in interface PersistedModelLocalService
@Transactional(propagation=SUPPORTS, readOnly=true) int dslQueryCount(com.liferay.petra.sql.dsl.query.DSLQuery dslQuery)
dslQueryCount
in interface PersistedModelLocalService
@Transactional(propagation=SUPPORTS, readOnly=true) DynamicQuery dynamicQuery()
@Transactional(propagation=SUPPORTS, readOnly=true) <T> List<T> dynamicQuery(DynamicQuery dynamicQuery)
dynamicQuery
- the dynamic query@Transactional(propagation=SUPPORTS, readOnly=true) <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.RegionModelImpl
.
dynamicQuery
- the dynamic querystart
- the lower bound of the range of model instancesend
- the upper bound of the range of model instances (not inclusive)@Transactional(propagation=SUPPORTS, readOnly=true) <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.RegionModelImpl
.
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
)@Transactional(propagation=SUPPORTS, readOnly=true) long dynamicQueryCount(DynamicQuery dynamicQuery)
dynamicQuery
- the dynamic query@Transactional(propagation=SUPPORTS, readOnly=true) long dynamicQueryCount(DynamicQuery dynamicQuery, Projection projection)
dynamicQuery
- the dynamic queryprojection
- the projection to apply to the query@Transactional(propagation=SUPPORTS, readOnly=true) Region fetchRegion(long regionId)
@Transactional(propagation=SUPPORTS, readOnly=true) Region fetchRegion(long countryId, String regionCode)
@Transactional(propagation=SUPPORTS, readOnly=true) Region fetchRegionByUuidAndCompanyId(String uuid, long companyId)
uuid
- the region's UUIDcompanyId
- the primary key of the companynull
if a matching region could not be found@Transactional(propagation=SUPPORTS, readOnly=true) RegionLocalization fetchRegionLocalization(long regionId, String languageId)
@Transactional(propagation=SUPPORTS, readOnly=true) ActionableDynamicQuery getActionableDynamicQuery()
@Transactional(propagation=SUPPORTS, readOnly=true) ExportActionableDynamicQuery getExportActionableDynamicQuery(PortletDataContext portletDataContext)
@Transactional(propagation=SUPPORTS, readOnly=true) IndexableActionableDynamicQuery getIndexableActionableDynamicQuery()
String getOSGiServiceIdentifier()
@Transactional(propagation=SUPPORTS, readOnly=true) PersistedModel getPersistedModel(Serializable primaryKeyObj) throws PortalException
getPersistedModel
in interface PersistedModelLocalService
PortalException
@Transactional(propagation=SUPPORTS, readOnly=true) Region getRegion(long regionId) throws PortalException
regionId
- the primary key of the regionPortalException
- if a region with the primary key could not be found@Transactional(propagation=SUPPORTS, readOnly=true) Region getRegion(long countryId, String regionCode) throws PortalException
PortalException
@Transactional(propagation=SUPPORTS, readOnly=true) Region getRegionByUuidAndCompanyId(String uuid, long companyId) throws PortalException
uuid
- the region's UUIDcompanyId
- the primary key of the companyPortalException
- if a matching region could not be found@Transactional(propagation=SUPPORTS, readOnly=true) RegionLocalization getRegionLocalization(long regionId, String languageId) throws PortalException
PortalException
@Transactional(propagation=SUPPORTS, readOnly=true) List<RegionLocalization> getRegionLocalizations(long regionId)
@Transactional(propagation=SUPPORTS, readOnly=true) List<Region> getRegions(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.RegionModelImpl
.
start
- the lower bound of the range of regionsend
- the upper bound of the range of regions (not inclusive)@Transactional(propagation=SUPPORTS, readOnly=true) List<Region> getRegions(long countryId, boolean active) throws PortalException
PortalException
@Transactional(propagation=SUPPORTS, readOnly=true) List<Region> getRegions(long countryId, boolean active, int start, int end, OrderByComparator<Region> orderByComparator)
@Transactional(propagation=SUPPORTS, readOnly=true) List<Region> getRegions(long countryId, int start, int end, OrderByComparator<Region> orderByComparator)
@Transactional(propagation=SUPPORTS, readOnly=true) List<Region> getRegions(long companyId, String a2, boolean active) throws PortalException
PortalException
@Transactional(propagation=SUPPORTS, readOnly=true) int getRegionsCount()
@Transactional(propagation=SUPPORTS, readOnly=true) int getRegionsCount(long countryId)
@Transactional(propagation=SUPPORTS, readOnly=true) int getRegionsCount(long countryId, boolean active)
@Transactional(propagation=SUPPORTS, readOnly=true) BaseModelSearchResult<Region> searchRegions(long companyId, Boolean active, String keywords, LinkedHashMap<String,Object> params, int start, int end, OrderByComparator<Region> orderByComparator) throws PortalException
PortalException
Region updateActive(long regionId, boolean active) throws PortalException
PortalException
Region updateRegion(long regionId, boolean active, String name, double position, String regionCode) throws PortalException
PortalException
@Indexable(type=REINDEX) Region updateRegion(Region region)
Important: Inspect RegionLocalServiceImpl 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.
region
- the regionRegionLocalization updateRegionLocalization(Region region, String languageId, String title) throws PortalException
PortalException
List<RegionLocalization> updateRegionLocalizations(Region region, Map<String,String> titleMap) throws PortalException
PortalException
@Transactional(enabled=false) CTPersistence<Region> getCTPersistence()
getCTPersistence
in interface CTService<Region>
@Transactional(enabled=false) Class<Region> getModelClass()
getModelClass
in interface CTService<Region>
@Transactional(rollbackFor=java.lang.Throwable.class) <R,E extends Throwable> R updateWithUnsafeFunction(com.liferay.petra.function.UnsafeFunction<CTPersistence<Region>,R,E> updateUnsafeFunction) throws E extends Throwable
updateWithUnsafeFunction
in interface CTService<Region>
E extends Throwable