## org.hibernate.metamodel.source.binder
Interface EntitySource

All Superinterfaces:
  AttributeSourceContainer, SubclassEntityContainer

All Known Subinterfaces:
  RootEntitySource, SubclassEntitySource

All Known Implementing Classes:
  AbstractEntitySourceImpl, EntitySourceImpl, RootEntitySourceImpl, RootEntitySourceImpl, SubclassEntitySourceImpl, SubclassEntitySourceImpl

    public interface EntitySource

extends SubclassEntityContainer, AttributeSourceContainer

Contract describing source of an entity

Method Summary
`int` `getBatchSize()` Obtain the batch-size to be applied when initializing proxies of this entity.
`String` `getClassName()` Obtain the name of the entity `Class`
`Iterable<ConstraintSource>` `getConstraints()`
`String` `getCustomLoaderName()` Obtain the name of a named-query that will be used for loading this entity
`String` `getCustomPersisterClassName()` Obtain the name of a custom persister class to be used.
`CustomSQL` `getCustomSqlDelete()` Obtain the custom SQL to be used for deletes for this entity
`CustomSQL` `getCustomSqlInsert()` Obtain the custom SQL to be used for inserts for this entity
`CustomSQL` `getCustomSqlUpdate()` Obtain the custom SQL to be used for updates for this entity
`String` `getCustomTuplizerClassName()` Obtain the name of a custom tuplizer class to be used.
`String` `getDiscriminatorMatchValue()` Get the actual discriminator value in case of a single table inheritance
`String` `getEntityName()` Obtain the entity name
`List<JpaCallbackClass>` `getJpaCallbackClasses()`
`String` `getJpaEntityName()` Obtain the JPA name of the entity
`LocalBindingContext` `getLocalBindingContext()` Obtain the binding context local to this entity source.
`Origin` `getOrigin()` Obtain the origin of this source.
`TableSource` `getPrimaryTable()` Obtain the primary table for this entity.
`String` `getProxy()` For `lazy` entities, obtain the interface to use in constructing its proxies.
`Iterable<TableSource>` `getSecondaryTables()` Obtain the secondary tables for this entity
`List<String>` `getSynchronizedTableNames()` Obtain any additional table names on which to synchronize (auto flushing) this entity.
`boolean` `isAbstract()` Is the entity abstract? The implication is whether the entity maps to a database table.
`boolean` `isDynamicInsert()` Did the source specify dynamic inserts?
`boolean` `isDynamicUpdate()` Did the source specify dynamic updates?
`boolean` `isLazy()` Is this entity lazy (proxyable)?
`boolean` `isSelectBeforeUpdate()` Did the source specify to perform selects to decide whether to perform (detached) updates?
`Iterable<MetaAttributeSource>` `metaAttributes()` Obtain the meta-attribute sources associated with this entity.

Methods inherited from interface org.hibernate.metamodel.source.binder.SubclassEntityContainer
`add, subclassEntitySources`

Methods inherited from interface org.hibernate.metamodel.source.binder.AttributeSourceContainer
`attributeSources, getPath`

Method Detail

### getOrigin

    Origin getOrigin()

  Obtain the origin of this source.

  Returns:
    The origin of this source.

### getLocalBindingContext

    LocalBindingContext getLocalBindingContext()

  Obtain the binding context local to this entity source.

  Specified by:
    `getLocalBindingContext` in interface `AttributeSourceContainer`
  Returns:
    The local binding context

### getEntityName

    String getEntityName()

  Obtain the entity name

  Returns:
    The entity name

### getClassName

    String getClassName()

  Obtain the name of the entity `Class`

  Returns:
    THe entity class name

### getJpaEntityName

    String getJpaEntityName()

  Obtain the JPA name of the entity

  Returns:
    THe JPA-specific entity name

### getPrimaryTable

    TableSource getPrimaryTable()

  Obtain the primary table for this entity.

  Returns:
    The primary table.

### getSecondaryTables

    Iterable<TableSource> getSecondaryTables()

  Obtain the secondary tables for this entity

  Returns:
    returns an iterator over the secondary tables for this entity

### getCustomTuplizerClassName

    String getCustomTuplizerClassName()

  Obtain the name of a custom tuplizer class to be used.

  Returns:
    The custom tuplizer class name

### getCustomPersisterClassName

    String getCustomPersisterClassName()

  Obtain the name of a custom persister class to be used.

  Returns:
    The custom persister class name

### isLazy

    boolean isLazy()

  Is this entity lazy (proxyable)?

  Returns:
    `true` indicates the entity is lazy; `false` non-lazy.

### getProxy

    String getProxy()

  For `lazy` entities, obtain the interface to use in constructing its proxies.

  Returns:
    The proxy interface name

### getBatchSize

    int getBatchSize()

  Obtain the batch-size to be applied when initializing proxies of this entity.

  Returns:
    returns the the batch-size.

### isAbstract

    boolean isAbstract()

  Is the entity abstract?

  The implication is whether the entity maps to a database table.

  Returns:
    `true` indicates the entity is abstract; `false` non-abstract.

### isDynamicInsert

    boolean isDynamicInsert()

  Did the source specify dynamic inserts?

  Returns:
    `true` indicates dynamic inserts will be used; `false` otherwise.

### isDynamicUpdate

    boolean isDynamicUpdate()

  Did the source specify dynamic updates?

  Returns:
    `true` indicates dynamic updates will be used; `false` otherwise.

### isSelectBeforeUpdate

    boolean isSelectBeforeUpdate()

  Did the source specify to perform selects to decide whether to perform (detached) updates?

  Returns:
    `true` indicates selects will be done; `false` otherwise.

### getCustomLoaderName

    String getCustomLoaderName()

  Obtain the name of a named-query that will be used for loading this entity

  Returns:
    THe custom loader query name

### getCustomSqlInsert

    CustomSQL getCustomSqlInsert()

  Obtain the custom SQL to be used for inserts for this entity

  Returns:
    The custom insert SQL

### getCustomSqlUpdate

    CustomSQL getCustomSqlUpdate()

  Obtain the custom SQL to be used for updates for this entity

  Returns:
    The custom update SQL

### getCustomSqlDelete

    CustomSQL getCustomSqlDelete()

  Obtain the custom SQL to be used for deletes for this entity

  Returns:
    The custom delete SQL

### getSynchronizedTableNames

    List<String> getSynchronizedTableNames()

  Obtain any additional table names on which to synchronize (auto flushing) this entity.

  Returns:
    Additional synchronized table names.

### metaAttributes

    Iterable<MetaAttributeSource> metaAttributes()

  Obtain the meta-attribute sources associated with this entity.

  Returns:
    The meta-attribute sources.

### getDiscriminatorMatchValue

    String getDiscriminatorMatchValue()

  Get the actual discriminator value in case of a single table inheritance

  Returns:
    the actual discriminator value in case of a single table inheritance or `null` in case there is no explicit value or a different inheritance scheme

### getConstraints

    Iterable<ConstraintSource> getConstraints()

  Returns:
    returns the source information for constraints defined on the table

### getJpaCallbackClasses

    List<JpaCallbackClass> getJpaCallbackClasses()

  Returns:
    the list of classes (this `entity`/`mapped superclass`, or `entity listeners`) that define JPA callbacks for this entity/mapped superclass.

Copyright © 2001-2012 Red Hat, Inc. All Rights Reserved.