001package io.ebean.event; 002 003import io.ebean.Database; 004import io.ebean.EbeanServer; 005import io.ebean.Query; 006import io.ebean.Transaction; 007 008/** 009 * Holds the information available for a bean query. 010 */ 011public interface BeanQueryRequest<T> { 012 013 /** 014 * Return the DB processing the request. 015 */ 016 default Database database() { 017 return getEbeanServer(); 018 } 019 020 /** 021 * Deprecated migrate to database(). 022 */ 023 @Deprecated 024 EbeanServer getEbeanServer(); 025 026 /** 027 * Return the Transaction associated with this request. 028 */ 029 Transaction transaction(); 030 031 /** 032 * Deprecated migrate to transaction(). 033 */ 034 @Deprecated 035 default Transaction getTransaction() { 036 return transaction(); 037 } 038 039 /** 040 * Returns the query. 041 */ 042 Query<T> query(); 043 044 /** 045 * Deprecated migrate to query(). 046 */ 047 @Deprecated 048 default Query<T> getQuery() { 049 return query(); 050 } 051 052 /** 053 * Return true if an Id IN expression should have the bind parameters padded. 054 */ 055 boolean isPadInExpression(); 056 057 /** 058 * Return true if multi-value binding using Array or Table Values is supported. 059 */ 060 boolean isMultiValueIdSupported(); 061 062 /** 063 * Return true if multi-value binding is supported for this value type. 064 */ 065 boolean isMultiValueSupported(Class<?> valueType); 066}