text:
import Controller from '@ember/controller';
import { A as emberA } from 'ember-runtime';
import { Route } from 'ember-routing';
import { run } from '@ember/runloop';
import { computed } from 'ember-metal';
import { QueryParamTestCase, moduleFor } from 'internal-test-helpers';

class ModelDependentQPTestCase extends QueryParamTestCase {
  boot() {
    this.setupApplication();
    return this.visitApplication();
  }

  teardown() {
    super.teardown(...arguments);
    this.assert.ok(
      !this.expectedModelHookParams,
      'there should be no pending expectation of expected model hook params'
    );
  }

  reopenController(name, options) {
    this.application.resolveRegistration(`controller:${name}`).reopen(options);
  }

  reopenRoute(name, options) {
    this.application.resolveRegistration(`route:${name}`).reopen(options);
  }

  queryParamsStickyTest1(urlPrefix) {
    let assert = this.assert;

    assert.expect(14);

    return this.boot().then(() => {
      run(this.$link1, 'click');
      this.assertCurrentPath(`${urlPrefix}/a-1`);

      this.setAndFlush(this.controller, 'q', 'lol');

      assert.equal(this.$link1.getAttribute('href'), `${urlPrefix}/a-1?q=lol`);
      assert.equal(this.$link2.getAttribute('href'), `${urlPrefix}/a-2`);
      assert.equal(this.$link3.getAttribute('href'), `${urlPrefix}/a-3`);

      run(this.$link2, 'click');

      assert.equal(this.controller.get('q'), 'wat');
      assert.equal(this.controller.get('z'), 0);
      assert.deepEqual(this.controller.get('model'), { id: 'a-2' });
      assert.equal(this.$link1.getAttribute('href'), `${urlPrefix}/a-1?q=lol`);
      assert.equal(this.$link2.getAttribute('href'), `${urlPrefix}/a-2`);
      assert.equal(this.$link3.getAttribute('href'), `${urlPrefix}/a-3`);
    });
  }

  queryParamsStickyTest2(urlPrefix) {
    let assert = this.assert;

    assert.expect(24);

    return this.boot().then(() => {
      this.expectedModelHookParams = { id: 'a-1', q: 'lol', z: 0 };
      this.transitionTo(`${urlPrefix}/a-1?q=lol`);

      assert.deepEqual(this.controller.get('model'), { id: 'a-1' });
      assert.equal(this.controller.get('q'), 'lol');
      assert.equal(this.controller.get('z'), 0);
      assert.equal(this.$link1.getAttribute('href'), `${urlPrefix}/a-1?q=lol`);
      assert.equal(this.$link2.getAttribute('href'), `${urlPrefix}/a-2`);
      assert.equal(this.$link3.getAttribute('href'), `${urlPrefix}/a-3`);

      this.expectedModelHookParams = { id: 'a-2', q: 'lol', z: 0 };
      this.transitionTo(`${urlPrefix}/a-2?q=lol`);

      assert.deepEqual(
        this.controller.get('model'),
        { id: 'a-2' },
        "controller's model changed to a-2"
      );
      assert.equal(this.controller.get('q'), 'lol');
      assert.equal(this.controller.get('z'), 0);
      assert.equal(this.$link1.getAttribute('href'), `${urlPrefix}/a-1?q=lol`);
      assert.equal(this.$link2.getAttribute('href'), `${urlPrefix}/a-2?q=lol`);
      assert.equal(this.$link3.getAttribute('href'), `${urlPrefix}/a-3`);

      this.expectedModelHookParams = { id: 'a-3', q: 'lol', z: 123 };
      this.transitionTo(`${urlPrefix}/a-3?q=lol&z=123`);

      assert.equal(this.controller.get('q'), 'lol');
      assert.equal(this.controller.get('z'), 123);
      assert.equal(this.$link1.getAttribute('href'), `${urlPrefix}/a-1?q=lol`);
      assert.equal(this.$link2.getAttribute('href'), `${urlPrefix}/a-2?q=lol`);
      assert.equal(this.$link3.getAttribute('href'), `${urlPrefix}/a-3?q=lol&z=123`);
    });
  }

  queryParamsStickyTest3(urlPrefix, articleLookup) {
    let assert = this.assert;

    assert.expect(32);

    this.addTemplate(
      'application',
      `{{#each articles as |a|}} {{link-to 'Article' '${articleLookup}' a.id id=a.id}} {{/each}}`
    );

    return this.boot().then(() => {
      this.expectedModelHookParams = { id: 'a-1', q: 'wat', z: 0 };
      this.transitionTo(articleLookup, 'a-1');

      assert.deepEqual(this.controller.get('model'), { id: 'a-1' });
      assert.equal(this.controller.get('q'), 'wat');
      assert.equal(this.controller.get('z'), 0);
      assert.equal(this.$link1.getAttribute('href'), `${urlPrefix}/a-1`);
      assert.equal(this.$link2.getAttribute('href'), `${urlPrefix}/a-2`);
      assert.equal(this.$link3.getAttribute('href'), `${urlPrefix}/a-3`);

      this.expectedModelHookParams = { id: 'a-2', q: 'lol', z: 0 };
      this.transitionTo(articleLookup, 'a-2', { queryParams: { q: 'lol' } });

      assert.deepEqual(this.controller.get('model'), { id: 'a-2' });
      assert.equal(this.controller.get('q'), 'lol');
      assert.equal(this.controller.get('z'), 0);
      assert.equal(this.$link1.getAttribute('href'), `${urlPrefix}/a-1`);
      assert.equal(this.$link2.getAttribute('href'), `${urlPrefix}/a-2?q=lol`);
      assert.equal(this.$link3.getAttribute('href'), `${urlPrefix}/a-3`);

      this.expectedModelHookParams = { id: 'a-3', q: 'hay', z: 0 };
      this.transitionTo(articleLookup, 'a-3', { queryParams: { q: 'hay' } });

      assert.deepEqual(this.controller.get('model'), { id: 'a-3' });
      assert.equal(this.controller.get('q'), 'hay');
      assert.equal(this.controller.get('z'), 0);
      assert.equal(this.$link1.getAttribute('href'), `${urlPrefix}/a-1`);
      assert.equal(this.$link2.getAttribute('href'), `${urlPrefix}/a-2?q=lol`);
      assert.equal(this.$link3.getAttribute('href'), `${urlPrefix}/a-3?q=hay`);

      this.expectedModelHookParams = { id: 'a-2', q: 'lol', z: 1 };
      this.transitionTo(articleLookup, 'a-2', { queryParams: { z: 1 } });

      assert.deepEqual(this.controller.get('model'), { id: 'a-2' });
      assert.equal(this.controller.get('q'), 'lol');
      assert.equal(this.controller.get('z'), 1);
      assert.equal(this.$link1.getAttribute('href'), `${urlPrefix}/a-1`);
      assert.equal(this.$link2.getAttribute('href'), `${urlPrefix}/a-2?q=lol&z=1`);
      assert.equal(this.$link3.getAttribute('href'), `${urlPrefix}/a-3?q=hay`);
    });
  }

  queryParamsStickyTest4(urlPrefix, articleLookup) {
    let assert = this.assert;

    assert.expect(24);

    this.setupApplication();

    this.reopenController(articleLookup, {
      queryParams: { q: { scope: 'controller' } },
    });

    return this.visitApplication().then(() => {
      run(this.$link1, 'click');
      this.assertCurrentPath(`${urlPrefix}/a-1`);

      this.setAndFlush(this.controller, 'q', 'lol');

      assert.equal(this.$link1.getAttribute('href'), `${urlPrefix}/a-1?q=lol`);
      assert.equal(this.$link2.getAttribute('href'), `${urlPrefix}/a-2?q=lol`);
      assert.equal(this.$link3.getAttribute('href'), `${urlPrefix}/a-3?q=lol`);

      run(this.$link2, 'click');

      assert.equal(this.controller.get('q'), 'lol');
      assert.equal(this.controller.get('z'), 0);
      assert.deepEqual(this.controller.get('model'), { id: 'a-2' });

      assert.equal(this.$link1.getAttribute('href'), `${urlPrefix}/a-1?q=lol`);
      assert.equal(this.$link2.getAttribute('href'), `${urlPrefix}/a-2?q=lol`);
      assert.equal(this.$link3.getAttribute('href'), `${urlPrefix}/a-3?q=lol`);

      this.expectedModelHookParams = { id: 'a-3', q: 'haha', z: 123 };
      this.transitionTo(`${urlPrefix}/a-3?q=haha&z=123`);

      assert.deepEqual(this.controller.get('model'), { id: 'a-3' });
      assert.equal(this.controller.get('q'), 'haha');
      assert.equal(this.controller.get('z'), 123);

      assert.equal(this.$link1.getAttribute('href'), `${urlPrefix}/a-1?q=haha`);
      assert.equal(this.$link2.getAttribute('href'), `${urlPrefix}/a-2?q=haha`);
      assert.equal(this.$link3.getAttribute('href'), `${urlPrefix}/a-3?q=haha&z=123`);

      this.setAndFlush(this.controller, 'q', 'woot');

      assert.equal(this.$link1.getAttribute('href'), `${urlPrefix}/a-1?q=woot`);
      assert.equal(this.$link2.getAttribute('href'), `${urlPrefix}/a-2?q=woot`);
      assert.equal(this.$link3.getAttribute('href'), `${urlPrefix}/a-3?q=woot&z=123`);
    });
  }

  queryParamsStickyTest5(urlPrefix, commentsLookupKey) {
    let assert = this.assert;

    assert.expect(12);

    return this.boot().then(() => {
      this.transitionTo(commentsLookupKey, 'a-1');

      let commentsCtrl = this.getController(commentsLookupKey);
      assert.equal(commentsCtrl.get('page'), 1);
      this.assertCurrentPath(`${urlPrefix}/a-1/comments`);

      this.setAndFlush(commentsCtrl, 'page', 2);
      this.assertCurrentPath(`${urlPrefix}/a-1/comments?page=2`);

      this.setAndFlush(commentsCtrl, 'page', 3);
      this.assertCurrentPath(`${urlPrefix}/a-1/comments?page=3`);

      this.transitionTo(commentsLookupKey, 'a-2');
      assert.equal(commentsCtrl.get('page'), 1);
      this.assertCurrentPath(`${urlPrefix}/a-2/comments`);

      this.transitionTo(commentsLookupKey, 'a-1');
      assert.equal(commentsCtrl.get('page'), 3);
      this.assertCurrentPath(`${urlPrefix}/a-1/comments?page=3`);
    });
  }

  queryParamsStickyTest6(urlPrefix, articleLookup, commentsLookup) {
    let assert = this.assert;

    assert.expect(13);

    this.setupApplication();

    this.reopenRoute(articleLookup, {
      resetController(controller, isExiting) {
        this.controllerFor(commentsLookup).set('page', 1);
        if (isExiting) {
          controller.set('q', 'imdone');
        }
      },
    });

    this.addTemplate(
      'about',
      `{{link-to 'A' '${commentsLookup}' 'a-1' id='one'}} {{link-to 'B' '${commentsLookup}' 'a-2' id='two'}}`
    );

    return this.visitApplication().then(() => {
      this.transitionTo(commentsLookup, 'a-1');

      let commentsCtrl = this.getController(commentsLookup);
      assert.equal(commentsCtrl.get('page'), 1);
      this.assertCurrentPath(`${urlPrefix}/a-1/comments`);

      this.setAndFlush(commentsCtrl, 'page', 2);
      this.assertCurrentPath(`${urlPrefix}/a-1/comments?page=2`);

      this.transitionTo(commentsLookup, 'a-2');
      assert.equal(commentsCtrl.get('page'), 1);
      assert.equal(this.controller.get('q'), 'wat');

      this.transitionTo(commentsLookup, 'a-1');

      this.assertCurrentPath(`${urlPrefix}/a-1/comments`);
      assert.equal(commentsCtrl.get('page'), 1);

      this.transitionTo('about');
      assert.equal(
        document.getElementById('one').getAttribute('href'),
        `${urlPrefix}/a-1/comments?q=imdone`
      );
      assert.equal(
        document.getElementById('two').getAttribute('href'),
        `${urlPrefix}/a-2/comments`
      );
    });
  }
}

moduleFor(
  'Query Params - model-dependent state',
  class extends ModelDependentQPTestCase {
    setupApplication() {
      this.router.map(function() {
        this.route('article', { path: '/a/:id' }, function() {
          this.route('comments', { resetNamespace: true });
        });
        this.route('about');
      });

      let articles = emberA([{ id: 'a-1' }, { id: 'a-2' }, { id: 'a-3' }]);

      this.add(
        'controller:application',
        Controller.extend({
          articles,
        })
      );

      let self = this;
      let assert = this.assert;
      this.add(
        'route:article',
        Route.extend({
          model(params) {
            if (self.expectedModelHookParams) {
              assert.deepEqual(
                params,
                self.expectedModelHookParams,
                'the ArticleRoute model hook received the expected merged dynamic segment + query params hash'
              );
              self.expectedModelHookParams = null;
            }
            return articles.findBy('id', params.id);
          },
        })
      );

      this.add(
        'controller:article',
        Controller.extend({
          queryParams: ['q', 'z'],
          q: 'wat',
          z: 0,
        })
      );

      this.add(
        'controller:comments',
        Controller.extend({
          queryParams: 'page',
          page: 1,
        })
      );

      this.addTemplate(
        'application',
        "{{#each articles as |a|}} 1{{link-to 'Article' 'article' a id=a.id}} {{/each}} {{outlet}}"
      );
    }

    visitApplication() {
      return this.visit('/').then(() => {
        let assert = this.assert;

        this.$link1 = document.getElementById('a-1');
        this.$link2 = document.getElementById('a-2');
        this.$link3 = document.getElementById('a-3');

        assert.equal(this.$link1.getAttribute('href'), '/a/a-1');
        assert.equal(this.$link2.getAttribute('href'), '/a/a-2');
        assert.equal(this.$link3.getAttribute('href'), '/a/a-3');

        this.controller = this.getController('article');
      });
    }

    ["@test query params have 'model' stickiness by default"]() {
      return this.queryParamsStickyTest1('/a');
    }

    ["@test query params have 'model' stickiness by default (url changes)"]() {
      return this.queryParamsStickyTest2('/a');
    }

    ["@test query params have 'model' stickiness by default (params-based transitions)"]() {
      return this.queryParamsStickyTest3('/a', 'article');
    }

    ["@test 'controller' stickiness shares QP state between models"]() {
      return this.queryParamsStickyTest4('/a', 'article');
    }

    ["@test 'model' stickiness is scoped to current or first dynamic parent route"]() {
      return this.queryParamsStickyTest5('/a', 'comments');
    }

    ['@test can reset query params using the resetController hook']() {
      return this.queryParamsStickyTest6('/a', 'article', 'comments');
    }
  }
);

moduleFor(
  'Query Params - model-dependent state (nested)',
  class extends ModelDependentQPTestCase {
    setupApplication() {
      this.router.map(function() {
        this.route('site', function() {
          this.route('article', { path: '/a/:id' }, function() {
            this.route('comments');
          });
        });
        this.route('about');
      });

      let site_articles = emberA([{ id: 'a-1' }, { id: 'a-2' }, { id: 'a-3' }]);

      this.add(
        'controller:application',
        Controller.extend({
          articles: site_articles,
        })
      );

      let self = this;
      let assert = this.assert;
      this.add(
        'route:site.article',
        Route.extend({
          model(params) {
            if (self.expectedModelHookParams) {
              assert.deepEqual(
                params,
                self.expectedModelHookParams,
                'the ArticleRoute model hook received the expected merged dynamic segment + query params hash'
              );
              self.expectedModelHookParams = null;
            }
            return site_articles.findBy('id', params.id);
          },
        })
      );

      this.add(
        'controller:site.article',
        Controller.extend({
          queryParams: ['q', 'z'],
          q: 'wat',
          z: 0,
        })
      );

      this.add(
        'controller:site.article.comments',
        Controller.extend({
          queryParams: 'page',
          page: 1,
        })
      );

      this.addTemplate(
        'application',
        "{{#each articles as |a|}} {{link-to 'Article' 'site.article' a id=a.id}} {{/each}} {{outlet}}"
      );
    }

    visitApplication() {
      return this.visit('/').then(() => {
        let assert = this.assert;

        this.$link1 = document.getElementById('a-1');
        this.$link2 = document.getElementById('a-2');
        this.$link3 = document.getElementById('a-3');

        assert.equal(this.$link1.getAttribute('href'), '/site/a/a-1');
        assert.equal(this.$link2.getAttribute('href'), '/site/a/a-2');
        assert.equal(this.$link3.getAttribute('href'), '/site/a/a-3');

        this.controller = this.getController('site.article');
      });
    }

    ["@test query params have 'model' stickiness by default"]() {
      return this.queryParamsStickyTest1('/site/a');
    }

    ["@test query params have 'model' stickiness by default (url changes)"]() {
      return this.queryParamsStickyTest2('/site/a');
    }

    ["@test query params have 'model' stickiness by default (params-based transitions)"]() {
      return this.queryParamsStickyTest3('/site/a', 'site.article');
    }

    ["@test 'controller' stickiness shares QP state between models"]() {
      return this.queryParamsStickyTest4('/site/a', 'site.article');
    }

    ["@test 'model' stickiness is scoped to current or first dynamic parent route"]() {
      return this.queryParamsStickyTest5('/site/a', 'site.article.comments');
    }

    ['@test can reset query params using the resetController hook']() {
      return this.queryParamsStickyTest6('/site/a', 'site.article', 'site.article.comments');
    }
  }
);

moduleFor(
  'Query Params - model-dependent state (nested & more than 1 dynamic segment)',
  class extends ModelDependentQPTestCase {
    setupApplication() {
      this.router.map(function() {
        this.route('site', { path: '/site/:site_id' }, function() {
          this.route('article', { path: '/a/:article_id' }, function() {
            this.route('comments');
          });
        });
      });

      let sites = emberA([{ id: 's-1' }, { id: 's-2' }, { id: 's-3' }]);
      let site_articles = emberA([{ id: 'a-1' }, { id: 'a-2' }, { id: 'a-3' }]);

      this.add(
        'controller:application',
        Controller.extend({
          siteArticles: site_articles,
          sites,
          allSitesAllArticles: computed({
            get() {
              let ret = [];
              let siteArticles = this.siteArticles;
              let sites = this.sites;
              sites.forEach(site => {
                ret = ret.concat(
                  siteArticles.map(article => {
                    return {
                      id: `${site.id}-${article.id}`,
                      site_id: site.id,
                      article_id: article.id,
                    };
                  })
                );
              });
              return ret;
            },
          }),
        })
      );

      let self = this;
      let assert = this.assert;
      this.add(
        'route:site',
        Route.extend({
          model(params) {
            if (self.expectedSiteModelHookParams) {
              assert.deepEqual(
                params,
                self.expectedSiteModelHookParams,
                'the SiteRoute model hook received the expected merged dynamic segment + query params hash'
              );
              self.expectedSiteModelHookParams = null;
            }
            return sites.findBy('id', params.site_id);
          },
        })
      );

      this.add(
        'route:site.article',
        Route.extend({
          model(params) {
            if (self.expectedArticleModelHookParams) {
              assert.deepEqual(
                params,
                self.expectedArticleModelHookParams,
                'the SiteArticleRoute model hook received the expected merged dynamic segment + query params hash'
              );
              self.expectedArticleModelHookParams = null;
            }
            return site_articles.findBy('id', params.article_id);
          },
        })
      );

      this.add(
        'controller:site',
        Controller.extend({
          queryParams: ['country'],
          country: 'au',
        })
      );

      this.add(
        'controller:site.article',
        Controller.extend({
          queryParams: ['q', 'z'],
          q: 'wat',
          z: 0,
        })
      );

      this.add(
        'controller:site.article.comments',
        Controller.extend({
          queryParams: ['page'],
          page: 1,
        })
      );

      this.addTemplate(
        'application',
        "{{#each allSitesAllArticles as |a|}} {{#link-to 'site.article' a.site_id a.article_id id=a.id}}Article [{{a.site_id}}] [{{a.article_id}}]{{/link-to}} {{/each}} {{outlet}}"
      );
    }

    visitApplication() {
      return this.visit('/').then(() => {
        let assert = this.assert;

        this.links = {};
        this.links['s-1-a-1'] = document.getElementById('s-1-a-1');
        this.links['s-1-a-2'] = document.getElementById('s-1-a-2');
        this.links['s-1-a-3'] = document.getElementById('s-1-a-3');
        this.links['s-2-a-1'] = document.getElementById('s-2-a-1');
        this.links['s-2-a-2'] = document.getElementById('s-2-a-2');
        this.links['s-2-a-3'] = document.getElementById('s-2-a-3');
        this.links['s-3-a-1'] = document.getElementById('s-3-a-1');
        this.links['s-3-a-2'] = document.getElementById('s-3-a-2');
        this.links['s-3-a-3'] = document.getElementById('s-3-a-3');

        assert.equal(this.links['s-1-a-1'].getAttribute('href'), '/site/s-1/a/a-1');
        assert.equal(this.links['s-1-a-2'].getAttribute('href'), '/site/s-1/a/a-2');
        assert.equal(this.links['s-1-a-3'].getAttribute('href'), '/site/s-1/a/a-3');
        assert.equal(this.links['s-2-a-1'].getAttribute('href'), '/site/s-2/a/a-1');
        assert.equal(this.links['s-2-a-2'].getAttribute('href'), '/site/s-2/a/a-2');
        assert.equal(this.links['s-2-a-3'].getAttribute('href'), '/site/s-2/a/a-3');
        assert.equal(this.links['s-3-a-1'].getAttribute('href'), '/site/s-3/a/a-1');
        assert.equal(this.links['s-3-a-2'].getAttribute('href'), '/site/s-3/a/a-2');
        assert.equal(this.links['s-3-a-3'].getAttribute('href'), '/site/s-3/a/a-3');

        this.site_controller = this.getController('site');
        this.article_controller = this.getController('site.article');
      });
    }

    ["@test query params have 'model' stickiness by default"](assert) {
      assert.expect(59);

      return this.boot().then(() => {
        run(this.links['s-1-a-1'], 'click');
        assert.deepEqual(this.site_controller.get('model'), { id: 's-1' });
        assert.deepEqual(this.article_controller.get('model'), { id: 'a-1' });
        this.assertCurrentPath('/site/s-1/a/a-1');

        this.setAndFlush(this.article_controller, 'q', 'lol');

        assert.equal(this.links['s-1-a-1'].getAttribute('href'), '/site/s-1/a/a-1?q=lol');
        assert.equal(this.links['s-1-a-2'].getAttribute('href'), '/site/s-1/a/a-2');
        assert.equal(this.links['s-1-a-3'].getAttribute('href'), '/site/s-1/a/a-3');
        assert.equal(this.links['s-2-a-1'].getAttribute('href'), '/site/s-2/a/a-1?q=lol');
        assert.equal(this.links['s-2-a-2'].getAttribute('href'), '/site/s-2/a/a-2');
        assert.equal(this.links['s-2-a-3'].getAttribute('href'), '/site/s-2/a/a-3');
        assert.equal(this.links['s-3-a-1'].getAttribute('href'), '/site/s-3/a/a-1?q=lol');
        assert.equal(this.links['s-3-a-2'].getAttribute('href'), '/site/s-3/a/a-2');
        assert.equal(this.links['s-3-a-3'].getAttribute('href'), '/site/s-3/a/a-3');

        this.setAndFlush(this.site_controller, 'country', 'us');

        assert.equal(
          this.links['s-1-a-1'].getAttribute('href'),
          '/site/s-1/a/a-1?country=us&q=lol'
        );
        assert.equal(this.links['s-1-a-2'].getAttribute('href'), '/site/s-1/a/a-2?country=us');
        assert.equal(this.links['s-1-a-3'].getAttribute('href'), '/site/s-1/a/a-3?country=us');
        assert.equal(this.links['s-2-a-1'].getAttribute('href'), '/site/s-2/a/a-1?q=lol');
        assert.equal(this.links['s-2-a-2'].getAttribute('href'), '/site/s-2/a/a-2');
        assert.equal(this.links['s-2-a-3'].getAttribute('href'), '/site/s-2/a/a-3');
        assert.equal(this.links['s-3-a-1'].getAttribute('href'), '/site/s-3/a/a-1?q=lol');
        assert.equal(this.links['s-3-a-2'].getAttribute('href'), '/site/s-3/a/a-2');
        assert.equal(this.links['s-3-a-3'].getAttribute('href'), '/site/s-3/a/a-3');

        run(this.links['s-1-a-2'], 'click');

        assert.equal(this.site_controller.get('country'), 'us');
        assert.equal(this.article_controller.get('q'), 'wat');
        assert.equal(this.article_controller.get('z'), 0);
        assert.deepEqual(this.site_controller.get('model'), { id: 's-1' });
        assert.deepEqual(this.article_controller.get('model'), { id: 'a-2' });
        assert.equal(
          this.links['s-1-a-1'].getAttribute('href'),
          '/site/s-1/a/a-1?country=us&q=lol'
        );
        assert.equal(this.links['s-1-a-2'].getAttribute('href'), '/site/s-1/a/a-2?country=us');
        assert.equal(this.links['s-1-a-3'].getAttribute('href'), '/site/s-1/a/a-3?country=us');
        assert.equal(this.links['s-2-a-1'].getAttribute('href'), '/site/s-2/a/a-1?q=lol');
        assert.equal(this.links['s-2-a-2'].getAttribute('href'), '/site/s-2/a/a-2');
        assert.equal(this.links['s-2-a-3'].getAttribute('href'), '/site/s-2/a/a-3');
        assert.equal(this.links['s-3-a-1'].getAttribute('href'), '/site/s-3/a/a-1?q=lol');
        assert.equal(this.links['s-3-a-2'].getAttribute('href'), '/site/s-3/a/a-2');
        assert.equal(this.links['s-3-a-3'].getAttribute('href'), '/site/s-3/a/a-3');

        run(this.links['s-2-a-2'], 'click');

        assert.equal(this.site_controller.get('country'), 'au');
        assert.equal(this.article_controller.get('q'), 'wat');
        assert.equal(this.article_controller.get('z'), 0);
        assert.deepEqual(this.site_controller.get('model'), { id: 's-2' });
        assert.deepEqual(this.article_controller.get('model'), { id: 'a-2' });
        assert.equal(
          this.links['s-1-a-1'].getAttribute('href'),
          '/site/s-1/a/a-1?country=us&q=lol'
        );
        assert.equal(this.links['s-1-a-2'].getAttribute('href'), '/site/s-1/a/a-2?country=us');
        assert.equal(this.links['s-1-a-3'].getAttribute('href'), '/site/s-1/a/a-3?country=us');
        assert.equal(this.links['s-2-a-1'].getAttribute('href'), '/site/s-2/a/a-1?q=lol');
        assert.equal(this.links['s-2-a-2'].getAttribute('href'), '/site/s-2/a/a-2');
        assert.equal(this.links['s-2-a-3'].getAttribute('href'), '/site/s-2/a/a-3');
        assert.equal(this.links['s-3-a-1'].getAttribute('href'), '/site/s-3/a/a-1?q=lol');
        assert.equal(this.links['s-3-a-2'].getAttribute('href'), '/site/s-3/a/a-2');
        assert.equal(this.links['s-3-a-3'].getAttribute('href'), '/site/s-3/a/a-3');
      });
    }

    ["@test query params have 'model' stickiness by default (url changes)"](assert) {
      assert.expect(88);

      return this.boot().then(() => {
        this.expectedSiteModelHookParams = { site_id: 's-1', country: 'au' };
        this.expectedArticleModelHookParams = {
          article_id: 'a-1',
          q: 'lol',
          z: 0,
        };
        this.transitionTo('/site/s-1/a/a-1?q=lol');

        assert.deepEqual(
          this.site_controller.get('model'),
          { id: 's-1' },
          "site controller's model is s-1"
        );
        assert.deepEqual(
          this.article_controller.get('model'),
          { id: 'a-1' },
          "article controller's model is a-1"
        );
        assert.equal(this.site_controller.get('country'), 'au');
        assert.equal(this.article_controller.get('q'), 'lol');
        assert.equal(this.article_controller.get('z'), 0);
        assert.equal(this.links['s-1-a-1'].getAttribute('href'), '/site/s-1/a/a-1?q=lol');
        assert.equal(this.links['s-1-a-2'].getAttribute('href'), '/site/s-1/a/a-2');
        assert.equal(this.links['s-1-a-3'].getAttribute('href'), '/site/s-1/a/a-3');
        assert.equal(this.links['s-2-a-1'].getAttribute('href'), '/site/s-2/a/a-1?q=lol');
        assert.equal(this.links['s-2-a-2'].getAttribute('href'), '/site/s-2/a/a-2');
        assert.equal(this.links['s-2-a-3'].getAttribute('href'), '/site/s-2/a/a-3');
        assert.equal(this.links['s-3-a-1'].getAttribute('href'), '/site/s-3/a/a-1?q=lol');
        assert.equal(this.links['s-3-a-2'].getAttribute('href'), '/site/s-3/a/a-2');
        assert.equal(this.links['s-3-a-3'].getAttribute('href'), '/site/s-3/a/a-3');

        this.expectedSiteModelHookParams = { site_id: 's-2', country: 'us' };
        this.expectedArticleModelHookParams = {
          article_id: 'a-1',
          q: 'lol',
          z: 0,
        };
        this.transitionTo('/site/s-2/a/a-1?country=us&q=lol');

        assert.deepEqual(
          this.site_controller.get('model'),
          { id: 's-2' },
          "site controller's model is s-2"
        );
        assert.deepEqual(
          this.article_controller.get('model'),
          { id: 'a-1' },
          "article controller's model is a-1"
        );
        assert.equal(this.site_controller.get('country'), 'us');
        assert.equal(this.article_controller.get('q'), 'lol');
        assert.equal(this.article_controller.get('z'), 0);
        assert.equal(this.links['s-1-a-1'].getAttribute('href'), '/site/s-1/a/a-1?q=lol');
        assert.equal(this.links['s-1-a-2'].getAttribute('href'), '/site/s-1/a/a-2');
        assert.equal(this.links['s-1-a-3'].getAttribute('href'), '/site/s-1/a/a-3');
        assert.equal(
          this.links['s-2-a-1'].getAttribute('href'),
          '/site/s-2/a/a-1?country=us&q=lol'
        );
        assert.equal(this.links['s-2-a-2'].getAttribute('href'), '/site/s-2/a/a-2?country=us');
        assert.equal(this.links['s-2-a-3'].getAttribute('href'), '/site/s-2/a/a-3?country=us');
        assert.equal(this.links['s-3-a-1'].getAttribute('href'), '/site/s-3/a/a-1?q=lol');
        assert.equal(this.links['s-3-a-2'].getAttribute('href'), '/site/s-3/a/a-2');
        assert.equal(this.links['s-3-a-3'].getAttribute('href'), '/site/s-3/a/a-3');

        this.expectedSiteModelHookParams = { site_id: 's-2', country: 'us' };
        this.expectedArticleModelHookParams = {
          article_id: 'a-2',
          q: 'lol',
          z: 0,
        };
        this.transitionTo('/site/s-2/a/a-2?country=us&q=lol');

        assert.deepEqual(
          this.site_controller.get('model'),
          { id: 's-2' },
          "site controller's model is s-2"
        );
        assert.deepEqual(
          this.article_controller.get('model'),
          { id: 'a-2' },
          "article controller's model is a-2"
        );
        assert.equal(this.site_controller.get('country'), 'us');
        assert.equal(this.article_controller.get('q'), 'lol');
        assert.equal(this.article_controller.get('z'), 0);
        assert.equal(this.links['s-1-a-1'].getAttribute('href'), '/site/s-1/a/a-1?q=lol');
        assert.equal(this.links['s-1-a-2'].getAttribute('href'), '/site/s-1/a/a-2?q=lol');
        assert.equal(this.links['s-1-a-3'].getAttribute('href'), '/site/s-1/a/a-3');
        assert.equal(
          this.links['s-2-a-1'].getAttribute('href'),
          '/site/s-2/a/a-1?country=us&q=lol'
        );
        assert.equal(
          this.links['s-2-a-2'].getAttribute('href'),
          '/site/s-2/a/a-2?country=us&q=lol'
        );
        assert.equal(this.links['s-2-a-3'].getAttribute('href'), '/site/s-2/a/a-3?country=us');
        assert.equal(this.links['s-3-a-1'].getAttribute('href'), '/site/s-3/a/a-1?q=lol');
        assert.equal(this.links['s-3-a-2'].getAttribute('href'), '/site/s-3/a/a-2?q=lol');
        assert.equal(this.links['s-3-a-3'].getAttribute('href'), '/site/s-3/a/a-3');

        this.expectedSiteModelHookParams = { site_id: 's-2', country: 'us' };
        this.expectedArticleModelHookParams = {
          article_id: 'a-3',
          q: 'lol',
          z: 123,
        };
        this.transitionTo('/site/s-2/a/a-3?country=us&q=lol&z=123');

        assert.deepEqual(
          this.site_controller.get('model'),
          { id: 's-2' },
          "site controller's model is s-2"
        );
        assert.deepEqual(
          this.article_controller.get('model'),
          { id: 'a-3' },
          "article controller's model is a-3"
        );
        assert.equal(this.site_controller.get('country'), 'us');
        assert.equal(this.article_controller.get('q'), 'lol');
        assert.equal(this.article_controller.get('z'), 123);
        assert.equal(this.links['s-1-a-1'].getAttribute('href'), '/site/s-1/a/a-1?q=lol');
        assert.equal(this.links['s-1-a-2'].getAttribute('href'), '/site/s-1/a/a-2?q=lol');
        assert.equal(this.links['s-1-a-3'].getAttribute('href'), '/site/s-1/a/a-3?q=lol&z=123');
        assert.equal(
          this.links['s-2-a-1'].getAttribute('href'),
          '/site/s-2/a/a-1?country=us&q=lol'
        );
        assert.equal(
          this.links['s-2-a-2'].getAttribute('href'),
          '/site/s-2/a/a-2?country=us&q=lol'
        );
        assert.equal(
          this.links['s-2-a-3'].getAttribute('href'),
          '/site/s-2/a/a-3?country=us&q=lol&z=123'
        );
        assert.equal(this.links['s-3-a-1'].getAttribute('href'), '/site/s-3/a/a-1?q=lol');
        assert.equal(this.links['s-3-a-2'].getAttribute('href'), '/site/s-3/a/a-2?q=lol');
        assert.equal(this.links['s-3-a-3'].getAttribute('href'), '/site/s-3/a/a-3?q=lol&z=123');

        this.expectedSiteModelHookParams = { site_id: 's-3', country: 'nz' };
        this.expectedArticleModelHookParams = {
          article_id: 'a-3',
          q: 'lol',
          z: 123,
        };
        this.transitionTo('/site/s-3/a/a-3?country=nz&q=lol&z=123');

        assert.deepEqual(
          this.site_controller.get('model'),
          { id: 's-3' },
          "site controller's model is s-3"
        );
        assert.deepEqual(
          this.article_controller.get('model'),
          { id: 'a-3' },
          "article controller's model is a-3"
        );
        assert.equal(this.site_controller.get('country'), 'nz');
        assert.equal(this.article_controller.get('q'), 'lol');
        assert.equal(this.article_controller.get('z'), 123);
        assert.equal(this.links['s-1-a-1'].getAttribute('href'), '/site/s-1/a/a-1?q=lol');
        assert.equal(this.links['s-1-a-2'].getAttribute('href'), '/site/s-1/a/a-2?q=lol');
        assert.equal(this.links['s-1-a-3'].getAttribute('href'), '/site/s-1/a/a-3?q=lol&z=123');
        assert.equal(
          this.links['s-2-a-1'].getAttribute('href'),
          '/site/s-2/a/a-1?country=us&q=lol'
        );
        assert.equal(
          this.links['s-2-a-2'].getAttribute('href'),
          '/site/s-2/a/a-2?country=us&q=lol'
        );
        assert.equal(
          this.links['s-2-a-3'].getAttribute('href'),
          '/site/s-2/a/a-3?country=us&q=lol&z=123'
        );
        assert.equal(
          this.links['s-3-a-1'].getAttribute('href'),
          '/site/s-3/a/a-1?country=nz&q=lol'
        );
        assert.equal(
          this.links['s-3-a-2'].getAttribute('href'),
          '/site/s-3/a/a-2?country=nz&q=lol'
        );
        assert.equal(
          this.links['s-3-a-3'].getAttribute('href'),
          '/site/s-3/a/a-3?country=nz&q=lol&z=123'
        );
      });
    }

    ["@test query params have 'model' stickiness by default (params-based transitions)"](assert) {
      assert.expect(118);

      return this.boot().then(() => {
        this.expectedSiteModelHookParams = { site_id: 's-1', country: 'au' };
        this.expectedArticleModelHookParams = {
          article_id: 'a-1',
          q: 'wat',
          z: 0,
        };
        this.transitionTo('site.article', 's-1', 'a-1');

        assert.deepEqual(this.site_controller.get('model'), { id: 's-1' });
        assert.deepEqual(this.article_controller.get('model'), { id: 'a-1' });
        assert.equal(this.site_controller.get('country'), 'au');
        assert.equal(this.article_controller.get('q'), 'wat');
        assert.equal(this.article_controller.get('z'), 0);
        assert.equal(this.links['s-1-a-1'].getAttribute('href'), '/site/s-1/a/a-1');
        assert.equal(this.links['s-1-a-2'].getAttribute('href'), '/site/s-1/a/a-2');
        assert.equal(this.links['s-1-a-3'].getAttribute('href'), '/site/s-1/a/a-3');
        assert.equal(this.links['s-2-a-1'].getAttribute('href'), '/site/s-2/a/a-1');
        assert.equal(this.links['s-2-a-2'].getAttribute('href'), '/site/s-2/a/a-2');
        assert.equal(this.links['s-2-a-3'].getAttribute('href'), '/site/s-2/a/a-3');
        assert.equal(this.links['s-3-a-1'].getAttribute('href'), '/site/s-3/a/a-1');
        assert.equal(this.links['s-3-a-2'].getAttribute('href'), '/site/s-3/a/a-2');
        assert.equal(this.links['s-3-a-3'].getAttribute('href'), '/site/s-3/a/a-3');

        this.expectedSiteModelHookParams = { site_id: 's-1', country: 'au' };
        this.expectedArticleModelHookParams = {
          article_id: 'a-2',
          q: 'lol',
          z: 0,
        };
        this.transitionTo('site.article', 's-1', 'a-2', {
          queryParams: { q: 'lol' },
        });

        assert.deepEqual(this.site_controller.get('model'), { id: 's-1' });
        assert.deepEqual(this.article_controller.get('model'), { id: 'a-2' });
        assert.equal(this.site_controller.get('country'), 'au');
        assert.equal(this.article_controller.get('q'), 'lol');
        assert.equal(this.article_controller.get('z'), 0);
        assert.equal(this.links['s-1-a-1'].getAttribute('href'), '/site/s-1/a/a-1');
        assert.equal(this.links['s-1-a-2'].getAttribute('href'), '/site/s-1/a/a-2?q=lol');
        assert.equal(this.links['s-1-a-3'].getAttribute('href'), '/site/s-1/a/a-3');
        assert.equal(this.links['s-2-a-1'].getAttribute('href'), '/site/s-2/a/a-1');
        assert.equal(this.links['s-2-a-2'].getAttribute('href'), '/site/s-2/a/a-2?q=lol');
        assert.equal(this.links['s-2-a-3'].getAttribute('href'), '/site/s-2/a/a-3');
        assert.equal(this.links['s-3-a-1'].getAttribute('href'), '/site/s-3/a/a-1');
        assert.equal(this.links['s-3-a-2'].getAttribute('href'), '/site/s-3/a/a-2?q=lol');
        assert.equal(this.links['s-3-a-3'].getAttribute('href'), '/site/s-3/a/a-3');

        this.expectedSiteModelHookParams = { site_id: 's-1', country: 'au' };
        this.expectedArticleModelHookParams = {
          article_id: 'a-3',
          q: 'hay',
          z: 0,
        };
        this.transitionTo('site.article', 's-1', 'a-3', {
          queryParams: { q: 'hay' },
        });

        assert.deepEqual(this.site_controller.get('model'), { id: 's-1' });
        assert.deepEqual(this.article_controller.get('model'), { id: 'a-3' });
        assert.equal(this.site_controller.get('country'), 'au');
        assert.equal(this.article_controller.get('q'), 'hay');
        assert.equal(this.article_controller.get('z'), 0);
        assert.equal(this.links['s-1-a-1'].getAttribute('href'), '/site/s-1/a/a-1');
        assert.equal(this.links['s-1-a-2'].getAttribute('href'), '/site/s-1/a/a-2?q=lol');
        assert.equal(this.links['s-1-a-3'].getAttribute('href'), '/site/s-1/a/a-3?q=hay');
        assert.equal(this.links['s-2-a-1'].getAttribute('href'), '/site/s-2/a/a-1');
        assert.equal(this.links['s-2-a-2'].getAttribute('href'), '/site/s-2/a/a-2?q=lol');
        assert.equal(this.links['s-2-a-3'].getAttribute('href'), '/site/s-2/a/a-3?q=hay');
        assert.equal(this.links['s-3-a-1'].getAttribute('href'), '/site/s-3/a/a-1');
        assert.equal(this.links['s-3-a-2'].getAttribute('href'), '/site/s-3/a/a-2?q=lol');
        assert.equal(this.links['s-3-a-3'].getAttribute('href'), '/site/s-3/a/a-3?q=hay');

        this.expectedSiteModelHookParams = { site_id: 's-1', country: 'au' };
        this.expectedArticleModelHookParams = {
          article_id: 'a-2',
          q: 'lol',
          z: 1,
        };
        this.transitionTo('site.article', 's-1', 'a-2', {
          queryParams: { z: 1 },
        });

        assert.deepEqual(this.site_controller.get('model'), { id: 's-1' });
        assert.deepEqual(this.article_controller.get('model'), { id: 'a-2' });
        assert.equal(this.site_controller.get('country'), 'au');
        assert.equal(this.article_controller.get('q'), 'lol');
        assert.equal(this.article_controller.get('z'), 1);
        assert.equal(this.links['s-1-a-1'].getAttribute('href'), '/site/s-1/a/a-1');
        assert.equal(this.links['s-1-a-2'].getAttribute('href'), '/site/s-1/a/a-2?q=lol&z=1');
        assert.equal(this.links['s-1-a-3'].getAttribute('href'), '/site/s-1/a/a-3?q=hay');
        assert.equal(this.links['s-2-a-1'].getAttribute('href'), '/site/s-2/a/a-1');
        assert.equal(this.links['s-2-a-2'].getAttribute('href'), '/site/s-2/a/a-2?q=lol&z=1');
        assert.equal(this.links['s-2-a-3'].getAttribute('href'), '/site/s-2/a/a-3?q=hay');
        assert.equal(this.links['s-3-a-1'].getAttribute('href'), '/site/s-3/a/a-1');
        assert.equal(this.links['s-3-a-2'].getAttribute('href'), '/site/s-3/a/a-2?q=lol&z=1');
        assert.equal(this.links['s-3-a-3'].getAttribute('href'), '/site/s-3/a/a-3?q=hay');

        this.expectedSiteModelHookParams = { site_id: 's-2', country: 'us' };
        this.expectedArticleModelHookParams = {
          article_id: 'a-2',
          q: 'lol',
          z: 1,
        };
        this.transitionTo('site.article', 's-2', 'a-2', {
          queryParams: { country: 'us' },
        });

        assert.deepEqual(this.site_controller.get('model'), { id: 's-2' });
        assert.deepEqual(this.article_controller.get('model'), { id: 'a-2' });
        assert.equal(this.site_controller.get('country'), 'us');
        assert.equal(this.article_controller.get('q'), 'lol');
        assert.equal(this.article_controller.get('z'), 1);
        assert.equal(this.links['s-1-a-1'].getAttribute('href'), '/site/s-1/a/a-1');
        assert.equal(this.links['s-1-a-2'].getAttribute('href'), '/site/s-1/a/a-2?q=lol&z=1');
        assert.equal(this.links['s-1-a-3'].getAttribute('href'), '/site/s-1/a/a-3?q=hay');
        assert.equal(this.links['s-2-a-1'].getAttribute('href'), '/site/s-2/a/a-1?country=us');
        assert.equal(
          this.links['s-2-a-2'].getAttribute('href'),
          '/site/s-2/a/a-2?country=us&q=lol&z=1'
        );
        assert.equal(
          this.links['s-2-a-3'].getAttribute('href'),
          '/site/s-2/a/a-3?country=us&q=hay'
        );
        assert.equal(this.links['s-3-a-1'].getAttribute('href'), '/site/s-3/a/a-1');
        assert.equal(this.links['s-3-a-2'].getAttribute('href'), '/site/s-3/a/a-2?q=lol&z=1');
        assert.equal(this.links['s-3-a-3'].getAttribute('href'), '/site/s-3/a/a-3?q=hay');

        this.expectedSiteModelHookParams = { site_id: 's-2', country: 'us' };
        this.expectedArticleModelHookParams = {
          article_id: 'a-1',
          q: 'yeah',
          z: 0,
        };
        this.transitionTo('site.article', 's-2', 'a-1', {
          queryParams: { q: 'yeah' },
        });

        assert.deepEqual(this.site_controller.get('model'), { id: 's-2' });
        assert.deepEqual(this.article_controller.get('model'), { id: 'a-1' });
        assert.equal(this.site_controller.get('country'), 'us');
        assert.equal(this.article_controller.get('q'), 'yeah');
        assert.equal(this.article_controller.get('z'), 0);
        assert.equal(this.links['s-1-a-1'].getAttribute('href'), '/site/s-1/a/a-1?q=yeah');
        assert.equal(this.links['s-1-a-2'].getAttribute('href'), '/site/s-1/a/a-2?q=lol&z=1');
        assert.equal(this.links['s-1-a-3'].getAttribute('href'), '/site/s-1/a/a-3?q=hay');
        assert.equal(
          this.links['s-2-a-1'].getAttribute('href'),
          '/site/s-2/a/a-1?country=us&q=yeah'
        );
        assert.equal(
          this.links['s-2-a-2'].getAttribute('href'),
          '/site/s-2/a/a-2?country=us&q=lol&z=1'
        );
        assert.equal(
          this.links['s-2-a-3'].getAttribute('href'),
          '/site/s-2/a/a-3?country=us&q=hay'
        );
        assert.equal(this.links['s-3-a-1'].getAttribute('href'), '/site/s-3/a/a-1?q=yeah');
        assert.equal(this.links['s-3-a-2'].getAttribute('href'), '/site/s-3/a/a-2?q=lol&z=1');
        assert.equal(this.links['s-3-a-3'].getAttribute('href'), '/site/s-3/a/a-3?q=hay');

        this.expectedSiteModelHookParams = { site_id: 's-3', country: 'nz' };
        this.expectedArticleModelHookParams = {
          article_id: 'a-3',
          q: 'hay',
          z: 3,
        };
        this.transitionTo('site.article', 's-3', 'a-3', {
          queryParams: { country: 'nz', z: 3 },
        });

        assert.deepEqual(this.site_controller.get('model'), { id: 's-3' });
        assert.deepEqual(this.article_controller.get('model'), { id: 'a-3' });
        assert.equal(this.site_controller.get('country'), 'nz');
        assert.equal(this.article_controller.get('q'), 'hay');
        assert.equal(this.article_controller.get('z'), 3);
        assert.equal(this.links['s-1-a-1'].getAttribute('href'), '/site/s-1/a/a-1?q=yeah');
        assert.equal(this.links['s-1-a-2'].getAttribute('href'), '/site/s-1/a/a-2?q=lol&z=1');
        assert.equal(this.links['s-1-a-3'].getAttribute('href'), '/site/s-1/a/a-3?q=hay&z=3');
        assert.equal(
          this.links['s-2-a-1'].getAttribute('href'),
          '/site/s-2/a/a-1?country=us&q=yeah'
        );
        assert.equal(
          this.links['s-2-a-2'].getAttribute('href'),
          '/site/s-2/a/a-2?country=us&q=lol&z=1'
        );
        assert.equal(
          this.links['s-2-a-3'].getAttribute('href'),
          '/site/s-2/a/a-3?country=us&q=hay&z=3'
        );
        assert.equal(
          this.links['s-3-a-1'].getAttribute('href'),
          '/site/s-3/a/a-1?country=nz&q=yeah'
        );
        assert.equal(
          this.links['s-3-a-2'].getAttribute('href'),
          '/site/s-3/a/a-2?country=nz&q=lol&z=1'
        );
        assert.equal(
          this.links['s-3-a-3'].getAttribute('href'),
          '/site/s-3/a/a-3?country=nz&q=hay&z=3'
        );
      });
    }
  }
);


text:
<?php
/**
 * Morizke 2 - baserCMS Export
 */
namespace tomk79\pickles2\mz2_baser_cms;

class utils_counter{

	/** Counter */
	private $counter;

	/**
	 * Constructor
	 */
	public function __construct(){
		$this->counter = array();
	}

	/**
	 * オプション情報を取得する
	 * @return array Options.
	 */
	public function get($counter_name, $primary_key = null){
		if( !is_string($counter_name) ){
			return false;
		}
		if( !is_string($primary_key) ){
			$primary_key = null;
		}
		if( !array_key_exists($counter_name, $this->counter) ){
			// initialize
			$this->counter[$counter_name] = array();
			$this->counter[$counter_name]['increment'] = 0;
			$this->counter[$counter_name]['primary_keys'] = array();
		}
		if( is_string($primary_key) && array_key_exists($primary_key, $this->counter[$counter_name]['primary_keys']) ){
			// 既に番号を発行済のキーを場合、
			return $this->counter[$counter_name]['primary_keys'][$primary_key];
		}

		// 初めてのキーなら、追加する。
		$this->counter[$counter_name]['increment']++;
		$this->counter[$counter_name]['primary_keys'][$primary_key] = $this->counter[$counter_name]['increment'];

		return $this->counter[$counter_name]['primary_keys'][$primary_key];
	}

	/**
	 * 既に発行済のキーか確認する
	 */
	public function is_exists($counter_name, $primary_key){
		if( @$this->counter[$counter_name]['primary_keys'][$primary_key] ){
			return true;
		}
		return false;
	}
}

redpajama_set_name: RedPajamaGithub


text:
  background-color: grey;
}
#container {
  color: black;
  background-color: grey;
}


text:
from django import forms
from django.core.validators import MaxLengthValidator

from xiaoping.posts import Post

class ReviewForm(forms.Form):

    title = forms.CharField(max_length=256, required=False)
    identifier = forms.CharField(required=False)
    body = forms.CharField(max_length=5000, widget=forms.Textarea())

    def review_post(self):

        post_type = u'https://posttypes.housejeffries.com/review/v0#'

        post_dict = {'body': self.cleaned_data['body']}

        title = self.cleaned_data['title']
        identifier = self.cleaned_data['identifier']
        if len(title) > 0:
            post_dict['title'] = title
        if len(identifier) > 0:
            post_dict['identifier'] = [identifier]

        return Post(post_type, post_dict)


text:
package com.ltyx.sca.moudle;

import javax.servlet.http.HttpServletRequest;

import net.sf.json.JSONObject;

import com.zc.support.config.ConfigHelperURL;
import com.zc.support.doman.ZCBaseActionSupportPlugin;
import com.zc.support.link.ZCHttpReqParam;
import com.zc.support.link.ZCHttpReqSender;
import com.zc.support.service.Log;

public class MoudleAideSubmitECWoman extends ZCBaseActionSupportPlugin {

	public MoudleAideSubmitECWoman(HttpServletRequest req) {
		this.name = "定制顾问 优纤女装 提交购物车";
		this.request = req;
	}

	public boolean doJobs() {

		ZCHttpReqParam param = new ZCHttpReqParam();

		param.addParam("LZX_01", getReqParamString("LZX_01"));
		param.addParam("LZX_02", getReqParamString("LZX_02"));
		param.addParam("LZX_03", getReqParamString("LZX_03"));
		param.addParam("LZX_04", getReqParamString("LZX_04"));
		param.addParam("LZX_06", getReqParamString("LZX_06"));
		param.addParam("LZX_11_CHAR_COLOR", getReqParamString("LZX_11_CHAR_COLOR"));
		param.addParam("LZX_11_CHAR_SIZE", getReqParamString("LZX_11_CHAR_SIZE"));
		param.addParam("LZX_11_CHAR_TYPE", getReqParamString("LZX_11_CHAR_TYPE"));
		param.addParam("LZX_11_CHAR_WORD", getReqParamString("LZX_11_CHAR_WORD"));
		param.addParam("LZX_11_FOR_CHAR_SWITCH", getReqParamString("LZX_11_FOR_CHAR_SWITCH"));
		param.addParam("LZX_11_FOR_PIC_SWITCH", getReqParamString("LZX_11_FOR_PIC_SWITCH"));
		param.addParam("LZX_11_PIC_COLOR", getReqParamString("LZX_11_PIC_COLOR"));
		param.addParam("LZX_11_PIC_NUM", getReqParamString("LZX_11_PIC_NUM"));
		param.addParam("LZX_11_PIC_SIZE", getReqParamString("LZX_11_PIC_SIZE"));
		param.addParam("LZX_11_PIC_TYPE", getReqParamString("LZX_11_PIC_TYPE"));
		param.addParam("LZX_120", getReqParamString("LZX_120"));
		param.addParam("LZX_13_FOR_CHAR", getReqParamString("LZX_13_FOR_CHAR"));
		param.addParam("LZX_13_FOR_PIC", getReqParamString("LZX_13_FOR_PIC"));
		param.addParam("LZX_17", getReqParamString("LZX_17"));
		param.addParam("LZX_26", getReqParamString("LZX_26"));
		param.addParam("YX_08", getReqParamString("YX_08"));
		param.addParam("YX_09", getReqParamString("YX_09"));
		param.addParam("cefeng", getReqParamString("cefeng"));
		param.addParam("chenbu", getReqParamString("chenbu"));
		param.addParam("customer_address", getReqParamString("customer_address"));
		param.addParam("customer_name", getReqParamString("customer_name"));
		param.addParam("customer_tel", getReqParamString("customer_tel"));
		param.addParam("customer_tel_target", getReqParamString("customer_tel_target"));
		param.addParam("customer_tips", getReqParamString("customer_tips"));
		param.addParam("easy_type", getReqParamString("easy_type"));
		param.addParam("kouzi", getReqParamString("kouzi"));
		param.addParam("line_color_location_1", getReqParamString("line_color_location_1"));
		param.addParam("line_color_location_2", getReqParamString("line_color_location_2"));
		param.addParam("line_color_location_3", getReqParamString("line_color_location_3"));
		param.addParam("line_color_location_4", getReqParamString("line_color_location_4"));
		param.addParam("lingcheng", getReqParamString("lingcheng"));
		param.addParam("mingxian", getReqParamString("mingxian"));
		param.addParam("neiwaichuan", getReqParamString("neiwaichuan"));
		param.addParam("operator_id", getReqParamString("operator_id"));
		param.addParam("operator_name", getReqParamString("operator_name"));
		param.addParam("prices_desc", getReqParamString("prices_desc"));
		param.addParam("prices_now", getReqParamString("prices_now"));
		param.addParam("prices_system", getReqParamString("prices_system"));
		param.addParam("qiantiao", getReqParamString("qiantiao"));
		param.addParam("tailor_type", getReqParamString("tailor_type"));
		param.addParam("uskin_code", getReqParamString("uskin_code").toUpperCase());
		param.addParam("uskin_code_2", getReqParamString("uskin_code_2").toUpperCase());
		param.addParam("weizhi_peise", getReqParamString("weizhi_peise",""));
		param.addParam("zhidai", getReqParamString("zhidai"));

		String httpResp = ZCHttpReqSender.sendGet(ConfigHelperURL.Url_aide_add_cart_woman.getUrl(), param);
		Log.Nano.tag("定制顾问 提交 优纤面料 Resp From EC", httpResp);

		JSONObject jsonHttpResp;
		String jsonERRCODE;
		String jsonERRDESC;
		String jsonData;
		try {
			jsonHttpResp = JSONObject.fromObject(httpResp);
			jsonERRCODE = jsonHttpResp.getString("ERRCODE");
			jsonERRDESC = jsonHttpResp.getString("ERRDESC");
			jsonData = jsonERRDESC;
		} catch (Exception e) {
			// TODO: handle exception
			Log.Nano.tag("EC服务器响应错误", httpResp);
			jsonERRCODE = "0";
			jsonERRDESC = "fail";
			jsonData = "EC服务器响应错误";
		}

		if ("0".equals(jsonERRCODE) && "succ".equals(jsonERRDESC)) {
			return true;
		} else {
			ERRCODE = "0";
			ERRDESC = "fail";
			data = jsonData;
			return false;
		}

	}

}


text:
<?php

include_once 'phing/Task.php';
include_once 'phing/system/util/Properties.php';

/**
 * Task for setting properties in buildfiles.
 *
 * @author    Andreas Aderhold <andi@binarycloud.com>
 * @author    Hans Lellelid <hans@xmpl.org>
 * @version   $Id: e6d7123b6331d5032ad1e67967cf54ef2aae3f7f $
 * @package   phing.tasks.system
 */
class PropertyTask extends Task {

    /** name of the property */
    protected $name;

    /** value of the property */
    protected $value;

    protected $reference;
    protected $env;     // Environment
    protected $file;
    protected $ref;
    protected $prefix;
    protected $fallback;

    /** Whether to force overwrite of existing property. */
    protected $override = false;

    /** Whether property should be treated as "user" property. */
    protected $userProperty = false;

    /**
     * Sets a the name of current property component
     */
    function setName($name) {
        $this->name = (string) $name;
    }

    /** Get property component name. */
    function getName() {
        return $this->name;
    }

    /**
     * Sets a the value of current property component.
     * @param    mixed      Value of name, all scalars allowed
     */
    function setValue($value) {
        $this->value = (string) $value;
    }

    /**
     * Sets value of property to CDATA tag contents.
     * @param string $values
     * @since 2.2.0
     */
    public function addText($value) {
        $this->setValue($value);
    }

    /** Get the value of current property component. */
    function getValue() {
        return $this->value;
    }

    /** Set a file to use as the source for properties. */
    function setFile($file) {
        if (is_string($file)) {
            $file = new PhingFile($file);
        }
        $this->file = $file;
    }

    /** Get the PhingFile that is being used as property source. */
    function getFile() {
        return $this->file;
    }

    function setRefid(Reference $ref) {
        $this->reference = $ref;
    }

    function getRefid() {
        return $this->reference;
    }

    /**
     * Prefix to apply to properties loaded using file.
     * A "." is appended to the prefix if not specified.
     * @param string $prefix prefix string
     * @return void
     * @since 2.0
     */
    public function setPrefix($prefix) {
        $this->prefix = $prefix;
        if (!StringHelper::endsWith(".", $prefix)) {
            $this->prefix .= ".";
        }
    }

    /**
     * @return string
     * @since 2.0
     */
    public function getPrefix() {
        return $this->prefix;
    }

    /**
    * the prefix to use when retrieving environment variables.
    * Thus if you specify environment="myenv"
    * you will be able to access OS-specific
    * environment variables via property names "myenv.PATH" or
    * "myenv.TERM".
    *

    * Note that if you supply a property name with a final
    * "." it will not be doubled. ie environment="myenv." will still
    * allow access of environment variables through "myenv.PATH" and
    * "myenv.TERM". This functionality is currently only implemented
    * on select platforms. Feel free to send patches to increase the number of platforms
    * this functionality is supported on ;).

    * Note also that properties are case sensitive, even if the
    * environment variables on your operating system are not, e.g. it
    * will be ${env.Path} not ${env.PATH} on Windows 2000.
    * @param env prefix
    */
    function setEnvironment($env) {
        $this->env = (string) $env;
    }

    function getEnvironment() {
        return $this->env;
    }

    /**
     * Set whether this is a user property (ro).
     * This is deprecated in Ant 1.5, but the userProperty attribute
     * of the class is still being set via constructor, so Phing will
     * allow this method to function.
     * @param boolean $v
     */
    function setUserProperty($v) {
        $this->userProperty = (boolean) $v;
    }

    function getUserProperty() {
        return $this->userProperty;
    }

    function setOverride($v) {
        $this->override = (boolean) $v;
    }

    function getOverride() {
        return $this->override;
    }

    function toString() {
        return (string) $this->value;
    }

    /**
     * @param Project $p
     */
    function setFallback($p) {
        $this->fallback = $p;
    }

    function getFallback() {
        return $this->fallback;
    }
    /**
     * set the property in the project to the value.
     * if the task was give a file or env attribute
     * here is where it is loaded
     */
    function main() {
        if ($this->name !== null) {
            if ($this->value === null && $this->ref === null) {
                throw new BuildException("You must specify value or refid with the name attribute", $this->getLocation());
            }
        } else {
            if ($this->file === null && $this->env === null ) {
                throw new BuildException("You must specify file or environment when not using the name attribute", $this->getLocation());
            }
        }

        if ($this->file === null && $this->prefix !== null) {
            throw new BuildException("Prefix is only valid when loading from a file.", $this->getLocation());
        }

        if (($this->name !== null) && ($this->value !== null)) {
            $this->addProperty($this->name, $this->value);
        }

        if ($this->file !== null) {
            $this->loadFile($this->file);
        }

        if ( $this->env !== null ) {
            $this->loadEnvironment($this->env);
        }

        if (($this->name !== null) && ($this->ref !== null)) {
            // get the refereced property
            try {
            $this->addProperty($this->name, $this->reference->getReferencedObject($this->project)->toString());
            } catch (BuildException $be) {
                if ($this->fallback !== null) {
                     $this->addProperty($this->name, $this->reference->getReferencedObject($this->fallback)->toString());
                } else {
                    throw $be;
                }
            }
        }
    }

    /**
     * load the environment values
     * @param string $prefix prefix to place before them
     */
    protected function loadEnvironment($prefix) {

        $props = new Properties();
        if ( substr($prefix, strlen($prefix)-1) == '.' ) {
            $prefix .= ".";
        }
        $this->log("Loading Environment $prefix", Project::MSG_VERBOSE);
        foreach($_ENV as $key => $value) {
            $props->setProperty($prefix . '.' . $key, $value);
        }
        $this->addProperties($props);
    }

    /**
     * iterate through a set of properties,
     * resolve them then assign them
     */
    protected function addProperties($props) {
        $this->resolveAllProperties($props);
        foreach($props->keys() as $name) {
            $value = $props->getProperty($name);
            $v = $this->project->replaceProperties($value);
            if ($this->prefix !== null) {
                $name = $this->prefix . $name;
            }
            $this->addProperty($name, $v);
        }
    }

    /**
     * add a name value pair to the project property set
     * @param string $name name of property
     * @param string $value value to set
     */
    protected function addProperty($name, $value) {
        if ($this->userProperty) {
            if ($this->project->getUserProperty($name) === null || $this->override) {
                $this->project->setInheritedProperty($name, $value);
            } else {
                $this->log("Override ignored for " . $name, Project::MSG_VERBOSE);
            }
        } else {
            if ($this->override) {
                $this->project->setProperty($name, $value);
            } else {
                $this->project->setNewProperty($name, $value);
            }
        }
    }

    /**
     * load properties from a file.
     * @param PhingFile $file
     */
    protected function loadFile(PhingFile $file) {
        $props = new Properties();
        $this->log("Loading ". $file->getAbsolutePath(), Project::MSG_INFO);
        try { // try to load file
            if ($file->exists()) {
                $props->load($file);
                $this->addProperties($props);
            } else {
                $this->log("Unable to find property file: ". $file->getAbsolutePath() ."... skipped", Project::MSG_WARN);
            }
        } catch (IOException $ioe) {
            throw new BuildException("Could not load properties from file.", $ioe);
        }
    }

    /**
     * Given a Properties object, this method goes through and resolves
     * any references to properties within the object.
     *
     * @param Properties $props The collection of Properties that need to be resolved.
     * @return void
     */
    protected function resolveAllProperties(Properties $props) {

        $keys = $props->keys();

        while(count($keys)) {

            // There may be a nice regex/callback way to handle this
            // replacement, but at the moment it is pretty complex, and
            // would probably be a lot uglier to work into a preg_replace_callback()
            // system.  The biggest problem is the fact that a resolution may require
            // multiple passes.

            $name     = array_shift($keys);
            $value    = $props->getProperty($name);
            $resolved = false;

            while(!$resolved) {

                $fragments = array();
                $propertyRefs = array();

                // [HL] this was ::parsePropertyString($this->value ...) ... this seems wrong
                self::parsePropertyString($value, $fragments, $propertyRefs);

                $resolved = true;
                if (count($propertyRefs) !== 0) {

                    $sb = "";

                    $i = $fragments;
                    $j = $propertyRefs;
                    while(count($i)) {
                        $fragment = array_shift($i);
                        if ($fragment === null) {
                            $propertyName = array_shift($j);

                            if ($propertyName === $name) {
                                // Should we maybe just log this as an error & move on?
                                // $this->log("Property ".$name." was circularly defined.", Project::MSG_ERR);
                                throw new BuildException("Property ".$name." was circularly defined.");
                            }

                            $fragment = $this->getProject()->getProperty($propertyName);
                            if ($fragment === null) {
                                if ($props->containsKey($propertyName)) {
                                    $fragment = $props->getProperty($propertyName);
                                    $resolved = false; // parse again (could have been replaced w/ another var)
                                } else {
                                    $fragment = "\${".$propertyName."}";
                                }
                            }
                        }
                        $sb .= $fragment;
                    }

                    $this->log("Resolved Property \"$value\" to \"$sb\"", Project::MSG_DEBUG);
                    $value = $sb;
                    $props->setProperty($name, $value);

                } // if (count($propertyRefs))

            } // while (!$resolved)

        } // while (count($keys)
    }

     /**
     * This method will parse a string containing ${value} style
     * property values into two lists. The first list is a collection
     * of text fragments, while the other is a set of string property names
     * null entries in the first list indicate a property reference from the
     * second list.
     *
     * This is slower than regex, but useful for this class, which has to handle
     * multiple parsing passes for properties.
     *
     * @param string $value The string to be scanned for property references
     * @param array &$fragments The found fragments
     * @param  array &$propertyRefs The found refs
     */
    protected function parsePropertyString($value, &$fragments, &$propertyRefs) {

        $prev = 0;
        $pos  = 0;

        while (($pos = strpos($value, '$', $prev)) !== false) {

            if ($pos > $prev) {
                array_push($fragments, StringHelper::substring($value, $prev, $pos-1));
            }
            if ($pos === (strlen($value) - 1)) {
                array_push($fragments, '$');
                $prev = $pos + 1;
            } elseif ($value{$pos+1} !== '{' ) {

                // the string positions were changed to value-1 to correct
                // a fatal error coming from function substring()
                array_push($fragments, StringHelper::substring($value, $pos, $pos + 1));
                $prev = $pos + 2;
            } else {
                $endName = strpos($value, '}', $pos);
                if ($endName === false) {
                    throw new BuildException("Syntax error in property: $value");
                }
                $propertyName = StringHelper::substring($value, $pos + 2, $endName-1);
                array_push($fragments, null);
                array_push($propertyRefs, $propertyName);
                $prev = $endName + 1;
            }
        }

        if ($prev < strlen($value)) {
            array_push($fragments, StringHelper::substring($value, $prev));
        }
    }

}


text:
package org.oep.processmgt.service;

import com.liferay.portal.service.InvokableLocalService;

/**
 * @author trungdk
 * @generated
 */
public class CreateFileLocalServiceClp implements CreateFileLocalService {
	public CreateFileLocalServiceClp(
		InvokableLocalService invokableLocalService) {
		_invokableLocalService = invokableLocalService;

		_methodName0 = "addCreateFile";

		_methodParameterTypes0 = new String[] {
				"org.oep.processmgt.model.CreateFile"
			};

		_methodName1 = "createCreateFile";

		_methodParameterTypes1 = new String[] { "long" };

		_methodName2 = "deleteCreateFile";

		_methodParameterTypes2 = new String[] { "long" };

		_methodName3 = "deleteCreateFile";

		_methodParameterTypes3 = new String[] {
				"org.oep.processmgt.model.CreateFile"
			};

		_methodName4 = "dynamicQuery";

		_methodParameterTypes4 = new String[] {  };

		_methodName5 = "dynamicQuery";

		_methodParameterTypes5 = new String[] {
				"com.liferay.portal.kernel.dao.orm.DynamicQuery"
			};

		_methodName6 = "dynamicQuery";

		_methodParameterTypes6 = new String[] {
				"com.liferay.portal.kernel.dao.orm.DynamicQuery", "int", "int"
			};

		_methodName7 = "dynamicQuery";

		_methodParameterTypes7 = new String[] {
				"com.liferay.portal.kernel.dao.orm.DynamicQuery", "int", "int",
				"com.liferay.portal.kernel.util.OrderByComparator"
			};

		_methodName8 = "dynamicQueryCount";

		_methodParameterTypes8 = new String[] {
				"com.liferay.portal.kernel.dao.orm.DynamicQuery"
			};

		_methodName9 = "dynamicQueryCount";

		_methodParameterTypes9 = new String[] {
				"com.liferay.portal.kernel.dao.orm.DynamicQuery",
				"com.liferay.portal.kernel.dao.orm.Projection"
			};

		_methodName10 = "fetchCreateFile";

		_methodParameterTypes10 = new String[] { "long" };

		_methodName11 = "getCreateFile";

		_methodParameterTypes11 = new String[] { "long" };

		_methodName12 = "getPersistedModel";

		_methodParameterTypes12 = new String[] { "java.io.Serializable" };

		_methodName13 = "getCreateFiles";

		_methodParameterTypes13 = new String[] { "int", "int" };

		_methodName14 = "getCreateFilesCount";

		_methodParameterTypes14 = new String[] {  };

		_methodName15 = "updateCreateFile";

		_methodParameterTypes15 = new String[] {
				"org.oep.processmgt.model.CreateFile"
			};

		_methodName16 = "getBeanIdentifier";

		_methodParameterTypes16 = new String[] {  };

		_methodName17 = "setBeanIdentifier";

		_methodParameterTypes17 = new String[] { "java.lang.String" };

		_methodName19 = "addCreateFile";

		_methodParameterTypes19 = new String[] {
				"long", "long", "java.util.Date", "long",
				"com.liferay.portal.service.ServiceContext"
			};

		_methodName20 = "updateCreateFile";

		_methodParameterTypes20 = new String[] {
				"long", "long", "long", "java.util.Date", "long",
				"com.liferay.portal.service.ServiceContext"
			};

		_methodName21 = "updateCreateFileResources";

		_methodParameterTypes21 = new String[] {
				"org.oep.processmgt.model.CreateFile", "java.lang.String[][]",
				"java.lang.String[][]",
				"com.liferay.portal.service.ServiceContext"
			};

		_methodName22 = "removeCreateFile";

		_methodParameterTypes22 = new String[] {
				"org.oep.processmgt.model.CreateFile"
			};

		_methodName23 = "removeCreateFile";

		_methodParameterTypes23 = new String[] { "long" };

		_methodName24 = "addCreateFileResources";

		_methodParameterTypes24 = new String[] {
				"org.oep.processmgt.model.CreateFile", "boolean", "boolean",
				"com.liferay.portal.service.ServiceContext"
			};

		_methodName25 = "addCreateFileResources";

		_methodParameterTypes25 = new String[] {
				"org.oep.processmgt.model.CreateFile", "java.lang.String[][]",
				"java.lang.String[][]",
				"com.liferay.portal.service.ServiceContext"
			};

		_methodName26 = "addCreateFileResources";

		_methodParameterTypes26 = new String[] {
				"long", "java.lang.String[][]", "java.lang.String[][]",
				"com.liferay.portal.service.ServiceContext"
			};
	}

	@Override
	public org.oep.processmgt.model.CreateFile addCreateFile(
		org.oep.processmgt.model.CreateFile createFile)
		throws com.liferay.portal.kernel.exception.SystemException {
		Object returnObj = null;

		try {
			returnObj = _invokableLocalService.invokeMethod(_methodName0,
					_methodParameterTypes0,
					new Object[] { ClpSerializer.translateInput(createFile) });
		}
		catch (Throwable t) {
			t = ClpSerializer.translateThrowable(t);

			if (t instanceof com.liferay.portal.kernel.exception.SystemException) {
				throw (com.liferay.portal.kernel.exception.SystemException)t;
			}

			if (t instanceof RuntimeException) {
				throw (RuntimeException)t;
			}
			else {
				throw new RuntimeException(t.getClass().getName() +
					" is not a valid exception");
			}
		}

		return (org.oep.processmgt.model.CreateFile)ClpSerializer.translateOutput(returnObj);
	}

	@Override
	public org.oep.processmgt.model.CreateFile createCreateFile(
		long createFileId) {
		Object returnObj = null;

		try {
			returnObj = _invokableLocalService.invokeMethod(_methodName1,
					_methodParameterTypes1, new Object[] { createFileId });
		}
		catch (Throwable t) {
			t = ClpSerializer.translateThrowable(t);

			if (t instanceof RuntimeException) {
				throw (RuntimeException)t;
			}
			else {
				throw new RuntimeException(t.getClass().getName() +
					" is not a valid exception");
			}
		}

		return (org.oep.processmgt.model.CreateFile)ClpSerializer.translateOutput(returnObj);
	}

	@Override
	public org.oep.processmgt.model.CreateFile deleteCreateFile(
		long createFileId)
		throws com.liferay.portal.kernel.exception.PortalException,
			com.liferay.portal.kernel.exception.SystemException {
		Object returnObj = null;

		try {
			returnObj = _invokableLocalService.invokeMethod(_methodName2,
					_methodParameterTypes2, new Object[] { createFileId });
		}
		catch (Throwable t) {
			t = ClpSerializer.translateThrowable(t);

			if (t instanceof com.liferay.portal.kernel.exception.PortalException) {
				throw (com.liferay.portal.kernel.exception.PortalException)t;
			}

			if (t instanceof com.liferay.portal.kernel.exception.SystemException) {
				throw (com.liferay.portal.kernel.exception.SystemException)t;
			}

			if (t instanceof RuntimeException) {
				throw (RuntimeException)t;
			}
			else {
				throw new RuntimeException(t.getClass().getName() +
					" is not a valid exception");
			}
		}

		return (org.oep.processmgt.model.CreateFile)ClpSerializer.translateOutput(returnObj);
	}

	@Override
	public org.oep.processmgt.model.CreateFile deleteCreateFile(
		org.oep.processmgt.model.CreateFile createFile)
		throws com.liferay.portal.kernel.exception.SystemException {
		Object returnObj = null;

		try {
			returnObj = _invokableLocalService.invokeMethod(_methodName3,
					_methodParameterTypes3,
					new Object[] { ClpSerializer.translateInput(createFile) });
		}
		catch (Throwable t) {
			t = ClpSerializer.translateThrowable(t);

			if (t instanceof com.liferay.portal.kernel.exception.SystemException) {
				throw (com.liferay.portal.kernel.exception.SystemException)t;
			}

			if (t instanceof RuntimeException) {
				throw (RuntimeException)t;
			}
			else {
				throw new RuntimeException(t.getClass().getName() +
					" is not a valid exception");
			}
		}

		return (org.oep.processmgt.model.CreateFile)ClpSerializer.translateOutput(returnObj);
	}

	@Override
	public com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery() {
		Object returnObj = null;

		try {
			returnObj = _invokableLocalService.invokeMethod(_methodName4,
					_methodParameterTypes4, new Object[] {  });
		}
		catch (Throwable t) {
			t = ClpSerializer.translateThrowable(t);

			if (t instanceof RuntimeException) {
				throw (RuntimeException)t;
			}
			else {
				throw new RuntimeException(t.getClass().getName() +
					" is not a valid exception");
			}
		}

		return (com.liferay.portal.kernel.dao.orm.DynamicQuery)ClpSerializer.translateOutput(returnObj);
	}

	@Override
	@SuppressWarnings("rawtypes")
	public java.util.List dynamicQuery(
		com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
		throws com.liferay.portal.kernel.exception.SystemException {
		Object returnObj = null;

		try {
			returnObj = _invokableLocalService.invokeMethod(_methodName5,
					_methodParameterTypes5,
					new Object[] { ClpSerializer.translateInput(dynamicQuery) });
		}
		catch (Throwable t) {
			t = ClpSerializer.translateThrowable(t);

			if (t instanceof com.liferay.portal.kernel.exception.SystemException) {
				throw (com.liferay.portal.kernel.exception.SystemException)t;
			}

			if (t instanceof RuntimeException) {
				throw (RuntimeException)t;
			}
			else {
				throw new RuntimeException(t.getClass().getName() +
					" is not a valid exception");
			}
		}

		return (java.util.List)ClpSerializer.translateOutput(returnObj);
	}

	@Override
	@SuppressWarnings("rawtypes")
	public java.util.List dynamicQuery(
		com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
		int end) throws com.liferay.portal.kernel.exception.SystemException {
		Object returnObj = null;

		try {
			returnObj = _invokableLocalService.invokeMethod(_methodName6,
					_methodParameterTypes6,
					new Object[] {
						ClpSerializer.translateInput(dynamicQuery),

					start,

					end
					});
		}
		catch (Throwable t) {
			t = ClpSerializer.translateThrowable(t);

			if (t instanceof com.liferay.portal.kernel.exception.SystemException) {
				throw (com.liferay.portal.kernel.exception.SystemException)t;
			}

			if (t instanceof RuntimeException) {
				throw (RuntimeException)t;
			}
			else {
				throw new RuntimeException(t.getClass().getName() +
					" is not a valid exception");
			}
		}

		return (java.util.List)ClpSerializer.translateOutput(returnObj);
	}

	@Override
	@SuppressWarnings("rawtypes")
	public java.util.List dynamicQuery(
		com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
		int end,
		com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
		throws com.liferay.portal.kernel.exception.SystemException {
		Object returnObj = null;

		try {
			returnObj = _invokableLocalService.invokeMethod(_methodName7,
					_methodParameterTypes7,
					new Object[] {
						ClpSerializer.translateInput(dynamicQuery),

					start,

					end,

					ClpSerializer.translateInput(orderByComparator)
					});
		}
		catch (Throwable t) {
			t = ClpSerializer.translateThrowable(t);

			if (t instanceof com.liferay.portal.kernel.exception.SystemException) {
				throw (com.liferay.portal.kernel.exception.SystemException)t;
			}

			if (t instanceof RuntimeException) {
				throw (RuntimeException)t;
			}
			else {
				throw new RuntimeException(t.getClass().getName() +
					" is not a valid exception");
			}
		}

		return (java.util.List)ClpSerializer.translateOutput(returnObj);
	}

	@Override
	public long dynamicQueryCount(
		com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
		throws com.liferay.portal.kernel.exception.SystemException {
		Object returnObj = null;

		try {
			returnObj = _invokableLocalService.invokeMethod(_methodName8,
					_methodParameterTypes8,
					new Object[] { ClpSerializer.translateInput(dynamicQuery) });
		}
		catch (Throwable t) {
			t = ClpSerializer.translateThrowable(t);

			if (t instanceof com.liferay.portal.kernel.exception.SystemException) {
				throw (com.liferay.portal.kernel.exception.SystemException)t;
			}

			if (t instanceof RuntimeException) {
				throw (RuntimeException)t;
			}
			else {
				throw new RuntimeException(t.getClass().getName() +
					" is not a valid exception");
			}
		}

		return ((Long)returnObj).longValue();
	}

	@Override
	public long dynamicQueryCount(
		com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery,
		com.liferay.portal.kernel.dao.orm.Projection projection)
		throws com.liferay.portal.kernel.exception.SystemException {
		Object returnObj = null;

		try {
			returnObj = _invokableLocalService.invokeMethod(_methodName9,
					_methodParameterTypes9,
					new Object[] {
						ClpSerializer.translateInput(dynamicQuery),

					ClpSerializer.translateInput(projection)
					});
		}
		catch (Throwable t) {
			t = ClpSerializer.translateThrowable(t);

			if (t instanceof com.liferay.portal.kernel.exception.SystemException) {
				throw (com.liferay.portal.kernel.exception.SystemException)t;
			}

			if (t instanceof RuntimeException) {
				throw (RuntimeException)t;
			}
			else {
				throw new RuntimeException(t.getClass().getName() +
					" is not a valid exception");
			}
		}

		return ((Long)returnObj).longValue();
	}

	@Override
	public org.oep.processmgt.model.CreateFile fetchCreateFile(
		long createFileId)
		throws com.liferay.portal.kernel.exception.SystemException {
		Object returnObj = null;

		try {
			returnObj = _invokableLocalService.invokeMethod(_methodName10,
					_methodParameterTypes10, new Object[] { createFileId });
		}
		catch (Throwable t) {
			t = ClpSerializer.translateThrowable(t);

			if (t instanceof com.liferay.portal.kernel.exception.SystemException) {
				throw (com.liferay.portal.kernel.exception.SystemException)t;
			}

			if (t instanceof RuntimeException) {
				throw (RuntimeException)t;
			}
			else {
				throw new RuntimeException(t.getClass().getName() +
					" is not a valid exception");
			}
		}

		return (org.oep.processmgt.model.CreateFile)ClpSerializer.translateOutput(returnObj);
	}

	@Override
	public org.oep.processmgt.model.CreateFile getCreateFile(long createFileId)
		throws com.liferay.portal.kernel.exception.PortalException,
			com.liferay.portal.kernel.exception.SystemException {
		Object returnObj = null;

		try {
			returnObj = _invokableLocalService.invokeMethod(_methodName11,
					_methodParameterTypes11, new Object[] { createFileId });
		}
		catch (Throwable t) {
			t = ClpSerializer.translateThrowable(t);

			if (t instanceof com.liferay.portal.kernel.exception.PortalException) {
				throw (com.liferay.portal.kernel.exception.PortalException)t;
			}

			if (t instanceof com.liferay.portal.kernel.exception.SystemException) {
				throw (com.liferay.portal.kernel.exception.SystemException)t;
			}

			if (t instanceof RuntimeException) {
				throw (RuntimeException)t;
			}
			else {
				throw new RuntimeException(t.getClass().getName() +
					" is not a valid exception");
			}
		}

		return (org.oep.processmgt.model.CreateFile)ClpSerializer.translateOutput(returnObj);
	}

	@Override
	public com.liferay.portal.model.PersistedModel getPersistedModel(
		java.io.Serializable primaryKeyObj)
		throws com.liferay.portal.kernel.exception.PortalException,
			com.liferay.portal.kernel.exception.SystemException {
		Object returnObj = null;

		try {
			returnObj = _invokableLocalService.invokeMethod(_methodName12,
					_methodParameterTypes12,
					new Object[] { ClpSerializer.translateInput(primaryKeyObj) });
		}
		catch (Throwable t) {
			t = ClpSerializer.translateThrowable(t);

			if (t instanceof com.liferay.portal.kernel.exception.PortalException) {
				throw (com.liferay.portal.kernel.exception.PortalException)t;
			}

			if (t instanceof com.liferay.portal.kernel.exception.SystemException) {
				throw (com.liferay.portal.kernel.exception.SystemException)t;
			}

			if (t instanceof RuntimeException) {
				throw (RuntimeException)t;
			}
			else {
				throw new RuntimeException(t.getClass().getName() +
					" is not a valid exception");
			}
		}

		return (com.liferay.portal.model.PersistedModel)ClpSerializer.translateOutput(returnObj);
	}

	@Override
	public java.util.List<org.oep.processmgt.model.CreateFile> getCreateFiles(
		int start, int end)
		throws com.liferay.portal.kernel.exception.SystemException {
		Object returnObj = null;

		try {
			returnObj = _invokableLocalService.invokeMethod(_methodName13,
					_methodParameterTypes13, new Object[] { start, end });
		}
		catch (Throwable t) {
			t = ClpSerializer.translateThrowable(t);

			if (t instanceof com.liferay.portal.kernel.exception.SystemException) {
				throw (com.liferay.portal.kernel.exception.SystemException)t;
			}

			if (t instanceof RuntimeException) {
				throw (RuntimeException)t;
			}
			else {
				throw new RuntimeException(t.getClass().getName() +
					" is not a valid exception");
			}
		}

		return (java.util.List<org.oep.processmgt.model.CreateFile>)ClpSerializer.translateOutput(returnObj);
	}

	@Override
	public int getCreateFilesCount()
		throws com.liferay.portal.kernel.exception.SystemException {
		Object returnObj = null;

		try {
			returnObj = _invokableLocalService.invokeMethod(_methodName14,
					_methodParameterTypes14, new Object[] {  });
		}
		catch (Throwable t) {
			t = ClpSerializer.translateThrowable(t);

			if (t instanceof com.liferay.portal.kernel.exception.SystemException) {
				throw (com.liferay.portal.kernel.exception.SystemException)t;
			}

			if (t instanceof RuntimeException) {
				throw (RuntimeException)t;
			}
			else {
				throw new RuntimeException(t.getClass().getName() +
					" is not a valid exception");
			}
		}

		return ((Integer)returnObj).intValue();
	}

	@Override
	public org.oep.processmgt.model.CreateFile updateCreateFile(
		org.oep.processmgt.model.CreateFile createFile)
		throws com.liferay.portal.kernel.exception.SystemException {
		Object returnObj = null;

		try {
			returnObj = _invokableLocalService.invokeMethod(_methodName15,
					_methodParameterTypes15,
					new Object[] { ClpSerializer.translateInput(createFile) });
		}
		catch (Throwable t) {
			t = ClpSerializer.translateThrowable(t);

			if (t instanceof com.liferay.portal.kernel.exception.SystemException) {
				throw (com.liferay.portal.kernel.exception.SystemException)t;
			}

			if (t instanceof RuntimeException) {
				throw (RuntimeException)t;
			}
			else {
				throw new RuntimeException(t.getClass().getName() +
					" is not a valid exception");
			}
		}

		return (org.oep.processmgt.model.CreateFile)ClpSerializer.translateOutput(returnObj);
	}

	@Override
	public java.lang.String getBeanIdentifier() {
		Object returnObj = null;

		try {
			returnObj = _invokableLocalService.invokeMethod(_methodName16,
					_methodParameterTypes16, new Object[] {  });
		}
		catch (Throwable t) {
			t = ClpSerializer.translateThrowable(t);

			if (t instanceof RuntimeException) {
				throw (RuntimeException)t;
			}
			else {
				throw new RuntimeException(t.getClass().getName() +
					" is not a valid exception");
			}
		}

		return (java.lang.String)ClpSerializer.translateOutput(returnObj);
	}

	@Override
	public void setBeanIdentifier(java.lang.String beanIdentifier) {
		try {
			_invokableLocalService.invokeMethod(_methodName17,
				_methodParameterTypes17,
				new Object[] { ClpSerializer.translateInput(beanIdentifier) });
		}
		catch (Throwable t) {
			t = ClpSerializer.translateThrowable(t);

			if (t instanceof RuntimeException) {
				throw (RuntimeException)t;
			}
			else {
				throw new RuntimeException(t.getClass().getName() +
					" is not a valid exception");
			}
		}
	}

	@Override
	public java.lang.Object invokeMethod(java.lang.String name,
		java.lang.String[] parameterTypes, java.lang.Object[] arguments)
		throws java.lang.Throwable {
		throw new UnsupportedOperationException();
	}

	@Override
	public org.oep.processmgt.model.CreateFile addCreateFile(
		long processOrderId, long dossierStepId, java.util.Date stepDate,
		long docFileId, com.liferay.portal.service.ServiceContext serviceContext)
		throws com.liferay.portal.kernel.exception.PortalException,
			com.liferay.portal.kernel.exception.SystemException {
		Object returnObj = null;

		try {
			returnObj = _invokableLocalService.invokeMethod(_methodName19,
					_methodParameterTypes19,
					new Object[] {
						processOrderId,

					dossierStepId,

					ClpSerializer.translateInput(stepDate),

					docFileId,

					ClpSerializer.translateInput(serviceContext)
					});
		}
		catch (Throwable t) {
			t = ClpSerializer.translateThrowable(t);

			if (t instanceof com.liferay.portal.kernel.exception.PortalException) {
				throw (com.liferay.portal.kernel.exception.PortalException)t;
			}

			if (t instanceof com.liferay.portal.kernel.exception.SystemException) {
				throw (com.liferay.portal.kernel.exception.SystemException)t;
			}

			if (t instanceof RuntimeException) {
				throw (RuntimeException)t;
			}
			else {
				throw new RuntimeException(t.getClass().getName() +
					" is not a valid exception");
			}
		}

		return (org.oep.processmgt.model.CreateFile)ClpSerializer.translateOutput(returnObj);
	}

	@Override
	public org.oep.processmgt.model.CreateFile updateCreateFile(long id,
		long processOrderId, long dossierStepId, java.util.Date stepDate,
		long docFileId, com.liferay.portal.service.ServiceContext serviceContext)
		throws com.liferay.portal.kernel.exception.PortalException,
			com.liferay.portal.kernel.exception.SystemException {
		Object returnObj = null;

		try {
			returnObj = _invokableLocalService.invokeMethod(_methodName20,
					_methodParameterTypes20,
					new Object[] {
						id,

					processOrderId,

					dossierStepId,

					ClpSerializer.translateInput(stepDate),

					docFileId,

					ClpSerializer.translateInput(serviceContext)
					});
		}
		catch (Throwable t) {
			t = ClpSerializer.translateThrowable(t);

			if (t instanceof com.liferay.portal.kernel.exception.PortalException) {
				throw (com.liferay.portal.kernel.exception.PortalException)t;
			}

			if (t instanceof com.liferay.portal.kernel.exception.SystemException) {
				throw (com.liferay.portal.kernel.exception.SystemException)t;
			}

			if (t instanceof RuntimeException) {
				throw (RuntimeException)t;
			}
			else {
				throw new RuntimeException(t.getClass().getName() +
					" is not a valid exception");
			}
		}

		return (org.oep.processmgt.model.CreateFile)ClpSerializer.translateOutput(returnObj);
	}

	@Override
	public void updateCreateFileResources(
		org.oep.processmgt.model.CreateFile createFile,
		java.lang.String[] groupPermissions,
		java.lang.String[] guestPermissions,
		com.liferay.portal.service.ServiceContext serviceContext)
		throws com.liferay.portal.kernel.exception.PortalException,
			com.liferay.portal.kernel.exception.SystemException {
		try {
			_invokableLocalService.invokeMethod(_methodName21,
				_methodParameterTypes21,
				new Object[] {
					ClpSerializer.translateInput(createFile),

				ClpSerializer.translateInput(groupPermissions),

				ClpSerializer.translateInput(guestPermissions),

				ClpSerializer.translateInput(serviceContext)
				});
		}
		catch (Throwable t) {
			t = ClpSerializer.translateThrowable(t);

			if (t instanceof com.liferay.portal.kernel.exception.PortalException) {
				throw (com.liferay.portal.kernel.exception.PortalException)t;
			}

			if (t instanceof com.liferay.portal.kernel.exception.SystemException) {
				throw (com.liferay.portal.kernel.exception.SystemException)t;
			}

			if (t instanceof RuntimeException) {
				throw (RuntimeException)t;
			}
			else {
				throw new RuntimeException(t.getClass().getName() +
					" is not a valid exception");
			}
		}
	}

	@Override
	public void removeCreateFile(org.oep.processmgt.model.CreateFile createFile)
		throws com.liferay.portal.kernel.exception.PortalException,
			com.liferay.portal.kernel.exception.SystemException {
		try {
			_invokableLocalService.invokeMethod(_methodName22,
				_methodParameterTypes22,
				new Object[] { ClpSerializer.translateInput(createFile) });
		}
		catch (Throwable t) {
			t = ClpSerializer.translateThrowable(t);

			if (t instanceof com.liferay.portal.kernel.exception.PortalException) {
				throw (com.liferay.portal.kernel.exception.PortalException)t;
			}

			if (t instanceof com.liferay.portal.kernel.exception.SystemException) {
				throw (com.liferay.portal.kernel.exception.SystemException)t;
			}

			if (t instanceof RuntimeException) {
				throw (RuntimeException)t;
			}
			else {
				throw new RuntimeException(t.getClass().getName() +
					" is not a valid exception");
			}
		}
	}

	@Override
	public void removeCreateFile(long id)
		throws com.liferay.portal.kernel.exception.PortalException,
			com.liferay.portal.kernel.exception.SystemException {
		try {
			_invokableLocalService.invokeMethod(_methodName23,
				_methodParameterTypes23, new Object[] { id });
		}
		catch (Throwable t) {
			t = ClpSerializer.translateThrowable(t);

			if (t instanceof com.liferay.portal.kernel.exception.PortalException) {
				throw (com.liferay.portal.kernel.exception.PortalException)t;
			}

			if (t instanceof com.liferay.portal.kernel.exception.SystemException) {
				throw (com.liferay.portal.kernel.exception.SystemException)t;
			}

			if (t instanceof RuntimeException) {
				throw (RuntimeException)t;
			}
			else {
				throw new RuntimeException(t.getClass().getName() +
					" is not a valid exception");
			}
		}
	}

	@Override
	public void addCreateFileResources(
		org.oep.processmgt.model.CreateFile createFile,
		boolean addGroupPermission, boolean addGuestPermission,
		com.liferay.portal.service.ServiceContext serviceContext)
		throws com.liferay.portal.kernel.exception.PortalException,
			com.liferay.portal.kernel.exception.SystemException {
		try {
			_invokableLocalService.invokeMethod(_methodName24,
				_methodParameterTypes24,
				new Object[] {
					ClpSerializer.translateInput(createFile),

				addGroupPermission,

				addGuestPermission,

				ClpSerializer.translateInput(serviceContext)
				});
		}
		catch (Throwable t) {
			t = ClpSerializer.translateThrowable(t);

			if (t instanceof com.liferay.portal.kernel.exception.PortalException) {
				throw (com.liferay.portal.kernel.exception.PortalException)t;
			}

			if (t instanceof com.liferay.portal.kernel.exception.SystemException) {
				throw (com.liferay.portal.kernel.exception.SystemException)t;
			}

			if (t instanceof RuntimeException) {
				throw (RuntimeException)t;
			}
			else {
				throw new RuntimeException(t.getClass().getName() +
					" is not a valid exception");
			}
		}
	}

	@Override
	public void addCreateFileResources(
		org.oep.processmgt.model.CreateFile createFile,
		java.lang.String[] groupPermissions,
		java.lang.String[] guestPermissions,
		com.liferay.portal.service.ServiceContext serviceContext)
		throws com.liferay.portal.kernel.exception.PortalException,
			com.liferay.portal.kernel.exception.SystemException {
		try {
			_invokableLocalService.invokeMethod(_methodName25,
				_methodParameterTypes25,
				new Object[] {
					ClpSerializer.translateInput(createFile),

				ClpSerializer.translateInput(groupPermissions),

				ClpSerializer.translateInput(guestPermissions),

				ClpSerializer.translateInput(serviceContext)
				});
		}
		catch (Throwable t) {
			t = ClpSerializer.translateThrowable(t);

			if (t instanceof com.liferay.portal.kernel.exception.PortalException) {
				throw (com.liferay.portal.kernel.exception.PortalException)t;
			}

			if (t instanceof com.liferay.portal.kernel.exception.SystemException) {
				throw (com.liferay.portal.kernel.exception.SystemException)t;
			}

			if (t instanceof RuntimeException) {
				throw (RuntimeException)t;
			}
			else {
				throw new RuntimeException(t.getClass().getName() +
					" is not a valid exception");
			}
		}
	}

	@Override
	public void addCreateFileResources(long id,
		java.lang.String[] groupPermissions,
		java.lang.String[] guestPermissions,
		com.liferay.portal.service.ServiceContext serviceContext)
		throws com.liferay.portal.kernel.exception.PortalException,
			com.liferay.portal.kernel.exception.SystemException {
		try {
			_invokableLocalService.invokeMethod(_methodName26,
				_methodParameterTypes26,
				new Object[] {
					id,

				ClpSerializer.translateInput(groupPermissions),

				ClpSerializer.translateInput(guestPermissions),

				ClpSerializer.translateInput(serviceContext)
				});
		}
		catch (Throwable t) {
			t = ClpSerializer.translateThrowable(t);

			if (t instanceof com.liferay.portal.kernel.exception.PortalException) {
				throw (com.liferay.portal.kernel.exception.PortalException)t;
			}

			if (t instanceof com.liferay.portal.kernel.exception.SystemException) {
				throw (com.liferay.portal.kernel.exception.SystemException)t;
			}

			if (t instanceof RuntimeException) {
				throw (RuntimeException)t;
			}
			else {
				throw new RuntimeException(t.getClass().getName() +
					" is not a valid exception");
			}
		}
	}

	private InvokableLocalService _invokableLocalService;
	private String _methodName0;
	private String[] _methodParameterTypes0;
	private String _methodName1;
	private String[] _methodParameterTypes1;
	private String _methodName2;
	private String[] _methodParameterTypes2;
	private String _methodName3;
	private String[] _methodParameterTypes3;
	private String _methodName4;
	private String[] _methodParameterTypes4;
	private String _methodName5;
	private String[] _methodParameterTypes5;
	private String _methodName6;
	private String[] _methodParameterTypes6;
	private String _methodName7;
	private String[] _methodParameterTypes7;
	private String _methodName8;
	private String[] _methodParameterTypes8;
	private String _methodName9;
	private String[] _methodParameterTypes9;
	private String _methodName10;
	private String[] _methodParameterTypes10;
	private String _methodName11;
	private String[] _methodParameterTypes11;
	private String _methodName12;
	private String[] _methodParameterTypes12;
	private String _methodName13;
	private String[] _methodParameterTypes13;
	private String _methodName14;
	private String[] _methodParameterTypes14;
	private String _methodName15;
	private String[] _methodParameterTypes15;
	private String _methodName16;
	private String[] _methodParameterTypes16;
	private String _methodName17;
	private String[] _methodParameterTypes17;
	private String _methodName19;
	private String[] _methodParameterTypes19;
	private String _methodName20;
	private String[] _methodParameterTypes20;
	private String _methodName21;
	private String[] _methodParameterTypes21;
	private String _methodName22;
	private String[] _methodParameterTypes22;
	private String _methodName23;
	private String[] _methodParameterTypes23;
	private String _methodName24;
	private String[] _methodParameterTypes24;
	private String _methodName25;
	private String[] _methodParameterTypes25;
	private String _methodName26;
	private String[] _methodParameterTypes26;
}


text:
.navbar-custom {
  background: #fff;
  font-family: 'Josefin Sans', sans-serif;
  text-transform: uppercase;
  font-weight: 500;
  border: none;
}
.navbar-custom .navbar-brand {
  color: black;
}
.navbar-custom, .navbar-brand:hover,
.navbar-custom, .navbar-brand:focus,
.navbar-custom, .navbar-brand:active,
.navbar-custom, .navbar-brand.active {
  color: #f1b200;
}
.navbar-custom .navbar-nav {
  letter-spacing: 1px;
}
.navbar-custom .navbar-nav li a {
  color: black;
}
.navbar-custom .navbar-nav li a:hover {
  color: #f1b200;
}
.navbar-custom .navbar-nav li a:focus,
.navbar-custom .navbar-nav li a:active {
  color: black;
}
.navbar-custom .navbar-nav li.active a{
  color: orange;
  background: black;
}
.navbar-custom .navbar-nav li.active a:hover,
.navbar-custom .navbar-nav li.active a:focus,
.navbar-custom .navbar-nav li.active a:active {
  color: orange;
  background: black;
}
.navbar-custom .navbar-toggle {
  color: black;
  background-color: white;
  text-transform: uppercase;
  font-size: 10px;
  border-color: black;
}
.navbar-custom .navbar-toggle:hover,
.navbar-custom .navbar-toggle:focus {
  background-color: #white;
  color: #f1b200;
  border-color: #f1b200;
}
@media (min-width:768px) {
  .navbar-custom {
    padding: 25px 0;
    -webkit-transition: padding 0.3s;
    -moz-transition: padding 0.3s;
    transition: padding 0.3s;
  }
  .navbar-custom .navbar-brand {
    font-size: 2em;
    -webkit-transition: all 0.3s;
    -moz-transition: all 0.3s;
    transition: all 0.3s;
  }
  .navbar-custom.affix {
    padding: 10px 0;
  }
  .navbar-custom.affix .navbar-brand{
    font-size: 2em;
  }
}
header {
  text-align: center;
  background: #fff;
  color: black;
}
header .container {
  padding-top:50px;
  padding-bottom: 25px;
}
header img {
  display: block;
  margin: 0 auto 20px;
}
header .intro-text .name {
  display: block;
  font-family: 'Bellefair', serif;
  text-transform: uppercase;
  font-weight: 100;
  font-size: 3em;
}
header .intro-text .skills {
  font-size: 1.25em;
  font-weight: 300;
}
body {
  font-family: 'Lato', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  overflow-x: hidden;
}

p {
  font-size: 18px;
  font-family: 'Bellefair', serif;
}
p.small{
  font-size: 16px;
}