/**
   * @param propertyName the property name to set
   * @param propertyTypeFullyQualifiedName the fully qualified type name of the property.
   * @param propertyRelationType the {@link RelationType} enum value
   * @param jpaAnnotationTypes an array of {@link String} holding the types of JPA annotation(s) to
   *     be added to the property
   * @param isIdProperty a boolean value <code>true</code> indicating the property to be created is
   *     Id type property, <code>false</code> otherwise.
   * @param idAnnotationType the {@link IdAnnotationType} enum value
   * @param oneToOnePrimaryEntityPropertyName if the specified <code>relationType</code> is {@link
   *     RelationType#ONE_TO_ONE} then this parameter holds the {@link GenericGenerator}'s {@link
   *     Parameter} annotation's {@link Parameter#value()} attribute's value
   * @param isPropertyTypeGeneric a boolean value <code>true</code> indicating the property to be
   *     created is of a generic type, <code>false</code> otherwise.
   * @param genericTypeParameter the parameterised type of generic collection type if the property
   *     to be created is a collection type property
   * @param mappedBy if the specified <code>propertyRelationType</code> is
   *     <ul>
   *       <li>{@link RelationType#ONE_TO_MANY} and is marked as bidirectional then this parameter
   *           holds value for the <i>mappedBy<i> attribute of the relationship annotation i.e.
   *           {@link OneToMany} on the entity specified at "one" end of the relation in
   *           <i>relations definition XML</i>
   *       <li>{@link RelationType#ONE_TO_ONE} then this parameter holds value for the
   *           <i>mappedBy<i> attribute of the relationship annotation i.e. {@link OneToOne} on the
   *           entity specified at "many" end of the relation in <i>relations definition XML</i>
   *     </ul>
   *
   * @return the {@link Property} instance whose properties are set to values held by the arguments
   *     to this method.
   */
  private Property createProperty(
      String propertyName,
      String propertyTypeFullyQualifiedName,
      RelationType propertyRelationType,
      String[] jpaAnnotationTypes,
      boolean isIdProperty,
      IdAnnotationType idAnnotationType,
      String oneToOnePrimaryEntityPropertyName,
      boolean isPropertyTypeGeneric,
      String genericTypeParameter,
      String mappedBy) {

    Property property = new Property();
    property.setName(propertyName);
    property.setType(propertyTypeFullyQualifiedName);
    property.setRelationType(propertyRelationType);
    property.setJpaAnnotationTypes(jpaAnnotationTypes);
    property.setMappedBy(mappedBy);

    if (isPropertyTypeGeneric) {
      property.setGenericType(isPropertyTypeGeneric);
      property.setGenericTypeParameter(genericTypeParameter);
    }

    if (isIdProperty) {
      property.setId(isIdProperty);
      property.setIdAnnotationType(idAnnotationType);

      if (IdAnnotationType.ONE_TO_ONE == idAnnotationType) {
        property.setOneToOnePrimaryEntityPropertyName(oneToOnePrimaryEntityPropertyName);
      }
    }

    return property;
  }