Buy Homemade Ravva Laddu Online
Premium Quality Homemade Rava Laddu is a traditional Indian sweet made with rava, pure ghee, sugar and other best ingredients. It is aromatic, tastes delicious with a slight crunch, and is commonly served during festivals and celebrations. No Preservatives or Added Colors.
import net.serenitybdd.core.Serenity;
import net.thucydides.core.annotations.Step;
import java.util.*;
public class DailyLoadStepsLib {
@Step
public static void fetchAndStoreLatestCusips(String productClass, String side, int count) throws Exception {
// Default to 1 if not provided or passed as 0
if (count <= 0) count = 1;
String normSide = side == null ? "" : side.trim().toUpperCase();
if (!"ASK".equals(normSide) && !"BID".equals(normSide)) {
throw new IllegalArgumentException("Side must be ASK or BID, got: " + side);
}
String cls = productClass == null ? "" : productClass.trim();
String query =
count + "# select sym, product_class, price, idcprice, qty, source, side " +
"from rtl ij bp " +
"where retail_enabled=`Y, product_class like `" + cls + ", side=`" + normSide + " " +
"by -dtime";
System.out.println("[KDB] Query -> " + query);
List<Map<String, Object>> rows = KDBUtility.getKdata(HOST, PORT, query);
if (rows == null || rows.isEmpty()) {
throw new AssertionError("No rows returned for retail_enabled=Y, side=" + normSide + ", productClass like " + cls);
}
List<String> cusips = new ArrayList<>();
for (Map<String, Object> row : rows) {
Object v = row.get("sym");
if (v != null) {
String s = v.toString().trim();
if (!s.isEmpty()) cusips.add(s);
}
}
if (cusips.isEmpty()) {
throw new AssertionError("Rows have no non-empty sym values for retail_enabled=Y, side=" + normSide);
}
String firstCusip = cusips.get(0);
System.out.println("[KDB] Latest " + count + " CUSIPs -> " + cusips);
System.out.println("[KDB] Using first CUSIP -> " + firstCusip);
Serenity.setSessionVariable("CUSIP").to(firstCusip); // first for UI search step
Serenity.setSessionVariable("CUSIPS").to(cusips); // all for future multi-validation
}
}