public int getIdLastDevice() {
		Connection conn = null;
		PreparedStatement st = null;
		ResultSet row  = null;
		int id = 0;
		try {
			conn = OracleDAOFactory.createConnection();
			st = conn.prepareStatement(GET_ID_LAST_DEVICE);
			row = st.executeQuery();
			if (row.next()) {
				id = row.getInt(1);
			}else{
				throw new NoSuchDeviceException("No such device in database!");
			}
			return id;
		} catch (SQLException e) {
			throw new ShopException("Can't show device from database", e);
		} finally {
			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);
			}
		}
	}