/**/
/*
* Copyright (C) 2000-2007 Wang Pengcheng <wpc0000@gmail.com>
* Licensed to the Wang Pengcheng under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The LGPL licenses this file to You under the GNU Lesser General Public
* Licence, Version 2.0 (the "License"); you may not use this file except in
* compliance with the License. You may obtain a copy of the License at
*
*
http://www.gnu.org/licenses/lgpl.txt
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
//
Edit 15 Jan 2008
package
com.studyspring.ch5;
public
class
Order
...
{
private
int
id;
private
int
level;
private
String name;
public
int
getId()
...
{
return
id;
}
public
void
setId(
int
id)
...
{
this
.id
=
id;
}
public
int
getLevel()
...
{
return
level;
}
public
void
setLevel(
int
level)
...
{
this
.level
=
level;
}
public
String getName()
...
{
return
name;
}
public
void
setName(String name)
...
{
this
.name
=
name;
}
}
实现RowMapper:
/**/
/*
* Copyright (C) 2000-2007 Wang Pengcheng <wpc0000@gmail.com>
* Licensed to the Wang Pengcheng under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The LGPL licenses this file to You under the GNU Lesser General Public
* Licence, Version 2.0 (the "License"); you may not use this file except in
* compliance with the License. You may obtain a copy of the License at
*
*
http://www.gnu.org/licenses/lgpl.txt
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
//
Edit 15 Jan 2008
package
com.studyspring.ch5;
import
java.sql.ResultSet;
import
java.sql.SQLException;
import
org.springframework.jdbc.core.RowMapper;
public
class
OrderRowMapper
implements
RowMapper
...
{