All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.wudaosoft.commons.persistence.Base58UUIDGenerator Maven / Gradle / Ivy

There is a newer version: 3.0.0
Show newest version
/* 
 * Copyright(c)2010-2017 WUDAOSOFT.COM
 * 
 * Email:[email protected]
 * 
 * QQ:275100589
 */ 
 
package com.wudaosoft.commons.persistence;

import java.io.Serializable;

import org.hibernate.HibernateException;
import org.hibernate.engine.spi.SharedSessionContractImplementor;
import org.hibernate.id.IdentifierGenerator;

import com.wudaosoft.commons.utils.UUIDUtils;

/** 
 * @author Changsoul Wu
 * 
 */
public class Base58UUIDGenerator implements IdentifierGenerator {

	/* (non-Javadoc)
	 * @see org.hibernate.id.IdentifierGenerator#generate(org.hibernate.engine.spi.SharedSessionContractImplementor, java.lang.Object)
	 */
	@Override
	public Serializable generate(SharedSessionContractImplementor session, Object object) throws HibernateException {
		return UUIDUtils.base58Uuid();
	}

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy