当前位置: 软件>java软件
对象关系映射工具 jStorm
本文导语: jStorm (Simple Tool for Object Relational Mapping) 源自 DBObjects,是一个 Java 对象到关系数据库的映射工具。JavaDoc 示例代码: jstorm.mapping.Mapping mapping = new jstorm.mapping.Mapping(); mapping.setTableName( "FooTable" ); mapping.setObjectClass( Foo.class ); mappin...
jStorm (Simple Tool for Object Relational Mapping) 源自 DBObjects,是一个 Java 对象到关系数据库的映射工具。JavaDoc
示例代码:
jstorm.mapping.Mapping mapping = new jstorm.mapping.Mapping(); mapping.setTableName( "FooTable" ); mapping.setObjectClass( Foo.class ); mapping.addAttribute( "bar", "BarColumn", String.class ); jstorm.mapping.SqlRunner runner = new jstorm.mapping.SqlRunner(); runner.doSelect( mapping ); Foo foo = new Foo(); foo.setBar( "Bar" ); jstorm.mapping.SqlRunner runner = new jstorm.mapping.SqlRunner(); runner.doInsert( foo, mapping );