org.jbpm.db.hibernate
Class LimitedStringType

java.lang.Object
  extended by org.hibernate.type.AbstractStandardBasicType<T>
      extended by org.hibernate.type.AbstractSingleColumnStandardBasicType<String>
          extended by org.hibernate.type.StringType
              extended by org.jbpm.db.hibernate.LimitedStringType
All Implemented Interfaces:
Serializable, org.hibernate.type.BasicType, org.hibernate.type.DiscriminatorType<String>, org.hibernate.type.IdentifierType<String>, org.hibernate.type.LiteralType<String>, org.hibernate.type.SingleColumnType<String>, org.hibernate.type.StringRepresentableType<String>, org.hibernate.type.Type, org.hibernate.type.XmlRepresentableType<String>, org.hibernate.usertype.ParameterizedType

public class LimitedStringType
extends org.hibernate.type.StringType
implements org.hibernate.usertype.ParameterizedType

Mapping between SQL varchar and Java String that truncates parameter values to column size.

Author:
Alejandro Guizar
See Also:
Serialized Form

Field Summary
 
Fields inherited from class org.hibernate.type.StringType
INSTANCE
 
Constructor Summary
LimitedStringType()
           
 
Method Summary
 int getLimit()
           
 void set(PreparedStatement st, Object value, int index)
           
 void setParameterValues(Properties parameters)
           
 
Methods inherited from class org.hibernate.type.StringType
getName, objectToSQLString, registerUnderJavaType, stringToObject, toString
 
Methods inherited from class org.hibernate.type.AbstractSingleColumnStandardBasicType
nullSafeSet, sqlType
 
Methods inherited from class org.hibernate.type.AbstractStandardBasicType
assemble, beforeAssemble, compare, deepCopy, deepCopy, defaultSizes, dictatedSizes, disassemble, fromString, fromStringValue, fromXMLNode, fromXMLString, get, getColumnSpan, getDefaultSize, getDictatedSize, getHashCode, getHashCode, getJavaTypeDescriptor, getMutabilityPlan, getRegistrationKeys, getReplacement, getReturnedClass, getSemiResolvedType, getSqlTypeDescriptor, hydrate, isAnyType, isAssociationType, isCollectionType, isComponentType, isDirty, isDirty, isDirty, isEntityType, isEqual, isEqual, isModified, isMutable, isSame, isXMLElement, nullSafeGet, nullSafeGet, nullSafeGet, nullSafeGet, nullSafeSet, nullSafeSet, remapSqlTypeDescriptor, replace, replace, resolve, semiResolve, set, setToXMLNode, sqlTypes, toColumnNullness, toLoggableString, toXMLString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.hibernate.type.Type
assemble, beforeAssemble, compare, deepCopy, defaultSizes, dictatedSizes, disassemble, fromXMLNode, getColumnSpan, getHashCode, getHashCode, getReturnedClass, getSemiResolvedType, hydrate, isAnyType, isAssociationType, isCollectionType, isComponentType, isDirty, isDirty, isEntityType, isEqual, isEqual, isModified, isMutable, isSame, isXMLElement, nullSafeGet, nullSafeGet, nullSafeSet, nullSafeSet, replace, replace, resolve, semiResolve, setToXMLNode, sqlTypes, toColumnNullness, toLoggableString
 
Methods inherited from interface org.hibernate.type.SingleColumnType
fromStringValue, get, nullSafeGet, set
 

Constructor Detail

LimitedStringType

public LimitedStringType()
Method Detail

getLimit

public int getLimit()

set

public void set(PreparedStatement st,
                Object value,
                int index)
         throws SQLException
Throws:
SQLException

setParameterValues

public void setParameterValues(Properties parameters)
Specified by:
setParameterValues in interface org.hibernate.usertype.ParameterizedType


Copyright © 2012 JBoss, a division of Red Hat, Inc.. All Rights Reserved.