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

io.ebean.TDEbeanServer Maven / Gradle / Ivy

package io.ebean;

import io.ebean.cache.ServerCacheManager;
import io.ebean.meta.MetaInfoManager;
import io.ebean.plugin.SpiServer;
import io.ebean.text.csv.CsvReader;
import io.ebean.text.json.JsonContext;

import javax.persistence.OptimisticLockException;
import javax.persistence.PersistenceException;
import java.util.ArrayList;
import java.util.Collection;
import java.util.List;
import java.util.Map;
import java.util.Optional;
import java.util.Set;
import java.util.function.Consumer;
import java.util.function.Predicate;

/**
 * Test double for EbeanServer.
 */
public class TDEbeanServer implements EbeanServer {

  public List deletedBeans = new ArrayList();

  public List savedBeans = new ArrayList();

  @Override
  public void shutdown(boolean shutdownDataSource, boolean deregisterDriver) {

  }

  @Override
  public DocumentStore docStore() {
    return null;
  }

  @Override
  public SpiServer getPluginApi() {
    return null;
  }

  @Override
  public AutoTune getAutoTune() {
    return null;
  }

  @Override
  public String getName() {
    return null;
  }

  @Override
  public ExpressionFactory getExpressionFactory() {
    return null;
  }

  @Override
  public MetaInfoManager getMetaInfoManager() {
    return null;
  }

  @Override
  public BeanState getBeanState(Object bean) {
    return null;
  }

  @Override
  public Object getBeanId(Object bean) {
    return null;
  }

  @Override
  public Object setBeanId(Object bean, Object id) {
    return id;
  }

  @Override
  public Map diff(Object a, Object b) {
    return null;
  }

  @Override
  public  T createEntityBean(Class type) {
    return null;
  }

  @Override
  public  CsvReader createCsvReader(Class beanType) {
    return null;
  }

  @Override
  public  Query createNamedQuery(Class beanType, String namedQuery) {
    return null;
  }

  @Override
  public  Query createQuery(Class beanType, String eql) {
    return null;
  }

  @Override
  public  Query createQuery(Class beanType) {
    return null;
  }

  @Override
  public  Query find(Class beanType) {
    return null;
  }

  @Override
  public  Query findNative(Class beanType, String nativeSql) {
    return null;
  }

  @Override
  public Object nextId(Class beanType) {
    return null;
  }

  @Override
  public  Filter filter(Class beanType) {
    return null;
  }

  @Override
  public  void sort(List list, String sortByClause) {

  }

  @Override
  public  Update createUpdate(Class beanType, String ormUpdate) {
    return null;
  }

  @Override
  public SqlQuery createSqlQuery(String sql) {
    return null;
  }

  @Override
  public SqlUpdate createSqlUpdate(String sql) {
    return null;
  }

  @Override
  public CallableSql createCallableSql(String callableSql) {
    return null;
  }

  @Override
  public void register(TransactionCallback transactionCallback) throws PersistenceException {

  }

  @Override
  public Transaction createTransaction() {
    return null;
  }

  @Override
  public Transaction createTransaction(TxIsolation isolation) {
    return null;
  }

  @Override
  public Transaction beginTransaction() {
    return null;
  }

  @Override
  public Transaction beginTransaction(TxIsolation isolation) {
    return null;
  }

  @Override
  public Transaction beginTransaction(TxScope scope) {
    return null;
  }

  @Override
  public Transaction currentTransaction() {
    return null;
  }

  @Override
  public void flush() {

  }

  @Override
  public void commitTransaction() {

  }

  @Override
  public void rollbackTransaction() {

  }

  @Override
  public void endTransaction() {

  }

  @Override
  public void refresh(Object bean) {

  }

  @Override
  public void refreshMany(Object bean, String propertyName) {

  }

  @Override
  public  T find(Class beanType, Object id) {
    return null;
  }

  @Override
  public  T getReference(Class beanType, Object id) {
    return null;
  }

  @Override
  public  int findCount(Query query, Transaction transaction) {
    return 0;
  }

  @Override
  public  List findIds(Query query, Transaction transaction) {
    return null;
  }

  @Override
  public  List findSingleAttributeList(Query query, Transaction transaction) {
    return null;
  }

  @Override
  public  QueryIterator findIterate(Query query, Transaction transaction) {
    return null;
  }

  @Override
  public  void findEach(Query query, Consumer consumer, Transaction transaction) {

  }

  @Override
  public  void findEachWhile(Query query, Predicate consumer, Transaction transaction) {

  }

  @Override
  public  List findList(Query query, Transaction transaction) {
    return null;
  }

  @Override
  public  FutureRowCount findFutureCount(Query query, Transaction transaction) {
    return null;
  }

  @Override
  public  FutureIds findFutureIds(Query query, Transaction transaction) {
    return null;
  }

  @Override
  public  FutureList findFutureList(Query query, Transaction transaction) {
    return null;
  }

  @Override
  public  PagedList findPagedList(Query query, Transaction transaction) {
    return null;
  }

  @Override
  public  Set findSet(Query query, Transaction transaction) {
    return null;
  }

  @Override
  public  Map findMap(Query query, Transaction transaction) {
    return null;
  }

  @Override
  public  T findUnique(Query query, Transaction transaction) {
    return null;
  }

  @Override
  public  T findOne(Query query, Transaction transaction) {
    return null;
  }
  @Override
  public  Optional findOneOrEmpty(Query query, Transaction transaction) {
    return null;
  }

  @Override
  public List findList(SqlQuery query, Transaction transaction) {
    return null;
  }

  @Override
  public SqlRow findUnique(SqlQuery query, Transaction transaction) {
    return null;
  }

  @Override
  public SqlRow findOne(SqlQuery query, Transaction transaction) {
    return null;
  }

  @Override
  public void findEach(SqlQuery sqlQuery, Consumer queryEachConsumer, Transaction transaction) {

  }

  @Override
  public void findEachWhile(SqlQuery sqlQuery, Predicate queryEachWhileConsumer, Transaction transaction) {

  }

  @Override
  public  List> findVersions(Query query, Transaction transaction) {
    return null;
  }

  @Override
  public  Set validateQuery(Query query) {
    return null;
  }

  @Override
  public void save(Object bean) throws OptimisticLockException {
    savedBeans.add(bean);
  }

  @Override
  public int saveAll(Collection beans) throws OptimisticLockException {
    savedBeans.addAll(beans);
    return 0;
  }

  @Override
  public boolean delete(Object bean) throws OptimisticLockException {
    deletedBeans.add(bean);
    return false;
  }

  @Override
  public int deleteAll(Collection c) throws OptimisticLockException {
    deletedBeans.addAll(c);
    return 0;
  }

  @Override
  public  int delete(Query query, Transaction transaction) {
    return 0;
  }

  @Override
  public int deleteAll(Collection beans, Transaction transaction) throws OptimisticLockException {
    return 0;
  }

  @Override
  public int delete(Class beanType, Object id) {
    return 0;
  }

  @Override
  public int delete(Class beanType, Object id, Transaction transaction) {
    return 0;
  }

  @Override
  public int deletePermanent(Class beanType, Object id) {
    return 0;
  }

  @Override
  public int deletePermanent(Class beanType, Object id, Transaction transaction) {
    return 0;
  }

  @Override
  public int deleteAll(Class beanType, Collection ids) {
    return 0;
  }

  @Override
  public int deleteAll(Class beanType, Collection ids, Transaction transaction) {
    return 0;
  }

  @Override
  public int deleteAllPermanent(Collection beans, Transaction transaction) throws OptimisticLockException {
    return 0;
  }

  @Override
  public boolean deletePermanent(Object bean) throws OptimisticLockException {
    return false;
  }

  @Override
  public boolean deletePermanent(Object bean, Transaction transaction) throws OptimisticLockException {
    return false;
  }

  @Override
  public int deleteAllPermanent(Collection beans) throws OptimisticLockException {
    return 0;
  }

  @Override
  public int deleteAllPermanent(Class beanType, Collection ids) {
    return 0;
  }

  @Override
  public int deleteAllPermanent(Class beanType, Collection ids, Transaction transaction) {
    return 0;
  }

  @Override
  public int execute(SqlUpdate sqlUpdate) {
    return 0;
  }

  @Override
  public int execute(Update update) {
    return 0;
  }

  @Override
  public int execute(Update update, Transaction t) {
    return 0;
  }

  @Override
  public int execute(CallableSql callableSql) {
    return 0;
  }

  @Override
  public void externalModification(String tableName, boolean inserted, boolean updated, boolean deleted) {

  }

  @Override
  public  T publish(Class beanType, Object id, Transaction transaction) {
    return null;
  }

  @Override
  public  T publish(Class beanType, Object id) {
    return null;
  }

  @Override
  public  List publish(Query query, Transaction transaction) {
    return null;
  }

  @Override
  public  List publish(Query query) {
    return null;
  }

  @Override
  public  T draftRestore(Class beanType, Object id, Transaction transaction) {
    return null;
  }

  @Override
  public  T draftRestore(Class beanType, Object id) {
    return null;
  }

  @Override
  public  List draftRestore(Query query, Transaction transaction) {
    return null;
  }

  @Override
  public  List draftRestore(Query query) {
    return null;
  }

  @Override
  public  T find(Class beanType, Object uid, Transaction transaction) {
    return null;
  }

  @Override
  public void save(Object bean, Transaction transaction) throws OptimisticLockException {
    savedBeans.add(bean);
  }

  @Override
  public int saveAll(Collection beans, Transaction transaction) throws OptimisticLockException {
    savedBeans.addAll(beans);
    return 0;
  }

  @Override
  public void markAsDirty(Object bean) {

  }

  @Override
  public  UpdateQuery update(Class beanType) {
    return null;
  }

  @Override
  public  int update(Query query, Transaction transaction) {
    return 0;
  }

  @Override
  public void update(Object bean) throws OptimisticLockException {

  }

  @Override
  public void update(Object bean, Transaction t) throws OptimisticLockException {

  }

  @Override
  public void update(Object bean, Transaction transaction, boolean deleteMissingChildren) throws OptimisticLockException {

  }

  @Override
  public void updateAll(Collection beans) throws OptimisticLockException {

  }

  @Override
  public void updateAll(Collection beans, Transaction transaction) throws OptimisticLockException {

  }

  @Override
  public void insert(Object bean) {

  }

  @Override
  public void insert(Object bean, Transaction t) {

  }

  @Override
  public void insertAll(Collection beans) {

  }

  @Override
  public void insertAll(Collection beans, Transaction t) {

  }

  @Override
  public boolean delete(Object bean, Transaction t) throws OptimisticLockException {
    return false;
  }

  @Override
  public int execute(SqlUpdate updSql, Transaction t) {
    return 0;
  }

  @Override
  public int execute(CallableSql callableSql, Transaction t) {
    return 0;
  }

  @Override
  public void execute(TxScope scope, TxRunnable r) {

  }

  @Override
  public void execute(TxRunnable r) {

  }

  @Override
  public  T execute(TxScope scope, TxCallable c) {
    return null;
  }

  @Override
  public  T execute(TxCallable c) {
    return null;
  }

  @Override
  public ServerCacheManager getServerCacheManager() {
    return null;
  }

  @Override
  public BackgroundExecutor getBackgroundExecutor() {
    return null;
  }

  @Override
  public JsonContext json() {
    return null;
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy