/** * TODO: this resolving mode allows partial matches of a full group name containing . * @param partialGroupName * @return */ public Collection<Table> getGroupsForPartialName(String partialGroupName) { List<Table> result = new LinkedList<Table>(); for (Schema schema : getSchemas().values()) { for (Table t : schema.getTables().values()) { String name = t.getName(); if (matchesPartialName(partialGroupName, name, schema)) { result.add(t); } } } return result; }
/** * TODO: this resolving mode allows partial matches of a full group name containing . * @param partialGroupName * @return */ public Collection<Table> getGroupsForPartialName(String partialGroupName) { List<Table> result = new LinkedList<Table>(); for (Schema schema : getSchemas().values()) { for (Table t : schema.getTables().values()) { String name = t.getName(); if (matchesPartialName(partialGroupName, name, schema)) { result.add(t); } } } return result; }
/** * TODO: this resolving mode allows partial matches of a full group name containing . * @param partialGroupName * @return */ public Collection<Table> getGroupsForPartialName(String partialGroupName) { List<Table> result = new LinkedList<Table>(); for (Schema schema : getSchemas().values()) { for (Table t : schema.getTables().values()) { String name = t.getName(); if (matchesPartialName(partialGroupName, name, schema)) { result.add(t); } } } return result; }
public Collection<Procedure> getStoredProcedure(String name) throws TeiidComponentException, QueryMetadataException { List<Procedure> result = new LinkedList<Procedure>(); int index = name.indexOf(TransformationMetadata.DELIMITER_STRING); if (index > -1) { String schemaName = name.substring(0, index); Schema schema = getSchema(schemaName); if (schema != null ) { Procedure proc = schema.getProcedures().get(name.substring(index + 1)); if (proc != null) { result.add(proc); return result; } } } //assume it's a partial name for (Schema schema : getSchemas().values()) { for (Procedure p : schema.getProcedures().values()) { if (matchesPartialName(name, p.getName(), schema)) { result.add(p); } } } return result; }
public Collection<Procedure> getStoredProcedure(String name) throws TeiidComponentException, QueryMetadataException { List<Procedure> result = new LinkedList<Procedure>(); int index = name.indexOf(TransformationMetadata.DELIMITER_STRING); if (index > -1) { String schemaName = name.substring(0, index); Schema schema = getSchema(schemaName); if (schema != null ) { Procedure proc = schema.getProcedures().get(name.substring(index + 1)); if (proc != null) { result.add(proc); return result; } } } //assume it's a partial name for (Schema schema : getSchemas().values()) { for (Procedure p : schema.getProcedures().values()) { if (matchesPartialName(name, p.getName(), schema)) { result.add(p); } } } return result; }
public Collection<Procedure> getStoredProcedure(String name) throws TeiidComponentException, QueryMetadataException { List<Procedure> result = new LinkedList<Procedure>(); int index = name.indexOf(TransformationMetadata.DELIMITER_STRING); if (index > -1) { String schemaName = name.substring(0, index); Schema schema = getSchema(schemaName); if (schema == null ) { throw new QueryMetadataException(QueryPlugin.Event.TEIID30352, name+TransformationMetadata.NOT_EXISTS_MESSAGE); } Procedure proc = schema.getProcedures().get(name.substring(index + 1)); if (proc != null) { result.add(proc); return result; } } //assume it's a partial name for (Schema schema : getSchemas().values()) { for (Procedure p : schema.getProcedures().values()) { if (matchesPartialName(name, p.getName(), schema)) { result.add(p); } } } return result; }