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

liquibase.snapshot.SnapshotIdService Maven / Gradle / Ivy

There is a newer version: 3.6.2.5.inovus
Show newest version
package liquibase.snapshot;

import liquibase.util.MD5Util;

import java.util.Date;

public class SnapshotIdService {
    private static SnapshotIdService instance = new SnapshotIdService();
    private int nextId = 100;
    private String base = MD5Util.computeMD5(Long.toString(new Date().getTime())).substring(0, 4);

    public static SnapshotIdService getInstance() {
        return instance;
    }

    private SnapshotIdService() {

    }

    public String generateId() {
        return base+Integer.toString(nextId++);
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy