org.hibernate.metamodel.binding
Interface AttributeBindingContainer

All Known Implementing Classes:
ComponentAttributeBinding, EntityBinding

public interface AttributeBindingContainer

Common contract for EntityBinding and ComponentAttributeBinding in so far as they are both containers for AttributeBinding descriptors


Method Summary
 Iterable<AttributeBinding> attributeBindings()
          Obtain all attribute bindings
 AttributeContainer getAttributeContainer()
          Obtain the underlying domain attribute container.
 Class<?> getClassReference()
          Obtain the Class reference for this attribute container.
 MetaAttributeContext getMetaAttributeContext()
          Obtain the meta-attribute context for this container.
 String getPathBase()
          Obtain the path base of this container.
 AttributeBinding locateAttributeBinding(String name)
          Locate a specific attribute binding, by its local name.
 BagBinding makeBagAttributeBinding(PluralAttribute attribute, CollectionElementNature nature)
          Factory method for bag attribute bindings.
 BasicAttributeBinding makeBasicAttributeBinding(SingularAttribute attribute)
          Factory method for basic attribute bindings.
 ComponentAttributeBinding makeComponentAttributeBinding(SingularAttribute attribute)
          Factory method for component attribute bindings.
 ManyToOneAttributeBinding makeManyToOneAttributeBinding(SingularAttribute attribute)
          Factory method for many-to-one attribute bindings.
 SetBinding makeSetAttributeBinding(PluralAttribute attribute, CollectionElementNature nature)
          Factory method for bag attribute bindings.
 EntityBinding seekEntityBinding()
          Seeks out the entity binding that is the root of this component path.
 

Method Detail

getPathBase

String getPathBase()
Obtain the path base of this container. Intended to help uniquely identify each attribute binding.

Returns:
The path base for this container.

getAttributeContainer

AttributeContainer getAttributeContainer()
Obtain the underlying domain attribute container.

Returns:
The attribute container

attributeBindings

Iterable<AttributeBinding> attributeBindings()
Obtain all attribute bindings

Returns:
All attribute bindings

locateAttributeBinding

AttributeBinding locateAttributeBinding(String name)
Locate a specific attribute binding, by its local name.

Parameters:
name - The name of the attribute, local to this container.
Returns:
The attribute binding.

makeBasicAttributeBinding

BasicAttributeBinding makeBasicAttributeBinding(SingularAttribute attribute)
Factory method for basic attribute bindings.

Parameters:
attribute - The attribute for which to make a binding.
Returns:
The attribute binding instance.

makeComponentAttributeBinding

ComponentAttributeBinding makeComponentAttributeBinding(SingularAttribute attribute)
Factory method for component attribute bindings.

Parameters:
attribute - The attribute for which to make a binding.
Returns:
The attribute binding instance.

makeManyToOneAttributeBinding

ManyToOneAttributeBinding makeManyToOneAttributeBinding(SingularAttribute attribute)
Factory method for many-to-one attribute bindings.

Parameters:
attribute - The attribute for which to make a binding.
Returns:
The attribute binding instance.

makeBagAttributeBinding

BagBinding makeBagAttributeBinding(PluralAttribute attribute,
                                   CollectionElementNature nature)
Factory method for bag attribute bindings.

Parameters:
attribute - The attribute for which to make a binding.
nature - The nature of the collection elements.
Returns:
The attribute binding instance.

makeSetAttributeBinding

SetBinding makeSetAttributeBinding(PluralAttribute attribute,
                                   CollectionElementNature nature)
Factory method for bag attribute bindings.

Parameters:
attribute - The attribute for which to make a binding.
nature - The nature of the collection elements.
Returns:
The attribute binding instance.

seekEntityBinding

EntityBinding seekEntityBinding()
Seeks out the entity binding that is the root of this component path.

Returns:
The entity binding

getClassReference

Class<?> getClassReference()
Obtain the Class reference for this attribute container. Generally this is used to perform reflection on the attributes.

Returns:
The Class reference

getMetaAttributeContext

MetaAttributeContext getMetaAttributeContext()
Obtain the meta-attribute context for this container.

Returns:
The meta-attribute context.


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