-
- Type Parameters:
ENTITY- type of entities
public interface Stage<ENTITY>- Author:
- Per Minborg
-
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Modifier and Type Method Description Optional<com.speedment.runtime.field.trait.HasComparableOperators<ENTITY,?>>field()Returns a Field that belongs to the table of this Stage, orempty()if no Field is defined (i.e.Optional<com.speedment.runtime.field.trait.HasComparableOperators<?,?>>foreignField()Returns a Field that belongs to a table from a previous stage, orempty()if no Field is defined (i.e.com.speedment.runtime.config.identifier.TableIdentifier<ENTITY>identifier()Returns the TableIdentifier for this Stage.Optional<JoinOperator>joinOperator()Returns the OperatorType for this Stage or , orempty()if no OperatorType is defined (i.e.Optional<JoinType>joinType()Returns the JoinType for this Stage, orempty()if no JoinType is defined (i.e.static <T> Stage<T>of(com.speedment.runtime.config.identifier.TableIdentifier<T> identifier, List<Predicate<? super T>> predicates, JoinType joinType, com.speedment.runtime.field.trait.HasComparableOperators<T,?> field, JoinOperator joinOperator, com.speedment.runtime.field.trait.HasComparableOperators<?,?> foreignField, int referencedStage)Creates and returns a mew default implementation of a Stage.List<Predicate<? super ENTITY>>predicates()Returns an unmodifiable list of predicates that shall be applied for this Stage.intreferencedStage()Returns which stage index this stage references or -1.
-
-
-
Method Detail
-
identifier
com.speedment.runtime.config.identifier.TableIdentifier<ENTITY> identifier()
Returns the TableIdentifier for this Stage.- Returns:
- the TableIdentifier for this Stage
-
predicates
List<Predicate<? super ENTITY>> predicates()
Returns an unmodifiable list of predicates that shall be applied for this Stage. If no predicates are to be applied, an empty List is returned.- Returns:
- a list of predicates that shall be applied for this Stage
-
joinType
Optional<JoinType> joinType()
Returns the JoinType for this Stage, orempty()if no JoinType is defined (i.e. for the first Stage).- Returns:
- the JoinType for this Stage, or
empty()if no JoinType is defined.
-
field
Optional<com.speedment.runtime.field.trait.HasComparableOperators<ENTITY,?>> field()
Returns a Field that belongs to the table of this Stage, orempty()if no Field is defined (i.e. for a CROSS JOIN).- Returns:
- a Field that belongs to the table of this Stage,
or
empty()if no Field is defined
-
joinOperator
Optional<JoinOperator> joinOperator()
Returns the OperatorType for this Stage or , orempty()if no OperatorType is defined (i.e. for a CROSS JOIN).- Returns:
- the OperatorType for this Stage or , or
empty()if no OperatorType is defined (i.e. for a CROSS JOIN)
-
foreignField
Optional<com.speedment.runtime.field.trait.HasComparableOperators<?,?>> foreignField()
Returns a Field that belongs to a table from a previous stage, orempty()if no Field is defined (i.e. for a CROSS JOIN).- Returns:
- a Field that belongs to a table from a previous stage, or
empty()if no Field is defined
-
referencedStage
int referencedStage()
Returns which stage index this stage references or -1. More formally, the method returns the index to a stage where this stageforeignField()reference a stage'sfield()or if no field() exists, where this stage (if not aliased) references a stage'sidentifier(). If no such stage exist (e.g. for stage 0 or cross joined tables) then the method returns -1.- Returns:
- which stage index this stage references or -1
-
of
static <T> Stage<T> of(com.speedment.runtime.config.identifier.TableIdentifier<T> identifier, List<Predicate<? super T>> predicates, JoinType joinType, com.speedment.runtime.field.trait.HasComparableOperators<T,?> field, JoinOperator joinOperator, com.speedment.runtime.field.trait.HasComparableOperators<?,?> foreignField, int referencedStage)
Creates and returns a mew default implementation of a Stage.- Type Parameters:
T- type- Parameters:
identifier- of the tablepredicates- to apply on entities from this tablejoinType- that shall be applied (nullable)field- from the table to use (nullable)joinOperator- to use when joining (nullable)foreignField- from another table (nullable)referencedStage- the previous stage that is referenced by this stage- Returns:
- a mew default implementation of a Stage
-
-