public interface

CompositeType

implements Type
org.hibernate.type.CompositeType
Known Indirect Subclasses

Class Overview

Contract for value types to hold collections and have cascades, etc. The notion is that of composition. JPA terms this an embeddable.

Summary

Public Methods
abstract CascadeStyle getCascadeStyle(int index)
Retrieve the cascade style of the indicated component property.
abstract FetchMode getFetchMode(int index)
Retrieve the fetch mode of the indicated component property.
abstract String[] getPropertyNames()
Get the names of the component properties
abstract boolean[] getPropertyNullability()
Retrieve the indicators regarding which component properties are nullable.
abstract Object getPropertyValue(Object component, int index, SessionImplementor session)
Extract a particular component property value indicated by index.
abstract Object[] getPropertyValues(Object component, SessionImplementor session)
Extract the values of the component properties from the given component instance
abstract Object[] getPropertyValues(Object component, EntityMode entityMode)
Extract the values of the component properties from the given component instance without access to the session.
abstract Type[] getSubtypes()
Get the types of the component properties
abstract boolean isEmbedded()
Is this component embedded? "embedded" indicates that the component is "virtual", that its properties are "flattened" onto its owner
abstract boolean isMethodOf(Method method)
Is the given method a member of this component's class?
abstract void setPropertyValues(Object component, Object[] values, EntityMode entityMode)
Inject property values onto the given component instance

An optional operation

[Expand]
Inherited Methods
From interface org.hibernate.type.Type

Public Methods

public abstract CascadeStyle getCascadeStyle (int index)

Retrieve the cascade style of the indicated component property.

Parameters
index The property index,
Returns
  • The cascade style.

public abstract FetchMode getFetchMode (int index)

Retrieve the fetch mode of the indicated component property.

Parameters
index The property index,
Returns
  • The fetch mode

public abstract String[] getPropertyNames ()

Get the names of the component properties

Returns
  • The component property names

public abstract boolean[] getPropertyNullability ()

Retrieve the indicators regarding which component properties are nullable.

An optional operation

Returns
  • nullability of component properties

public abstract Object getPropertyValue (Object component, int index, SessionImplementor session)

Extract a particular component property value indicated by index.

Parameters
component The component instance
index The index of the property whose value is to be extracted
session The session from which the request originates.
Returns
  • The extracted component property value
Throws
HibernateException Indicates a problem access the property value.

public abstract Object[] getPropertyValues (Object component, SessionImplementor session)

Extract the values of the component properties from the given component instance

Parameters
component The component instance
session The session from which the request originates
Returns
  • The property values
Throws
HibernateException Indicates a problem access the property values.

public abstract Object[] getPropertyValues (Object component, EntityMode entityMode)

Extract the values of the component properties from the given component instance without access to the session.

An optional operation

Parameters
component The component instance
entityMode The entity mode
Returns
  • The property values
Throws
HibernateException Indicates a problem access the property values.

public abstract Type[] getSubtypes ()

Get the types of the component properties

Returns
  • The component property types.

public abstract boolean isEmbedded ()

Is this component embedded? "embedded" indicates that the component is "virtual", that its properties are "flattened" onto its owner

Returns
  • True if this component is embedded; false otherwise.

public abstract boolean isMethodOf (Method method)

Is the given method a member of this component's class?

Parameters
method The method to check
Returns
  • True if the method is a member; false otherwise.

public abstract void setPropertyValues (Object component, Object[] values, EntityMode entityMode)

Inject property values onto the given component instance

An optional operation

Parameters
component The component instance
values The values to inject
entityMode The entity mode
Throws
HibernateException Indicates an issue performing the injection