com.liferay.commerce.payment.service.persistence.impl.CommercePaymentMethodGroupRelQualifierModelArgumentsResolver Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of com.liferay.commerce.payment.service
Show all versions of com.liferay.commerce.payment.service
Liferay Commerce Payment Service
/**
* Copyright (c) 2000-present Liferay, Inc. All rights reserved.
*
* This library is free software; you can redistribute it and/or modify it under
* the terms of the GNU Lesser General Public License as published by the Free
* Software Foundation; either version 2.1 of the License, or (at your option)
* any later version.
*
* This library is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
* details.
*/
package com.liferay.commerce.payment.service.persistence.impl;
import com.liferay.commerce.payment.model.CommercePaymentMethodGroupRelQualifierTable;
import com.liferay.commerce.payment.model.impl.CommercePaymentMethodGroupRelQualifierImpl;
import com.liferay.commerce.payment.model.impl.CommercePaymentMethodGroupRelQualifierModelImpl;
import com.liferay.portal.kernel.dao.orm.ArgumentsResolver;
import com.liferay.portal.kernel.dao.orm.FinderPath;
import com.liferay.portal.kernel.model.BaseModel;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;
/**
* The arguments resolver class for retrieving value from CommercePaymentMethodGroupRelQualifier.
*
* @author Luca Pellizzon
* @generated
*/
public class CommercePaymentMethodGroupRelQualifierModelArgumentsResolver
implements ArgumentsResolver {
@Override
public Object[] getArguments(
FinderPath finderPath, BaseModel> baseModel, boolean checkColumn,
boolean original) {
String[] columnNames = finderPath.getColumnNames();
if ((columnNames == null) || (columnNames.length == 0)) {
if (baseModel.isNew()) {
return new Object[0];
}
return null;
}
CommercePaymentMethodGroupRelQualifierModelImpl
commercePaymentMethodGroupRelQualifierModelImpl =
(CommercePaymentMethodGroupRelQualifierModelImpl)baseModel;
long columnBitmask =
commercePaymentMethodGroupRelQualifierModelImpl.getColumnBitmask();
if (!checkColumn || (columnBitmask == 0)) {
return _getValue(
commercePaymentMethodGroupRelQualifierModelImpl, columnNames,
original);
}
Long finderPathColumnBitmask = _finderPathColumnBitmasksCache.get(
finderPath);
if (finderPathColumnBitmask == null) {
finderPathColumnBitmask = 0L;
for (String columnName : columnNames) {
finderPathColumnBitmask |=
commercePaymentMethodGroupRelQualifierModelImpl.
getColumnBitmask(columnName);
}
if (finderPath.isBaseModelResult() &&
(CommercePaymentMethodGroupRelQualifierPersistenceImpl.
FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION ==
finderPath.getCacheName())) {
finderPathColumnBitmask |= _ORDER_BY_COLUMNS_BITMASK;
}
_finderPathColumnBitmasksCache.put(
finderPath, finderPathColumnBitmask);
}
if ((columnBitmask & finderPathColumnBitmask) != 0) {
return _getValue(
commercePaymentMethodGroupRelQualifierModelImpl, columnNames,
original);
}
return null;
}
@Override
public String getClassName() {
return CommercePaymentMethodGroupRelQualifierImpl.class.getName();
}
@Override
public String getTableName() {
return CommercePaymentMethodGroupRelQualifierTable.INSTANCE.
getTableName();
}
private static Object[] _getValue(
CommercePaymentMethodGroupRelQualifierModelImpl
commercePaymentMethodGroupRelQualifierModelImpl,
String[] columnNames, boolean original) {
Object[] arguments = new Object[columnNames.length];
for (int i = 0; i < arguments.length; i++) {
String columnName = columnNames[i];
if (original) {
arguments[i] =
commercePaymentMethodGroupRelQualifierModelImpl.
getColumnOriginalValue(columnName);
}
else {
arguments[i] =
commercePaymentMethodGroupRelQualifierModelImpl.
getColumnValue(columnName);
}
}
return arguments;
}
private static final Map _finderPathColumnBitmasksCache =
new ConcurrentHashMap<>();
private static final long _ORDER_BY_COLUMNS_BITMASK;
static {
long orderByColumnsBitmask = 0;
orderByColumnsBitmask |=
CommercePaymentMethodGroupRelQualifierModelImpl.getColumnBitmask(
"createDate");
_ORDER_BY_COLUMNS_BITMASK = orderByColumnsBitmask;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy