当前位置: 首页>>代码示例>>Java>>正文


Java IMendixObject.getId方法代码示例

本文整理汇总了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();
}
 
开发者ID:appronto,项目名称:RedisConnector,代码行数:23,代码来源:Builder.java

示例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();               
       }
}
 
开发者ID:ako,项目名称:MqttClient,代码行数:22,代码来源:ORM.java


注:本文中的com.mendix.systemwideinterfaces.core.IMendixObject.getId方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。