本文整理了Java中org.teiid.metadata.Procedure.setName()
方法的一些代码示例,展示了Procedure.setName()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Procedure.setName()
方法的具体详情如下:
包路径:org.teiid.metadata.Procedure
类名称:Procedure
方法名:setName
暂无
代码示例来源:origin: teiid/teiid
/**
* Add a procedure with the given name to the model.
* @param name
* @return
* @throws MetadataException
*/
public Procedure addProcedure(String name) {
Assertion.isNotNull(name, "name cannot be null"); //$NON-NLS-1$
Procedure procedure = new Procedure();
if (nameFormat != null) {
name = String.format(nameFormat, name);
}
if (renameAllDuplicates) {
name = checkForDuplicate(name, (s)->this.schema.getProcedure(s) != null, "Procedure"); //$NON-NLS-1$
}
procedure.setName(name);
setUUID(procedure);
procedure.setParameters(new LinkedList<ProcedureParameter>());
this.schema.addProcedure(procedure);
return procedure;
}
代码示例来源:origin: teiid/teiid
/**
* Create stored procedure.
* @param name Name of procedure, must match model name
* @param model Metadata object for the model
* @param params List of FakeMetadataObject that are the parameters for the procedure
* @return Metadata object for stored procedure
*/
public static Procedure createStoredProcedure(String name, Schema model, List<ProcedureParameter> params) {
Procedure proc = new Procedure();
proc.setName(name);
proc.setNameInSource(name);
if (params != null) {
int index = 1;
for (ProcedureParameter procedureParameter : params) {
procedureParameter.setProcedure(proc);
procedureParameter.setPosition(index++);
}
proc.setParameters(params);
}
model.addProcedure(proc);
return proc;
}
内容来源于网络,如有侵权,请联系作者删除!