/*
   Copyright (c) 2013, 2020, Oracle and/or its affiliates.

   This program is free software; you can redistribute it and/or modify
   it under the terms of the GNU General Public License, version 2.0,
   as published by the Free Software Foundation.

   This program is also distributed with certain software (including
   but not limited to OpenSSL) that is licensed under separate terms,
   as designated in a particular file or component or in included license
   documentation.  The authors of MySQL hereby grant you an additional
   permission to link the program and your derivative works with the
   separately licensed software that they have included with MySQL.

   This program is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
   GNU General Public License, version 2.0, for more details.

   You should have received a copy of the GNU General Public License
   along with this program; if not, write to the Free Software
   Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301  USA
*/

/** @class Projection 
 *
 * A Projection describes the projection of a domain object in the application.
 * A Projection specifies the complete set of fields and relationships to be
 * instantiated when the operation with which it is used is executed.
 *
 * A *default* Projection is one where each field is specified. 
 *
 */
Projection = {
  domainObject       :  "" ,  /** function */
  error              :  "",   /** error report for this projection */
  fields             :  "" ,  /** field names */
  relationships      : null   /** relationships, which consist of a name and projection */
};


/** Projection constructor 
 *
 * @class Projection
 * @constructor
 * @param {function} [constructor] 
*/
function Projection(constructor) {};



/*****                      Projection methods 
                            --------------------                      *****/
  
/* @method addFields
   addFields(fields)
   IMMEDIATE
   
   Add fields by name to the projection
  
   @param fields String or [String]
   The fields parameter is the name of a field or an array of field names.  It can be a string
   or an array of strings. Multiple field names are accepted as parameters.

    @return {Projection} @chainable
    addFields() returns the current Projection object, so that method
    invocations can be chained.
*/
  function addFields(fields) {};

/* @method addField
   ALIAS for addFields for ease of use
   addField(fields)
   IMMEDIATE
   @see addFields
   
   Add fields to the projection
  
 */
  function addField(fields) {};


/* @method addRelationship
   addRelationship(name, projection)
   IMMEDIATE 
   
   Add a relationship to the projection.
   
   @param name {String} name of the relationship field in the domain object
   @param projection {Projection} the projection to be assigned to the relationship
   @return Projection @chainable
*/
  function addRelationship(name, projection) {};


/* This file is a JavaScript module */
exports.Projection = Projection;
