Example usage for org.hibernate.id UUIDGenerator UUIDGenerator

List of usage examples for org.hibernate.id UUIDGenerator UUIDGenerator

Introduction

In this page you can find the example usage for org.hibernate.id UUIDGenerator UUIDGenerator.

Prototype

UUIDGenerator

Source Link

Usage

From source file:org.webical.dao.hibernateImpl.EventDaoWebDavHibernateBufferedImpl.java

License:Open Source License

/**
 * Uses the hibernate uid generator//w  w  w. j a  v  a2s .c  o m
 * @return a UUIDGenerator
 */
private UUIDGenerator getUuidGen() {
    if (uuidGen != null)
        return uuidGen;

    Properties uidprops = new Properties();
    uidprops.setProperty("separator", "-");
    uuidGen = new UUIDGenerator();
    ((Configurable) uuidGen).configure(org.hibernate.type.StandardBasicTypes.STRING, uidprops, null);
    return uuidGen;
}