@Immutable public class RelationType extends Object
| Constructor and Description |
|---|
RelationType(Field... fields) |
RelationType(List<Field> fields) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
canResolve(QualifiedName name) |
int |
getAllFieldCount()
Gets the count of all fields including hidden fields.
|
Collection<Field> |
getAllFields()
Gets all fields including hidden fields.
|
Field |
getFieldByIndex(int fieldIndex)
Gets the field at the specified index.
|
int |
getVisibleFieldCount() |
Collection<Field> |
getVisibleFields()
Gets only the visible fields.
|
int |
indexOf(Field field)
Gets the index of the specified field.
|
RelationType |
joinWith(RelationType other)
Creates a new tuple descriptor containing all fields from this tuple descriptor
and all fields from the specified tuple descriptor.
|
List<Field> |
resolveFields(QualifiedName name)
Gets the index of all columns matching the specified name
|
List<Field> |
resolveFieldsWithPrefix(Optional<QualifiedName> prefix)
This method is used for SELECT * or x.* queries
|
String |
toString() |
RelationType |
withAlias(String relationAlias,
List<String> columnAliases)
Creates a new tuple descriptor with the relation, and, optionally, the columns aliased.
|
RelationType |
withOnlyVisibleFields()
Creates a new tuple descriptor containing only the visible fields.
|
public RelationType(Field... fields)
public int indexOf(Field field)
IllegalArgumentException - when field is not foundpublic Field getFieldByIndex(int fieldIndex)
public Collection<Field> getVisibleFields()
public int getVisibleFieldCount()
public Collection<Field> getAllFields()
public int getAllFieldCount()
public List<Field> resolveFieldsWithPrefix(Optional<QualifiedName> prefix)
public List<Field> resolveFields(QualifiedName name)
public boolean canResolve(QualifiedName name)
public RelationType joinWith(RelationType other)
public RelationType withAlias(String relationAlias, List<String> columnAliases)
public RelationType withOnlyVisibleFields()
Copyright © 2012–2019. All rights reserved.