Beispiel #1
0
 private void setInputInfo(Object main) {
   try {
     PropertyDescriptor pd = BeanUtils.getPropertyDescriptor(superClass, INPUT_PERSON_ID);
     if (pd != null) {
       String username = "";
       TaxempDetail currentOperator = SecurityManager.currentOperator();
       if (currentOperator != null) username = currentOperator.getUsername();
       pd.getWriteMethod().invoke(main, username);
     }
     pd = BeanUtils.getPropertyDescriptor(superClass, INPUT_DATE);
     if (pd != null) {
       pd.getWriteMethod().invoke(main, new Timestamp(System.currentTimeMillis()));
     }
   } catch (Exception e) {
     throw new RuntimeException("Error on setting input person/date.", e);
   }
 }