org.beetl.sql.ext.UUIDAutoGen Maven / Gradle / Ivy
package org.beetl.sql.ext;
import org.beetl.sql.core.IDAutoGen;
import java.util.UUID;
/**
* uuid,基于版本uuid 版本3
* {code
* @AssingId("uuid")
* String id;
* }
*
* 如果想使用压缩版本的,可以参考 CompressedUUIDAutoGen
*
*
*
* 必须调用{@link org.beetl.sql.core.SQLManager#addIdAutoGen} 来使用
* @see org.beetl.sql.annotation.entity.AssignID
* @author xiandafu
*/
public class UUIDAutoGen implements IDAutoGen {
public UUIDAutoGen() {
}
@Override
public String nextID(String params) {
return UUID.randomUUID().toString();
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy