本文整理匯總了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();
}