public class DataTableBindHelper extends Object
| Modifier and Type | Field and Description |
|---|---|
static Pattern |
COLLECTION_ACCESS_BY_INDEX_PATTERN |
static Pattern |
COLLECTION_ACCESS_BY_KEY_PATTERN |
static Pattern |
PRECISION_PATTERN |
static Pattern |
SPREADSHEETRESULTFIELD_PATTERN |
| Constructor and Description |
|---|
DataTableBindHelper() |
| Modifier and Type | Method and Description |
|---|---|
static IOpenField |
findField(String fieldName,
ITable table,
IOpenClass tableType) |
static int |
getCollectionIndex(IdentifierNode fieldNameNode) |
static Object |
getCollectionKey(IdentifierNode currentFieldNameNode) |
static String |
getCollectionName(IdentifierNode fieldNameNode) |
static List<IdentifierNode[]> |
getColumnIdentifiers(IBindingContext bindingContext,
ITable table,
ILogicalTable descriptorRows) |
static ILogicalTable |
getDescriptorRows(ILogicalTable horizDataTableBody)
Gets the descriptor rows from the data table body.
|
static ILogicalTable |
getHorizontalDataWithTitle(ILogicalTable horizDataTableBody)
Gets the Data_With_Titles rows from the data table body.
|
static ILogicalTable |
getHorizontalTable(ILogicalTable tableBody,
IOpenClass tableType)
Gets the horizontal table representation from current table.
|
static Integer |
getPrecisionValue(IdentifierNode fieldNameNode) |
static ILogicalTable |
getSubTableForBusinessView(ILogicalTable tableBody,
IOpenClass tableType)
Gets the sub table for displaying on business view.
|
static ILogicalTable |
getTableBody(TableSyntaxNode tsn)
Gets the table body, by skipping the table header and properties sections.
|
static boolean |
hasForeignKeysRow(ILogicalTable dataTable)
Foreign keys row is optional for data table.
|
static boolean |
isHorizontalTable(ILogicalTable dataTableBody,
IOpenClass tableType)
Checks if table representation is horizontal.
|
static StringValue |
makeColumnTitle(IBindingContext bindingContext,
ILogicalTable dataWithTitleRows,
int column,
boolean hasColumnTitleRow)
Gets title for column if required or returns blank value.
|
static ColumnDescriptor[] |
makeDescriptors(IBindingContext bindingContext,
ITable table,
IOpenClass type,
OpenL openl,
ILogicalTable descriptorRows,
ILogicalTable dataWithTitleRows,
boolean hasForeignKeysRow,
boolean hasColumnTytleRow,
boolean supportConstructorFields) |
static IOpenField |
processFieldsChain(IBindingContext bindingContext,
ITable table,
IOpenClass type,
IdentifierNode[] fieldAccessorChainTokens)
Process the chain of fields, e.g.
|
public static final Pattern COLLECTION_ACCESS_BY_INDEX_PATTERN
public static final Pattern COLLECTION_ACCESS_BY_KEY_PATTERN
public static final Pattern PRECISION_PATTERN
public static final Pattern SPREADSHEETRESULTFIELD_PATTERN
public static boolean hasForeignKeysRow(ILogicalTable dataTable)
dataTable - data table to checkTRUE if second row in data table body (next to the field row) consists even one value, in
any column, starts with symbol.public static ILogicalTable getTableBody(TableSyntaxNode tsn)
tsn - inspecting tablepublic static boolean isHorizontalTable(ILogicalTable dataTableBody, IOpenClass tableType)
| param1 | param2 | param3 |
| param1 value | param2 value | param3 value |
dataTableBody - the body of a table to checktableType - the type of data tableTRUE if table is horizontal.public static IOpenField findField(String fieldName, ITable table, IOpenClass tableType)
public static ILogicalTable getHorizontalTable(ILogicalTable tableBody, IOpenClass tableType)
tableBody - the body of a table to checktableType - the type of data tablepublic static ILogicalTable getHorizontalDataWithTitle(ILogicalTable horizDataTableBody)
horizDataTableBody - Horizontal representation of data table body.public static ILogicalTable getSubTableForBusinessView(ILogicalTable tableBody, IOpenClass tableType)
tableBody - data table body.tableType - the type of a tablepublic static ILogicalTable getDescriptorRows(ILogicalTable horizDataTableBody)
horizDataTableBody - Horizontal representation of data table body.public static StringValue makeColumnTitle(IBindingContext bindingContext, ILogicalTable dataWithTitleRows, int column, boolean hasColumnTitleRow)
dataWithTitleRows - Logical part of the data table. Consider to include all rows from base table after
header section (consists from header row + property section) and descriptor section (consists from
JavaBean name obligatory + optional index row, see hasForeignKeysRow(ILogicalTable)).bindingContext - is used for optimization GridCellSourceCodeModule in execution mode. Can be
null.column - Number of column in data table.hasColumnTitleRow - Flag shows if data table has column tytle row.public static ColumnDescriptor[] makeDescriptors(IBindingContext bindingContext, ITable table, IOpenClass type, OpenL openl, ILogicalTable descriptorRows, ILogicalTable dataWithTitleRows, boolean hasForeignKeysRow, boolean hasColumnTytleRow, boolean supportConstructorFields) throws Exception
bindingContext - is used for optimization GridCellSourceCodeModule in execution mode. Can be
null.Exceptionpublic static List<IdentifierNode[]> getColumnIdentifiers(IBindingContext bindingContext, ITable table, ILogicalTable descriptorRows)
bindingContext - is used for optimization GridCellSourceCodeModule in execution mode. Can be
null.table - is needed only for error processing. Can be null.public static IOpenField processFieldsChain(IBindingContext bindingContext, ITable table, IOpenClass type, IdentifierNode[] fieldAccessorChainTokens)
IOpenField for fields chain.public static Integer getPrecisionValue(IdentifierNode fieldNameNode)
public static int getCollectionIndex(IdentifierNode fieldNameNode)
public static String getCollectionName(IdentifierNode fieldNameNode)
public static Object getCollectionKey(IdentifierNode currentFieldNameNode)
Copyright © 2004–2019 OpenL Tablets. All rights reserved.