首页>代码>用Hibernate实现领域对象的自定义字段>/customfieldsdemo/src/com/enterra/customfieldsdemo/domain/CustomizableEntity.java
package com.enterra.customfieldsdemo.domain; import java.util.HashMap; import java.util.Map; public abstract class CustomizableEntity { private Map customProperties; public Map getCustomProperties() { if (customProperties == null) customProperties = new HashMap(); return customProperties; } public void setCustomProperties(Map customProperties) { this.customProperties = customProperties; } public Object getValueOfCustomField(String name) { return getCustomProperties().get(name); } public void setValueOfCustomField(String name, Object value) { getCustomProperties().put(name, value); } }
最近下载更多
dd1995 LV9
2020年1月17日
luohaipeng LV23
2019年11月19日
RicardoWX LV7
2018年6月10日
小白袁 LV1
2018年5月17日
andycoder LV2
2018年5月3日
nonaddress LV1
2018年2月28日
xiayulin1983 LV2
2017年11月13日
bhkkvip LV1
2017年7月3日
a337214749 LV2
2017年6月27日
sf0001 LV2
2016年12月18日