jStorm ORM对象关系映射工具
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 );
评论