Top Description Inners 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, .Map, .StringTokenizer, org.hibernate.HibernateException, .Internal, .MappingException, org.hibernate.boot.model.relational.Database, org.hibernate.bytecode.enhance.spi.interceptor.EnhancementHelper, org.hibernate.cfg.AvailableSettings, org.hibernate.engine.spi.CascadeStyle, .CascadeStyles, .Mapping, org.hibernate.jpa.event.spi.CallbackDefinition, org.hibernate.metamodel.RepresentationMode, org.hibernate.metamodel.spi.RuntimeModelCreationContext, org.hibernate.property.access.spi.Getter, .PropertyAccessStrategy, .PropertyAccessStrategyResolver, .Setter, org.hibernate.service.ServiceRegistry, org.hibernate.generator.Generator, .GeneratorCreationContext, org.hibernate.type.CompositeType, .Type, .WrapperArrayHandling

A mapping model object representing a property or field of an entity or embeddable class.
Author
Gavin King

Nested and Inner Type Summary

Modifier and TypeClass and Description
private class

Field Summary

Modifier and TypeField and Description
private List<CallbackDefinition>
private String
private GeneratorCreator
private boolean
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 PropertyAccessStrategy
private String
private boolean
private boolean
private Value

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public void
public Property
copy()

public Generator
createGenerator(RuntimeModelCreationContext context)

Deprecated as a consequence of RuntimeModelCreationContext being deprecated.
public String
public List<CallbackDefinition>
public String
public CascadeStyle
private static CascadeStyle
private static CascadeStyle
getCollectionCascadeStyle(Type elementType, String cascade)

public List<Column>
public int
private static CascadeStyle
public Getter
getGetter(Class<T> clazz)

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

public Type
public Value
public GeneratorCreator
public boolean
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<?> clazz)

Deprecated for removal since 6. this method is no longer used
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)

Deprecated as a consequence of Mapping being deprecated.
public void
resetOptional(boolean optional)

public void
resetUpdateable(boolean updateable)

protected ServiceRegistry
public void
setCascade(String cascade)

public void
setGeneric(boolean generic)

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
public void
setReturnedClassName(String returnedClassName)

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
generatorCreatorback to summary
private GeneratorCreator generatorCreator
insertableback to summary
private boolean insertable
isGenericback to summary
private boolean isGeneric
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
propertyAccessStrategyback to summary
private PropertyAccessStrategy propertyAccessStrategy
returnedClassNameback to summary
private String returnedClassName
selectableback to summary
private boolean selectable
updateableback to summary
private boolean updateable
valueback to summary
private Value value

Constructor Detail

Propertyback to summary
public Property()

Method Detail

addCallbackDefinitionsback to summary
public void addCallbackDefinitions(List<CallbackDefinition> callbackDefinitions)
copyback to summary
public Property copy()
createGeneratorback to summary
public Generator createGenerator(RuntimeModelCreationContext context)

Deprecated

as a consequence of RuntimeModelCreationContext being deprecated. See corresponding docs for further information.

getAccessorPropertyNameback to summary
public String getAccessorPropertyName(RepresentationMode 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)
getColumnsback to summary
public List<Column> getColumns()

Delegates to Value#getColumns().

Exceptions
AssertionFailure:
if the mapping involves formulas
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 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<String, MetaAttribute> 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()
getPropertyAccessStrategyback to summary
public PropertyAccessStrategy getPropertyAccessStrategy(Class<T> clazz) throws MappingException
getReturnedClassNameback to summary
public String getReturnedClassName()
getSelectablesback to summary
public List<Selectable> getSelectables()

Delegates to Value#getSelectables().

getSetterback to summary
public Setter getSetter(Class<T> clazz) throws MappingException
getTypeback to summary
public Type getType() throws MappingException
getValueback to summary
public Value getValue()
getValueGeneratorCreatorback to summary
public GeneratorCreator getValueGeneratorCreator()
Annotations
@Internal
isBackRefback to summary
public boolean isBackRef()
isBasicPropertyAccessorback to summary
public boolean isBasicPropertyAccessor()
isCompositeback to summary
public boolean isComposite()
isGenericback to summary
public boolean isGeneric()
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 initialize this field of the entity instance in its "base fetch group". It affects whether we list this property's columns in the SQL select for the owning entity when we load its "base fetch group". The actual value that is set varies based on the nature (basic, etc) of the property.

API Note

This method reports whether the property is considered part of the base fetch group based solely on the information in the mapping but EnhancementHelper#includeInBaseFetchGroup is also accounts 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<?> clazz)

Deprecated

for removal since 6.

this method is no longer used

Annotations
@Deprecated
since:6
forRemoval:true
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

Deprecated

as a consequence of Mapping being deprecated. See corresponding docs for further information.

resetOptionalback to summary
public void resetOptional(boolean optional)
resetUpdateableback to summary
public void resetUpdateable(boolean updateable)
resolveServiceRegistryback to summary
protected ServiceRegistry resolveServiceRegistry()
setCascadeback to summary
public void setCascade(String cascade)
setGenericback to summary
public void setGeneric(boolean generic)
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<String, MetaAttribute> 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)
setPropertyAccessStrategyback to summary
public void setPropertyAccessStrategy(PropertyAccessStrategy propertyAccessStrategy)
setReturnedClassNameback to summary
public void setReturnedClassName(String returnedClassName)
setSelectableback to summary
public void setSelectable(boolean selectable)
setUpdateableback to summary
public void setUpdateable(boolean mutable)
setValueback to summary
public void setValue(Value value)
setValueGeneratorCreatorback to summary
public void setValueGeneratorCreator(GeneratorCreator generator)
Annotations
@Internal
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.

org.hibernate.mapping back to summary

private Class Property.PropertyGeneratorCreationContext

extends Object
implements GeneratorCreationContext
Class Inheritance
  • java.lang.Object
  • org.hibernate.mapping.Property.PropertyGeneratorCreationContext
All Implemented Interfaces
org.hibernate.generator.GeneratorCreationContext

Field Summary

Modifier and TypeField and Description
private final RuntimeModelCreationContext
context

Deprecated as a consequence of RuntimeModelCreationContext being deprecated.

Constructor Summary

AccessConstructor and Description
public
PropertyGeneratorCreationContext(RuntimeModelCreationContext context)

Deprecated as a consequence of RuntimeModelCreationContext being deprecated.

Method Summary

Modifier and TypeMethod and Description
public Database
public String
public String
public PersistentClass
public Property
public ServiceRegistry
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

contextback to summary
private final RuntimeModelCreationContext context

Deprecated

as a consequence of RuntimeModelCreationContext being deprecated. See corresponding docs for further information.

Constructor Detail

PropertyGeneratorCreationContextback to summary
public PropertyGeneratorCreationContext(RuntimeModelCreationContext context)

Deprecated

as a consequence of RuntimeModelCreationContext being deprecated. See corresponding docs for further information.

Method Detail

getDatabaseback to summary
public Database getDatabase()

Implements org.hibernate.generator.GeneratorCreationContext.getDatabase.

Annotations
@Override
getDefaultCatalogback to summary
public String getDefaultCatalog()

Implements org.hibernate.generator.GeneratorCreationContext.getDefaultCatalog.

Annotations
@Override
getDefaultSchemaback to summary
public String getDefaultSchema()

Implements org.hibernate.generator.GeneratorCreationContext.getDefaultSchema.

Annotations
@Override
getPersistentClassback to summary
public PersistentClass getPersistentClass()

Implements org.hibernate.generator.GeneratorCreationContext.getPersistentClass.

Annotations
@Override
getPropertyback to summary
public Property getProperty()

Implements org.hibernate.generator.GeneratorCreationContext.getProperty.

Annotations
@Override
getServiceRegistryback to summary
public ServiceRegistry getServiceRegistry()

Implements org.hibernate.generator.GeneratorCreationContext.getServiceRegistry.

Annotations
@Override