本文整理了Java中org.teiid.metadata.Procedure.getFullName()
方法的一些代码示例,展示了Procedure.getFullName()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Procedure.getFullName()
方法的具体详情如下:
包路径:org.teiid.metadata.Procedure
类名称:Procedure
方法名:getFullName
暂无
代码示例来源:origin: org.teiid/teiid-olingo
public String getFullName() {
return procedure.getFullName();
}
}
代码示例来源:origin: org.teiid/teiid-olingo
public String buildProcedureSQL() {
StringBuilder sql = new StringBuilder();
// fully qualify the procedure name
if (getReturn().hasResultSet()) {
sql.append("{"); //$NON-NLS-1$
}
else {
sql.append("{? = "); //$NON-NLS-1$
}
sql.append("call ").append(SQLStringVisitor.escapeSinglePart(this.procedure.getFullName())); //$NON-NLS-1$
sql.append("("); //$NON-NLS-1$
boolean first = true;
for (SQLParameter parameter:this.sqlParameters) {
if (!first) {
sql.append(","); //$NON-NLS-1$
}
first = false;
sql.append(SQLStringVisitor.escapeSinglePart(parameter.getName())).append("=>?"); //$NON-NLS-1$
}
sql.append(")"); //$NON-NLS-1$
sql.append("}"); //$NON-NLS-1$
return sql.toString();
}
代码示例来源:origin: teiid/teiid
public ProcedureParameter renameParameter(String oldName, String name, Procedure procedure) {
if (this.autoCorrectColumnNames) {
name = name.replace(AbstractMetadataRecord.NAME_DELIM_CHAR, '_');
} else if (name.indexOf(AbstractMetadataRecord.NAME_DELIM_CHAR) != -1) {
throw new MetadataException(DataPlugin.Event.TEIID60008, DataPlugin.Util.gs(DataPlugin.Event.TEIID60008, procedure.getFullName(), name));
}
if (procedure.getParameterByName(name) != null) {
throw new DuplicateRecordException(DataPlugin.Event.TEIID60016, DataPlugin.Util.gs(DataPlugin.Event.TEIID60016, procedure.getFullName() + AbstractMetadataRecord.NAME_DELIM_CHAR + name));
}
ProcedureParameter param = procedure.getParameterByName(oldName);
if (param == null) {
throw new MetadataException(DataPlugin.Event.TEIID60040, DataPlugin.Util.gs(DataPlugin.Event.TEIID60040, procedure.getFullName(), oldName));
}
param.setName(name);
return param;
}
代码示例来源:origin: org.jboss.teiid/teiid-engine
public static void alterProcedureDefinition(final VDBMetaData vdb, final Procedure p, final String sql, boolean updateStore) {
TransformationMetadata metadata = vdb.getAttachment(TransformationMetadata.class);
DatabaseStore store = vdb.getAttachment(DatabaseStore.class);
try {
Command command = QueryParser.getQueryParser().parseProcedure(p.getQueryPlan(), false);
QueryResolver.resolveCommand(command, new GroupSymbol(p.getFullName()), Command.TYPE_STORED_PROCEDURE, metadata, false);
MetadataValidator.determineDependencies(p, command);
} catch (TeiidException e) {
//should have been caught in validation, but this logic
//is also not mature so since there is no lock on the vdb
//it is possible that the plan is no longer valid at this point due
//to a concurrent execution
}
p.setQueryPlan(sql);
p.setLastModified(System.currentTimeMillis());
metadata.addToMetadataCache(p, "transformation/"+StoredProcedure.class.getSimpleName().toUpperCase(), null); //$NON-NLS-1$
}
代码示例来源:origin: org.teiid/teiid-engine
public static void alterProcedureDefinition(final VDBMetaData vdb, final Procedure p, final String sql, boolean updateStore) {
TransformationMetadata metadata = vdb.getAttachment(TransformationMetadata.class);
DatabaseStore store = vdb.getAttachment(DatabaseStore.class);
try {
Command command = QueryParser.getQueryParser().parseProcedure(p.getQueryPlan(), false);
QueryResolver.resolveCommand(command, new GroupSymbol(p.getFullName()), Command.TYPE_STORED_PROCEDURE, metadata, false);
MetadataValidator.determineDependencies(p, command);
} catch (TeiidException e) {
//should have been caught in validation, but this logic
//is also not mature so since there is no lock on the vdb
//it is possible that the plan is no longer valid at this point due
//to a concurrent execution
}
p.setQueryPlan(sql);
p.setLastModified(System.currentTimeMillis());
metadata.addToMetadataCache(p, "transformation/"+StoredProcedure.class.getSimpleName().toUpperCase(), null); //$NON-NLS-1$
}
代码示例来源:origin: teiid/teiid
public static void alterProcedureDefinition(final VDBMetaData vdb, final Procedure p, final String sql, boolean updateStore) {
TransformationMetadata metadata = vdb.getAttachment(TransformationMetadata.class);
DatabaseStore store = vdb.getAttachment(DatabaseStore.class);
try {
Command command = QueryParser.getQueryParser().parseProcedure(p.getQueryPlan(), false);
QueryResolver.resolveCommand(command, new GroupSymbol(p.getFullName()), Command.TYPE_STORED_PROCEDURE, metadata, false);
MetadataValidator.determineDependencies(p, command);
} catch (TeiidException e) {
//should have been caught in validation, but this logic
//is also not mature so since there is no lock on the vdb
//it is possible that the plan is no longer valid at this point due
//to a concurrent execution
}
p.setQueryPlan(sql);
p.setLastModified(System.currentTimeMillis());
metadata.addToMetadataCache(p, "transformation/"+StoredProcedure.class.getSimpleName().toUpperCase(), null); //$NON-NLS-1$
}
代码示例来源:origin: org.teiid/teiid-olingo
static void buildProcedures(org.teiid.metadata.Schema schema, CsdlSchema csdlSchema) {
// procedures
ArrayList<CsdlComplexType> complexTypes = new ArrayList<CsdlComplexType>();
ArrayList<CsdlFunction> functions = new ArrayList<CsdlFunction>();
ArrayList<CsdlFunctionImport> functionImports = new ArrayList<CsdlFunctionImport>();
ArrayList<CsdlAction> actions = new ArrayList<CsdlAction>();
ArrayList<CsdlActionImport> actionImports = new ArrayList<CsdlActionImport>();
for (Procedure proc : schema.getProcedures().values()) {
if (!allowedProcedure(proc)){
LogManager.logDetail(LogConstants.CTX_ODATA,
ODataPlugin.Util.gs(ODataPlugin.Event.TEIID16032, proc.getFullName()));
continue;
}
if (isFuntion(proc)) {
buildFunction(schema.getName(), proc, complexTypes, functions, functionImports, csdlSchema);
}
else {
buildAction(schema.getName(), proc, complexTypes, actions, actionImports, csdlSchema);
}
}
csdlSchema.setComplexTypes(complexTypes);
csdlSchema.setFunctions(functions);
csdlSchema.setActions(actions);
csdlSchema.getEntityContainer().setFunctionImports(functionImports);
csdlSchema.getEntityContainer().setActionImports(actionImports);
}
代码示例来源:origin: teiid/teiid
public void setProcedureDefinition(final String procedureName, final String definition) {
if (!assertInEditMode(Mode.SCHEMA)) {
return;
}
Procedure procedure = (Procedure)getSchemaRecord(procedureName, ResourceType.PROCEDURE);
assertGrant(Grant.Permission.Privilege.ALTER, Database.ResourceType.PROCEDURE, procedure);
if (!procedure.isVirtual()) {
throw new org.teiid.metadata.MetadataException(QueryPlugin.Event.TEIID31238,
QueryPlugin.Util.gs(QueryPlugin.Event.TEIID31238, procedure.getFullName()));
}
procedure.setQueryPlan(definition);
}
代码示例来源:origin: org.teiid/teiid-engine
public void setProcedureDefinition(final String procedureName, final String definition) {
if (!assertInEditMode(Mode.SCHEMA)) {
return;
}
Procedure procedure = (Procedure)getSchemaRecord(procedureName, ResourceType.PROCEDURE);
assertGrant(Grant.Permission.Privilege.ALTER, Database.ResourceType.PROCEDURE, procedure);
if (!procedure.isVirtual()) {
throw new org.teiid.metadata.MetadataException(QueryPlugin.Event.TEIID31238,
QueryPlugin.Util.gs(QueryPlugin.Event.TEIID31238, procedure.getFullName()));
}
procedure.setQueryPlan(definition);
}
代码示例来源:origin: org.teiid/teiid-engine
public void procedureDropped(String procedureName, Boolean virtual) {
if (!assertInEditMode(Mode.SCHEMA)) {
return;
}
Procedure procedure = (Procedure)getSchemaRecord(procedureName, ResourceType.PROCEDURE);
if (virtual != null && virtual^procedure.isVirtual()) {
throw new org.teiid.metadata.MetadataException(QueryPlugin.Event.TEIID31273,
QueryPlugin.Util.gs(QueryPlugin.Event.TEIID31273, procedure.getFullName()));
}
assertGrant(Grant.Permission.Privilege.DROP, Database.ResourceType.PROCEDURE,
procedure);
Schema s = procedure.getParent();
s.removeProcedure(procedureName);
}
代码示例来源:origin: teiid/teiid
public void procedureDropped(String procedureName, Boolean virtual) {
if (!assertInEditMode(Mode.SCHEMA)) {
return;
}
Procedure procedure = (Procedure)getSchemaRecord(procedureName, ResourceType.PROCEDURE);
if (virtual != null && virtual^procedure.isVirtual()) {
throw new org.teiid.metadata.MetadataException(QueryPlugin.Event.TEIID31273,
QueryPlugin.Util.gs(QueryPlugin.Event.TEIID31273, procedure.getFullName()));
}
assertGrant(Grant.Permission.Privilege.DROP, Database.ResourceType.PROCEDURE,
procedure);
Schema s = procedure.getParent();
s.removeProcedure(procedureName);
}
代码示例来源:origin: org.jboss.teiid/teiid-engine
if ((param1.getType() == Type.In || param1.getType() == Type.InOut)
&& (param1.isVarArg() || (param1.getNullType() != NullType.Nullable && param1.getDefaultValue() == null))) {
metadataValidator.log(report, model, QueryPlugin.Util.gs(QueryPlugin.Event.TEIID31112, p.getFullName()));
metadataValidator.log(report, model, QueryPlugin.Util.gs(QueryPlugin.Event.TEIID31107, p.getFullName()));
metadataValidator.log(report, model, QueryPlugin.Util.gs(QueryPlugin.Event.TEIID31165, p.getFullName(), param.getFullName()));
metadataValidator.log(report, model, QueryPlugin.Util.gs(QueryPlugin.Event.TEIID31106, p.getFullName(), param.getFullName()));
metadataValidator.log(report, model, QueryPlugin.Util.gs(QueryPlugin.Event.TEIID31077, p.getFullName(), model.getName()));
metadataValidator.log(report, model, QueryPlugin.Util.gs(QueryPlugin.Event.TEIID31166, p.getFullName()));
metadataValidator.log(report, model, QueryPlugin.Util.gs(QueryPlugin.Event.TEIID31167, p.getFullName()));
代码示例来源:origin: org.teiid/teiid-engine
if ((param1.getType() == Type.In || param1.getType() == Type.InOut)
&& (param1.isVarArg() || (param1.getNullType() != NullType.Nullable && param1.getDefaultValue() == null))) {
metadataValidator.log(report, model, QueryPlugin.Util.gs(QueryPlugin.Event.TEIID31112, p.getFullName()));
metadataValidator.log(report, model, QueryPlugin.Util.gs(QueryPlugin.Event.TEIID31107, p.getFullName()));
metadataValidator.log(report, model, QueryPlugin.Util.gs(QueryPlugin.Event.TEIID31165, p.getFullName(), param.getFullName()));
metadataValidator.log(report, model, QueryPlugin.Util.gs(QueryPlugin.Event.TEIID31106, p.getFullName(), param.getFullName()));
metadataValidator.log(report, model, QueryPlugin.Util.gs(QueryPlugin.Event.TEIID31077, p.getFullName(), model.getName()));
metadataValidator.log(report, model, QueryPlugin.Util.gs(QueryPlugin.Event.TEIID31166, p.getFullName()));
metadataValidator.log(report, model, QueryPlugin.Util.gs(QueryPlugin.Event.TEIID31167, p.getFullName()));
代码示例来源:origin: teiid/teiid
if ((param1.getType() == Type.In || param1.getType() == Type.InOut)
&& (param1.isVarArg() || (param1.getNullType() != NullType.Nullable && param1.getDefaultValue() == null))) {
metadataValidator.log(report, model, QueryPlugin.Util.gs(QueryPlugin.Event.TEIID31112, p.getFullName()));
metadataValidator.log(report, model, QueryPlugin.Util.gs(QueryPlugin.Event.TEIID31107, p.getFullName()));
metadataValidator.log(report, model, QueryPlugin.Util.gs(QueryPlugin.Event.TEIID31165, p.getFullName(), param.getFullName()));
metadataValidator.log(report, model, QueryPlugin.Util.gs(QueryPlugin.Event.TEIID31106, p.getFullName(), param.getFullName()));
metadataValidator.log(report, model, QueryPlugin.Util.gs(QueryPlugin.Event.TEIID31077, p.getFullName(), model.getName()));
metadataValidator.log(report, model, QueryPlugin.Util.gs(QueryPlugin.Event.TEIID31166, p.getFullName()));
metadataValidator.log(report, model, QueryPlugin.Util.gs(QueryPlugin.Event.TEIID31167, p.getFullName()));
代码示例来源:origin: org.teiid/teiid-olingo
public static ComplexDocumentNode buildComplexDocumentNode(
EdmOperation edmOperation,
MetadataStore metadata, OData odata,
UniqueNameGenerator nameGenerator, boolean useAlias,
UriInfo uriInfo, URLParseService parseService)
throws TeiidProcessingException {
ComplexDocumentNode resource = new ComplexDocumentNode();
FullQualifiedName fqn = edmOperation.getFullQualifiedName();
String withoutVDB = fqn.getNamespace().substring(fqn.getNamespace().lastIndexOf('.')+1);
Schema schema = metadata.getSchema(withoutVDB);
Procedure procedure = schema.getProcedure(edmOperation.getName());
StoredProcedure storedQuery = new StoredProcedure();
storedQuery.setProcedureName(procedure.getFullName()); //$NON-NLS-1$
for (int i = 0; i < procedure.getParameters().size(); i++) {
storedQuery.setParameter(new SPParameter(i+1, new Reference(i)));
}
String group = nameGenerator.getNextGroup();
SubqueryFromClause sfc = new SubqueryFromClause(group, storedQuery); //$NON-NLS-1$
resource.setGroupSymbol(new GroupSymbol(group));
resource.setFromClause(sfc);
resource.procedure = procedure;
return resource;
}
代码示例来源:origin: teiid/teiid
String procedureFullName = procRecord.getFullName();
代码示例来源:origin: org.jboss.teiid/teiid-engine
String procedureFullName = procRecord.getFullName();
代码示例来源:origin: teiid/teiid
if (p.isVirtual()) {
if (p.getQueryPlan() == null) {
metadataValidator.log(report, model, QueryPlugin.Util.gs(QueryPlugin.Event.TEIID31081, p.getFullName(), model.getName()));
代码示例来源:origin: org.jboss.teiid/teiid-engine
if (p.isVirtual()) {
if (p.getQueryPlan() == null) {
metadataValidator.log(report, model, QueryPlugin.Util.gs(QueryPlugin.Event.TEIID31081, p.getFullName(), model.getName()));
代码示例来源:origin: org.teiid/teiid-engine
if (p.isVirtual()) {
if (p.getQueryPlan() == null) {
metadataValidator.log(report, model, QueryPlugin.Util.gs(QueryPlugin.Event.TEIID31081, p.getFullName(), model.getName()));
内容来源于网络,如有侵权,请联系作者删除!