
com.sap.cloud.sdk.s4hana.datamodel.odata.services.DefaultCustomerGroupService 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.customergroup.CustomerGroupByKeyFluentHelper;
import com.sap.cloud.sdk.s4hana.datamodel.odata.namespaces.customergroup.CustomerGroupFluentHelper;
import com.sap.cloud.sdk.s4hana.datamodel.odata.namespaces.customergroup.CustomerGroupTextByKeyFluentHelper;
import com.sap.cloud.sdk.s4hana.datamodel.odata.namespaces.customergroup.CustomerGroupTextFluentHelper;
import com.sap.cloud.sdk.s4hana.datamodel.odata.namespaces.customergroup.batch.DefaultCustomerGroupServiceBatch;
/**
*
* This service enables you to read customer group master data in an API call. It is based on the OData protocol, and
* can be consumed in Fiori apps and on other user interfaces.
*
*
*
* Reference: SAP API
* Business Hub
*
* Details:
*
*
* OData Service:
* API_CUSTOMERGROUP_SRV
*
*
* API Version:
* 1
*
*
* Communication Scenario:
* SAP Business Objects Cloud for Planning Integration (SAP_COM_0087)
*
*
* Scope Items:
* oData Integration with SAP Business Objects Cloud for
* Planning (1YB)
*
*
*
*/
@Named( "com.sap.cloud.sdk.s4hana.datamodel.odata.services.DefaultCustomerGroupService" )
public class DefaultCustomerGroupService implements CustomerGroupService
{
@Nonnull
private final String servicePath;
/**
* Creates a service using {@link CustomerGroupService#DEFAULT_SERVICE_PATH} to send the requests.
*
*/
public DefaultCustomerGroupService()
{
servicePath = CustomerGroupService.DEFAULT_SERVICE_PATH;
}
/**
* Creates a service using the provided service path to send the requests.
*
* Used by the fluent {@link #withServicePath(String)} method.
*
*/
private DefaultCustomerGroupService( @Nonnull final String servicePath )
{
this.servicePath = servicePath;
}
@Override
@Nonnull
public DefaultCustomerGroupService withServicePath( @Nonnull final String servicePath )
{
return new DefaultCustomerGroupService(servicePath);
}
/**
* {@inheritDoc}
*
*/
@Override
@Nonnull
public DefaultCustomerGroupServiceBatch batch()
{
return new DefaultCustomerGroupServiceBatch(this);
}
@Override
@Nonnull
public CustomerGroupFluentHelper getAllCustomerGroup()
{
return new CustomerGroupFluentHelper(servicePath);
}
@Override
@Nonnull
public CustomerGroupByKeyFluentHelper getCustomerGroupByKey( final String customerGroup )
{
return new CustomerGroupByKeyFluentHelper(servicePath, customerGroup);
}
@Override
@Nonnull
public CustomerGroupTextFluentHelper getAllCustomerGroupText()
{
return new CustomerGroupTextFluentHelper(servicePath);
}
@Override
@Nonnull
public
CustomerGroupTextByKeyFluentHelper
getCustomerGroupTextByKey( final String customerGroup, final String language )
{
return new CustomerGroupTextByKeyFluentHelper(servicePath, customerGroup, language);
}
}