Class UserDefinedField<T extends DataType>
- java.lang.Object
-
- com.apple.foundationdb.relational.api.fluentsql.expression.UserDefinedField<T>
-
- Type Parameters:
T
- the type of the field.
- All Implemented Interfaces:
ComparableExpressionTrait<T,Expression<T>>
,Expression<T>
,Field<T>
,ScalarExpression<T>
@API(EXPERIMENTAL) public class UserDefinedField<T extends DataType> extends java.lang.Object implements Field<T>
This represents a user-defined field, this allows the user to explicitly set the field name and type without resorting to any form of metadata resolution.
This could be useful for testing, and referring to qualified fields with subquery aliases for example.
-
-
Constructor Summary
Constructors Constructor Description UserDefinedField(T type, java.lang.Iterable<java.lang.String> parts)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description <R,C>
Raccept(FluentVisitor<R,C> visitor, C context)
Mixins.BooleanField
asBoolean()
Mixins.DoubleField
asDouble()
Mixins.FloatField
asFloat()
Mixins.IntField
asInt()
Mixins.LongField
asLong()
Mixins.StringField
asString()
boolean
equals(java.lang.Object other)
java.lang.String
getName()
java.lang.Iterable<java.lang.String>
getParts()
T
getType()
int
hashCode()
Field<?>
subField(DataType type, java.lang.String name)
Field<?>
subField(java.lang.String part)
java.lang.String
toString()
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface com.apple.foundationdb.relational.api.fluentsql.expression.ComparableExpressionTrait
greaterThan, greaterThanOrEquals, greatest, isEqualTo, lessThan, lessThanOrEqual, notEquals
-
Methods inherited from interface com.apple.foundationdb.relational.api.fluentsql.expression.Field
asBoolean, asDouble, asFloat, asInt, asLong, asString
-
Methods inherited from interface com.apple.foundationdb.relational.api.fluentsql.expression.ScalarExpression
isNotNull, isNull
-
-
-
-
Constructor Detail
-
UserDefinedField
public UserDefinedField(@Nonnull T type, @Nonnull java.lang.Iterable<java.lang.String> parts)
-
-
Method Detail
-
accept
@Nullable public <R,C> R accept(@Nonnull FluentVisitor<R,C> visitor, @Nonnull C context)
- Specified by:
accept
in interfaceExpression<T extends DataType>
-
getParts
@Nonnull public java.lang.Iterable<java.lang.String> getParts()
-
getType
@Nonnull public T getType()
- Specified by:
getType
in interfaceComparableExpressionTrait<T extends DataType,Expression<T extends DataType>>
- Specified by:
getType
in interfaceExpression<T extends DataType>
-
getName
@Nonnull public java.lang.String getName()
-
subField
@Nonnull public Field<?> subField(@Nonnull java.lang.String part)
-
asBoolean
@Nonnull public Mixins.BooleanField asBoolean()
-
asInt
@Nonnull public Mixins.IntField asInt()
-
asLong
@Nonnull public Mixins.LongField asLong()
-
asFloat
@Nonnull public Mixins.FloatField asFloat()
-
asDouble
@Nonnull public Mixins.DoubleField asDouble()
-
asString
@Nonnull public Mixins.StringField asString()
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
equals
public boolean equals(java.lang.Object other)
- Overrides:
equals
in classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-