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

com.cherokeesoft.db.utils.api.FunctionalUpdateModelDao Maven / Gradle / Ivy

There is a newer version: 1.8.29
Show newest version
package com.cherokeesoft.db.utils.api;


import com.cherokeesoft.db.utils.exception.DataException;

import java.util.Arrays;
import java.util.Collection;

public interface FunctionalUpdateModelDao extends UpdateModelDao {
    default int batchUpdate(Collection models) throws DataException {
        return batchUpdate(() -> models);
    }

    default int update(MODEL model) throws DataException {
        return batchUpdate(Arrays.asList(model));
    }

    default int update(TransactionSupplier supplier) throws DataException {
        return batchUpdate(Arrays.asList(supplier.get()));
    }

    int batchUpdate(TransactionSupplier> supplier) throws DataException;
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy