org.schoellerfamily.gedbrowser.api.crud.NewId Maven / Gradle / Ivy
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);
}
}