Files
ebean/ebean-api/src/main/java/io/ebean/plugin/SpiServer.java
T
Rob Bygrave 1f9cf1e4b7 Split DatabaseBuilder interface separating the setters n getters adding DatabaseBuilder.Settings
So DatabaseBuilder.Settings has all the getters for code looking to read
the configuration that has been set. So DatabaseBuilder now just has the
setter methods.

Use DatabaseBuilder.settings() to access the settings and read the config
that has been set.
2023-11-03 22:58:11 +13:00

67 lines
1.5 KiB
Java

package io.ebean.plugin;
import io.ebean.Database;
import io.ebean.bean.BeanLoader;
import io.ebean.bean.EntityBeanIntercept;
import io.ebean.DatabaseBuilder;
import io.ebean.config.dbplatform.DatabasePlatform;
import java.util.List;
/**
* Extensions to Database API made available to plugins.
*/
public interface SpiServer extends Database {
/**
* Return the DatabaseConfig.
*/
DatabaseBuilder.Settings config();
/**
* Return the DatabasePlatform for this database.
*/
DatabasePlatform databasePlatform();
/**
* Return all the bean types registered on this server instance.
*/
List<? extends BeanType<?>> beanTypes();
/**
* Return the bean type for a given entity bean class.
*/
<T> BeanType<T> beanType(Class<T> beanClass);
/**
* Return the bean types mapped to the given base table.
*/
List<? extends BeanType<?>> beanTypes(String baseTableName);
/**
* Return the bean type for a given doc store queueId.
*/
BeanType<?> beanTypeForQueueId(String queueId);
/**
* Return a BeanLoader.
*/
BeanLoader beanLoader();
/**
* Invoke lazy loading on this single bean (reference bean).
*/
void loadBeanRef(EntityBeanIntercept ebi);
/**
* Invoke lazy loading on this single bean (L2 cache bean).
*/
void loadBeanL2(EntityBeanIntercept ebi);
/**
* Invoke lazy loading on this single bean when no BeanLoader is set.
* Typically due to serialisation or multiple stateless updates.
*/
void loadBean(EntityBeanIntercept ebi);
}