/** {@inheritDoc} */
  @Override
  public Field loadByValue(int nIdEntry, String strValue, Plugin plugin) {
    DAOUtil daoUtil = new DAOUtil(SQL_QUERY_FIND_BY_VALUE, plugin);
    daoUtil.setInt(1, nIdEntry);
    daoUtil.setString(2, strValue);
    daoUtil.executeQuery();

    Field field = null;
    IEntry entry = null;

    if (daoUtil.next()) {
      field = new Field();
      field.setIdField(daoUtil.getInt(1));
      // parent entry
      entry = new Entry();
      entry.setIdEntry(daoUtil.getInt(2));
      field.setEntry(entry);
      field.setTitle(daoUtil.getString(3));
      field.setValue(daoUtil.getString(4));
      field.setHeight(daoUtil.getInt(5));
      field.setWidth(daoUtil.getInt(6));
      field.setDefaultValue(daoUtil.getBoolean(7));
      field.setMaxSizeEnter(daoUtil.getInt(8));
      field.setPosition(daoUtil.getInt(9));
      field.setValueTypeDate(daoUtil.getDate(10));
      field.setRoleKey(daoUtil.getString(11));
      field.setWorkgroup(daoUtil.getString(12));
      field.setShownInResultList(daoUtil.getBoolean(13));
      field.setShownInResultRecord(daoUtil.getBoolean(14));
    }

    daoUtil.free();

    return field;
  }
  /** {@inheritDoc} */
  @Override
  public List<Field> selectFieldListByIdEntry(int nIdEntry, Plugin plugin) {
    List<Field> fieldList = new ArrayList<Field>();
    DAOUtil daoUtil = new DAOUtil(SQL_QUERY_SELECT_FIELD_BY_ID_ENTRY, plugin);
    daoUtil.setInt(1, nIdEntry);
    daoUtil.executeQuery();

    Field field = null;
    IEntry entry = null;

    while (daoUtil.next()) {
      field = new Field();
      field.setIdField(daoUtil.getInt(1));
      // parent entry
      entry = new Entry();
      entry.setIdEntry(daoUtil.getInt(2));
      field.setEntry(entry);
      field.setTitle(daoUtil.getString(3));
      field.setValue(daoUtil.getString(4));
      field.setHeight(daoUtil.getInt(5));
      field.setWidth(daoUtil.getInt(6));
      field.setDefaultValue(daoUtil.getBoolean(7));
      field.setMaxSizeEnter(daoUtil.getInt(8));
      field.setPosition(daoUtil.getInt(9));
      field.setValueTypeDate(daoUtil.getDate(10));
      field.setRoleKey(daoUtil.getString(11));
      field.setWorkgroup(daoUtil.getString(12));
      field.setShownInResultList(daoUtil.getBoolean(13));
      field.setShownInResultRecord(daoUtil.getBoolean(14));

      fieldList.add(field);
    }

    daoUtil.free();

    return fieldList;
  }