public class MonetaryAmountType extends ImmutableCompositeType<javax.money.MonetaryAmount>
MonetaryAmount
object type onto two columns (amount and currency).
For more details about how to use it, check out this article on vladmihalcea.com.
Modifier and Type | Field and Description |
---|---|
static MonetaryAmountType |
INSTANCE |
Constructor and Description |
---|
MonetaryAmountType() |
MonetaryAmountType(Configuration configuration) |
Modifier and Type | Method and Description |
---|---|
protected javax.money.MonetaryAmount |
get(ResultSet rs,
String[] names,
org.hibernate.engine.spi.SharedSessionContractImplementor session,
Object owner)
Get the column value from the JDBC
ResultSet . |
String[] |
getPropertyNames() |
org.hibernate.type.Type[] |
getPropertyTypes() |
Object |
getPropertyValue(Object component,
int property) |
protected void |
set(PreparedStatement st,
javax.money.MonetaryAmount value,
int amountColumnIndex,
org.hibernate.engine.spi.SharedSessionContractImplementor session)
Set the column value on the provided JDBC
PreparedStatement . |
void |
setPropertyValue(Object component,
int property,
Object value) |
assemble, beforeAssemble, compare, deepCopy, deepCopy, defaultSizes, dictatedSizes, disassemble, disassemble, equals, getColumnSpan, getConfiguration, getHashCode, getHashCode, getName, getRegistrationKeys, getReturnedClass, getSemiResolvedType, hashCode, hydrate, isAnyType, isAssociationType, isCollectionType, isComponentType, isDirty, isDirty, isDirty, isEntityType, isEqual, isEqual, isModified, isMutable, isSame, nullSafeGet, nullSafeGet, nullSafeSet, nullSafeSet, replace, replace, replace, resolve, returnedClass, semiResolve, sqlTypes, toColumnNullness, toLoggableString
public static final MonetaryAmountType INSTANCE
public MonetaryAmountType()
public MonetaryAmountType(Configuration configuration)
public String[] getPropertyNames()
public org.hibernate.type.Type[] getPropertyTypes()
public Object getPropertyValue(Object component, int property) throws org.hibernate.HibernateException
org.hibernate.HibernateException
public void setPropertyValue(Object component, int property, Object value) throws org.hibernate.HibernateException
org.hibernate.HibernateException
protected javax.money.MonetaryAmount get(ResultSet rs, String[] names, org.hibernate.engine.spi.SharedSessionContractImplementor session, Object owner) throws SQLException
ImmutableCompositeType
ResultSet
.get
in class ImmutableCompositeType<javax.money.MonetaryAmount>
rs
- JDBC ResultSet
names
- database column namesession
- current Hibernate Session
owner
- current Hibernate SessionFactoryImplementor
SQLException
- in case of failureprotected void set(PreparedStatement st, javax.money.MonetaryAmount value, int amountColumnIndex, org.hibernate.engine.spi.SharedSessionContractImplementor session) throws SQLException
ImmutableCompositeType
PreparedStatement
.set
in class ImmutableCompositeType<javax.money.MonetaryAmount>
st
- JDBC PreparedStatement
value
- database column valueamountColumnIndex
- database column indexsession
- current Hibernate Session
SQLException
- in case of failureCopyright © 2022. All rights reserved.