﻿var LicenseItem = (function() {
    function fnLicenseItemConstructor(iNewId, iNewQuantity) {
        /****************************************************/
        /*                                                  */
        /*                                                  */
        /*           Class Level Private Variables          */
        /*                                                  */
        /*                                                  */
        /****************************************************/

        var oInstance;
        
        var iId;
        var iQuantity;

        /****************************************************/
        /*                                                  */
        /*                                                  */
        /*                Accessors/Mutators                */
        /*                                                  */
        /*                                                  */
        /****************************************************/
        
        this.getId = function() {
            return iId;
        }
        
        this.setId = function(iNewId) {
            iId = iNewId;
        }
        
        this.getQuantity = function() {
            return iQuantity;
        }
        
        this.setQuantity = function(iNewQuantity) {
            iQuantity = iNewQuantity;
        }
        
        /****************************************************/
        /*                                                  */
        /*                                                  */
        /*                Cloneable Interface               */
        /*                                                  */
        /*                                                  */
        /****************************************************/
        
        this.clone = function() {
            return new LicenseItem(this.getId(), this.getQuantity());
        }
        
        /****************************************************/
        /*                                                  */
        /*                                                  */
        /*                 Initialize Class                 */
        /*                                                  */
        /*                                                  */
        /****************************************************/

        oInstance = this;

        this.setId(iNewId);
        this.setQuantity(iNewQuantity);
    }
    
    return fnLicenseItemConstructor;
})();