Skip to content

Commit

Permalink
LPD-31973 autogenerated code (gw buildService)
Browse files Browse the repository at this point in the history
  • Loading branch information
andrea-ale-sbarra authored and brianchandotcom committed Jul 31, 2024
1 parent 896d5a3 commit c7ee02a
Show file tree
Hide file tree
Showing 22 changed files with 867 additions and 62 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
/**
* SPDX-FileCopyrightText: (c) 2024 Liferay, Inc. https://liferay.com
* SPDX-License-Identifier: LGPL-2.1-or-later OR LicenseRef-Liferay-DXP-EULA-2.0.0-2023-06
*/

package com.liferay.commerce.product.exception;

import com.liferay.portal.kernel.exception.DuplicateExternalReferenceCodeException;

/**
* @author Marco Leo
*/
public class DuplicateCPOptionCategoryExternalReferenceCodeException
extends DuplicateExternalReferenceCodeException {

public DuplicateCPOptionCategoryExternalReferenceCodeException() {
}

public DuplicateCPOptionCategoryExternalReferenceCodeException(String msg) {
super(msg);
}

public DuplicateCPOptionCategoryExternalReferenceCodeException(
String msg, Throwable throwable) {

super(msg, throwable);
}

public DuplicateCPOptionCategoryExternalReferenceCodeException(
Throwable throwable) {

super(throwable);
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
import com.liferay.portal.kernel.bean.AutoEscape;
import com.liferay.portal.kernel.exception.LocaleException;
import com.liferay.portal.kernel.model.BaseModel;
import com.liferay.portal.kernel.model.ExternalReferenceCodeModel;
import com.liferay.portal.kernel.model.LocalizedModel;
import com.liferay.portal.kernel.model.MVCCModel;
import com.liferay.portal.kernel.model.ShardedModel;
Expand All @@ -34,7 +35,8 @@
@ProviderType
public interface CPOptionCategoryModel
extends BaseModel<CPOptionCategory>, CTModel<CPOptionCategory>,
LocalizedModel, MVCCModel, ShardedModel, StagedAuditedModel {
ExternalReferenceCodeModel, LocalizedModel, MVCCModel, ShardedModel,
StagedAuditedModel {

/*
* NOTE FOR DEVELOPERS:
Expand Down Expand Up @@ -107,6 +109,23 @@ public interface CPOptionCategoryModel
@Override
public void setUuid(String uuid);

/**
* Returns the external reference code of this cp option category.
*
* @return the external reference code of this cp option category
*/
@AutoEscape
@Override
public String getExternalReferenceCode();

/**
* Sets the external reference code of this cp option category.
*
* @param externalReferenceCode the external reference code of this cp option category
*/
@Override
public void setExternalReferenceCode(String externalReferenceCode);

/**
* Returns the cp option category ID of this cp option category.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,10 @@ public class CPOptionCategoryTable extends BaseTable<CPOptionCategoryTable> {
"ctCollectionId", Long.class, Types.BIGINT, Column.FLAG_PRIMARY);
public final Column<CPOptionCategoryTable, String> uuid = createColumn(
"uuid_", String.class, Types.VARCHAR, Column.FLAG_DEFAULT);
public final Column<CPOptionCategoryTable, String> externalReferenceCode =
createColumn(
"externalReferenceCode", String.class, Types.VARCHAR,
Column.FLAG_DEFAULT);
public final Column<CPOptionCategoryTable, Long> CPOptionCategoryId =
createColumn(
"CPOptionCategoryId", Long.class, Types.BIGINT,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ public Map<String, Object> getModelAttributes() {
attributes.put("mvccVersion", getMvccVersion());
attributes.put("ctCollectionId", getCtCollectionId());
attributes.put("uuid", getUuid());
attributes.put("externalReferenceCode", getExternalReferenceCode());
attributes.put("CPOptionCategoryId", getCPOptionCategoryId());
attributes.put("companyId", getCompanyId());
attributes.put("userId", getUserId());
Expand Down Expand Up @@ -74,6 +75,13 @@ public void setModelAttributes(Map<String, Object> attributes) {
setUuid(uuid);
}

String externalReferenceCode = (String)attributes.get(
"externalReferenceCode");

if (externalReferenceCode != null) {
setExternalReferenceCode(externalReferenceCode);
}

Long CPOptionCategoryId = (Long)attributes.get("CPOptionCategoryId");

if (CPOptionCategoryId != null) {
Expand Down Expand Up @@ -272,6 +280,16 @@ public Map<java.util.Locale, String> getDescriptionMap() {
return model.getDescriptionMap();
}

/**
* Returns the external reference code of this cp option category.
*
* @return the external reference code of this cp option category
*/
@Override
public String getExternalReferenceCode() {
return model.getExternalReferenceCode();
}

/**
* Returns the key of this cp option category.
*
Expand Down Expand Up @@ -575,6 +593,16 @@ public void setDescriptionMap(
model.setDescriptionMap(descriptionMap, defaultLocale);
}

/**
* Sets the external reference code of this cp option category.
*
* @param externalReferenceCode the external reference code of this cp option category
*/
@Override
public void setExternalReferenceCode(String externalReferenceCode) {
model.setExternalReferenceCode(externalReferenceCode);
}

/**
* Sets the key of this cp option category.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,9 +84,9 @@ public CPOptionCategory addCPOptionCategory(

@Indexable(type = IndexableType.REINDEX)
public CPOptionCategory addCPOptionCategory(
long userId, Map<Locale, String> titleMap,
Map<Locale, String> descriptionMap, double priority, String key,
ServiceContext serviceContext)
String externalReferenceCode, long userId,
Map<Locale, String> titleMap, Map<Locale, String> descriptionMap,
double priority, String key, ServiceContext serviceContext)
throws PortalException;

/**
Expand Down Expand Up @@ -223,6 +223,10 @@ public long dynamicQueryCount(
@Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
public CPOptionCategory fetchCPOptionCategory(long companyId, String key);

@Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
public CPOptionCategory fetchCPOptionCategoryByExternalReferenceCode(
String externalReferenceCode, long companyId);

/**
* Returns the cp option category with the matching UUID and company.
*
Expand Down Expand Up @@ -278,6 +282,11 @@ public CPOptionCategory getCPOptionCategory(long CPOptionCategoryId)
public CPOptionCategory getCPOptionCategory(long companyId, String key)
throws PortalException;

@Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
public CPOptionCategory getCPOptionCategoryByExternalReferenceCode(
String externalReferenceCode, long companyId)
throws PortalException;

/**
* Returns the cp option category with the matching UUID and company.
*
Expand Down Expand Up @@ -334,8 +343,9 @@ public CPOptionCategory updateCPOptionCategory(

@Indexable(type = IndexableType.REINDEX)
public CPOptionCategory updateCPOptionCategory(
long cpOptionCategoryId, Map<Locale, String> titleMap,
Map<Locale, String> descriptionMap, double priority, String key)
String externalReferenceCode, long cpOptionCategoryId,
Map<Locale, String> titleMap, Map<Locale, String> descriptionMap,
double priority, String key)
throws PortalException;

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,14 +55,16 @@ public static CPOptionCategory addCPOptionCategory(
}

public static CPOptionCategory addCPOptionCategory(
long userId, Map<java.util.Locale, String> titleMap,
String externalReferenceCode, long userId,
Map<java.util.Locale, String> titleMap,
Map<java.util.Locale, String> descriptionMap, double priority,
String key,
com.liferay.portal.kernel.service.ServiceContext serviceContext)
throws PortalException {

return getService().addCPOptionCategory(
userId, titleMap, descriptionMap, priority, key, serviceContext);
externalReferenceCode, userId, titleMap, descriptionMap, priority,
key, serviceContext);
}

/**
Expand Down Expand Up @@ -236,6 +238,13 @@ public static CPOptionCategory fetchCPOptionCategory(
return getService().fetchCPOptionCategory(companyId, key);
}

public static CPOptionCategory fetchCPOptionCategoryByExternalReferenceCode(
String externalReferenceCode, long companyId) {

return getService().fetchCPOptionCategoryByExternalReferenceCode(
externalReferenceCode, companyId);
}

/**
* Returns the cp option category with the matching UUID and company.
*
Expand Down Expand Up @@ -308,6 +317,14 @@ public static CPOptionCategory getCPOptionCategory(
return getService().getCPOptionCategory(companyId, key);
}

public static CPOptionCategory getCPOptionCategoryByExternalReferenceCode(
String externalReferenceCode, long companyId)
throws PortalException {

return getService().getCPOptionCategoryByExternalReferenceCode(
externalReferenceCode, companyId);
}

/**
* Returns the cp option category with the matching UUID and company.
*
Expand Down Expand Up @@ -384,13 +401,15 @@ public static CPOptionCategory updateCPOptionCategory(
}

public static CPOptionCategory updateCPOptionCategory(
long cpOptionCategoryId, Map<java.util.Locale, String> titleMap,
String externalReferenceCode, long cpOptionCategoryId,
Map<java.util.Locale, String> titleMap,
Map<java.util.Locale, String> descriptionMap, double priority,
String key)
throws PortalException {

return getService().updateCPOptionCategory(
cpOptionCategoryId, titleMap, descriptionMap, priority, key);
externalReferenceCode, cpOptionCategoryId, titleMap, descriptionMap,
priority, key);
}

public static CPOptionCategoryLocalService getService() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,14 +52,16 @@ public CPOptionCategory addCPOptionCategory(

@Override
public CPOptionCategory addCPOptionCategory(
long userId, java.util.Map<java.util.Locale, String> titleMap,
String externalReferenceCode, long userId,
java.util.Map<java.util.Locale, String> titleMap,
java.util.Map<java.util.Locale, String> descriptionMap,
double priority, String key,
com.liferay.portal.kernel.service.ServiceContext serviceContext)
throws com.liferay.portal.kernel.exception.PortalException {

return _cpOptionCategoryLocalService.addCPOptionCategory(
userId, titleMap, descriptionMap, priority, key, serviceContext);
externalReferenceCode, userId, titleMap, descriptionMap, priority,
key, serviceContext);
}

/**
Expand Down Expand Up @@ -259,6 +261,15 @@ public CPOptionCategory fetchCPOptionCategory(long companyId, String key) {
companyId, key);
}

@Override
public CPOptionCategory fetchCPOptionCategoryByExternalReferenceCode(
String externalReferenceCode, long companyId) {

return _cpOptionCategoryLocalService.
fetchCPOptionCategoryByExternalReferenceCode(
externalReferenceCode, companyId);
}

/**
* Returns the cp option category with the matching UUID and company.
*
Expand Down Expand Up @@ -340,6 +351,16 @@ public CPOptionCategory getCPOptionCategory(long companyId, String key)
companyId, key);
}

@Override
public CPOptionCategory getCPOptionCategoryByExternalReferenceCode(
String externalReferenceCode, long companyId)
throws com.liferay.portal.kernel.exception.PortalException {

return _cpOptionCategoryLocalService.
getCPOptionCategoryByExternalReferenceCode(
externalReferenceCode, companyId);
}

/**
* Returns the cp option category with the matching UUID and company.
*
Expand Down Expand Up @@ -427,14 +448,15 @@ public CPOptionCategory updateCPOptionCategory(

@Override
public CPOptionCategory updateCPOptionCategory(
long cpOptionCategoryId,
String externalReferenceCode, long cpOptionCategoryId,
java.util.Map<java.util.Locale, String> titleMap,
java.util.Map<java.util.Locale, String> descriptionMap,
double priority, String key)
throws com.liferay.portal.kernel.exception.PortalException {

return _cpOptionCategoryLocalService.updateCPOptionCategory(
cpOptionCategoryId, titleMap, descriptionMap, priority, key);
externalReferenceCode, cpOptionCategoryId, titleMap, descriptionMap,
priority, key);
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,9 @@ public interface CPOptionCategoryService extends BaseService {
* Never modify this interface directly. Add custom service methods to <code>com.liferay.commerce.product.service.impl.CPOptionCategoryServiceImpl</code> and rerun ServiceBuilder to automatically copy the method declarations to this interface. Consume the cp option category remote service via injection or a <code>org.osgi.util.tracker.ServiceTracker</code>. Use {@link CPOptionCategoryServiceUtil} if injection and service tracking are not available.
*/
public CPOptionCategory addCPOptionCategory(
Map<Locale, String> titleMap, Map<Locale, String> descriptionMap,
double priority, String key, ServiceContext serviceContext)
String externalReferenceCode, Map<Locale, String> titleMap,
Map<Locale, String> descriptionMap, double priority, String key,
ServiceContext serviceContext)
throws PortalException;

public void deleteCPOptionCategory(long cpOptionCategoryId)
Expand All @@ -77,8 +78,9 @@ public BaseModelSearchResult<CPOptionCategory> searchCPOptionCategories(
throws PortalException;

public CPOptionCategory updateCPOptionCategory(
long cpOptionCategoryId, Map<Locale, String> titleMap,
Map<Locale, String> descriptionMap, double priority, String key)
String externalReferenceCode, long cpOptionCategoryId,
Map<Locale, String> titleMap, Map<Locale, String> descriptionMap,
double priority, String key)
throws PortalException;

}
Original file line number Diff line number Diff line change
Expand Up @@ -31,14 +31,16 @@ public class CPOptionCategoryServiceUtil {
* Never modify this class directly. Add custom service methods to <code>com.liferay.commerce.product.service.impl.CPOptionCategoryServiceImpl</code> and rerun ServiceBuilder to regenerate this class.
*/
public static CPOptionCategory addCPOptionCategory(
String externalReferenceCode,
Map<java.util.Locale, String> titleMap,
Map<java.util.Locale, String> descriptionMap, double priority,
String key,
com.liferay.portal.kernel.service.ServiceContext serviceContext)
throws PortalException {

return getService().addCPOptionCategory(
titleMap, descriptionMap, priority, key, serviceContext);
externalReferenceCode, titleMap, descriptionMap, priority, key,
serviceContext);
}

public static void deleteCPOptionCategory(long cpOptionCategoryId)
Expand Down Expand Up @@ -80,13 +82,15 @@ <CPOptionCategory> searchCPOptionCategories(
}

public static CPOptionCategory updateCPOptionCategory(
long cpOptionCategoryId, Map<java.util.Locale, String> titleMap,
String externalReferenceCode, long cpOptionCategoryId,
Map<java.util.Locale, String> titleMap,
Map<java.util.Locale, String> descriptionMap, double priority,
String key)
throws PortalException {

return getService().updateCPOptionCategory(
cpOptionCategoryId, titleMap, descriptionMap, priority, key);
externalReferenceCode, cpOptionCategoryId, titleMap, descriptionMap,
priority, key);
}

public static CPOptionCategoryService getService() {
Expand Down
Loading

0 comments on commit c7ee02a

Please sign in to comment.