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

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

There is a newer version: 3.0.0
Show newest version
/* 
 * Copyright(c)2010-2016 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 Base64UUIDGenerator implements IdentifierGenerator {

    @Override
    public Serializable generate(SharedSessionContractImplementor session, Object object) throws HibernateException {
        return UUIDUtils.base64Uuid();
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy