public static String getString(String val) {

    if (val == null || val.length() > maxStringLength) {
      return val;
    }

    synchronized (stringPool) {
      return stringPool.getOrAddString(val);
    }
  }
  public static BigDecimal getBigDecimal(BigDecimal val) {

    if (val == null) {
      return val;
    }

    synchronized (bigdecimalPool) {
      return (BigDecimal) bigdecimalPool.getOrAddObject(val);
    }
  }
  public static TimestampData getDate(long val) {

    synchronized (datePool) {
      return datePool.getOrAddDate(val);
    }
  }
  public static String getSubString(String val, int start, int limit) {

    synchronized (stringPool) {
      return stringPool.getOrAddString(val.substring(start, limit));
    }
  }
  public static Double getDouble(long val) {

    synchronized (doublePool) {
      return doublePool.getOrAddDouble(val);
    }
  }
  public static Long getLong(long val) {

    synchronized (longPool) {
      return longPool.getOrAddLong(val);
    }
  }
  public static Integer getInt(int val) {

    synchronized (intPool) {
      return intPool.getOrAddInteger(val);
    }
  }