Example #1
0
  public IApp findMe() throws Exception {

    StringBuffer sql = new StringBuffer();
    sql.append(
        "select app.*, comtable.comname, comtable.description, comtable.repmail from app, comtable");
    sql.append(" where app.comcode = comtable.comcode");
    sql.append("   and app.appId=?appId");

    IApp findListing = (IApp) Database.sql(IApp.class, sql.toString());

    findListing.setStatus(STATUS_PUBLISHED);
    findListing.setAppId(this.getAppId());
    findListing.select();

    if (findListing.next()) return findListing;
    else return null;
  }