Package io.ebean.plugin
Interface BeanType<T>
public interface BeanType<T>
Information and methods on BeanDescriptors made available to plugins.
-
Method Summary
Modifier and Type Method Description voidaddInheritanceWhere(Query<?> query)Add the discriminator value to the query if needed.Collection<? extends Property>allProperties()Return all the properties for this bean type.ObjectbeanId(Object bean)Return the bean id.voidclearBeanCache()Clear the bean cache.voidclearQueryCache()Clear the query cache.TcreateBean()Create a new instance of the bean.TcreateBeanUsingDisc(Object discValue)Create a bean given the discriminator value.BeanDocType<T>docStore()Return the doc store support for this bean type.\StringgetBaseTable()Return the base table this bean type maps to.ObjectgetBeanId(T bean)Return the id value for the given bean.Class<T>getBeanType()Return the class type this BeanDescriptor describes.BeanType<?>getBeanTypeAtPath(String propertyName)Return the type bean for an OneToMany or ManyToOne or ManyToMany property.StringgetDiscColumn()Return the discriminator column.DocMappinggetDocMapping()Return the DocumentMapping for this bean type.StringgetDocStoreQueueId()Return the doc store queueId for this bean type.ExpressionPathgetExpressionPath(String path)Return the ExpressionPath for a given property path.BeanFindControllergetFindController()Return the beanFinder.StringgetFullName()Return the full name of the bean type.PropertygetIdProperty()Return the Id property.IdTypegetIdType()Return the identity generation type.List<BeanType<?>>getInheritanceChildren()Returns all direct children of this beantypeBeanType<?>getInheritanceParent()Returns the parent in inheritance hiearchyStringgetName()Return the short name of the bean type.BeanPersistControllergetPersistController()Return the bean persist controller.BeanPersistListenergetPersistListener()Return the bean persist listener.PropertygetProperty(String propertyName)Return the Property to read values from a bean.BeanQueryAdaptergetQueryAdapter()Return the BeanQueryAdapter or null if none is defined.PropertygetWhenCreatedProperty()Return the when created property if there is one defined.PropertygetWhenModifiedProperty()Return the when modified property if there is one defined.booleanhasInheritance()Return true if this bean type has an inheritance hierarchy.booleanisBeanCaching()Return true if bean caching is on for this bean type.booleanisDocStoreMapped()Return true if this bean type has doc store backing.booleanisDocStoreOnly()Return true if the type is document store only.booleanisInheritanceRoot()Return true if this object is the root level object in its entity inheritance.booleanisQueryCaching()Return true if query caching is on for this bean type.booleanisValidExpression(String property)Return true if the property is a valid known property or path for the given bean type.BeanType<?>root()Return the root bean type for an inheritance hierarchy.voidsetBeanId(T bean, Object idValue)Set the id value to the bean.voidvisitAllInheritanceChildren(Consumer<BeanType<?>> visitor)Visit all children recursively
-
Method Details
-
getName
Return the short name of the bean type. -
getFullName
Return the full name of the bean type. -
getBeanType
Return the class type this BeanDescriptor describes. -
getBeanTypeAtPath
Return the type bean for an OneToMany or ManyToOne or ManyToMany property. -
allProperties
Return all the properties for this bean type. -
getIdProperty
Return the Id property. -
getWhenModifiedProperty
Return the when modified property if there is one defined. -
getWhenCreatedProperty
Return the when created property if there is one defined. -
getProperty
Return the Property to read values from a bean. -
getExpressionPath
Return the ExpressionPath for a given property path.This can return a property or nested property path.
-
isValidExpression
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
Return the base table this bean type maps to. -
createBean
T createBean()Create a new instance of the bean. -
beanId
Return the bean id. This is the same as getBeanId() but without the generic type. -
getBeanId
Return the id value for the given bean. -
setBeanId
Set the id value to the bean. -
getPersistController
Return the bean persist controller. -
getPersistListener
Return the bean persist listener. -
getFindController
Return the beanFinder. Usually null unless overriding the finder. -
getQueryAdapter
Return the BeanQueryAdapter or null if none is defined. -
getIdType
Return the identity generation type. -
isDocStoreMapped
boolean isDocStoreMapped()Return true if this bean type has doc store backing. -
getDocMapping
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.
-
getDocStoreQueueId
Return the doc store queueId for this bean type. -
docStore
BeanDocType<T> docStore()Return the doc store support for this bean type.\ -
addInheritanceWhere
Add the discriminator value to the query if needed. -
root
Return the root bean type for an inheritance hierarchy. -
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. -
getInheritanceChildren
Returns all direct children of this beantype -
getInheritanceParent
Returns the parent in inheritance hiearchy -
visitAllInheritanceChildren
Visit all children recursively -
getDiscColumn
Return the discriminator column. -
createBeanUsingDisc
Create a bean given the discriminator value.
-