
com.sap.cloud.sdk.s4hana.datamodel.odata.services.DefaultExtendedPlannedIndependentRequirementService Maven / Gradle / Ivy
/*
* Copyright (c) 2019 SAP SE or an SAP affiliate company. All rights reserved.
*/
package com.sap.cloud.sdk.s4hana.datamodel.odata.services;
import javax.annotation.Nonnull;
import javax.inject.Named;
import com.sap.cloud.sdk.s4hana.datamodel.odata.namespaces.extendedplannedindependentrequirement.PlannedIndepRqmt;
import com.sap.cloud.sdk.s4hana.datamodel.odata.namespaces.extendedplannedindependentrequirement.PlannedIndepRqmtByKeyFluentHelper;
import com.sap.cloud.sdk.s4hana.datamodel.odata.namespaces.extendedplannedindependentrequirement.PlannedIndepRqmtCreateFluentHelper;
import com.sap.cloud.sdk.s4hana.datamodel.odata.namespaces.extendedplannedindependentrequirement.PlannedIndepRqmtFluentHelper;
import com.sap.cloud.sdk.s4hana.datamodel.odata.namespaces.extendedplannedindependentrequirement.PlannedIndepRqmtItem;
import com.sap.cloud.sdk.s4hana.datamodel.odata.namespaces.extendedplannedindependentrequirement.PlannedIndepRqmtItemByKeyFluentHelper;
import com.sap.cloud.sdk.s4hana.datamodel.odata.namespaces.extendedplannedindependentrequirement.PlannedIndepRqmtItemCreateFluentHelper;
import com.sap.cloud.sdk.s4hana.datamodel.odata.namespaces.extendedplannedindependentrequirement.PlannedIndepRqmtItemFluentHelper;
import com.sap.cloud.sdk.s4hana.datamodel.odata.namespaces.extendedplannedindependentrequirement.PlannedIndepRqmtItemUpdateFluentHelper;
import com.sap.cloud.sdk.s4hana.datamodel.odata.namespaces.extendedplannedindependentrequirement.PlannedIndepRqmtUpdateFluentHelper;
import com.sap.cloud.sdk.s4hana.datamodel.odata.namespaces.extendedplannedindependentrequirement.batch.DefaultExtendedPlannedIndependentRequirementServiceBatch;
/**
*
* This inbound/outbound service enables you to read, create, and update planned independent requirements (PIRs). Use
* this API if you want to work with the Change PIRs app and not the Manage PIRs app. If you work with the Manage PIRs
* app, however, you are recommended to use the following API:
*
* https://api.sap.com/shell/discover/contentp ackage/SAPS4HANACloud/api/API_FORECAST _DEMAND_SRV .
*
*
*
* Reference: SAP
* API Business Hub
*
* Details:
*
*
* OData Service:
* API_PLND_INDEP_RQMT_SRV
*
*
* API Version:
* 1
*
*
* Communication Scenario:
* Production Planning Integration (SAP_COM_0104)
*
*
* Scope Items:
* Make-to-Stock Production - Discrete Manufacturing (BJ5),
* Make-to-Stock Production - Process Manufacturing (BJ8),
* Material Requirements Planning (J44)
*
*
*
*/
@Named( "com.sap.cloud.sdk.s4hana.datamodel.odata.services.DefaultExtendedPlannedIndependentRequirementService" )
public class DefaultExtendedPlannedIndependentRequirementService implements ExtendedPlannedIndependentRequirementService
{
@Nonnull
private final String servicePath;
/**
* Creates a service using {@link ExtendedPlannedIndependentRequirementService#DEFAULT_SERVICE_PATH} to send the
* requests.
*
*/
public DefaultExtendedPlannedIndependentRequirementService()
{
servicePath = ExtendedPlannedIndependentRequirementService.DEFAULT_SERVICE_PATH;
}
/**
* Creates a service using the provided service path to send the requests.
*
* Used by the fluent {@link #withServicePath(String)} method.
*
*/
private DefaultExtendedPlannedIndependentRequirementService( @Nonnull final String servicePath )
{
this.servicePath = servicePath;
}
@Override
@Nonnull
public DefaultExtendedPlannedIndependentRequirementService withServicePath( @Nonnull final String servicePath )
{
return new DefaultExtendedPlannedIndependentRequirementService(servicePath);
}
/**
* {@inheritDoc}
*
*/
@Override
@Nonnull
public DefaultExtendedPlannedIndependentRequirementServiceBatch batch()
{
return new DefaultExtendedPlannedIndependentRequirementServiceBatch(this);
}
@Override
@Nonnull
public PlannedIndepRqmtFluentHelper getAllPlannedIndepRqmt()
{
return new PlannedIndepRqmtFluentHelper(servicePath);
}
@Override
@Nonnull
public PlannedIndepRqmtByKeyFluentHelper getPlannedIndepRqmtByKey(
final String product,
final String plant,
final String mRPArea,
final String plndIndepRqmtType,
final String plndIndepRqmtVersion,
final String requirementPlan,
final String requirementSegment )
{
return new PlannedIndepRqmtByKeyFluentHelper(
servicePath,
product,
plant,
mRPArea,
plndIndepRqmtType,
plndIndepRqmtVersion,
requirementPlan,
requirementSegment);
}
@Override
@Nonnull
public PlannedIndepRqmtCreateFluentHelper createPlannedIndepRqmt( @Nonnull final PlannedIndepRqmt plannedIndepRqmt )
{
return new PlannedIndepRqmtCreateFluentHelper(servicePath, plannedIndepRqmt);
}
@Override
@Nonnull
public PlannedIndepRqmtUpdateFluentHelper updatePlannedIndepRqmt( @Nonnull final PlannedIndepRqmt plannedIndepRqmt )
{
return new PlannedIndepRqmtUpdateFluentHelper(servicePath, plannedIndepRqmt);
}
@Override
@Nonnull
public PlannedIndepRqmtItemFluentHelper getAllPlannedIndepRqmtItem()
{
return new PlannedIndepRqmtItemFluentHelper(servicePath);
}
@Override
@Nonnull
public PlannedIndepRqmtItemByKeyFluentHelper getPlannedIndepRqmtItemByKey(
final String product,
final String plant,
final String mRPArea,
final String plndIndepRqmtType,
final String plndIndepRqmtVersion,
final String requirementPlan,
final String requirementSegment,
final String plndIndepRqmtPeriod,
final String periodType )
{
return new PlannedIndepRqmtItemByKeyFluentHelper(
servicePath,
product,
plant,
mRPArea,
plndIndepRqmtType,
plndIndepRqmtVersion,
requirementPlan,
requirementSegment,
plndIndepRqmtPeriod,
periodType);
}
@Override
@Nonnull
public PlannedIndepRqmtItemCreateFluentHelper createPlannedIndepRqmtItem(
@Nonnull final PlannedIndepRqmtItem plannedIndepRqmtItem )
{
return new PlannedIndepRqmtItemCreateFluentHelper(servicePath, plannedIndepRqmtItem);
}
@Override
@Nonnull
public PlannedIndepRqmtItemUpdateFluentHelper updatePlannedIndepRqmtItem(
@Nonnull final PlannedIndepRqmtItem plannedIndepRqmtItem )
{
return new PlannedIndepRqmtItemUpdateFluentHelper(servicePath, plannedIndepRqmtItem);
}
}