本文整理匯總了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);
}
}