package org.cacert.gigi.dbObjects;
+import java.util.Random;
+
import org.cacert.gigi.GigiApiException;
import org.cacert.gigi.database.GigiPreparedStatement;
import org.cacert.gigi.database.GigiResultSet;
throw new RuntimeException("Internal Error: CountryCode for country not found" + this.getCountry());
}
+ public static CountryCode getRandomCountry(CountryCodeType cType) {
+ CountryCode[] cc = CountryCode.getCountryCodes(cType);
+ int rnd = new Random().nextInt(cc.length);
+ return cc[rnd];
+ }
+
}