org.hibernate.metamodel.source.annotations.attribute
Class SingularAttributeSourceImpl

java.lang.Object
  extended by org.hibernate.metamodel.source.annotations.attribute.SingularAttributeSourceImpl
All Implemented Interfaces:
AttributeSource, RelationalValueSourceContainer, SingularAttributeSource
Direct Known Subclasses:
ToOneAttributeSourceImpl

public class SingularAttributeSourceImpl
extends Object
implements SingularAttributeSource


Constructor Summary
SingularAttributeSourceImpl(MappedAttribute attribute)
           
SingularAttributeSourceImpl(MappedAttribute attribute, AttributeOverride attributeOverride)
           
 
Method Summary
 boolean areValuesIncludedInInsertByDefault()
           
 boolean areValuesIncludedInUpdateByDefault()
           
 boolean areValuesNullableByDefault()
           
 PropertyGeneration getGeneration()
          Obtain a description of if/when the attribute value is generated by the database.
 String getName()
          Obtain the attribute name.
 SingularAttributeNature getNature()
          Obtain the nature of this attribute type.
 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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SingularAttributeSourceImpl

public SingularAttributeSourceImpl(MappedAttribute attribute)

SingularAttributeSourceImpl

public SingularAttributeSourceImpl(MappedAttribute attribute,
                                   AttributeOverride attributeOverride)
Method Detail

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

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

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.

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!

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.

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.

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.

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

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.

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


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