package com.apress.springrecipes.sequence;
import java.text.DateFormat;
import java.text.SimpleDateFormat;import java.util.Date;public class DatePrefix implements Prefix {
private DateFormat formatter; public void setPttern(String pattern){ this.formatter= new SimpleDateFormat(pattern); } @Override public String getPrefix() { return formatter.format(new Date()); }}