org.jbpm.db.hibernate
Class LimitedTextType

java.lang.Object
  extended by org.hibernate.type.AbstractType
      extended by org.hibernate.type.NullableType
          extended by org.hibernate.type.ImmutableType
              extended by org.hibernate.type.TextType
                  extended by org.jbpm.db.hibernate.LimitedTextType
All Implemented Interfaces:
Serializable, org.hibernate.type.Type, org.hibernate.usertype.ParameterizedType

public class LimitedTextType
extends org.hibernate.type.TextType
implements org.hibernate.usertype.ParameterizedType

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

Author:
Alejandro Guizar
See Also:
Serialized Form

Constructor Summary
LimitedTextType()
           
 
Method Summary
 int getLimit()
           
 void set(PreparedStatement st, Object value, int index)
           
 void setParameterValues(Properties parameters)
           
 
Methods inherited from class org.hibernate.type.TextType
fromStringValue, get, getName, getReturnedClass, sqlType, toString
 
Methods inherited from class org.hibernate.type.ImmutableType
deepCopy, isMutable, replace
 
Methods inherited from class org.hibernate.type.NullableType
fromXMLNode, fromXMLString, getColumnSpan, isDirty, isEqual, isEqual, nullSafeGet, nullSafeGet, nullSafeGet, nullSafeGet, nullSafeSet, nullSafeSet, nullSafeSet, nullSafeToString, setToXMLNode, sqlTypes, toColumnNullness, toLoggableString, toXMLString
 
Methods inherited from class org.hibernate.type.AbstractType
assemble, beforeAssemble, compare, disassemble, getHashCode, getHashCode, getSemiResolvedType, hydrate, isAnyType, isAssociationType, isCollectionType, isComponentType, isDirty, isEntityType, isEqual, isModified, isSame, isXMLElement, replace, replaceNode, resolve, semiResolve
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LimitedTextType

public LimitedTextType()
Method Detail

getLimit

public int getLimit()

set

public void set(PreparedStatement st,
                Object value,
                int index)
         throws SQLException
Overrides:
set in class org.hibernate.type.TextType
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.