xfire 集合 aegis
来源:互联网 发布:教务管理数据库 编辑:程序博客网 时间:2024/05/06 18:42
fire 集合 aegis
接口类ListService
@SuppressWarnings("unchecked")
public interface ListService
{
public List getString();
public List getListofListofString();
public Map getStringMap(Map map);
public Map getMapofMapofString(Map map);
}
实现接口类ListServiceImp
@SuppressWarnings("unchecked")
public class ListServiceImp implements ListService
{
public List getListofListofString()
{
List list = new ArrayList();
for(int i=0; i<5; i++)
{
list.add(getString());
}
return list;
}
public List getString()
{
List list = new ArrayList();
for(int i=0; i<5; i++)
{
list.add(i+"==");
}
return list;
}
@Override
public Map getMapofMapofString(Map mapP)
{
Map map = new HashMap();
Iterator it = mapP.keySet().iterator();
while(it.hasNext())
{
int key = (Integer)it.next();
map.put(key, getStringMap(mapP));
}
return map;
}
@Override
public Map getStringMap(Map mapP)
{
Map map = new HashMap();
Iterator it = mapP.keySet().iterator();
while(it.hasNext())
{
int key = (Integer)it.next();
int value = (Integer)mapP.get(key);
map.put(key, value+":"+value);
}
return map;
}
}
集合对象绑定ListService.aegis.xml 此文件写接口名一样
<?xml version="1.0" encoding="UTF-8"?>
<mappings>
<mapping>
<method name="getString">
<return-type componentType="java.lang.String" />
</method>
<method name="getListofListofString">
<return-type componentType="#someString" />
</method>
<component name="someString" class="java.util.List" componentType="java.lang.String" />
<method name="getStringMap">
<return-type componentType="java.lang.String" />
</method>
<method name="getMapofMapofString">
<return-type componentType="#someMap" />
</method>
<component name="someMap" class="java.util.Map" componentType="java.lang.String" />
</mapping>
</mappings>
@SuppressWarnings("unchecked")
public interface ListService
{
public List getString();
public List getListofListofString();
public Map getStringMap(Map map);
public Map getMapofMapofString(Map map);
}
实现接口类ListServiceImp
@SuppressWarnings("unchecked")
public class ListServiceImp implements ListService
{
public List getListofListofString()
{
List list = new ArrayList();
for(int i=0; i<5; i++)
{
list.add(getString());
}
return list;
}
public List getString()
{
List list = new ArrayList();
for(int i=0; i<5; i++)
{
list.add(i+"==");
}
return list;
}
@Override
public Map getMapofMapofString(Map mapP)
{
Map map = new HashMap();
Iterator it = mapP.keySet().iterator();
while(it.hasNext())
{
int key = (Integer)it.next();
map.put(key, getStringMap(mapP));
}
return map;
}
@Override
public Map getStringMap(Map mapP)
{
Map map = new HashMap();
Iterator it = mapP.keySet().iterator();
while(it.hasNext())
{
int key = (Integer)it.next();
int value = (Integer)mapP.get(key);
map.put(key, value+":"+value);
}
return map;
}
}
集合对象绑定ListService.aegis.xml 此文件写接口名一样
<?xml version="1.0" encoding="UTF-8"?>
<mappings>
<mapping>
<method name="getString">
<return-type componentType="java.lang.String" />
</method>
<method name="getListofListofString">
<return-type componentType="#someString" />
</method>
<component name="someString" class="java.util.List" componentType="java.lang.String" />
<method name="getStringMap">
<return-type componentType="java.lang.String" />
</method>
<method name="getMapofMapofString">
<return-type componentType="#someMap" />
</method>
<component name="someMap" class="java.util.Map" componentType="java.lang.String" />
</mapping>
</mappings>
- xfire 集合 aegis
- XFire的aegis绑定!!!
- org.codehaus.xfire.aegis.AegisBindingProvider
- Xfire的aegis绑定方式配置小结
- Xfire的aegis绑定方式配置
- Xfire的aegis绑定方式配置小结
- Xfire的aegis绑定方式配置小结
- Xfire的aegis绑定方式配置
- Xfire的aegis绑定方式配置小结
- Xfire的aegis绑定方式配置小结
- Xfire的aegis绑定方式配置小结
- Aegis绑定方式传递集合!!!
- XFire绑定Aegis自定义友好参数(复杂对象)
- java.lang.NoSuchMethodError: org.codehaus.xfire.aegis.type.java5.Java5TypeCreator.getTopCreator()
- Aegis 默认的 Xfire 绑定方式,将 XML 映射为 POJO
- xfire 里的集合Mapping
- xfire中对集合的配置
- xfire
- Javascript曲线表作图库 dygraphs
- 解决Mysql连接池被关闭 ,hibernate尝试连接不能连接的问题。 (默认mysql连接池可以访问的时间为8小时,如果超过8小时没有连接,mysql会自动关闭连接池。
- HTTP协议详解
- android 下的push技术
- VisionMobile:2012年移动开发者经济报告(十一):五、走向本地化(下)
- xfire 集合 aegis
- GridView默认项高亮
- 基于Eclipse的Hadoop应用开发环境的配置
- QWidget背景(透明)问题
- 杭电2033
- 修改Bugfree实现多指派 必填项 下拉列表 提示信息
- 各种字符编码方式详解及由来
- 第四章学习笔记 Tomcat服务器的安装及配置
- 各种波长