fluid-api/src/main/java/com/fluidbpm/program/api/util/sql/impl/SQLFormUtil.java
public Form getFormAncestor(
			Long electronicFormIdParam,
			boolean includeFieldDataParam,
			boolean includeTableFieldsParam
	) {
		if(electronicFormIdParam == null) {
			return null;
		}

		Form returnVal = null;
		Map<Long,String> definitionAndTitle =
				this.formDefUtil.getFormDefinitionIdAndTitle();

		PreparedStatement preparedStatement = null;
		ResultSet resultSet = null;
		try {
			ISyntax syntax = SyntaxFactory.getInstance().getSyntaxFor(
					this.getSQLTypeFromConnection(),
					ISyntax.ProcedureMapping.Form.GetFormContainersParentFormContainer);

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

			preparedStatement.setLong(1,electronicFormIdParam);

			resultSet = preparedStatement.executeQuery();

			//Iterate each of the form containers...
			if (resultSet.next()) {
				returnVal = this.mapFormContainerTo(
						definitionAndTitle,
						resultSet);
			}

			//When field data must also be included...
			if(includeFieldDataParam && returnVal != null) {
				returnVal.setFormFields(
						this.fieldUtil.getFormFields(
								returnVal.getId(),
								includeTableFieldsParam,
								false));
			}

			return returnVal;
		} catch (SQLException sqlError) {
			throw new FluidSQLException(sqlError);
		} finally {
			this.closeStatement(preparedStatement,resultSet);
		}
	}
public Form getFormAncestor(
			Long electronicFormIdParam,
			boolean includeFieldDataParam,
			boolean includeTableFieldsParam
	) {
		if(electronicFormIdParam == null) {
			return null;
		}

		Form returnVal = null;
		Map<Long,String> definitionAndTitle =
				this.formDefUtil.getFormDefinitionIdAndTitle();

		PreparedStatement preparedStatement = null;
		ResultSet resultSet = null;
		try {
			ISyntax syntax = SyntaxFactory.getInstance().getSyntaxFor(
					this.getSQLTypeFromConnection(),
					ISyntax.ProcedureMapping.Form.GetFormContainersParentFormContainer);

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

			preparedStatement.setLong(1,electronicFormIdParam);

			resultSet = preparedStatement.executeQuery();

			//Iterate each of the form containers...
			if (resultSet.next()) {
				returnVal = this.mapFormContainerTo(
						definitionAndTitle,
						resultSet);
			}

			//When field data must also be included...
			if(includeFieldDataParam && returnVal != null) {
				returnVal.setFormFields(
						this.fieldUtil.getFormFields(
								returnVal.getId(),
								includeTableFieldsParam,
								false));
			}

			return returnVal;
		} catch (SQLException sqlError) {
			throw new FluidSQLException(sqlError);
		} finally {
			this.closeStatement(preparedStatement,resultSet);
		}
	}
public Form getFormAncestor ( Long electronicFormIdParam , boolean includeFieldDataParam , boolean includeTableFieldsParam ) { if ( electronicFormIdParam == null ) { return null ; } Form returnVal = null ; Map < Long , String > definitionAndTitle = this . formDefUtil . getFormDefinitionIdAndTitle ( ) ; PreparedStatement preparedStatement = null ; ResultSet resultSet = null ; try { ISyntax syntax = SyntaxFactory . getInstance ( ) . getSyntaxFor ( this . getSQLTypeFromConnection ( ) , ISyntax . ProcedureMapping . Form . GetFormContainersParentFormContainer ) ; preparedStatement = this . getConnection ( ) . prepareStatement ( syntax . getPreparedStatement ( ) ) ; preparedStatement . setLong ( 1 , electronicFormIdParam ) ; resultSet = preparedStatement . executeQuery ( ) ; //Iterate each of the form containers... if ( resultSet . next ( ) ) { returnVal = this . mapFormContainerTo ( definitionAndTitle , resultSet ) ; } //When field data must also be included... if ( includeFieldDataParam && returnVal != null ) { returnVal . setFormFields ( this . fieldUtil . getFormFields ( returnVal . getId ( ) , includeTableFieldsParam , false ) ) ; } return returnVal ; } catch ( SQLException sqlError ) { throw new FluidSQLException ( sqlError ) ; } finally { this . closeStatement ( preparedStatement , resultSet ) ; } }
Gets the ancestor for the {@code electronicFormIdParam} Form.

@param electronicFormIdParam Identifier for the Form.
@param includeFieldDataParam Whether to populate the return {@code Form} fields.
@param includeTableFieldsParam Whether to populate the return {@code Form} table fields.
@return {@code Form} descendants.

@see Form
Gets the ancestor for the { @code electronicFormIdParam } Form .