本文整理了Java中com.haulmont.cuba.core.entity.Entity.getInstanceName()
方法的一些代码示例,展示了Entity.getInstanceName()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Entity.getInstanceName()
方法的具体详情如下:
包路径:com.haulmont.cuba.core.entity.Entity
类名称:Entity
方法名:getInstanceName
暂无
代码示例来源:origin: de.diedavids.cuba.entitysoftreference/entity-soft-reference-global
@Nonnull
@Override
public String format(@Nullable Object value) {
return ((Entity) value).getInstanceName();
}
代码示例来源:origin: com.haulmont.reports/reports-global
protected void addProperty(JsonObject jsonObject, String property, Object value) {
if (value instanceof Entity) {
value = ((Entity) value).getInstanceName();
}
jsonObject.add(property, gson.toJsonTree(value));
}
代码示例来源:origin: com.haulmont.reports/reports-core
protected void checkInstanceNameLoaded(Object value) {
if (!(value instanceof Entity || value instanceof EntityMap))
return;
if (value instanceof EntityMap)
value = ((EntityMap) value).getInstance();
try {
((Entity) value).getInstanceName();
}
catch (RuntimeException e) {
throw new ReportFormattingException("Cannot fetch instance name for entity " + value.getClass()
+ ". Please add all attributes used at instance name to report configuration.", e);
}
}
代码示例来源:origin: de.diedavids.cuba.taggable/taggable-web
@Override
protected Collection<KeyValueEntity> getEntities(Map<String, Object> params) {
Tag tag = (Tag) params.get("tag");
Collection<Entity> entitiesWithTag = taggingService.getEntitiesWithTag(tag);
Collection<KeyValueEntity> result = new ArrayList<>();
for (Entity entity : entitiesWithTag) {
KeyValueEntity keyValueEntity = metadata.create(KeyValueEntity.class);
keyValueEntity.setMetaClass(entity.getMetaClass());
keyValueEntity.setValue("instanceName", entity.getInstanceName());
keyValueEntity.setValue("entity", entity);
result.add(keyValueEntity);
}
return result;
}
}
代码示例来源:origin: com.haulmont.fts/fts-core
searchResult.addEntry(new SearchResultEntry(entityId,
entityInfo.getEntityName(),
entity.getInstanceName()));
代码示例来源:origin: com.haulmont.bpm/bpm-gui
protected void initOpenEntityBtn() {
final Entity entity = findEntity(getItem().getEntityName(), getItem().getObjectEntityId());
openEntityBtn.setCaption(entity == null ? getMessage("entityNotDefined") : entity.getInstanceName());
openEntityBtn.setAction(new BaseAction("openEntity") {
@Override
public void actionPerform(Component component) {
if (entity == null) return;
String entityEditorName = getItem().getEntityEditorName();
if (Strings.isNullOrEmpty(entityEditorName)) {
entityEditorName = getItem().getEntityName() + ".edit";
}
openEditor(entityEditorName, entity, WindowManager.OpenType.THIS_TAB);
}
});
}
代码示例来源:origin: com.haulmont.cuba/cuba-gui
String instanceName = entityVal.getInstanceName();
String str = sizersIndex == 0 ? createSpaceString(level) + instanceName : instanceName;
str = str + childCountValue;
内容来源于网络,如有侵权,请联系作者删除!