fluid-api/src/main/java/com/fluidbpm/program/api/util/sql/impl/SQLFormFieldUtil.java
public List<FormFieldMapping> getFormFieldMappingForForm(
			Long electronicFormIdParam)
	{
		List<FormFieldMapping> returnVal = new ArrayList();

		if(electronicFormIdParam == null)
		{
			return returnVal;
		}

		PreparedStatement preparedStatement = null;
		ResultSet resultSet = null;
		try {
			Long formDefinitionId = this.getFormDefinitionId(electronicFormIdParam);

			//Local Mapping...
			//When we have the key by definition, we can just return.
			if(this.localDefinitionToFieldsMapping.containsKey(formDefinitionId))
			{
				return this.localDefinitionToFieldsMapping.get(formDefinitionId);
			}

			ISyntax syntax = SyntaxFactory.getInstance().getSyntaxFor(
					this.getSQLTypeFromConnection(),
					ISyntax.ProcedureMapping.Field.GetFormFieldsForFormContainer);

			preparedStatement = this.getConnection().prepareStatement(
					syntax.getPreparedStatement());

			preparedStatement.setLong(1, electronicFormIdParam);

			resultSet = preparedStatement.executeQuery();

			//Iterate each of the form containers...
			while (resultSet.next())
			{
				returnVal.add(this.mapFormFieldMapping(resultSet));
			}

			//Cache the mapping...
			this.localDefinitionToFieldsMapping.put(formDefinitionId, returnVal);

			return returnVal;
		} catch (SQLException sqlError) {
			throw new FluidSQLException(sqlError);
		} finally {
			this.closeStatement(preparedStatement, resultSet);
		}
	}
public List<FormFieldMapping> getFormFieldMappingForForm(
			Long electronicFormIdParam)
	{
		List<FormFieldMapping> returnVal = new ArrayList();

		if(electronicFormIdParam == null)
		{
			return returnVal;
		}

		PreparedStatement preparedStatement = null;
		ResultSet resultSet = null;
		try {
			Long formDefinitionId = this.getFormDefinitionId(electronicFormIdParam);

			//Local Mapping...
			//When we have the key by definition, we can just return.
			if(this.localDefinitionToFieldsMapping.containsKey(formDefinitionId))
			{
				return this.localDefinitionToFieldsMapping.get(formDefinitionId);
			}

			ISyntax syntax = SyntaxFactory.getInstance().getSyntaxFor(
					this.getSQLTypeFromConnection(),
					ISyntax.ProcedureMapping.Field.GetFormFieldsForFormContainer);

			preparedStatement = this.getConnection().prepareStatement(
					syntax.getPreparedStatement());

			preparedStatement.setLong(1, electronicFormIdParam);

			resultSet = preparedStatement.executeQuery();

			//Iterate each of the form containers...
			while (resultSet.next())
			{
				returnVal.add(this.mapFormFieldMapping(resultSet));
			}

			//Cache the mapping...
			this.localDefinitionToFieldsMapping.put(formDefinitionId, returnVal);

			return returnVal;
		} catch (SQLException sqlError) {
			throw new FluidSQLException(sqlError);
		} finally {
			this.closeStatement(preparedStatement, resultSet);
		}
	}
Retrieve the Form Field mappings for Electronic Form {@code electronicFormIdParam}.

@param electronicFormIdParam The Electronic Form to get Form Field mappings for.
@return List of Form Field mappings.