Top Description Inners Fields Constructors Methods
org.hibernate.property.access.internal

public Class PropertyAccessEmbeddedImpl

extends Object
implements PropertyAccess
Class Inheritance
All Implemented Interfaces
org.hibernate.property.access.spi.PropertyAccess
Imports
java.lang.reflect.Member, .Method, java.util.Map, org.hibernate.engine.spi.SessionFactoryImplementor, .SharedSessionContractImplementor, org.hibernate.property.access.spi.Getter, .PropertyAccess, .PropertyAccessStrategy, .Setter

PropertyAccess for handling non-aggregated composites.

IMPL NOTE : We actually use a singleton for the Setter; we cannot for the getter mainly because we need to differentiate Getter#getReturnType(). Ultimately I'd prefer to model that "common information" on PropertyAccess itself.

Authors
Gavin King, Steve Ebersole

Nested and Inner Type Summary

Modifier and TypeClass and Description
private static class
private static class

Field Summary

Modifier and TypeField and Description
private final PropertyAccessEmbeddedImpl.GetterImpl
private final PropertyAccessStrategyEmbeddedImpl

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public Getter
getGetter()

Implements org.hibernate.property.access.spi.PropertyAccess.getGetter.

Obtain the delegate for getting values for the described persistent property
public PropertyAccessStrategy
getPropertyAccessStrategy()

Implements org.hibernate.property.access.spi.PropertyAccess.getPropertyAccessStrategy.

Access to the PropertyAccessStrategy that created this PropertyAccess
public Setter
getSetter()

Implements org.hibernate.property.access.spi.PropertyAccess.getSetter.

Obtain the delegate for setting values for the described persistent property
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

getterback to summary
private final PropertyAccessEmbeddedImpl.GetterImpl getter
strategyback to summary
private final PropertyAccessStrategyEmbeddedImpl strategy

Constructor Detail

PropertyAccessEmbeddedImplback to summary
public PropertyAccessEmbeddedImpl(PropertyAccessStrategyEmbeddedImpl strategy, Class<T> containerType, String propertyName)
Annotations
@SuppressWarnings:UnusedParameters

Method Detail

getGetterback to summary
public Getter getGetter()

Implements org.hibernate.property.access.spi.PropertyAccess.getGetter.

Doc from org.hibernate.property.access.spi.PropertyAccess.getGetter.

Obtain the delegate for getting values for the described persistent property

Returns:Getter

The property getter

Annotations
@Override
getPropertyAccessStrategyback to summary
public PropertyAccessStrategy getPropertyAccessStrategy()

Implements org.hibernate.property.access.spi.PropertyAccess.getPropertyAccessStrategy.

Doc from org.hibernate.property.access.spi.PropertyAccess.getPropertyAccessStrategy.

Access to the PropertyAccessStrategy that created this PropertyAccess

Returns:PropertyAccessStrategy

The PropertyAccessStrategy that created this PropertyAccess

Annotations
@Override
getSetterback to summary
public Setter getSetter()

Implements org.hibernate.property.access.spi.PropertyAccess.getSetter.

Doc from org.hibernate.property.access.spi.PropertyAccess.getSetter.

Obtain the delegate for setting values for the described persistent property

Returns:Setter

The property setter

Annotations
@Override
org.hibernate.property.access.internal back to summary

private Class PropertyAccessEmbeddedImpl.GetterImpl

extends Object
implements Getter
Class Inheritance
  • java.lang.Object
  • org.hibernate.property.access.internal.PropertyAccessEmbeddedImpl.GetterImpl
All Implemented Interfaces
org.hibernate.property.access.spi.Getter, java.io.Serializable

Field Summary

Modifier and TypeField and Description
private final Class<T>

Constructor Summary

AccessConstructor and Description
public
GetterImpl(Class<T> containerType)

Method Summary

Modifier and TypeMethod and Description
public Object
get(Object
The instance containing the property value to be retrieved.
owner
)

Implements org.hibernate.property.access.spi.Getter.get.

Get the property value from the given owner instance.
public Object
getForInsert(Object
The instance containing the value to be retrieved.
owner
,
Map<K, V>
a map of merged persistent instances to detached instances
mergeMap
,
SharedSessionContractImplementor
The session from which this request originated.
session
)

Implements org.hibernate.property.access.spi.Getter.getForInsert.

Get the property value from the given owner instance.
public Member
getMember()

Implements org.hibernate.property.access.spi.Getter.getMember.

Retrieve the member to which this property maps.
public Method
getMethod()

Implements org.hibernate.property.access.spi.Getter.getMethod.

Retrieve the getter-method.
public String
getMethodName()

Implements org.hibernate.property.access.spi.Getter.getMethodName.

Retrieve the getter-method name.
public Class<T>
getReturnType()

Implements org.hibernate.property.access.spi.Getter.getReturnType.

Retrieve the declared Java type
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

containerTypeback to summary
private final Class<T> containerType

Constructor Detail

GetterImplback to summary
public GetterImpl(Class<T> containerType)

Method Detail

getback to summary
public Object get(Object owner)

Implements org.hibernate.property.access.spi.Getter.get.

Doc from org.hibernate.property.access.spi.Getter.get.

Get the property value from the given owner instance.

Parameters
owner:Object

The instance containing the property value to be retrieved.

Returns:Object

The extracted value.

Annotations
@Override
getForInsertback to summary
public Object getForInsert(Object owner, Map<K, V> mergeMap, SharedSessionContractImplementor session)

Implements org.hibernate.property.access.spi.Getter.getForInsert.

Doc from org.hibernate.property.access.spi.Getter.getForInsert.

Get the property value from the given owner instance.

Parameters
owner:Object

The instance containing the value to be retrieved.

mergeMap:Map<K, V>

a map of merged persistent instances to detached instances

session:SharedSessionContractImplementor

The session from which this request originated.

Returns:Object

The extracted value.

Annotations
@Override
getMemberback to summary
public Member getMember()

Implements org.hibernate.property.access.spi.Getter.getMember.

Doc from org.hibernate.property.access.spi.Getter.getMember.

Retrieve the member to which this property maps. This might be the field or it might be the getter method.

Optional operation (may return null)

Returns:Member

The mapped member, or null.

Annotations
@Override
getMethodback to summary
public Method getMethod()

Implements org.hibernate.property.access.spi.Getter.getMethod.

Doc from org.hibernate.property.access.spi.Getter.getMethod.

Retrieve the getter-method.

Optional operation (may return null)

Returns:Method

The getter method, or null.

Annotations
@Override
getMethodNameback to summary
public String getMethodName()

Implements org.hibernate.property.access.spi.Getter.getMethodName.

Doc from org.hibernate.property.access.spi.Getter.getMethodName.

Retrieve the getter-method name.

Optional operation (may return null)

Returns:String

The name of the getter method, or null.

Annotations
@Override
getReturnTypeback to summary
public Class<T> getReturnType()

Implements org.hibernate.property.access.spi.Getter.getReturnType.

Doc from org.hibernate.property.access.spi.Getter.getReturnType.

Retrieve the declared Java type

Returns:Class<T>

The declared java type.

Annotations
@Override
org.hibernate.property.access.internal back to summary

private Class PropertyAccessEmbeddedImpl.SetterImpl

extends Object
implements Setter
Class Inheritance
  • java.lang.Object
  • org.hibernate.property.access.internal.PropertyAccessEmbeddedImpl.SetterImpl
All Implemented Interfaces
org.hibernate.property.access.spi.Setter, java.io.Serializable

Field Summary

Modifier and TypeField and Description
public static final PropertyAccessEmbeddedImpl.SetterImpl
INSTANCE

Singleton access - we can actually use a singleton for the setter

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public Method
getMethod()

Implements org.hibernate.property.access.spi.Setter.getMethod.

Optional operation (may return null)
public String
getMethodName()

Implements org.hibernate.property.access.spi.Setter.getMethodName.

Optional operation (may return null)
public void
set(Object
The instance upon which to set the given value.
target
,
Object
The value to be set on the target.
value
,
SessionFactoryImplementor
The session factory from which this request originated.
factory
)

Implements org.hibernate.property.access.spi.Setter.set.

Deprecated as a consequence of SessionFactoryImplementor being deprecated.
Set the property value from the given instance
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

INSTANCEback to summary
public static final PropertyAccessEmbeddedImpl.SetterImpl INSTANCE

Singleton access - we can actually use a singleton for the setter

Constructor Detail

SetterImplback to summary
private SetterImpl()

Method Detail

getMethodback to summary
public Method getMethod()

Implements org.hibernate.property.access.spi.Setter.getMethod.

Doc from org.hibernate.property.access.spi.Setter.getMethod.

Optional operation (may return null)

Annotations
@Override
getMethodNameback to summary
public String getMethodName()

Implements org.hibernate.property.access.spi.Setter.getMethodName.

Doc from org.hibernate.property.access.spi.Setter.getMethodName.

Optional operation (may return null)

Annotations
@Override
setback to summary
public void set(Object target, Object value, SessionFactoryImplementor factory)

Implements org.hibernate.property.access.spi.Setter.set.

Doc from org.hibernate.property.access.spi.Setter.set.

Deprecated

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

Set the property value from the given instance

Parameters
target:Object

The instance upon which to set the given value.

value:Object

The value to be set on the target.

factory:SessionFactoryImplementor

The session factory from which this request originated.

Annotations
@Override