@Experimental public class BeamRecordType extends java.lang.Object implements java.io.Serializable
BeamRecordType describes the fields in BeamRecord, extra checking can be added
by overwriting validateValueType(int, Object).| Constructor and Description |
|---|
BeamRecordType(java.util.List<java.lang.String> fieldNames,
java.util.List<Coder> fieldCoders)
Create a
BeamRecordType with a name and Coder for each field. |
| Modifier and Type | Method and Description |
|---|---|
int |
findIndexOfField(java.lang.String fieldName)
Find the index of a given field.
|
int |
getFieldCount()
Return the count of fields.
|
java.lang.String |
getFieldNameByIndex(int index)
Return the name of field by index.
|
java.util.List<java.lang.String> |
getFieldNames()
Returns an immutable list of field names.
|
BeamRecordCoder |
getRecordCoder()
Return the coder for
BeamRecord, which wraps fieldCoders for each field. |
java.lang.String |
toString() |
void |
validateValueType(int index,
java.lang.Object fieldValue)
Validate input fieldValue for a field.
|
public BeamRecordType(java.util.List<java.lang.String> fieldNames,
java.util.List<Coder> fieldCoders)
BeamRecordType with a name and Coder for each field.public void validateValueType(int index,
java.lang.Object fieldValue)
throws java.lang.IllegalArgumentException
java.lang.IllegalArgumentException - throw exception when the validation fails.public BeamRecordCoder getRecordCoder()
BeamRecord, which wraps fieldCoders for each field.public java.util.List<java.lang.String> getFieldNames()
public java.lang.String getFieldNameByIndex(int index)
public int findIndexOfField(java.lang.String fieldName)
public int getFieldCount()
public java.lang.String toString()
toString in class java.lang.Object