public List getAllResourcesWhereLike(String field, String value) { String sql = singleStorageSql.getXmlLikeSql(field, m_resourceTableName); Object[] fields = new Object[1]; fields[0] = value; // %%% + "order by " + m_resourceTableOrderField + " asc"; return loadResources(sql, fields); }
public List getAllResourcesWhereLike(String field, String value) { String sql = singleStorageSql.getXmlLikeSql(field, m_resourceTableName); Object[] fields = new Object[1]; fields[0] = value; // %%% + "order by " + m_resourceTableOrderField + " asc"; return loadResources(sql, fields); }
/** * Get all Resources where the given field matches the given value. * * @param field * The db field name for the selection. * @param value * The value to select. * @return The list of all Resources that meet the criteria. */ public List getAllResourcesWhere(String field, String value) { // read all users from the db String sql = singleStorageSql.getXmlSql(field, m_resourceTableName); Object[] fields = new Object[1]; fields[0] = value; // %%% + "order by " + m_resourceTableOrderField + " asc"; return loadResources(sql, fields); }
/** * Get all Resources where the given field matches the given value. * * @param field * The db field name for the selection. * @param value * The value to select. * @return The list of all Resources that meet the criteria. */ public List getAllResourcesWhere(String selectBy, String selectByValue, String orderBy, int first, int pageSize) { // read all users from the db String sql = singleStorageSql.getXmlWhereLimitSql(selectBy, orderBy, m_resourceTableName, first, pageSize); Object[] fields = new Object[1]; fields[0] = selectByValue; // %%% + "order by " + m_resourceTableOrderField + " asc"; return loadResources(sql, fields); }
/** * Get all Resources where the given field matches the given value. * * @param field * The db field name for the selection. * @param value * The value to select. * @return The list of all Resources that meet the criteria. */ public List getAllResourcesWhere(String field, String value) { // read all users from the db String sql = singleStorageSql.getXmlSql(field, m_resourceTableName); Object[] fields = new Object[1]; fields[0] = value; // %%% + "order by " + m_resourceTableOrderField + " asc"; return loadResources(sql, fields); }
/** * Get all Resources where the given field matches the given value. * * @param field * The db field name for the selection. * @param value * The value to select. * @return The list of all Resources that meet the criteria. */ public List getAllResourcesWhere(String selectBy, String selectByValue, String orderBy, int first, int pageSize) { // read all users from the db String sql = singleStorageSql.getXmlWhereLimitSql(selectBy, orderBy, m_resourceTableName, first, pageSize); Object[] fields = new Object[1]; fields[0] = selectByValue; // %%% + "order by " + m_resourceTableOrderField + " asc"; return loadResources(sql, fields); }
public List getAllResources() { List all = new Vector(); // read all users from the db List xml = null; String sql = singleStorageSql.getXmlSql(m_resourceTableName); xml = loadResources(sql, null); // %%% + "order by " + m_resourceTableOrderField + " asc"; // process all result xml into user objects if (!xml.isEmpty()) { for (int i = 0; i < xml.size(); i++) { Entity entry = (Entity) xml.get(i); if (entry != null) all.add(entry); } } return all; }
public List getAllResources() { List all = new Vector(); // read all users from the db List xml = null; String sql = singleStorageSql.getXmlSql(m_resourceTableName); xml = loadResources(sql, null); // %%% + "order by " + m_resourceTableOrderField + " asc"; // process all result xml into user objects if (!xml.isEmpty()) { for (int i = 0; i < xml.size(); i++) { Entity entry = (Entity) xml.get(i); if (entry != null) all.add(entry); } } return all; }
/** * Get selected Resources, using a supplied where clause * * @param sqlWhere * The SQL where clause. * @return The list of selected Resources. */ public List getSelectedResourcesWhere(String sqlWhere) { List all = new Vector(); // read all users from the db String sql = singleStorageSql.getXmlWhereSql(m_resourceTableName, sqlWhere); List xml = loadResources(sql, null); // process all result xml into user objects if (!xml.isEmpty()) { for (int i = 0; i < xml.size(); i++) { Entity entry = (Entity) xml.get(i); if (entry != null) all.add(entry); } } return all; }
public List getAllResources(int first, int last) { Object[] fields = singleStorageSql.getXmlFields(first, last); List xml = null; String sql = singleStorageSql.getXmlSql(m_resourceTableIdField, m_resourceTableName, first, last); xml = loadResources(sql, fields); List rv = new Vector(); // process all result xml into user objects if (!xml.isEmpty()) { for (int i = 0; i < xml.size(); i++) { Entity entry = (Entity) xml.get(i); if (entry != null) rv.add(entry); } } return rv; }
/** * Get selected Resources, using a supplied where clause * * @param sqlWhere * The SQL where clause. * @return The list of selected Resources. */ public List getSelectedResourcesWhere(String sqlWhere) { List all = new Vector(); // read all users from the db String sql = singleStorageSql.getXmlWhereSql(m_resourceTableName, sqlWhere); List xml = loadResources(sql, null); // process all result xml into user objects if (!xml.isEmpty()) { for (int i = 0; i < xml.size(); i++) { Entity entry = (Entity) xml.get(i); if (entry != null) all.add(entry); } } return all; }
public List getAllResources(int first, int last) { Object[] fields = singleStorageSql.getXmlFields(first, last); List xml = null; String sql = singleStorageSql.getXmlSql(m_resourceTableIdField, m_resourceTableName, first, last); xml = loadResources(sql, fields); List rv = new Vector(); // process all result xml into user objects if (!xml.isEmpty()) { for (int i = 0; i < xml.size(); i++) { Entity entry = (Entity) xml.get(i); if (entry != null) rv.add(entry); } } return rv; }
/** * Get the Resource with this id, or null if not found. * * @param id * The id. * @return The Resource with this id, or null if not found. */ public Entity getResource(String id) { Entity entry = null; // get the user from the db List xml = null; String sql = singleStorageSql.getXmlSql(m_resourceTableIdField, m_resourceTableName); Object fields[] = new Object[1]; fields[0] = caseId(id); xml = loadResources(sql, fields); if (!xml.isEmpty()) { // create the Resource from the db xml entry = (Entity) xml.get(0); } return entry; }
/** * Get the Resource with this id, or null if not found. * * @param id * The id. * @return The Resource with this id, or null if not found. */ public Entity getResource(String id) { Entity entry = null; // get the user from the db List xml = null; String sql = singleStorageSql.getXmlSql(m_resourceTableIdField, m_resourceTableName); Object fields[] = new Object[1]; fields[0] = caseId(id); xml = loadResources(sql, fields); if (!xml.isEmpty()) { // create the Resource from the db xml entry = (Entity) xml.get(0); } return entry; }