???????????????
???????????? ???????[ 2013/3/4 14:27:22 ] ????????
??Щ????????????????????????????Щ??á????е?????????java?????д????????????Щ????????????????????????á???????????????????????????????
?????????????????????????SQL??????Щ?洢??????????????ó??????????????м?????????????в??????????????????????????????????????
??? ?????????????????
???????Щ??????????????????????????????????????????????????д????????????????????????У??????????????????е????????????????????????????????????
????????????????????????????????????????????飬?????????????????????????????????????????????????????????????o??????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????б?????δ????????????????????г???????????????????????????????????????????????????????????????????????????????б??????
????????????????????????????????Χ????????????????????????????????????????????????????????????????????Щ??????????????????д?????????????????????????????????д?????????????????????????
???? ??????????????????
?????????????????????????????????????????????????????????????????????????????????e???????????????????????
???????????????洢?????????д???????????????????????????Щ???????μ?????????????
public class UserDatabase
{
...
public void insert(User user)
{
PreparedStatement ps = connection.prepareCall("{ call User_insert(????) }");
ps.setString(1?? user.getEmail());
ps.setString(2?? user.isBad()); // In real life?? this would be a boolean.
ps.executeUpdate();
ps.close();
}
...
}
???????????????????
public class TestUserDatabase extends TestCase
{
...
public void testInsert()
{
// Insert a test user:
User user = new User("some@email.address");
UserDatabase database = new UserDatabase();
database.insert(user);
// Make sure the data really got there:
User db_user = database.find("some@email.address");
assertTrue("Expected non-null result"?? db_user != null);
assertEquals("Wrong email"?? "some@email.address"?? db_user.getEmail());
assertEquals("Wrong bad flag"?? false?? db_user.isBad());
}
...
}
??????
???·???
??????????????????
2023/3/23 14:23:39???д?ò??????????
2023/3/22 16:17:39????????????????????Щ??
2022/6/14 16:14:27??????????????????????????
2021/10/18 15:37:44???????????????
2021/9/17 15:19:29???·???????·
2021/9/14 15:42:25?????????????
2021/5/28 17:25:47??????APP??????????
2021/5/8 17:01:11