private void doLoad(ConnectionWrapper cw) throws SQLException, ClassNotFoundException
	{
		//get the column names and types from the database
		StringBuilder stmt = new StringBuilder("SELECT COLUMN_NAME,COLUMN_CLASS,COLUMN_SIZE FROM ");
		stmt.append(Defaults.TYPE_TABLENAME);
		stmt.append(" WHERE OWNER_TABLE = ?");
		PreparedStatement ps = cw.prepareStatement(stmt.toString());
		ps.setString(1, getTableName());
		Tools.logFine(ps);
		ResultSet rs = ps.executeQuery();
		while(rs.next())
		{
			String name = rs.getString(1);
			String classDesc = rs.getString(2);
			Long columnSize = rs.getLong(3);
			if(rs.wasNull())
			{
				columnSize = null;
			}
			Class<?> c = ObjectTools.lookUpClass(classDesc,adapter);
			this.returnTypes.add(c);
			this.props.add(name);
			this.setColumnSize(name,columnSize);
		}
		ps.close();
		
		//get the indices
		stmt = new StringBuilder("SELECT INDEX_NAME,COLUMN_NAME FROM ");
		stmt.append(Defaults.INDEX_TABLENAME);
		stmt.append(" WHERE TABLE_NAME = ?");
		ps = cw.prepareStatement(stmt.toString());
		ps.setString(1, tableName);
		Tools.logFine(ps);
		rs = ps.executeQuery();
		while(rs.next())
		{
			String indexName = rs.getString(1);
			String columName = rs.getString(2);
			List<String>idxList = indices.get(columName);
			if(idxList == null)
			{
				idxList = new ArrayList<String>();
			}
			if(!idxList.contains(indexName))
			{
				idxList.add(indexName);
			}
			indices.put(columName, idxList);
		}
		ps.close();
		buildIndexMap();
	}