/** * Sample of default action. */ @EdmAction @EdmReturnType(type = "BankAccounts") public class DefaultActionSample { @EdmParameter private String someParameter; public void doAction() { // do some action } }
/** * Sample of default action. */ @EdmAction @EdmReturnType(type = "BankAccounts") public class DefaultActionSample { @EdmParameter private String someParameter; public void doAction() { // do some action } }
/** * The sample of Unbound Action. */ @EdmAction(namespace = "ODataDemo", name = "ODataDemoUnboundAction", entitySetPath = "ODataDemoEntitySetPath", isBound = false) @EdmReturnType(type = "Customers") public class UnboundActionSample implements Operation<Customer> { @EdmParameter(name = "StringParameter", nullable = false) private String stringParameter; @EdmParameter(name = "NumberParameter", nullable = false) private Long number; public String getStringParameter() { return stringParameter; } public Long getNumber() { return number; } @Override public Customer doOperation(ODataRequestContext requestContext, DataSourceFactory dataSourceFactory) { // Doesn't return anything because there is no possibility to implement it without datasource. return null; } }
/** * The sample of Unbound Action. */ @EdmAction(namespace = "ODataDemo", name = "ODataDemoUnboundAction", entitySetPath = "ODataDemoEntitySetPath", isBound = false) @EdmReturnType(type = "Customers") public class UnboundActionSample implements Operation<Customer> { @EdmParameter(name = "StringParameter", nullable = false) private String stringParameter; @EdmParameter(name = "NumberParameter", nullable = false) private Long number; public String getStringParameter() { return stringParameter; } public Long getNumber() { return number; } @Override public Customer doOperation(ODataRequestContext requestContext, DataSourceFactory dataSourceFactory) { // Doesn't return anything because there is no possibility to implement it without datasource. return null; } }
@EdmAction(namespace = "ODataDemo", name = "ODataDemoAction", entitySetPath = "ODataDemoEntitySetPath", isBound = true) @EdmReturnType(type = "Customers")
@EdmAction(namespace = "ODataDemo", name = "ODataDemoAction", entitySetPath = "ODataDemoEntitySetPath", isBound = true) @EdmReturnType(type = "Customers")