java.lang.Object
com.gpudb.RecordBase
All Implemented Interfaces:
Direct Known Subclasses:
Abstract class that provides default implementations of most methods of
Record. Derived classes must at a minimum implement the Record.getType(), Record.get(int), and Record.put(int, Object) methods.Method Summary
Modifier and TypeMethodDescriptionbooleanReturns the value of the specified field.getArray(int index) For string columns with array property, return a native Java array of the appropriate type: Boolean[], Integer[], Long[], Float[], Double[], BigInteger[], or String[].For string columns with array property, return a native Java array of the appropriate type: Boolean[], Integer[], Long[], Float[], Double[], BigInteger[], or String[].getBytes(int index) Returns the value of the specified field cast to aByteBuffer.Returns the value of the specified field cast to aByteBuffer.Returns aMapof field names to values that is bound to the record (updates made to the map are reflected in the record and vice versa).getDouble(int index) Returns the value of the specified field cast to aDouble.Returns the value of the specified field cast to aDouble.getFloat(int index) Returns the value of the specified field cast to aFloat.Returns the value of the specified field cast to aFloat.getInt(int index) Returns the value of the specified field cast to aInteger.Returns the value of the specified field cast to aInteger.getJson(int index) For string columns with JSON property, return a Java Map representing the JSON object.For string columns with JSON property, return a Java Map representing the JSON object.getLong(int index) Returns the value of the specified field cast to aLong.Returns the value of the specified field cast to aLong.org.apache.avro.SchemaReturns the Avro record schema of the record.getString(int index) Returns the value of the specified field cast to aString.Returns the value of the specified field cast to aString.float[]getVector(int index) For byte columns with a vector property, return a native Java array of float.float[]For byte columns with a vector property, return a native Java array of float.inthashCode()voidSets the value of the specified field.voidFor string columns with array property, parse the value parameter which may be a String, List<?>, int[], Integer[], long[], Long[], float[], Float[], double[], Double[].voidFor string columns with array property, parse the value parameter which may be a String, List<?>, int[], Integer[], long[], Long[], float[], Float[], double[], Double[].voidFor Byte columns, parse the value parameter which may be a ByteBuffer or byte[].voidFor Byte columns, parse the value parameter which may be a ByteBuffer or byte[].voidputDateTime(int index, Object value) For string columns with date, time, or datetime property, parse the string and convert to the appropriate Kinetica format using the system timezone.voidputDateTime(int index, Object value, TimeZone timezone) For string columns with date, time, or datetime property, parse the string and convert to the appropriate Kinetica format using the given timezone (system timezone if none given).voidputDateTime(String name, Object value) For string columns with date, time, or datetime property, parse the string and convert to the appropriate Kinetica format using the system timezone.voidputDateTime(String name, Object value, TimeZone timezone) For string columns with date, time, or datetime property, parse the string and convert to the appropriate Kinetica format using the given timezone (system timezone if none given).voidputDecimal(String name, Object value) voidFor String columns with json property, parse the value parameter which may be a String, or Map<String, String>.voidFor String columns with json property, parse the value parameter which may be a String, or Map<String, String>.voidFor bytes columns with vector property, parse the value parameter which may be a string, float[], Float[] or List<Float>.voidFor bytes columns with vector property, parse the value property which may be a string, float[], Float[] or List<Float>.toString()
Method Details
getArray
For string columns with array property, return a native Java array of the appropriate type: Boolean[], Integer[], Long[], Float[], Double[], BigInteger[], or String[]. For binary columns with vector property, return float[].Parameters:name- The name of the column.Returns:a native Java array of the appropriate type for the given column nameThrows:GPUdbException- If an error occurs during the operation.com.fasterxml.jackson.core.JsonProcessingExceptioncom.fasterxml.jackson.databind.JsonMappingExceptiongetArray
For string columns with array property, return a native Java array of the appropriate type: Boolean[], Integer[], Long[], Float[], Double[], BigInteger[], or String[]. For binary columns with vector property, return float[].Parameters:index- The index of the column.Returns:a native Java array of the appropriate type for the given column indexThrows:GPUdbException- If an error occurs during the operation.com.fasterxml.jackson.core.JsonProcessingExceptioncom.fasterxml.jackson.databind.JsonMappingExceptiongetBytes
Description copied from interface:RecordReturns the value of the specified field cast to aByteBuffer. If the field is not of the correct type an exception will be thrown.getBytes
Description copied from interface:RecordReturns the value of the specified field cast to aByteBuffer. If the field is not of the correct type an exception will be thrown.getJson
For string columns with JSON property, return a Java Map representing the JSON object.Parameters:name- The name of the column.Returns:a native Java map of the appropriate type for the given column nameThrows:GPUdbException- If an error occurs during the operation.com.fasterxml.jackson.core.JsonProcessingExceptioncom.fasterxml.jackson.databind.JsonMappingExceptiongetJson
For string columns with JSON property, return a Java Map representing the JSON object.Parameters:index- The index of the column.Returns:a native Java map of the appropriate type for the given column indexThrows:GPUdbException- If an error occurs during the operation.com.fasterxml.jackson.core.JsonProcessingExceptioncom.fasterxml.jackson.databind.JsonMappingExceptiongetVector
For byte columns with a vector property, return a native Java array of float.Parameters:name- The name of the column.Returns:an array of floats for the given vector column nameThrows:GPUdbException- If an error occurs during the operation.com.fasterxml.jackson.core.JsonProcessingExceptioncom.fasterxml.jackson.databind.JsonMappingExceptiongetVector
For byte columns with a vector property, return a native Java array of float.Parameters:index- The index of the column.Returns:an array of floats for the given vector column indexThrows:GPUdbException- If an error occurs during the operation.com.fasterxml.jackson.core.JsonProcessingExceptioncom.fasterxml.jackson.databind.JsonMappingExceptionputArray
For string columns with array property, parse the value parameter which may be a String, List<?>, int[], Integer[], long[], Long[], float[], Float[], double[], Double[]. If the value is not of a relevant type, throw an error.Parameters:name- The name of the column.value- The value to be parsed (based on the given column’s type).Throws:GPUdbException- if an error occurs during the operation.putArray
For string columns with array property, parse the value parameter which may be a String, List<?>, int[], Integer[], long[], Long[], float[], Float[], double[], Double[]. If the value is not of a relevant type, throw an error.Parameters:index- The index of the column.value- The value to be parsed (based on the given column’s type).Throws:GPUdbException- if an error occurs during the operation.putBytes
For Byte columns, parse the value parameter which may be a ByteBuffer or byte[]. If the value is not of a relevant type, throw an error.Parameters:name- The name of the column.value- The value to be set.Throws:GPUdbException- if an error occurs during the operation.putBytes
For Byte columns, parse the value parameter which may be a ByteBuffer or byte[]. If the value is not of a relevant type, throw an error.Parameters:index- The index of the column.value- The value to be set.Throws:GPUdbException- if an error occurs during the operation.putDateTime
For string columns with date, time, or datetime property, parse the string and convert to the appropriate Kinetica format using the system timezone. If the column is not of a relevant type, set the value without any parsing (so that any string or other typed values can be set using this method without resorting to first check the column’s type before calling it). Caveat is that due to string manipulation, this is considerably slower thanput(java.lang.String, java.lang.Object). So, use this method only if you know that a non-Kinetica date/time/datetime format is being used.Parameters:name- The name of the column.value- The value to be parsed (based on the given column’s type).Throws:GPUdbException- if an error occurs during the operation.putDateTime
For string columns with date, time, or datetime property, parse the string and convert to the appropriate Kinetica format using the given timezone (system timezone if none given). If the column is not of a relevant type, set the value without any parsing (so that any string or other typed values can be set using this method without resorting to first check the column’s type before calling it). Caveat is that due to string manipulation, this is considerably slower thanput(java.lang.String, java.lang.Object). So, use this method only if you know that a non-Kinetica date/time/datetime format is being used.Parameters:name- The name of the column.value- The value to be parsed (based on the given column’s type).timezone- Optional parameter specifying the timezone to use for parsing the given value. If null, the system timezone is used.Throws:GPUdbException- if an error occurs during the operation.putDateTime
For string columns with date, time, or datetime property, parse the string and convert to the appropriate Kinetica format using the system timezone. If the column is not of a relevant type, throw an error. Caveat is that due to string manipulation, this is considerably slower thanput(java.lang.String, java.lang.Object). So, use this method only if you know that a non-Kinetica date/time/datetime format is being used.Parameters:index- The index of the column.value- The value to be parsed (based on the given column’s type).Throws:GPUdbException- if an error occurs during the operation.putDateTime
For string columns with date, time, or datetime property, parse the string and convert to the appropriate Kinetica format using the given timezone (system timezone if none given). If the column is not of a relevant type, set the value without any parsing (so that any string or other typed values can be set using this method without resorting to first check the column’s type before calling it). Caveat is that due to string manipulation, this is considerably slower thanput(java.lang.String, java.lang.Object). So, use this method only if you know that a non-Kinetica date/time/datetime format is being used. The following patterns are accepted for date and datetime columns: 1) yyyy[-][/][.]MM[-][/][.]dd[ ][‘T’][HH:mm[:ss][.S[S][S][S][S][S]][ ][XXX][Z][z][VV][x]] 2) MM[-][/][.]dd[-][/][.]yyyy[ ][‘T’][HH:mm[:ss][.S[S][S][S][S][S]][ ][XXX][Z][z][VV][x]] 3) dd[-][/][.]MM[-][/][.]yyyy[ ][‘T’][HH:mm[:ss][.S[S][S][S][S][S]][ ][XXX][Z][z][VV][x]] The following pattern is accepted by time-type columns: HH:mm[:ss][.S[S][S][S][S][S]][ ][XXX][Z][z][VV][x] In other words, the date component can be any of YMD, MDY, or DMY pattern withh ’-’, ’.’, or ’/’ as the separator. And, the time component must have hours and minutes, but can optionally have seconds, fraction of a second (up to six digits) and some form of a timezone identifier.Parameters:index- The index of the column.value- The value to be parsed (based on the given column’s type).timezone- Optional parameter specifying the timezone to use for parsing the given value. If null, the system timezone is used.Throws:GPUdbException- if an error occurs during the operation.putJson
For String columns with json property, parse the value parameter which may be a String, or Map<String, String>. If the column is not of a relevant type, throw an error.Parameters:name- The name of the column.value- The value to be parsed (based on the given column’s type).Throws:GPUdbException- if an error occurs during the operation.putJson
For String columns with json property, parse the value parameter which may be a String, or Map<String, String>. If the column is not of a relevant type, throw an error.Parameters:index- The index of the column.value- The value to be parsed (based on the given column’s type).Throws:GPUdbException- if an error occurs during the operation.putVector
For bytes columns with vector property, parse the value property which may be a string, float[], Float[] or List<Float>. If the column is not of a relevant type, throw an error.Parameters:name- The name of the column.value- The value to be parsed (based on the given column’s type).Throws:GPUdbException- if an error occurs during the operation.putVector
For bytes columns with vector property, parse the value parameter which may be a string, float[], Float[] or List<Float>. If the column is not of a relevant type, throw an error.Parameters:index- The index of the column.value- The value to be parsed (based on the given column’s type).Throws:GPUdbException- if an error occurs during the operation.