/** * Get all Containers. * * @return The list (Resource) of all Containers. */ public List getAllContainers() { List all = new Vector(); // read all users from the db String sql = doubleStorageSql.getSelectXml1Sql(m_containerTableName); // %%% order by... List xml = m_sql.dbRead(sql); // process all result xml into user objects if (!xml.isEmpty()) { for (int i = 0; i < xml.size(); i++) { Entity entry = readContainer((String) xml.get(i)); if (entry != null) all.add(entry); } } return all; }
/** * Get all Containers. * * @return The list (Resource) of all Containers. */ public List getAllContainers() { List all = new Vector(); // read all users from the db String sql = doubleStorageSql.getSelectXml1Sql(m_containerTableName); // %%% order by... List xml = m_sql.dbRead(sql); // process all result xml into user objects if (!xml.isEmpty()) { for (int i = 0; i < xml.size(); i++) { Entity entry = readContainer((String) xml.get(i)); if (entry != null) all.add(entry); } } return all; }
/** * Get the Container with this id, or null if not found. * * @param ref * The container reference. * @return The Container with this id, or null if not found. */ public Entity getContainer(String ref) { Entity entry = null; // get the user from the db String sql = doubleStorageSql.getSelectXml2Sql(m_containerTableName, m_containerTableIdField); Object[] fields = new Object[1]; fields[0] = ref; List xml = m_sql.dbRead(sql, fields, null); if (!xml.isEmpty()) { // create the Resource from the db xml entry = readContainer((String) xml.get(0)); } return entry; }
/** * Get the Container with this id, or null if not found. * * @param ref * The container reference. * @return The Container with this id, or null if not found. */ public Entity getContainer(String ref) { Entity entry = null; // get the user from the db String sql = doubleStorageSql.getSelectXml2Sql(m_containerTableName, m_containerTableIdField); Object[] fields = new Object[1]; fields[0] = ref; List xml = m_sql.dbRead(sql, fields, null); if (!xml.isEmpty()) { // create the Resource from the db xml entry = readContainer((String) xml.get(0)); } return entry; }
Entity entry = readContainer(result.toString()); edit = m_user.newContainerEdit(entry);
Entity entry = readContainer(result.toString()); edit = m_user.newContainerEdit(entry);