Package org.openl.rules.data
Class ForeignKeyColumnDescriptor
- java.lang.Object
-
- org.openl.rules.data.ColumnDescriptor
-
- org.openl.rules.data.ForeignKeyColumnDescriptor
-
public class ForeignKeyColumnDescriptor extends ColumnDescriptor
Handles column descriptors that are represented as foreign keys to data from other tables.- Author:
- DLiauchuk
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.openl.rules.data.ColumnDescriptor
ColumnDescriptor.ColumnGroupKey
-
-
Constructor Summary
Constructors Constructor Description ForeignKeyColumnDescriptor(IOpenField field, IdentifierNode foreignKeyTable, IdentifierNode foreignKey, IdentifierNode[] foreignKeyTableAccessorChainTokens, ICell foreignKeyCell, StringValue displayValue, OpenL openl, boolean constructor, IdentifierNode[] fieldChainTokens, int columnNum)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description DomainOpenClassgetDomainClassForForeignTable(IDataBase db)IdentifierNodegetForeignKey()CellKeygetForeignKeyCellCoordinate()IOpenFieldgetForeignKeyField(IOpenClass type, IDataBase db)IdentifierNodegetForeignKeyTable()ObjectgetLiteralByForeignKey(IOpenClass fieldType, ILogicalTable valuesTable, IDataBase db, IBindingContext bindingContext)Method is using to load data from foreign table, using foreign key (seeDataTableBindHelper.getForeignKeyTokens(IBindingContext, ILogicalTable, int)).booleanisReference()ReturnsTRUEif instance has foreign key table.voidpopulateLiteralByForeignKey(Object target, ILogicalTable valuesTable, IDataBase db, IBindingContext cxt, IRuntimeEnv env)Method is using to load data from foreign table, using foreign key (seeDataTableBindHelper.getForeignKeyTokens(IBindingContext, ILogicalTable, int)).-
Methods inherited from class org.openl.rules.data.ColumnDescriptor
buildGroupKey, getColumnIdx, getColumnValue, getDisplayName, getField, getFieldChainTokens, getFieldValue, getGroupKey, getLiteral, getName, getRuntimeEnv, getType, getUniqueIndex, isConstructor, isPrimaryKey, isSupportMultirows, isValuesAnArray, isValuesAnArray, populateLiteral, setFieldValue, setGroupKey, setSupportMultirows
-
-
-
-
Constructor Detail
-
ForeignKeyColumnDescriptor
public ForeignKeyColumnDescriptor(IOpenField field, IdentifierNode foreignKeyTable, IdentifierNode foreignKey, IdentifierNode[] foreignKeyTableAccessorChainTokens, ICell foreignKeyCell, StringValue displayValue, OpenL openl, boolean constructor, IdentifierNode[] fieldChainTokens, int columnNum)
-
-
Method Detail
-
getLiteralByForeignKey
public Object getLiteralByForeignKey(IOpenClass fieldType, ILogicalTable valuesTable, IDataBase db, IBindingContext bindingContext) throws Exception
Method is using to load data from foreign table, using foreign key (seeDataTableBindHelper.getForeignKeyTokens(IBindingContext, ILogicalTable, int)). Is used when data table is represents AS a constructor (seeColumnDescriptor.isConstructor()).- Throws:
Exception
-
isReference
public boolean isReference()
ReturnsTRUEif instance has foreign key table.- Overrides:
isReferencein classColumnDescriptor
-
populateLiteralByForeignKey
public void populateLiteralByForeignKey(Object target, ILogicalTable valuesTable, IDataBase db, IBindingContext cxt, IRuntimeEnv env) throws Exception
Method is using to load data from foreign table, using foreign key (seeDataTableBindHelper.getForeignKeyTokens(IBindingContext, ILogicalTable, int)). Is used when data table is represents as NOT a constructor (seeColumnDescriptor.isConstructor()).- Throws:
Exception
-
getDomainClassForForeignTable
public DomainOpenClass getDomainClassForForeignTable(IDataBase db) throws SyntaxNodeException
- Throws:
SyntaxNodeException
-
getForeignKeyTable
public IdentifierNode getForeignKeyTable()
-
getForeignKey
public IdentifierNode getForeignKey()
-
getForeignKeyCellCoordinate
public CellKey getForeignKeyCellCoordinate()
-
getForeignKeyField
public IOpenField getForeignKeyField(IOpenClass type, IDataBase db)
-
-