Package org.teiid.metadata.index
Class RecordFactory
- java.lang.Object
-
- org.teiid.metadata.index.RecordFactory
-
public class RecordFactory extends Object
RuntimeAdapter
-
-
Field Summary
Fields Modifier and Type Field Description static intANNOTATION_TAGS_INDEX_VERSIONThe version number that is associated with the change made to remove property value pairs from the annotation records any properties on annotations would now be indexed as part of the properties index.static intCOLUMN_INPUT_PARAMETER_FLAG_INDEX_VERSIONThe version number that is associated with the change made to add an input parameter flag on columns.static intCOLUMN_NATIVE_TYPE_INDEX_VERSIONThe version number that is associated with the change made to add native type property on columns.static intCOLUMN_NULL_DISTINCT_INDEX_VERSIONThe version number that is associated with the change made to add count of null and distinct values for columns on the column records 7/8/2005.static intCURRENT_INDEX_VERSIONThe version number that is encoded with all newly created index recordsstatic intDELIMITER_INDEX_VERSIONThe version number that is associated with the change made to change the list delimiter.static intINDEX_RECORD_BLOCK_SIZEstatic intNONVERSIONED_RECORD_INDEX_VERSIONThe version number associated with any index records prior to the point when version information was encoded in newly created recordsstatic intNONZERO_UNKNOWN_CARDINALITYprotected StringparentIdstatic intPRIMITIVE_TYPE_ID_INDEX_VERSIONThe version number that is associated with the change made to add primitive type ID on datatype records 02/28/2006.static intPROCEDURE_UPDATE_COUNT_VERSIONThe version number that is associated with the change made to add an update count to physical stored and XQuery procedures 04/29/2008.static StringPROTOCOLstatic intTABLE_MATERIALIZATION_INDEX_VERSIONThe version number that is associated with the change made to add materialization property on tables.static intTRANSFORMATION_UUID_INDEX_VERSIONThe version number that is associated with the change made to add uuid for the transformation mapping root on the transformation records, uuids would now be indexed as part of the transformation index.static StringURI_REFERENCE_DELIMITERDelimiter used to separate the URI string from the URI fragment
-
Constructor Summary
Constructors Constructor Description RecordFactory()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description org.teiid.metadata.ColumncreateColumnRecord(char[] record)Create a ColumnRecord instance from the specified index recordorg.teiid.metadata.ColumnSetcreateColumnSetRecord(char[] record, org.teiid.metadata.ColumnSet columnSet)Create a ColumnSetRecord instance from the specified index recordorg.teiid.metadata.DatatypecreateDatatypeRecord(char[] record)Create a DatatypeRecord instance from the specified index recordorg.teiid.metadata.ForeignKeycreateForeignKeyRecord(char[] record)Create a ForeignKeyRecord instance from the specified index recordorg.teiid.metadata.SchemacreateModelRecord(char[] record)Create a ModelRecord instance from the specified index recordorg.teiid.metadata.ProcedureParametercreateProcedureParameterRecord(char[] record)Create a ProcedureParameterRecord instance from the specified index record header|defaultValue|dataType|length|radix|scale|nullType|precision|paramType|footer|org.teiid.metadata.ProcedurecreateProcedureRecord(char[] record)Create a ProcedureRecord instance from the specified index recordorg.teiid.metadata.TablecreateTableRecord(char[] record)Create a TableRecord instance from the specified index recordTransformationRecordImplcreateTransformationRecord(char[] record)Create a TransformationRecord instance from the specified index recordstatic StringextractUUIDString(IEntryResult result)Extract the UUID string from the IEntryResultbooleangetBooleanValue(char b)static intgetContinuationSegmentNumber(String objectID, IEntryResult continuationResult)protected static shortgetKeyTypeForRecordType(char recordType)chargetListDelimiter(int indexVersionNumber)protected org.teiid.metadata.AbstractMetadataRecordgetMetadataRecord(char[] record)Return theAbstractMetadataRecordinstances for specified IEntryResult.List<org.teiid.metadata.AbstractMetadataRecord>getMetadataRecord(IEntryResult[] queryResult)Return a collection ofAbstractMetadataRecordinstances for the result obtained from executingqueryEntriesMatchingStringgetObjectValue(String str)StringgetOptionalToken(List<String> tokens, int tokenIndex)static List<String>getStrings(char[] record, char listDelimiter)static List<String>getStrings(String record, char listDelimiter)booleanincludeAnnotationProperties(int indexVersionNumber)booleanincludeColumnNativeType(int indexVersionNumber)booleanincludeColumnNullDistinctValues(int indexVersionNumber)booleanincludeInputParameterFlag(int indexVersionNumber)booleanincludeMaterializationFlag(int indexVersionNumber)booleanincludeMaterializedTables(int indexVersionNumber)booleanincludePrimitiveTypeIdValue(int indexVersionNumber)booleanincludeTransformationUUID(int indexVersionNumber)static IEntryResultjoinEntryResults(IEntryResult result, IEntryResult[] continuationResults, int blockSize)Append the specified IEntryResult[] to the IEntryResult to create a single result representing an index entry that was split across multiple index records.
-
-
-
Field Detail
-
PROTOCOL
public static final String PROTOCOL
- See Also:
- Constant Field Values
-
URI_REFERENCE_DELIMITER
public static final String URI_REFERENCE_DELIMITER
Delimiter used to separate the URI string from the URI fragment- See Also:
- Constant Field Values
-
INDEX_RECORD_BLOCK_SIZE
public static final int INDEX_RECORD_BLOCK_SIZE
- See Also:
- Constant Field Values
-
NONVERSIONED_RECORD_INDEX_VERSION
public static final int NONVERSIONED_RECORD_INDEX_VERSION
The version number associated with any index records prior to the point when version information was encoded in newly created records- See Also:
- Constant Field Values
-
DELIMITER_INDEX_VERSION
public static final int DELIMITER_INDEX_VERSION
The version number that is associated with the change made to change the list delimiter. Added 07/22/2004.- Since:
- 4.1.1
- See Also:
- Constant Field Values
-
TABLE_MATERIALIZATION_INDEX_VERSION
public static final int TABLE_MATERIALIZATION_INDEX_VERSION
The version number that is associated with the change made to add materialization property on tables. Added 08/18/2004.- Since:
- 4.2
- See Also:
- Constant Field Values
-
COLUMN_NATIVE_TYPE_INDEX_VERSION
public static final int COLUMN_NATIVE_TYPE_INDEX_VERSION
The version number that is associated with the change made to add native type property on columns. Added 08/24/2004.- Since:
- 4.2
- See Also:
- Constant Field Values
-
COLUMN_INPUT_PARAMETER_FLAG_INDEX_VERSION
public static final int COLUMN_INPUT_PARAMETER_FLAG_INDEX_VERSION
The version number that is associated with the change made to add an input parameter flag on columns. The flag is used to indicate if an element for a virtual table represents an input parameter. This change was made to support the Procedural-Relational Mapping project. Added 09/29/2004.- Since:
- 4.2
- See Also:
- Constant Field Values
-
ANNOTATION_TAGS_INDEX_VERSION
public static final int ANNOTATION_TAGS_INDEX_VERSION
The version number that is associated with the change made to remove property value pairs from the annotation records any properties on annotations would now be indexed as part of the properties index. Added 12/14/2004.- Since:
- 4.2
- See Also:
- Constant Field Values
-
TRANSFORMATION_UUID_INDEX_VERSION
public static final int TRANSFORMATION_UUID_INDEX_VERSION
The version number that is associated with the change made to add uuid for the transformation mapping root on the transformation records, uuids would now be indexed as part of the transformation index. Added 1/13/2005.- Since:
- 4.2
- See Also:
- Constant Field Values
-
COLUMN_NULL_DISTINCT_INDEX_VERSION
public static final int COLUMN_NULL_DISTINCT_INDEX_VERSION
The version number that is associated with the change made to add count of null and distinct values for columns on the column records 7/8/2005.- Since:
- 4.2
- See Also:
- Constant Field Values
-
PRIMITIVE_TYPE_ID_INDEX_VERSION
public static final int PRIMITIVE_TYPE_ID_INDEX_VERSION
The version number that is associated with the change made to add primitive type ID on datatype records 02/28/2006.- Since:
- 5.0
- See Also:
- Constant Field Values
-
PROCEDURE_UPDATE_COUNT_VERSION
public static final int PROCEDURE_UPDATE_COUNT_VERSION
The version number that is associated with the change made to add an update count to physical stored and XQuery procedures 04/29/2008.- Since:
- 5.0
- See Also:
- Constant Field Values
-
NONZERO_UNKNOWN_CARDINALITY
public static final int NONZERO_UNKNOWN_CARDINALITY
- See Also:
- Constant Field Values
-
CURRENT_INDEX_VERSION
public static final int CURRENT_INDEX_VERSION
The version number that is encoded with all newly created index records- See Also:
- Constant Field Values
-
parentId
protected String parentId
-
-
Method Detail
-
getMetadataRecord
public List<org.teiid.metadata.AbstractMetadataRecord> getMetadataRecord(IEntryResult[] queryResult)
Return a collection ofAbstractMetadataRecordinstances for the result obtained from executingqueryEntriesMatching- Parameters:
queryResult-
-
getMetadataRecord
protected org.teiid.metadata.AbstractMetadataRecord getMetadataRecord(char[] record)
Return theAbstractMetadataRecordinstances for specified IEntryResult.- Parameters:
record-
-
joinEntryResults
public static IEntryResult joinEntryResults(IEntryResult result, IEntryResult[] continuationResults, int blockSize)
Append the specified IEntryResult[] to the IEntryResult to create a single result representing an index entry that was split across multiple index records.- Parameters:
result-continuationResults-blockSize-
-
getContinuationSegmentNumber
public static int getContinuationSegmentNumber(String objectID, IEntryResult continuationResult)
-
extractUUIDString
public static String extractUUIDString(IEntryResult result)
Extract the UUID string from the IEntryResult- Parameters:
result-
-
createModelRecord
public org.teiid.metadata.Schema createModelRecord(char[] record)
Create a ModelRecord instance from the specified index record
-
createTransformationRecord
public TransformationRecordImpl createTransformationRecord(char[] record)
Create a TransformationRecord instance from the specified index record
-
getKeyTypeForRecordType
protected static short getKeyTypeForRecordType(char recordType)
-
createTableRecord
public org.teiid.metadata.Table createTableRecord(char[] record)
Create a TableRecord instance from the specified index record
-
createColumnRecord
public org.teiid.metadata.Column createColumnRecord(char[] record)
Create a ColumnRecord instance from the specified index record
-
createColumnSetRecord
public org.teiid.metadata.ColumnSet createColumnSetRecord(char[] record, org.teiid.metadata.ColumnSet columnSet)Create a ColumnSetRecord instance from the specified index record
-
createForeignKeyRecord
public org.teiid.metadata.ForeignKey createForeignKeyRecord(char[] record)
Create a ForeignKeyRecord instance from the specified index record
-
createDatatypeRecord
public org.teiid.metadata.Datatype createDatatypeRecord(char[] record)
Create a DatatypeRecord instance from the specified index record
-
createProcedureRecord
public org.teiid.metadata.Procedure createProcedureRecord(char[] record)
Create a ProcedureRecord instance from the specified index record
-
createProcedureParameterRecord
public org.teiid.metadata.ProcedureParameter createProcedureParameterRecord(char[] record)
Create a ProcedureParameterRecord instance from the specified index record header|defaultValue|dataType|length|radix|scale|nullType|precision|paramType|footer|
-
getBooleanValue
public boolean getBooleanValue(char b)
-
getListDelimiter
public char getListDelimiter(int indexVersionNumber)
-
includeMaterializationFlag
public boolean includeMaterializationFlag(int indexVersionNumber)
-
includeMaterializedTables
public boolean includeMaterializedTables(int indexVersionNumber)
-
includeColumnNativeType
public boolean includeColumnNativeType(int indexVersionNumber)
-
includeColumnNullDistinctValues
public boolean includeColumnNullDistinctValues(int indexVersionNumber)
-
includePrimitiveTypeIdValue
public boolean includePrimitiveTypeIdValue(int indexVersionNumber)
-
includeInputParameterFlag
public boolean includeInputParameterFlag(int indexVersionNumber)
-
includeAnnotationProperties
public boolean includeAnnotationProperties(int indexVersionNumber)
-
includeTransformationUUID
public boolean includeTransformationUUID(int indexVersionNumber)
-
-