本文整理汇总了Java中org.kuali.rice.krad.util.DataTypeUtil.determineFieldDataType方法的典型用法代码示例。如果您正苦于以下问题:Java DataTypeUtil.determineFieldDataType方法的具体用法?Java DataTypeUtil.determineFieldDataType怎么用?Java DataTypeUtil.determineFieldDataType使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.kuali.rice.krad.util.DataTypeUtil
的用法示例。
在下文中一共展示了DataTypeUtil.determineFieldDataType方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: buildRemotableFieldFromAttributeDefinition
import org.kuali.rice.krad.util.DataTypeUtil; //导入方法依赖的package包/类
@Override
public RemotableAttributeField buildRemotableFieldFromAttributeDefinition(String componentClassName,
String attributeName) {
AttributeDefinition baseDefinition;
Class<?> componentClass;
// try to resolve the component name - if not possible - try to pull the definition from the app mediation service
try {
componentClass = Class.forName(componentClassName);
baseDefinition = getDataDictionaryService().getDataDictionary().getDictionaryObjectEntry(componentClassName)
.getAttributeDefinition(attributeName);
} catch (ClassNotFoundException ex) {
throw new RiceRuntimeException("Unable to find attribute definition for attribute : " + attributeName);
}
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().booleanValue());
}
definition.setForceUpperCase(baseDefinition.getForceUppercase().booleanValue());
//set the datatype - needed for successful custom doc searches
String dataType = DataTypeUtil.determineFieldDataType((Class<? extends BusinessObject>) componentClass,
attributeName);
definition.setDataType(DataType.valueOf(dataType.toUpperCase()));
RemotableAbstractControl.Builder control = createControl(baseDefinition);
if (control != null) {
definition.setControl(control);
}
RemotableQuickFinder.Builder qf = createQuickFinder(componentClass, attributeName);
if (qf != null) {
definition.setWidgets(Collections.<RemotableAbstractWidget.Builder>singletonList(qf));
}
return definition.build();
}
示例2: determineFieldDataType
import org.kuali.rice.krad.util.DataTypeUtil; //导入方法依赖的package包/类
public String determineFieldDataType(Class<? extends BusinessObject> businessObjectClass, String attributeName) {
return DataTypeUtil.determineFieldDataType(businessObjectClass, attributeName);
}
示例3: buildRemotableFieldFromAttributeDefinition
import org.kuali.rice.krad.util.DataTypeUtil; //导入方法依赖的package包/类
/**
* @see org.kuali.rice.krad.service.DataDictionaryRemoteFieldService#buildRemotableFieldFromAttributeDefinition(java.lang.String,
* java.lang.String)
*/
public RemotableAttributeField buildRemotableFieldFromAttributeDefinition(String componentClassName,
String attributeName) {
AttributeDefinition baseDefinition;
Class<?> componentClass;
// try to resolve the component name - if not possible - try to pull the definition from the app mediation service
try {
componentClass = (Class<? extends BusinessObject>) Class.forName(componentClassName);
baseDefinition = getDataDictionaryService().getDataDictionary().getDictionaryObjectEntry(componentClassName)
.getAttributeDefinition(attributeName);
} catch (ClassNotFoundException ex) {
throw new RiceRuntimeException("Unable to find attribute definition for attribute : " + attributeName);
}
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());
}
definition.setForceUpperCase(baseDefinition.getForceUppercase());
//set the datatype - needed for successful custom doc searches
String dataType = DataTypeUtil.determineFieldDataType((Class<? extends BusinessObject>) componentClass,
attributeName);
definition.setDataType(DataType.valueOf(dataType.toUpperCase()));
RemotableAbstractControl.Builder control = createControl(baseDefinition);
if (control != null) {
definition.setControl(control);
}
RemotableQuickFinder.Builder qf = createQuickFinder(componentClass, attributeName);
if (qf != null) {
definition.setWidgets(Collections.<RemotableAbstractWidget.Builder>singletonList(qf));
}
return definition.build();
}