@Override public BoneCPConfig read(ConfigurationNode node) { BoneCPConfig config = new BoneCPConfig(); config.setJdbcUrl(node.getString("dsn", "")); config.setUsername(node.getString("username", "root")); config.setPassword(node.getString("password", "")); return config; }
@Override public Object write(BoneCPConfig config) throws LoaderBuilderException { ConfigurationNode node = new ConfigurationNode(); node.set("dsn", config.getJdbcUrl()); node.set("username", config.getUsername()); node.set("password", config.getPassword()); return node; }