FileDocCategorySizeDatePackage
SqlMapAccountDao.javaAPI DocExample1705Sat Dec 27 17:31:48 GMT 2003org.springframework.samples.jpetstore.dao.ibatis

SqlMapAccountDao

public class SqlMapAccountDao extends org.springframework.orm.ibatis.support.SqlMapDaoSupport implements org.springframework.samples.jpetstore.dao.AccountDao

Fields Summary
Constructors Summary
Methods Summary
public org.springframework.samples.jpetstore.domain.AccountgetAccount(java.lang.String username)

    return (Account) getSqlMapTemplate().executeQueryForObject("getAccountByUsername", username);
  
public org.springframework.samples.jpetstore.domain.AccountgetAccount(java.lang.String username, java.lang.String password)

    Account account = new Account();
    account.setUsername(username);
    account.setPassword(password);
    return (Account) getSqlMapTemplate().executeQueryForObject("getAccountByUsernameAndPassword", account);
  
public java.util.ListgetUsernameList()

		return getSqlMapTemplate().executeQueryForList("getUsernameList", null);
	
public voidinsertAccount(org.springframework.samples.jpetstore.domain.Account account)

    getSqlMapTemplate().executeUpdate("insertAccount", account);
    getSqlMapTemplate().executeUpdate("insertProfile", account);
    getSqlMapTemplate().executeUpdate("insertSignon", account);
  
public voidupdateAccount(org.springframework.samples.jpetstore.domain.Account account)

    getSqlMapTemplate().executeUpdate("updateAccount", account);
    getSqlMapTemplate().executeUpdate("updateProfile", account);
    if (account.getPassword() != null && account.getPassword().length() > 0) {
      getSqlMapTemplate().executeUpdate("updateSignon", account);
    }