Package io.ebean.plugin
Interface BeanType<T>
-
public interface BeanType<T>
Information and methods on BeanDescriptors made available to plugins.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Deprecated Methods Modifier and Type Method Description void
addInheritanceWhere(Query<?> query)
Add the discriminator value to the query if needed.Collection<? extends Property>
allProperties()
Return all the properties for this bean type.String
baseTable()
Return the base table this bean type maps to.default Object
beanId(Object bean)
Deprecated.BeanType<?>
beanTypeAtPath(String propertyName)
Return the type bean for an OneToMany or ManyToOne or ManyToMany property.void
clearBeanCache()
Clear the bean cache.void
clearQueryCache()
Clear the query cache.T
createBean()
Create a new instance of the bean.T
createBeanUsingDisc(Object discValue)
Create a bean given the discriminator value.String
discColumn()
Return the discriminator column.DocMapping
docMapping()
Return the DocumentMapping for this bean type.BeanDocType<T>
docStore()
Return the doc store support for this bean type.\String
docStoreQueueId()
Return the doc store queueId for this bean type.ExpressionPath
expressionPath(String path)
Return the ExpressionPath for a given property path.BeanFindController
findController()
Return the beanFinder.String
fullName()
Return the full name of the bean type.default String
getBaseTable()
Deprecated.Object
getBeanId(T bean)
Deprecated.default Class<T>
getBeanType()
Deprecated.default BeanType<?>
getBeanTypeAtPath(String propertyName)
Deprecated.default String
getDiscColumn()
Deprecated.default DocMapping
getDocMapping()
Deprecated.default String
getDocStoreQueueId()
Deprecated.default ExpressionPath
getExpressionPath(String path)
Deprecated.default BeanFindController
getFindController()
Deprecated.default String
getFullName()
Deprecated.default Property
getIdProperty()
Deprecated.default IdType
getIdType()
Deprecated.default List<BeanType<?>>
getInheritanceChildren()
Deprecated.default BeanType<?>
getInheritanceParent()
Deprecated.default String
getName()
Deprecated.default BeanPersistController
getPersistController()
Deprecated.default BeanPersistListener
getPersistListener()
Deprecated.default Property
getProperty(String propertyName)
Deprecated.default BeanQueryAdapter
getQueryAdapter()
Deprecated.default Property
getWhenCreatedProperty()
Deprecated.default Property
getWhenModifiedProperty()
Deprecated.boolean
hasInheritance()
Return true if this bean type has an inheritance hierarchy.Object
id(Object bean)
Return the bean id.Property
idProperty()
Return the Id property.IdType
idType()
Return the identity generation type.List<BeanType<?>>
inheritanceChildren()
Returns all direct children of this beantypeBeanType<?>
inheritanceParent()
Returns the parent in inheritance hierarchyboolean
isBeanCaching()
Return true if bean caching is on for this bean type.boolean
isDocStoreMapped()
Return true if this bean type has doc store backing.boolean
isDocStoreOnly()
Return true if the type is document store only.boolean
isInheritanceRoot()
Return true if this object is the root level object in its entity inheritance.boolean
isQueryCaching()
Return true if query caching is on for this bean type.boolean
isValidExpression(String property)
Return true if the property is a valid known property or path for the given bean type.String
name()
Return the short name of the bean type.BeanPersistController
persistController()
Return the bean persist controller.BeanPersistListener
persistListener()
Return the bean persist listener.Property
property(String propertyName)
Return the Property to read values from a bean.BeanQueryAdapter
queryAdapter()
Return the BeanQueryAdapter or null if none is defined.BeanType<?>
root()
Return the root bean type for an inheritance hierarchy.default void
setBeanId(T bean, Object idValue)
Deprecated.void
setId(T bean, Object idValue)
Set the id value to the bean.Class<T>
type()
Return the class type this BeanDescriptor describes.void
visitAllInheritanceChildren(Consumer<BeanType<?>> visitor)
Visit all children recursivelyProperty
whenCreatedProperty()
Return the when created property if there is one defined.Property
whenModifiedProperty()
Return the when modified property if there is one defined.
-
-
-
Method Detail
-
getName
@Deprecated default String getName()
Deprecated.Deprecated migrate to name().
-
getFullName
@Deprecated default String getFullName()
Deprecated.Deprecated migrate to fullName().
-
getBeanType
@Deprecated default Class<T> getBeanType()
Deprecated.Deprecated migrate to type().
-
beanTypeAtPath
BeanType<?> beanTypeAtPath(String propertyName)
Return the type bean for an OneToMany or ManyToOne or ManyToMany property.
-
getBeanTypeAtPath
@Deprecated default BeanType<?> getBeanTypeAtPath(String propertyName)
Deprecated.Deprecated migrate to beanTypeAtPath().
-
allProperties
Collection<? extends Property> allProperties()
Return all the properties for this bean type.
-
idProperty
Property idProperty()
Return the Id property.
-
getIdProperty
@Deprecated default Property getIdProperty()
Deprecated.Deprecated migrate to idProperty().
-
whenModifiedProperty
Property whenModifiedProperty()
Return the when modified property if there is one defined.
-
getWhenModifiedProperty
@Deprecated default Property getWhenModifiedProperty()
Deprecated.Deprecated migrate to idProperty().
-
whenCreatedProperty
Property whenCreatedProperty()
Return the when created property if there is one defined.
-
getWhenCreatedProperty
@Deprecated default Property getWhenCreatedProperty()
Deprecated.Deprecated migrate to idProperty().
-
getProperty
@Deprecated default Property getProperty(String propertyName)
Deprecated.Deprecated migrate to property().
-
expressionPath
ExpressionPath expressionPath(String path)
Return the ExpressionPath for a given property path.This can return a property or nested property path.
-
getExpressionPath
@Deprecated default ExpressionPath getExpressionPath(String path)
Deprecated.Deprecated migrate to expressionPath().
-
isValidExpression
boolean isValidExpression(String property)
Return true if the property is a valid known property or path for the given bean type.
-
isBeanCaching
boolean isBeanCaching()
Return true if bean caching is on for this bean type.
-
isQueryCaching
boolean isQueryCaching()
Return true if query caching is on for this bean type.
-
clearBeanCache
void clearBeanCache()
Clear the bean cache.
-
clearQueryCache
void clearQueryCache()
Clear the query cache.
-
isDocStoreOnly
boolean isDocStoreOnly()
Return true if the type is document store only.
-
getBaseTable
@Deprecated default String getBaseTable()
Deprecated.Deprecated migrate to baseTable().
-
createBean
T createBean()
Create a new instance of the bean.
-
id
Object id(Object bean)
Return the bean id. This is the same as getBeanId() but without the generic type.
-
beanId
@Deprecated default Object beanId(Object bean)
Deprecated.Deprecated migrate to id()
-
getBeanId
@Deprecated Object getBeanId(T bean)
Deprecated.Deprecated migrate to id()
-
setBeanId
@Deprecated default void setBeanId(T bean, Object idValue)
Deprecated.Deprecated migrate to setId()
-
persistController
BeanPersistController persistController()
Return the bean persist controller.
-
getPersistController
@Deprecated default BeanPersistController getPersistController()
Deprecated.Deprecated migrate to persistController()
-
persistListener
BeanPersistListener persistListener()
Return the bean persist listener.
-
getPersistListener
@Deprecated default BeanPersistListener getPersistListener()
Deprecated.Deprecated migrate to persistListener()
-
findController
BeanFindController findController()
Return the beanFinder. Usually null unless overriding the finder.
-
getFindController
@Deprecated default BeanFindController getFindController()
Deprecated.Deprecated migrate to findController()
-
queryAdapter
BeanQueryAdapter queryAdapter()
Return the BeanQueryAdapter or null if none is defined.
-
getQueryAdapter
@Deprecated default BeanQueryAdapter getQueryAdapter()
Deprecated.Deprecated migrate to queryAdapter()
-
getIdType
@Deprecated default IdType getIdType()
Deprecated.Deprecated migrate to idType()
-
isDocStoreMapped
boolean isDocStoreMapped()
Return true if this bean type has doc store backing.
-
docMapping
DocMapping docMapping()
Return the DocumentMapping for this bean type.This is the document structure and mapping options for how this bean type is mapped for the document store.
-
getDocMapping
@Deprecated default DocMapping getDocMapping()
Deprecated.Deprecated migrate to docMapping()
-
docStoreQueueId
String docStoreQueueId()
Return the doc store queueId for this bean type.
-
getDocStoreQueueId
@Deprecated default String getDocStoreQueueId()
Deprecated.Deprecated migrate to docStoreQueueId()
-
docStore
BeanDocType<T> docStore()
Return the doc store support for this bean type.\
-
addInheritanceWhere
void addInheritanceWhere(Query<?> query)
Add the discriminator value to the query if needed.
-
hasInheritance
boolean hasInheritance()
Return true if this bean type has an inheritance hierarchy.
-
isInheritanceRoot
boolean isInheritanceRoot()
Return true if this object is the root level object in its entity inheritance.
-
inheritanceChildren
List<BeanType<?>> inheritanceChildren()
Returns all direct children of this beantype
-
getInheritanceChildren
@Deprecated default List<BeanType<?>> getInheritanceChildren()
Deprecated.Deprecated migrate to inheritanceChildren()
-
inheritanceParent
BeanType<?> inheritanceParent()
Returns the parent in inheritance hierarchy
-
getInheritanceParent
@Deprecated default BeanType<?> getInheritanceParent()
Deprecated.Deprecated migrate to inheritanceParent()
-
visitAllInheritanceChildren
void visitAllInheritanceChildren(Consumer<BeanType<?>> visitor)
Visit all children recursively
-
discColumn
String discColumn()
Return the discriminator column.
-
getDiscColumn
@Deprecated default String getDiscColumn()
Deprecated.Deprecated migrate to discColumn()
-
createBeanUsingDisc
T createBeanUsingDisc(Object discValue)
Create a bean given the discriminator value.
-
-