Class DeployBeanDescriptor<T>

java.lang.Object
io.ebeaninternal.server.deploy.meta.DeployBeanDescriptor<T>

public class DeployBeanDescriptor<T> extends Object
Describes Beans including their deployment information.
  • Constructor Details

  • Method Details

    • bindMaxLength

      public BindMaxLength bindMaxLength()
    • setPropertyNames

      public void setPropertyNames(String[] properties)
    • propertyNames

      public String[] propertyNames()
    • setIdClass

      public void setIdClass(Class<?> idClass)
      Set the IdClass to use.
    • setPrimaryKeyJoin

      public void setPrimaryKeyJoin(TableJoin join)
      PK is also a FK.
    • getPrimaryKeyJoin

      public TableJoin getPrimaryKeyJoin()
    • setStorageEngine

      public void setStorageEngine(String storageEngine)
    • getStorageEngine

      public String getStorageEngine()
    • setHistorySupport

      public void setHistorySupport()
      Set to true for @History entity beans that have history.
    • isHistorySupport

      public boolean isHistorySupport()
      Return true if this is an @History entity bean.
    • setDbComment

      public void setDbComment(String dbComment)
    • getDbComment

      public String getDbComment()
    • setPartitionMeta

      public void setPartitionMeta(PartitionMeta partitionMeta)
    • getPartitionMeta

      public PartitionMeta getPartitionMeta()
    • setTablespaceMeta

      public void setTablespaceMeta(TablespaceMeta tablespaceMeta)
    • getTablespaceMeta

      public TablespaceMeta getTablespaceMeta()
    • createDeployBeanTable

      public DeployBeanTable createDeployBeanTable()
    • setEntityType

      public void setEntityType(BeanDescriptor.EntityType entityType)
    • isEmbedded

      public boolean isEmbedded()
    • isBaseTableType

      public boolean isBaseTableType()
    • isDocStoreOnly

      public boolean isDocStoreOnly()
    • getEntityType

      public BeanDescriptor.EntityType getEntityType()
    • buildIdentityMode

      public IdentityMode buildIdentityMode()
      Return the immutable IdentityMode.
    • getIdentityMode

      public DeployIdentityMode getIdentityMode()
    • setIdentityMode

      public void setIdentityMode(io.ebean.annotation.Identity identity)
    • setIdentitySequence

      public void setIdentitySequence(int initialValue, int allocationSize, String seqName)
      Set from @Sequence
    • setIdentitySequenceGenerator

      public void setIdentitySequenceGenerator(String genName)
      Potentially set sequence name from @GeneratedValue.
    • setIdentitySequenceBatchMode

      public int setIdentitySequenceBatchMode(boolean sequenceBatchMode)
      Return the sequence increment to use given sequence batch mode.
    • setIdentityType

      public void setIdentityType(IdType type)
    • getBeanType

      public Class<T> getBeanType()
      Return the class type this BeanDescriptor describes.
    • setChangeLogFilter

      public void setChangeLogFilter(ChangeLogFilter changeLogFilter)
    • getChangeLogFilter

      public ChangeLogFilter getChangeLogFilter()
    • setInvalidateQueryCache

      public void setInvalidateQueryCache(String region)
      Set that this type invalidates query caches.
    • setCache

      public void setCache(io.ebean.annotation.Cache cache)
      Enable L2 bean and query caching based on Cache annotation.
    • getCacheOptions

      public CacheOptions getCacheOptions()
      Return the cache options.
    • getUnidirectional

      public DeployBeanPropertyAssocOne<?> getUnidirectional()
    • setUnidirectional

      public void setUnidirectional(DeployBeanPropertyAssocOne<?> unidirectional)
    • setOrderColumn

      public void setOrderColumn(DeployBeanProperty orderColumn)
    • getConcurrencyMode

      public ConcurrencyMode getConcurrencyMode()
      Return the concurrency mode used for beans of this type.
    • setConcurrencyMode

      public void setConcurrencyMode(ConcurrencyMode concurrencyMode)
      Set the concurrency mode used for beans of this type.
    • addIndex

      public void addIndex(IndexDefinition c)
      Add a compound unique constraint.
    • getIndexDefinitions

      public IndexDefinition[] getIndexDefinitions()
      Return the compound unique constraints (can be null).
    • getBeanFinder

      public BeanFindController getBeanFinder()
      Return the beanFinder. Usually null unless overriding the finder.
    • setBeanFinder

      public void setBeanFinder(BeanFindController beanFinder)
      Set the BeanFinder to use for beans of this type. This is set to override the finding from the default.
    • getPersistController

      public BeanPersistController getPersistController()
      Return the BeanPersistController (could be a chain of them, 1 or null).
    • getPersistListener

      public BeanPersistListener getPersistListener()
      Return the BeanPersistListener (could be a chain of them, 1 or null).
    • getQueryAdapter

      public BeanQueryAdapter getQueryAdapter()
    • getPostLoad

      public BeanPostLoad getPostLoad()
      Return the BeanPostLoad (could be a chain of them, 1 or null).
    • getPostConstructListener

      public BeanPostConstructListener getPostConstructListener()
      Return the BeanPostCreate(could be a chain of them, 1 or null).
    • addPersistController

      public void addPersistController(BeanPersistController controller)
    • addPersistListener

      public void addPersistListener(BeanPersistListener listener)
    • addQueryAdapter

      public void addQueryAdapter(BeanQueryAdapter queryAdapter)
    • addPostLoad

      public void addPostLoad(BeanPostLoad postLoad)
    • addPostConstructListener

      public void addPostConstructListener(BeanPostConstructListener postConstructListener)
    • getDependentTables

      public String[] getDependentTables()
      For view based entity return the dependant tables.
    • getBaseTable

      public String getBaseTable()
      Return the base table. Only properties mapped to the base table are by default persisted.
    • getBaseTableAsOf

      public String getBaseTableAsOf()
      Return the base table with as of suffix.
    • getBaseTableVersionsBetween

      public String getBaseTableVersionsBetween()
      Return the base table with versions between suffix.
    • getBaseTableFull

      public TableName getBaseTableFull()
      Return the base table with full structure.
    • setView

      public void setView(String viewName, String[] dependentTables)
      Set when entity is based on a view.
    • setBaseTable

      public void setBaseTable(TableName baseTableFull, String asOfSuffix, String versionsBetweenSuffix)
      Set the base table. Only properties mapped to the base table are by default persisted.
    • sortProperties

      public void sortProperties()
    • postAnnotations

      public void postAnnotations()
    • addBeanProperty

      public DeployBeanProperty addBeanProperty(DeployBeanProperty prop)
      Add a bean property.
    • properties

      public Collection<DeployBeanProperty> properties()
    • getBeanProperty

      public DeployBeanProperty getBeanProperty(String propName)
      Get a BeanProperty by its name.
    • getFullName

      public String getFullName()
      Return the bean class name this descriptor is used for.

      If this BeanDescriptor is for a table then this returns the table name instead.

    • getName

      public String getName()
      Return the bean short name.
    • setName

      public void setName(String name)
      Set the bean shortName.
    • getSelectLastInsertedId

      public String getSelectLastInsertedId()
      Return the SQL used to return the last inserted Id.

      Used with Identity columns where getGeneratedKeys is not supported.

    • setSelectLastInsertedId

      public void setSelectLastInsertedId(String selectLastInsertedId)
      Set the SQL used to return the last inserted Id.
    • getIdGenerator

      public PlatformIdGenerator getIdGenerator()
      Return the actual IdGenerator for this bean type (can be null).
    • setIdGenerator

      public void setIdGenerator(PlatformIdGenerator idGenerator)
      Set the actual IdGenerator for this bean type.
    • isIdGeneratedValue

      public boolean isIdGeneratedValue()
      Return true for automatic Id generation strategy.
    • setIdGeneratedValue

      public void setIdGeneratedValue()
      Set when GeneratedValue explicitly mapped on Id property.
    • setUuidGenerator

      public void setUuidGenerator()
      Assign the standard UUID generator if one has not been set.
    • setCustomIdGenerator

      public void setCustomIdGenerator(PlatformIdGenerator idGenerator)
      Assign a custom external IdGenerator.
    • toString

      public String toString()
      Summary description.
      Overrides:
      toString in class Object
    • propertiesAll

      public Collection<DeployBeanProperty> propertiesAll()
      Return a collection of all BeanProperty deployment information.
    • getDefaultSelectClause

      public String getDefaultSelectClause()
      Return the defaultSelectClause using FetchType.LAZY and FetchType.EAGER.
    • isPrimaryKeyCompoundOrNonNumeric

      public boolean isPrimaryKeyCompoundOrNonNumeric()
      Return true if the primary key is a compound key or if it's database type is non-numeric (and hence not suitable for db identity or sequence.
    • getSinglePrimaryKeyColumn

      public String getSinglePrimaryKeyColumn()
      Return the Primary Key column assuming it is a single column (not compound). This is for the purpose of defining a sequence name.
    • idProperty

      public DeployBeanProperty idProperty()
      Return the BeanProperty that is the Id.
    • findJoinToTable

      public DeployBeanPropertyAssocOne<?> findJoinToTable(String tableName)
    • propertiesAssocOne

      public List<DeployBeanPropertyAssocOne<?>> propertiesAssocOne()
      Return an Iterator of BeanPropertyAssocOne that are not embedded. These are effectively joined beans. For ManyToOne and OneToOne associations.
    • propertiesAssocMany

      public List<DeployBeanPropertyAssocMany<?>> propertiesAssocMany()
      Return BeanPropertyAssocMany for this descriptor.
    • propertiesBase

      public List<DeployBeanProperty> propertiesBase()
      base properties without the unique id properties.
    • parse

      public String parse(String aggregation)
      Parse the aggregation formula into expressions with table alias placeholders.