<commit_before>(function(){

    var module = angular.module('sg-persona', ['restangular']);

    module.provider('sgPersona', function() {

        this.restUrl = 'http://localhost';

        this.$get = function() {
            var restUrl = this.restUrl;
            return {
                getRestUrl: function() {
                    return restUrl;
                }
            }
        };

        this.setRestUrl = function(restUrl) {
            this.restUrl = restUrl;
        };
    });

    module.factory('PersonaRestangular', ['Restangular', 'sgPersona', function(Restangular, sgPersona) {
        return Restangular.withConfig(function(RestangularConfigurer) {
            RestangularConfigurer.setBaseUrl(sgPersona.getRestUrl());
        });
    }]);

    module.factory('PersonaAbstractModel', ['PersonaRestangular', function(PersonaRestangular){
        var url = '';
        var modelMethos = {
            $new: function(id){
                return angular.extend({id: id}, modelMethos);
            },
            $build: function(){
                return angular.extend({id: undefined}, modelMethos, {$save: function(){
                    return PersonaRestangular.all(url).post(this);
                }});
            },
            $save: function() {
                return PersonaRestangular.one(url, this.id).customPUT(PersonaRestangular.copy(this),'',{},{});
            },

            $find: function(id){
                return PersonaRestangular.one(url, id).get();
            },
            $search: function(queryParams){
                return PersonaRestangular.all(url).getList(queryParams);
            },

            $remove: function(id){
                return PersonaRestangular.one(url, id).remove();
            }
        }
    }]);

    module.factory('SGEstadoCivil', ['PersonaRestangular',  function(PersonaRestangular) {

        var url = 'estadosCiviles';
        var urlCount = url + '/count';

        var modelMethos = {
            $new: function(id){
                return angular.extend({id: id}, modelMethos);
            },
            $build: function(){
                return angular.extend({id: undefined}, modelMethos, {$save: function(){
                    return PersonaRestangular.all(url).post(this);
                }});
            },
            $save: function() {
                return PersonaRestangular.one(id, this.id).customPUT(PersonaRestangular.copy(this),'',{},{});
            },

            $find: function(id){
                return PersonaRestangular.one(url, id).get();
            },
            $search: function(queryParams){
                return PersonaRestangular.all(url).getList(queryParams);
            },

            $count: function(){
                return PersonaRestangular.one(urlCount).get();
            },

            $disable: function(){
                return PersonaRestangular.all(url+'/'+this.id+'/disable').post();
            },
            $remove: function(id){
                return PersonaRestangular.one(url, id).remove();
            }
        };

        PersonaRestangular.extendModel(url, function(obj) {
            return angular.extend(obj, modelMethos);
        });

        return modelMethos;

    }]);

    module.factory('SGSexo', ['PersonaRestangular',  function(PersonaRestangular) {

        var url = 'sexos';
        var urlCount = url + '/count';

        var modelMethos = {
            $new: function(id){
                return angular.extend({id: id}, modelMethos);
            },
            $build: function(){
                return angular.extend({id: undefined}, modelMethos, {$save: function(){
                    return PersonaRestangular.all(url).post(this);
                }});
            },
            $save: function() {
                return PersonaRestangular.one(id, this.id).customPUT(PersonaRestangular.copy(this),'',{},{});
            },

            $find: function(id){
                return PersonaRestangular.one(url, id).get();
            },
            $search: function(queryParams){
                return PersonaRestangular.all(url).getList(queryParams);
            },

            $count: function(){
                return PersonaRestangular.one(urlCount).get();
            },

            $disable: function(){
                return PersonaRestangular.all(url+'/'+this.id+'/disable').post();
            },
            $remove: function(id){
                return PersonaRestangular.one(url, id).remove();
            }
        };

        PersonaRestangular.extendModel(url, function(obj) {
            return angular.extend(obj, modelMethos);
        });

        return modelMethos;

    }]);

    module.factory('SGTipoDocumento', ['PersonaRestangular',  function(PersonaRestangular) {

        var url = 'tipoDocumentos';
        var urlCount = url + '/count';

        var modelMethos = {
            $new: function(id){
                return angular.extend({id: id}, modelMethos);
            },
            $build: function(){
                return angular.extend({id: undefined}, modelMethos, {$save: function(){
                    return PersonaRestangular.all(url).post(this);
                }});
            },
            $save: function() {
                return PersonaRestangular.one(id, this.id).customPUT(PersonaRestangular.copy(this),'',{},{});
            },

            $find: function(id){
                return PersonaRestangular.one(url, id).get();
            },
            $search: function(queryParams){
                return PersonaRestangular.all(url).getList(queryParams);
            },

            $searchByPersonaNatural: function(){
                return PersonaRestangular.all(url).getList({tipoPersona: 'natural'});
            },
            $searchByPersonaJuridica: function(){
                return PersonaRestangular.all(url).getList({tipoPersona: 'juridica'});
            },

            $count: function(){
                return PersonaRestangular.one(urlCount).get();
            },<commit_msg>url id TipoDocumento bug<commit_after>(function(){

    var module = angular.module('sg-persona', ['restangular']);

    module.provider('sgPersona', function() {

        this.restUrl = 'http://localhost';

        this.$get = function() {
            var restUrl = this.restUrl;
            return {
                getRestUrl: function() {
                    return restUrl;
                }
            }
        };

        this.setRestUrl = function(restUrl) {
            this.restUrl = restUrl;
        };
    });

    module.factory('PersonaRestangular', ['Restangular', 'sgPersona', function(Restangular, sgPersona) {
        return Restangular.withConfig(function(RestangularConfigurer) {
            RestangularConfigurer.setBaseUrl(sgPersona.getRestUrl());
        });
    }]);

    module.factory('PersonaAbstractModel', ['PersonaRestangular', function(PersonaRestangular){
        var url = '';
        var modelMethos = {
            $new: function(id){
                return angular.extend({id: id}, modelMethos);
            },
            $build: function(){
                return angular.extend({id: undefined}, modelMethos, {$save: function(){
                    return PersonaRestangular.all(url).post(this);
                }});
            },
            $save: function() {
                return PersonaRestangular.one(url, this.id).customPUT(PersonaRestangular.copy(this),'',{},{});
            },

            $find: function(id){
                return PersonaRestangular.one(url, id).get();
            },
            $search: function(queryParams){
                return PersonaRestangular.all(url).getList(queryParams);
            },

            $remove: function(id){
                return PersonaRestangular.one(url, id).remove();
            }
        }
    }]);

    module.factory('SGEstadoCivil', ['PersonaRestangular',  function(PersonaRestangular) {

        var url = 'estadosCiviles';
        var urlCount = url + '/count';

        var modelMethos = {
            $new: function(id){
                return angular.extend({id: id}, modelMethos);
            },
            $build: function(){
                return angular.extend({id: undefined}, modelMethos, {$save: function(){
                    return PersonaRestangular.all(url).post(this);
                }});
            },
            $save: function() {
                return PersonaRestangular.one(id, this.id).customPUT(PersonaRestangular.copy(this),'',{},{});
            },

            $find: function(id){
                return PersonaRestangular.one(url, id).get();
            },
            $search: function(queryParams){
                return PersonaRestangular.all(url).getList(queryParams);
            },

            $count: function(){
                return PersonaRestangular.one(urlCount).get();
            },

            $disable: function(){
                return PersonaRestangular.all(url+'/'+this.id+'/disable').post();
            },
            $remove: function(id){
                return PersonaRestangular.one(url, id).remove();
            }
        };

        PersonaRestangular.extendModel(url, function(obj) {
            return angular.extend(obj, modelMethos);
        });

        return modelMethos;

    }]);

    module.factory('SGSexo', ['PersonaRestangular',  function(PersonaRestangular) {

        var url = 'sexos';
        var urlCount = url + '/count';

        var modelMethos = {
            $new: function(id){
                return angular.extend({id: id}, modelMethos);
            },
            $build: function(){
                return angular.extend({id: undefined}, modelMethos, {$save: function(){
                    return PersonaRestangular.all(url).post(this);
                }});
            },
            $save: function() {
                return PersonaRestangular.one(id, this.id).customPUT(PersonaRestangular.copy(this),'',{},{});
            },

            $find: function(id){
                return PersonaRestangular.one(url, id).get();
            },
            $search: function(queryParams){
                return PersonaRestangular.all(url).getList(queryParams);
            },

            $count: function(){
                return PersonaRestangular.one(urlCount).get();
            },

            $disable: function(){
                return PersonaRestangular.all(url+'/'+this.id+'/disable').post();
            },
            $remove: function(id){
                return PersonaRestangular.one(url, id).remove();
            }
        };

        PersonaRestangular.extendModel(url, function(obj) {
            return angular.extend(obj, modelMethos);
        });

        return modelMethos;

    }]);

    module.factory('SGTipoDocumento', ['PersonaRestangular',  function(PersonaRestangular) {

        var url = 'tipoDocumentos';
        var urlCount = url + '/count';

        var modelMethos = {
            $new: function(id){
                return angular.extend({id: id}, modelMethos);
            },
            $build: function(){
                return angular.extend({id: undefined}, modelMethos, {$save: function(){
                    return PersonaRestangular.all(url).post(this);
                }});
            },
            $save: function() {
                return PersonaRestangular.one(url, this.abreviatura).customPUT(PersonaRestangular.copy(this),'',{},{});
            },

            $find: function(id){
                return PersonaRestangular.one(url, id).get();
            },
            $search: function(queryParams){
                return PersonaRestangular.all(url).getList(queryParams);
            },

            $searchByPersonaNatural: function(){
                return PersonaRestangular.all(url).getList({tipoPersona: 'natural'});
            },
            $searchByPersonaJuridica: function(){
                return PersonaRestangular.all(url).getList({tipoPersona: 'juridica'});
            },

            $count: function(){
                return PersonaRestangular.one(urlCount).get();
            },
{'fraction_non_alphanumeric': 0.13567714780886359, 'fraction_numerical': 0.0, 'mean_word_length': 1.7255960413855151, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5748738', 'n_tokens_mistral': 3278, 'n_tokens_neox': 3115, 'n_words': 509}