org.hibernate.metamodel.source.annotations.entity
Class ComponentAttributeSourceImpl

java.lang.Object
  extended by org.hibernate.metamodel.source.annotations.entity.ComponentAttributeSourceImpl
All Implemented Interfaces:
AttributeSource, AttributeSourceContainer, ComponentAttributeSource, RelationalValueSourceContainer, SingularAttributeSource

public class ComponentAttributeSourceImpl
extends Object
implements ComponentAttributeSource

Annotation backed implementation of ComponentAttributeSource.


Constructor Summary
ComponentAttributeSourceImpl(EmbeddableClass embeddableClass, String parentPath, Map<String,AttributeOverride> attributeOverrides)
           
 
Method Summary
 boolean areValuesIncludedInInsertByDefault()
           
 boolean areValuesIncludedInUpdateByDefault()
           
 boolean areValuesNullableByDefault()
           
 Iterable<AttributeSource> attributeSources()
          Obtain this container's attribute sources.
 String getClassName()
           
 Value<Class<?>> getClassReference()
           
 String getExplicitTuplizerClassName()
           
 PropertyGeneration getGeneration()
          Obtain a description of if/when the attribute value is generated by the database.
 LocalBindingContext getLocalBindingContext()
          Obtain the local binding context associated with this container.
 String getName()
          Obtain the attribute name.
 SingularAttributeNature getNature()
          Obtain the nature of this attribute type.
 String getParentReferenceAttributeName()
           
 String getPath()
          Obtain the path used to uniquely identify this container.
 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 isInsertable()
          Determine whether this attribute is insertable.
 boolean isLazy()
          Should the attribute be (bytecode enhancement) lazily loaded?
 boolean isSingular()
          Is this a singular attribute? Specifically, can it be cast to SingularAttributeSource?
 boolean isUpdatable()
          Determine whether this attribute is updateable.
 boolean isVirtualAttribute()
          Determine whether this is a virtual attribute or whether it physically exists on the users domain model.
 Iterable<MetaAttributeSource> metaAttributes()
          Obtain the meta-attribute sources associated with this attribute.
 List<RelationalValueSource> relationalValueSources()
          Obtain the contained RelationalValueSource references.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ComponentAttributeSourceImpl

public ComponentAttributeSourceImpl(EmbeddableClass embeddableClass,
                                    String parentPath,
                                    Map<String,AttributeOverride> attributeOverrides)
Method Detail

isVirtualAttribute

public boolean isVirtualAttribute()
Description copied from interface: SingularAttributeSource
Determine whether this is a virtual attribute or whether it physically exists on the users domain model.

Specified by:
isVirtualAttribute in interface SingularAttributeSource
Returns:
true indicates the attribute is virtual, meaning it does NOT exist on the domain model; false indicates the attribute physically exists.

getNature

public SingularAttributeNature getNature()
Description copied from interface: SingularAttributeSource
Obtain the nature of this attribute type.

Specified by:
getNature in interface SingularAttributeSource
Returns:
The attribute type nature

isSingular

public boolean isSingular()
Description copied from interface: AttributeSource
Is this a singular attribute? Specifically, can it be cast to SingularAttributeSource?

Specified by:
isSingular in interface AttributeSource
Returns:
true indicates this is castable to SingularAttributeSource; false otherwise.

getClassName

public String getClassName()
Specified by:
getClassName in interface ComponentAttributeSource

getClassReference

public Value<Class<?>> getClassReference()
Specified by:
getClassReference in interface ComponentAttributeSource

getName

public String getName()
Description copied from interface: AttributeSource
Obtain the attribute name.

Specified by:
getName in interface AttributeSource
Returns:
The attribute name. null ais NOT allowed!

getExplicitTuplizerClassName

public String getExplicitTuplizerClassName()
Specified by:
getExplicitTuplizerClassName in interface ComponentAttributeSource

getPropertyAccessorName

public String getPropertyAccessorName()
Description copied from interface: AttributeSource
Obtain the name of the property accessor style used to access this attribute.

Specified by:
getPropertyAccessorName in interface AttributeSource
Returns:
The property accessor style for this attribute.
See Also:
PropertyAccessor

getLocalBindingContext

public LocalBindingContext getLocalBindingContext()
Description copied from interface: AttributeSourceContainer
Obtain the local binding context associated with this container.

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

attributeSources

public Iterable<AttributeSource> attributeSources()
Description copied from interface: AttributeSourceContainer
Obtain this container's attribute sources.

Specified by:
attributeSources in interface AttributeSourceContainer
Returns:
The attribute sources.

getPath

public String getPath()
Description copied from interface: AttributeSourceContainer
Obtain the path used to uniquely identify this container.

Specified by:
getPath in interface AttributeSourceContainer
Returns:
The unique identifier path

getParentReferenceAttributeName

public String getParentReferenceAttributeName()
Specified by:
getParentReferenceAttributeName in interface ComponentAttributeSource

metaAttributes

public Iterable<MetaAttributeSource> metaAttributes()
Description copied from interface: AttributeSource
Obtain the meta-attribute sources associated with this attribute.

Specified by:
metaAttributes in interface AttributeSource
Returns:
The meta-attribute sources.

relationalValueSources

public List<RelationalValueSource> relationalValueSources()
Description copied from interface: RelationalValueSourceContainer
Obtain the contained RelationalValueSource references.

Specified by:
relationalValueSources in interface RelationalValueSourceContainer
Returns:
The contained RelationalValueSource references.

getTypeInformation

public ExplicitHibernateTypeSource getTypeInformation()
Description copied from interface: AttributeSource
Obtain information about the Hibernate type (Type) for this attribute.

Specified by:
getTypeInformation in interface AttributeSource
Returns:
The Hibernate type information

isInsertable

public boolean isInsertable()
Description copied from interface: SingularAttributeSource
Determine whether this attribute is insertable.

Specified by:
isInsertable in interface SingularAttributeSource
Returns:
true indicates the attribute value should be used in the SQL INSERT; false indicates it should not.

isUpdatable

public boolean isUpdatable()
Description copied from interface: SingularAttributeSource
Determine whether this attribute is updateable.

Specified by:
isUpdatable in interface SingularAttributeSource
Returns:
true indicates the attribute value should be used in the SQL UPDATE; false indicates it should not.

getGeneration

public PropertyGeneration getGeneration()
Description copied from interface: SingularAttributeSource
Obtain a description of if/when the attribute value is generated by the database.

Specified by:
getGeneration in interface SingularAttributeSource
Returns:
The attribute value generation information

isLazy

public boolean isLazy()
Description copied from interface: SingularAttributeSource
Should the attribute be (bytecode enhancement) lazily loaded?

Specified by:
isLazy in interface SingularAttributeSource
Returns:
true to indicate the attribute should be lazily loaded.

isIncludedInOptimisticLocking

public boolean isIncludedInOptimisticLocking()
Description copied from interface: AttributeSource
If the containing entity is using OptimisticLockStyle.ALL or OptimisticLockStyle.DIRTY style optimistic locking, should this attribute be used?

Specified by:
isIncludedInOptimisticLocking in interface AttributeSource
Returns:
true indicates it should be included; false, it should not.

areValuesIncludedInInsertByDefault

public boolean areValuesIncludedInInsertByDefault()
Specified by:
areValuesIncludedInInsertByDefault in interface RelationalValueSourceContainer

areValuesIncludedInUpdateByDefault

public boolean areValuesIncludedInUpdateByDefault()
Specified by:
areValuesIncludedInUpdateByDefault in interface RelationalValueSourceContainer

areValuesNullableByDefault

public boolean areValuesNullableByDefault()
Specified by:
areValuesNullableByDefault in interface RelationalValueSourceContainer

toString

public String toString()
Overrides:
toString in class Object


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