Example usage for org.hibernate.type StandardBasicTypes SHORT

List of usage examples for org.hibernate.type StandardBasicTypes SHORT

Introduction

In this page you can find the example usage for org.hibernate.type StandardBasicTypes SHORT.

Prototype

ShortType SHORT

To view the source code for org.hibernate.type StandardBasicTypes SHORT.

Click Source Link

Document

The standard Hibernate type for mapping Short to JDBC java.sql.Types#SMALLINT SMALLINT .

Usage

From source file:com.liferay.portal.dao.orm.hibernate.ShortType.java

License:Open Source License

public Type[] getPropertyTypes() {
    return new Type[] { StandardBasicTypes.SHORT };
}

From source file:com.liferay.portal.dao.orm.hibernate.ShortType.java

License:Open Source License

public Object nullSafeGet(ResultSet rs, String[] names, SessionImplementor session, Object owner)
        throws SQLException {

    Short value = StandardBasicTypes.SHORT.nullSafeGet(rs, names[0], session);

    if (value == null) {
        return DEFAULT_VALUE;
    } else {//  w  ww .  j  a  va2  s . c  om
        return value;
    }
}

From source file:org.mifos.framework.util.helpers.MoneyCompositeUserType.java

License:Open Source License

@Override
public Type[] getPropertyTypes() {
    return new Type[] { StandardBasicTypes.SHORT, StandardBasicTypes.BIG_DECIMAL };
}