org.hibernate.metamodel.binding
Class AbstractSingularAttributeBinding

java.lang.Object
  extended by org.hibernate.metamodel.binding.AbstractAttributeBinding
      extended by org.hibernate.metamodel.binding.AbstractSingularAttributeBinding
All Implemented Interfaces:
AttributeBinding, SingularAttributeBinding
Direct Known Subclasses:
BasicAttributeBinding, ComponentAttributeBinding

public abstract class AbstractSingularAttributeBinding
extends AbstractAttributeBinding
implements SingularAttributeBinding


Constructor Summary
protected AbstractSingularAttributeBinding(AttributeBindingContainer container, SingularAttribute attribute)
           
 
Method Summary
protected  void checkValueBinding()
           
 SingularAttribute getAttribute()
          Obtain the attribute bound.
 Iterable<SimpleValueBinding> getSimpleValueBindings()
           
 int getSimpleValueSpan()
          Returns the number of SimpleValueBinding objects that will be returned by SingularAttributeBinding.getSimpleValueBindings()
 Value getValue()
          Obtain the value bound here.
 boolean hasDerivedValue()
          Convenience method to determine if any simple value bindings are derived values (formula mappings).
 boolean isNullable()
          Convenience method to determine if all simple value bindings allow nulls.
 void setSimpleValueBindings(Iterable<SimpleValueBinding> simpleValueBindings)
           
 
Methods inherited from class org.hibernate.metamodel.binding.AbstractAttributeBinding
addEntityReferencingAttributeBinding, getContainer, getEntityReferencingAttributeBindings, getHibernateTypeDescriptor, getMetaAttributeContext, getPropertyAccessorName, isAlternateUniqueKey, isBasicPropertyAccessor, isIncludedInOptimisticLocking, isLazy, setAlternateUniqueKey, setIncludedInOptimisticLocking, setLazy, setMetaAttributeContext, setPropertyAccessorName, validate
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.hibernate.metamodel.binding.SingularAttributeBinding
getGeneration
 
Methods inherited from interface org.hibernate.metamodel.binding.AttributeBinding
addEntityReferencingAttributeBinding, getContainer, getEntityReferencingAttributeBindings, getHibernateTypeDescriptor, getMetaAttributeContext, getPropertyAccessorName, isAlternateUniqueKey, isAssociation, isBasicPropertyAccessor, isIncludedInOptimisticLocking, isLazy, setIncludedInOptimisticLocking, setPropertyAccessorName, validate
 

Constructor Detail

AbstractSingularAttributeBinding

protected AbstractSingularAttributeBinding(AttributeBindingContainer container,
                                           SingularAttribute attribute)
Method Detail

getAttribute

public SingularAttribute getAttribute()
Description copied from interface: AttributeBinding
Obtain the attribute bound.

Specified by:
getAttribute in interface AttributeBinding
Overrides:
getAttribute in class AbstractAttributeBinding
Returns:
The attribute.

getValue

public Value getValue()
Description copied from interface: SingularAttributeBinding
Obtain the value bound here. This could potentially be a Tuple indicating multiple database values are bound, in which case access to the individual values can be achieved by either casting this return to Tuple and using its Tuple.values() method or using the SingularAttributeBinding.getSimpleValueBindings() method here and accessing each bindings simple value

Specified by:
getValue in interface SingularAttributeBinding
Returns:
The bound value

setSimpleValueBindings

public void setSimpleValueBindings(Iterable<SimpleValueBinding> simpleValueBindings)
Specified by:
setSimpleValueBindings in interface SingularAttributeBinding

getSimpleValueSpan

public int getSimpleValueSpan()
Description copied from interface: SingularAttributeBinding
Returns the number of SimpleValueBinding objects that will be returned by SingularAttributeBinding.getSimpleValueBindings()

Specified by:
getSimpleValueSpan in interface SingularAttributeBinding
Returns:
the number of simple value bindings
See Also:
SingularAttributeBinding.getSimpleValueBindings()

checkValueBinding

protected void checkValueBinding()

getSimpleValueBindings

public Iterable<SimpleValueBinding> getSimpleValueBindings()
Specified by:
getSimpleValueBindings in interface SingularAttributeBinding

hasDerivedValue

public boolean hasDerivedValue()
Description copied from interface: SingularAttributeBinding
Convenience method to determine if any simple value bindings are derived values (formula mappings).

Specified by:
hasDerivedValue in interface SingularAttributeBinding
Returns:
true indicates that the binding contains a derived value; false indicates it does not.

isNullable

public boolean isNullable()
Description copied from interface: SingularAttributeBinding
Convenience method to determine if all simple value bindings allow nulls.

Specified by:
isNullable in interface SingularAttributeBinding
Returns:
true indicates that all values allow null; false indicates one or more do not


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