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

org.schoellerfamily.gedbrowser.api.crud.NewId Maven / Gradle / Ivy

There is a newer version: 1.3.0-RC2
Show newest version
package org.schoellerfamily.gedbrowser.api.crud;

import org.schoellerfamily.gedbrowser.datamodel.GedObject;
import org.schoellerfamily.gedbrowser.persistence.domain.GedDocument;
import org.schoellerfamily.gedbrowser.persistence.domain.RootDocument;
import org.schoellerfamily.gedbrowser.persistence.repository.FindableDocument;

/**
 * @param  the data model type we are creating
 * @param  the DB type associated with the type X
 * @author Dick Schoeller
 */
public interface NewId > {
    /**
     * @return the DB repository for this type
     */
    FindableDocument getRepository();

    /**
     * @param root the root
     * @return the next ID string
     */
    default String newId(final RootDocument root) {
        return getRepository().newId(root);
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy