Top Description Inners Constructors Methods
org.hibernate.property

public Class NoopAccessor

extends Object
implements PropertyAccessor
Class Inheritance
All Implemented Interfaces
org.hibernate.property.PropertyAccessor
Imports
java.lang.reflect.Method, .Member, java.util.Map, org.hibernate.HibernateException, .PropertyNotFoundException, org.hibernate.engine.SessionFactoryImplementor, .SessionImplementor

Used to declare properties not represented at the pojo level
Author
Michael Bartmann

Nested and Inner Type Summary

Modifier and TypeClass and Description
private static class
NoopAccessor.NoopGetter

A Getter which will always return null.

private static class
NoopAccessor.NoopSetter

A Setter which will just do nothing.

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public Getter
getGetter(Class<T>
The class on which the property is defined.
arg0
,
String
The name of the property.
arg1
)

Implements org.hibernate.property.PropertyAccessor.getGetter.

Create a "getter" for the named attribute
public Setter
getSetter(Class<T>
The class on which the property is defined.
arg0
,
String
The name of the property.
arg1
)

Implements org.hibernate.property.PropertyAccessor.getSetter.

Create a "setter" for the named attribute
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Constructor Detail

NoopAccessorback to summary
public NoopAccessor()

Method Detail

getGetterback to summary
public Getter getGetter(Class<T> arg0, String arg1) throws PropertyNotFoundException

Implements org.hibernate.property.PropertyAccessor.getGetter.

Doc from org.hibernate.property.PropertyAccessor.getGetter.

Create a "getter" for the named attribute

Parameters
arg0:Class<T>

The class on which the property is defined.

arg1:String

The name of the property.

Returns:Getter

An appropriate getter.

Exceptions
PropertyNotFoundException:
Indicates a problem interpretting the propertyName
getSetterback to summary
public Setter getSetter(Class<T> arg0, String arg1) throws PropertyNotFoundException

Implements org.hibernate.property.PropertyAccessor.getSetter.

Doc from org.hibernate.property.PropertyAccessor.getSetter.

Create a "setter" for the named attribute

Parameters
arg0:Class<T>

The class on which the property is defined.

arg1:String

The name of the property.

Returns:Setter

An appropriate setter

Exceptions
PropertyNotFoundException:
Indicates a problem interpretting the propertyName
org.hibernate.property back to summary

private Class NoopAccessor.NoopGetter

extends Object
implements Getter
Class Inheritance
All Implemented Interfaces
org.hibernate.property.Getter, java.io.Serializable

A Getter which will always return null. It should not be called anyway.

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public Object
get(Object
The instance containing the value to be retreived.
target
)

Implements org.hibernate.property.Getter.get.

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

Implements org.hibernate.property.Getter.getForInsert.

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

Implements org.hibernate.property.Getter.getMember.

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

Implements org.hibernate.property.Getter.getMethod.

Retrieve the getter-method.
public String
getMethodName()

Implements org.hibernate.property.Getter.getMethodName.

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

Implements org.hibernate.property.Getter.getReturnType.

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

Constructor Detail

NoopGetterback to summary
private NoopGetter()

Method Detail

getback to summary
public Object get(Object target) throws HibernateException

Implements org.hibernate.property.Getter.get.

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

Get the property value from the given instance .

Here we always return null

Parameters
target:Object

The instance containing the value to be retreived.

Returns:Object

The extracted value.

getForInsertback to summary
public Object getForInsert(Object target, Map<K, V> map, SessionImplementor arg1) throws HibernateException

Implements org.hibernate.property.Getter.getForInsert.

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

Get the property value from the given owner instance.

Parameters
target:Object

The instance containing the value to be retreived.

map:Map<K, V>

a map of merged persistent instances to detached instances

arg1:SessionImplementor

The session from which this request originated.

Returns:Object

The extracted value.

getMemberback to summary
public Member getMember()

Implements org.hibernate.property.Getter.getMember.

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

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

Returns:Member

The mapped member.

getMethodback to summary
public Method getMethod()

Implements org.hibernate.property.Getter.getMethod.

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

Retrieve the getter-method.

Optional operation (return null)

Returns:Method

The getter method, or null.

getMethodNameback to summary
public String getMethodName()

Implements org.hibernate.property.Getter.getMethodName.

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

Retrieve the getter-method name.

Optional operation (return null)

Returns:String

The name of the getter method, or null.

getReturnTypeback to summary
public Class<T> getReturnType()

Implements org.hibernate.property.Getter.getReturnType.

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

Retrieve the declared Java type

Returns:Class<T>

The declared java type.

org.hibernate.property back to summary

private Class NoopAccessor.NoopSetter

extends Object
implements Setter
Class Inheritance
All Implemented Interfaces
org.hibernate.property.Setter, java.io.Serializable

A Setter which will just do nothing.

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public Method
getMethod()

Implements org.hibernate.property.Setter.getMethod.

Optional operation (return null)
public String
getMethodName()

Implements org.hibernate.property.Setter.getMethodName.

Optional operation (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.
arg2
)

Implements org.hibernate.property.Setter.set.

Set the property value from the given instance
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Constructor Detail

NoopSetterback to summary
private NoopSetter()

Method Detail

getMethodback to summary
public Method getMethod()

Implements org.hibernate.property.Setter.getMethod.

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

Optional operation (return null)

getMethodNameback to summary
public String getMethodName()

Implements org.hibernate.property.Setter.getMethodName.

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

Optional operation (return null)

setback to summary
public void set(Object target, Object value, SessionFactoryImplementor arg2)

Implements org.hibernate.property.Setter.set.

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

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.

arg2:SessionFactoryImplementor

The session factory from which this request originated.