Codota Logo
StringType.set
Code IndexAdd Codota to your IDE (free)

How to use
set
method
in
org.hibernate.type.StringType

Best Java code snippets using org.hibernate.type.StringType.set (Showing top 5 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
List l =
  • Codota Iconnew LinkedList()
  • Codota IconCollections.emptyList()
  • Codota Iconnew ArrayList()
  • Smart code suggestions by Codota
}
origin: bonitasoft/bonita-engine

@Override
public void nullSafeSet(final PreparedStatement st, final Object value, final int index, final SessionImplementor session) throws HibernateException {
  try {
    if (value == null) {
      st.setNull(index, type.sqlType());
    } else {
      final String identifier = (String) identifierMethod.invoke(value, new Object[0]);
      type.set(st, identifier, index, session);
    }
  } catch (final Exception e) {
    final StringBuilder stb = new StringBuilder("Exception while invoking identifierMethod '");
    stb.append(valueOfMethod.getName());
    stb.append("' of enumeration class '");
    stb.append(enumClass);
    stb.append('\'');
    throw new HibernateException(stb.toString(), e);
  }
}
origin: bonitasoft/bonita-engine

@Override
public void nullSafeSet(final PreparedStatement st, final Object value, final int index, final SessionImplementor session) throws HibernateException {
  try {
    if (value == null) {
      st.setNull(index, type.sqlType());
    } else {
      final String identifier = (String) identifierMethod.invoke(value, new Object[0]);
      type.set(st, identifier, index, session);
    }
  } catch (final Exception e) {
    final StringBuilder stb = new StringBuilder("Exception while invoking identifierMethod '");
    stb.append(valueOfMethod.getName());
    stb.append("' of enumeration class '");
    stb.append(enumClass);
    stb.append('\'');
    throw new HibernateException(stb.toString(), e);
  }
}
origin: mkuthan/example-spring

@SuppressWarnings("rawtypes")
@Override
public void nullSafeSet(PreparedStatement st, Object value, int index, SessionImplementor session)
    throws HibernateException, SQLException {
  JsonHolder jsonHolder = (JsonHolder) value;
  if (jsonHolder != null && jsonHolder.getValue() != null) {
    StringType.INSTANCE.set(st, jsonHolder.getValue().getClass().getName(), index, session);
    TextType.INSTANCE.set(st, jsonSerializationService.toJson(jsonHolder.getValue()), index + 1, session);
  } else {
    StringType.INSTANCE.set(st, null, index, session);
    TextType.INSTANCE.set(st, null, index + 1, session);
  }
}
origin: org.ow2.bonita/bonita-server

@Override
public void nullSafeSet(final PreparedStatement st, final Object value, final int index) throws SQLException {
 try {
  if (value == null) {
   st.setNull(index, type.sqlType());
  } else {
   final String identifier = (String) identifierMethod.invoke(value, new Object[0]);
   type.set(st, identifier, index);
  }
 } catch (final Exception e) {
  final String message = ExceptionManager.getInstance().getFullMessage("bh_GEUT_6", identifierMethod.getName(),
    enumClass);
  throw new HibernateException(message, e);
 }
}
origin: mkuthan/example-spring

@Override
public void nullSafeSet(PreparedStatement st, Object value, int index, SessionImplementor session)
    throws HibernateException, SQLException {
  if (value == null) {
    BigDecimalType.INSTANCE.set(st, null, index, session);
    StringType.INSTANCE.set(st, null, index + 1, session);
  } else {
    Money money = (Money) value;
    BigDecimalType.INSTANCE.set(st, money.getAmount(), index, session);
    StringType.INSTANCE.set(st, money.getCurrencyUnit().getCurrencyCode(), index + 1, session);
  }
}
org.hibernate.typeStringTypeset

Popular methods of StringType

  • nullSafeGet
  • nullSafeSet
  • sqlType
  • getName
  • <init>
  • objectToSQLString
  • get
  • getJavaTypeDescriptor
  • getSqlTypeDescriptor
  • stringToObject
  • toString
  • toString

Popular in Java

  • Updating database using SQL prepared statement
  • getSharedPreferences (Context)
  • compareTo (BigDecimal)
    Compares this BigDecimal with the specified BigDecimal. Two BigDecimal objects that are equal in val
  • getOriginalFilename (MultipartFile)
    Return the original filename in the client's filesystem.This may contain path information depending
  • Font (java.awt)
    The Font class represents fonts, which are used to render text in a visible way. A font provides the
  • Point (java.awt)
    A point representing a location in (x, y) coordinate space, specified in integer precision.
  • List (java.util)
    A List is a collection which maintains an ordering for its elements. Every element in the List has a
  • NoSuchElementException (java.util)
    Thrown when trying to retrieve an element past the end of an Enumeration or Iterator.
  • Notification (javax.management)
  • SSLHandshakeException (javax.net.ssl)
    The exception that is thrown when a handshake could not be completed successfully.
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now