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

All Known Subinterfaces:
  AssociationAttributeSource, ComponentAttributeSource, PluralAttributeSource, SingularAttributeSource, ToOneAttributeSource

All Known Implementing Classes:
  AbstractPluralAttributeSourceImpl, BagAttributeSourceImpl, ComponentAttributeSourceImpl, ComponentAttributeSourceImpl, SetAttributeSourceImpl, SingularAttributeSourceImpl, ToOneAttributeSourceImpl

    public interface AttributeSource

Contract for sources of persistent attribute descriptions.

Method Summary
`String` `getName()` Obtain the attribute name.
`String` `getPropertyAccessorName()` Obtain the name of the property accessor style used to access this attribute.
`ExplicitHibernateTypeSource` `getTypeInformation()` Obtain information about the Hibernate type (`Type`) for this attribute.
`boolean` `isIncludedInOptimisticLocking()` If the containing entity is using `OptimisticLockStyle.ALL` or `OptimisticLockStyle.DIRTY` style optimistic locking, should this attribute be used?
`boolean` `isSingular()` Is this a singular attribute? Specifically, can it be cast to `SingularAttributeSource`?
`Iterable<MetaAttributeSource>` `metaAttributes()` Obtain the meta-attribute sources associated with this attribute.

Method Detail

### getName

    String getName()

  Obtain the attribute name.

  Returns:
    The attribute name. `null` ais NOT allowed!

### isSingular

    boolean isSingular()

  Is this a singular attribute? Specifically, can it be cast to `SingularAttributeSource`?

  Returns:
    `true` indicates this is castable to `SingularAttributeSource`; `false` otherwise.

### getTypeInformation

    ExplicitHibernateTypeSource getTypeInformation()

  Obtain information about the Hibernate type (`Type`) for this attribute.

  Returns:
    The Hibernate type information

### getPropertyAccessorName

    String getPropertyAccessorName()

  Obtain the name of the property accessor style used to access this attribute.

  Returns:
    The property accessor style for this attribute.
  See Also:
    `PropertyAccessor`

### isIncludedInOptimisticLocking

    boolean isIncludedInOptimisticLocking()

  If the containing entity is using `OptimisticLockStyle.ALL` or `OptimisticLockStyle.DIRTY` style optimistic locking, should this attribute be used?

  Returns:
    `true` indicates it should be included; `false`, it should not.

### metaAttributes

    Iterable<MetaAttributeSource> metaAttributes()

  Obtain the meta-attribute sources associated with this attribute.

  Returns:
    The meta-attribute sources.

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