本文整理汇总了Java中org.kuali.rice.krad.bo.DataObjectRelationship.getUserVisibleIdentifierKey方法的典型用法代码示例。如果您正苦于以下问题:Java DataObjectRelationship.getUserVisibleIdentifierKey方法的具体用法?Java DataObjectRelationship.getUserVisibleIdentifierKey怎么用?Java DataObjectRelationship.getUserVisibleIdentifierKey使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.kuali.rice.krad.bo.DataObjectRelationship
的用法示例。
在下文中一共展示了DataObjectRelationship.getUserVisibleIdentifierKey方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: generateLookupParameters
import org.kuali.rice.krad.bo.DataObjectRelationship; //导入方法依赖的package包/类
protected void generateLookupParameters(InputField field, DataObjectRelationship relationship) {
lookupParameters = new HashMap<String, String>();
for (Map.Entry<String, String> entry : relationship.getParentToChildReferences().entrySet()) {
String fromField = entry.getKey();
String toField = entry.getValue();
// TODO: displayedFieldnames and displayedQFFieldNames in
// generateLookupParameters(BusinessObject,
// String, DataObjectRelationship, String, List, String)
if (relationship.getUserVisibleIdentifierKey() == null || relationship.getUserVisibleIdentifierKey().equals(
fromField)) {
lookupParameters.put(fromField, toField);
}
}
}
示例2: generateLookupParameters
import org.kuali.rice.krad.bo.DataObjectRelationship; //导入方法依赖的package包/类
/**
* Generates the lookup parameters based on the references from the given relationship.
*
* @param relationship relationship lookup parameters will be generated from
*/
protected void generateLookupParameters(DataObjectRelationship relationship) {
lookupParameters = new HashMap<String, String>();
for (Map.Entry<String, String> entry : relationship.getParentToChildReferences().entrySet()) {
String fromField = entry.getKey();
String toField = entry.getValue();
if (relationship.getUserVisibleIdentifierKey() == null || relationship.getUserVisibleIdentifierKey().equals(
fromField)) {
lookupParameters.put(fromField, toField);
}
}
}
示例3: generateLookupParameters
import org.kuali.rice.krad.bo.DataObjectRelationship; //导入方法依赖的package包/类
@Deprecated
private static String generateLookupParameters(Object businessObject, String collectionName, DataObjectRelationship relationship, String propertyPrefix, List displayedFieldNames, String nestedObjectPrefix) {
String lookupParameters = "";
List displayedQFFieldNames = getBusinessObjectDictionaryService().getLookupFieldNames(relationship.getRelatedClass());
for ( Map.Entry<String,String> entry : relationship.getParentToChildReferences().entrySet() ) {
String fromField = entry.getKey();
String toField = entry.getValue();
if ( relationship.getUserVisibleIdentifierKey() == null || relationship.getUserVisibleIdentifierKey().equals( fromField ) ) {
// find the displayed from field mapping
if (!displayedFieldNames.contains(fromField)) {
fromField = translateToDisplayedField(businessObject.getClass(), fromField, displayedFieldNames);
}
// translate to field
if (displayedQFFieldNames != null && !displayedQFFieldNames.contains(toField)) {
toField = translateToDisplayedField(relationship.getRelatedClass(), toField, displayedQFFieldNames);
}
if (StringUtils.isNotBlank(lookupParameters)) {
lookupParameters += ",";
}
if (propertyPrefix != null && !propertyPrefix.equals("")) {
fromField = propertyPrefix + "." + fromField;
}
if ( StringUtils.isNotEmpty( collectionName ) ) {
fromField = collectionName + fromField;
}
lookupParameters += fromField + ":" + toField;
}
}
return lookupParameters;
}
示例4: generateLookupParameters
import org.kuali.rice.krad.bo.DataObjectRelationship; //导入方法依赖的package包/类
@Deprecated
private static String generateLookupParameters(BusinessObject businessObject, String collectionName, DataObjectRelationship relationship, String propertyPrefix, List displayedFieldNames, String nestedObjectPrefix) {
String lookupParameters = "";
List displayedQFFieldNames = getBusinessObjectDictionaryService().getLookupFieldNames(relationship.getRelatedClass());
for ( Map.Entry<String,String> entry : relationship.getParentToChildReferences().entrySet() ) {
String fromField = entry.getKey();
String toField = entry.getValue();
if ( relationship.getUserVisibleIdentifierKey() == null || relationship.getUserVisibleIdentifierKey().equals( fromField ) ) {
// find the displayed from field mapping
if (!displayedFieldNames.contains(fromField)) {
fromField = translateToDisplayedField(businessObject.getClass(), fromField, displayedFieldNames);
}
// translate to field
if (displayedQFFieldNames != null && !displayedQFFieldNames.contains(toField)) {
toField = translateToDisplayedField(relationship.getRelatedClass(), toField, displayedQFFieldNames);
}
if (StringUtils.isNotBlank(lookupParameters)) {
lookupParameters += ",";
}
if (propertyPrefix != null && !propertyPrefix.equals("")) {
fromField = propertyPrefix + "." + fromField;
}
if ( StringUtils.isNotEmpty( collectionName ) ) {
fromField = collectionName + fromField;
}
lookupParameters += fromField + ":" + toField;
}
}
return lookupParameters;
}