com.amazonaws.services.simpledb.util

## クラス SimpleDBUtils

- java.lang.Object
- - com.amazonaws.services.simpledb.util.SimpleDBUtils

-     public class SimpleDBUtils
      extends java.lang.Object

  Provides collection of static functions for conversion of various values into strings that may be compared lexicographically.

- - ### コンストラクタの概要

    コンストラクタ
    コンストラクタと説明
    `SimpleDBUtils()`

  - ### メソッドの概要

    メソッド
    修飾子とタイプ | メソッドと説明
    --- | ---
    `static java.util.Date` | `decodeDate(java.lang.String value)` Decodes date value from the string representation created using encodeDate(..) function.
    `static float` | `decodeRealNumberRangeFloat(java.lang.String value, int maxDigitsRight, int offsetValue)` Decodes float value from the string representation that was created by using encodeRealNumberRange(..) function.
    `static int` | `decodeRealNumberRangeInt(java.lang.String value, int offsetValue)` Decodes integer value from the string representation that was created by using encodeRealNumberRange(..) function.
    `static long` | `decodeRealNumberRangeLong(java.lang.String value, long offsetValue)` Decodes a long value from the string representation that was created by using encodeRealNumberRange(..) function.
    `static float` | `decodeZeroPaddingFloat(java.lang.String value)` Decodes zero-padded positive float value from the string representation
    `static int` | `decodeZeroPaddingInt(java.lang.String value)` Decodes zero-padded positive integer value from the string representation
    `static long` | `decodeZeroPaddingLong(java.lang.String value)` Decodes a zero-padded positive long value from the string representation
    `static java.lang.String` | `encodeDate(java.util.Date date)` Encodes date value into string format that can be compared lexicographically
    `static java.lang.String` | `encodeRealNumberRange(float number, int maxDigitsLeft, int maxDigitsRight, int offsetValue)` Encodes real float value into a string by offsetting and zero-padding number up to the specified number of digits.
    `static java.lang.String` | `encodeRealNumberRange(int number, int maxNumDigits, int offsetValue)` Encodes real integer value into a string by offsetting and zero-padding number up to the specified number of digits.
    `static java.lang.String` | `encodeRealNumberRange(long number, int maxNumDigits, long offsetValue)` Encodes a positive or negative long value into a string by offsetting and zero-padding the number up to the specified number of digits.
    `static java.lang.String` | `encodeZeroPadding(float number, int maxNumDigits)` Encodes positive float value into a string by zero-padding number up to the specified number of digits
    `static java.lang.String` | `encodeZeroPadding(int number, int maxNumDigits)` Encodes positive integer value into a string by zero-padding number up to the specified number of digits.
    `static java.lang.String` | `encodeZeroPadding(long number, int maxNumDigits)` Encodes positive long value into a string by zero-padding the value up to the specified number of digits.
    `static java.lang.String` | `quoteName(java.lang.String name)` Quotes and escapes an attribute name or domain name by wrapping it with backticks and escaping any backticks inside the name.
    `static java.lang.String` | `quoteValue(java.lang.String value)` Quotes and escapes an attribute value by wrapping it with single quotes and escaping any single quotes inside the value.
    `static java.lang.String` | `quoteValues(java.util.Collection<java.lang.String> values)` Quotes and escapes a list of values so that they can be used in a SimpleDB query.
    `protected static java.lang.String` | `replaceChar(java.lang.String value, java.lang.String termToFind, java.lang.String replacementTerm)`

    - ### クラスから継承されたメソッド java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### コンストラクタの詳細

    - #### SimpleDBUtils

          public SimpleDBUtils()

  - ### メソッドの詳細

    - #### encodeZeroPadding

          public static java.lang.String encodeZeroPadding(int number,
                                           int maxNumDigits)

      Encodes positive integer value into a string by zero-padding number up to the specified number of digits.
      パラメータ:
        `number` - positive integer to be encoded
        `maxNumDigits` - maximum number of digits in the largest value in the data set
      戻り値:
        string representation of the zero-padded integer

    - #### encodeZeroPadding

          public static java.lang.String encodeZeroPadding(long number,
                                           int maxNumDigits)

      Encodes positive long value into a string by zero-padding the value up to the specified number of digits.
      パラメータ:
        `number` - positive long to be encoded
        `maxNumDigits` - maximum number of digits in the largest value in the data set
      戻り値:
        string representation of the zero-padded long

    - #### encodeZeroPadding

          public static java.lang.String encodeZeroPadding(float number,
                                           int maxNumDigits)

      Encodes positive float value into a string by zero-padding number up to the specified number of digits
      パラメータ:
        `number` - positive float value to be encoded
        `maxNumDigits` - maximum number of digits preceding the decimal point in the largest value in the data set
      戻り値:
        string representation of the zero-padded float value

    - #### decodeZeroPaddingInt

          public static int decodeZeroPaddingInt(java.lang.String value)

      Decodes zero-padded positive integer value from the string representation
      パラメータ:
        `value` - zero-padded string representation of the integer
      戻り値:
        original integer value

    - #### decodeZeroPaddingLong

          public static long decodeZeroPaddingLong(java.lang.String value)

      Decodes a zero-padded positive long value from the string representation
      パラメータ:
        `value` - zero-padded string representation of the long
      戻り値:
        original long value

    - #### decodeZeroPaddingFloat

          public static float decodeZeroPaddingFloat(java.lang.String value)

      Decodes zero-padded positive float value from the string representation
      パラメータ:
        `value` - zero-padded string representation of the float value
      戻り値:
        original float value

    - #### encodeRealNumberRange

          public static java.lang.String encodeRealNumberRange(int number,
                                               int maxNumDigits,
                                               int offsetValue)

      Encodes real integer value into a string by offsetting and zero-padding number up to the specified number of digits. Use this encoding method if the data range set includes both positive and negative values.
      パラメータ:
        `number` - integer to be encoded
        `maxNumDigits` - maximum number of digits in the largest absolute value in the data set
        `offsetValue` - offset value, has to be greater than absolute value of any negative number in the data set.
      戻り値:
        string representation of the integer

    - #### encodeRealNumberRange

          public static java.lang.String encodeRealNumberRange(long number,
                                               int maxNumDigits,
                                               long offsetValue)

      Encodes a positive or negative long value into a string by offsetting and zero-padding the number up to the specified number of digits. Use this encoding method if the data set includes both positive and negative values.
      パラメータ:
        `number` - positive or negative long value to be encoded
        `maxNumDigits` - maximum number of digits in the largest absolute value in the data set
        `offsetValue` - offset value, has to be greater than absolute value of any negative number in the data set.
      戻り値:
        string representation of the long

    - #### encodeRealNumberRange

          public static java.lang.String encodeRealNumberRange(float number,
                                               int maxDigitsLeft,
                                               int maxDigitsRight,
                                               int offsetValue)

      Encodes real float value into a string by offsetting and zero-padding number up to the specified number of digits. Use this encoding method if the data range set includes both positive and negative values.
      パラメータ:
        `number` - float to be encoded
        `maxDigitsLeft` - maximum number of digits left of the decimal point in the largest absolute value in the data set
        `maxDigitsRight` - maximum number of digits right of the decimal point in the largest absolute value in the data set, i.e. precision
        `offsetValue` - offset value, has to be greater than absolute value of any negative number in the data set.
      戻り値:
        string representation of the integer

    - #### decodeRealNumberRangeInt

          public static int decodeRealNumberRangeInt(java.lang.String value,
                                     int offsetValue)

      Decodes integer value from the string representation that was created by using encodeRealNumberRange(..) function.
      パラメータ:
        `value` - string representation of the integer value
        `offsetValue` - offset value that was used in the original encoding
      戻り値:
        original integer value

    - #### decodeRealNumberRangeLong

          public static long decodeRealNumberRangeLong(java.lang.String value,
                                       long offsetValue)

      Decodes a long value from the string representation that was created by using encodeRealNumberRange(..) function.
      パラメータ:
        `value` - string representation of the long value
        `offsetValue` - offset value that was used in the original encoding
      戻り値:
        original long value

    - #### decodeRealNumberRangeFloat

          public static float decodeRealNumberRangeFloat(java.lang.String value,
                                         int maxDigitsRight,
                                         int offsetValue)

      Decodes float value from the string representation that was created by using encodeRealNumberRange(..) function.
      パラメータ:
        `value` - string representation of the integer value
        `maxDigitsRight` - maximum number of digits left of the decimal point in the largest absolute value in the data set (must be the same as the one used for encoding).
        `offsetValue` - offset value that was used in the original encoding
      戻り値:
        original float value

    - #### encodeDate

          public static java.lang.String encodeDate(java.util.Date date)

      Encodes date value into string format that can be compared lexicographically
      パラメータ:
        `date` - date value to be encoded
      戻り値:
        string representation of the date value

    - #### decodeDate

          public static java.util.Date decodeDate(java.lang.String value)
                                           throws java.text.ParseException

      Decodes date value from the string representation created using encodeDate(..) function.
      パラメータ:
        `value` - string representation of the date value
      戻り値:
        original date value
      例外:
        `java.text.ParseException`

    - #### quoteValues

          public static java.lang.String quoteValues(java.util.Collection<java.lang.String> values)

      Quotes and escapes a list of values so that they can be used in a SimpleDB query.
      パラメータ:
        `values` - The collection of attribute values that will be quoted, escaped, and included in the returned string list.
      戻り値:
        A string representation of the list of specified values, with individual values properly quoted and escaped.

    - #### quoteValue

          public static java.lang.String quoteValue(java.lang.String value)

      Quotes and escapes an attribute value by wrapping it with single quotes and escaping any single quotes inside the value.
      パラメータ:
        `value` - The attribute value to quote and escape.
      戻り値:
        The properly quoted and escaped attribute value, ready to be used in a SimpleDB select query.

    - #### quoteName

          public static java.lang.String quoteName(java.lang.String name)

      Quotes and escapes an attribute name or domain name by wrapping it with backticks and escaping any backticks inside the name.
      パラメータ:
        `name` - The attribute name or domain name to quote and escape.
      戻り値:
        The properly quoted and escaped attribute name or domain name, ready to be used in a SimpleDB select query.

    - #### replaceChar

          protected static java.lang.String replaceChar(java.lang.String value,
                                     java.lang.String termToFind,
                                     java.lang.String replacementTerm)