@Override
	public List<Component> getAllComponents() {
		Connection conn = null;
		PreparedStatement st = null;
		ResultSet row = null;
		List<Component> res = new ArrayList<Component>();
		try {
			conn = OracleDAOFactory.createConnection();
			st = conn.prepareStatement(GET_ALL_COMPONENTS);
			row = st.executeQuery();
			while (row.next()) {
				Component comp = new Component();
				comp.setId(row.getInt(ID_COMPONENT));
				comp.setTitle(row.getString(TITLE));
				comp.setDescription(row.getString(DESCRIPTION));
				comp.setProducer(row.getString(PRODUCER));
				comp.setWeight(row.getDouble(WEIGHT));
				comp.setImg(row.getString(IMG));
				comp.setPrice(row.getDouble(PRICE));
				res.add(comp);
			}
			return res;
		} catch (SQLException e) {
			throw new ShopException("Can't get components from database", e);
		} finally {
			
			try {
				if (row != null) {
					row.close();
				}
			} catch (SQLException e) {
				throw new ShopException(CANT_CLOSE_RESULT_SET, e);
			}
			
			try {
				if (st != null) {
					st.close();
				}
			} catch (SQLException e) {
				throw new ShopException(CANT_CLOSE_STATEMENT, e);
			}

			try {
				if (conn != null) {
					conn.close();
				}
			} catch (SQLException e) {
				throw new ShopException(CANT_CLOSE_CONNECTION, e);
			}

		}
	}