Package com.mckoi.database
Class FunctionTable.TableGroupResolver
- java.lang.Object
-
- com.mckoi.database.FunctionTable.TableGroupResolver
-
- All Implemented Interfaces:
GroupResolver
- Enclosing class:
- FunctionTable
final class FunctionTable.TableGroupResolver extends java.lang.Object implements GroupResolver
Group resolver. This is used to resolve group information in the refering table.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description private classFunctionTable.TableGroupResolver.TableGVResolver
-
Field Summary
Fields Modifier and Type Field Description private IntegerVectorgroupThe IntegerVector that represents the group we are currently processing.private intgroup_numberThe current group number.private FunctionTable.TableGroupResolver.TableGVResolvertgv_resolverA VariableResolver that can resolve variables within a set of a group.
-
Constructor Summary
Constructors Constructor Description TableGroupResolver()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private FunctionTable.TableGroupResolver.TableGVResolvercreateVariableResolver()Creates a resolver that resolves variables within a set of the group.private voidensureGroup()Ensures that 'group' is set up.VariableResolvergetVariableResolver(int set_index)Returns a VariableResolver that can be used to resolve variable in the get set of the group.intgroupID()A number that uniquely identifies this group from all the others in the set of groups.TObjectresolve(Variable variable, int set_index)Returns the value of a variable of a group.voidsetUpGroupForRow(int row_index)Given a row index, this will setup the information in this resolver to solve for this group.intsize()The total number of set items in this group.
-
-
-
Field Detail
-
group
private IntegerVector group
The IntegerVector that represents the group we are currently processing.
-
group_number
private int group_number
The current group number.
-
tgv_resolver
private FunctionTable.TableGroupResolver.TableGVResolver tgv_resolver
A VariableResolver that can resolve variables within a set of a group.
-
-
Method Detail
-
createVariableResolver
private FunctionTable.TableGroupResolver.TableGVResolver createVariableResolver()
Creates a resolver that resolves variables within a set of the group.
-
ensureGroup
private void ensureGroup()
Ensures that 'group' is set up.
-
setUpGroupForRow
public void setUpGroupForRow(int row_index)
Given a row index, this will setup the information in this resolver to solve for this group.
-
groupID
public int groupID()
Description copied from interface:GroupResolverA number that uniquely identifies this group from all the others in the set of groups.- Specified by:
groupIDin interfaceGroupResolver
-
size
public int size()
Description copied from interface:GroupResolverThe total number of set items in this group.- Specified by:
sizein interfaceGroupResolver
-
resolve
public TObject resolve(Variable variable, int set_index)
Description copied from interface:GroupResolverReturns the value of a variable of a group. The set index signifies the set item of the group. For example, if the group contains 10 items, then set_index may be between 0 and 9. Return types must be either a String, BigDecimal or Boolean.- Specified by:
resolvein interfaceGroupResolver
-
getVariableResolver
public VariableResolver getVariableResolver(int set_index)
Description copied from interface:GroupResolverReturns a VariableResolver that can be used to resolve variable in the get set of the group. The object returned is undefined after the next call to this method.- Specified by:
getVariableResolverin interfaceGroupResolver
-
-