public class GenIdKeyGenerator extends Object implements org.apache.ibatis.executor.keygen.KeyGenerator
| Constructor and Description |
|---|
GenIdKeyGenerator(GenId<?> genId,
EntityTable table,
EntityColumn column,
org.apache.ibatis.session.Configuration configuration,
boolean executeBefore) |
| Modifier and Type | Method and Description |
|---|---|
void |
genId(Object parameter) |
void |
genIdFirstTime(Object parameter)
只有第一次需要 executeBefore 时,此时已经漏掉了 processBefore 的执行时机,这里需要额外执行一次
|
void |
processAfter(org.apache.ibatis.executor.Executor executor,
org.apache.ibatis.mapping.MappedStatement ms,
Statement stmt,
Object parameter) |
void |
processBefore(org.apache.ibatis.executor.Executor executor,
org.apache.ibatis.mapping.MappedStatement ms,
Statement stmt,
Object parameter) |
boolean |
runFirstTime() |
public GenIdKeyGenerator(GenId<?> genId, EntityTable table, EntityColumn column, org.apache.ibatis.session.Configuration configuration, boolean executeBefore)
public void processBefore(org.apache.ibatis.executor.Executor executor,
org.apache.ibatis.mapping.MappedStatement ms,
Statement stmt,
Object parameter)
processBefore in interface org.apache.ibatis.executor.keygen.KeyGeneratorpublic void processAfter(org.apache.ibatis.executor.Executor executor,
org.apache.ibatis.mapping.MappedStatement ms,
Statement stmt,
Object parameter)
processAfter in interface org.apache.ibatis.executor.keygen.KeyGeneratorpublic void genIdFirstTime(Object parameter)
public void genId(Object parameter)
public boolean runFirstTime()
Copyright © 2022. All rights reserved.