Package org.hibernate.type.format
Class StringJsonDocumentReader
java.lang.Object
org.hibernate.type.format.StringJsonDocument
org.hibernate.type.format.StringJsonDocumentReader
- All Implemented Interfaces:
Iterator<JsonDocumentItemType>,JsonDocumentReader
Implementation of
JsonDocumentReader for String representation of JSON objects.-
Field Summary
Fields inherited from class org.hibernate.type.format.StringJsonDocument
processingStates -
Constructor Summary
ConstructorsConstructorDescriptionCreates a newStringJsonDocumentReader -
Method Summary
Modifier and TypeMethodDescriptionGets value as BigDecimalGets value as BigIntegerbooleanGets value as booleanbyteGets value as bytedoubleGets value as doublefloatGets value as floatintGets value as intlongGets value as longGets the key name once JsonDocumentItemType.VALUE_KEY has been receivedshortGets value as shortGets value as String<T> TgetValue(JavaType<T> javaType, WrapperOptions options) Gets value as JavaTypebooleanhasNext()next()Returns the next item.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.util.Iterator
forEachRemaining, removeMethods inherited from interface org.hibernate.type.format.JsonDocumentReader
forEachRemaining
-
Constructor Details
-
StringJsonDocumentReader
Creates a newStringJsonDocumentReader- Parameters:
json- the JSON String. of the object to be parsed.
-
-
Method Details
-
hasNext
public boolean hasNext()- Specified by:
hasNextin interfaceIterator<JsonDocumentItemType>
-
next
Returns the next item.- Specified by:
nextin interfaceIterator<JsonDocumentItemType>- Returns:
- the item
- Throws:
NoSuchElementException- no more item availableIllegalStateException- not a well-formed JSON string.
-
getObjectKeyName
Description copied from interface:JsonDocumentReaderGets the key name once JsonDocumentItemType.VALUE_KEY has been received- Specified by:
getObjectKeyNamein interfaceJsonDocumentReader- Returns:
- the name
-
getStringValue
Description copied from interface:JsonDocumentReaderGets value as String- Specified by:
getStringValuein interfaceJsonDocumentReader- Returns:
- the value.
-
getBigDecimalValue
Description copied from interface:JsonDocumentReaderGets value as BigDecimal- Specified by:
getBigDecimalValuein interfaceJsonDocumentReader- Returns:
- the value.
-
getBigIntegerValue
Description copied from interface:JsonDocumentReaderGets value as BigInteger- Specified by:
getBigIntegerValuein interfaceJsonDocumentReader- Returns:
- the value.
-
getDoubleValue
public double getDoubleValue()Description copied from interface:JsonDocumentReaderGets value as double- Specified by:
getDoubleValuein interfaceJsonDocumentReader- Returns:
- the value.
-
getFloatValue
public float getFloatValue()Description copied from interface:JsonDocumentReaderGets value as float- Specified by:
getFloatValuein interfaceJsonDocumentReader- Returns:
- the value.
-
getLongValue
public long getLongValue()Description copied from interface:JsonDocumentReaderGets value as long- Specified by:
getLongValuein interfaceJsonDocumentReader- Returns:
- the value.
-
getIntegerValue
public int getIntegerValue()Description copied from interface:JsonDocumentReaderGets value as int- Specified by:
getIntegerValuein interfaceJsonDocumentReader- Returns:
- the value.
-
getShortValue
public short getShortValue()Description copied from interface:JsonDocumentReaderGets value as short- Specified by:
getShortValuein interfaceJsonDocumentReader- Returns:
- the value.
-
getByteValue
public byte getByteValue()Description copied from interface:JsonDocumentReaderGets value as byte- Specified by:
getByteValuein interfaceJsonDocumentReader- Returns:
- the value.
-
getBooleanValue
public boolean getBooleanValue()Description copied from interface:JsonDocumentReaderGets value as boolean- Specified by:
getBooleanValuein interfaceJsonDocumentReader- Returns:
- the value.
-
getValue
Description copied from interface:JsonDocumentReaderGets value as JavaType- Specified by:
getValuein interfaceJsonDocumentReader- Returns:
- the value.
-