Beispiel #1
0
 /**
  * @param name CMP field name
  * @return JDBCCMPFieldBridge instance or null if no field found.
  */
 public JDBCCMPFieldBridge getCMPFieldByName(String name) {
   for (int i = 0; i < primaryKeyFields.length; ++i) {
     JDBCCMPFieldBridge cmpField = primaryKeyFields[i];
     if (cmpField.getFieldName().equals(name)) return cmpField;
   }
   for (int i = 0; i < cmpFields.length; ++i) {
     JDBCCMPFieldBridge cmpField = cmpFields[i];
     if (cmpField.getFieldName().equals(name)) return cmpField;
   }
   return null;
 }
Beispiel #2
0
 public FieldBridge getFieldByName(String name) {
   FieldBridge field = null;
   for (int i = 0; i < primaryKeyFields.length; ++i) {
     JDBCCMPFieldBridge primaryKeyField = primaryKeyFields[i];
     if (primaryKeyField.getFieldName().equals(name)) {
       field = primaryKeyField;
       break;
     }
   }
   if (field == null) {
     field = getCMPFieldByName(name);
   }
   if (field == null) {
     field = getCMRFieldByName(name);
   }
   return field;
 }