本文整理汇总了Java中com.alibaba.cobar.manager.dao.xml.UserDAOImple类的典型用法代码示例。如果您正苦于以下问题:Java UserDAOImple类的具体用法?Java UserDAOImple怎么用?Java UserDAOImple使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
UserDAOImple类属于com.alibaba.cobar.manager.dao.xml包,在下文中一共展示了UserDAOImple类的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: initUser
import com.alibaba.cobar.manager.dao.xml.UserDAOImple; //导入依赖的package包/类
private void initUser() {
String path = this.xmlPath + System.getProperty("file.separator") + "user.xml";
init(path, "users");
UserDAOImple userDAO = new UserDAOImple();
userDAO.setXmlFileLoader(xmlFileLoader);
try {
userDAO.afterPropertiesSet();
} catch (Exception e) {
logger.error(e.getMessage(), e);
Assert.fail();
}
UserDO user = new UserDO();
user.setPassword("utest");
user.setRealname("utest");
user.setStatus("Normal");
user.setUser_role("SystemAdmin");
user.setUsername("utest");
userDAO.addUser(user);
}
示例2: initData
import com.alibaba.cobar.manager.dao.xml.UserDAOImple; //导入依赖的package包/类
@Before
public void initData() {
Assert.assertNotNull(xmlPath);
userDao = new UserDAOImple();
xmlFileLoader = new XMLFileLoaderPath();
xmlFileLoader.setXmlPath(xmlPath);
userDao.setXmlFileLoader(xmlFileLoader);
userXmlPath = xmlPath + System.getProperty("file.separator") + "user.xml";
XmlFile xmlFile = new XmlFile(userXmlPath, "users");
try {
xmlFile.init();
} catch (IOException e) {
logger.error(e.getMessage(), e);
Assert.fail();
}
read();
}
示例3: getUserDAO
import com.alibaba.cobar.manager.dao.xml.UserDAOImple; //导入依赖的package包/类
public UserDAOImple getUserDAO() {
return userDAO;
}
示例4: setUserDAO
import com.alibaba.cobar.manager.dao.xml.UserDAOImple; //导入依赖的package包/类
public void setUserDAO(UserDAOImple userDAO) {
this.userDAO = userDAO;
}