+
+ /**
+ * Get the field for the given field name
+ * @param inFieldName name of field to look for
+ * @return Field if found, or null otherwise
+ */
+ public static Field getField(String inFieldName)
+ {
+ for (int i=0; i<ALL_AVAILABLE_FIELDS.length; i++) {
+ Field field = ALL_AVAILABLE_FIELDS[i];
+ if (field.getName().equals(inFieldName)) {
+ return field;
+ }
+ }
+ // not found
+ return null;
+ }
+
+ /**
+ * @return array of field names
+ */
+ public static String[] getFieldNames()
+ {
+ String[] names = new String[ALL_AVAILABLE_FIELDS.length];
+ for (int i=0; i<ALL_AVAILABLE_FIELDS.length; i++) {
+ names[i] = ALL_AVAILABLE_FIELDS[i].getName();
+ }
+ return names;
+ }