本文整理汇总了Java中mxmodelreflection.proxies.Parameter类的典型用法代码示例。如果您正苦于以下问题:Java Parameter类的具体用法?Java Parameter怎么用?Java Parameter使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
Parameter类属于mxmodelreflection.proxies包,在下文中一共展示了Parameter类的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: handleMicroflowParams
import mxmodelreflection.proxies.Parameter; //导入依赖的package包/类
private List<IMendixObject> handleMicroflowParams(IContext context, String microflowName, IMendixObject obj) throws CoreException
{
Map<String, IMendixObject> existingParams = new HashMap<String, IMendixObject>();
List<IMendixObject> params = Core.retrieveXPathQuery(context, "//" + Parameter.getType() + "[" + Microflows.MemberNames.Microflows_InputParameter + "='" + obj.getId().toLong() + "']");
for(IMendixObject param : params)
existingParams.put((String)param.getValue(context, Parameter.MemberNames.Name.toString()), param);
List<IMendixIdentifier> inputParameterIds = new ArrayList<IMendixIdentifier>();
List<IMendixObject> inputParameterObjs = new ArrayList<IMendixObject>();
for(Entry<String,IDataType> entry : Core.getInputParameters(microflowName).entrySet())
{
String inputParameterName = entry.getKey();
IDataType inputParameterType = entry.getValue();
IMendixObject parameter;
if(existingParams.containsKey(inputParameterName))
{
parameter = existingParams.get(inputParameterName);
existingParams.remove(inputParameterName);
}
else
parameter = Core.instantiate(context, Parameter.getType());
parameter.setValue(context, Parameter.MemberNames.Name.toString(), inputParameterName);
parameter.setValue(context, Parameter.MemberNames.Parameter_ValueType.toString(), this.builder.getTypeId(context, inputParameterType));
parameter.setValue(context, Parameter.MemberNames.Parameter_MxObjectType.toString(), this.builder.getObjectTypeId(context, inputParameterType));
inputParameterObjs.add( parameter );
inputParameterIds.add(parameter.getId());
}
obj.setValue(context, Microflows.MemberNames.Microflows_Output_Type.toString(), this.builder.getTypeId(context, Core.getReturnType(microflowName)));
obj.setValue(context, Microflows.MemberNames.Microflows_InputParameter.toString(), inputParameterIds);
this.builder.removeDeletedObjects(context, existingParams);
return inputParameterObjs;
}
示例2: removeDeletedObjects
import mxmodelreflection.proxies.Parameter; //导入依赖的package包/类
protected void removeDeletedObjects(IContext context, Map<String,IMendixObject> objects) throws CoreException {
String attrName = null;
for(Entry<String, IMendixObject> entry : objects.entrySet()) {
IMendixObject entryObj = entry.getValue();
if( attrName == null ) {
if( Parameter.entityName.equals(entryObj.getType()) )
attrName = "Name";
else
attrName = "CompleteName";
}
this._logNode .debug("Removing: " + entryObj.getValue(context, attrName));
Core.delete(context, entryObj);
}
}