public class CustomerService extends Object
In demos/tutorials/examples, get a reference to this service class with
getInstance()
.
Modifier and Type | Method and Description |
---|---|
long |
count() |
void |
delete(Customer value)
Deletes a customer from a system
|
void |
ensureTestData()
Sample data generation
|
List<Customer> |
findAll() |
List<Customer> |
findAll(String stringFilter)
Finds all Customer's that match given filter.
|
List<Customer> |
findAll(String stringFilter,
int start,
int maxresults)
Finds all Customer's that match given filter and limits the resultset.
|
static CustomerService |
getInstance() |
void |
save(Customer entry)
Persists or updates customer in the system.
|
public static CustomerService getInstance()
public List<Customer> findAll(String stringFilter)
stringFilter
- filter that returned objects should match or null/empty string
if all objects should be returned.public List<Customer> findAll(String stringFilter, int start, int maxresults)
stringFilter
- filter that returned objects should match or null/empty string
if all objects should be returned.start
- the index of first resultmaxresults
- maximum result countpublic long count()
public void delete(Customer value)
value
- the Customer to be deletedpublic void save(Customer entry)
entry
- public void ensureTestData()
Copyright © 2020 Magnolia International Ltd.. All rights reserved.