本文整理汇总了Java中com.mendix.systemwideinterfaces.core.IMendixObject.getId方法的典型用法代码示例。如果您正苦于以下问题:Java IMendixObject.getId方法的具体用法?Java IMendixObject.getId怎么用?Java IMendixObject.getId使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.mendix.systemwideinterfaces.core.IMendixObject
的用法示例。
在下文中一共展示了IMendixObject.getId方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getTypeId
import com.mendix.systemwideinterfaces.core.IMendixObject; //导入方法依赖的package包/类
protected IMendixIdentifier getTypeId(IContext context, IDataType dataType) throws CoreException {
String valueTypeName = dataType.getDSLType();
if (dataType.getType() == DataTypeEnum.Enumeration)
valueTypeName = "Enum";
else if (dataType.isList())
valueTypeName = "List of type: " + dataType.getObjectType();
else if (dataType.isMendixObject())
valueTypeName = "Object of type: " + dataType.getObjectType();
List<IMendixObject> result = Core.retrieveXPathQuery(context, "//" + ValueType.getType() + "[" + ValueType.MemberNames.Name + "='" + valueTypeName + "']");
if (result.size() > 0)
return result.get(0).getId();
IMendixObject memberTypeObject = Core.instantiate(context, ValueType.getType());
memberTypeObject.setValue(context, ValueType.MemberNames.Name.toString(), valueTypeName);
memberTypeObject.setValue(context, ValueType.MemberNames.ValueType_MxObjectType.toString(), this.getObjectTypeId(context, dataType));
PrimitiveTypes type = getPrimitiveTypesFromDatatype(dataType);
memberTypeObject.setValue(context, ValueType.MemberNames.TypeEnum.toString(), (type == null ? null : type.toString()));
Core.commit(context, memberTypeObject);
return memberTypeObject.getId();
}
示例2: getCloneOfObject
import com.mendix.systemwideinterfaces.core.IMendixObject; //导入方法依赖的package包/类
private static IMendixIdentifier getCloneOfObject(IContext ctx, IMendixObject src,
List<String> toskip, List<String> tokeep, List<String> revAssoc,
List<String> skipEntities, List<String> skipModules,
Map<IMendixIdentifier, IMendixIdentifier> mappedObjects) throws CoreException
{
String objType = src.getMetaObject().getName();
String modName = src.getMetaObject().getModuleName();
// if object is already being cloned, return ref to clone
if (mappedObjects.containsKey(src.getId())) {
return mappedObjects.get(src.getId());
// if object should be skipped based on module or entity, return source object
} else if (skipEntities.contains(objType) || skipModules.contains(modName)) {
return src.getId();
// if not already being cloned, create clone
} else {
IMendixObject clone = Core.instantiate(ctx, src.getType());
duplicate(ctx, src, clone, toskip, tokeep, revAssoc, skipEntities, skipModules, mappedObjects);
return clone.getId();
}
}