com.sap.cds.mtx.impl.ModelOutDatedChecker Maven / Gradle / Ivy
/*
* ----------------------------------------------------------------
* © 2019-2021 SAP SE or an SAP affiliate company. All rights reserved.
* ----------------------------------------------------------------
*
*/
package com.sap.cds.mtx.impl;
import com.sap.cds.mtx.MetaDataAccessor;
import com.sap.cds.reflect.CdsModel;
import java.util.function.BiPredicate;
public class ModelOutDatedChecker implements BiPredicate {
private final MetaDataAccessor> metaDataAccessor;
public ModelOutDatedChecker(MetaDataAccessor> metaDataAccessor) {
this.metaDataAccessor = metaDataAccessor;
}
@Override
public boolean test(String tenantId, CdsModel cdsModel) {
return metaDataAccessor.getCdsModel(tenantId) != cdsModel;
}
}