@Test public void testAmbiguousProc() throws Exception { TransformationMetadata tm = exampleTransformationMetadata(); try { tm.getStoredProcedureInfoForProcedure("y"); fail("expected exception"); } catch (QueryMetadataException e) { assertEquals("TEIID30358 Procedure 'y' is ambiguous, use the fully qualified name instead", e.getMessage()); } }
public StoredProcedureInfo getStoredProcedureInfoForProcedure(final String name) throws TeiidComponentException, QueryMetadataException { StoredProcedureInfo result = getStoredProcInfoDirect(name); if (result == null || !isResolvable((Schema) result.getModelID())) { throw new QueryMetadataException(QueryPlugin.Event.TEIID30357, name+NOT_EXISTS_MESSAGE); } return result; }
TransformationMetadata extends BasicQueryMetadata implements Serializable { public StoredProcedureInfo getStoredProcedureInfoForProcedure(final String name) throws TeiidComponentException, QueryMetadataException { StoredProcedureInfo result = getStoredProcInfoDirect(name); if (result == null || !isResolvable((Schema) result.getModelID())) { throw new QueryMetadataException(QueryPlugin.Event.TEIID30357, name+NOT_EXISTS_MESSAGE); } return result; } }
TransformationMetadata extends BasicQueryMetadata implements Serializable { public StoredProcedureInfo getStoredProcedureInfoForProcedure(final String name) throws TeiidComponentException, QueryMetadataException { StoredProcedureInfo result = getStoredProcInfoDirect(name); if (result == null || !isResolvable((Schema) result.getModelID())) { throw new QueryMetadataException(QueryPlugin.Event.TEIID30357, name+NOT_EXISTS_MESSAGE); } return result; } TransformationMetadata(VDBMetaData vdbMetadata, final CompositeMetadataStore store, Map<String, VDBResources.Resource> vdbEntries, FunctionTree systemFunctions, Collection<FunctionTree> functionTrees); private  TransformationMetadata(final CompositeMetadataStore store, FunctionLibrary functionLibrary); }
TransformationMetadata extends BasicQueryMetadata implements Serializable { public StoredProcedureInfo getStoredProcedureInfoForProcedure(final String name) throws TeiidComponentException, QueryMetadataException { StoredProcedureInfo result = getStoredProcInfoDirect(name); if (result == null || !isResolvable((Schema) result.getModelID())) { throw new QueryMetadataException(QueryPlugin.Event.TEIID30357, name+NOT_EXISTS_MESSAGE); } return result; } TransformationMetadata(VDBMetaData vdbMetadata, final CompositeMetadataStore store, Map<String, VDBResources.Resource> vdbEntries, FunctionTree systemFunctions, Collection<FunctionTree> functionTrees); private  TransformationMetadata(final CompositeMetadataStore store, FunctionLibrary functionLibrary); Column getElementID(final String elementName); static Column getColumn(final String elementName, Table table,
            String shortElementName); Table getGroupID(final String groupName); Collection<String> getGroupsForPartialName(final String partialGroupName); Object getModelID(final Object groupOrElementID); String getFullName(final Object metadataID); @Override String getName(Object metadataID); List<Column> getElementIDsInGroupID(final Object groupID); Object getGroupIDForElementID(final Object elementID); boolean hasProcedure(String name); StoredProcedureInfo getStoredProcedureInfoForProcedure(final String name); String getElementRuntimeTypeName(final Object elementID); String getDefaultValue(final Object elementID); Object getMinimumValue(final Object elementID); Object getMaximumValue(final Object elementID); boolean isVirtualGroup(final Object groupID); boolean isProcedure(final Object groupID); boolean isVirtualModel(final Object modelID); QueryNode getVirtualPlan(final Object groupID); String getInsertPlan(final Object groupID); String getUpdatePlan(final Object groupID); String getDeletePlan(final Object groupID); boolean modelSupports(final Object modelID, final int modelConstant); boolean groupSupports(final Object groupID, final int groupConstant); boolean elementSupports(final Object elementID, final int elementConstant); int getMaxSetSize(final Object modelID); Collection<KeyRecord> getIndexesInGroup(final Object groupID); Collection<KeyRecord> getUniqueKeysInGroup(final Object groupID); Collection<ForeignKey> getForeignKeysInGroup(final Object groupID); Object getPrimaryKeyIDForForeignKeyID(final Object foreignKeyID); Collection<KeyRecord> getAccessPatternsInGroup(final Object groupID); List<Column> getElementIDsInIndex(final Object index); List<Column> getElementIDsInKey(final Object key); List<Column> getElementIDsInAccessPattern(final Object accessPattern); boolean hasMaterialization(final Object groupID); Object getMaterialization(final Object groupID); Object getMaterializationStage(final Object groupID); String getVirtualDatabaseName(); VDBMetaData getVdbMetaData(); @Override float getCardinality(final Object groupID); String getNameInSource(final Object metadataID); int getElementLength(final Object elementID); int getPosition(final Object elementID); int getPrecision(final Object elementID); int getRadix(final Object elementID); String getFormat(Object elementID); int getScale(final Object elementID); @Override float getDistinctValues(final Object elementID); @Override float getNullValues(final Object elementID); String getNativeType(final Object elementID); Properties getExtensionProperties(final Object metadataID); @Override String getExtensionProperty(Object metadataID, String key, boolean checkUnqualified); byte[] getBinaryVDBResource(String resourcePath); ClobImpl getVDBResourceAsClob(String resourcePath); SQLXMLImpl getVDBResourceAsSQLXML(String resourcePath); BlobImpl getVDBResourceAsBlob(String resourcePath); String getCharacterVDBResource(String resourcePath); CompositeMetadataStore getMetadataStore(); String[] getVDBResourcePaths(); @Override Object addToMetadataCache(Object metadataID, String key, Object value); @Override Object getFromMetadataCache(Object metadataID, String key); @Override FunctionLibrary getFunctionLibrary(); @Override Object getPrimaryKey(Object metadataID); @Override TransformationMetadata getDesignTimeMetadata(); @Override Set<String> getImportedModels(); @Override ScriptEngine getScriptEngineDirect(String language); @Override boolean isVariadic(Object metadataID); @Override Schema getModelID(String modelName); @Override List<Schema> getModelIDs(); void setPolicies(Map<String, DataPolicyMetadata> policies); Map<String, DataPolicyMetadata> getPolicies(); @Override boolean useOutputName(); void setUseOutputNames(boolean useOutputNames); @Override boolean widenComparisonToString(); void setWidenComparisonToString(boolean widenComparisonToString); void setHiddenResolvable(boolean hiddenResolvable); @Override Class<?> getDataTypeClass(String typeOrDomainName); @Override boolean isEnvAllowed(); void setAllowENV(boolean b); @Override boolean isLongRanks(); void setLongRanks(boolean longRanks); @Override FunctionMethod getPushdownFunction(Object modelID, String fullName); }
TransformationMetadata extends BasicQueryMetadata implements Serializable { public StoredProcedureInfo getStoredProcedureInfoForProcedure(final String name) throws TeiidComponentException, QueryMetadataException { StoredProcedureInfo result = getStoredProcInfoDirect(name); if (result == null || !isResolvable((Schema) result.getModelID())) { throw new QueryMetadataException(QueryPlugin.Event.TEIID30357, name+NOT_EXISTS_MESSAGE); } return result; } TransformationMetadata(VDBMetaData vdbMetadata, final CompositeMetadataStore store, Map<String, VDBResources.Resource> vdbEntries, FunctionTree systemFunctions, Collection<FunctionTree> functionTrees); private  TransformationMetadata(final CompositeMetadataStore store, FunctionLibrary functionLibrary); Column getElementID(final String elementName); static Column getColumn(final String elementName, Table table,
            String shortElementName); Table getGroupID(final String groupName); Collection<String> getGroupsForPartialName(final String partialGroupName); Object getModelID(final Object groupOrElementID); String getFullName(final Object metadataID); @Override String getName(Object metadataID); List<Column> getElementIDsInGroupID(final Object groupID); Object getGroupIDForElementID(final Object elementID); boolean hasProcedure(String name); StoredProcedureInfo getStoredProcedureInfoForProcedure(final String name); String getElementRuntimeTypeName(final Object elementID); String getDefaultValue(final Object elementID); Object getMinimumValue(final Object elementID); Object getMaximumValue(final Object elementID); boolean isVirtualGroup(final Object groupID); boolean isProcedure(final Object groupID); boolean isVirtualModel(final Object modelID); QueryNode getVirtualPlan(final Object groupID); String getInsertPlan(final Object groupID); String getUpdatePlan(final Object groupID); String getDeletePlan(final Object groupID); boolean modelSupports(final Object modelID, final int modelConstant); boolean groupSupports(final Object groupID, final int groupConstant); boolean elementSupports(final Object elementID, final int elementConstant); int getMaxSetSize(final Object modelID); Collection<KeyRecord> getIndexesInGroup(final Object groupID); Collection<KeyRecord> getUniqueKeysInGroup(final Object groupID); Collection<ForeignKey> getForeignKeysInGroup(final Object groupID); Object getPrimaryKeyIDForForeignKeyID(final Object foreignKeyID); Collection<KeyRecord> getAccessPatternsInGroup(final Object groupID); List<Column> getElementIDsInIndex(final Object index); List<Column> getElementIDsInKey(final Object key); List<Column> getElementIDsInAccessPattern(final Object accessPattern); boolean hasMaterialization(final Object groupID); Object getMaterialization(final Object groupID); Object getMaterializationStage(final Object groupID); String getVirtualDatabaseName(); VDBMetaData getVdbMetaData(); @Override float getCardinality(final Object groupID); String getNameInSource(final Object metadataID); int getElementLength(final Object elementID); int getPosition(final Object elementID); int getPrecision(final Object elementID); int getRadix(final Object elementID); String getFormat(Object elementID); int getScale(final Object elementID); @Override float getDistinctValues(final Object elementID); @Override float getNullValues(final Object elementID); String getNativeType(final Object elementID); Properties getExtensionProperties(final Object metadataID); @Override String getExtensionProperty(Object metadataID, String key, boolean checkUnqualified); byte[] getBinaryVDBResource(String resourcePath); ClobImpl getVDBResourceAsClob(String resourcePath); SQLXMLImpl getVDBResourceAsSQLXML(String resourcePath); BlobImpl getVDBResourceAsBlob(String resourcePath); String getCharacterVDBResource(String resourcePath); CompositeMetadataStore getMetadataStore(); String[] getVDBResourcePaths(); @Override Object addToMetadataCache(Object metadataID, String key, Object value); @Override Object getFromMetadataCache(Object metadataID, String key); @Override FunctionLibrary getFunctionLibrary(); @Override Object getPrimaryKey(Object metadataID); @Override TransformationMetadata getDesignTimeMetadata(); @Override Set<String> getImportedModels(); @Override ScriptEngine getScriptEngineDirect(String language); @Override boolean isVariadic(Object metadataID); @Override Schema getModelID(String modelName); @Override List<Schema> getModelIDs(); void setPolicies(Map<String, DataPolicyMetadata> policies); Map<String, DataPolicyMetadata> getPolicies(); @Override boolean useOutputName(); void setUseOutputNames(boolean useOutputNames); @Override boolean widenComparisonToString(); void setWidenComparisonToString(boolean widenComparisonToString); void setHiddenResolvable(boolean hiddenResolvable); @Override Class<?> getDataTypeClass(String typeOrDomainName); @Override boolean isEnvAllowed(); void setAllowENV(boolean b); @Override boolean isLongRanks(); void setLongRanks(boolean longRanks); @Override FunctionMethod getPushdownFunction(Object modelID, String fullName); static final String ALLOWED_LANGUAGES; static final char DELIMITER_CHAR; static final String DELIMITER_STRING; static String NOT_EXISTS_MESSAGE; static Properties EMPTY_PROPS; }