public class SequenceGenerator extends Object implements IdGenerator
缺点:可能会出现跳步
| 构造器和说明 |
|---|
SequenceGenerator(EntityScriptExecutor scriptExecutor,
Delegator delegator) |
| 限定符和类型 | 方法和说明 |
|---|---|
Delegator |
getDelegator() |
EntityScriptExecutor |
getScriptExecutor() |
String |
name()
生成器名称
|
String |
nextId(String entityName)
生成ID
|
void |
setDelegator(Delegator delegator) |
void |
setScriptExecutor(EntityScriptExecutor scriptExecutor) |
public SequenceGenerator(EntityScriptExecutor scriptExecutor, Delegator delegator)
public String name()
IdGeneratorname 在接口中 IdGeneratorpublic String nextId(String entityName)
IdGeneratornextId 在接口中 IdGeneratorentityName - 实体名称public EntityScriptExecutor getScriptExecutor()
public void setScriptExecutor(EntityScriptExecutor scriptExecutor)
public Delegator getDelegator()
public void setDelegator(Delegator delegator)
Copyright © 2019. All rights reserved.