if (result.next()) {
while (result.next()) { MetaEntity me = new MetaEntity(result.getString("EntName")); MetaField mf = new MetaField(result.getString("FldName"), me);  mf.setHidden( result.getInt("FldHidden") == 0 ? false: true ); mf.setLength(result.getInt("FldLength")); mf.setMandatory( result.getInt("FldMandatory") == 0 ? false: true ); mf.setType(result.getInt("FldtypeId"));  switch(mf.getType()) { case(MetaField.VARCHAR): case(MetaField.TEXT): mf.setDefaultValue(result.getString("FldDefault")); break; case(MetaField.DATE): break; case(MetaField.INT): mf.setDefaultValue( new Integer(result.getInt("FldDefault")) ); break; } data.addEntity(me); data.addField(mf); System.out.println("MD added: " + mf.toString());
    public MetaData loadMetaData() {        try {            String sql =                 "SELECT * FROM Fld, Fldtype, Users, Ent " +                "WHERE Fld.UserId = Users.UUID AND " +                "Fld.FldFldtypeId = Fldtype.FldtypeId AND " +                "Fld.FldEntId = Ent.EntId;";            ResultSet result =                 dbConnection.executeQuery(sql);                            if (result.next()) {                           }        } catch (Exception e) {            DataBus.logger.fatal("Could not load meta data.");            throw new InternalError("Could not load meta data.");        }        return null;    }