本文整理汇总了Java中org.ofbiz.entity.model.ModelViewEntity.ModelMemberEntity类的典型用法代码示例。如果您正苦于以下问题:Java ModelMemberEntity类的具体用法?Java ModelMemberEntity怎么用?Java ModelMemberEntity使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
ModelMemberEntity类属于org.ofbiz.entity.model.ModelViewEntity包,在下文中一共展示了ModelMemberEntity类的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getOneRealEntityName
import org.ofbiz.entity.model.ModelViewEntity.ModelMemberEntity; //导入依赖的package包/类
public String getOneRealEntityName() {
// return first entity name for memberModelMemberEntities Map
if (this.memberModelMemberEntities.size() == 0) {
return null;
}
ModelMemberEntity modelMemberEntity = this.memberModelMemberEntities.entrySet().iterator().next().getValue();
return modelMemberEntity.getEntityName();
}
示例2: getViewElement
import org.ofbiz.entity.model.ModelViewEntity.ModelMemberEntity; //导入依赖的package包/类
public Element getViewElement(Document doc, String entityName) {
Element viewElement = doc.createElement("view-entity");
viewElement.setAttribute("entity-name", entityName);
for (ModelMemberEntity member: memberModelMemberEntities.values()) {
Element memberElement = doc.createElement("member-entity");
memberElement.setAttribute("entity-alias", member.getEntityAlias());
memberElement.setAttribute("entity-name", member.getEntityName());
viewElement.appendChild(memberElement);
}
for (ModelAliasAll aliasAll: aliasAlls) {
Element aliasAllElement = doc.createElement("alias-all");
aliasAllElement.setAttribute("entity-alias", aliasAll.getEntityAlias());
if (UtilValidate.isNotEmpty(aliasAll.getPrefix())) aliasAllElement.setAttribute("prefix", aliasAll.getPrefix());
if (aliasAll.getGroupBy()) aliasAllElement.setAttribute("group-by", "true");
if (UtilValidate.isNotEmpty(aliasAll.getFunction())) aliasAllElement.setAttribute("function", aliasAll.getFunction());
for (String excludeField: aliasAll) {
Element excludeElement = doc.createElement("exclude");
excludeElement.setAttribute("field", excludeField);
aliasAllElement.appendChild(excludeElement);
}
viewElement.appendChild(aliasAllElement);
}
for (ModelAlias alias: aliases) {
Element aliasElement = doc.createElement("alias");
aliasElement.setAttribute("entity-alias", alias.getEntityAlias());
aliasElement.setAttribute("name", alias.getName());
if (!alias.getName().equals(alias.getField())) aliasElement.setAttribute("field", alias.getField());
String colAlias = ModelUtil.dbNameToVarName(alias.getColAlias());
if (!alias.getName().equals(colAlias)) aliasElement.setAttribute("col-alias", colAlias);
if (alias.getIsPk() != null) aliasElement.setAttribute("prim-key", alias.getIsPk().toString());
if (alias.getGroupBy()) aliasElement.setAttribute("group-by", "true");
if (UtilValidate.isNotEmpty(alias.getFunction())) aliasElement.setAttribute("function", alias.getFunction());
// TODO: description, complex-alias
viewElement.appendChild(aliasElement);
}
for (ModelViewLink viewLink: viewLinks) {
Element viewLinkElement = doc.createElement("view-link");
viewLinkElement.setAttribute("entity-alias", viewLink.getEntityAlias());
if (viewLink.isRelOptional()) viewLinkElement.setAttribute("rel-optional", "true");
viewLinkElement.setAttribute("rel-entity-alias", viewLink.getRelEntityAlias());
for (ModelKeyMap keyMap: viewLink) {
Element keyMapElement = doc.createElement("key-map");
keyMapElement.setAttribute("field-name", keyMap.getFieldName());
if (!keyMap.getFieldName().equals(keyMap.getRelFieldName())) keyMapElement.setAttribute("rel-field-name", keyMap.getRelFieldName());
viewLinkElement.appendChild(keyMapElement);
}
// TODO: conditions
viewElement.appendChild(viewLinkElement);
}
for (ModelRelation relation: relations) {
viewElement.appendChild(relation.toXmlElement(doc));
}
return viewElement;
}
示例3: addMemberEntity
import org.ofbiz.entity.model.ModelViewEntity.ModelMemberEntity; //导入依赖的package包/类
public void addMemberEntity(String entityAlias, String entityName) {
ModelMemberEntity modelMemberEntity = new ModelMemberEntity(entityAlias, entityName);
this.memberModelMemberEntities.put(entityAlias, modelMemberEntity);
}
示例4: getModelMemberEntitiesEntryIter
import org.ofbiz.entity.model.ModelViewEntity.ModelMemberEntity; //导入依赖的package包/类
public Iterator<Map.Entry<String, ModelMemberEntity>> getModelMemberEntitiesEntryIter() {
return this.memberModelMemberEntities.entrySet().iterator();
}