public interface IdService
| 限定符和类型 | 字段和说明 |
|---|---|
static DateTimeFormatter |
DEFAULT_DAY_FORMATTER
The default day formatter.
|
static DecimalFormat |
DEFAULT_DECIMAL_FORMATTER
The default SN (serial number) DecimalFormat.
|
static String |
DEFAULT_SN_PATTERN
The default SN (serial number) pattern.
|
static String |
SEPARATOR |
| 限定符和类型 | 方法和说明 |
|---|---|
Long |
next(String type)
Get the next id for the specific type.
|
String |
nextDailySN(Class<?> type,
DateTimeFormatter dayFormatter,
String snPattern)
Get the next daily SN (serial number).
|
String |
nextDailySN(String type,
DateTimeFormatter dayFormatter,
String snPattern)
Get the next daily SN (serial number).
|
static final String DEFAULT_SN_PATTERN
static final DecimalFormat DEFAULT_DECIMAL_FORMATTER
static final DateTimeFormatter DEFAULT_DAY_FORMATTER
Long next(String type)
type - the typeString nextDailySN(String type, DateTimeFormatter dayFormatter, String snPattern)
The return value format is “yyyyMMdd####”. "####" is control by the snPattern param.
type - the typedayFormatter - the day formatter, from DateTimeFormatter.
Default is DEFAULT_DAY_FORMATTER.snPattern - the SN pattern, from DecimalFormat.
Default is DEFAULT_SN_PATTERN.String nextDailySN(Class<?> type, DateTimeFormatter dayFormatter, String snPattern)
The return value format is “yyyyMMdd####”. "####" is control by the snPattern param.
type - the typedayFormatter - the day formatter, from DateTimeFormatter.
Default is DEFAULT_DAY_FORMATTER.snPattern - the SN pattern, from DecimalFormat.
Default is DEFAULT_SN_PATTERN.Copyright © 2017 simter. All rights reserved.