コード例 #1
0
ファイル: PmTableAssert.java プロジェクト: ulehnerhs/org.pm4j
 private static String getDisplayStringOfCell(PmBean<?> rowPm, String columnName) {
   PmObject cell = PmUtil.findChildPm(rowPm, columnName);
   if (cell == null) {
     throw new PmRuntimeException("Row cell for column name '" + columnName + "' not found.");
   }
   if (cell instanceof PmAttr<?>) {
     return ((PmAttr<?>) cell).getValueLocalized();
   }
   return cell.getPmTitle();
 }
コード例 #2
0
 public DeprFilterByDefinitionBase(PmObject pmCtxt, Class<?>... compOpClasses) {
   this(pmCtxt.getPmName(), pmCtxt.getPmTitle());
   compOps = new ArrayList<DeprCompOp>(compOpClasses.length);
   for (Class<?> c : compOpClasses) {
     Constructor<?> constructor = ClassUtil.findConstructor(c, PmObject.class);
     if (constructor == null) {
       throw new PmRuntimeException(
           pmCtxt,
           "DeprCompOp class needs a constructor with a single PmObject parameter to be useable in this context: "
               + c);
     }
     DeprCompOp compOp = ClassUtil.newInstance(constructor, pmCtxt);
     compOps.add(compOp);
   }
 }