Top Description Fields Constructors Methods
org.hibernate.mapping

public Class Property

extends Object
implements Serializable, MetaAttributable
Class Inheritance
All Implemented Interfaces
org.hibernate.mapping.MetaAttributable, java.io.Serializable
Known Direct Subclasses
org.hibernate.mapping.SyntheticProperty, org.hibernate.mapping.Backref, org.hibernate.mapping.IndexBackref
Imports
java.io.Serializable, java.util.ArrayList, .Collections, .Iterator, .StringTokenizer, org.hibernate.EntityMode, .HibernateException, .MappingException, .PropertyNotFoundException, org.hibernate.bytecode.enhance.spi.interceptor.EnhancementHelper, org.hibernate.engine.spi.CascadeStyle, .CascadeStyles, .Mapping, org.hibernate.internal.util.collections.ArrayHelper, org.hibernate.jpa.event.spi.CallbackDefinition, org.hibernate.property.access.spi.Getter, .PropertyAccessStrategy, .PropertyAccessStrategyResolver, .Setter, org.hibernate.service.ServiceRegistry, org.hibernate.tuple.ValueGeneration, org.hibernate.type.CompositeType, .Type

Represents a property as part of an entity or a component.
Author
Gavin King

Field Summary

Modifier and TypeField and Description
private List<CallbackDefinition>
private String
private boolean
private boolean
private String
private boolean
private Map<K, V>
private String
private boolean
private boolean
private boolean
private PersistentClass
private String
private boolean
private boolean
private Value
private ValueGeneration

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public void
public String
public List<CallbackDefinition>
public String
public CascadeStyle
private static CascadeStyle
private static CascadeStyle
getCollectionCascadeStyle(Type elementType, String cascade)

public Iterator<E>
public int
private static CascadeStyle
public Getter
getGetter(Class<T> clazz)

public String
public MetaAttribute
public Map<K, V>
public String
public PersistentClass
public String
public PropertyAccessStrategy
public Setter
getSetter(Class<T> clazz)

public Type
public Value
public ValueGeneration
public boolean
public boolean
public boolean
public boolean
public boolean
isLazy()

Is this property lazy in the "bytecode" sense?

public boolean
public boolean
pack-priv boolean
isNullable()

Approximate!

public boolean
public boolean
public boolean
isPrimitive(Class<T> clazz)

public boolean
public boolean

Returns:

True if synthetic; false otherwise.
isSynthetic
()

Does this property represent a synthetic property?

public boolean
public boolean
isValid(Mapping mapping)

protected ServiceRegistry
public void
setCascade(String cascade)

public void
setInsertable(boolean insertable)

public void
setLazy(boolean lazy)

public void
setLazyGroup(String lazyGroup)

public void
setLob(boolean lob)

public void
public void
public void
setNaturalIdentifier(boolean naturalIdentifier)

public void
setOptimisticLocked(boolean optimisticLocked)

public void
setOptional(boolean optional)

public void
public void
public void
setSelectable(boolean selectable)

public void
setUpdateable(boolean mutable)

public void
setValue(Value value)

public void
public String
toString()

Overrides java.lang.Object.toString.

Returns a string representation of the object.
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAllwaitwaitwait

Field Detail

callbackDefinitionsback to summary
private List<CallbackDefinition> callbackDefinitions
cascadeback to summary
private String cascade
insertableback to summary
private boolean insertable
lazyback to summary
private boolean lazy
lazyGroupback to summary
private String lazyGroup
lobback to summary
private boolean lob
metaAttributesback to summary
private Map<K, V> metaAttributes
nameback to summary
private String name
naturalIdentifierback to summary
private boolean naturalIdentifier
optimisticLockedback to summary
private boolean optimisticLocked
optionalback to summary
private boolean optional
persistentClassback to summary
private PersistentClass persistentClass
propertyAccessorNameback to summary
private String propertyAccessorName
selectableback to summary
private boolean selectable
updateableback to summary
private boolean updateable
valueback to summary
private Value value
valueGenerationStrategyback to summary
private ValueGeneration valueGenerationStrategy

Constructor Detail

Propertyback to summary
public Property()

Method Detail

addCallbackDefinitionsback to summary
public void addCallbackDefinitions(List<CallbackDefinition> callbackDefinitions)
getAccessorPropertyNameback to summary
public String getAccessorPropertyName(EntityMode mode)
getCallbackDefinitionsback to summary
public List<CallbackDefinition> getCallbackDefinitions()
getCascadeback to summary
public String getCascade()
getCascadeStyleback to summary
public CascadeStyle getCascadeStyle() throws MappingException
getCascadeStyleback to summary
private static CascadeStyle getCascadeStyle(String cascade)
getCollectionCascadeStyleback to summary
private static CascadeStyle getCollectionCascadeStyle(Type elementType, String cascade)
getColumnIteratorback to summary
public Iterator<E> getColumnIterator()
getColumnSpanback to summary
public int getColumnSpan()
getCompositeCascadeStyleback to summary
private static CascadeStyle getCompositeCascadeStyle(CompositeType compositeType, String cascade)
getGetterback to summary
public Getter getGetter(Class<T> clazz) throws PropertyNotFoundException, MappingException
getLazyGroupback to summary
public String getLazyGroup()
getMetaAttributeback to summary
public MetaAttribute getMetaAttribute(String attributeName)

Implements org.hibernate.mapping.MetaAttributable.getMetaAttribute.

getMetaAttributesback to summary
public Map<K, V> getMetaAttributes()

Implements org.hibernate.mapping.MetaAttributable.getMetaAttributes.

getNameback to summary
public String getName()
getPersistentClassback to summary
public PersistentClass getPersistentClass()
getPropertyAccessorNameback to summary
public String getPropertyAccessorName()
getPropertyAccessStrategyback to summary
public PropertyAccessStrategy getPropertyAccessStrategy(Class<T> clazz) throws MappingException
getSetterback to summary
public Setter getSetter(Class<T> clazz) throws PropertyNotFoundException, MappingException
getTypeback to summary
public Type getType() throws MappingException
getValueback to summary
public Value getValue()
getValueGenerationStrategyback to summary
public ValueGeneration getValueGenerationStrategy()
isBackRefback to summary
public boolean isBackRef()
isBasicPropertyAccessorback to summary
public boolean isBasicPropertyAccessor()
isCompositeback to summary
public boolean isComposite()
isInsertableback to summary
public boolean isInsertable()
isLazyback to summary
public boolean isLazy()

Is this property lazy in the "bytecode" sense? Lazy here means whether we should push *something* to the entity instance for this field in its "base fetch group". Mainly it affects whether we should list this property's columns in the SQL select for the owning entity when we load its "base fetch group". The "something" we push varies based on the nature (basic, etc) of the property.

API Note

This form reports whether the property is considered part of the base fetch group based solely on the mapping information. However, EnhancementHelper#includeInBaseFetchGroup is used internally to make that decision to account for other details

isLobback to summary
public boolean isLob()
isNaturalIdentifierback to summary
public boolean isNaturalIdentifier()
isNullableback to summary
pack-priv boolean isNullable()

Approximate!

isOptimisticLockedback to summary
public boolean isOptimisticLocked()
isOptionalback to summary
public boolean isOptional()
isPrimitiveback to summary
public boolean isPrimitive(Class<T> clazz)
isSelectableback to summary
public boolean isSelectable()
isSyntheticback to summary
public boolean isSynthetic()

Does this property represent a synthetic property? A synthetic property is one we create during metamodel binding to represent a collection of columns but which does not represent a property physically available on the entity.

Returns:boolean

True if synthetic; false otherwise.

isUpdateableback to summary
public boolean isUpdateable()
isValidback to summary
public boolean isValid(Mapping mapping) throws MappingException
resolveServiceRegistryback to summary
protected ServiceRegistry resolveServiceRegistry()
setCascadeback to summary
public void setCascade(String cascade)
setInsertableback to summary
public void setInsertable(boolean insertable)
setLazyback to summary
public void setLazy(boolean lazy)
setLazyGroupback to summary
public void setLazyGroup(String lazyGroup)
setLobback to summary
public void setLob(boolean lob)
setMetaAttributesback to summary
public void setMetaAttributes(Map<K, V> metas)

Implements org.hibernate.mapping.MetaAttributable.setMetaAttributes.

setNameback to summary
public void setName(String name)
setNaturalIdentifierback to summary
public void setNaturalIdentifier(boolean naturalIdentifier)
setOptimisticLockedback to summary
public void setOptimisticLocked(boolean optimisticLocked)
setOptionalback to summary
public void setOptional(boolean optional)
setPersistentClassback to summary
public void setPersistentClass(PersistentClass persistentClass)
setPropertyAccessorNameback to summary
public void setPropertyAccessorName(String string)
setSelectableback to summary
public void setSelectable(boolean selectable)
setUpdateableback to summary
public void setUpdateable(boolean mutable)
setValueback to summary
public void setValue(Value value)
setValueGenerationStrategyback to summary
public void setValueGenerationStrategy(ValueGeneration valueGenerationStrategy)
toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object.

Returns:String

a string representation of the object.