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

io.ebean.delegate.DelegatePublish Maven / Gradle / Ivy

package io.ebean.delegate;

import io.ebean.EbeanServer;
import io.ebean.Query;
import io.ebean.Transaction;

import java.util.List;

/**
 * Wraps an underlying EbeanServer providing the publishing features.
 * 

* Can you used for testing purposes when you want to create a test double that * only replaces some of the underlying functionality of the EbeanServer. */ public class DelegatePublish implements InterceptPublish { protected EbeanServer delegate; public DelegatePublish(EbeanServer delegate) { this.delegate = delegate; } @Override public T publish(Class beanType, Object id, Transaction transaction) { return delegate.publish(beanType, id, transaction); } @Override public T publish(Class beanType, Object id) { return delegate.publish(beanType, id); } @Override public List publish(Query query, Transaction transaction) { return delegate.publish(query, transaction); } @Override public List publish(Query query) { return delegate.publish(query); } @Override public T draftRestore(Class beanType, Object id, Transaction transaction) { return delegate.draftRestore(beanType, id, transaction); } @Override public T draftRestore(Class beanType, Object id) { return delegate.draftRestore(beanType, id); } @Override public List draftRestore(Query query, Transaction transaction) { return delegate.draftRestore(query, transaction); } @Override public List draftRestore(Query query) { return delegate.draftRestore(query); } }





© 2015 - 2024 Weber Informatics LLC | Privacy Policy