本文整理汇总了Java中pt.ist.fenixWebFramework.rendererExtensions.converters.DomainObjectKeyConverter类的典型用法代码示例。如果您正苦于以下问题:Java DomainObjectKeyConverter类的具体用法?Java DomainObjectKeyConverter怎么用?Java DomainObjectKeyConverter使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
DomainObjectKeyConverter类属于pt.ist.fenixWebFramework.rendererExtensions.converters包,在下文中一共展示了DomainObjectKeyConverter类的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getNextDomainObjectConverter
import pt.ist.fenixWebFramework.rendererExtensions.converters.DomainObjectKeyConverter; //导入依赖的package包/类
private String getNextDomainObjectConverter() {
if (getConverter() != null) {
return getConverter();
}
HiddenSlot slot = getContainerParent().getHiddenSlot(getSlot());
if (slot != null) {
return DomainObjectKeyArrayConverter.class.getName();
}
if (isMultiple()) {
return DomainObjectKeyArrayConverter.class.getName();
}
return DomainObjectKeyConverter.class.getName();
}
示例2: convert
import pt.ist.fenixWebFramework.rendererExtensions.converters.DomainObjectKeyConverter; //导入依赖的package包/类
@Override
public Object convert(Class type, Object value) {
if (value == null) {
return null;
}
final DomainObjectKeyConverter converter = new DomainObjectKeyConverter();
final List<SelectedCurricularCourse> result = new ArrayList<SelectedCurricularCourse>();
final String[] values = (String[]) value;
for (String key : values) {
String[] parts = key.split(",");
if (parts.length < 3) {
throw new ConversionException("invalid key format: " + key);
}
final CurricularCourse curricularCourse = (CurricularCourse) converter.convert(type, parts[0]);
final CurriculumGroup curriculumGroup = (CurriculumGroup) converter.convert(type, parts[1]);
final StudentCurricularPlan studentCurricularPlan = (StudentCurricularPlan) converter.convert(type, parts[2]);
final SelectedCurricularCourse selectedCurricularCourse =
new SelectedCurricularCourse(curricularCourse, studentCurricularPlan);
selectedCurricularCourse.setCurriculumGroup(curriculumGroup);
result.add(selectedCurricularCourse);
}
return result;
}
示例3: convert
import pt.ist.fenixWebFramework.rendererExtensions.converters.DomainObjectKeyConverter; //导入依赖的package包/类
@Override
public Object convert(Class type, Object value) {
if (value == null || "".equals(value)) {
return null;
}
String text = (String) value;
if (text.equals(TYPING_VALUE)) {
return null;
}
String key = text;
return new DomainObjectKeyConverter().convert(type, key);
}
示例4: getConverter
import pt.ist.fenixWebFramework.rendererExtensions.converters.DomainObjectKeyConverter; //导入依赖的package包/类
@Override
public Converter getConverter() {
return new DomainObjectKeyConverter();
}
示例5: getConverter
import pt.ist.fenixWebFramework.rendererExtensions.converters.DomainObjectKeyConverter; //导入依赖的package包/类
@Override
public Converter getConverter() {
return new DomainObjectKeyConverter();
}