public abstract class CaseClassTypeInfo<T extends scala.Product> extends TupleTypeInfoBase<T>
CompositeType.FlatFieldDescriptor, CompositeType.InvalidFieldReferenceException, CompositeType.TypeComparatorBuilder<T>
types
Constructor and Description |
---|
CaseClassTypeInfo(Class<T> clazz,
TypeInformation<?>[] typeParamTypeInfos,
scala.collection.Seq<TypeInformation<?>> fieldTypes,
scala.collection.Seq<String> fieldNames) |
Modifier and Type | Method and Description |
---|---|
boolean |
canEqual(Object obj)
Returns true if the given object can be equaled with this object.
|
CompositeType.TypeComparatorBuilder<T> |
createTypeComparatorBuilder() |
boolean |
equals(Object obj) |
scala.collection.Seq<String> |
fieldNames() |
int |
getFieldIndex(String fieldName)
Returns the field index of the composite field of the given name.
|
int[] |
getFieldIndices(String[] fields) |
String[] |
getFieldNames()
Returns the names of the composite fields of this type.
|
void |
getFlatFields(String fieldExpression,
int offset,
List<CompositeType.FlatFieldDescriptor> result)
Computes the flat field descriptors for the given field expression with the given offset.
|
Map<String,TypeInformation<?>> |
getGenericParameters()
Optional method for giving Flink's type extraction system information about the mapping
of a generic type parameter to the type information of a subtype.
|
<X> TypeInformation<X> |
getTypeAt(String fieldExpression)
Returns the type of the (nested) field at the given field expression position.
|
int |
hashCode() |
boolean |
isCaseClass() |
String |
toString() |
TypeInformation<?>[] |
typeParamTypeInfos() |
getArity, getTotalFields, getTypeAt, hasDeterministicFieldOrder, isBasicType, isTupleType
createComparator, getFlatFields, getTypeClass, hasField, isKeyType, isSortKeyType
createSerializer, of, of
public CaseClassTypeInfo(Class<T> clazz, TypeInformation<?>[] typeParamTypeInfos, scala.collection.Seq<TypeInformation<?>> fieldTypes, scala.collection.Seq<String> fieldNames)
public TypeInformation<?>[] typeParamTypeInfos()
public scala.collection.Seq<String> fieldNames()
public Map<String,TypeInformation<?>> getGenericParameters()
TypeInformation
Tuple2
would look like this:
Map m = new HashMap();
m.put("T0", this.getTypeAt(0));
m.put("T1", this.getTypeAt(1));
return m;
getGenericParameters
in class TypeInformation<T extends scala.Product>
public int[] getFieldIndices(String[] fields)
public void getFlatFields(String fieldExpression, int offset, List<CompositeType.FlatFieldDescriptor> result)
CompositeType
getFlatFields
in class TupleTypeInfoBase<T extends scala.Product>
fieldExpression
- The field expression for which the FlatFieldDescriptors are computed.offset
- The offset to use when computing the positions of the flat fields.result
- The list into which all flat field descriptors are inserted.public <X> TypeInformation<X> getTypeAt(String fieldExpression)
CompositeType
getTypeAt
in class TupleTypeInfoBase<T extends scala.Product>
fieldExpression
- The field expression for which the field of which the type is returned.public String[] getFieldNames()
CompositeType
getFieldNames
in class CompositeType<T extends scala.Product>
public int getFieldIndex(String fieldName)
CompositeType
getFieldIndex
in class CompositeType<T extends scala.Product>
public CompositeType.TypeComparatorBuilder<T> createTypeComparatorBuilder()
createTypeComparatorBuilder
in class CompositeType<T extends scala.Product>
public String toString()
toString
in class TupleTypeInfoBase<T extends scala.Product>
public boolean isCaseClass()
isCaseClass
in class TupleTypeInfoBase<T extends scala.Product>
public boolean equals(Object obj)
equals
in class TupleTypeInfoBase<T extends scala.Product>
public int hashCode()
hashCode
in class TupleTypeInfoBase<T extends scala.Product>
public boolean canEqual(Object obj)
TypeInformation
canEqual
in class TupleTypeInfoBase<T extends scala.Product>
obj
- Object which wants to take part in the equality relationCopyright © 2014–2018 The Apache Software Foundation. All rights reserved.