//Copyright 2020 Siemens Digital Industries Software
//==================================================
//Copyright $2020.
//Siemens Product Lifecycle Management Software Inc.
//All Rights Reserved.
//==================================================
//Copyright 2020 Siemens Digital Industries Software

/*==================================================================================================
File description:
    This file contains the declaration for the Business Object, POM_object
    Filename:   POM_object.hxx
    Module:     tccore
    @BMIDE autogenerated
==================================================================================================*/

#ifndef TEAMCENTER__POM_OBJECT__HXX
#define TEAMCENTER__POM_OBJECT__HXX

#include <vector>
#include <metaframework/BulkInput.hxx>
#include <metaframework/BulkData.hxx>
#include <string>
#include <metaframework/CreateInput.hxx>
#include <metaframework/SaveAsInput.hxx>
#include <unidefs.h>
#include <map>
#include <common/tc_deprecation_macros.h>
#include <metaframework/BusinessObject.hxx>

#include <tccore/libtccore_exports.h>

namespace Teamcenter
{
    class POM_object;
}
namespace Teamcenter
{
    class POM_objectImpl;
}
namespace Teamcenter
{
    class POM_objectDelegate;
}
namespace Teamcenter
{
    class POM_objectDispatch;
}
namespace Teamcenter
{
    class POM_objectGenImpl;
}
namespace Teamcenter
{
    class RootObjectImpl;
}

class  TCCORE_API  Teamcenter::POM_object
     : public  ::Teamcenter::BusinessObject
{
public:

    /**
     * Get the Interface Name
     * @return - return desc for getInterfaceName
     */
    static const std::string&  getInterfaceName();


    ///
    /// Getter for the multifield key string Property
    /// @version Teamcenter 10.1
    /// @param value - Parameter value
    /// @param isNull - Returns true if the Parameter value is null
    /// @return - Status. 0 if successful
    ///
    int  getFnd0mfkinfo( std::string &value, bool &isNull ) const;

    ///
    /// Getter for a string Property
    /// @version Teamcenter 8.3
    /// @param value - Parameter value
    /// @param isNull - Returns true if the Parameter value is null
    /// @return - Status. 0 if successful
    ///
    int  getFnd0objectId( std::string &value, bool &isNull ) const;

    ///
    /// This operation deletes inputs objects in bulk. It either deletes none of the input objects or deletes all the input objects. It doesn't support partial deletion.
    /// @version Teamcenter 11.6
    /// @param inputs - A vector of data that contains reference to the object to be deleted.
    /// @param bd - A data structure to store objects and other information relevant for set-based operation.
    /// @return - Returns ITK_ok on Success. Otherwise, returns the specific error code.
    ///
    static int  fnd0BulkDelete( std::vector<  ::Teamcenter::BulkInput* > *inputs, ::Teamcenter::BulkData *bd );

    ///
    /// This operation verifies whether a particular property (propertyName) value of a secondary object referenced by the BO (Master form, dataset, ICO and so on) matches the propertyValue depending on the comparator. The secondary object type is objectType and it is referenced by the BO using relationtype. All secondary objects that match the relationtype and objecttype criteria will be checked. If one of them fail the operation will return fail.
    /// @version Teamcenter 8.2
    /// @param relationType - The name of the relation of the secondary objects.
    /// @param objectType - The type of the secondary objects.
    /// @param propertyName - The name of the property to match.
    /// @param propertyValue - The value of the property, in string format, to match.
    /// @param matchall - Whether to do the comparison for all the secondary objects.
    /// @param op - A value signifying the comparator operation.
    /// @param result - Whether a match is found.
    /// @return - Zero (0) if everything is alright otherwise the error code.
    ///
    int  fnd0chkObjProp( const std::string &relationType, const std::string &objectType, const std::string &propertyName, const std::string &propertyValue, const bool &matchall, const std::string &op, bool *result );

    ///
    /// Operation to create/setting values for shadow object
    /// @version Teamcenter 11.1
    /// @param pCreInput - create input
    /// @return - returns status as int
    ///
    int  fnd0CreateShadowObject( ::Teamcenter::CreateInput *pCreInput );

    ///
    /// Deletes the instance.
    /// @version Teamcenter 11.1
    /// @return - Failure code.
    ///
    int  fnd0Delete(  );

    ///
    /// to differentiate between real and shadow object
    /// @version Teamcenter 11.1
    /// @param isEdit - boolean
    /// @return - returns status as int
    ///
    int  fnd0IsShadowObjectForEdit( bool *isEdit );

    ///
    /// This operation is not supported now, there will be no support for issues stemming from uses of this operation.
    /// @version Teamcenter 11.2.2
    /// @param inputs - A vector of data that contains reference to the object to be refreshed
    /// @param bd - A data structure to store objects and other information relevant for set-based operation
    /// @param isLockForDelete - A boolean to indicate if object(s) are to be locked for deletion
    /// @param allowRelock - A boolean to indicate if object(s) can be relocked, which will discard all unsaved changes, if already locked by the same user
    /// @return - This operation returns ITK_ok on success. Otherwise, it will return specific error code.
    ///
    static int  fnd0Lock( std::vector<  ::Teamcenter::BulkInput* > *inputs, ::Teamcenter::BulkData *bd, const bool isLockForDelete, const bool allowRelock );

    ///
    /// This operation is not supported now, there will be no support for issues stemming from uses of this operation.
    /// @version Teamcenter 11.2.2
    /// @param inputs - A vector of data that contains reference to the object to be refreshed
    /// @param bd - A data structure to store objects and other information relevant for set-based operation
    /// @return - This operation returns ITK_ok on success. Otherwise, it will return specific error code.
    ///
    static int  fnd0Refresh( std::vector<  ::Teamcenter::BulkInput* > *inputs, ::Teamcenter::BulkData *bd );

    ///
    /// This operation is not supported now, there will be no support for issues stemming from uses of this operation.
    /// @version Teamcenter 11.2.2
    /// @param inputs - A vector of data that contains reference information to the object to be saved
    /// @param bd - A data structure to store objects and other information relevant for set-based operation
    /// @return - This operation returns ITK_ok on success. Otherwise, it will return specific error code.
    ///
    static int  fnd0Save( std::vector<  ::Teamcenter::BulkInput* > *inputs, ::Teamcenter::BulkData *bd );

    ///
    /// operation for creating/setting values to shadow object during saveas
    /// @version Teamcenter 11.1
    /// @param pSvAsInput - save as input
    /// @param newShObjTag - new shadow object
    /// @return - returns status as int
    ///
    int  fnd0SaveAsShadowObject( ::Teamcenter::SaveAsInput *pSvAsInput, tag_t *newShObjTag );

    ///
    /// This operation is not supported now, there will be no support for issues stemming from uses of this operation.
    /// @version Teamcenter 11.2.2
    /// @param inputs - A vector of data that contains reference to the object to be refreshed
    /// @param bd - A data structure to store objects and other information relevant for set-based operation
    /// @return - This operation returns ITK_ok on success. Otherwise, it will return specific error code.
    ///
    static int  fnd0Unlock( std::vector<  ::Teamcenter::BulkInput* > *inputs, ::Teamcenter::BulkData *bd );

    ///
    /// Operation is to provide basic pre release validations to the objects which are going to be released through <b>CM_validate_and_promote </b>workflow handler.
    /// @version Teamcenter 11.2.3
    /// @param inputObjects - A vector of data that contains reference to the objects to be validated for release.
    /// @param bulkData - A data structure to store objects and other information relevant for set-based operation.
    /// @param isDryRun - A boolean flag to check whether the input operation is  dry run operation or not.
    /// @param validationResults - A data structure to store the validation results for the input objects.
    /// @return - This operation returns ITK_ok on success. Otherwise, it will return specific error code.
    ///
    static int  fnd0ValidateBOTypeForRelease( std::vector<  ::Teamcenter::BulkInput* > *inputObjects, ::Teamcenter::BulkData *bulkData, const bool isDryRun, std::map< tag_t,std::vector< std::string > > *validationResults );

    ///
    /// Operation is to provide basic post validations to the objects which are promoted to public using <b>CM-promote-change-notice</b> workflow handler. This operation does not support logically deleted objects.
    /// @version Teamcenter 11.2.3
    /// @param inputObjects - A vector of data that contains reference information to the objects which are promoted.
    /// @param bulkData - A data structure to store objects and other information relevant for set-based operation.
    /// @param isDryRun - A boolean flag to check whether the input operation is  dry run operation or not.
    /// @param validationResults - A data structure to store the validation results for the input objects.
    /// @return - This operation returns ITK_ok on success. Otherwise, it will return specific error code.
    ///
    static int  fnd0ValidateBOTypePostPromote( std::vector<  ::Teamcenter::BulkInput* > *inputObjects, ::Teamcenter::BulkData *bulkData, const bool isDryRun, std::map< tag_t,std::vector< std::string > > *validationResults );

    ///
    /// Operation is to provide basic pre validations to the objects which are going to be promoted to public using the <b>CM-promote-change-notice</b> workflow handler. This operation does not support logically deleted objects.
    /// @version Teamcenter 11.2.3
    /// @param inputObjects - A vector of data that contains reference to the objects which are to be promoted to public.
    /// @param bulkData - A data structure to store objects and other information relevant for set-based operation.
    /// @param isDryRun - A boolean flag to check whether the input operation is  dry run operation or not.
    /// @param validationResults - A data structure to store the validation results for the input objects.
    /// @return - This operation returns ITK_ok on success. Otherwise, it will return specific error code.
    ///
    static int  fnd0ValidateBOTypePrePromote( std::vector<  ::Teamcenter::BulkInput* > *inputObjects, ::Teamcenter::BulkData *bulkData, const bool isDryRun, std::map< tag_t,std::vector< std::string > > *validationResults );

    ///
    /// This operation tests if the given object is local to the database or not.
    /// @version Tc 8
    /// @param result - Returns result as false if given object is local to the database, else returns result as true.
    /// @return - Return error code.
    ///
    int  isReplica( bool *result );
    //  Getter method for the Implementation Object
    ::Teamcenter::POM_objectImpl*  getPOM_objectImpl() const;
protected:
    //  Method to initialize
    virtual void initialize( ::Teamcenter::RootObjectImpl*  impl );

    /**
     * Constructor
     */
    POM_object();

    /**
     * Destructor
     */
    virtual ~POM_object();

private:
    //  Setter method for the Implementation Object
    ::Teamcenter::RootObjectImpl*  setPOM_objectImpl( ::Teamcenter::RootObjectImpl*  impl );

    //  Method to set the delete impl boolean
    void setDeleteImpl( bool  del );

    // Pointer to the Implementation object
    POM_objectImpl*  m_pom_objectImpl;

    //  Flag to indicate if Implementation object needs to be deleted
    bool  m_deleteImpl;

    /**
     * Name of the Business Object
     */
    static std::string  name;

    /**
     * Private default constructor. We do not want this class instantiated without the business object passed in.
     * @param POM_object - desc for POM_object parameter
     */
    POM_object( const POM_object& );
    POM_object& operator=( const POM_object& );

    friend class  POM_objectDelegate;
    friend class  POM_objectDispatch;
    friend class  POM_objectGenImpl;
};

#include <tccore/libtccore_undef.h>
#endif //   TEAMCENTER__POM_OBJECT__HXX
