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

liquibase.snapshot.SnapshotIdService Maven / Gradle / Ivy

The newest version!
package liquibase.snapshot;

import liquibase.util.MD5Util;

import java.util.Date;

public class SnapshotIdService {
    private static final SnapshotIdService instance = new SnapshotIdService();
    private int nextId = 100;
    private final 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+ nextId++;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy