Top Description Inners Fields Constructors Methods
org.hibernate.property

public Class Dom4jAccessor

extends Object
implements PropertyAccessor
Class Inheritance
All Implemented Interfaces
org.hibernate.property.PropertyAccessor
Imports
java.lang.reflect.Method, .Member, java.util.Map, org.dom4j.Attribute, .Element, .Node, org.hibernate.HibernateException, .MappingException, .PropertyNotFoundException, org.hibernate.engine.SessionFactoryImplementor, .SessionImplementor, org.hibernate.type.CollectionType, .Type

Responsible for accessing property values represented as a dom4j Element or Attribute.
Author
Steve Ebersole

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static class
Dom4jAccessor.AttributeGetter

For nodes like "@bar"

public static class
Dom4jAccessor.AttributeSetter

For nodes like "@bar"

public abstract static class
Dom4jAccessor.Dom4jGetter

Defines the strategy for getting property values out of a dom4j Node.

public abstract static class
public static class
Dom4jAccessor.ElementAttributeGetter

For nodes like "foo/@bar"

public static class
Dom4jAccessor.ElementAttributeSetter

For nodes like "foo/@bar"

public static class
Dom4jAccessor.ElementGetter

For nodes like "foo"

public static class
Dom4jAccessor.ElementSetter

For nodes like "foo"

public static class
Dom4jAccessor.TextGetter

For nodes like "."

public static class
Dom4jAccessor.TextSetter

For nodes like "."

Field Summary

Modifier and TypeField and Description
private final SessionFactoryImplementor
private String
private Type

Constructor Summary

AccessConstructor and Description
public
Dom4jAccessor(String nodeName, Type propertyType, SessionFactoryImplementor factory)

Method Summary

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

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.
theClass
,
String
The name of the property.
propertyName
)

Implements org.hibernate.property.PropertyAccessor.getSetter.

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

Field Detail

factoryback to summary
private final SessionFactoryImplementor factory
nodeNameback to summary
private String nodeName
propertyTypeback to summary
private Type propertyType

Constructor Detail

Dom4jAccessorback to summary
public Dom4jAccessor(String nodeName, Type propertyType, SessionFactoryImplementor factory)

Method Detail

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

Implements org.hibernate.property.PropertyAccessor.getGetter.

Create a "getter" for the named attribute

Parameters
theClass:Class<T>

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

The class on which the property is defined.

propertyName:String

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

The name of the property.

Returns:Getter

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

An appropriate getter.

Exceptions
PropertyNotFoundException:

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

Indicates a problem interpretting the propertyName

getSetterback to summary
public Setter getSetter(Class<T> theClass, String propertyName) throws PropertyNotFoundException

Implements org.hibernate.property.PropertyAccessor.getSetter.

Create a "setter" for the named attribute

Parameters
theClass:Class<T>

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

The class on which the property is defined.

propertyName:String

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

The name of the property.

Returns:Setter

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

An appropriate setter

Exceptions
PropertyNotFoundException:

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

Indicates a problem interpretting the propertyName

org.hibernate.property back to summary

public Class Dom4jAccessor.AttributeGetter

extends Dom4jGetter
Class Inheritance

For nodes like "@bar"
Author
Gavin King

Field Summary

Modifier and TypeField and Description
private final String
Inherited from org.hibernate.property.Dom4jAccessor.Dom4jGetter:
factorypropertyType

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

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

Implements org.hibernate.property.Getter.get.

Get the property value from the given instance .
Inherited from org.hibernate.property.Dom4jAccessor.Dom4jGetter:
getForInsertgetMembergetMethodgetMethodNamegetReturnType

Field Detail

attributeNameback to summary
private final String attributeName

Constructor Detail

AttributeGetterback to summary
pack-priv AttributeGetter(String name, Type propertyType, SessionFactoryImplementor factory)

Method Detail

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

Implements org.hibernate.property.Getter.get.

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

Get the property value from the given instance .

Parameters
owner:Object

The instance containing the value to be retreived.

Returns:Object

The extracted value.

org.hibernate.property back to summary

public Class Dom4jAccessor.AttributeSetter

extends Dom4jSetter
Class Inheritance

For nodes like "@bar"
Author
Gavin King

Field Summary

Modifier and TypeField and Description
private final String
Inherited from org.hibernate.property.Dom4jAccessor.Dom4jSetter:
propertyType

Constructor Summary

AccessConstructor and Description
pack-priv
AttributeSetter(String name, Type propertyType)

Method Summary

Modifier and TypeMethod and Description
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.Setter.set.

Set the property value from the given instance
Inherited from org.hibernate.property.Dom4jAccessor.Dom4jSetter:
getMethodgetMethodName

Field Detail

attributeNameback to summary
private final String attributeName

Constructor Detail

AttributeSetterback to summary
pack-priv AttributeSetter(String name, Type propertyType)

Method Detail

setback to summary
public void set(Object target, Object value, SessionFactoryImplementor factory) throws HibernateException

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.

factory:SessionFactoryImplementor

The session factory from which this request originated.

org.hibernate.property back to summary

public abstract Class Dom4jAccessor.Dom4jGetter

extends Object
implements Getter
Class Inheritance
All Implemented Interfaces
org.hibernate.property.Getter, java.io.Serializable
Known Direct Subclasses
org.hibernate.property.Dom4jAccessor.TextGetter, org.hibernate.property.Dom4jAccessor.AttributeGetter, org.hibernate.property.Dom4jAccessor.ElementGetter, org.hibernate.property.Dom4jAccessor.ElementAttributeGetter

Defines the strategy for getting property values out of a dom4j Node.

Field Summary

Modifier and TypeField and Description
protected final SessionFactoryImplementor
protected final Type

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
public Object
getForInsert(Object
The instance containing the value to be retreived.
owner
,
Map<K, V>
a map of merged persistent instances to detached instances
mergeMap
,
SessionImplementor
The session from which this request originated.
session
)

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

Field Detail

factoryback to summary
protected final SessionFactoryImplementor factory
propertyTypeback to summary
protected final Type propertyType

Constructor Detail

Dom4jGetterback to summary
pack-priv Dom4jGetter(Type propertyType, SessionFactoryImplementor factory)

Method Detail

getForInsertback to summary
public Object getForInsert(Object owner, Map<K, V> mergeMap, SessionImplementor session) 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
owner:Object

The instance containing the value to be retreived.

mergeMap:Map<K, V>

a map of merged persistent instances to detached instances

session: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

public abstract Class Dom4jAccessor.Dom4jSetter

extends Object
implements Setter
Class Inheritance
All Implemented Interfaces
org.hibernate.property.Setter, java.io.Serializable
Known Direct Subclasses
org.hibernate.property.Dom4jAccessor.TextSetter, org.hibernate.property.Dom4jAccessor.AttributeSetter, org.hibernate.property.Dom4jAccessor.ElementSetter, org.hibernate.property.Dom4jAccessor.ElementAttributeSetter

Field Summary

Modifier and TypeField and Description
protected final Type

Constructor Summary

AccessConstructor and Description
pack-priv
Dom4jSetter(Type propertyType)

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)
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

propertyTypeback to summary
protected final Type propertyType

Constructor Detail

Dom4jSetterback to summary
pack-priv Dom4jSetter(Type propertyType)

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)

org.hibernate.property back to summary

public Class Dom4jAccessor.ElementAttributeGetter

extends Dom4jGetter
Class Inheritance

For nodes like "foo/@bar"
Author
Gavin King

Field Summary

Modifier and TypeField and Description
private final String
private final String
Inherited from org.hibernate.property.Dom4jAccessor.Dom4jGetter:
factorypropertyType

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

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

Implements org.hibernate.property.Getter.get.

Get the property value from the given instance .
Inherited from org.hibernate.property.Dom4jAccessor.Dom4jGetter:
getForInsertgetMembergetMethodgetMethodNamegetReturnType

Field Detail

attributeNameback to summary
private final String attributeName
elementNameback to summary
private final String elementName

Constructor Detail

ElementAttributeGetterback to summary
pack-priv ElementAttributeGetter(String name, Type propertyType, SessionFactoryImplementor factory)

Method Detail

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

Implements org.hibernate.property.Getter.get.

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

Get the property value from the given instance .

Parameters
owner:Object

The instance containing the value to be retreived.

Returns:Object

The extracted value.

org.hibernate.property back to summary

public Class Dom4jAccessor.ElementAttributeSetter

extends Dom4jSetter
Class Inheritance

For nodes like "foo/@bar"
Author
Gavin King

Field Summary

Modifier and TypeField and Description
private final String
private final String
Inherited from org.hibernate.property.Dom4jAccessor.Dom4jSetter:
propertyType

Constructor Summary

AccessConstructor and Description
pack-priv
ElementAttributeSetter(String name, Type propertyType)

Method Summary

Modifier and TypeMethod and Description
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.Setter.set.

Set the property value from the given instance
Inherited from org.hibernate.property.Dom4jAccessor.Dom4jSetter:
getMethodgetMethodName

Field Detail

attributeNameback to summary
private final String attributeName
elementNameback to summary
private final String elementName

Constructor Detail

ElementAttributeSetterback to summary
pack-priv ElementAttributeSetter(String name, Type propertyType)

Method Detail

setback to summary
public void set(Object target, Object value, SessionFactoryImplementor factory) throws HibernateException

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.

factory:SessionFactoryImplementor

The session factory from which this request originated.

org.hibernate.property back to summary

public Class Dom4jAccessor.ElementGetter

extends Dom4jGetter
Class Inheritance

For nodes like "foo"
Author
Gavin King

Field Summary

Modifier and TypeField and Description
private final String
Inherited from org.hibernate.property.Dom4jAccessor.Dom4jGetter:
factorypropertyType

Constructor Summary

AccessConstructor and Description
pack-priv
ElementGetter(String name, Type propertyType, SessionFactoryImplementor factory)

Method Summary

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

Implements org.hibernate.property.Getter.get.

Get the property value from the given instance .
Inherited from org.hibernate.property.Dom4jAccessor.Dom4jGetter:
getForInsertgetMembergetMethodgetMethodNamegetReturnType

Field Detail

elementNameback to summary
private final String elementName

Constructor Detail

ElementGetterback to summary
pack-priv ElementGetter(String name, Type propertyType, SessionFactoryImplementor factory)

Method Detail

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

Implements org.hibernate.property.Getter.get.

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

Get the property value from the given instance .

Parameters
owner:Object

The instance containing the value to be retreived.

Returns:Object

The extracted value.

org.hibernate.property back to summary

public Class Dom4jAccessor.ElementSetter

extends Dom4jSetter
Class Inheritance

For nodes like "foo"
Author
Gavin King

Field Summary

Modifier and TypeField and Description
private final String
Inherited from org.hibernate.property.Dom4jAccessor.Dom4jSetter:
propertyType

Constructor Summary

AccessConstructor and Description
pack-priv
ElementSetter(String name, Type propertyType)

Method Summary

Modifier and TypeMethod and Description
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.Setter.set.

Set the property value from the given instance
Inherited from org.hibernate.property.Dom4jAccessor.Dom4jSetter:
getMethodgetMethodName

Field Detail

elementNameback to summary
private final String elementName

Constructor Detail

ElementSetterback to summary
pack-priv ElementSetter(String name, Type propertyType)

Method Detail

setback to summary
public void set(Object target, Object value, SessionFactoryImplementor factory) throws HibernateException

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.

factory:SessionFactoryImplementor

The session factory from which this request originated.

org.hibernate.property back to summary

public Class Dom4jAccessor.TextGetter

extends Dom4jGetter
Class Inheritance

For nodes like "."
Author
Gavin King

Field Summary

Inherited from org.hibernate.property.Dom4jAccessor.Dom4jGetter:
factorypropertyType

Constructor Summary

AccessConstructor and Description
pack-priv
TextGetter(Type propertyType, SessionFactoryImplementor factory)

Method Summary

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

Implements org.hibernate.property.Getter.get.

Get the property value from the given instance .
Inherited from org.hibernate.property.Dom4jAccessor.Dom4jGetter:
getForInsertgetMembergetMethodgetMethodNamegetReturnType

Constructor Detail

TextGetterback to summary
pack-priv TextGetter(Type propertyType, SessionFactoryImplementor factory)

Method Detail

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

Implements org.hibernate.property.Getter.get.

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

Get the property value from the given instance .

Parameters
owner:Object

The instance containing the value to be retreived.

Returns:Object

The extracted value.

org.hibernate.property back to summary

public Class Dom4jAccessor.TextSetter

extends Dom4jSetter
Class Inheritance

For nodes like "."
Author
Gavin King

Field Summary

Inherited from org.hibernate.property.Dom4jAccessor.Dom4jSetter:
propertyType

Constructor Summary

AccessConstructor and Description
pack-priv
TextSetter(Type propertyType)

Method Summary

Modifier and TypeMethod and Description
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.Setter.set.

Set the property value from the given instance
Inherited from org.hibernate.property.Dom4jAccessor.Dom4jSetter:
getMethodgetMethodName

Constructor Detail

TextSetterback to summary
pack-priv TextSetter(Type propertyType)

Method Detail

setback to summary
public void set(Object target, Object value, SessionFactoryImplementor factory) throws HibernateException

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.

factory:SessionFactoryImplementor

The session factory from which this request originated.