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

com.infomaximum.database.exception.IndexNotFoundException Maven / Gradle / Ivy

The newest version!
package com.infomaximum.database.exception;

import com.infomaximum.database.domainobject.DomainObject;
import com.infomaximum.database.schema.dbstruct.DBField;
import com.infomaximum.database.schema.dbstruct.DBTable;

import java.util.Set;
import java.util.stream.Collectors;

public class IndexNotFoundException extends DatabaseException {

    public IndexNotFoundException(String indexName, Class domainClass) {
        super("Not found " + indexName + " in " + domainClass);
    }

    public IndexNotFoundException(Set indexedFieldIds, DBTable table) {
        super("Not found " +
                indexedFieldIds.stream()
                        .map(table::getField)
                        .map(DBField::getName)
                        .collect(Collectors.joining(", ")) +
                " in " + table.getNamespace() + "." + table.getName());
    }
}





© 2015 - 2024 Weber Informatics LLC | Privacy Policy