コード例 #1
0
  public AuditableEntityBean findEntity(DiscrepancyNoteBean note) {
    AuditableEntityDAO aedao = getAEDAO(note, ds);

    try {
      if (aedao != null) {
        AuditableEntityBean aeb = (AuditableEntityBean) aedao.findByPK(note.getEntityId());
        return aeb;
      }
    } catch (Exception e) {
    }

    return null;
  }
コード例 #2
0
  /** getEntityFromHashMap, the method that gets the object from the database query. */
  public Object getEntityFromHashMap(HashMap hm) {
    SubjectGroupMapBean eb = new SubjectGroupMapBean();
    super.setEntityAuditInformation(eb, hm);
    // subject_group_map_id serial NOT NULL,
    // study_group_class_id numeric,
    // study_subject_id numeric,
    // study_group_id numeric,
    // status_id numeric,
    // owner_id numeric,
    // date_created date,
    // date_updated date,
    // update_id numeric,
    // notes varchar(255),
    eb.setId(((Integer) hm.get("subject_group_map_id")).intValue());
    eb.setStudyGroupId(((Integer) hm.get("study_group_id")).intValue());
    eb.setStudySubjectId(((Integer) hm.get("study_subject_id")).intValue());
    eb.setStudyGroupClassId(((Integer) hm.get("study_group_class_id")).intValue());
    eb.setNotes((String) hm.get("notes"));

    return eb;
  }