Package propel.core.userTypes

Examples of propel.core.userTypes.UnsignedByte


   * @throws NumberFormatException A number could not be parsed.
   */
  @Validate
  public static UnsignedByte fromBinaryToUInt8(@NotNull final String binary)
  {
    return new UnsignedByte(new BigInteger(binary, 2));
  }
View Full Code Here


   * @throws NumberFormatException A number could not be parsed.
   */
  @Validate
  public static UnsignedByte fromStringToUInt8(@NotNull final String value)
  {
    return new UnsignedByte(value);
  }
View Full Code Here

   * @throws NumberFormatException A number could not be parsed.
   */
  @Validate
  public static UnsignedByte fromHexToUInt8(@NotNull final String hex)
  {
    return new UnsignedByte(new BigInteger(hex, 16));
  }
View Full Code Here

    if (targetType.equals(Period.class))
      return new Period(number.longValue());
    if (targetType.equals(Int128.class))
      return new Int128(number.toString());
    if (targetType.equals(UnsignedByte.class))
      return new UnsignedByte((short) (number.byteValue() & 0xFF));
    if (targetType.equals(UnsignedShort.class))
      return new UnsignedShort((int) (number.shortValue() & 0xFFFF));
    if (targetType.equals(UnsignedInteger.class))
      return new UnsignedInteger((long) (number.intValue() & 0xFFFFFFFF));
    if (targetType.equals(UnsignedLong.class))
View Full Code Here

    if (targetType.equals(Period.class))
      return new Period((long) ch);
    if (targetType.equals(Int128.class))
      return new Int128(Integer.valueOf(ch).toString());
    if (targetType.equals(UnsignedByte.class))
      return new UnsignedByte((byte) ch);
    if (targetType.equals(UnsignedShort.class))
      return new UnsignedShort(ch);
    if (targetType.equals(UnsignedInteger.class))
      return new UnsignedInteger(ch);
    if (targetType.equals(UnsignedLong.class))
View Full Code Here

    if (targetType.equals(Period.class))
      return bool ? new Period(1) : new Period(0);
    if (targetType.equals(Int128.class))
      return bool ? new Int128("1") : new Int128("0");
    if (targetType.equals(UnsignedByte.class))
      return bool ? new UnsignedByte((byte) 1) : new UnsignedByte((byte) 0);
    if (targetType.equals(UnsignedShort.class))
      return bool ? new UnsignedShort(1) : new UnsignedShort(0);
    if (targetType.equals(UnsignedInteger.class))
      return bool ? new UnsignedInteger(1) : new UnsignedInteger(0);
    if (targetType.equals(UnsignedLong.class))
View Full Code Here

    if (targetType.equals(Period.class))
      return StringUtils.parseTimeSpan(str).toPeriod();
    if (targetType.equals(Int128.class))
      return StringUtils.parseInt128(str);
    if (targetType.equals(UnsignedByte.class))
      return new UnsignedByte(str);
    if (targetType.equals(UnsignedShort.class))
      return new UnsignedShort(str);
    if (targetType.equals(UnsignedInteger.class))
      return new UnsignedInteger(str);
    if (targetType.equals(UnsignedLong.class))
View Full Code Here

   * @throws NumberFormatException A number could not be parsed.
   */
  @Validate
  public static UnsignedByte fromBinaryToUInt8(@NotNull final String binary)
  {
    return new UnsignedByte(new BigInteger(binary, 2));
  }
View Full Code Here

   * @throws NumberFormatException A number could not be parsed.
   */
  @Validate
  public static UnsignedByte fromStringToUInt8(@NotNull final String value)
  {
    return new UnsignedByte(value);
  }
View Full Code Here

   * @throws NumberFormatException A number could not be parsed.
   */
  @Validate
  public static UnsignedByte fromHexToUInt8(@NotNull final String hex)
  {
    return new UnsignedByte(new BigInteger(hex, 16));
  }
View Full Code Here

TOP

Related Classes of propel.core.userTypes.UnsignedByte

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.