public class CreateID extends AbstractProcessor implements Service
This class adds a single ID attribute to all processed items.
| Modifier and Type | Field and Description |
|---|---|
(package private) String |
key |
(package private) Long |
nextId |
(package private) Long |
start |
context| Constructor and Description |
|---|
CreateID() |
| Modifier and Type | Method and Description |
|---|---|
String |
getKey() |
Long |
getStart() |
Data |
process(Data data) |
void |
reset() |
void |
setKey(String key) |
void |
setStart(Long l) |
finish, init, resetStatepublic Data process(Data data)
process in interface ProcessorDataProcessorpublic String getKey()
@Parameter(defaultValue="@id") public void setKey(String key)
key - the key to set@Parameter(defaultValue="0") public void setStart(Long l)
public Long getStart()
public void reset()
throws Exception
reset in interface ServiceExceptionService.reset()Copyright © 2018. All rights reserved.