本文整理汇总了Java中org.kuali.rice.krad.datadictionary.AttributeDefinition.getForceUppercase方法的典型用法代码示例。如果您正苦于以下问题:Java AttributeDefinition.getForceUppercase方法的具体用法?Java AttributeDefinition.getForceUppercase怎么用?Java AttributeDefinition.getForceUppercase使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.kuali.rice.krad.datadictionary.AttributeDefinition
的用法示例。
在下文中一共展示了AttributeDefinition.getForceUppercase方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getAttributeForceUppercase
import org.kuali.rice.krad.datadictionary.AttributeDefinition; //导入方法依赖的package包/类
/**
* @see org.kuali.rice.krad.service.DataDictionaryService#getAttributeForceUppercase(java.lang.String)
*/
@Override
public Boolean getAttributeForceUppercase(String entryName,
String attributeName) throws UnknownBusinessClassAttributeException {
Boolean forceUppercase = null;
AttributeDefinition attributeDefinition = getAttributeDefinition(entryName, attributeName);
if (attributeDefinition == null) {
throw new UnknownBusinessClassAttributeException(
"Could not find a matching data dictionary business class attribute entry for " + entryName + "." +
attributeName);
}
forceUppercase = attributeDefinition.getForceUppercase();
return forceUppercase;
}
示例2: getAttributeForceUppercase
import org.kuali.rice.krad.datadictionary.AttributeDefinition; //导入方法依赖的package包/类
@Override
public Boolean getAttributeForceUppercase(String entryName,
String attributeName) throws UnknownBusinessClassAttributeException {
Boolean forceUppercase = null;
AttributeDefinition attributeDefinition = getAttributeDefinition(entryName, attributeName);
if (attributeDefinition == null) {
throw new UnknownBusinessClassAttributeException(
"Could not find a matching data dictionary business class attribute entry for " + entryName + "." +
attributeName);
}
forceUppercase = attributeDefinition.getForceUppercase();
return forceUppercase;
}
示例3: getDataDictionaryAttributeDefinition
import org.kuali.rice.krad.datadictionary.AttributeDefinition; //导入方法依赖的package包/类
/**
* @param namespaceCode
* @param typeAttribute
* @return an AttributeDefinition for the given KimTypeAttribute, or null no base AttributeDefinition
* matches the typeAttribute parameter's attributeName.
*/
protected KimAttributeField getDataDictionaryAttributeDefinition( String namespaceCode, String kimTypeId, KimTypeAttribute typeAttribute, List<String> uniqueAttributes) {
final String componentClassName = typeAttribute.getKimAttribute().getComponentName();
final String attributeName = typeAttribute.getKimAttribute().getAttributeName();
final Class<? extends BusinessObject> componentClass;
final AttributeDefinition baseDefinition;
// try to resolve the component name - if not possible - try to pull the definition from the app mediation service
try {
if (StringUtils.isNotBlank(componentClassName)) {
componentClass = (Class<? extends BusinessObject>) Class.forName(componentClassName);
AttributeDefinition baseDefinitionTemp =
getDataDictionaryService().getDataDictionary().getBusinessObjectEntry(componentClassName)
.getAttributeDefinition(attributeName);
if (baseDefinitionTemp == null) {
baseDefinition = getDataDictionaryService().getDataDictionary().getDataObjectEntry(
componentClassName).getAttributeDefinition(attributeName);
} else {
baseDefinition = baseDefinitionTemp;
}
} else {
baseDefinition = null;
componentClass = null;
}
} catch (ClassNotFoundException ex) {
throw new KimTypeAttributeException(ex);
}
if (baseDefinition == null) {
return null;
}
final RemotableAttributeField.Builder definition = RemotableAttributeField.Builder.create(baseDefinition.getName());
definition.setLongLabel(baseDefinition.getLabel());
definition.setShortLabel(baseDefinition.getShortLabel());
definition.setMaxLength(baseDefinition.getMaxLength());
if (baseDefinition.isRequired() != null) {
definition.setRequired(baseDefinition.isRequired());
} else {
definition.setRequired(false);
}
if (baseDefinition.getForceUppercase() != null) {
definition.setForceUpperCase(baseDefinition.getForceUppercase());
}
definition.setControl(DataDictionaryTypeServiceHelper.toRemotableAbstractControlBuilder(
baseDefinition));
final RemotableQuickFinder.Builder qf = createQuickFinder(componentClass, attributeName);
if (qf != null) {
definition.setWidgets(Collections.<RemotableAbstractWidget.Builder>singletonList(qf));
}
final KimAttributeField.Builder kimField = KimAttributeField.Builder.create(definition, typeAttribute.getKimAttribute().getId());
if(uniqueAttributes!=null && uniqueAttributes.contains(definition.getName())){
kimField.setUnique(true);
}
return kimField.build();
}