Class DefaultServer
- All Implemented Interfaces:
io.ebean.bean.BeanCollectionLoader, io.ebean.Database, io.ebean.plugin.SpiServer, SpiEbeanServer
-
Constructor Summary
ConstructorsConstructorDescriptionDefaultServer(InternalConfiguration config, io.ebean.cache.ServerCacheManager cache) Create the DefaultServer. -
Method Summary
Modifier and TypeMethodDescriptionvoidaddBatch(SpiSqlUpdate sqlUpdate, @Nullable SpiTransaction transaction) Add to JDBC batch for later execution.io.ebean.AutoTuneautoTune()io.ebean.BackgroundExecutorio.ebean.bean.BeanLoaderio.ebean.BeanState<T> io.ebean.plugin.BeanType<T> Return the SPI bean types for the given bean class.List<? extends io.ebean.plugin.BeanType<?>> Return all the SPI BeanTypes.List<? extends io.ebean.plugin.BeanType<?>> Return the SPI bean types mapped to the given table.Begin a managed transaction (Uses scope manager / ThreadLocal).io.ebean.Transactionio.ebean.TransactionbeginTransaction(io.ebean.annotation.TxIsolation isolation) io.ebean.TransactionbeginTransaction(io.ebean.TxScope txScope) io.ebean.cache.ServerCacheManagerSet<io.ebean.plugin.Property> checkUniqueness(Object bean) Set<io.ebean.plugin.Property> checkUniqueness(Object bean, @Nullable io.ebean.Transaction transaction) voidClear the query execution statistics.voidClear an implicit transaction from the scope.longclockNow()Return the NOW time from the Clock.<T> CQuery<T> compileQuery(SpiQuery.Type type, SpiQuery<T> query, io.ebean.Transaction transaction) Compile a query.io.ebean.DatabaseBuilder.Settingsconfig()io.ebean.CallableSqlcreateCallableSql(String sql) io.ebean.bean.CallOriginCreate a CallStack object.<T> TcreateEntityBean(Class<T> type) Create a new EntityBean bean.<T> STreePropertycreateFormulaProperty(SpiBeanType desc, String formula, String path) <T> DefaultOrmQuery<T> createQuery(Class<T> beanType) Override in order to return SpiQueryCreate a query bind capture for the given query plan.createReadOnlyTransaction(Object tenantId, boolean useMaster) Create a ServerTransaction for query purposes.io.ebean.TransactionCreates a new Transaction that is NOT stored in TransactionThreadLocal.io.ebean.TransactioncreateTransaction(io.ebean.annotation.TxIsolation isolation) Create a transaction additionally specify the Isolation level.<T> io.ebean.Update<T> createUpdate(Class<T> beanType, String ormUpdate) @Nullable SpiTransactionReturn the current transaction or null if there is no current transaction.@Nullable ObjectReturn the current Tenant Id.io.ebean.Transactionio.ebean.config.dbplatform.DatabasePlatformReturn the DataTimeZone to use when reading/writing timestamps via JDBC.<T> intintintbooleanDelete the bean.booleanDelete the bean with the explicit transaction.intdeleteAll(Class<?> beanType, Collection<?> ids) intdeleteAll(Class<?> beanType, Collection<?> ids, @Nullable io.ebean.Transaction transaction) intdeleteAll(Collection<?> beans) Delete all the beans in the collection.intdeleteAll(Collection<?> beans, @Nullable io.ebean.Transaction transaction) Delete all the beans in the collection.intdeleteAllPermanent(Class<?> beanType, Collection<?> ids) intdeleteAllPermanent(Class<?> beanType, Collection<?> ids, @Nullable io.ebean.Transaction transaction) intdeleteAllPermanent(Collection<?> beans) intdeleteAllPermanent(Collection<?> beans, @Nullable io.ebean.Transaction transaction) intdeletePermanent(Class<?> beanType, Object id) intdeletePermanent(Class<?> beanType, Object id, @Nullable io.ebean.Transaction transaction) booleandeletePermanent(Object bean) booleandeletePermanent(Object bean, @Nullable io.ebean.Transaction transaction) voidderegister(io.ebean.event.BeanPersistController controller) <T> BeanDescriptor<T> descriptor(Class<T> beanClass) Return the BeanDescriptor for a given type of bean.descriptorById(String beanClassName) Return the BeanDescriptor using its class name.List<BeanDescriptor<?>> Return all the BeanDescriptors.List<BeanDescriptor<?>> descriptors(String tableName) Return the BeanDescriptor's for a given table name.voidEnd the current transaction if it is active.voidintexecute(io.ebean.CallableSql callSql) Execute the CallableSql.intexecute(io.ebean.CallableSql callSql, @Nullable io.ebean.Transaction transaction) Execute the CallableSql with an explicit transaction.intexecute(io.ebean.SqlUpdate updSql) Execute the updateSql.intexecute(io.ebean.SqlUpdate updSql, @Nullable io.ebean.Transaction transaction) Execute the updateSql with an explicit transaction.intexecute(io.ebean.Update<?> update) Execute the orm update.intexecute(io.ebean.Update<?> update, @Nullable io.ebean.Transaction transaction) Execute the updateSql with an explicit transaction.voidint[]executeBatch(SpiSqlUpdate sqlUpdate, @Nullable SpiTransaction transaction) Execute the batched statement.<T> TexecuteCall(@Nullable io.ebean.TxScope scope, Callable<T> callable) <T> TexecuteCall(Callable<T> callable) intexecuteNow(SpiSqlUpdate sqlUpdate) Execute the sql update regardless of transaction batch mode.voidexecutePlugins(boolean online) Execute all the plugins with an online flag indicating the DB is up or not.<T> booleanbooleanReturn true if a row for the bean type and id exists.io.ebean.ExpressionFactoryvoidexternalModification(TransactionEventTable tableEvent) Process committed beans from another framework or server in another cluster.voidexternalModification(String tableName, boolean inserts, boolean updates, boolean deletes) Developer informing eBean that tables where modified outside of eBean.<T> io.ebean.Filter<T> <T> io.ebean.Query<T> <T> T<T> TFind a bean using its unique id.<T> int<T> intfindCountWithCopy(SpiQuery<T> query) Execute the findCount query but without copying the query.<T> io.ebean.DtoQuery<T> Return / wrap the ORM query as a DTO query.<T> io.ebean.DtoQuery<T> <T> voidfindDtoEach(SpiDtoQuery<T> query, int batch, Consumer<List<T>> consumer) DTO findEach batch query.<T> voidfindDtoEach(SpiDtoQuery<T> query, Consumer<T> consumer) DTO findEach query.<T> voidfindDtoEachWhile(SpiDtoQuery<T> query, Predicate<T> consumer) DTO findEachWhile query.<T> io.ebean.QueryIterator<T> findDtoIterate(SpiDtoQuery<T> query) DTO findIterate query.<T> List<T> findDtoList(SpiDtoQuery<T> query) DTO findList query.<T> @Nullable TfindDtoOne(SpiDtoQuery<T> query) DTO findOne query.<T> Stream<T> findDtoStream(SpiDtoQuery<T> query) DTO findStream query.<T> void<T> voidvoidfindEach(SpiSqlQuery query, Consumer<io.ebean.SqlRow> consumer) voidfindEachRow(SpiSqlQuery query, io.ebean.RowConsumer consumer) SqlQuery find each with consumer.<T> voidfindEachWhile(SpiQuery<T> query, Predicate<T> consumer) voidfindEachWhile(SpiSqlQuery query, Predicate<io.ebean.SqlRow> consumer) <T> io.ebean.FutureRowCount<T> findFutureCount(SpiQuery<T> query) <T> io.ebean.FutureIds<T> findFutureIds(SpiQuery<T> query) <T> io.ebean.FutureList<T> findFutureList(SpiQuery<T> query) <K,T> io.ebean.FutureMap <K, T> findFutureMap(SpiQuery<T> query) <A,T> List <A> <A,T> List <A> findIdsWithCopy(SpiQuery<T> query) Execute the findId's query but without copying the query.<T> io.ebean.QueryIterator<T> findIterate(SpiQuery<T> query) <T> List<T> List<io.ebean.SqlRow> findList(SpiSqlQuery query) <T> List<T> findListMapper(SpiSqlQuery query, io.ebean.RowMapper<T> mapper) SqlQuery find list with mapper.<K,T> Map <K, T> <T> io.ebean.Query<T> findNative(Class<T> beanType, String nativeSql) <T> @Nullable T@Nullable io.ebean.SqlRowfindOne(SpiSqlQuery query) <T> TfindOneMapper(SpiSqlQuery query, io.ebean.RowMapper<T> mapper) SqlQuery find one with mapper.<T> Optional<T> findOneOrEmpty(SpiQuery<T> query) <T> io.ebean.PagedList<T> findPagedList(SpiQuery<T> query) findResultSet(SpiQuery<?> ormQuery) Execute the underlying ORM query returning as a JDBC ResultSet to map to DTO beans.<T> Set<T> <T> TfindSingleAttribute(SpiSqlQuery query, Class<T> cls) SqlQuery find single attribute.<T> voidfindSingleAttributeEach(SpiSqlQuery query, Class<T> cls, Consumer<T> consumer) SqlQuery find single attribute streaming the result to a consumer.<A,T> List <A> findSingleAttributeList(SpiQuery<T> query) <T> List<T> findSingleAttributeList(SpiSqlQuery query, Class<T> cls) SqlQuery find single attribute list.<A,T> Set <A> findSingleAttributeSet(SpiQuery<T> query) <T> Stream<T> findStream(SpiQuery<T> query) <T> List<io.ebean.Version<T>> findVersions(SpiQuery<T> query) voidflush()voidRun any initialisation required before registering with the ClusterManager.voidvoidvoidvoidvoidinsertAll(@Nullable Collection<?> beans, @Nullable io.ebean.Transaction transaction) voidinsertAll(@Nullable Collection<?> beans, io.ebean.InsertOptions options, @Nullable io.ebean.Transaction transaction) voidinsertAll(Collection<?> beans) voidinsertAll(Collection<?> beans, io.ebean.InsertOptions options) booleanReturn true if the L2 cache has been disabled.booleanisSupportedType(Type genericType) Return true if the type is known as an Entity or Xml type or a List Set or Map of known bean types.booleanReturn true if updates in JDBC batch should include all columns if unspecified on the transaction.io.ebean.text.json.JsonContextjson()Return the server extended Json context.intReturn the default batch size for lazy loading.voidloadBean(io.ebean.bean.EntityBeanIntercept ebi) voidloadBean(LoadBeanRequest loadRequest) Load a batch of Associated One Beans.voidloadBeanL2(io.ebean.bean.EntityBeanIntercept ebi) voidloadBeanRef(io.ebean.bean.EntityBeanIntercept ebi) voidloadMany(io.ebean.bean.BeanCollection<?> bc, boolean onlyIds) voidloadMany(LoadManyRequest loadRequest) Lazy load a batch of Many's.voidlog()Return the log manager.voidmarkAsDirty(Object bean) voidvoidvoidio.ebean.meta.MetaInfoManagermetaInfo()name()Return the server name.io.ebean.PersistenceContextScopepersistenceContextScope(SpiQuery<?> query) Return the PersistenceContextScope to use defined at query or server level.io.ebean.annotation.Platformplatform()io.ebean.plugin.SpiServer@Nullable DataSource<T> TReturn a Reference bean.voidvoidrefreshMany(Object parentBean, String propertyName) voidregister(io.ebean.event.BeanPersistController controller) voidregister(io.ebean.TransactionCallback transactionCallback) voidAnother server in the cluster sent this event so that we can inform local BeanListeners of inserts updates and deletes that occurred remotely (on another server in the cluster).voidPersist the bean by either performing an insert or update.voidSave the bean with an explicit transaction.intintsaveAll(Collection<?> beans) intsaveAll(Collection<?> beans, io.ebean.Transaction transaction) voidscopedTransactionEnter(io.ebean.TxScope txScope) voidscopedTransactionExit(Object returnOrThrowable, int opCode) io.ebean.ScriptRunnerscript()voidshutdown()voidshutdown(boolean shutdownDataSource, boolean deregisterDriver) voidslowQueryCheck(long timeMicros, int rowCount, SpiQuery<?> query) Check for slow query event.<T> voidio.ebean.SqlQueryio.ebean.SqlUpdatevoidstart()Start any services after registering with the ClusterManager.toString()Return the transaction manager.voidvoid<T> int<T> io.ebean.UpdateQuery<T> voidvoidvoidupdateAll(@Nullable Collection<?> beans, @Nullable io.ebean.Transaction transaction) Update all beans in the collection with an explicit transaction.voidupdateAll(Collection<?> beans) validateQuery(io.ebean.Query<T> query) voidvisitMetrics(io.ebean.meta.MetricVisitor visitor) Visit all the metrics (typically reporting them).
-
Constructor Details
-
DefaultServer
Create the DefaultServer.
-
-
Method Details
-
executePlugins
public void executePlugins(boolean online) Execute all the plugins with an online flag indicating the DB is up or not. -
isDisableL2Cache
public boolean isDisableL2Cache()Description copied from interface:SpiEbeanServerReturn true if the L2 cache has been disabled.- Specified by:
isDisableL2Cachein interfaceSpiEbeanServer
-
log
Description copied from interface:SpiEbeanServerReturn the log manager.- Specified by:
login interfaceSpiEbeanServer
-
isUpdateAllPropertiesInBatch
public boolean isUpdateAllPropertiesInBatch()Description copied from interface:SpiEbeanServerReturn true if updates in JDBC batch should include all columns if unspecified on the transaction.- Specified by:
isUpdateAllPropertiesInBatchin interfaceSpiEbeanServer
-
lazyLoadBatchSize
public int lazyLoadBatchSize()Description copied from interface:SpiEbeanServerReturn the default batch size for lazy loading.- Specified by:
lazyLoadBatchSizein interfaceSpiEbeanServer
-
currentTenantId
Description copied from interface:SpiEbeanServerReturn the current Tenant Id.- Specified by:
currentTenantIdin interfaceSpiEbeanServer
-
config
public io.ebean.DatabaseBuilder.Settings config()- Specified by:
configin interfaceio.ebean.plugin.SpiServer
-
databasePlatform
public io.ebean.config.dbplatform.DatabasePlatform databasePlatform()- Specified by:
databasePlatformin interfaceio.ebean.plugin.SpiServer
-
script
public io.ebean.ScriptRunner script()- Specified by:
scriptin interfaceio.ebean.Database
-
dataTimeZone
Description copied from interface:SpiEbeanServerReturn the DataTimeZone to use when reading/writing timestamps via JDBC.- Specified by:
dataTimeZonein interfaceSpiEbeanServer
-
metaInfo
public io.ebean.meta.MetaInfoManager metaInfo()- Specified by:
metaInfoin interfaceio.ebean.Database
-
platform
public io.ebean.annotation.Platform platform()- Specified by:
platformin interfaceio.ebean.Database
-
pluginApi
public io.ebean.plugin.SpiServer pluginApi()- Specified by:
pluginApiin interfaceio.ebean.Database
-
backgroundExecutor
public io.ebean.BackgroundExecutor backgroundExecutor()- Specified by:
backgroundExecutorin interfaceio.ebean.Database
-
expressionFactory
public io.ebean.ExpressionFactory expressionFactory()- Specified by:
expressionFactoryin interfaceio.ebean.Database
-
autoTune
public io.ebean.AutoTune autoTune()- Specified by:
autoTunein interfaceio.ebean.Database
-
dataSource
- Specified by:
dataSourcein interfaceio.ebean.Database
-
readOnlyDataSource
- Specified by:
readOnlyDataSourcein interfaceio.ebean.Database
-
initialise
public void initialise()Run any initialisation required before registering with the ClusterManager. -
start
public void start()Start any services after registering with the ClusterManager. -
shutdown
public void shutdown()- Specified by:
shutdownin interfaceio.ebean.Database
-
shutdown
public void shutdown(boolean shutdownDataSource, boolean deregisterDriver) - Specified by:
shutdownin interfaceio.ebean.Database
-
toString
-
name
Return the server name.- Specified by:
namein interfaceio.ebean.bean.BeanCollectionLoader- Specified by:
namein interfaceio.ebean.Database
-
clockNow
public long clockNow()Description copied from interface:SpiEbeanServerReturn the NOW time from the Clock.- Specified by:
clockNowin interfaceSpiEbeanServer
-
beanState
- Specified by:
beanStatein interfaceio.ebean.Database
-
compileQuery
public <T> CQuery<T> compileQuery(SpiQuery.Type type, SpiQuery<T> query, io.ebean.Transaction transaction) Compile a query. Only valid for ORM queries.- Specified by:
compileQueryin interfaceSpiEbeanServer
-
cacheManager
public io.ebean.cache.ServerCacheManager cacheManager()- Specified by:
cacheManagerin interfaceio.ebean.Database
-
refreshMany
-
loadMany
Description copied from interface:SpiEbeanServerLazy load a batch of Many's.- Specified by:
loadManyin interfaceSpiEbeanServer
-
loadMany
public void loadMany(io.ebean.bean.BeanCollection<?> bc, boolean onlyIds) - Specified by:
loadManyin interfaceio.ebean.bean.BeanCollectionLoader
-
refresh
- Specified by:
refreshin interfaceio.ebean.Database
-
loadBean
Description copied from interface:SpiEbeanServerLoad a batch of Associated One Beans.- Specified by:
loadBeanin interfaceSpiEbeanServer
-
beanLoader
public io.ebean.bean.BeanLoader beanLoader()- Specified by:
beanLoaderin interfaceio.ebean.plugin.SpiServer
-
loadBean
public void loadBean(io.ebean.bean.EntityBeanIntercept ebi) - Specified by:
loadBeanin interfaceio.ebean.plugin.SpiServer
-
loadBeanRef
public void loadBeanRef(io.ebean.bean.EntityBeanIntercept ebi) - Specified by:
loadBeanRefin interfaceio.ebean.plugin.SpiServer
-
loadBeanL2
public void loadBeanL2(io.ebean.bean.EntityBeanIntercept ebi) - Specified by:
loadBeanL2in interfaceio.ebean.plugin.SpiServer
-
diff
-
externalModification
Process committed beans from another framework or server in another cluster.This notifies this instance of the framework that beans have been committed externally to it. Either by another framework or clustered server. It needs to maintain its cache and text indexes appropriately.
- Specified by:
externalModificationin interfaceSpiEbeanServer
-
externalModification
public void externalModification(String tableName, boolean inserts, boolean updates, boolean deletes) Developer informing eBean that tables where modified outside of eBean. Invalidate the cache etc as required.- Specified by:
externalModificationin interfaceio.ebean.Database
-
truncate
- Specified by:
truncatein interfaceio.ebean.Database
-
truncate
- Specified by:
truncatein interfaceio.ebean.Database
-
clearQueryStatistics
public void clearQueryStatistics()Clear the query execution statistics.- Specified by:
clearQueryStatisticsin interfaceSpiEbeanServer
-
createEntityBean
Create a new EntityBean bean.This will generally return a subclass of the parameter 'type' which additionally implements the EntityBean interface. That is, the returned bean is typically an instance of a dynamically generated class.
- Specified by:
createEntityBeanin interfaceio.ebean.Database
-
reference
Return a Reference bean.If a current transaction is active then this will check the Context of that transaction to see if the bean is already loaded. If it is already loaded then it will returned that object.
- Specified by:
referencein interfaceio.ebean.Database
-
register
public void register(io.ebean.TransactionCallback transactionCallback) - Specified by:
registerin interfaceio.ebean.Database
-
createTransaction
public io.ebean.Transaction createTransaction()Creates a new Transaction that is NOT stored in TransactionThreadLocal. Use this when you want a thread to have a second independent transaction.- Specified by:
createTransactionin interfaceio.ebean.Database
-
createTransaction
public io.ebean.Transaction createTransaction(io.ebean.annotation.TxIsolation isolation) Create a transaction additionally specify the Isolation level.Note that this transaction is not stored in a thread local.
- Specified by:
createTransactionin interfaceio.ebean.Database
-
executeCall
- Specified by:
executeCallin interfaceio.ebean.Database
-
executeCall
- Specified by:
executeCallin interfaceio.ebean.Database
-
execute
- Specified by:
executein interfaceio.ebean.Database
-
execute
- Specified by:
executein interfaceio.ebean.Database
-
scopedTransactionEnter
public void scopedTransactionEnter(io.ebean.TxScope txScope) - Specified by:
scopedTransactionEnterin interfaceio.ebean.plugin.SpiServer
-
scopedTransactionExit
- Specified by:
scopedTransactionExitin interfaceio.ebean.plugin.SpiServer
-
currentServerTransaction
Description copied from interface:SpiEbeanServerReturn the current transaction or null if there is no current transaction.- Specified by:
currentServerTransactionin interfaceSpiEbeanServer
-
beginTransaction
public io.ebean.Transaction beginTransaction()- Specified by:
beginTransactionin interfaceio.ebean.Database
-
beginTransaction
public io.ebean.Transaction beginTransaction(io.ebean.TxScope txScope) - Specified by:
beginTransactionin interfaceio.ebean.Database
-
beginTransaction
public io.ebean.Transaction beginTransaction(io.ebean.annotation.TxIsolation isolation) - Specified by:
beginTransactionin interfaceio.ebean.Database
-
currentTransaction
public io.ebean.Transaction currentTransaction()- Specified by:
currentTransactionin interfaceio.ebean.Database
-
flush
public void flush()- Specified by:
flushin interfaceio.ebean.Database
-
endTransaction
public void endTransaction()Description copied from interface:SpiEbeanServerEnd the current transaction if it is active.- Specified by:
endTransactionin interfaceSpiEbeanServer
-
nextId
-
sort
-
validateQuery
-
filter
- Specified by:
filterin interfaceio.ebean.Database
-
update
- Specified by:
updatein interfaceio.ebean.Database
-
merge
- Specified by:
mergein interfaceio.ebean.Database
-
merge
- Specified by:
mergein interfaceio.ebean.Database
-
merge
public void merge(Object bean, io.ebean.MergeOptions options, @Nullable io.ebean.Transaction transaction) - Specified by:
mergein interfaceio.ebean.Database
-
lock
- Specified by:
lockin interfaceio.ebean.Database
-
find
- Specified by:
findin interfaceio.ebean.Database
-
findNative
-
createQuery
Description copied from interface:SpiEbeanServerOverride in order to return SpiQuery- Specified by:
createQueryin interfaceio.ebean.Database- Specified by:
createQueryin interfaceSpiEbeanServer
-
createUpdate
-
findDto
-
findDto
Description copied from interface:SpiEbeanServerReturn / wrap the ORM query as a DTO query.- Specified by:
findDtoin interfaceSpiEbeanServer
-
findResultSet
Description copied from interface:SpiEbeanServerExecute the underlying ORM query returning as a JDBC ResultSet to map to DTO beans.- Specified by:
findResultSetin interfaceSpiEbeanServer
-
sqlQuery
- Specified by:
sqlQueryin interfaceio.ebean.Database
-
sqlUpdate
- Specified by:
sqlUpdatein interfaceio.ebean.Database
-
createCallableSql
- Specified by:
createCallableSqlin interfaceio.ebean.Database
-
find
-
find
-
createFormulaProperty
- Specified by:
createFormulaPropertyin interfaceSpiEbeanServer
-
persistenceContextScope
Return the PersistenceContextScope to use defined at query or server level.- Specified by:
persistenceContextScopein interfaceSpiEbeanServer
-
findOneOrEmpty
- Specified by:
findOneOrEmptyin interfaceSpiEbeanServer
-
findOne
- Specified by:
findOnein interfaceSpiEbeanServer
-
findSet
- Specified by:
findSetin interfaceSpiEbeanServer
-
findMap
- Specified by:
findMapin interfaceSpiEbeanServer
-
findSingleAttributeList
- Specified by:
findSingleAttributeListin interfaceSpiEbeanServer
-
findSingleAttributeSet
- Specified by:
findSingleAttributeSetin interfaceSpiEbeanServer
-
findCount
- Specified by:
findCountin interfaceSpiEbeanServer
-
findCountWithCopy
Description copied from interface:SpiEbeanServerExecute the findCount query but without copying the query.- Specified by:
findCountWithCopyin interfaceSpiEbeanServer
-
exists
Description copied from interface:SpiEbeanServerReturn true if a row for the bean type and id exists.- Specified by:
existsin interfaceSpiEbeanServer
-
exists
- Specified by:
existsin interfaceSpiEbeanServer
-
findIds
- Specified by:
findIdsin interfaceSpiEbeanServer
-
findIdsWithCopy
Description copied from interface:SpiEbeanServerExecute the findId's query but without copying the query.Used so that the list of Id's can be made accessible to client code before the query has finished (if executing in a background thread).
- Specified by:
findIdsWithCopyin interfaceSpiEbeanServer
-
delete
- Specified by:
deletein interfaceSpiEbeanServer
-
update
- Specified by:
updatein interfaceSpiEbeanServer
-
findFutureCount
- Specified by:
findFutureCountin interfaceSpiEbeanServer
-
findFutureIds
- Specified by:
findFutureIdsin interfaceSpiEbeanServer
-
findFutureList
- Specified by:
findFutureListin interfaceSpiEbeanServer
-
findFutureMap
- Specified by:
findFutureMapin interfaceSpiEbeanServer
-
findPagedList
- Specified by:
findPagedListin interfaceSpiEbeanServer
-
findIterate
- Specified by:
findIteratein interfaceSpiEbeanServer
-
findStream
- Specified by:
findStreamin interfaceSpiEbeanServer
-
findEach
- Specified by:
findEachin interfaceSpiEbeanServer
-
findEach
- Specified by:
findEachin interfaceSpiEbeanServer
-
findEachWhile
- Specified by:
findEachWhilein interfaceSpiEbeanServer
-
findVersions
- Specified by:
findVersionsin interfaceSpiEbeanServer
-
findList
- Specified by:
findListin interfaceSpiEbeanServer
-
findOne
- Specified by:
findOnein interfaceSpiEbeanServer
-
findEach
- Specified by:
findEachin interfaceSpiEbeanServer
-
findEachWhile
- Specified by:
findEachWhilein interfaceSpiEbeanServer
-
findList
- Specified by:
findListin interfaceSpiEbeanServer
-
findEachRow
Description copied from interface:SpiEbeanServerSqlQuery find each with consumer.- Specified by:
findEachRowin interfaceSpiEbeanServer
-
findListMapper
Description copied from interface:SpiEbeanServerSqlQuery find list with mapper.- Specified by:
findListMapperin interfaceSpiEbeanServer
-
findOneMapper
Description copied from interface:SpiEbeanServerSqlQuery find one with mapper.- Specified by:
findOneMapperin interfaceSpiEbeanServer
-
findSingleAttributeEach
Description copied from interface:SpiEbeanServerSqlQuery find single attribute streaming the result to a consumer.- Specified by:
findSingleAttributeEachin interfaceSpiEbeanServer
-
findSingleAttributeList
Description copied from interface:SpiEbeanServerSqlQuery find single attribute list.- Specified by:
findSingleAttributeListin interfaceSpiEbeanServer
-
findSingleAttribute
Description copied from interface:SpiEbeanServerSqlQuery find single attribute.- Specified by:
findSingleAttributein interfaceSpiEbeanServer
-
findDtoEach
Description copied from interface:SpiEbeanServerDTO findEach query.- Specified by:
findDtoEachin interfaceSpiEbeanServer
-
findDtoEach
Description copied from interface:SpiEbeanServerDTO findEach batch query.- Specified by:
findDtoEachin interfaceSpiEbeanServer
-
findDtoEachWhile
Description copied from interface:SpiEbeanServerDTO findEachWhile query.- Specified by:
findDtoEachWhilein interfaceSpiEbeanServer
-
findDtoIterate
Description copied from interface:SpiEbeanServerDTO findIterate query.- Specified by:
findDtoIteratein interfaceSpiEbeanServer
-
findDtoStream
Description copied from interface:SpiEbeanServerDTO findStream query.- Specified by:
findDtoStreamin interfaceSpiEbeanServer
-
findDtoList
Description copied from interface:SpiEbeanServerDTO findList query.- Specified by:
findDtoListin interfaceSpiEbeanServer
-
findDtoOne
Description copied from interface:SpiEbeanServerDTO findOne query.- Specified by:
findDtoOnein interfaceSpiEbeanServer
-
save
Persist the bean by either performing an insert or update.- Specified by:
savein interfaceio.ebean.Database
-
save
Save the bean with an explicit transaction.- Specified by:
savein interfaceio.ebean.Database
-
markAsDirty
- Specified by:
markAsDirtyin interfaceio.ebean.Database
-
update
- Specified by:
updatein interfaceio.ebean.Database
-
update
- Specified by:
updatein interfaceio.ebean.Database
-
updateAll
- Specified by:
updateAllin interfaceio.ebean.Database- Throws:
jakarta.persistence.OptimisticLockException
-
updateAll
Update all beans in the collection with an explicit transaction.- Specified by:
updateAllin interfaceio.ebean.Database
-
insert
- Specified by:
insertin interfaceio.ebean.Database
-
insert
- Specified by:
insertin interfaceio.ebean.Database
-
insert
- Specified by:
insertin interfaceio.ebean.Database
-
insert
public void insert(Object bean, io.ebean.InsertOptions insertOptions, io.ebean.Transaction transaction) - Specified by:
insertin interfaceio.ebean.Database
-
insertAll
- Specified by:
insertAllin interfaceio.ebean.Database
-
insertAll
- Specified by:
insertAllin interfaceio.ebean.Database
-
insertAll
- Specified by:
insertAllin interfaceio.ebean.Database
-
insertAll
public void insertAll(@Nullable Collection<?> beans, io.ebean.InsertOptions options, @Nullable io.ebean.Transaction transaction) - Specified by:
insertAllin interfaceio.ebean.Database
-
saveAll
public int saveAll(Collection<?> beans, io.ebean.Transaction transaction) throws jakarta.persistence.OptimisticLockException - Specified by:
saveAllin interfaceio.ebean.Database- Throws:
jakarta.persistence.OptimisticLockException
-
saveAll
- Specified by:
saveAllin interfaceio.ebean.Database- Throws:
jakarta.persistence.OptimisticLockException
-
saveAll
- Specified by:
saveAllin interfaceio.ebean.Database- Throws:
jakarta.persistence.OptimisticLockException
-
delete
-
delete
-
deletePermanent
-
deletePermanent
-
deleteAll
- Specified by:
deleteAllin interfaceio.ebean.Database
-
deleteAll
public int deleteAll(Class<?> beanType, Collection<?> ids, @Nullable io.ebean.Transaction transaction) - Specified by:
deleteAllin interfaceio.ebean.Database
-
deleteAllPermanent
- Specified by:
deleteAllPermanentin interfaceio.ebean.Database
-
deleteAllPermanent
public int deleteAllPermanent(Class<?> beanType, Collection<?> ids, @Nullable io.ebean.Transaction transaction) - Specified by:
deleteAllPermanentin interfaceio.ebean.Database
-
delete
Delete the bean.- Specified by:
deletein interfaceio.ebean.Database
-
delete
public boolean delete(Object bean, @Nullable io.ebean.Transaction transaction) throws jakarta.persistence.OptimisticLockException Delete the bean with the explicit transaction.- Specified by:
deletein interfaceio.ebean.Database- Throws:
jakarta.persistence.OptimisticLockException
-
deletePermanent
- Specified by:
deletePermanentin interfaceio.ebean.Database- Throws:
jakarta.persistence.OptimisticLockException
-
deletePermanent
public boolean deletePermanent(Object bean, @Nullable io.ebean.Transaction transaction) throws jakarta.persistence.OptimisticLockException - Specified by:
deletePermanentin interfaceio.ebean.Database- Throws:
jakarta.persistence.OptimisticLockException
-
deleteAllPermanent
- Specified by:
deleteAllPermanentin interfaceio.ebean.Database
-
deleteAllPermanent
- Specified by:
deleteAllPermanentin interfaceio.ebean.Database
-
deleteAll
Delete all the beans in the collection.- Specified by:
deleteAllin interfaceio.ebean.Database
-
deleteAll
Delete all the beans in the collection.- Specified by:
deleteAllin interfaceio.ebean.Database
-
execute
public int execute(io.ebean.CallableSql callSql, @Nullable io.ebean.Transaction transaction) Execute the CallableSql with an explicit transaction.- Specified by:
executein interfaceio.ebean.Database
-
execute
public int execute(io.ebean.CallableSql callSql) Execute the CallableSql.- Specified by:
executein interfaceio.ebean.Database
-
execute
public int execute(io.ebean.SqlUpdate updSql, @Nullable io.ebean.Transaction transaction) Execute the updateSql with an explicit transaction.- Specified by:
executein interfaceio.ebean.Database
-
executeNow
Description copied from interface:SpiEbeanServerExecute the sql update regardless of transaction batch mode.- Specified by:
executeNowin interfaceSpiEbeanServer
-
addBatch
Description copied from interface:SpiEbeanServerAdd to JDBC batch for later execution.- Specified by:
addBatchin interfaceSpiEbeanServer
-
executeBatch
Description copied from interface:SpiEbeanServerExecute the batched statement.- Specified by:
executeBatchin interfaceSpiEbeanServer
-
execute
public int execute(io.ebean.SqlUpdate updSql) Execute the updateSql.- Specified by:
executein interfaceio.ebean.Database
-
execute
public int execute(io.ebean.Update<?> update, @Nullable io.ebean.Transaction transaction) Execute the updateSql with an explicit transaction.- Specified by:
executein interfaceio.ebean.Database
-
execute
public int execute(io.ebean.Update<?> update) Execute the orm update.- Specified by:
executein interfaceio.ebean.Database
-
descriptors
Return all the BeanDescriptors.- Specified by:
descriptorsin interfaceSpiEbeanServer
-
transactionManager
Return the transaction manager.- Specified by:
transactionManagerin interfaceSpiEbeanServer
-
register
public void register(io.ebean.event.BeanPersistController controller) -
deregister
public void deregister(io.ebean.event.BeanPersistController controller) -
isSupportedType
Description copied from interface:SpiEbeanServerReturn true if the type is known as an Entity or Xml type or a List Set or Map of known bean types.- Specified by:
isSupportedTypein interfaceSpiEbeanServer
-
beanId
-
beanId
-
descriptor
Return the BeanDescriptor for a given type of bean.- Specified by:
descriptorin interfaceSpiEbeanServer
-
descriptors
Return the BeanDescriptor's for a given table name.- Specified by:
descriptorsin interfaceSpiEbeanServer
-
beanTypes
Return all the SPI BeanTypes.- Specified by:
beanTypesin interfaceio.ebean.plugin.SpiServer
-
beanTypes
-
beanType
Return the SPI bean types for the given bean class.- Specified by:
beanTypein interfaceio.ebean.plugin.SpiServer
-
descriptorById
Return the BeanDescriptor using its class name.- Specified by:
descriptorByIdin interfaceSpiEbeanServer
-
remoteTransactionEvent
Another server in the cluster sent this event so that we can inform local BeanListeners of inserts updates and deletes that occurred remotely (on another server in the cluster).- Specified by:
remoteTransactionEventin interfaceSpiEbeanServer
-
clearServerTransaction
public void clearServerTransaction()Description copied from interface:SpiEbeanServerClear an implicit transaction from the scope.- Specified by:
clearServerTransactionin interfaceSpiEbeanServer
-
beginServerTransaction
Description copied from interface:SpiEbeanServerBegin a managed transaction (Uses scope manager / ThreadLocal).- Specified by:
beginServerTransactionin interfaceSpiEbeanServer
-
createReadOnlyTransaction
Description copied from interface:SpiEbeanServerCreate a ServerTransaction for query purposes.- Specified by:
createReadOnlyTransactionin interfaceSpiEbeanServer- Parameters:
tenantId- For multi-tenant lazy loading provide the tenantId to use.useMaster- Set to true when the query should use the master data source.
-
createCallOrigin
public io.ebean.bean.CallOrigin createCallOrigin()Create a CallStack object.This trims off the avaje ebean part of the stack trace so that the first element in the CallStack should be application code.
- Specified by:
createCallOriginin interfaceSpiEbeanServer
-
json
public io.ebean.text.json.JsonContext json()- Specified by:
jsonin interfaceio.ebean.Database
-
jsonExtended
Description copied from interface:SpiEbeanServerReturn the server extended Json context.- Specified by:
jsonExtendedin interfaceSpiEbeanServer
-
slowQueryCheck
Description copied from interface:SpiEbeanServerCheck for slow query event.- Specified by:
slowQueryCheckin interfaceSpiEbeanServer
-
checkUniqueness
-
checkUniqueness
-
visitMetrics
public void visitMetrics(io.ebean.meta.MetricVisitor visitor) Description copied from interface:SpiEbeanServerVisit all the metrics (typically reporting them).- Specified by:
visitMetricsin interfaceSpiEbeanServer
-
createQueryBindCapture
Description copied from interface:SpiEbeanServerCreate a query bind capture for the given query plan.- Specified by:
createQueryBindCapturein interfaceSpiEbeanServer
-