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.
hasNotNullProperty| 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. |
int |
getPropertyIndex(String propertyName) |
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, getCascadeStyle, getColumnSpan, getConfiguration, getFetchMode, getHashCode, getHashCode, getName, getPropertyNullability, getPropertyValue, getPropertyValues, getPropertyValues, getRegistrationKeys, getReturnedClass, getSemiResolvedType, getSubtypes, hashCode, hasNotNullProperty, hydrate, isAnyType, isAssociationType, isCollectionType, isComponentType, isDirty, isDirty, isDirty, isEmbedded, isEntityType, isEqual, isEqual, isMethodOf, isModified, isMutable, isSame, nullSafeGet, nullSafeGet, nullSafeSet, nullSafeSet, replace, replace, replace, resolve, returnedClass, semiResolve, setPropertyValues, sqlTypes, toColumnNullness, toLoggableStringpublic 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.HibernateExceptionpublic void setPropertyValue(Object component, int property, Object value) throws org.hibernate.HibernateException
org.hibernate.HibernateExceptionprotected javax.money.MonetaryAmount get(ResultSet rs, String[] names, org.hibernate.engine.spi.SharedSessionContractImplementor session, Object owner) throws SQLException
ImmutableCompositeTypeResultSet.get in class ImmutableCompositeType<javax.money.MonetaryAmount>rs - JDBC ResultSetnames - database column namesession - current Hibernate Sessionowner - current Hibernate SessionFactoryImplementorSQLException - in case of failureprotected void set(PreparedStatement st, javax.money.MonetaryAmount value, int amountColumnIndex, org.hibernate.engine.spi.SharedSessionContractImplementor session) throws SQLException
ImmutableCompositeTypePreparedStatement.set in class ImmutableCompositeType<javax.money.MonetaryAmount>st - JDBC PreparedStatementvalue - database column valueamountColumnIndex - database column indexsession - current Hibernate SessionSQLException - in case of failurepublic int getPropertyIndex(String propertyName)
Copyright © 2023. All rights reserved.