GNM-1226 Merge to master
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
new file mode 100644
index 0000000..d05d003
--- /dev/null
+++ b/CONTRIBUTING.md
@@ -0,0 +1,66 @@
+# Contributing to Eclipse openK User Modules
+
+Thanks for your interest in this project.
+
+## Project description
+
+The project starts with the module Feed-In Management ("Last- und
+Einspeisemanagement") based on the German Electricity Feed-In Act. The future
+demand for electric energy is to be adapted to the supply and availability of
+renewable energy. Based on specific rules and parameters the Feed-In Management
+calculates a blueprint for electric switching stations and power plants based on
+renewable energy. Implementing the calculation input data is needed from
+electric networks, switching stations, power plants, electric demands and
+feed-in capabilities.
+
+* https://projects.eclipse.org/projects/technology.openk-usermodules
+
+## Developer resources
+
+Information regarding source code management, builds, coding standards, and
+more.
+
+* https://projects.eclipse.org/projects/technology.openk-usermodules/developer
+
+The project maintains the following source code repositories
+
+* http://git.eclipse.org/c/openk-usermodules/openk-usermodules.git
+* http://git.eclipse.org/c/openk-usermodules/org.eclipse.openk-usermodules.mics.centralService.git
+* http://git.eclipse.org/c/openk-usermodules/org.eclipse.openk-usermodules.mics.homeService.git
+* http://git.eclipse.org/c/openk-usermodules/org.eclipse.openk-usermodules.plannedGridMeasures.backend.git
+* http://git.eclipse.org/c/openk-usermodules/org.eclipse.openk-usermodules.plannedGridMeasures.frontend.git
+* http://git.eclipse.org/c/openk-usermodules/org.eclipse.openk-usermodules.standbyPlanning.backend.git
+* http://git.eclipse.org/c/openk-usermodules/org.eclipse.openk-usermodules.standbyPlanning.docu.git
+* http://git.eclipse.org/c/openk-usermodules/org.eclipse.openk-usermodules.standbyPlanning.frontend.git
+
+This project uses Bugzilla to track ongoing development and issues.
+
+* Search for issues: https://eclipse.org/bugs/buglist.cgi?product=openK User
+ Modules
+* Create a new report: https://eclipse.org/bugs/enter_bug.cgi?product=openK
+ User Modules
+
+Be sure to search for existing bugs before you create another one. Remember that
+contributions are always welcome!
+
+## Eclipse Contributor Agreement
+
+Before your contribution can be accepted by the project team contributors must
+electronically sign the Eclipse Contributor Agreement (ECA).
+
+* http://www.eclipse.org/legal/ECA.php
+
+Commits that are provided by non-committers must have a Signed-off-by field in
+the footer indicating that the author is aware of the terms by which the
+contribution has been provided to the project. The non-committer must
+additionally have an Eclipse Foundation account and must have a signed Eclipse
+Contributor Agreement (ECA) on file.
+
+For more information, please see the Eclipse Committer Handbook:
+https://www.eclipse.org/projects/handbook/#resources-commit
+
+## Contact
+
+Contact the project developers via the project's "dev" list.
+
+* https://accounts.eclipse.org/mailing-list/openk-usermodules-dev
\ No newline at end of file
diff --git a/LICENSE.md b/LICENSE.md
index 11ecb79..55979aa 100644
--- a/LICENSE.md
+++ b/LICENSE.md
@@ -1,198 +1,260 @@
-Eclipse Public License - v 1.0
+Eclipse Public License - v 2.0
-THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC
-LICENSE ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM
-CONSTITUTES RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.
+ THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE
+ PUBLIC LICENSE ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION
+ OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.
1. DEFINITIONS
"Contribution" means:
-a) in the case of the initial Contributor, the initial code and documentation
- distributed under this Agreement, and
-b) in the case of each subsequent Contributor:
- i) changes to the Program, and
- ii) additions to the Program;
+ a) in the case of the initial Contributor, the initial content
+ Distributed under this Agreement, and
- where such changes and/or additions to the Program originate from and are
- distributed by that particular Contributor. A Contribution 'originates' from
- a Contributor if it was added to the Program by such Contributor itself or
- anyone acting on such Contributor's behalf. Contributions do not include
- additions to the Program which: (i) are separate modules of software
- distributed in conjunction with the Program under their own license
- agreement, and (ii) are not derivative works of the Program.
+ b) in the case of each subsequent Contributor:
+ i) changes to the Program, and
+ ii) additions to the Program;
+ where such changes and/or additions to the Program originate from
+ and are Distributed by that particular Contributor. A Contribution
+ "originates" from a Contributor if it was added to the Program by
+ such Contributor itself or anyone acting on such Contributor's behalf.
+ Contributions do not include changes or additions to the Program that
+ are not Modified Works.
-"Contributor" means any person or entity that distributes the Program.
+"Contributor" means any person or entity that Distributes the Program.
-"Licensed Patents" mean patent claims licensable by a Contributor which are
-necessarily infringed by the use or sale of its Contribution alone or when
-combined with the Program.
+"Licensed Patents" mean patent claims licensable by a Contributor which
+are necessarily infringed by the use or sale of its Contribution alone
+or when combined with the Program.
-"Program" means the Contributions distributed in accordance with this Agreement.
+"Program" means the Contributions Distributed in accordance with this
+Agreement.
-"Recipient" means anyone who receives the Program under this Agreement,
-including all Contributors.
+"Recipient" means anyone who receives the Program under this Agreement
+or any Secondary License (as applicable), including Contributors.
+
+"Derivative Works" shall mean any work, whether in Source Code or other
+form, that is based on (or derived from) the Program and for which the
+editorial revisions, annotations, elaborations, or other modifications
+represent, as a whole, an original work of authorship.
+
+"Modified Works" shall mean any work in Source Code or other form that
+results from an addition to, deletion from, or modification of the
+contents of the Program, including, for purposes of clarity any new file
+in Source Code form that contains any contents of the Program. Modified
+Works shall not include works that contain only declarations,
+interfaces, types, classes, structures, or files of the Program solely
+in each case in order to link to, bind by name, or subclass the Program
+or Modified Works thereof.
+
+"Distribute" means the acts of a) distributing or b) making available
+in any manner that enables the transfer of a copy.
+
+"Source Code" means the form of a Program preferred for making
+modifications, including but not limited to software source code,
+documentation source, and configuration files.
+
+"Secondary License" means either the GNU General Public License,
+Version 2.0, or any later versions of that license, including any
+exceptions or additional permissions as identified by the initial
+Contributor.
2. GRANT OF RIGHTS
- a) Subject to the terms of this Agreement, each Contributor hereby grants
- Recipient a non-exclusive, worldwide, royalty-free copyright license to
- reproduce, prepare derivative works of, publicly display, publicly perform,
- distribute and sublicense the Contribution of such Contributor, if any, and
- such derivative works, in source code and object code form.
- b) Subject to the terms of this Agreement, each Contributor hereby grants
- Recipient a non-exclusive, worldwide, royalty-free patent license under
- Licensed Patents to make, use, sell, offer to sell, import and otherwise
- transfer the Contribution of such Contributor, if any, in source code and
- object code form. This patent license shall apply to the combination of the
- Contribution and the Program if, at the time the Contribution is added by
- the Contributor, such addition of the Contribution causes such combination
- to be covered by the Licensed Patents. The patent license shall not apply
- to any other combinations which include the Contribution. No hardware per
- se is licensed hereunder.
- c) Recipient understands that although each Contributor grants the licenses to
- its Contributions set forth herein, no assurances are provided by any
- Contributor that the Program does not infringe the patent or other
- intellectual property rights of any other entity. Each Contributor
- disclaims any liability to Recipient for claims brought by any other entity
- based on infringement of intellectual property rights or otherwise. As a
- condition to exercising the rights and licenses granted hereunder, each
- Recipient hereby assumes sole responsibility to secure any other
- intellectual property rights needed, if any. For example, if a third party
- patent license is required to allow Recipient to distribute the Program, it
- is Recipient's responsibility to acquire that license before distributing
- the Program.
- d) Each Contributor represents that to its knowledge it has sufficient
- copyright rights in its Contribution, if any, to grant the copyright
- license set forth in this Agreement.
+
+ a) Subject to the terms of this Agreement, each Contributor hereby
+ grants Recipient a non-exclusive, worldwide, royalty-free copyright
+ license to reproduce, prepare Derivative Works of, publicly display,
+ publicly perform, Distribute and sublicense the Contribution of such
+ Contributor, if any, and such Derivative Works.
+
+ b) Subject to the terms of this Agreement, each Contributor hereby
+ grants Recipient a non-exclusive, worldwide, royalty-free patent
+ license under Licensed Patents to make, use, sell, offer to sell,
+ import and otherwise transfer the Contribution of such Contributor,
+ if any, in Source Code or other form. This patent license shall
+ apply to the combination of the Contribution and the Program if, at
+ the time the Contribution is added by the Contributor, such addition
+ of the Contribution causes such combination to be covered by the
+ Licensed Patents. The patent license shall not apply to any other
+ combinations which include the Contribution. No hardware per se is
+ licensed hereunder.
+
+ c) Recipient understands that although each Contributor grants the
+ licenses to its Contributions set forth herein, no assurances are
+ provided by any Contributor that the Program does not infringe the
+ patent or other intellectual property rights of any other entity.
+ Each Contributor disclaims any liability to Recipient for claims
+ brought by any other entity based on infringement of intellectual
+ property rights or otherwise. As a condition to exercising the
+ rights and licenses granted hereunder, each Recipient hereby
+ assumes sole responsibility to secure any other intellectual
+ property rights needed, if any. For example, if a third party
+ patent license is required to allow Recipient to Distribute the
+ Program, it is Recipient's responsibility to acquire that license
+ before distributing the Program.
+
+ d) Each Contributor represents that to its knowledge it has
+ sufficient copyright rights in its Contribution, if any, to grant
+ the copyright license set forth in this Agreement.
+
+ e) Notwithstanding the terms of any Secondary License, no
+ Contributor makes additional grants to any Recipient (other than
+ those set forth in this Agreement) as a result of such Recipient's
+ receipt of the Program under the terms of a Secondary License
+ (if permitted under the terms of Section 3).
3. REQUIREMENTS
-A Contributor may choose to distribute the Program in object code form under its
-own license agreement, provided that:
+3.1 If a Contributor Distributes the Program in any form, then:
- a) it complies with the terms and conditions of this Agreement; and
- b) its license agreement:
- i) effectively disclaims on behalf of all Contributors all warranties and
- conditions, express and implied, including warranties or conditions of
- title and non-infringement, and implied warranties or conditions of
- merchantability and fitness for a particular purpose;
- ii) effectively excludes on behalf of all Contributors all liability for
- damages, including direct, indirect, special, incidental and
- consequential damages, such as lost profits;
- iii) states that any provisions which differ from this Agreement are offered
- by that Contributor alone and not by any other party; and
- iv) states that source code for the Program is available from such
- Contributor, and informs licensees how to obtain it in a reasonable
- manner on or through a medium customarily used for software exchange.
+ a) the Program must also be made available as Source Code, in
+ accordance with section 3.2, and the Contributor must accompany
+ the Program with a statement that the Source Code for the Program
+ is available under this Agreement, and informs Recipients how to
+ obtain it in a reasonable manner on or through a medium customarily
+ used for software exchange; and
-When the Program is made available in source code form:
+ b) the Contributor may Distribute the Program under a license
+ different than this Agreement, provided that such license:
+ i) effectively disclaims on behalf of all other Contributors all
+ warranties and conditions, express and implied, including
+ warranties or conditions of title and non-infringement, and
+ implied warranties or conditions of merchantability and fitness
+ for a particular purpose;
- a) it must be made available under this Agreement; and
- b) a copy of this Agreement must be included with each copy of the Program.
- Contributors may not remove or alter any copyright notices contained within
- the Program.
+ ii) effectively excludes on behalf of all other Contributors all
+ liability for damages, including direct, indirect, special,
+ incidental and consequential damages, such as lost profits;
-Each Contributor must identify itself as the originator of its Contribution, if
-any, in a manner that reasonably allows subsequent Recipients to identify the
-originator of the Contribution.
+ iii) does not attempt to limit or alter the recipients' rights
+ in the Source Code under section 3.2; and
+
+ iv) requires any subsequent distribution of the Program by any
+ party to be under a license that satisfies the requirements
+ of this section 3.
+
+3.2 When the Program is Distributed as Source Code:
+
+ a) it must be made available under this Agreement, or if the
+ Program (i) is combined with other material in a separate file or
+ files made available under a Secondary License, and (ii) the initial
+ Contributor attached to the Source Code the notice described in
+ Exhibit A of this Agreement, then the Program may be made available
+ under the terms of such Secondary Licenses, and
+
+ b) a copy of this Agreement must be included with each copy of
+ the Program.
+
+3.3 Contributors may not remove or alter any copyright, patent,
+trademark, attribution notices, disclaimers of warranty, or limitations
+of liability ("notices") contained within the Program from any copy of
+the Program which they Distribute, provided that Contributors may add
+their own appropriate notices.
4. COMMERCIAL DISTRIBUTION
-Commercial distributors of software may accept certain responsibilities with
-respect to end users, business partners and the like. While this license is
-intended to facilitate the commercial use of the Program, the Contributor who
-includes the Program in a commercial product offering should do so in a manner
-which does not create potential liability for other Contributors. Therefore, if
-a Contributor includes the Program in a commercial product offering, such
-Contributor ("Commercial Contributor") hereby agrees to defend and indemnify
-every other Contributor ("Indemnified Contributor") against any losses, damages
-and costs (collectively "Losses") arising from claims, lawsuits and other legal
-actions brought by a third party against the Indemnified Contributor to the
-extent caused by the acts or omissions of such Commercial Contributor in
-connection with its distribution of the Program in a commercial product
-offering. The obligations in this section do not apply to any claims or Losses
-relating to any actual or alleged intellectual property infringement. In order
-to qualify, an Indemnified Contributor must: a) promptly notify the Commercial
-Contributor in writing of such claim, and b) allow the Commercial Contributor to
-control, and cooperate with the Commercial Contributor in, the defense and any
-related settlement negotiations. The Indemnified Contributor may participate in
-any such claim at its own expense.
+Commercial distributors of software may accept certain responsibilities
+with respect to end users, business partners and the like. While this
+license is intended to facilitate the commercial use of the Program,
+the Contributor who includes the Program in a commercial product
+offering should do so in a manner which does not create potential
+liability for other Contributors. Therefore, if a Contributor includes
+the Program in a commercial product offering, such Contributor
+("Commercial Contributor") hereby agrees to defend and indemnify every
+other Contributor ("Indemnified Contributor") against any losses,
+damages and costs (collectively "Losses") arising from claims, lawsuits
+and other legal actions brought by a third party against the Indemnified
+Contributor to the extent caused by the acts or omissions of such
+Commercial Contributor in connection with its distribution of the Program
+in a commercial product offering. The obligations in this section do not
+apply to any claims or Losses relating to any actual or alleged
+intellectual property infringement. In order to qualify, an Indemnified
+Contributor must: a) promptly notify the Commercial Contributor in
+writing of such claim, and b) allow the Commercial Contributor to control,
+and cooperate with the Commercial Contributor in, the defense and any
+related settlement negotiations. The Indemnified Contributor may
+participate in any such claim at its own expense.
-For example, a Contributor might include the Program in a commercial product
-offering, Product X. That Contributor is then a Commercial Contributor. If that
-Commercial Contributor then makes performance claims, or offers warranties
-related to Product X, those performance claims and warranties are such
-Commercial Contributor's responsibility alone. Under this section, the
-Commercial Contributor would have to defend claims against the other
-Contributors related to those performance claims and warranties, and if a court
-requires any other Contributor to pay any damages as a result, the Commercial
-Contributor must pay those damages.
+For example, a Contributor might include the Program in a commercial
+product offering, Product X. That Contributor is then a Commercial
+Contributor. If that Commercial Contributor then makes performance
+claims, or offers warranties related to Product X, those performance
+claims and warranties are such Commercial Contributor's responsibility
+alone. Under this section, the Commercial Contributor would have to
+defend claims against the other Contributors related to those performance
+claims and warranties, and if a court requires any other Contributor to
+pay any damages as a result, the Commercial Contributor must pay
+those damages.
5. NO WARRANTY
-EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, THE PROGRAM IS PROVIDED ON AN
-"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR
-IMPLIED INCLUDING, WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS OF TITLE,
-NON-INFRINGEMENT, MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Each
-Recipient is solely responsible for determining the appropriateness of using and
-distributing the Program and assumes all risks associated with its exercise of
-rights under this Agreement , including but not limited to the risks and costs
-of program errors, compliance with applicable laws, damage to or loss of data,
-programs or equipment, and unavailability or interruption of operations.
+EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, AND TO THE EXTENT
+PERMITTED BY APPLICABLE LAW, THE PROGRAM IS PROVIDED ON AN "AS IS"
+BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR
+IMPLIED INCLUDING, WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS OF
+TITLE, NON-INFRINGEMENT, MERCHANTABILITY OR FITNESS FOR A PARTICULAR
+PURPOSE. Each Recipient is solely responsible for determining the
+appropriateness of using and distributing the Program and assumes all
+risks associated with its exercise of rights under this Agreement,
+including but not limited to the risks and costs of program errors,
+compliance with applicable laws, damage to or loss of data, programs
+or equipment, and unavailability or interruption of operations.
6. DISCLAIMER OF LIABILITY
-EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, NEITHER RECIPIENT NOR ANY
-CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING WITHOUT LIMITATION LOST
-PROFITS), HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
-STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-OUT OF THE USE OR DISTRIBUTION OF THE PROGRAM OR THE EXERCISE OF ANY RIGHTS
-GRANTED HEREUNDER, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, AND TO THE EXTENT
+PERMITTED BY APPLICABLE LAW, NEITHER RECIPIENT NOR ANY CONTRIBUTORS
+SHALL HAVE ANY LIABILITY FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING WITHOUT LIMITATION LOST
+PROFITS), HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ARISING IN ANY WAY OUT OF THE USE OR DISTRIBUTION OF THE PROGRAM OR THE
+EXERCISE OF ANY RIGHTS GRANTED HEREUNDER, EVEN IF ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGES.
7. GENERAL
-If any provision of this Agreement is invalid or unenforceable under applicable
-law, it shall not affect the validity or enforceability of the remainder of the
-terms of this Agreement, and without further action by the parties hereto, such
-provision shall be reformed to the minimum extent necessary to make such
-provision valid and enforceable.
+If any provision of this Agreement is invalid or unenforceable under
+applicable law, it shall not affect the validity or enforceability of
+the remainder of the terms of this Agreement, and without further
+action by the parties hereto, such provision shall be reformed to the
+minimum extent necessary to make such provision valid and enforceable.
-If Recipient institutes patent litigation against any entity (including a
-cross-claim or counterclaim in a lawsuit) alleging that the Program itself
-(excluding combinations of the Program with other software or hardware)
-infringes such Recipient's patent(s), then such Recipient's rights granted under
-Section 2(b) shall terminate as of the date such litigation is filed.
+If Recipient institutes patent litigation against any entity
+(including a cross-claim or counterclaim in a lawsuit) alleging that the
+Program itself (excluding combinations of the Program with other software
+or hardware) infringes such Recipient's patent(s), then such Recipient's
+rights granted under Section 2(b) shall terminate as of the date such
+litigation is filed.
-All Recipient's rights under this Agreement shall terminate if it fails to
-comply with any of the material terms or conditions of this Agreement and does
-not cure such failure in a reasonable period of time after becoming aware of
-such noncompliance. If all Recipient's rights under this Agreement terminate,
-Recipient agrees to cease use and distribution of the Program as soon as
-reasonably practicable. However, Recipient's obligations under this Agreement
-and any licenses granted by Recipient relating to the Program shall continue and
-survive.
+All Recipient's rights under this Agreement shall terminate if it
+fails to comply with any of the material terms or conditions of this
+Agreement and does not cure such failure in a reasonable period of
+time after becoming aware of such noncompliance. If all Recipient's
+rights under this Agreement terminate, Recipient agrees to cease use
+and distribution of the Program as soon as reasonably practicable.
+However, Recipient's obligations under this Agreement and any licenses
+granted by Recipient relating to the Program shall continue and survive.
-Everyone is permitted to copy and distribute copies of this Agreement, but in
-order to avoid inconsistency the Agreement is copyrighted and may only be
-modified in the following manner. The Agreement Steward reserves the right to
-publish new versions (including revisions) of this Agreement from time to time.
-No one other than the Agreement Steward has the right to modify this Agreement.
-The Eclipse Foundation is the initial Agreement Steward. The Eclipse Foundation
-may assign the responsibility to serve as the Agreement Steward to a suitable
-separate entity. Each new version of the Agreement will be given a
-distinguishing version number. The Program (including Contributions) may always
-be distributed subject to the version of the Agreement under which it was
+Everyone is permitted to copy and distribute copies of this Agreement,
+but in order to avoid inconsistency the Agreement is copyrighted and
+may only be modified in the following manner. The Agreement Steward
+reserves the right to publish new versions (including revisions) of
+this Agreement from time to time. No one other than the Agreement
+Steward has the right to modify this Agreement. The Eclipse Foundation
+is the initial Agreement Steward. The Eclipse Foundation may assign the
+responsibility to serve as the Agreement Steward to a suitable separate
+entity. Each new version of the Agreement will be given a distinguishing
+version number. The Program (including Contributions) may always be
+Distributed subject to the version of the Agreement under which it was
received. In addition, after a new version of the Agreement is published,
-Contributor may elect to distribute the Program (including its Contributions)
-under the new version. Except as expressly stated in Sections 2(a) and 2(b)
-above, Recipient receives no rights or licenses to the intellectual property of
-any Contributor under this Agreement, whether expressly, by implication,
-estoppel or otherwise. All rights in the Program not expressly granted under
-this Agreement are reserved.
+Contributor may elect to Distribute the Program (including its
+Contributions) under the new version.
-This Agreement is governed by the laws of the State of New York and the
-intellectual property laws of the United States of America. No party to this
-Agreement will bring a legal action under this Agreement more than one year
-after the cause of action arose. Each party waives its rights to a jury trial in
-any resulting litigation.
+Except as expressly stated in Sections 2(a) and 2(b) above, Recipient
+receives no rights or licenses to the intellectual property of any
+Contributor under this Agreement, whether expressly, by implication,
+estoppel or otherwise. All rights in the Program not expressly granted
+under this Agreement are reserved. Nothing in this Agreement is intended
+to be enforceable by any entity that is not a Contributor or Recipient.
+No third-party beneficiary rights are created under this Agreement.
\ No newline at end of file
diff --git a/NOTICE.md b/NOTICE.md
new file mode 100644
index 0000000..f249680
--- /dev/null
+++ b/NOTICE.md
@@ -0,0 +1,545 @@
+# Notices for Eclipse openK User Modules
+
+This content is produced and maintained by the Eclipse openK User Modules
+project.
+
+* Project home:
+ https://projects.eclipse.org/projects/technology.openk-usermodules
+
+## Trademarks
+
+Eclipse openK User Modules is a trademark of the Eclipse Foundation.
+
+## Copyright
+
+All content is the property of the respective authors or their employers. For
+more information regarding authorship of content, please consult the listed
+source code repository logs.
+
+## Declared Project Licenses
+
+This program and the accompanying materials are made available under the terms
+of the Eclipse Public License v. 2.0 which is available at
+http://www.eclipse.org/legal/epl-2.0.
+
+SPDX-License-Identifier: EPL-2.0
+
+## Source Code
+
+The project maintains the following source code repositories:
+
+* http://git.eclipse.org/c/openk-usermodules/openk-usermodules.git
+* http://git.eclipse.org/c/openk-usermodules/org.eclipse.openk-usermodules.mics.centralService.git
+* http://git.eclipse.org/c/openk-usermodules/org.eclipse.openk-usermodules.mics.homeService.git
+* http://git.eclipse.org/c/openk-usermodules/org.eclipse.openk-usermodules.plannedGridMeasures.backend.git
+* http://git.eclipse.org/c/openk-usermodules/org.eclipse.openk-usermodules.plannedGridMeasures.frontend.git
+* http://git.eclipse.org/c/openk-usermodules/org.eclipse.openk-usermodules.standbyPlanning.backend.git
+* http://git.eclipse.org/c/openk-usermodules/org.eclipse.openk-usermodules.standbyPlanning.docu.git
+* http://git.eclipse.org/c/openk-usermodules/org.eclipse.openk-usermodules.standbyPlanning.frontend.git
+
+## Third-party Content
+
+This project leverages the following third party content.
+
+ag-grid (18.0.1)
+
+* License: MIT
+* Project: https://www.ag-grid.com/
+* Source: https://github.com/ag-grid/ag-grid
+
+ag-grid-angular (n/a)
+
+* License: MIT
+* Project: https://www.ag-grid.com/
+* Source: https://github.com/ag-grid/ag-grid-angular
+
+ajv (6.5.2)
+
+* License: MIT AND (BSD-3-Clause OR AFL-2.1)
+* Source: https://github.com/epoberezkin/ajv/releases/tag/v6.5.2
+
+angular animations (5.2.11)
+
+* License: MIT
+* Project: https://angular.io/guide/animations
+* Source: https://github.com/angular/angular/releases/tag/5.2.11
+
+angular animations (6.1.0)
+
+* License: Apache-2.0 AND MIT
+* Project: https://angular.io/guide/animations
+* Source: https://github.com/angular/angular/releases/tag/6.1.0
+
+angular calendar (0.23.7)
+
+* License: MIT
+* Source: https://github.com/mattlewis92/angular-calendar/releases/tag/v0.23.7
+
+angular common (5.2.11)
+
+* License: MIT
+* Source: https://github.com/angular/angular/releases/tag/5.2.11
+
+angular common (6.1.0)
+
+* License: Apache-2.0 AND MIT
+* Project: https://angular.io/api/common
+* Source: https://github.com/angular/angular/releases/tag/6.1.0
+
+angular compiler (5.2.11)
+
+* License: MIT
+* Source: https://github.com/angular/angular/releases/tag/5.2.11
+
+angular compiler (6.1.0)
+
+* License: Apache-2.0 AND MIT
+* Project: https://angular.io/
+* Source: https://github.com/angular/angular/releases/tag/6.1.0
+
+angular core (5.2.11)
+
+* License: MIT
+* Source: https://github.com/angular/angular/releases/tag/5.2.11
+
+angular core (6.1.0)
+
+* License: Apache-2.0 AND MIT
+* Project: https://angular.io/
+* Source: https://github.com/angular/angular/releases/tag/6.1.0
+
+angular forms (5.2.11)
+
+* License: MIT
+* Source: https://github.com/angular/angular/releases/tag/5.2.11
+
+angular forms (6.1.0)
+
+* License: Apache-2.0 AND MIT
+* Project: https://angular.io/
+* Source: https://github.com/angular/angular/releases/tag/6.1.0
+
+angular http (5.2.11)
+
+* License: MIT
+* Source: https://github.com/angular/angular/releases/tag/5.2.11
+
+angular http (6.1.0)
+
+* License: Apache-2.0 AND MIT
+* Project: https://angular.io/
+* Source: https://github.com/angular/angular/releases/tag/6.1.0
+
+angular jwt (1.0)
+
+* License: MIT
+* Source: https://github.com/auth0/angular2-jwt
+
+angular material2 (5.2.5)
+
+* License: MIT
+* Source: https://github.com/angular/material2/tree/5.2.5
+
+angular platform-browser (5.2.11)
+
+* License: MIT
+* Source: https://github.com/angular/angular/releases/tag/5.2.11
+
+angular platform-browser (6.1.0)
+
+* License: Apache-2.0 AND MIT
+* Project: https://angular.io/
+* Source: https://github.com/angular/angular/releases/tag/6.1.0
+
+angular platform-browser-dynamic (5.2.11)
+
+* License: MIT
+* Source: https://github.com/angular/angular/releases/tag/5.2.11
+
+angular platform-browser-dynamic (6.1.0)
+
+* License: Apache-2.0 AND MIT
+* Project: https://angular.io/
+* Source: https://github.com/angular/angular/releases/tag/6.1.0
+
+angular router (5.2.11)
+
+* License: MIT
+* Source: https://github.com/angular/angular/releases/tag/5.2.11
+
+angular router (6.1.0)
+
+* License: Apache-2.0 AND MIT
+* Project: https://angular.io/
+* Source: https://github.com/angular/angular/releases/tag/6.1.0
+
+angular2-uuid (1.1.1)
+
+* License: MIT
+
+Apache Commons Lang (2.6)
+
+* License: Apache License, 2.0
+
+Apache HttpClient (4.5.3)
+
+* License: Apache-2.0
+
+Apache HttpClient (4.5.3)
+
+* License: Apache-2.0
+
+Apache Log4j (1.2.17)
+
+* License: Apache License 2.0
+
+arc42 template (n/a)
+
+* License: MIT
+* Project: https://arc42.org/overview/
+* Source:
+ https://github.com/arc42/arc42-template/raw/master/dist/arc42-template-EN-plain-docx.zip
+
+auth0/angular-jwt (2.0.0)
+
+* License: MIT
+* Project: https://github.com/auth0/angular2-jwt
+* Source: https://github.com/auth0/angular2-jwt/releases/tag/2.0.0
+
+Bootstrap (3.3.7)
+
+* License: MIT
+
+bootstrap (4.1.1)
+
+* License: MIT
+* Project: https://getbootstrap.com/
+* Source: https://github.com/twbs/bootstrap
+
+bootstrap toggle (2.2.2)
+
+* License: MIT
+* Source: https://github.com/minhur/bootstrap-toggle/releases/tag/2.2.2
+
+camunda-engine-spring (7.9.0)
+
+* License: Apache-2.0
+* Project: https://github.com/camunda/camunda-bpm-platform
+* Source: https://github.com/camunda/
+
+cglib (3.1)
+
+* License: Apache License, 2.0, New BSD license
+
+classlist.js (1.1.20150312)
+
+* License: Unlicense
+
+classlist.js (1.1.20150312)
+
+* License: Unlicense
+
+com.google.code.gson : gson : (2.8.5)
+
+* License: Apache-2.0
+* Project: https://github.com/google/gson
+* Source: https://github.com/google/gson
+
+commons-codec (1.11)
+
+* License: Apache-2.0 AND BSD-3-Clause
+
+commons-codec:commons-codec (1.10)
+
+* License: Apache License, 2.0
+
+commons-io (2.5)
+
+* License: Apache License, 2.0
+
+commons-io:commons-io (2.6)
+
+* License: Apache-2.0
+
+core js (2.5.7)
+
+* License: BSD 3-Clause AND MIT
+* Source: https://github.com/zloirock/core-js/releases/tag/v2.5.7
+
+core-js (2.5.4)
+
+* License: MIT
+* Project: https://github.com/zloirock/core-js
+* Source: https://github.com/zloirock/core-js/releases/tag/v2.5.4
+
+core-js, (2.4.1)
+
+* License: MIT
+
+dozer V.5.5.1 (5.5.1)
+
+* License: Apache License, 2.0
+
+dropwizard (1.3.1)
+
+* License: Apache-2.0 AND MIT AND BSD-3-Clause
+* Source: https://github.com/dropwizard/dropwizard/tree/v1.3.1
+
+dropwizard.dropwizard-core (9.0.2)
+
+* License: Apache-2.0
+
+easymock (3.3.1)
+
+* License: Apache License, 2.0
+
+file-saver (1.3.8)
+
+* License: MIT
+* Source: https://github.com/eligrey/FileSaver.js/releases/tag/1.3.8
+
+font-awesome (4.7.0)
+
+* License: OFL-1.1 AND MIT
+
+font-awesome (4.7.0)
+
+* License: OFL-1.1 AND MIT
+
+gson (2.8.0)
+
+* License: Apache-2.0
+
+h2 Database (1.3.168)
+
+* License: Eclipse Public License
+
+HikariCP-java7 (2.4.13)
+
+* License: Apache-2.0
+* Project: http://brettwooldridge.github.io/HikariCP/
+* Source: https://github.com/brettwooldridge/HikariCP
+
+jackson-annotations (2.5.4)
+
+* License: Apache-2.0
+
+jackson-core (2.8.6)
+
+* License: Apache-2.0
+
+jackson-databind (2.8.6)
+
+
+jackson-dataformat-yaml (2.8.6)
+
+* License: Apache-2.0
+
+javax.mail (1.4.3)
+
+* License: (CDDL-1.0 OR GPL-2.0+ WITH Classpath-exception-2.0)
+
+javax.servlet-api (3.1.0)
+
+* License: Apache-2.0 AND (CDDL-1.1 or GPL-2.0)
+
+javax.servlet-api (3.1.0)
+
+* License: Apache-2.0 AND (CDDL-1.1 or GPL-2.0)
+
+jawa-jwt (3.2.0)
+
+* License: MIT
+
+jersey-bundles-jaxrs-ri (jaxrs-ri-2.22.1.jar) (2.22.1)
+
+* License: Common Development and Distribution License, Apache 2.0
+
+jersey-container-servlet-core (2.23.2)
+
+* License: Common Development and Distribution License 1.1
+
+jersey-media-json-jackson (2.23.2)
+
+* License: CDDL-1.1 OR GPL-2.0 With Classpath-exception-2.0
+
+jersey-spring3 (2.23.2)
+
+* License: CDDL-1.1 OR GPL-2.0 With Classpath-exception-2.0
+* Project:
+ https://mvnrepository.com/artifact/org.glassfish.jersey.ext/jersey-spring3
+* Source:
+ https://repo1.maven.org/maven2/org/glassfish/jersey/ext/jersey-spring3/2.23.2/
+
+jjwt (0.6.0)
+
+* License: Apache License, 2.0
+
+jQuery (3.3.1)
+
+* License: MIT
+
+JUnit (4.12)
+
+* License: Eclipse Public License
+
+mockito (1.9.5)
+
+* License: Apache License, 2.0, New BSD license, MIT license
+
+ng-bootstrap (2.2.0)
+
+* License: MIT
+* Project: https://ng-bootstrap.github.io/#/home
+* Source: https://github.com/ng-bootstrap/ng-bootstrap
+
+ng2 daterangepicker (2.0.12)
+
+* License: MIT
+* Project: https://www.npmjs.com/package/ng2-daterangepicker
+* Source:
+ https://github.com/evansmwendwa/ng2-daterangepicker/releases/tag/2.0.12
+
+ng2-tree-2.0.0-rc.11 (2.0.0)
+
+* License: MIT
+* Source: https://github.com/valor-software/ng2-tree/tree/v2.0.0-rc.11
+
+Popper (1.14.3)
+
+* License: MIT AND CC-BY-3.0 AND (MIT OR GPL-2.0) AND LicenseRef-Public-Domain
+* Project: https://popper.js.org/
+* Source: https://github.com/FezVrasta/popper.js/releases/tag/v1.14.3
+
+postgres.postgresql (9.1)
+
+* License: BSD-3-Clause AND License-Ref-Public-Domain
+
+powermock (1.7.3)
+
+* License: Apache-2.0 AND BSD-3-Clause AND MIT AND (GPL-2.0 OR GPL-2.0 With
+ Classpath-exception) AND LicenseRef-Public-Domain
+* Source: https://github.com/powermock/powermock/tree/powermock-1.7.3
+
+powermock-module-junit4-common (1.6.6)
+
+* License: Apache-2.0
+
+primeicons (1.0.0)
+
+* License: MIT
+* Project: https://www.primefaces.org/primeng/#/
+* Source: https://github.com/primefaces/primeicons
+
+primeng (6.0.0)
+
+* License: MIT
+* Project: https://www.primefaces.org/primeng/#/
+* Source: https://github.com/primefaces/primeng
+
+primeng (6.1.3)
+
+* License: MIT
+* Project: https://www.primefaces.org/primeng/#/
+* Source: https://github.com/primefaces/primeng
+
+RabbitMQ AMQP client (5.2.0)
+
+* License: MPL-2.0 OR GPL-2.0 OR Apache-2.0
+
+rxjs (5.5.11)
+
+* License: Apache-2.0
+* Source: https://github.com/ReactiveX/rxjs/releases/tag/5.5.11
+
+rxjs (6.2.2)
+
+* License: Apache-2.0
+* Project: https://github.com/Reactive-Extensions/RxJS
+* Source: https://github.com/Reactive-Extensions/RxJS
+
+slf4j-api (1.7.5)
+
+* License: MIT License + MIT License with no endorsement clause
+
+slf4j-log4j12 (1.7.25)
+
+* License: MIT
+
+Source Sans Pro (n/a)
+
+* License: OFL-1.1
+* Project:
+ http://www.adobe.com/products/type/font-information/source-sans-pro-readme.html
+
+spinKit (1.2.5)
+
+* License: MIT
+
+spring-data-jpa (1.9.1)
+
+* License: Apache License, 2.0
+
+spring-jdbc (4.3.17)
+
+* License: Apache-2.0
+* Project: https://spring.io/
+* Source:
+ http://central.maven.org/maven2/org/springframework/spring-jdbc/4.3.17.RELEASE/
+
+spring-test (4.3.17)
+
+* License: Apache-2.0 AND LicenseRef-Public-Domain
+* Project: https://spring.io/
+* Source:
+ http://central.maven.org/maven2/org/springframework/spring-test/3.2.17.RELEASE/
+
+spring-web (4.3.17)
+
+* License: Apache-2.0
+* Project: https://spring.io/
+* Source: https://github.com/spring-projects/spring-framework
+
+swagger-core (1.5.12)
+
+* License: Apache-2.0
+
+swagger-jersey2-jaxrs (1.5.12)
+
+* License: Apache-2.0
+
+urlrewritefilter (4.0.4)
+
+* License: BSD-3-Clause AND (Apache-2.0 OR LGPL-2.0 OR GPL-2.0)
+* Project: https://github.com/paultuckey/urlrewritefilter
+* Source: https://github.com/paultuckey/urlrewritefilter
+
+web-animations (2.3.1)
+
+* License: Apache-2.0 AND BSD-3-Clause AND MIT
+* Source: https://github.com/web-animations/web-animations-js
+
+web-animations-js (2.3.1)
+
+* License: Apache-2.0
+* Project: https://github.com/web-animations/web-animations-js
+* Source:
+ https://github.com/web-animations/web-animations-js/releases/tag/2.3.1
+
+zone.js (0.8.26)
+
+* License: MIT
+
+zone.js (0.8.26)
+
+* License: MIT
+* Source: https://github.com/angular/zone.js/releases/tag/v0.8.26
+
+## Cryptography
+
+Content may contain encryption software. The country in which you are currently
+may have restrictions on the import, possession, and use, and/or re-export to
+another country, of encryption software. BEFORE using any encryption software,
+please check the country's laws, regulations and policies concerning the import,
+possession, or use, and re-export of encryption software, to see if this is
+permitted.
\ No newline at end of file
diff --git a/backendSettings.json b/backendSettings.json
index 391d555..267442a 100644
--- a/backendSettings.json
+++ b/backendSettings.json
@@ -12,18 +12,22 @@
"appointmentRepetition": [
{
"id": 1,
+ "name": "einmalig"
+ },
+ {
+ "id": 2,
"name": "täglich"
},
{
- "id": 2,
+ "id": 3,
"name": "wöchentlich"
},
{
- "id": 3,
+ "id": 4,
"name": "monatlich"
},
{
- "id": 4,
+ "id": 5,
"name": "jährlich"
}
]
diff --git a/db/migrations/V0_10__CREATE_PLGM_DB.sql b/db/migrations/V0_10__CREATE_PLGM_DB.sql
index a1ac460..d512007 100644
--- a/db/migrations/V0_10__CREATE_PLGM_DB.sql
+++ b/db/migrations/V0_10__CREATE_PLGM_DB.sql
@@ -1,15 +1,17 @@
-/*
-**********
-********************************************************************
-* Copyright © 2018 PTA GmbH.
-* All rights reserved. This program and the accompanying materials
-* are made available under the terms of the Eclipse Public License v1.0
-* which accompanies this distribution, and is available at
-*
-* http://www.eclipse.org/legal/epl-v10.html
-*
-******************************************************************************
-*/
+-----------------------------------------------------------------------------------
+-- *******************************************************************************
+-- * Copyright (c) 2018 Contributors to the Eclipse Foundation
+-- *
+-- * See the NOTICE file(s) distributed with this work for additional
+-- * information regarding copyright ownership.
+-- *
+-- * This program and the accompanying materials are made available under the
+-- * terms of the Eclipse Public License v. 2.0 which is available at
+-- * http://www.eclipse.org/legal/epl-2.0.
+-- *
+-- * SPDX-License-Identifier: EPL-2.0
+-- *******************************************************************************
+-----------------------------------------------------------------------------------
--INSERT new Field color_code into TABLE REF_BRANCH
--UPDATE HREF_BRANCH,
--UPDATE REF_BRANCH INSERT TRIGGER, REF_BRANCH DELETE TRIGGER, REF_BRANCH UPDATE TRIGGER
diff --git a/db/migrations/V0_11__CREATE_PLGM_DB.sql b/db/migrations/V0_11__CREATE_PLGM_DB.sql
index d03efc6..ebf82e2 100644
--- a/db/migrations/V0_11__CREATE_PLGM_DB.sql
+++ b/db/migrations/V0_11__CREATE_PLGM_DB.sql
@@ -1,15 +1,17 @@
-/*
-**********
-********************************************************************
-* Copyright © 2018 PTA GmbH.
-* All rights reserved. This program and the accompanying materials
-* are made available under the terms of the Eclipse Public License v1.0
-* which accompanies this distribution, and is available at
-*
-* http://www.eclipse.org/legal/epl-v10.html
-*
-******************************************************************************
-*/
+-----------------------------------------------------------------------------------
+-- *******************************************************************************
+-- * Copyright (c) 2018 Contributors to the Eclipse Foundation
+-- *
+-- * See the NOTICE file(s) distributed with this work for additional
+-- * information regarding copyright ownership.
+-- *
+-- * This program and the accompanying materials are made available under the
+-- * terms of the Eclipse Public License v. 2.0 which is available at
+-- * http://www.eclipse.org/legal/epl-2.0.
+-- *
+-- * SPDX-License-Identifier: EPL-2.0
+-- *******************************************************************************
+-----------------------------------------------------------------------------------
--INSERT new TABLE REF_USER_SETTINGS inkl. INSERT-, UPDATE-, DELETE-TRIGGER
--INSERT new TABLE HREF_USER_SETTINGS
diff --git a/db/migrations/V0_12__CREATE_PLGM_DB.sql b/db/migrations/V0_12__CREATE_PLGM_DB.sql
index c3973ac..8809b45 100644
--- a/db/migrations/V0_12__CREATE_PLGM_DB.sql
+++ b/db/migrations/V0_12__CREATE_PLGM_DB.sql
@@ -1,15 +1,17 @@
-/*
-**********
-********************************************************************
-* Copyright © 2018 PTA GmbH.
-* All rights reserved. This program and the accompanying materials
-* are made available under the terms of the Eclipse Public License v1.0
-* which accompanies this distribution, and is available at
-*
-* http://www.eclipse.org/legal/epl-v10.html
-*
-******************************************************************************
-*/
+-----------------------------------------------------------------------------------
+-- *******************************************************************************
+-- * Copyright (c) 2018 Contributors to the Eclipse Foundation
+-- *
+-- * See the NOTICE file(s) distributed with this work for additional
+-- * information regarding copyright ownership.
+-- *
+-- * This program and the accompanying materials are made available under the
+-- * terms of the Eclipse Public License v. 2.0 which is available at
+-- * http://www.eclipse.org/legal/epl-2.0.
+-- *
+-- * SPDX-License-Identifier: EPL-2.0
+-- *******************************************************************************
+-----------------------------------------------------------------------------------
--INSERT new Foreign-key Constraints into Table TBL_GRIDMEASURES
--(ref_cost_center, ref_branch, ref_branch_level)
diff --git a/db/migrations/V0_13__CREATE_PLGM_DB.sql b/db/migrations/V0_13__CREATE_PLGM_DB.sql
index 6e7a3d8..5544bfd 100644
--- a/db/migrations/V0_13__CREATE_PLGM_DB.sql
+++ b/db/migrations/V0_13__CREATE_PLGM_DB.sql
@@ -1,15 +1,17 @@
-/*
-**********
-********************************************************************
-* Copyright © 2018 PTA GmbH.
-* All rights reserved. This program and the accompanying materials
-* are made available under the terms of the Eclipse Public License v1.0
-* which accompanies this distribution, and is available at
-*
-* http://www.eclipse.org/legal/epl-v10.html
-*
-******************************************************************************
-*/
+-----------------------------------------------------------------------------------
+-- *******************************************************************************
+-- * Copyright (c) 2018 Contributors to the Eclipse Foundation
+-- *
+-- * See the NOTICE file(s) distributed with this work for additional
+-- * information regarding copyright ownership.
+-- *
+-- * This program and the accompanying materials are made available under the
+-- * terms of the Eclipse Public License v. 2.0 which is available at
+-- * http://www.eclipse.org/legal/epl-2.0.
+-- *
+-- * SPDX-License-Identifier: EPL-2.0
+-- *******************************************************************************
+-----------------------------------------------------------------------------------
--Change field value in REF_USER_SETTINGS to a maximum size of 4096 characters
--Change field value in HREF_USER_SETTINGS to a maximum size of 4096 characters
diff --git a/db/migrations/V0_14__CREATE_PLGM_DB.sql b/db/migrations/V0_14__CREATE_PLGM_DB.sql
index 547ffe9..747f9dd 100644
--- a/db/migrations/V0_14__CREATE_PLGM_DB.sql
+++ b/db/migrations/V0_14__CREATE_PLGM_DB.sql
@@ -1,15 +1,17 @@
-/*
-**********
-********************************************************************
-* Copyright © 2018 PTA GmbH.
-* All rights reserved. This program and the accompanying materials
-* are made available under the terms of the Eclipse Public License v1.0
-* which accompanies this distribution, and is available at
-*
-* http://www.eclipse.org/legal/epl-v10.html
-*
-******************************************************************************
-*/
+-----------------------------------------------------------------------------------
+-- *******************************************************************************
+-- * Copyright (c) 2018 Contributors to the Eclipse Foundation
+-- *
+-- * See the NOTICE file(s) distributed with this work for additional
+-- * information regarding copyright ownership.
+-- *
+-- * This program and the accompanying materials are made available under the
+-- * terms of the Eclipse Public License v. 2.0 which is available at
+-- * http://www.eclipse.org/legal/epl-2.0.
+-- *
+-- * SPDX-License-Identifier: EPL-2.0
+-- *******************************************************************************
+-----------------------------------------------------------------------------------
--Change field value in REF_USER_SETTINGS to a maximum size of 4096 characters
--Change field value in HREF_USER_SETTINGS to a maximum size of 4096 characters
diff --git a/db/migrations/V0_15__CREATE_PLGM_DB.sql b/db/migrations/V0_15__CREATE_PLGM_DB.sql
index 8da55ef..a00eb8c 100644
--- a/db/migrations/V0_15__CREATE_PLGM_DB.sql
+++ b/db/migrations/V0_15__CREATE_PLGM_DB.sql
@@ -1,15 +1,17 @@
-/*
-**********
-********************************************************************
-* Copyright © 2018 PTA GmbH.
-* All rights reserved. This program and the accompanying materials
-* are made available under the terms of the Eclipse Public License v1.0
-* which accompanies this distribution, and is available at
-*
-* http://www.eclipse.org/legal/epl-v10.html
-*
-******************************************************************************
-*/
+-----------------------------------------------------------------------------------
+-- *******************************************************************************
+-- * Copyright (c) 2018 Contributors to the Eclipse Foundation
+-- *
+-- * See the NOTICE file(s) distributed with this work for additional
+-- * information regarding copyright ownership.
+-- *
+-- * This program and the accompanying materials are made available under the
+-- * terms of the Eclipse Public License v. 2.0 which is available at
+-- * http://www.eclipse.org/legal/epl-2.0.
+-- *
+-- * SPDX-License-Identifier: EPL-2.0
+-- *******************************************************************************
+-----------------------------------------------------------------------------------
--Change field value in REF_USER_SETTINGS to a maximum size of 4096 characters
--Change field value in HREF_USER_SETTINGS to a maximum size of 4096 characters
diff --git a/db/migrations/V0_16__CREATE_PLGM_DB.sql b/db/migrations/V0_16__CREATE_PLGM_DB.sql
index 88105cb..d99b3c3 100644
--- a/db/migrations/V0_16__CREATE_PLGM_DB.sql
+++ b/db/migrations/V0_16__CREATE_PLGM_DB.sql
@@ -1,15 +1,17 @@
-/*
-**********
-********************************************************************
-* Copyright © 2018 PTA GmbH.
-* All rights reserved. This program and the accompanying materials
-* are made available under the terms of the Eclipse Public License v1.0
-* which accompanies this distribution, and is available at
-*
-* http://www.eclipse.org/legal/epl-v10.html
-*
-******************************************************************************
-*/
+-----------------------------------------------------------------------------------
+-- *******************************************************************************
+-- * Copyright (c) 2018 Contributors to the Eclipse Foundation
+-- *
+-- * See the NOTICE file(s) distributed with this work for additional
+-- * information regarding copyright ownership.
+-- *
+-- * This program and the accompanying materials are made available under the
+-- * terms of the Eclipse Public License v. 2.0 which is available at
+-- * http://www.eclipse.org/legal/epl-2.0.
+-- *
+-- * SPDX-License-Identifier: EPL-2.0
+-- *******************************************************************************
+-----------------------------------------------------------------------------------
--Table REF_USER_SETTINGS and all dependent items renamed to TBL_USER_SETTINGS
-- ---------------------------------------------
diff --git a/db/migrations/V0_17__CREATE_PLGM_DB.sql b/db/migrations/V0_17__CREATE_PLGM_DB.sql
index ff8e61b..0116d7d 100644
--- a/db/migrations/V0_17__CREATE_PLGM_DB.sql
+++ b/db/migrations/V0_17__CREATE_PLGM_DB.sql
@@ -1,15 +1,17 @@
-/*
-**********
-********************************************************************
-* Copyright © 2018 PTA GmbH.
-* All rights reserved. This program and the accompanying materials
-* are made available under the terms of the Eclipse Public License v1.0
-* which accompanies this distribution, and is available at
-*
-* http://www.eclipse.org/legal/epl-v10.html
-*
-******************************************************************************
-*/
+-----------------------------------------------------------------------------------
+-- *******************************************************************************
+-- * Copyright (c) 2018 Contributors to the Eclipse Foundation
+-- *
+-- * See the NOTICE file(s) distributed with this work for additional
+-- * information regarding copyright ownership.
+-- *
+-- * This program and the accompanying materials are made available under the
+-- * terms of the Eclipse Public License v. 2.0 which is available at
+-- * http://www.eclipse.org/legal/epl-2.0.
+-- *
+-- * SPDX-License-Identifier: EPL-2.0
+-- *******************************************************************************
+-----------------------------------------------------------------------------------
--Foreign Key Field FK_REF_COST_CENTER in table TBL_GRIDMEASURES, HTBL_GRIDMEASURES set to String.
--Delete Foreign Key Constraint fk_gridmeasure__cost_center
diff --git a/db/migrations/V0_18__CREATE_PLGM_DB.sql b/db/migrations/V0_18__CREATE_PLGM_DB.sql
index 25af019..bd007bd 100644
--- a/db/migrations/V0_18__CREATE_PLGM_DB.sql
+++ b/db/migrations/V0_18__CREATE_PLGM_DB.sql
@@ -1,15 +1,17 @@
-/*
-**********
-********************************************************************
-* Copyright © 2018 PTA GmbH.
-* All rights reserved. This program and the accompanying materials
-* are made available under the terms of the Eclipse Public License v1.0
-* which accompanies this distribution, and is available at
-*
-* http://www.eclipse.org/legal/epl-v10.html
-*
-******************************************************************************
-*/
+-----------------------------------------------------------------------------------
+-- *******************************************************************************
+-- * Copyright (c) 2018 Contributors to the Eclipse Foundation
+-- *
+-- * See the NOTICE file(s) distributed with this work for additional
+-- * information regarding copyright ownership.
+-- *
+-- * This program and the accompanying materials are made available under the
+-- * terms of the Eclipse Public License v. 2.0 which is available at
+-- * http://www.eclipse.org/legal/epl-2.0.
+-- *
+-- * SPDX-License-Identifier: EPL-2.0
+-- *******************************************************************************
+-----------------------------------------------------------------------------------
--DROP TABLE for REF_USER_SETTINGS added
-- ---------------------------------------------
diff --git a/db/migrations/V0_19__CREATE_PLGM_DB.sql b/db/migrations/V0_19__CREATE_PLGM_DB.sql
index 3a94fd7..3de9eac 100644
--- a/db/migrations/V0_19__CREATE_PLGM_DB.sql
+++ b/db/migrations/V0_19__CREATE_PLGM_DB.sql
@@ -1,15 +1,17 @@
-/*
-**********
-********************************************************************
-* Copyright © 2018 PTA GmbH.
-* All rights reserved. This program and the accompanying materials
-* are made available under the terms of the Eclipse Public License v1.0
-* which accompanies this distribution, and is available at
-*
-* http://www.eclipse.org/legal/epl-v10.html
-*
-******************************************************************************
-*/
+-----------------------------------------------------------------------------------
+-- *******************************************************************************
+-- * Copyright (c) 2018 Contributors to the Eclipse Foundation
+-- *
+-- * See the NOTICE file(s) distributed with this work for additional
+-- * information regarding copyright ownership.
+-- *
+-- * This program and the accompanying materials are made available under the
+-- * terms of the Eclipse Public License v. 2.0 which is available at
+-- * http://www.eclipse.org/legal/epl-2.0.
+-- *
+-- * SPDX-License-Identifier: EPL-2.0
+-- *******************************************************************************
+-----------------------------------------------------------------------------------
--DROP TABLE for TBL_USER_SETTINGS added
--DROP SEQUENCE for TTBL_USER_SETTINGS_ID_SEQ added
diff --git a/db/migrations/V0_20__CREATE_PLGM_DB.sql b/db/migrations/V0_20__CREATE_PLGM_DB.sql
index 8352b84..5d5a38a 100644
--- a/db/migrations/V0_20__CREATE_PLGM_DB.sql
+++ b/db/migrations/V0_20__CREATE_PLGM_DB.sql
@@ -1,15 +1,17 @@
-/*
-**********
-********************************************************************
-* Copyright © 2018 PTA GmbH.
-* All rights reserved. This program and the accompanying materials
-* are made available under the terms of the Eclipse Public License v1.0
-* which accompanies this distribution, and is available at
-*
-* http://www.eclipse.org/legal/epl-v10.html
-*
-******************************************************************************
-*/
+-----------------------------------------------------------------------------------
+-- *******************************************************************************
+-- * Copyright (c) 2018 Contributors to the Eclipse Foundation
+-- *
+-- * See the NOTICE file(s) distributed with this work for additional
+-- * information regarding copyright ownership.
+-- *
+-- * This program and the accompanying materials are made available under the
+-- * terms of the Eclipse Public License v. 2.0 which is available at
+-- * http://www.eclipse.org/legal/epl-2.0.
+-- *
+-- * SPDX-License-Identifier: EPL-2.0
+-- *******************************************************************************
+-----------------------------------------------------------------------------------
--Data added to TBL_GRIDMEASURE
-- ---------------------------------------------
diff --git a/db/migrations/V0_21__CREATE_PLGM_DB.sql b/db/migrations/V0_21__CREATE_PLGM_DB.sql
index ff39751..b1c5924 100644
--- a/db/migrations/V0_21__CREATE_PLGM_DB.sql
+++ b/db/migrations/V0_21__CREATE_PLGM_DB.sql
@@ -1,15 +1,17 @@
-/*
-**********
-********************************************************************
-* Copyright © 2018 PTA GmbH.
-* All rights reserved. This program and the accompanying materials
-* are made available under the terms of the Eclipse Public License v1.0
-* which accompanies this distribution, and is available at
-*
-* http://www.eclipse.org/legal/epl-v10.html
-*
-******************************************************************************
-*/
+-----------------------------------------------------------------------------------
+-- *******************************************************************************
+-- * Copyright (c) 2018 Contributors to the Eclipse Foundation
+-- *
+-- * See the NOTICE file(s) distributed with this work for additional
+-- * information regarding copyright ownership.
+-- *
+-- * This program and the accompanying materials are made available under the
+-- * terms of the Eclipse Public License v. 2.0 which is available at
+-- * http://www.eclipse.org/legal/epl-2.0.
+-- *
+-- * SPDX-License-Identifier: EPL-2.0
+-- *******************************************************************************
+-----------------------------------------------------------------------------------
--Table TBL_LOCK added, table HTBL_LOCK added incl. Triggers
-- ---------------------------------------------
diff --git a/db/migrations/V0_22__CREATE_PLGM_DB.sql b/db/migrations/V0_22__CREATE_PLGM_DB.sql
index 8458e7e..3029d99 100644
--- a/db/migrations/V0_22__CREATE_PLGM_DB.sql
+++ b/db/migrations/V0_22__CREATE_PLGM_DB.sql
@@ -1,15 +1,17 @@
-/*
-**********
-********************************************************************
-* Copyright © 2018 PTA GmbH.
-* All rights reserved. This program and the accompanying materials
-* are made available under the terms of the Eclipse Public License v1.0
-* which accompanies this distribution, and is available at
-*
-* http://www.eclipse.org/legal/epl-v10.html
-*
-******************************************************************************
-*/
+-----------------------------------------------------------------------------------
+-- *******************************************************************************
+-- * Copyright (c) 2018 Contributors to the Eclipse Foundation
+-- *
+-- * See the NOTICE file(s) distributed with this work for additional
+-- * information regarding copyright ownership.
+-- *
+-- * This program and the accompanying materials are made available under the
+-- * terms of the Eclipse Public License v. 2.0 which is available at
+-- * http://www.eclipse.org/legal/epl-2.0.
+-- *
+-- * SPDX-License-Identifier: EPL-2.0
+-- *******************************************************************************
+-----------------------------------------------------------------------------------
--Table TBL_LOCK added, table HTBL_LOCK added incl. Triggers
-- ---------------------------------------------
diff --git a/db/migrations/V0_23__CREATE_PLGM_DB.sql b/db/migrations/V0_23__CREATE_PLGM_DB.sql
index 6fa5538..edb8ccb 100644
--- a/db/migrations/V0_23__CREATE_PLGM_DB.sql
+++ b/db/migrations/V0_23__CREATE_PLGM_DB.sql
@@ -1,15 +1,17 @@
-/*
-**********
-********************************************************************
-* Copyright © 2018 PTA GmbH.
-* All rights reserved. This program and the accompanying materials
-* are made available under the terms of the Eclipse Public License v1.0
-* which accompanies this distribution, and is available at
-*
-* http://www.eclipse.org/legal/epl-v10.html
-*
-******************************************************************************
-*/
+-----------------------------------------------------------------------------------
+-- *******************************************************************************
+-- * Copyright (c) 2018 Contributors to the Eclipse Foundation
+-- *
+-- * See the NOTICE file(s) distributed with this work for additional
+-- * information regarding copyright ownership.
+-- *
+-- * This program and the accompanying materials are made available under the
+-- * terms of the Eclipse Public License v. 2.0 which is available at
+-- * http://www.eclipse.org/legal/epl-2.0.
+-- *
+-- * SPDX-License-Identifier: EPL-2.0
+-- *******************************************************************************
+-----------------------------------------------------------------------------------
--Table TBL_LOCK added, table HTBL_LOCK added incl. Triggers
-- ---------------------------------------------
diff --git a/db/migrations/V0_24__CREATE_PLGM_DB.sql b/db/migrations/V0_24__CREATE_PLGM_DB.sql
index 5a09d6a..a00461d 100644
--- a/db/migrations/V0_24__CREATE_PLGM_DB.sql
+++ b/db/migrations/V0_24__CREATE_PLGM_DB.sql
@@ -1,15 +1,17 @@
-/*
-**********
-********************************************************************
-* Copyright © 2018 PTA GmbH.
-* All rights reserved. This program and the accompanying materials
-* are made available under the terms of the Eclipse Public License v1.0
-* which accompanies this distribution, and is available at
-*
-* http://www.eclipse.org/legal/epl-v10.html
-*
-******************************************************************************
-*/
+-----------------------------------------------------------------------------------
+-- *******************************************************************************
+-- * Copyright (c) 2018 Contributors to the Eclipse Foundation
+-- *
+-- * See the NOTICE file(s) distributed with this work for additional
+-- * information regarding copyright ownership.
+-- *
+-- * This program and the accompanying materials are made available under the
+-- * terms of the Eclipse Public License v. 2.0 which is available at
+-- * http://www.eclipse.org/legal/epl-2.0.
+-- *
+-- * SPDX-License-Identifier: EPL-2.0
+-- *******************************************************************************
+-----------------------------------------------------------------------------------
--Table TBL_LOCK added, table HTBL_LOCK added incl. Triggers
-- ---------------------------------------------
diff --git a/db/migrations/V0_25__CREATE_PLGM_DB.sql b/db/migrations/V0_25__CREATE_PLGM_DB.sql
index ec7df19..67e3a14 100644
--- a/db/migrations/V0_25__CREATE_PLGM_DB.sql
+++ b/db/migrations/V0_25__CREATE_PLGM_DB.sql
@@ -1,15 +1,17 @@
-/*
-**********
-********************************************************************
-* Copyright © 2018 PTA GmbH.
-* All rights reserved. This program and the accompanying materials
-* are made available under the terms of the Eclipse Public License v1.0
-* which accompanies this distribution, and is available at
-*
-* http://www.eclipse.org/legal/epl-v10.html
-*
-******************************************************************************
-*/
+-----------------------------------------------------------------------------------
+-- *******************************************************************************
+-- * Copyright (c) 2018 Contributors to the Eclipse Foundation
+-- *
+-- * See the NOTICE file(s) distributed with this work for additional
+-- * information regarding copyright ownership.
+-- *
+-- * This program and the accompanying materials are made available under the
+-- * terms of the Eclipse Public License v. 2.0 which is available at
+-- * http://www.eclipse.org/legal/epl-2.0.
+-- *
+-- * SPDX-License-Identifier: EPL-2.0
+-- *******************************************************************************
+-----------------------------------------------------------------------------------
--Table TBL_LOCK added, table HTBL_LOCK added incl. Triggers
-- ---------------------------------------------
diff --git a/db/migrations/V0_26__CREATE_PLGM_DB.sql b/db/migrations/V0_26__CREATE_PLGM_DB.sql
index 3f3408f..3b1c0d2 100644
--- a/db/migrations/V0_26__CREATE_PLGM_DB.sql
+++ b/db/migrations/V0_26__CREATE_PLGM_DB.sql
@@ -1,15 +1,17 @@
-/*
-**********
-********************************************************************
-* Copyright © 2018 PTA GmbH.
-* All rights reserved. This program and the accompanying materials
-* are made available under the terms of the Eclipse Public License v1.0
-* which accompanies this distribution, and is available at
-*
-* http://www.eclipse.org/legal/epl-v10.html
-*
-******************************************************************************
-*/
+-----------------------------------------------------------------------------------
+-- *******************************************************************************
+-- * Copyright (c) 2018 Contributors to the Eclipse Foundation
+-- *
+-- * See the NOTICE file(s) distributed with this work for additional
+-- * information regarding copyright ownership.
+-- *
+-- * This program and the accompanying materials are made available under the
+-- * terms of the Eclipse Public License v. 2.0 which is available at
+-- * http://www.eclipse.org/legal/epl-2.0.
+-- *
+-- * SPDX-License-Identifier: EPL-2.0
+-- *******************************************************************************
+-----------------------------------------------------------------------------------
--Table TBL_LOCK added, table HTBL_LOCK added incl. Triggers
-- ---------------------------------------------
diff --git a/db/migrations/V0_27__CREATE_PLGM_DB.sql b/db/migrations/V0_27__CREATE_PLGM_DB.sql
index 2f940f0..c9cfb39 100644
--- a/db/migrations/V0_27__CREATE_PLGM_DB.sql
+++ b/db/migrations/V0_27__CREATE_PLGM_DB.sql
@@ -1,15 +1,17 @@
-/*
-**********
-********************************************************************
-* Copyright © 2018 PTA GmbH.
-* All rights reserved. This program and the accompanying materials
-* are made available under the terms of the Eclipse Public License v1.0
-* which accompanies this distribution, and is available at
-*
-* http://www.eclipse.org/legal/epl-v10.html
-*
-******************************************************************************
-*/
+-----------------------------------------------------------------------------------
+-- *******************************************************************************
+-- * Copyright (c) 2018 Contributors to the Eclipse Foundation
+-- *
+-- * See the NOTICE file(s) distributed with this work for additional
+-- * information regarding copyright ownership.
+-- *
+-- * This program and the accompanying materials are made available under the
+-- * terms of the Eclipse Public License v. 2.0 which is available at
+-- * http://www.eclipse.org/legal/epl-2.0.
+-- *
+-- * SPDX-License-Identifier: EPL-2.0
+-- *******************************************************************************
+-----------------------------------------------------------------------------------
--Table TBL_LOCK added, table HTBL_LOCK added incl. Triggers
-- ---------------------------------------------
diff --git a/db/migrations/V0_28__CREATE_PLGM_DB.sql b/db/migrations/V0_28__CREATE_PLGM_DB.sql
index 27ed3af..5f0e39e 100644
--- a/db/migrations/V0_28__CREATE_PLGM_DB.sql
+++ b/db/migrations/V0_28__CREATE_PLGM_DB.sql
@@ -1,15 +1,17 @@
-/*
-**********
-********************************************************************
-* Copyright © 2018 PTA GmbH.
-* All rights reserved. This program and the accompanying materials
-* are made available under the terms of the Eclipse Public License v1.0
-* which accompanies this distribution, and is available at
-*
-* http://www.eclipse.org/legal/epl-v10.html
-*
-******************************************************************************
-*/
+-----------------------------------------------------------------------------------
+-- *******************************************************************************
+-- * Copyright (c) 2018 Contributors to the Eclipse Foundation
+-- *
+-- * See the NOTICE file(s) distributed with this work for additional
+-- * information regarding copyright ownership.
+-- *
+-- * This program and the accompanying materials are made available under the
+-- * terms of the Eclipse Public License v. 2.0 which is available at
+-- * http://www.eclipse.org/legal/epl-2.0.
+-- *
+-- * SPDX-License-Identifier: EPL-2.0
+-- *******************************************************************************
+-----------------------------------------------------------------------------------
--Table TBL_LOCK added, table HTBL_LOCK added incl. Triggers
-- ---------------------------------------------
diff --git a/db/migrations/V0_29__CREATE_PLGM_DB.sql b/db/migrations/V0_29__CREATE_PLGM_DB.sql
index dec77e3..9c71f39 100644
--- a/db/migrations/V0_29__CREATE_PLGM_DB.sql
+++ b/db/migrations/V0_29__CREATE_PLGM_DB.sql
@@ -1,15 +1,17 @@
-/*
-**********
-********************************************************************
-* Copyright © 2018 PTA GmbH.
-* All rights reserved. This program and the accompanying materials
-* are made available under the terms of the Eclipse Public License v1.0
-* which accompanies this distribution, and is available at
-*
-* http://www.eclipse.org/legal/epl-v10.html
-*
-******************************************************************************
-*/
+-----------------------------------------------------------------------------------
+-- *******************************************************************************
+-- * Copyright (c) 2018 Contributors to the Eclipse Foundation
+-- *
+-- * See the NOTICE file(s) distributed with this work for additional
+-- * information regarding copyright ownership.
+-- *
+-- * This program and the accompanying materials are made available under the
+-- * terms of the Eclipse Public License v. 2.0 which is available at
+-- * http://www.eclipse.org/legal/epl-2.0.
+-- *
+-- * SPDX-License-Identifier: EPL-2.0
+-- *******************************************************************************
+-----------------------------------------------------------------------------------
--Table TBL_LOCK added, table HTBL_LOCK added incl. Triggers
-- ---------------------------------------------
diff --git a/db/migrations/V0_30__CREATE_PLGM_DB.sql b/db/migrations/V0_30__CREATE_PLGM_DB.sql
index f65806b..6a66046 100644
--- a/db/migrations/V0_30__CREATE_PLGM_DB.sql
+++ b/db/migrations/V0_30__CREATE_PLGM_DB.sql
@@ -1,15 +1,17 @@
-/*
-**********
-********************************************************************
-* Copyright © 2018 PTA GmbH.
-* All rights reserved. This program and the accompanying materials
-* are made available under the terms of the Eclipse Public License v1.0
-* which accompanies this distribution, and is available at
-*
-* http://www.eclipse.org/legal/epl-v10.html
-*
-******************************************************************************
-*/
+-----------------------------------------------------------------------------------
+-- *******************************************************************************
+-- * Copyright (c) 2018 Contributors to the Eclipse Foundation
+-- *
+-- * See the NOTICE file(s) distributed with this work for additional
+-- * information regarding copyright ownership.
+-- *
+-- * This program and the accompanying materials are made available under the
+-- * terms of the Eclipse Public License v. 2.0 which is available at
+-- * http://www.eclipse.org/legal/epl-2.0.
+-- *
+-- * SPDX-License-Identifier: EPL-2.0
+-- *******************************************************************************
+-----------------------------------------------------------------------------------
--Table TBL_LOCK added, table HTBL_LOCK added incl. Triggers
-- ---------------------------------------------
diff --git a/db/migrations/V0_31__CREATE_PLGM_DB.sql b/db/migrations/V0_31__CREATE_PLGM_DB.sql
index a6baf40..ad80d99 100644
--- a/db/migrations/V0_31__CREATE_PLGM_DB.sql
+++ b/db/migrations/V0_31__CREATE_PLGM_DB.sql
@@ -1,15 +1,17 @@
-/*
-**********
-********************************************************************
-* Copyright © 2018 PTA GmbH.
-* All rights reserved. This program and the accompanying materials
-* are made available under the terms of the Eclipse Public License v1.0
-* which accompanies this distribution, and is available at
-*
-* http://www.eclipse.org/legal/epl-v10.html
-*
-******************************************************************************
-*/
+-----------------------------------------------------------------------------------
+-- *******************************************************************************
+-- * Copyright (c) 2018 Contributors to the Eclipse Foundation
+-- *
+-- * See the NOTICE file(s) distributed with this work for additional
+-- * information regarding copyright ownership.
+-- *
+-- * This program and the accompanying materials are made available under the
+-- * terms of the Eclipse Public License v. 2.0 which is available at
+-- * http://www.eclipse.org/legal/epl-2.0.
+-- *
+-- * SPDX-License-Identifier: EPL-2.0
+-- *******************************************************************************
+-----------------------------------------------------------------------------------
--Table TBL_LOCK added, table HTBL_LOCK added incl. Triggers
-- ---------------------------------------------
diff --git a/db/migrations/V0_32__CREATE_PLGM_DB.sql b/db/migrations/V0_32__CREATE_PLGM_DB.sql
index 0497d72..7ff1c1e 100644
--- a/db/migrations/V0_32__CREATE_PLGM_DB.sql
+++ b/db/migrations/V0_32__CREATE_PLGM_DB.sql
@@ -1,15 +1,17 @@
-/*
-**********
-********************************************************************
-* Copyright © 2018 PTA GmbH.
-* All rights reserved. This program and the accompanying materials
-* are made available under the terms of the Eclipse Public License v1.0
-* which accompanies this distribution, and is available at
-*
-* http://www.eclipse.org/legal/epl-v10.html
-*
-******************************************************************************
-*/
+-----------------------------------------------------------------------------------
+-- *******************************************************************************
+-- * Copyright (c) 2018 Contributors to the Eclipse Foundation
+-- *
+-- * See the NOTICE file(s) distributed with this work for additional
+-- * information regarding copyright ownership.
+-- *
+-- * This program and the accompanying materials are made available under the
+-- * terms of the Eclipse Public License v. 2.0 which is available at
+-- * http://www.eclipse.org/legal/epl-2.0.
+-- *
+-- * SPDX-License-Identifier: EPL-2.0
+-- *******************************************************************************
+-----------------------------------------------------------------------------------
--Table TBL_LOCK added, table HTBL_LOCK added incl. Triggers
-- ---------------------------------------------
diff --git a/db/migrations/V0_33__CREATE_PLGM_DB.sql b/db/migrations/V0_33__CREATE_PLGM_DB.sql
index ac99837..6e0c734 100644
--- a/db/migrations/V0_33__CREATE_PLGM_DB.sql
+++ b/db/migrations/V0_33__CREATE_PLGM_DB.sql
@@ -1,15 +1,17 @@
-/*
-**********
-********************************************************************
-* Copyright © 2018 PTA GmbH.
-* All rights reserved. This program and the accompanying materials
-* are made available under the terms of the Eclipse Public License v1.0
-* which accompanies this distribution, and is available at
-*
-* http://www.eclipse.org/legal/epl-v10.html
-*
-******************************************************************************
-*/
+-----------------------------------------------------------------------------------
+-- *******************************************************************************
+-- * Copyright (c) 2018 Contributors to the Eclipse Foundation
+-- *
+-- * See the NOTICE file(s) distributed with this work for additional
+-- * information regarding copyright ownership.
+-- *
+-- * This program and the accompanying materials are made available under the
+-- * terms of the Eclipse Public License v. 2.0 which is available at
+-- * http://www.eclipse.org/legal/epl-2.0.
+-- *
+-- * SPDX-License-Identifier: EPL-2.0
+-- *******************************************************************************
+-----------------------------------------------------------------------------------
--Table TBL_LOCK added, table HTBL_LOCK added incl. Triggers
-- ---------------------------------------------
diff --git a/db/migrations/V0_34__CREATE_PLGM_DB.sql b/db/migrations/V0_34__CREATE_PLGM_DB.sql
index cf4902b..0ef6d73 100644
--- a/db/migrations/V0_34__CREATE_PLGM_DB.sql
+++ b/db/migrations/V0_34__CREATE_PLGM_DB.sql
@@ -1,15 +1,17 @@
-/*
-**********
-********************************************************************
-* Copyright © 2018 PTA GmbH.
-* All rights reserved. This program and the accompanying materials
-* are made available under the terms of the Eclipse Public License v1.0
-* which accompanies this distribution, and is available at
-*
-* http://www.eclipse.org/legal/epl-v10.html
-*
-******************************************************************************
-*/
+-----------------------------------------------------------------------------------
+-- *******************************************************************************
+-- * Copyright (c) 2018 Contributors to the Eclipse Foundation
+-- *
+-- * See the NOTICE file(s) distributed with this work for additional
+-- * information regarding copyright ownership.
+-- *
+-- * This program and the accompanying materials are made available under the
+-- * terms of the Eclipse Public License v. 2.0 which is available at
+-- * http://www.eclipse.org/legal/epl-2.0.
+-- *
+-- * SPDX-License-Identifier: EPL-2.0
+-- *******************************************************************************
+-----------------------------------------------------------------------------------
--Table TBL_LOCK added, table HTBL_LOCK added incl. Triggers
-- ---------------------------------------------
diff --git a/db/migrations/V0_35__CREATE_PLGM_DB.sql b/db/migrations/V0_35__CREATE_PLGM_DB.sql
index 136f71b..6f5671f 100644
--- a/db/migrations/V0_35__CREATE_PLGM_DB.sql
+++ b/db/migrations/V0_35__CREATE_PLGM_DB.sql
@@ -1,15 +1,17 @@
-/*
-**********
-********************************************************************
-* Copyright © 2018 PTA GmbH.
-* All rights reserved. This program and the accompanying materials
-* are made available under the terms of the Eclipse Public License v1.0
-* which accompanies this distribution, and is available at
-*
-* http://www.eclipse.org/legal/epl-v10.html
-*
-******************************************************************************
-*/
+-----------------------------------------------------------------------------------
+-- *******************************************************************************
+-- * Copyright (c) 2018 Contributors to the Eclipse Foundation
+-- *
+-- * See the NOTICE file(s) distributed with this work for additional
+-- * information regarding copyright ownership.
+-- *
+-- * This program and the accompanying materials are made available under the
+-- * terms of the Eclipse Public License v. 2.0 which is available at
+-- * http://www.eclipse.org/legal/epl-2.0.
+-- *
+-- * SPDX-License-Identifier: EPL-2.0
+-- *******************************************************************************
+-----------------------------------------------------------------------------------
--Table TBL_LOCK added, table HTBL_LOCK added incl. Triggers
-- ---------------------------------------------
diff --git a/db/migrations/V0_36__CREATE_PLGM_DB.sql b/db/migrations/V0_36__CREATE_PLGM_DB.sql
index f6e33f0..f560f3a 100644
--- a/db/migrations/V0_36__CREATE_PLGM_DB.sql
+++ b/db/migrations/V0_36__CREATE_PLGM_DB.sql
@@ -1,16 +1,18 @@
-/*
-**********
-********************************************************************
-* Copyright © 2018 PTA GmbH.
-* All rights reserved. This program and the accompanying materials
-* are made available under the terms of the Eclipse Public License v1.0
-* which accompanies this distribution, and is available at
-*
-* http://www.eclipse.org/legal/epl-v10.html
-*
-******************************************************************************
-*/
---Table TBL_LOCK added, table HTBL_LOCK added incl. Triggers
+
+--Table TBL_LOCK added, table HTBL_LOCK added incl. Triggers-----------------------------------------------------------------------------------
+-- *******************************************************************************
+-- * Copyright (c) 2018 Contributors to the Eclipse Foundation
+-- *
+-- * See the NOTICE file(s) distributed with this work for additional
+-- * information regarding copyright ownership.
+-- *
+-- * This program and the accompanying materials are made available under the
+-- * terms of the Eclipse Public License v. 2.0 which is available at
+-- * http://www.eclipse.org/legal/epl-2.0.
+-- *
+-- * SPDX-License-Identifier: EPL-2.0
+-- *******************************************************************************
+-----------------------------------------------------------------------------------
-- ---------------------------------------------
-- DROPS
diff --git a/db/migrations/V0_37__CREATE_PLGM_DB.sql b/db/migrations/V0_37__CREATE_PLGM_DB.sql
index 6ca69e1..048a253 100644
--- a/db/migrations/V0_37__CREATE_PLGM_DB.sql
+++ b/db/migrations/V0_37__CREATE_PLGM_DB.sql
@@ -1,15 +1,17 @@
-/*
-**********
-********************************************************************
-* Copyright © 2018 PTA GmbH.
-* All rights reserved. This program and the accompanying materials
-* are made available under the terms of the Eclipse Public License v1.0
-* which accompanies this distribution, and is available at
-*
-* http://www.eclipse.org/legal/epl-v10.html
-*
-******************************************************************************
-*/
+-----------------------------------------------------------------------------------
+-- *******************************************************************************
+-- * Copyright (c) 2018 Contributors to the Eclipse Foundation
+-- *
+-- * See the NOTICE file(s) distributed with this work for additional
+-- * information regarding copyright ownership.
+-- *
+-- * This program and the accompanying materials are made available under the
+-- * terms of the Eclipse Public License v. 2.0 which is available at
+-- * http://www.eclipse.org/legal/epl-2.0.
+-- *
+-- * SPDX-License-Identifier: EPL-2.0
+-- *******************************************************************************
+-----------------------------------------------------------------------------------
--Table TBL_LOCK added, table HTBL_LOCK added incl. Triggers
-- ---------------------------------------------
diff --git a/db/migrations/V0_38__CREATE_PLGM_DB.sql b/db/migrations/V0_38__CREATE_PLGM_DB.sql
index cde134c..48449c5 100644
--- a/db/migrations/V0_38__CREATE_PLGM_DB.sql
+++ b/db/migrations/V0_38__CREATE_PLGM_DB.sql
@@ -1,15 +1,17 @@
-/*
-**********
-********************************************************************
-* Copyright © 2018 PTA GmbH.
-* All rights reserved. This program and the accompanying materials
-* are made available under the terms of the Eclipse Public License v1.0
-* which accompanies this distribution, and is available at
-*
-* http://www.eclipse.org/legal/epl-v10.html
-*
-******************************************************************************
-*/
+-----------------------------------------------------------------------------------
+-- *******************************************************************************
+-- * Copyright (c) 2018 Contributors to the Eclipse Foundation
+-- *
+-- * See the NOTICE file(s) distributed with this work for additional
+-- * information regarding copyright ownership.
+-- *
+-- * This program and the accompanying materials are made available under the
+-- * terms of the Eclipse Public License v. 2.0 which is available at
+-- * http://www.eclipse.org/legal/epl-2.0.
+-- *
+-- * SPDX-License-Identifier: EPL-2.0
+-- *******************************************************************************
+-----------------------------------------------------------------------------------
--Index HUSER_INDEX added
-- ---------------------------------------------
diff --git a/db/migrations/V0_39__CREATE_PLGM_DB.sql b/db/migrations/V0_39__CREATE_PLGM_DB.sql
index b26ffcf..c7ac9fd 100644
--- a/db/migrations/V0_39__CREATE_PLGM_DB.sql
+++ b/db/migrations/V0_39__CREATE_PLGM_DB.sql
@@ -1,15 +1,17 @@
-/*
-**********
-********************************************************************
-* Copyright © 2018 PTA GmbH.
-* All rights reserved. This program and the accompanying materials
-* are made available under the terms of the Eclipse Public License v1.0
-* which accompanies this distribution, and is available at
-*
-* http://www.eclipse.org/legal/epl-v10.html
-*
-******************************************************************************
-*/
+-----------------------------------------------------------------------------------
+-- *******************************************************************************
+-- * Copyright (c) 2018 Contributors to the Eclipse Foundation
+-- *
+-- * See the NOTICE file(s) distributed with this work for additional
+-- * information regarding copyright ownership.
+-- *
+-- * This program and the accompanying materials are made available under the
+-- * terms of the Eclipse Public License v. 2.0 which is available at
+-- * http://www.eclipse.org/legal/epl-2.0.
+-- *
+-- * SPDX-License-Identifier: EPL-2.0
+-- *******************************************************************************
+-----------------------------------------------------------------------------------
--Index HUSER_INDEX added
-- ---------------------------------------------
diff --git a/db/migrations/V0_3__CREATE_PLGM_DB.sql b/db/migrations/V0_3__CREATE_PLGM_DB.sql
index 8c3c5c4..d45f183 100644
--- a/db/migrations/V0_3__CREATE_PLGM_DB.sql
+++ b/db/migrations/V0_3__CREATE_PLGM_DB.sql
@@ -1,14 +1,17 @@
-/*
-******************************************************************************
-* Copyright © 2018 PTA GmbH.
-* All rights reserved. This program and the accompanying materials
-* are made available under the terms of the Eclipse Public License v1.0
-* which accompanies this distribution, and is available at
-*
-* http://www.eclipse.org/legal/epl-v10.html
-*
-******************************************************************************
-*/
+-----------------------------------------------------------------------------------
+-- *******************************************************************************
+-- * Copyright (c) 2018 Contributors to the Eclipse Foundation
+-- *
+-- * See the NOTICE file(s) distributed with this work for additional
+-- * information regarding copyright ownership.
+-- *
+-- * This program and the accompanying materials are made available under the
+-- * terms of the Eclipse Public License v. 2.0 which is available at
+-- * http://www.eclipse.org/legal/epl-2.0.
+-- *
+-- * SPDX-License-Identifier: EPL-2.0
+-- *******************************************************************************
+-----------------------------------------------------------------------------------
--CREATE ROLE PLGM_SERVICE LOGIN
--NOSUPERUSER INHERIT NOCREATEDB NOCREATEROLE NOREPLICATION;
--ALTER ROLE PLGM_SERVICE with password 'plgm_service';
diff --git a/db/migrations/V0_40__CREATE_PLGM_DB.sql b/db/migrations/V0_40__CREATE_PLGM_DB.sql
index 8024d50..370cf74 100644
--- a/db/migrations/V0_40__CREATE_PLGM_DB.sql
+++ b/db/migrations/V0_40__CREATE_PLGM_DB.sql
@@ -1,15 +1,17 @@
-/*
-**********
-********************************************************************
-* Copyright © 2018 PTA GmbH.
-* All rights reserved. This program and the accompanying materials
-* are made available under the terms of the Eclipse Public License v1.0
-* which accompanies this distribution, and is available at
-*
-* http://www.eclipse.org/legal/epl-v10.html
-*
-******************************************************************************
-*/
+-----------------------------------------------------------------------------------
+-- *******************************************************************************
+-- * Copyright (c) 2018 Contributors to the Eclipse Foundation
+-- *
+-- * See the NOTICE file(s) distributed with this work for additional
+-- * information regarding copyright ownership.
+-- *
+-- * This program and the accompanying materials are made available under the
+-- * terms of the Eclipse Public License v. 2.0 which is available at
+-- * http://www.eclipse.org/legal/epl-2.0.
+-- *
+-- * SPDX-License-Identifier: EPL-2.0
+-- *******************************************************************************
+-----------------------------------------------------------------------------------
--Index HUSER_INDEX added
-- ---------------------------------------------
diff --git a/db/migrations/V0_41__CREATE_PLGM_DB.sql b/db/migrations/V0_41__CREATE_PLGM_DB.sql
index bbe4c5e..0b84eb9 100644
--- a/db/migrations/V0_41__CREATE_PLGM_DB.sql
+++ b/db/migrations/V0_41__CREATE_PLGM_DB.sql
@@ -1,15 +1,17 @@
-/*
-**********
-********************************************************************
-* Copyright © 2018 PTA GmbH.
-* All rights reserved. This program and the accompanying materials
-* are made available under the terms of the Eclipse Public License v1.0
-* which accompanies this distribution, and is available at
-*
-* http://www.eclipse.org/legal/epl-v10.html
-*
-******************************************************************************
-*/
+-----------------------------------------------------------------------------------
+-- *******************************************************************************
+-- * Copyright (c) 2018 Contributors to the Eclipse Foundation
+-- *
+-- * See the NOTICE file(s) distributed with this work for additional
+-- * information regarding copyright ownership.
+-- *
+-- * This program and the accompanying materials are made available under the
+-- * terms of the Eclipse Public License v. 2.0 which is available at
+-- * http://www.eclipse.org/legal/epl-2.0.
+-- *
+-- * SPDX-License-Identifier: EPL-2.0
+-- *******************************************************************************
+-----------------------------------------------------------------------------------
--Index HUSER_INDEX added
-- ---------------------------------------------
diff --git a/db/migrations/V0_42__CREATE_PLGM_DB.sql b/db/migrations/V0_42__CREATE_PLGM_DB.sql
new file mode 100644
index 0000000..9717758
--- /dev/null
+++ b/db/migrations/V0_42__CREATE_PLGM_DB.sql
@@ -0,0 +1,3666 @@
+-----------------------------------------------------------------------------------
+-- *******************************************************************************
+-- * Copyright (c) 2018 Contributors to the Eclipse Foundation
+-- *
+-- * See the NOTICE file(s) distributed with this work for additional
+-- * information regarding copyright ownership.
+-- *
+-- * This program and the accompanying materials are made available under the
+-- * terms of the Eclipse Public License v. 2.0 which is available at
+-- * http://www.eclipse.org/legal/epl-2.0.
+-- *
+-- * SPDX-License-Identifier: EPL-2.0
+-- *******************************************************************************
+-----------------------------------------------------------------------------------
+--Field COLOR_CODE added in Table REF_GM_STATUS, HREF_GM_STATUS, Insert-, Delete-, and Update-Triggers
+
+-- ---------------------------------------------
+-- DROPS
+-- ---------------------------------------------
+DROP TABLE IF EXISTS public.TBL_STEPS;
+DROP SEQUENCE IF EXISTS public.TBL_STEPS_ID_SEQ;
+
+DROP TABLE IF EXISTS public.TBL_SINGLE_GRIDMEASURE;
+DROP SEQUENCE IF EXISTS public.TBL_SINGLE_GRIDMEASURE_ID_SEQ;
+
+DROP TABLE IF EXISTS public.TBL_LOCK CASCADE;
+DROP SEQUENCE IF EXISTS public.TBL_LOCK_ID_SEQ;
+
+DROP TABLE IF EXISTS public.REF_USER_SETTINGS CASCADE;
+DROP SEQUENCE IF EXISTS public.REF_USER_SETTINGS_ID_SEQ;
+
+DROP TABLE IF EXISTS public.TBL_USER_SETTINGS CASCADE;
+DROP SEQUENCE IF EXISTS public.TBL_USER_SETTINGS_ID_SEQ;
+
+DROP TABLE IF EXISTS public.REF_USER_DEPARTMENT CASCADE;
+DROP SEQUENCE IF EXISTS public.REF_USER_DEPARTMENT_ID_SEQ;
+
+DROP TABLE IF EXISTS public.REF_COST_CENTER CASCADE;
+DROP SEQUENCE IF EXISTS public.REF_COST_CENTER_ID_SEQ;
+
+DROP TABLE IF EXISTS public.TBL_GRIDMEASURE CASCADE;
+DROP SEQUENCE IF EXISTS public.TBL_GRIDMEASURE_ID_SEQ;
+
+DROP TABLE IF EXISTS public.REF_BRANCH CASCADE;
+DROP SEQUENCE IF EXISTS public.REF_BRANCH_ID_SEQ;
+
+DROP TABLE IF EXISTS public.REF_BRANCH_LEVEL CASCADE;
+DROP SEQUENCE IF EXISTS public.REF_BRANCH_LEVEL_ID_SEQ;
+
+DROP TABLE IF EXISTS public.REF_GM_STATUS CASCADE;
+DROP SEQUENCE IF EXISTS public.REF_GM_STATUS_ID_SEQ;
+
+DROP TABLE IF EXISTS public.tbl_documents CASCADE;
+DROP SEQUENCE IF EXISTS public.tbl_documents_id_seq;
+
+DROP TABLE IF EXISTS public.tbl_measure_documents CASCADE;
+DROP SEQUENCE IF EXISTS public.tbl_measure_documents_id_seq;
+
+DROP TABLE IF EXISTS public.tbl_id_counter CASCADE;
+DROP SEQUENCE IF EXISTS public.tbl_id_counter_id_seq;
+
+DROP TABLE IF EXISTS public.REF_TERRITORY CASCADE;
+DROP SEQUENCE IF EXISTS public.REF_TERRITORY_ID_SEQ;
+
+
+DROP INDEX IF EXISTS public.huser_index;
+
+-- ---------------------------------------------
+-- TABLE REF_TERRITORY
+-- ---------------------------------------------
+
+CREATE SEQUENCE public.REF_TERRITORY_ID_SEQ
+ INCREMENT 1
+ MINVALUE 1
+ MAXVALUE 9223372036854775807
+ START 1
+ CACHE 1;
+ALTER TABLE public.REF_TERRITORY_ID_SEQ
+ OWNER TO plgm_service;
+
+
+CREATE TABLE public.REF_TERRITORY
+(
+ id integer NOT NULL DEFAULT nextval('REF_TERRITORY_ID_SEQ'::regclass),
+ name character varying(50) NOT NULL,
+ description character varying(255),
+ create_user character varying(100) NOT NULL,
+ create_date timestamp without time zone NOT NULL,
+ mod_user character varying(100),
+ mod_date timestamp without time zone,
+ CONSTRAINT REF_TERRITORY_pkey PRIMARY KEY (id)
+)
+WITH (
+ OIDS=FALSE
+);
+ALTER TABLE public.REF_TERRITORY
+ OWNER TO plgm_service;
+GRANT ALL ON TABLE public.REF_TERRITORY TO plgm_service;
+
+INSERT INTO public.REF_TERRITORY(
+ name, description, create_user, create_date, mod_user, mod_date)
+ VALUES ('Nord', 'Region Nord', 'testuser','12.04.2018','testuser','12.04.2018');
+INSERT INTO public.REF_TERRITORY(
+ name, description, create_user, create_date, mod_user, mod_date)
+ VALUES ('Ost', 'Region Ost', 'testuser','12.04.2018','testuser','12.04.2018');
+INSERT INTO public.REF_TERRITORY(
+ name, description, create_user, create_date, mod_user, mod_date)
+ VALUES ('SUED', 'Region SUED', 'testuser','12.04.2018','testuser','12.04.2018');
+
+
+
+-- ---------------------------------------------
+-- TABLE TBL_LOCK
+-- ---------------------------------------------
+
+CREATE SEQUENCE public.TBL_LOCK_ID_SEQ
+ INCREMENT 1
+ MINVALUE 1
+ MAXVALUE 9223372036854775807
+ START 1
+ CACHE 1;
+ALTER TABLE public.TBL_LOCK_ID_SEQ
+ OWNER TO plgm_service;
+
+CREATE TABLE public.tbl_lock
+(
+ id integer NOT NULL DEFAULT nextval('TBL_LOCK_ID_SEQ'::regclass),
+ key integer NOT NULL, -- Id from tbl_gridmeasure
+ username character varying(50) NOT NULL,
+ info character varying(256),
+ create_user character varying(100) NOT NULL,
+ create_date timestamp without time zone NOT NULL,
+ mod_user character varying(100),
+ mod_date timestamp without time zone,
+ CONSTRAINT tbl_lock_pkey PRIMARY KEY (id)
+)
+WITH (
+ OIDS=FALSE
+);
+ALTER TABLE public.tbl_lock
+ OWNER TO plgm_service;
+GRANT ALL ON TABLE public.tbl_lock TO plgm_service;
+
+CREATE UNIQUE INDEX tbl_lock_unique_key ON public.tbl_lock (key ASC, info ASC );
+
+-- ---------------------------------------------
+-- TABLE TBL_USER_SETTINGS
+-- ---------------------------------------------
+
+CREATE SEQUENCE public.tbl_user_settings_id_seq
+ INCREMENT 1
+ MINVALUE 1
+ MAXVALUE 9223372036854775807
+ START 1
+ CACHE 1;
+ALTER TABLE public.tbl_user_settings_id_seq
+ OWNER TO plgm_service;
+
+CREATE TABLE public.tbl_user_settings
+(
+ id integer NOT NULL DEFAULT nextval('tbl_user_settings_id_seq'::regclass),
+ username character varying(50) NOT NULL,
+ setting_type character varying(50),
+ value character varying(4096),
+ create_user character varying(100) NOT NULL,
+ create_date timestamp without time zone NOT NULL,
+ mod_user character varying(100),
+ mod_date timestamp without time zone,
+ CONSTRAINT tbl_user_settings_pkey PRIMARY KEY (id)
+)
+WITH (
+ OIDS=FALSE
+);
+ALTER TABLE public.tbl_user_settings
+ OWNER TO plgm_service;
+GRANT ALL ON TABLE public.tbl_user_settings TO plgm_service;
+
+CREATE UNIQUE INDEX tbl_user_set_unique_key ON public.tbl_user_settings (username ASC, setting_type ASC );
+
+
+
+-- ---------------------------------------------
+-- TABLE TBL_ID_COUNTER
+-- ---------------------------------------------
+
+CREATE SEQUENCE public.tbl_id_counter_id_seq
+ INCREMENT 1
+ MINVALUE 1
+ MAXVALUE 9223372036854775807
+ START 1
+ CACHE 1;
+ALTER TABLE public.tbl_id_counter_id_seq
+ OWNER TO plgm_service;
+
+CREATE TABLE public.tbl_id_counter
+(
+ id integer NOT NULL DEFAULT nextval('tbl_id_counter_id_seq'::regclass),
+ counter integer NOT NULL,
+ counter_type character varying(256),
+ info character varying(256),
+ create_user character varying(100) NOT NULL,
+ create_date timestamp without time zone NOT NULL,
+ mod_user character varying(100),
+ mod_date timestamp without time zone,
+ CONSTRAINT tbl_id_counter_pkey PRIMARY KEY (id)
+)
+WITH (
+ OIDS=FALSE
+);
+ALTER TABLE public.tbl_id_counter
+ OWNER TO plgm_service;
+GRANT ALL ON TABLE public.tbl_id_counter TO plgm_service;
+
+
+-- ---------------------------------------------
+-- TABLE REF_USER_DEPARTMENT
+-- ---------------------------------------------
+
+CREATE SEQUENCE public.REF_USER_DEPARTMENT_ID_SEQ
+ INCREMENT 1
+ MINVALUE 1
+ MAXVALUE 9223372036854775807
+ START 3
+ CACHE 1;
+ALTER TABLE public.REF_USER_DEPARTMENT_ID_SEQ
+ OWNER TO plgm_service;
+
+
+CREATE TABLE public.REF_USER_DEPARTMENT
+(
+ id integer NOT NULL DEFAULT nextval('REF_USER_DEPARTMENT_ID_SEQ'::regclass),
+ name character varying(50) NOT NULL,
+ create_user character varying(100) NOT NULL,
+ create_date timestamp without time zone NOT NULL,
+ mod_user character varying(100),
+ mod_date timestamp without time zone,
+ CONSTRAINT ref_user_department_pkey PRIMARY KEY (id)
+)
+WITH (
+ OIDS=FALSE
+);
+ALTER TABLE public.REF_USER_DEPARTMENT
+ OWNER TO plgm_service;
+GRANT ALL ON TABLE public.REF_USER_DEPARTMENT TO plgm_service;
+
+
+INSERT INTO public.ref_user_department(
+ name, create_user, create_date, mod_user, mod_date)
+ VALUES ('Schnelle Truppe', 'testuser', '12.04.2018','testuser', '12.04.2018');
+INSERT INTO public.ref_user_department(
+ name, create_user, create_date, mod_user, mod_date)
+ VALUES ('Abt. Aufsicht', 'testuser', '12.04.2018','testuser', '12.04.2018');
+INSERT INTO public.ref_user_department(
+ name, create_user, create_date, mod_user, mod_date)
+ VALUES ('Abt. Wartung', 'testuser', '12.04.2018','testuser', '12.04.2018');
+
+-- ---------------------------------------------
+-- TABLE REF_COST_CENTER
+-- ---------------------------------------------
+
+CREATE SEQUENCE public.REF_COST_CENTER_ID_SEQ
+ INCREMENT 1
+ MINVALUE 1
+ MAXVALUE 9223372036854775807
+ START 1
+ CACHE 1;
+ALTER TABLE public.REF_COST_CENTER_ID_SEQ
+ OWNER TO plgm_service;
+
+
+CREATE TABLE public.REF_COST_CENTER
+(
+ id integer NOT NULL DEFAULT nextval('REF_COST_CENTER_id_seq'::regclass),
+ name character varying(50) NOT NULL,
+ description character varying(255),
+ create_user character varying(100) NOT NULL,
+ create_date timestamp without time zone NOT NULL,
+ mod_user character varying(100),
+ mod_date timestamp without time zone,
+ CONSTRAINT REF_COST_CENTER_pkey PRIMARY KEY (id)
+)
+WITH (
+ OIDS=FALSE
+);
+ALTER TABLE public.REF_COST_CENTER
+ OWNER TO plgm_service;
+GRANT ALL ON TABLE public.REF_COST_CENTER TO plgm_service;
+
+INSERT INTO public.ref_cost_center(
+ name, description, create_user, create_date, mod_user, mod_date)
+ VALUES ('K-155', 'Kostenstelle der Abteilung abc', 'testuser','12.04.2018','testuser','12.04.2018');
+INSERT INTO public.ref_cost_center(
+ name, description, create_user, create_date, mod_user, mod_date)
+ VALUES ('K-004', 'Kostenstelle der Abteilung xyz', 'testuser','12.04.2018','testuser','12.04.2018');
+INSERT INTO public.ref_cost_center(
+ name, description, create_user, create_date, mod_user, mod_date)
+ VALUES ('K-222', 'Kostenstelle der Abteilung hij', 'testuser','12.04.2018','testuser','12.04.2018');
+
+-- ---------------------------------------------
+-- TABLE REF_BRANCH
+-- ---------------------------------------------
+CREATE SEQUENCE public.REF_BRANCH_ID_SEQ
+ INCREMENT 1
+ MINVALUE 1
+ MAXVALUE 9223372036854775807
+ START 1
+ CACHE 1;
+
+ALTER TABLE public.REF_BRANCH_ID_SEQ
+ OWNER TO PLGM_SERVICE;
+
+CREATE TABLE public.REF_BRANCH
+(
+ ID integer NOT NULL DEFAULT nextval('REF_BRANCH_ID_SEQ'::regclass),
+ NAME character varying(50) NOT NULL,
+ DESCRIPTION character varying(255),
+ COLOR_CODE character varying(20),
+ CREATE_USER character varying(100) NOT NULL,
+ CREATE_DATE timestamp without time zone NOT NULL,
+ MOD_USER character varying(100),
+ MOD_DATE timestamp without time zone,
+ CONSTRAINT REF_BRANCH_PKEY PRIMARY KEY (id)
+)
+WITH (
+ OIDS=FALSE
+);
+
+ALTER TABLE public.REF_BRANCH
+ OWNER TO PLGM_SERVICE;
+GRANT ALL ON TABLE public.REF_BRANCH TO PLGM_SERVICE;
+
+INSERT INTO public.ref_branch(name, description, color_code, create_user, create_date, mod_user, mod_date)
+ VALUES ('S', 'Strom', '#fc6042','testuser', '12.04.2018', 'testuser', '12.04.2018');
+INSERT INTO public.ref_branch(name, description, color_code, create_user, create_date, mod_user, mod_date)
+ VALUES ('G', 'Gas', '#fdea64', 'testuser', '12.04.2018', 'testuser', '12.04.2018');
+INSERT INTO public.ref_branch(name, description, color_code, create_user, create_date, mod_user, mod_date)
+ VALUES ('F', 'Fernwärme', '#2cc990', 'testuser', '12.04.2018', 'testuser', '12.04.2018');
+INSERT INTO public.ref_branch(name, description, color_code, create_user, create_date, mod_user, mod_date)
+ VALUES ('W', 'Wasser', '#2c82c9', 'testuser', '12.04.2018', 'testuser', '12.04.2018');
+-- ---------------------------------------------
+-- TABLE REF_BRANCH_LEVEL
+-- ---------------------------------------------
+CREATE SEQUENCE public.ref_branch_level_id_seq
+ INCREMENT 1
+ MINVALUE 1
+ MAXVALUE 9223372036854775807
+ START 1
+ CACHE 1;
+ALTER TABLE public.ref_branch_level_id_seq
+ OWNER TO plgm_service;
+
+CREATE TABLE public.ref_branch_level
+(
+ id integer NOT NULL DEFAULT nextval('ref_branch_level_id_seq'::regclass),
+ name character varying(50) NOT NULL,
+ description character varying(255),
+ fk_ref_branch integer NULL,
+ create_user character varying(100) NOT NULL,
+ create_date timestamp without time zone NOT NULL,
+ mod_user character varying(100),
+ mod_date timestamp without time zone,
+ CONSTRAINT ref_branch_level_pkey PRIMARY KEY (id),
+ CONSTRAINT FK_REF_BRANCH_LEVEL__REF_BRANCH FOREIGN KEY (FK_REF_BRANCH)
+ REFERENCES public.REF_BRANCH (ID) MATCH SIMPLE
+ ON UPDATE NO ACTION ON DELETE NO ACTION
+)
+WITH (
+ OIDS=FALSE
+);
+ALTER TABLE public.ref_branch_level
+ OWNER TO plgm_service;
+GRANT ALL ON TABLE public.ref_branch_level TO plgm_service;
+
+INSERT INTO public.REF_BRANCH_LEVEL(
+ name, description, fk_ref_branch, create_user, create_date, mod_user, mod_date)
+ VALUES ('Strom Level1', 'eine Beschreibung', 1, 'testuser', '12.04.2018', 'testuser', '12.04.2018');
+INSERT INTO public.REF_BRANCH_LEVEL(
+ name, description, fk_ref_branch, create_user, create_date, mod_user, mod_date)
+ VALUES ('Strom Level2', 'eine Beschreibung', 1, 'testuser', '12.04.2018', 'testuser', '12.04.2018');
+INSERT INTO public.REF_BRANCH_LEVEL(
+ name, description, fk_ref_branch, create_user, create_date, mod_user, mod_date)
+ VALUES ('Strom Level3', 'eine Beschreibung', 1, 'testuser', '12.04.2018', 'testuser', '12.04.2018');
+INSERT INTO public.REF_BRANCH_LEVEL(
+ name, description, fk_ref_branch, create_user, create_date, mod_user, mod_date)
+ VALUES ('Gas Level1', 'eine Beschreibung', 2, 'testuser', '12.04.2018', 'testuser', '12.04.2018');
+INSERT INTO public.REF_BRANCH_LEVEL(
+ name, description, fk_ref_branch, create_user, create_date, mod_user, mod_date)
+ VALUES ('Gas Level2', 'noch eine Beschreibung', 2, 'testuser', '12.04.2018', 'testuser', '12.04.2018');
+INSERT INTO public.REF_BRANCH_LEVEL(
+ name, description, fk_ref_branch, create_user, create_date, mod_user, mod_date)
+ VALUES ('Fernwärme Level3', 'und noch eine Beschreibung', 3, 'testuser', '12.04.2018', 'testuser', '12.04.2018');
+
+-- ---------------------------------------------
+-- TABLE REF_GM_STATUS
+-- ---------------------------------------------
+CREATE SEQUENCE public.REF_GM_STATUS_ID_SEQ
+ INCREMENT 1
+ MINVALUE 1
+ MAXVALUE 9223372036854775807
+ START 1
+ CACHE 1;
+
+ALTER TABLE public.REF_GM_STATUS_ID_SEQ
+ OWNER TO PLGM_SERVICE;
+
+CREATE TABLE public.REF_GM_STATUS
+(
+ ID integer NOT NULL DEFAULT nextval('REF_GM_STATUS_ID_SEQ'::regclass),
+ NAME character varying(50) NOT NULL,
+ COLOR_CODE character varying(20),
+ CREATE_USER character varying(100) NOT NULL,
+ CREATE_DATE timestamp without time zone NOT NULL,
+ MOD_USER character varying(100),
+ MOD_DATE timestamp without time zone,
+ CONSTRAINT REF_GM_STATUS_PKEY PRIMARY KEY (id)
+)
+WITH (
+ OIDS=FALSE
+);
+
+ALTER TABLE public.REF_GM_STATUS
+ OWNER TO PLGM_SERVICE;
+GRANT ALL ON TABLE public.REF_GM_STATUS TO PLGM_SERVICE;
+
+INSERT INTO
+ public.REF_GM_STATUS(id, name, create_user, create_date, mod_user, mod_date)
+VALUES
+ (0,'Neu','system','09.04.2018','system','09.04.2018');
+INSERT INTO
+ public.REF_GM_STATUS(id, name, create_user, create_date, mod_user, mod_date)
+VALUES
+ (1,'Beantragt','system','09.04.2018','system','09.04.2018');
+INSERT INTO
+ public.REF_GM_STATUS(id, name, create_user, create_date, mod_user, mod_date)
+VALUES
+ (2,'Storniert','system','09.04.2018','system','09.04.2018');
+INSERT INTO
+ public.REF_GM_STATUS(id, name, create_user, create_date, mod_user, mod_date)
+VALUES
+ (3,'Zur Genehmigung','system','09.04.2018','system','09.04.2018');
+INSERT INTO
+ public.REF_GM_STATUS(id, name, create_user, create_date, mod_user, mod_date)
+VALUES
+ (4,'Genehmigt','system','09.04.2018','system','09.04.2018');
+INSERT INTO
+ public.REF_GM_STATUS(id, name, create_user, create_date, mod_user, mod_date)
+VALUES
+ (5,'Angefordert','system','09.04.2018','system','09.04.2018');
+INSERT INTO
+ public.REF_GM_STATUS(id, name, create_user, create_date, mod_user, mod_date)
+VALUES
+ (6,'Freigegeben','system','09.04.2018','system','09.04.2018');
+INSERT INTO
+ public.REF_GM_STATUS(id, name, create_user, create_date, mod_user, mod_date)
+VALUES
+ (7,'Schalten aktiv','system','09.04.2018','system','09.04.2018');
+INSERT INTO
+ public.REF_GM_STATUS(id, name, create_user, create_date, mod_user, mod_date)
+VALUES
+ (8,'In Arbeit','system','09.04.2018','system','09.04.2018');
+INSERT INTO
+ public.REF_GM_STATUS(id, name, create_user, create_date, mod_user, mod_date)
+VALUES
+ (9,'Arbeit beendet','system','09.04.2018','system','09.04.2018');
+INSERT INTO
+ public.REF_GM_STATUS(id, name, create_user, create_date, mod_user, mod_date)
+VALUES
+ (10,'Maßnahme beendet','system','09.04.2018','system','09.04.2018');
+INSERT INTO
+ public.REF_GM_STATUS(id, name, create_user, create_date, mod_user, mod_date)
+VALUES
+ (11,'Geschlossen','system','09.04.2018','system','09.04.2018');
+INSERT INTO
+ public.REF_GM_STATUS(id, name, create_user, create_date, mod_user, mod_date)
+VALUES
+ (12,'Abgelehnt','system','17.06.2018','system','17.06.2018');
+
+
+
+-- ---------------------------------------------
+-- TABLE TBL_GRIDMEASURE
+-- ---------------------------------------------
+-- REQUESTER_NAME COLUMN DELETED--
+CREATE SEQUENCE public.TBL_GRIDMEASURE_ID_SEQ
+ INCREMENT 1
+ MINVALUE 1
+ MAXVALUE 9223372036854775807
+ START 1
+ CACHE 1;
+
+ALTER TABLE public.TBL_GRIDMEASURE_ID_SEQ
+ OWNER TO PLGM_SERVICE;
+
+CREATE TABLE public.tbl_gridmeasure
+(
+ id integer NOT NULL DEFAULT nextval('tbl_gridmeasure_id_seq'::regclass),
+ id_descriptive character varying(50),
+ title character varying(256),
+ affected_resource character varying(256),
+ remark character varying(1024),
+ email_addresses character varying(1024),
+ fk_ref_gm_status integer,
+ switching_object character varying(256),
+ cost_center character varying(50),
+ approval_by character varying(256),
+ area_of_switching character varying(256),
+ appointment_repetition character varying(100),
+ appointment_startdate timestamp without time zone,
+ appointment_numberof integer,
+ planned_starttime_first_sequence timestamp without time zone,
+ planned_starttime_first_singlemeasure timestamp without time zone,
+ planned_endtime_last_singlemeasure timestamp without time zone,
+ planned_endtime_gridmeasure timestamp without time zone,
+ starttime_first_sequence timestamp without time zone,
+ starttime_first_singlemeasure timestamp without time zone,
+ endtime_last_singlemeasure timestamp without time zone,
+ endtime_gridmeasure timestamp without time zone,
+ time_of_reallocation character varying(100),
+ description character varying(1024),
+ fk_ref_branch integer,
+ fk_ref_branch_level integer,
+ create_user character varying(100) NOT NULL,
+ create_user_department character varying(100),
+ create_date timestamp without time zone NOT NULL,
+ mod_user character varying(100),
+ mod_user_department character varying(100),
+ mod_date timestamp without time zone,
+ CONSTRAINT tbl_gridmeasure_pkey PRIMARY KEY (id),
+ CONSTRAINT fk_gridmeasure__gm_status FOREIGN KEY (fk_ref_gm_status)
+ REFERENCES public.ref_gm_status (id) MATCH SIMPLE
+ ON UPDATE NO ACTION ON DELETE NO ACTION,
+ CONSTRAINT fk_gridmeasure__branch FOREIGN KEY (fk_ref_branch)
+ REFERENCES public.ref_branch (id) MATCH SIMPLE
+ ON UPDATE NO ACTION ON DELETE NO ACTION,
+ CONSTRAINT fk_gridmeasure__branch_level FOREIGN KEY (fk_ref_branch_level)
+ REFERENCES public.ref_branch_level (id) MATCH SIMPLE
+ ON UPDATE NO ACTION ON DELETE NO ACTION
+)
+WITH (
+ OIDS=FALSE
+);
+ALTER TABLE public.tbl_gridmeasure
+ OWNER TO plgm_service;
+GRANT ALL ON TABLE public.tbl_gridmeasure TO plgm_service;
+
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+
+INSERT INTO public.tbl_gridmeasure(
+ id_descriptive, title, affected_resource, remark, email_addresses, fk_ref_gm_status,
+ switching_object, cost_center,
+ approval_by, area_of_switching, appointment_repetition, appointment_startdate,
+ appointment_numberof, planned_starttime_first_sequence, planned_starttime_first_singlemeasure,
+ planned_endtime_last_singlemeasure, planned_endtime_gridmeasure,
+ starttime_first_sequence, starttime_first_singlemeasure, endtime_last_singlemeasure,
+ endtime_gridmeasure, time_of_reallocation, description, fk_ref_branch,
+ fk_ref_branch_level, create_user, create_user_department, create_date,
+ mod_user, mod_user_department, mod_date)
+ VALUES ('2018_1', 'Kabel erneuern', 'Kabel', 'Kabel defekt', 'mailingListRecipient@test.de; mailingList2Recipient@test.de', 0,
+ 'Kabel', 'K-155',
+ 'otto', 'Frankfurt', 'einmalig', '2018-06-14 15:15:00',
+ 7, '2018-06-09 15:00:00', '2018-06-10 16:30:00',
+ '2018-06-11 14:00:00', '2018-06-17 20:15:00',
+ '2018-06-14 15:15:00', '2018-06-15 15:45:00', '2018-06-16 13:00:00',
+ '2018-06-18 16:00:00', 'in zwei Tagen', 'Das Kabel austauschen', 1,
+ 1, 'otto', 4, '2018-06-09 15:00:00',
+ 'otto', 3, '2018-06-14 15:15:00');
+
+INSERT INTO public.tbl_gridmeasure(
+ id_descriptive, title, affected_resource, remark, email_addresses, fk_ref_gm_status,
+ switching_object, cost_center,
+ approval_by, area_of_switching, appointment_repetition, appointment_startdate,
+ appointment_numberof, planned_starttime_first_sequence, planned_starttime_first_singlemeasure,
+ planned_endtime_last_singlemeasure, planned_endtime_gridmeasure,
+ starttime_first_sequence, starttime_first_singlemeasure, endtime_last_singlemeasure,
+ endtime_gridmeasure, time_of_reallocation, description, fk_ref_branch,
+ fk_ref_branch_level, create_user, create_user_department, create_date,
+ mod_user, mod_user_department, mod_date)
+ VALUES ('2018_2', 'Lampe erneuern', 'Lampe', 'Lampe defekt', 'mailingListRecipient@test.de; mailingList2Recipient@test.de', 1,
+ 'Lampe', 'K-004',
+ 'jasper', 'Mannheim', 'einmalig', '2018-06-16 15:15:00',
+ 3, '2018-06-11 15:00:00', '2018-06-12 16:30:00',
+ '2018-06-13 14:00:00', '2018-06-19 20:15:00',
+ '2018-06-16 15:15:00', '2018-06-17 15:45:00', '2018-06-18 13:00:00',
+ '2018-06-20 16:00:00', 'in zwei Tagen', 'Die Lampe austauschen', 2,
+ 1, 'jasper', 3, '2018-06-11 15:00:00',
+ 'jasper', 4, '2018-06-14 15:15:00');
+
+INSERT INTO public.tbl_gridmeasure(
+ id_descriptive, title, affected_resource, remark, email_addresses, fk_ref_gm_status,
+ switching_object, cost_center,
+ approval_by, area_of_switching, appointment_repetition, appointment_startdate,
+ appointment_numberof, planned_starttime_first_sequence, planned_starttime_first_singlemeasure,
+ planned_endtime_last_singlemeasure, planned_endtime_gridmeasure,
+ starttime_first_sequence, starttime_first_singlemeasure, endtime_last_singlemeasure,
+ endtime_gridmeasure, time_of_reallocation, description, fk_ref_branch,
+ fk_ref_branch_level, create_user, create_user_department, create_date,
+ mod_user, mod_user_department, mod_date)
+ VALUES ('2018_3', 'Transformator erneuern', 'Transformator', 'Transformator defekt', 'mailingListRecipient@test.de; mailingList2Recipient@test.de', 2,
+ 'Transformator', 'K-222',
+ 'hugo', 'Murr', 'täglich', '2018-06-17 15:15:00',
+ 6, '2018-06-12 15:00:00', '2018-06-13 16:30:00',
+ '2018-06-14 14:00:00', '2018-06-20 20:15:00',
+ '2018-06-17 15:15:00', '2018-06-18 15:45:00', '2018-06-19 13:00:00',
+ '2018-06-21 16:00:00', 'in 8 Tagen', 'Den Transformator austauschen', 4,
+ 1, 'hugo', 4, '2018-06-12 15:00:00',
+ 'otto', 4, '2018-06-17 15:15:00');
+
+INSERT INTO public.tbl_gridmeasure(
+ id_descriptive, title, affected_resource, remark, email_addresses, fk_ref_gm_status,
+ switching_object, cost_center,
+ approval_by, area_of_switching, appointment_repetition, appointment_startdate,
+ appointment_numberof, planned_starttime_first_sequence, planned_starttime_first_singlemeasure,
+ planned_endtime_last_singlemeasure, planned_endtime_gridmeasure,
+ starttime_first_sequence, starttime_first_singlemeasure, endtime_last_singlemeasure,
+ endtime_gridmeasure, time_of_reallocation, description, fk_ref_branch,
+ fk_ref_branch_level, create_user, create_user_department, create_date,
+ mod_user, mod_user_department, mod_date)
+ VALUES ('2018_4', 'Transformator ersetzen', 'Transformator', 'Transformator kaputt', 'mailingListRecipient@test.de; mailingList2Recipient@test.de', 3,
+ 'Transformator', 'K-155',
+ 'otto', 'Stuttgart', 'einmalig', '2018-06-18 15:15:00',
+ 3, '2018-06-13 15:00:00', '2018-06-14 16:30:00',
+ '2018-06-15 14:00:00', '2018-06-21 20:15:00',
+ '2018-06-18 15:15:00', '2018-06-19 15:45:00', '2018-06-20 13:00:00',
+ '2018-06-22 16:00:00', 'in 9 Tagen', 'Den Transformator austauschen', 3,
+ 1, 'otto', 4, '2018-06-13 15:00:00',
+ 'otto', 5, '2018-06-18 15:15:00');
+
+INSERT INTO public.tbl_gridmeasure(
+ id_descriptive, title, affected_resource, remark, email_addresses, fk_ref_gm_status,
+ switching_object, cost_center,
+ approval_by, area_of_switching, appointment_repetition, appointment_startdate,
+ appointment_numberof, planned_starttime_first_sequence, planned_starttime_first_singlemeasure,
+ planned_endtime_last_singlemeasure, planned_endtime_gridmeasure,
+ starttime_first_sequence, starttime_first_singlemeasure, endtime_last_singlemeasure,
+ endtime_gridmeasure, time_of_reallocation, description, fk_ref_branch,
+ fk_ref_branch_level, create_user, create_user_department, create_date,
+ mod_user, mod_user_department, mod_date)
+ VALUES ('2018_5', 'Gas Station', 'Station', 'Station defekt', 'mailingListRecipient@test.de; mailingList2Recipient@test.de', 4,
+ 'Station', 'K-004',
+ 'otto', 'Ludwigsburg', 'wöchentlich', '2018-07-14 15:15:00',
+ 1, '2018-07-09 15:00:00', '2018-07-10 16:30:00',
+ '2018-07-11 14:00:00', '2018-07-17 20:15:00',
+ '2018-07-14 15:15:00', '2018-07-15 15:45:00', '2018-07-16 13:00:00',
+ '2018-07-18 16:00:00', 'in zwei Wochen', 'Die Gas Station untersuchen', 2,
+ 1, 'otto', 5, '2018-07-09 15:00:00',
+ 'otto', 3, '2018-07-14 15:15:00');
+
+INSERT INTO public.tbl_gridmeasure(
+ id_descriptive, title, affected_resource, remark, email_addresses, fk_ref_gm_status,
+ switching_object, cost_center,
+ approval_by, area_of_switching, appointment_repetition, appointment_startdate,
+ appointment_numberof, planned_starttime_first_sequence, planned_starttime_first_singlemeasure,
+ planned_endtime_last_singlemeasure, planned_endtime_gridmeasure,
+ starttime_first_sequence, starttime_first_singlemeasure, endtime_last_singlemeasure,
+ endtime_gridmeasure, time_of_reallocation, description, fk_ref_branch,
+ fk_ref_branch_level, create_user, create_user_department, create_date,
+ mod_user, mod_user_department, mod_date)
+ VALUES ('2018_6', 'Stuhl mit drei Beinen', 'Stuhl', 'Stuhl kaputt', 'mailingListRecipient@test.de; mailingList2Recipient@test.de', 5,
+ 'Stuhl', 'K-155',
+ 'otto', 'Hamburg', 'einmalig', '2018-06-12 15:15:00',
+ 3, '2018-06-07 15:00:00', '2018-06-08 16:30:00',
+ '2018-06-09 14:00:00', '2018-06-15 20:15:00',
+ '2018-06-12 15:15:00', '2018-06-13 15:45:00', '2018-06-14 13:00:00',
+ '2018-06-16 16:00:00', 'in zwei Tagen', 'Den Stuhl austauschen', 4,
+ 1, 'claudio', 4, '2018-06-07 15:00:00',
+ 'claudio', 3, '2018-06-12 15:15:00');
+
+INSERT INTO public.tbl_gridmeasure(
+ id_descriptive, title, affected_resource, remark, email_addresses, fk_ref_gm_status,
+ switching_object, cost_center,
+ approval_by, area_of_switching, appointment_repetition, appointment_startdate,
+ appointment_numberof, planned_starttime_first_sequence, planned_starttime_first_singlemeasure,
+ planned_endtime_last_singlemeasure, planned_endtime_gridmeasure,
+ starttime_first_sequence, starttime_first_singlemeasure, endtime_last_singlemeasure,
+ endtime_gridmeasure, time_of_reallocation, description, fk_ref_branch,
+ fk_ref_branch_level, create_user, create_user_department, create_date,
+ mod_user, mod_user_department, mod_date)
+ VALUES ('2018_7', 'Kabel vergrößern', 'Kabel', 'Kabel zu kurz', 'mailingListRecipient@test.de; mailingList2Recipient@test.de', 6,
+ 'Kabel', 'K-222',
+ 'dagmar', 'Steinheim', 'einmalig', '2018-08-14 15:15:00',
+ 27, '2018-08-09 15:00:00', '2018-08-10 16:30:00',
+ '2018-08-11 14:00:00', '2018-08-17 20:15:00',
+ '2018-08-14 15:15:00', '2018-08-15 15:45:00', '2018-06-16 13:00:00',
+ '2018-08-18 16:00:00', 'in zwei Wochen', 'Das Kabel vergrößern', 3,
+ 1, 'claudio', 3, '2018-08-09 15:00:00',
+ 'bruno', 5, '2018-08-14 15:15:00');
+
+INSERT INTO public.tbl_gridmeasure(
+ id_descriptive, title, affected_resource, remark, email_addresses, fk_ref_gm_status,
+ switching_object, cost_center,
+ approval_by, area_of_switching, appointment_repetition, appointment_startdate,
+ appointment_numberof, planned_starttime_first_sequence, planned_starttime_first_singlemeasure,
+ planned_endtime_last_singlemeasure, planned_endtime_gridmeasure,
+ starttime_first_sequence, starttime_first_singlemeasure, endtime_last_singlemeasure,
+ endtime_gridmeasure, time_of_reallocation, description, fk_ref_branch,
+ fk_ref_branch_level, create_user, create_user_department, create_date,
+ mod_user, mod_user_department, mod_date)
+ VALUES ('2018_8', 'Transformator austauschen', 'Transformator', 'Transformator 160 Grads', 'mailingListRecipient@test.de; mailingList2Recipient@test.de', 7,
+ 'Transformator', 'K-155',
+ 'dagmar', 'Murr', 'täglich', '2018-06-14 15:15:00',
+ 6, '2018-06-09 15:00:00', '2018-06-10 16:30:00',
+ '2018-06-11 14:00:00', '2018-06-17 20:15:00',
+ '2018-06-14 15:15:00', '2018-06-15 15:45:00', '2018-06-16 13:00:00',
+ '2018-06-18 16:00:00', 'in zwei Tagen', 'Den Transformator austauschen', 1,
+ 1, 'dagmar', 4, '2018-06-09 15:00:00',
+ 'dagmar', 3, '2018-06-14 15:15:00');
+
+INSERT INTO public.tbl_gridmeasure(
+ id_descriptive, title, affected_resource, remark, email_addresses, fk_ref_gm_status,
+ switching_object, cost_center,
+ approval_by, area_of_switching, appointment_repetition, appointment_startdate,
+ appointment_numberof, planned_starttime_first_sequence, planned_starttime_first_singlemeasure,
+ planned_endtime_last_singlemeasure, planned_endtime_gridmeasure,
+ starttime_first_sequence, starttime_first_singlemeasure, endtime_last_singlemeasure,
+ endtime_gridmeasure, time_of_reallocation, description, fk_ref_branch,
+ fk_ref_branch_level, create_user, create_user_department, create_date,
+ mod_user, mod_user_department, mod_date)
+ VALUES ('2018_9', 'Alles kaputt', 'Alles', 'Alles defekt', 'mailingListRecipient@test.de; mailingList2Recipient@test.de', 8,
+ 'Alles', 'K-222',
+ 'otto', 'Berlin', 'einmalig', '2018-06-15 15:15:00',
+ 2, '2018-06-10 15:00:00', '2018-06-11 16:30:00',
+ '2018-06-12 14:00:00', '2018-06-18 20:15:00',
+ '2018-06-15 15:15:00', '2018-06-16 15:45:00', '2018-06-17 13:00:00',
+ '2018-06-19 16:00:00', 'in zwei Jahren', 'Alles wegwerfen', 2,
+ 3, 'bruno', 5, '2018-06-10 15:00:00',
+ 'claudio', 5, '2018-06-15 15:15:00');
+
+INSERT INTO public.tbl_gridmeasure(
+ id_descriptive, title, affected_resource, remark, email_addresses, fk_ref_gm_status,
+ switching_object, cost_center,
+ approval_by, area_of_switching, appointment_repetition, appointment_startdate,
+ appointment_numberof, planned_starttime_first_sequence, planned_starttime_first_singlemeasure,
+ planned_endtime_last_singlemeasure, planned_endtime_gridmeasure,
+ starttime_first_sequence, starttime_first_singlemeasure, endtime_last_singlemeasure,
+ endtime_gridmeasure, time_of_reallocation, description, fk_ref_branch,
+ fk_ref_branch_level, create_user, create_user_department, create_date,
+ mod_user, mod_user_department, mod_date)
+ VALUES ('2018_10', 'Schalter erneuern', 'Schalter', 'Schalter defekt', 'mailingListRecipient@test.de; mailingList2Recipient@test.de', 9,
+ 'Schalter', 'K-004',
+ 'hugo', 'Kassel', 'einmalig', '2018-08-14 15:15:00',
+ 9, '2018-08-09 15:00:00', '2018-08-10 16:30:00',
+ '2018-08-11 14:00:00', '2018-08-17 20:15:00',
+ '2018-08-14 15:15:00', '2018-08-15 15:45:00', '2018-08-16 13:00:00',
+ '2018-08-18 16:00:00', 'in 6 Tagen', 'Den Schalter austauschen', 1,
+ 1, 'dagmar', 3, '2018-08-09 15:00:00',
+ 'otto', 3, '2018-08-14 15:15:00');
+
+INSERT INTO public.tbl_gridmeasure(
+ id_descriptive, title, affected_resource, remark, email_addresses, fk_ref_gm_status,
+ switching_object, cost_center,
+ approval_by, area_of_switching, appointment_repetition, appointment_startdate,
+ appointment_numberof, planned_starttime_first_sequence, planned_starttime_first_singlemeasure,
+ planned_endtime_last_singlemeasure, planned_endtime_gridmeasure,
+ starttime_first_sequence, starttime_first_singlemeasure, endtime_last_singlemeasure,
+ endtime_gridmeasure, time_of_reallocation, description, fk_ref_branch,
+ fk_ref_branch_level, create_user, create_user_department, create_date,
+ mod_user, mod_user_department, mod_date)
+ VALUES ('2018_11', 'Rechner austauschen', 'Rechner', 'Rechner defekt', 'mailingListRecipient@test.de; mailingList2Recipient@test.de', 10,
+ 'Rechner', 'K-155',
+ 'claudio', 'Murr', 'einmalig', '2018-06-12 15:15:00',
+ 3, '2018-06-07 15:00:00', '2018-06-08 16:30:00',
+ '2018-06-09 14:00:00', '2018-06-15 20:15:00',
+ '2018-06-12 15:15:00', '2018-06-13 15:45:00', '2018-06-14 13:00:00',
+ '2018-06-16 16:00:00', 'in zwei Tagen', 'Den Rechner austauschen', 4,
+ 1, 'hugo', 5, '2018-06-07 15:00:00',
+ 'otto', 3, '2018-06-12 15:15:00');
+
+INSERT INTO public.tbl_gridmeasure(
+ id_descriptive, title, affected_resource, remark, email_addresses, fk_ref_gm_status,
+ switching_object, cost_center,
+ approval_by, area_of_switching, appointment_repetition, appointment_startdate,
+ appointment_numberof, planned_starttime_first_sequence, planned_starttime_first_singlemeasure,
+ planned_endtime_last_singlemeasure, planned_endtime_gridmeasure,
+ starttime_first_sequence, starttime_first_singlemeasure, endtime_last_singlemeasure,
+ endtime_gridmeasure, time_of_reallocation, description, fk_ref_branch,
+ fk_ref_branch_level, create_user, create_user_department, create_date,
+ mod_user, mod_user_department, mod_date)
+ VALUES ('2018_12', 'Maschine untersuchen', 'Maschine', 'Maschine defekt', 'mailingListRecipient@test.de; mailingList2Recipient@test.de', 11,
+ 'Maschine', 'K-004',
+ 'otto', 'Ludwigsburg', 'einmalig', '2018-06-20 15:15:00',
+ 5, '2018-06-15 15:00:00', '2018-06-16 16:30:00',
+ '2018-06-17 14:00:00', '2018-06-23 20:15:00',
+ '2018-06-20 15:15:00', '2018-06-21 15:45:00', '2018-06-22 13:00:00',
+ '2018-06-24 16:00:00', 'in 8 Tagen', 'Die Maschine austauschen', 1,
+ 1, 'bruno', 4, '2018-06-15 15:00:00',
+ 'bruno', 3, '2018-06-20 15:15:00');
+
+
+
+
+-- ---------------------------------------------
+-- TABLE TBL_SINGLE_GRIDMEASURE
+-- ---------------------------------------------
+
+CREATE SEQUENCE public.tbl_single_gridmeasure_id_seq
+ INCREMENT 1
+ MINVALUE 1
+ MAXVALUE 9223372036854775807
+ START 1
+ CACHE 1;
+ALTER TABLE public.tbl_single_gridmeasure_id_seq
+ OWNER TO plgm_service;
+
+CREATE TABLE public.tbl_single_gridmeasure
+(
+ id integer NOT NULL DEFAULT nextval('tbl_single_gridmeasure_id_seq'::regclass),
+ sortorder integer NOT NULL,
+ title character varying(256),
+ switching_object character varying(256),
+ cim_id character varying(256),
+ cim_name character varying(256),
+ cim_description character varying(1024),
+ planned_starttime_singlemeasure timestamp without time zone,
+ planned_endtime_singlemeasure timestamp without time zone,
+ description character varying(1024),
+ responsible_onsite_name character varying(256),
+ responsible_onsite_department character varying(256),
+ network_control character varying(256),
+ fk_tbl_gridmeasure integer NOT NULL,
+ create_user character varying(100) NOT NULL,
+ create_date timestamp without time zone NOT NULL,
+ mod_user character varying(100),
+ mod_date timestamp without time zone,
+ CONSTRAINT tbl_single_gridmeasure_pkey PRIMARY KEY (id),
+ CONSTRAINT fk_single_gridmeasure__gridmeasure FOREIGN KEY (fk_tbl_gridmeasure)
+ REFERENCES public.tbl_gridmeasure (id) MATCH SIMPLE
+ ON UPDATE NO ACTION ON DELETE NO ACTION
+)
+WITH (
+ OIDS=FALSE
+);
+ALTER TABLE public.tbl_single_gridmeasure
+ OWNER TO plgm_service;
+GRANT ALL ON TABLE public.tbl_single_gridmeasure TO plgm_service;
+
+
+INSERT INTO public.tbl_single_gridmeasure(
+ sortorder, title, switching_object, cim_id, cim_name, cim_description,
+ planned_starttime_singlemeasure, planned_endtime_singlemeasure,
+ description, fk_tbl_gridmeasure, create_user, create_date, mod_user,
+ mod_date)
+ VALUES (1, 'Lampe ausschalten', 'Lampe', '2', 'cim', 'cim Beschreibung',
+ '2018-06-10 16:30:00', '2018-06-11 14:00:00',
+ 'Beschreibung', 1, 'Otto', '01.07.2018', 'Otto',
+ '01.07.2018');
+INSERT INTO public.tbl_single_gridmeasure(
+ sortorder, title, switching_object, cim_id, cim_name, cim_description,
+ planned_starttime_singlemeasure, planned_endtime_singlemeasure,
+ description, fk_tbl_gridmeasure, create_user, create_date, mod_user,
+ mod_date)
+ VALUES (2, 'Kabel kürzen', 'Kabel', '2', 'cim', 'cim Beschreibung',
+ '2018-06-10 16:30:00', '2018-06-11 14:00:00',
+ 'Beschreibung', 1, 'Otto', '01.07.2018', 'Otto',
+ '01.07.2018');
+INSERT INTO public.tbl_single_gridmeasure(
+ sortorder, title, switching_object, cim_id, cim_name, cim_description,
+ planned_starttime_singlemeasure, planned_endtime_singlemeasure,
+ description, fk_tbl_gridmeasure, create_user, create_date, mod_user,
+ mod_date)
+ VALUES (3, 'Transformator tauschen', 'Transformator', '2', 'cim', 'cim Beschreibung',
+ '2018-06-10 16:30:00', '2018-06-11 14:00:00',
+ 'Beschreibung', 1, 'Otto', '01.07.2018', 'Otto',
+ '01.07.2018');
+
+INSERT INTO public.tbl_single_gridmeasure(
+ sortorder, title, switching_object, cim_id, cim_name, cim_description,
+ planned_starttime_singlemeasure, planned_endtime_singlemeasure,
+ description, fk_tbl_gridmeasure, create_user, create_date, mod_user,
+ mod_date)
+ VALUES (1, 'Lampe erneuern', 'Lampe', '2', 'cim', 'cim Beschreibung',
+ '2018-06-12 16:30:00', '2018-06-13 14:00:00',
+ 'Beschreibung', 2, 'Hugo', '01.07.2018', 'Hugo',
+ '01.07.2018');
+
+INSERT INTO public.tbl_single_gridmeasure(
+ sortorder, title, switching_object, cim_id, cim_name, cim_description,
+ planned_starttime_singlemeasure, planned_endtime_singlemeasure,
+ description, fk_tbl_gridmeasure, create_user, create_date, mod_user,
+ mod_date)
+ VALUES (1, 'Transformator', 'Transformator', '2', 'cim', 'cim Beschreibung',
+ '2018-06-13 16:30:00', '2018-06-14 14:00:00',
+ 'Beschreibung', 3, 'Hugo', '01.07.2018', 'Hugo',
+ '01.07.2018');
+
+INSERT INTO public.tbl_single_gridmeasure(
+ sortorder, title, switching_object, cim_id, cim_name, cim_description,
+ planned_starttime_singlemeasure, planned_endtime_singlemeasure,
+ description, fk_tbl_gridmeasure, create_user, create_date, mod_user,
+ mod_date)
+ VALUES (1, 'Transformator', 'Transformator', '2', 'cim', 'cim Beschreibung',
+ '2018-06-14 16:30:00', '2018-06-15 14:00:00',
+ 'Beschreibung', 4, 'Hugo', '01.07.2018', 'Jasper',
+ '01.07.2018');
+
+INSERT INTO public.tbl_single_gridmeasure(
+ sortorder, title, switching_object, cim_id, cim_name, cim_description,
+ planned_starttime_singlemeasure, planned_endtime_singlemeasure,
+ description, fk_tbl_gridmeasure, create_user, create_date, mod_user,
+ mod_date)
+ VALUES (1, 'Gas', 'Gas', '2', 'cim', 'cim Beschreibung',
+ '2018-07-10 16:30:00', '2018-07-11 14:00:00',
+ 'Beschreibung', 5, 'Jasper', '01.07.2018', 'Jasper',
+ '01.07.2018');
+
+INSERT INTO public.tbl_single_gridmeasure(
+ sortorder, title, switching_object, cim_id, cim_name, cim_description,
+ planned_starttime_singlemeasure, planned_endtime_singlemeasure,
+ description, fk_tbl_gridmeasure, create_user, create_date, mod_user,
+ mod_date)
+ VALUES (2, 'Gas 2', 'Gas', '2', 'cim', 'cim Beschreibung',
+ '2018-07-10 16:30:00', '2018-07-11 14:00:00',
+ 'Beschreibung', 5, 'Jasper', '01.07.2018', 'Jasper',
+ '01.07.2018');
+
+INSERT INTO public.tbl_single_gridmeasure(
+ sortorder, title, switching_object, cim_id, cim_name, cim_description,
+ planned_starttime_singlemeasure, planned_endtime_singlemeasure,
+ description, fk_tbl_gridmeasure, create_user, create_date, mod_user,
+ mod_date)
+ VALUES (1, 'Stuhl', 'Stuhl', '2', 'cim', 'cim Beschreibung',
+ '2018-06-08 16:30:00', '2018-06-09 14:00:00',
+ 'Beschreibung', 6, 'Otto', '01.07.2018', 'Jasper',
+ '01.07.2018');
+
+INSERT INTO public.tbl_single_gridmeasure(
+ sortorder, title, switching_object, cim_id, cim_name, cim_description,
+ planned_starttime_singlemeasure, planned_endtime_singlemeasure,
+ description, fk_tbl_gridmeasure, create_user, create_date, mod_user,
+ mod_date)
+ VALUES (1, 'Kabel', 'Kabel', '2', 'cim', 'cim Beschreibung',
+ '2018-08-10 16:30:00', '2018-08-11 14:00:00',
+ 'Beschreibung', 7, 'Otto', '01.07.2018', 'Hugo',
+ '01.07.2018');
+
+INSERT INTO public.tbl_single_gridmeasure(
+ sortorder, title, switching_object, cim_id, cim_name, cim_description,
+ planned_starttime_singlemeasure, planned_endtime_singlemeasure,
+ description, fk_tbl_gridmeasure, create_user, create_date, mod_user,
+ mod_date)
+ VALUES (1, 'Transformator', 'Transformator', '2', 'cim', 'cim Beschreibung',
+ '2018-06-10 16:30:00', '2018-06-11 14:00:00',
+ 'Beschreibung', 8, 'Hugo', '01.07.2018', 'Jasper',
+ '01.07.2018');
+
+INSERT INTO public.tbl_single_gridmeasure(
+ sortorder, title, switching_object, cim_id, cim_name, cim_description,
+ planned_starttime_singlemeasure, planned_endtime_singlemeasure,
+ description, fk_tbl_gridmeasure, create_user, create_date, mod_user,
+ mod_date)
+ VALUES (2, 'Transformator 2', 'Transformator', '2', 'cim', 'cim Beschreibung',
+ '2018-06-10 16:30:00', '2018-06-11 14:00:00',
+ 'Beschreibung', 8, 'Hugo', '01.07.2018', 'Jasper',
+ '01.07.2018');
+
+INSERT INTO public.tbl_single_gridmeasure(
+ sortorder, title, switching_object, cim_id, cim_name, cim_description,
+ planned_starttime_singlemeasure, planned_endtime_singlemeasure,
+ description, fk_tbl_gridmeasure, create_user, create_date, mod_user,
+ mod_date)
+ VALUES (1, 'Alles', 'Alles', '2', 'cim', 'cim Beschreibung',
+ '2018-06-11 16:30:00', '2018-06-12 14:00:00',
+ 'Beschreibung', 9, 'Otto', '01.07.2018', 'Jasper',
+ '01.07.2018');
+
+INSERT INTO public.tbl_single_gridmeasure(
+ sortorder, title, switching_object, cim_id, cim_name, cim_description,
+ planned_starttime_singlemeasure, planned_endtime_singlemeasure,
+ description, fk_tbl_gridmeasure, create_user, create_date, mod_user,
+ mod_date)
+ VALUES (1, 'Schalter', 'Schalter', '2', 'cim', 'cim Beschreibung',
+ '2018-08-10 16:30:00', '2018-08-11 14:00:00',
+ 'Beschreibung', 10, 'Otto', '01.07.2018', 'Hugo',
+ '01.07.2018');
+
+INSERT INTO public.tbl_single_gridmeasure(
+ sortorder, title, switching_object, cim_id, cim_name, cim_description,
+ planned_starttime_singlemeasure, planned_endtime_singlemeasure,
+ description, fk_tbl_gridmeasure, create_user, create_date, mod_user,
+ mod_date)
+ VALUES (2, 'Schalter 2', 'Schalter', '2', 'cim', 'cim Beschreibung',
+ '2018-08-10 16:30:00', '2018-08-11 14:00:00',
+ 'Beschreibung', 10, 'Otto', '01.07.2018', 'Hugo',
+ '01.07.2018');
+
+INSERT INTO public.tbl_single_gridmeasure(
+ sortorder, title, switching_object, cim_id, cim_name, cim_description,
+ planned_starttime_singlemeasure, planned_endtime_singlemeasure,
+ description, fk_tbl_gridmeasure, create_user, create_date, mod_user,
+ mod_date)
+ VALUES (1, 'Rechner', 'Rechner', '2', 'cim', 'cim Beschreibung',
+ '2018-06-08 16:30:00', '2018-06-09 14:00:00',
+ 'Beschreibung', 11, 'Jasper', '01.07.2018', 'Jasper',
+ '01.07.2018');
+
+INSERT INTO public.tbl_single_gridmeasure(
+ sortorder, title, switching_object, cim_id, cim_name, cim_description,
+ planned_starttime_singlemeasure, planned_endtime_singlemeasure,
+ description, fk_tbl_gridmeasure, create_user, create_date, mod_user,
+ mod_date)
+ VALUES (1, 'Maschine', 'Maschine', '2', 'cim', 'cim Beschreibung',
+ '2018-06-16 16:30:00', '2018-06-17 14:00:00',
+ 'Beschreibung', 12, 'Hugo', '01.07.2018', 'Jasper',
+ '01.07.2018');
+
+
+-- ---------------------------------------------
+-- TABLE TBL_STEPS
+-- ---------------------------------------------
+
+CREATE SEQUENCE public.tbl_steps_id_seq
+ INCREMENT 1
+ MINVALUE 1
+ MAXVALUE 9223372036854775807
+ START 1
+ CACHE 1;
+ALTER TABLE public.tbl_steps_id_seq
+ OWNER TO plgm_service;
+
+CREATE TABLE public.tbl_steps
+(
+ id integer NOT NULL DEFAULT nextval('tbl_steps_id_seq'::regclass),
+ sortorder integer NOT NULL,
+ switching_object character varying(256),
+ type character varying(256),
+ present_time character varying(256),
+ present_state character varying(256),
+ target_state character varying(256),
+ operator character varying(256),
+ fk_tbl_single_gridmeasure integer NOT NULL,
+ create_user character varying(100) NOT NULL,
+ create_date timestamp without time zone NOT NULL,
+ mod_user character varying(100),
+ mod_date timestamp without time zone,
+ CONSTRAINT tbl_steps_pkey PRIMARY KEY (id),
+ CONSTRAINT fk_steps__single_gridmeasure FOREIGN KEY (fk_tbl_single_gridmeasure)
+ REFERENCES public.tbl_single_gridmeasure (id) MATCH SIMPLE
+ ON UPDATE NO ACTION ON DELETE NO ACTION
+)
+WITH (
+ OIDS=FALSE
+);
+ALTER TABLE public.tbl_steps
+ OWNER TO plgm_service;
+GRANT ALL ON TABLE public.tbl_steps TO plgm_service;
+
+
+-- ---------------------------------------------
+-- TABLE REF_VERSION
+-- ---------------------------------------------
+
+DROP TABLE IF EXISTS public.REF_VERSION;
+
+CREATE TABLE public.REF_VERSION
+(
+ id integer NOT NULL,
+ version character varying(100) NOT NULL,
+ CONSTRAINT ref_version_pkey PRIMARY KEY (id)
+)
+WITH (
+ OIDS=FALSE
+);
+ALTER TABLE public.REF_VERSION
+ OWNER TO PLGM_SERVICE;
+GRANT ALL ON TABLE public.REF_VERSION TO PLGM_SERVICE;
+
+INSERT INTO REF_VERSION VALUES (1, '0.0.1_PG');
+
+-- ---------------------------------------------
+-- TABLE TBL_DOCUMENTS
+-- ---------------------------------------------
+
+CREATE SEQUENCE public.tbl_documents_id_seq
+ INCREMENT 1
+ MINVALUE 1
+ MAXVALUE 9223372036854775807
+ START 1
+ CACHE 1;
+ALTER TABLE public.tbl_documents_id_seq
+ OWNER TO plgm_service;
+
+CREATE TABLE public.tbl_documents
+(
+ id integer NOT NULL DEFAULT nextval('tbl_documents_id_seq'::regclass),
+ document_name character varying(260),
+ document bytea,
+ create_user character varying(100) NOT NULL,
+ create_date timestamp without time zone NOT NULL,
+ mod_user character varying(100),
+ mod_date timestamp without time zone,
+ CONSTRAINT tbl_documents_pkey PRIMARY KEY (id)
+)
+WITH (
+ OIDS=FALSE
+);
+ALTER TABLE public.tbl_documents
+ OWNER TO plgm_service;
+GRANT ALL ON TABLE public.tbl_documents TO plgm_service;
+
+
+-- ---------------------------------------------
+-- TABLE TBL_MEASURE_DOCUMENTS
+-- ---------------------------------------------
+
+CREATE SEQUENCE public.tbl_measure_documents_id_seq
+ INCREMENT 1
+ MINVALUE 1
+ MAXVALUE 9223372036854775807
+ START 1
+ CACHE 1;
+ALTER TABLE public.tbl_measure_documents_id_seq
+ OWNER TO plgm_service;
+
+CREATE TABLE public.tbl_measure_documents
+(
+ id integer NOT NULL DEFAULT nextval('tbl_measure_documents_id_seq'::regclass),
+ fk_tbl_measure integer,
+ fk_tbl_documents integer,
+ create_user character varying(100) NOT NULL,
+ create_date timestamp without time zone NOT NULL,
+ mod_user character varying(100),
+ mod_date timestamp without time zone,
+ CONSTRAINT tbl_measure_documents_pkey PRIMARY KEY (id),
+ CONSTRAINT fk_tbl_measure_documents_measure FOREIGN KEY (fk_tbl_measure)
+ REFERENCES public.tbl_gridmeasure (id) MATCH SIMPLE
+ ON UPDATE NO ACTION ON DELETE CASCADE,
+ CONSTRAINT fk_tbl_measure_documents_documents FOREIGN KEY (fk_tbl_documents)
+ REFERENCES public.tbl_documents (id) MATCH SIMPLE
+ ON UPDATE NO ACTION ON DELETE NO ACTION
+)
+WITH (
+ OIDS=FALSE
+);
+ALTER TABLE public.tbl_measure_documents
+ OWNER TO plgm_service;
+GRANT ALL ON TABLE public.tbl_measure_documents TO plgm_service;
+
+
+
+-- ----------------------------------------------------------------------------
+-- ----------------------------------------------------------------------------
+-- HISTORY-TABLES
+-- ----------------------------------------------------------------------------
+-- ----------------------------------------------------------------------------
+
+-- PUBLIC.HREF_TERRITORY Automatic generanted History Table DDL --
+-- <GENERATED CODE!>
+
+DROP TABLE IF EXISTS PUBLIC.HREF_TERRITORY;
+DROP SEQUENCE IF EXISTS PUBLIC.HREF_TERRITORY_ID_SEQ;
+
+CREATE SEQUENCE PUBLIC.HREF_TERRITORY_ID_SEQ
+ INCREMENT 1
+ MINVALUE 1
+ MAXVALUE 9223372036854775807
+ START 1
+ CACHE 1;
+
+ALTER TABLE PUBLIC.HREF_TERRITORY_ID_SEQ
+ OWNER TO PLGM_SERVICE;
+
+CREATE TABLE PUBLIC.HREF_TERRITORY
+(
+ HID integer NOT NULL DEFAULT nextval('HREF_TERRITORY_ID_SEQ'::regclass),
+ HACTION integer NOT NULL,
+ HDATE timestamp without time zone NOT NULL,
+ HUSER character varying(100),
+
+ ID integer,
+ NAME character varying (50),
+ DESCRIPTION character varying (255),
+
+ CREATE_USER character varying(100),
+ CREATE_DATE timestamp without time zone,
+ MOD_USER character varying(100),
+ MOD_DATE timestamp without time zone,
+ CONSTRAINT HREF_TERRITORY_PKEY PRIMARY KEY (HID)
+)
+WITH (
+ OIDS=FALSE
+);
+
+ALTER TABLE PUBLIC.HREF_TERRITORY
+ OWNER TO PLGM_SERVICE;
+GRANT ALL ON TABLE PUBLIC.HREF_TERRITORY TO PLGM_SERVICE;
+
+
+
+-- PUBLIC.HTBL_LOCK Automatic generanted History Table DDL --
+-- <GENERATED CODE!>
+
+DROP TABLE IF EXISTS PUBLIC.HTBL_LOCK;
+DROP SEQUENCE IF EXISTS PUBLIC.HTBL_LOCK_ID_SEQ;
+
+CREATE SEQUENCE PUBLIC.HTBL_LOCK_ID_SEQ
+ INCREMENT 1
+ MINVALUE 1
+ MAXVALUE 9223372036854775807
+ START 1
+ CACHE 1;
+
+ALTER TABLE PUBLIC.HTBL_LOCK_ID_SEQ
+ OWNER TO PLGM_SERVICE;
+
+CREATE TABLE PUBLIC.HTBL_LOCK
+(
+ HID integer NOT NULL DEFAULT nextval('HTBL_LOCK_ID_SEQ'::regclass),
+ HACTION integer NOT NULL,
+ HDATE timestamp without time zone NOT NULL,
+ HUSER character varying(100),
+
+ ID integer,
+ KEY integer,
+ USERNAME character varying (50),
+ INFO character varying (256),
+
+ CREATE_USER character varying(100),
+ CREATE_DATE timestamp without time zone,
+ MOD_USER character varying(100),
+ MOD_DATE timestamp without time zone,
+ CONSTRAINT HTBL_LOCK_PKEY PRIMARY KEY (HID)
+)
+WITH (
+ OIDS=FALSE
+);
+
+ALTER TABLE PUBLIC.HTBL_LOCK
+ OWNER TO PLGM_SERVICE;
+GRANT ALL ON TABLE PUBLIC.HTBL_LOCK TO PLGM_SERVICE;
+
+
+
+
+-- PUBLIC.HTBL_USER_SETTINGS Automatic generanted History Table DDL --
+-- <GENERATED CODE!>
+
+DROP TABLE IF EXISTS PUBLIC.HTBL_USER_SETTINGS;
+DROP SEQUENCE IF EXISTS PUBLIC.HTBL_USER_SETTINGS_ID_SEQ;
+
+CREATE SEQUENCE PUBLIC.HTBL_USER_SETTINGS_ID_SEQ
+ INCREMENT 1
+ MINVALUE 1
+ MAXVALUE 9223372036854775807
+ START 1
+ CACHE 1;
+
+ALTER TABLE PUBLIC.HTBL_USER_SETTINGS_ID_SEQ
+ OWNER TO PLGM_SERVICE;
+
+CREATE TABLE PUBLIC.HTBL_USER_SETTINGS
+(
+ HID integer NOT NULL DEFAULT nextval('HTBL_USER_SETTINGS_ID_SEQ'::regclass),
+ HACTION integer NOT NULL,
+ HDATE timestamp without time zone NOT NULL,
+ HUSER character varying(100),
+
+ ID integer,
+ USERNAME character varying (50),
+ SETTING_TYPE character varying (50),
+ VALUE character varying(4096),
+
+ CREATE_USER character varying(100),
+ CREATE_DATE timestamp without time zone,
+ MOD_USER character varying(100),
+ MOD_DATE timestamp without time zone,
+ CONSTRAINT HTBL_USER_SETTINGS_PKEY PRIMARY KEY (HID)
+)
+WITH (
+ OIDS=FALSE
+);
+
+ALTER TABLE PUBLIC.HTBL_USER_SETTINGS
+ OWNER TO PLGM_SERVICE;
+GRANT ALL ON TABLE PUBLIC.HTBL_USER_SETTINGS TO PLGM_SERVICE;
+
+
+-- PUBLIC.HREF_USER_DEPARTMENT Automatic generanted History Table DDL --
+-- <GENERATED CODE!>
+
+DROP TABLE IF EXISTS PUBLIC.HREF_USER_DEPARTMENT;
+DROP SEQUENCE IF EXISTS PUBLIC.HREF_USER_DEPARTMENT_ID_SEQ;
+
+CREATE SEQUENCE PUBLIC.HREF_USER_DEPARTMENT_ID_SEQ
+ INCREMENT 1
+ MINVALUE 1
+ MAXVALUE 9223372036854775807
+ START 1
+ CACHE 1;
+
+ALTER TABLE PUBLIC.HREF_USER_DEPARTMENT_ID_SEQ
+ OWNER TO PLGM_SERVICE;
+
+CREATE TABLE PUBLIC.HREF_USER_DEPARTMENT
+(
+ HID integer NOT NULL DEFAULT nextval('HREF_USER_DEPARTMENT_ID_SEQ'::regclass),
+ HACTION integer NOT NULL,
+ HDATE timestamp without time zone NOT NULL,
+ HUSER character varying(100),
+
+ ID integer,
+ NAME character varying (50),
+
+ CREATE_USER character varying(100),
+ CREATE_DATE timestamp without time zone,
+ MOD_USER character varying(100),
+ MOD_DATE timestamp without time zone,
+ CONSTRAINT HREF_USER_DEPARTMENT_PKEY PRIMARY KEY (HID)
+)
+WITH (
+ OIDS=FALSE
+);
+
+ALTER TABLE PUBLIC.HREF_USER_DEPARTMENT
+ OWNER TO PLGM_SERVICE;
+GRANT ALL ON TABLE PUBLIC.HREF_USER_DEPARTMENT TO PLGM_SERVICE;
+
+
+-- PUBLIC.HREF_COST_CENTER Automatic generanted History Table DDL --
+-- <GENERATED CODE!>
+
+DROP TABLE IF EXISTS PUBLIC.HREF_COST_CENTER;
+DROP SEQUENCE IF EXISTS PUBLIC.HREF_COST_CENTER_ID_SEQ;
+
+CREATE SEQUENCE PUBLIC.HREF_COST_CENTER_ID_SEQ
+ INCREMENT 1
+ MINVALUE 1
+ MAXVALUE 9223372036854775807
+ START 1
+ CACHE 1;
+
+ALTER TABLE PUBLIC.HREF_COST_CENTER_ID_SEQ
+ OWNER TO PLGM_SERVICE;
+
+CREATE TABLE PUBLIC.HREF_COST_CENTER
+(
+ HID integer NOT NULL DEFAULT nextval('HREF_COST_CENTER_ID_SEQ'::regclass),
+ HACTION integer NOT NULL,
+ HDATE timestamp without time zone NOT NULL,
+ HUSER character varying(100),
+
+ ID integer,
+ NAME character varying (50),
+ DESCRIPTION character varying (255),
+
+ CREATE_USER character varying(100),
+ CREATE_DATE timestamp without time zone,
+ MOD_USER character varying(100),
+ MOD_DATE timestamp without time zone,
+ CONSTRAINT HREF_COST_CENTER_PKEY PRIMARY KEY (HID)
+)
+WITH (
+ OIDS=FALSE
+);
+
+ALTER TABLE PUBLIC.HREF_COST_CENTER
+ OWNER TO PLGM_SERVICE;
+GRANT ALL ON TABLE PUBLIC.HREF_COST_CENTER TO PLGM_SERVICE;
+
+-- PUBLIC.HREF_BRANCH Automatic generanted History Table DDL --
+-- <GENERATED CODE!>
+
+DROP TABLE IF EXISTS PUBLIC.HREF_BRANCH;
+DROP SEQUENCE IF EXISTS PUBLIC.HREF_BRANCH_ID_SEQ;
+
+CREATE SEQUENCE PUBLIC.HREF_BRANCH_ID_SEQ
+ INCREMENT 1
+ MINVALUE 1
+ MAXVALUE 9223372036854775807
+ START 1
+ CACHE 1;
+
+ALTER TABLE PUBLIC.HREF_BRANCH_ID_SEQ
+ OWNER TO PLGM_SERVICE;
+
+CREATE TABLE PUBLIC.HREF_BRANCH
+(
+ HID integer NOT NULL DEFAULT nextval('HREF_BRANCH_ID_SEQ'::regclass),
+ HACTION integer NOT NULL,
+ HDATE timestamp without time zone NOT NULL,
+ HUSER character varying(100),
+
+ ID integer,
+ NAME character varying (50),
+ DESCRIPTION character varying (255),
+ COLOR_CODE character varying (20),
+ CREATE_USER character varying(100),
+ CREATE_DATE timestamp without time zone,
+ MOD_USER character varying(100),
+ MOD_DATE timestamp without time zone,
+ CONSTRAINT HREF_BRANCH_PKEY PRIMARY KEY (HID)
+)
+WITH (
+ OIDS=FALSE
+);
+
+ALTER TABLE PUBLIC.HREF_BRANCH
+ OWNER TO PLGM_SERVICE;
+GRANT ALL ON TABLE PUBLIC.HREF_BRANCH TO PLGM_SERVICE;
+
+-- PUBLIC.HREF_BRANCH_LEVEL Automatic generanted History Table DDL --
+-- <GENERATED CODE!>
+
+DROP TABLE IF EXISTS PUBLIC.HREF_BRANCH_LEVEL;
+DROP SEQUENCE IF EXISTS PUBLIC.HREF_BRANCH_LEVEL_ID_SEQ;
+
+CREATE SEQUENCE PUBLIC.HREF_BRANCH_LEVEL_ID_SEQ
+ INCREMENT 1
+ MINVALUE 1
+ MAXVALUE 9223372036854775807
+ START 1
+ CACHE 1;
+
+ALTER TABLE PUBLIC.HREF_BRANCH_LEVEL_ID_SEQ
+ OWNER TO PLGM_SERVICE;
+
+CREATE TABLE PUBLIC.HREF_BRANCH_LEVEL
+(
+ HID integer NOT NULL DEFAULT nextval('HREF_BRANCH_LEVEL_ID_SEQ'::regclass),
+ HACTION integer NOT NULL,
+ HDATE timestamp without time zone NOT NULL,
+ HUSER character varying(100),
+
+ ID integer,
+ NAME character varying (50),
+ DESCRIPTION character varying (255),
+ FK_REF_BRANCH integer,
+
+ CREATE_USER character varying(100),
+ CREATE_DATE timestamp without time zone,
+ MOD_USER character varying(100),
+ MOD_DATE timestamp without time zone,
+ CONSTRAINT HREF_BRANCH_LEVEL_PKEY PRIMARY KEY (HID)
+)
+WITH (
+ OIDS=FALSE
+);
+
+ALTER TABLE PUBLIC.HREF_BRANCH_LEVEL
+ OWNER TO PLGM_SERVICE;
+GRANT ALL ON TABLE PUBLIC.HREF_BRANCH_LEVEL TO PLGM_SERVICE;
+
+
+-- PUBLIC.HREF_GM_STATUS Automatic generanted History Table DDL --
+-- <GENERATED CODE!>
+
+DROP TABLE IF EXISTS PUBLIC.HREF_GM_STATUS;
+DROP SEQUENCE IF EXISTS PUBLIC.HREF_GM_STATUS_ID_SEQ;
+
+CREATE SEQUENCE PUBLIC.HREF_GM_STATUS_ID_SEQ
+ INCREMENT 1
+ MINVALUE 1
+ MAXVALUE 9223372036854775807
+ START 1
+ CACHE 1;
+
+ALTER TABLE PUBLIC.HREF_GM_STATUS_ID_SEQ
+ OWNER TO PLGM_SERVICE;
+
+CREATE TABLE PUBLIC.HREF_GM_STATUS
+(
+ HID integer NOT NULL DEFAULT nextval('HREF_GM_STATUS_ID_SEQ'::regclass),
+ HACTION integer NOT NULL,
+ HDATE timestamp without time zone NOT NULL,
+ HUSER character varying(100),
+
+ ID integer,
+ NAME character varying(50),
+ COLOR_CODE character varying(20),
+
+ CREATE_USER character varying(100),
+ CREATE_DATE timestamp without time zone,
+ MOD_USER character varying(100),
+ MOD_DATE timestamp without time zone,
+ CONSTRAINT HREF_GM_STATUS_PKEY PRIMARY KEY (HID)
+)
+WITH (
+ OIDS=FALSE
+);
+
+ALTER TABLE PUBLIC.HREF_GM_STATUS
+ OWNER TO PLGM_SERVICE;
+GRANT ALL ON TABLE PUBLIC.HREF_GM_STATUS TO PLGM_SERVICE;
+
+
+-- PUBLIC.HTBL_GRIDMEASURE Automatic generanted History Table DDL --
+-- <GENERATED CODE!>
+
+-- REQUESTER_NAME COLUMN DELETED--
+
+DROP TABLE IF EXISTS PUBLIC.HTBL_GRIDMEASURE;
+DROP SEQUENCE IF EXISTS PUBLIC.HTBL_GRIDMEASURE_ID_SEQ;
+
+CREATE SEQUENCE PUBLIC.HTBL_GRIDMEASURE_ID_SEQ
+ INCREMENT 1
+ MINVALUE 1
+ MAXVALUE 9223372036854775807
+ START 1
+ CACHE 1;
+
+ALTER TABLE PUBLIC.HTBL_GRIDMEASURE_ID_SEQ
+ OWNER TO PLGM_SERVICE;
+
+CREATE TABLE PUBLIC.HTBL_GRIDMEASURE
+(
+ HID integer NOT NULL DEFAULT nextval('HTBL_GRIDMEASURE_ID_SEQ'::regclass),
+ HACTION integer NOT NULL,
+ HDATE timestamp without time zone NOT NULL,
+ HUSER character varying(100),
+
+ ID integer,
+ ID_DESCRIPTIVE character varying (50),
+ TITLE character varying (256),
+ AFFECTED_RESOURCE character varying (256),
+ REMARK character varying (1024),
+ EMAIL_ADDRESSES character varying(1024),
+ FK_REF_GM_STATUS integer,
+ SWITCHING_OBJECT character varying (256),
+ COST_CENTER character varying (50),
+ APPROVAL_BY character varying (256),
+ AREA_OF_SWITCHING character varying (256),
+ APPOINTMENT_REPETITION character varying (100),
+ APPOINTMENT_STARTDATE timestamp without time zone,
+ APPOINTMENT_NUMBEROF integer,
+ PLANNED_STARTTIME_FIRST_SEQUENCE timestamp without time zone,
+ PLANNED_STARTTIME_FIRST_SINGLEMEASURE timestamp without time zone,
+ PLANNED_ENDTIME_LAST_SINGLEMEASURE timestamp without time zone,
+ PLANNED_ENDTIME_GRIDMEASURE timestamp without time zone,
+ STARTTIME_FIRST_SEQUENCE timestamp without time zone,
+ STARTTIME_FIRST_SINGLEMEASURE timestamp without time zone,
+ ENDTIME_LAST_SINGLEMEASURE timestamp without time zone,
+ ENDTIME_GRIDMEASURE timestamp without time zone,
+ TIME_OF_REALLOCATION character varying (100),
+ DESCRIPTION character varying (1024),
+ FK_REF_BRANCH integer,
+ FK_REF_BRANCH_LEVEL integer,
+ CREATE_USER_DEPARTMENT character varying (100),
+ MOD_USER_DEPARTMENT character varying (100),
+
+ CREATE_USER character varying(100),
+ CREATE_DATE timestamp without time zone,
+ MOD_USER character varying(100),
+ MOD_DATE timestamp without time zone,
+ CONSTRAINT HTBL_GRIDMEASURE_PKEY PRIMARY KEY (HID)
+)
+WITH (
+ OIDS=FALSE
+);
+
+ALTER TABLE PUBLIC.HTBL_GRIDMEASURE
+ OWNER TO PLGM_SERVICE;
+GRANT ALL ON TABLE PUBLIC.HTBL_GRIDMEASURE TO PLGM_SERVICE;
+
+CREATE INDEX HUSER_INDEX ON PUBLIC.HTBL_GRIDMEASURE (HUSER);
+
+
+INSERT INTO public.htbl_gridmeasure(haction, hdate, huser, id, fk_ref_gm_status, mod_user, mod_date)
+VALUES (2, '2018-06-11 14:00:00', 'otto',12,0, 'admin', '2018-06-11 14:00:00');
+INSERT INTO public.htbl_gridmeasure(haction, hdate, huser, id, fk_ref_gm_status, mod_user, mod_date)
+VALUES (2, '2018-06-11 14:01:00', 'otto',12,1, 'admin', '2018-06-11 14:01:00');
+INSERT INTO public.htbl_gridmeasure(haction, hdate, huser, id, fk_ref_gm_status, mod_user, mod_date)
+VALUES (2, '2018-06-11 14:03:00', 'otto',12,3, 'admin', '2018-06-11 14:03:00');
+INSERT INTO public.htbl_gridmeasure(haction, hdate, huser, id, fk_ref_gm_status, mod_user, mod_date)
+VALUES (2, '2018-06-11 14:04:00', 'otto',12,4, 'admin', '2018-06-11 14:04:00');
+INSERT INTO public.htbl_gridmeasure(haction, hdate, huser, id, fk_ref_gm_status, mod_user, mod_date)
+VALUES (2, '2018-06-11 14:05:00', 'otto',12,5, 'admin', '2018-06-11 14:05:00');
+INSERT INTO public.htbl_gridmeasure(haction, hdate, huser, id, fk_ref_gm_status, mod_user, mod_date)
+VALUES (2, '2018-06-11 14:06:00', 'otto',12,6, 'admin', '2018-06-11 14:06:00');
+INSERT INTO public.htbl_gridmeasure(haction, hdate, huser, id, fk_ref_gm_status, mod_user, mod_date)
+VALUES (2, '2018-06-11 14:07:00', 'otto',12,7, 'admin', '2018-06-11 14:07:00');
+INSERT INTO public.htbl_gridmeasure(haction, hdate, huser, id, fk_ref_gm_status, mod_user, mod_date)
+VALUES (2, '2018-06-11 14:08:00', 'otto',12,8, 'admin', '2018-06-11 14:08:00');
+INSERT INTO public.htbl_gridmeasure(haction, hdate, huser, id, fk_ref_gm_status, mod_user, mod_date)
+VALUES (2, '2018-06-11 14:09:00', 'otto',12,9, 'admin', '2018-06-11 14:09:00');
+INSERT INTO public.htbl_gridmeasure(haction, hdate, huser, id, fk_ref_gm_status, mod_user, mod_date)
+VALUES (2, '2018-06-11 14:10:00', 'otto',12,10, 'admin', '2018-06-11 14:10:00');
+INSERT INTO public.htbl_gridmeasure(haction, hdate, huser, id, fk_ref_gm_status, mod_user, mod_date)
+VALUES (2, '2018-06-11 14:11:00', 'otto',12,11, 'admin', '2018-06-11 14:11:00');
+
+
+INSERT INTO public.htbl_gridmeasure(haction, hdate, huser, id, fk_ref_gm_status, mod_user, mod_date)
+VALUES (2, '2018-07-01 14:55:00', 'admin',13,0, 'admin', '2018-07-01 14:55:00');
+INSERT INTO public.htbl_gridmeasure(haction, hdate, huser, id, fk_ref_gm_status, mod_user, mod_date)
+VALUES (2, '2018-07-01 14:56:00', 'admin',13,1, 'admin', '2018-07-01 14:56:00');
+INSERT INTO public.htbl_gridmeasure(haction, hdate, huser, id, fk_ref_gm_status, mod_user, mod_date)
+VALUES (2, '2018-07-01 14:57:00', 'admin',13,3, 'admin', '2018-07-01 14:57:00');
+INSERT INTO public.htbl_gridmeasure(haction, hdate, huser, id, fk_ref_gm_status, mod_user, mod_date)
+VALUES (2, '2018-07-01 14:57:00', 'admin',13,12, 'admin', '2018-07-01 14:57:00');
+
+
+INSERT INTO public.htbl_gridmeasure(haction, hdate, huser, id, fk_ref_gm_status, mod_user, mod_date)
+VALUES (1, '2018-06-11 14:00:00', 'admin',11,0, 'admin', '2018-06-11 14:00:00');
+INSERT INTO public.htbl_gridmeasure(haction, hdate, huser, id, fk_ref_gm_status, mod_user, mod_date)
+VALUES (1, '2018-06-11 14:01:00', 'admin',11,1, 'admin', '2018-06-11 14:01:00');
+INSERT INTO public.htbl_gridmeasure(haction, hdate, huser, id, fk_ref_gm_status, mod_user, mod_date)
+VALUES (1, '2018-06-11 14:02:00', 'admin',11,3, 'admin', '2018-06-11 14:02:00');
+INSERT INTO public.htbl_gridmeasure(haction, hdate, huser, id, fk_ref_gm_status, mod_user, mod_date)
+VALUES (1, '2018-06-11 14:03:00', 'admin',11,4, 'admin', '2018-06-11 14:03:00');
+INSERT INTO public.htbl_gridmeasure(haction, hdate, huser, id, fk_ref_gm_status, mod_user, mod_date)
+VALUES (1, '2018-06-11 14:04:00', 'admin',11,5, 'admin', '2018-06-11 14:04:00');
+INSERT INTO public.htbl_gridmeasure(haction, hdate, huser, id, fk_ref_gm_status, mod_user, mod_date)
+VALUES (1, '2018-06-11 14:05:00', 'admin',11,6, 'admin', '2018-06-11 14:05:00');
+INSERT INTO public.htbl_gridmeasure(haction, hdate, huser, id, fk_ref_gm_status, mod_user, mod_date)
+VALUES (1, '2018-06-11 14:06:00', 'admin',11,7, 'admin', '2018-06-11 14:06:00');
+INSERT INTO public.htbl_gridmeasure(haction, hdate, huser, id, fk_ref_gm_status, mod_user, mod_date)
+VALUES (1, '2018-06-11 14:07:00', 'admin',11,8, 'admin', '2018-06-11 14:07:00');
+INSERT INTO public.htbl_gridmeasure(haction, hdate, huser, id, fk_ref_gm_status, mod_user, mod_date)
+VALUES (1, '2018-06-11 14:08:00', 'admin',11,9, 'admin', '2018-06-11 14:08:00');
+INSERT INTO public.htbl_gridmeasure(haction, hdate, huser, id, fk_ref_gm_status, mod_user, mod_date)
+VALUES (1, '2018-06-11 14:09:00', 'admin',11,10, 'admin', '2018-06-11 14:09:00');
+
+
+INSERT INTO public.htbl_gridmeasure(haction, hdate, huser, id, fk_ref_gm_status, mod_user, mod_date)
+VALUES (2, '2018-06-11 14:00:00', 'admin',10,0, 'admin', '2018-06-11 14:00:00');
+INSERT INTO public.htbl_gridmeasure(haction, hdate, huser, id, fk_ref_gm_status, mod_user, mod_date)
+VALUES (2, '2018-06-11 14:01:00', 'admin',10,1, 'admin', '2018-06-11 14:01:00');
+INSERT INTO public.htbl_gridmeasure(haction, hdate, huser, id, fk_ref_gm_status, mod_user, mod_date)
+VALUES (2, '2018-06-11 14:02:00', 'admin',10,3, 'admin', '2018-06-11 14:02:00');
+INSERT INTO public.htbl_gridmeasure(haction, hdate, huser, id, fk_ref_gm_status, mod_user, mod_date)
+VALUES (2, '2018-06-11 14:03:00', 'admin',10,4, 'admin', '2018-06-11 14:03:00');
+INSERT INTO public.htbl_gridmeasure(haction, hdate, huser, id, fk_ref_gm_status, mod_user, mod_date)
+VALUES (2, '2018-06-11 14:04:00', 'admin',10,5, 'admin', '2018-06-11 14:04:00');
+INSERT INTO public.htbl_gridmeasure(haction, hdate, huser, id, fk_ref_gm_status, mod_user, mod_date)
+VALUES (2, '2018-06-11 14:05:00', 'admin',10,6, 'admin', '2018-06-11 14:05:00');
+INSERT INTO public.htbl_gridmeasure(haction, hdate, huser, id, fk_ref_gm_status, mod_user, mod_date)
+VALUES (2, '2018-06-11 14:06:00', 'admin',10,7, 'admin', '2018-06-11 14:06:00');
+INSERT INTO public.htbl_gridmeasure(haction, hdate, huser, id, fk_ref_gm_status, mod_user, mod_date)
+VALUES (2, '2018-06-11 14:07:00', 'admin',10,8, 'admin', '2018-06-11 14:07:00');
+INSERT INTO public.htbl_gridmeasure(haction, hdate, huser, id, fk_ref_gm_status, mod_user, mod_date)
+VALUES (2, '2018-06-11 14:08:00', 'admin',10,9, 'admin', '2018-06-11 14:08:00');
+
+
+INSERT INTO public.htbl_gridmeasure(haction, hdate, huser, id, fk_ref_gm_status, mod_user, mod_date)
+VALUES (2, '2018-06-11 14:00:00', 'admin',9,0, 'admin', '2018-06-11 14:00:00');
+INSERT INTO public.htbl_gridmeasure(haction, hdate, huser, id, fk_ref_gm_status, mod_user, mod_date)
+VALUES (2, '2018-06-11 14:01:00', 'admin',9,1, 'admin', '2018-06-11 14:01:00');
+INSERT INTO public.htbl_gridmeasure(haction, hdate, huser, id, fk_ref_gm_status, mod_user, mod_date)
+VALUES (2, '2018-06-11 14:02:00', 'admin',9,3, 'admin', '2018-06-11 14:02:00');
+INSERT INTO public.htbl_gridmeasure(haction, hdate, huser, id, fk_ref_gm_status, mod_user, mod_date)
+VALUES (2, '2018-06-11 14:03:00', 'admin',9,4, 'admin', '2018-06-11 14:03:00');
+INSERT INTO public.htbl_gridmeasure(haction, hdate, huser, id, fk_ref_gm_status, mod_user, mod_date)
+VALUES (2, '2018-06-11 14:04:00', 'admin',9,5, 'admin', '2018-06-11 14:04:00');
+INSERT INTO public.htbl_gridmeasure(haction, hdate, huser, id, fk_ref_gm_status, mod_user, mod_date)
+VALUES (2, '2018-06-11 14:05:00', 'admin',9,6, 'admin', '2018-06-11 14:05:00');
+INSERT INTO public.htbl_gridmeasure(haction, hdate, huser, id, fk_ref_gm_status, mod_user, mod_date)
+VALUES (2, '2018-06-11 14:06:00', 'admin',9,7, 'admin', '2018-06-11 14:06:00');
+INSERT INTO public.htbl_gridmeasure(haction, hdate, huser, id, fk_ref_gm_status, mod_user, mod_date)
+VALUES (2, '2018-06-11 14:07:00', 'admin',9,8, 'admin', '2018-06-11 14:07:00');
+
+
+INSERT INTO public.htbl_gridmeasure(haction, hdate, huser, id, fk_ref_gm_status, mod_user, mod_date)
+VALUES (2, '2018-06-11 14:00:00', 'admin',8,0, 'admin', '2018-06-11 14:00:00');
+INSERT INTO public.htbl_gridmeasure(haction, hdate, huser, id, fk_ref_gm_status, mod_user, mod_date)
+VALUES (2, '2018-06-11 14:01:00', 'admin',8,1, 'admin', '2018-06-11 14:01:00');
+INSERT INTO public.htbl_gridmeasure(haction, hdate, huser, id, fk_ref_gm_status, mod_user, mod_date)
+VALUES (2, '2018-06-11 14:02:00', 'admin',8,3, 'admin', '2018-06-11 14:02:00');
+INSERT INTO public.htbl_gridmeasure(haction, hdate, huser, id, fk_ref_gm_status, mod_user, mod_date)
+VALUES (2, '2018-06-11 14:03:00', 'admin',8,4, 'admin', '2018-06-11 14:03:00');
+INSERT INTO public.htbl_gridmeasure(haction, hdate, huser, id, fk_ref_gm_status, mod_user, mod_date)
+VALUES (2, '2018-06-11 14:04:00', 'admin',8,5, 'admin', '2018-06-11 14:04:00');
+INSERT INTO public.htbl_gridmeasure(haction, hdate, huser, id, fk_ref_gm_status, mod_user, mod_date)
+VALUES (2, '2018-06-11 14:05:00', 'admin',8,6, 'admin', '2018-06-11 14:05:00');
+INSERT INTO public.htbl_gridmeasure(haction, hdate, huser, id, fk_ref_gm_status, mod_user, mod_date)
+VALUES (2, '2018-06-11 14:06:00', 'admin',8,7, 'admin', '2018-06-11 14:06:00');
+
+
+INSERT INTO public.htbl_gridmeasure(haction, hdate, huser, id, fk_ref_gm_status, mod_user, mod_date)
+VALUES (2, '2018-06-11 14:00:00', 'admin',7,0, 'admin', '2018-06-11 14:00:00');
+INSERT INTO public.htbl_gridmeasure(haction, hdate, huser, id, fk_ref_gm_status, mod_user, mod_date)
+VALUES (2, '2018-06-11 14:01:00', 'admin',7,1, 'admin', '2018-06-11 14:01:00');
+INSERT INTO public.htbl_gridmeasure(haction, hdate, huser, id, fk_ref_gm_status, mod_user, mod_date)
+VALUES (2, '2018-06-11 14:02:00', 'admin',7,3, 'admin', '2018-06-11 14:02:00');
+INSERT INTO public.htbl_gridmeasure(haction, hdate, huser, id, fk_ref_gm_status, mod_user, mod_date)
+VALUES (2, '2018-06-11 14:03:00', 'admin',7,4, 'admin', '2018-06-11 14:03:00');
+INSERT INTO public.htbl_gridmeasure(haction, hdate, huser, id, fk_ref_gm_status, mod_user, mod_date)
+VALUES (2, '2018-06-11 14:04:00', 'admin',7,5, 'admin', '2018-06-11 14:04:00');
+INSERT INTO public.htbl_gridmeasure(haction, hdate, huser, id, fk_ref_gm_status, mod_user, mod_date)
+VALUES (2, '2018-06-11 14:05:00', 'admin',7,6, 'admin', '2018-06-11 14:05:00');
+
+
+INSERT INTO public.htbl_gridmeasure(haction, hdate, huser, id, fk_ref_gm_status, mod_user, mod_date)
+VALUES (2, '2018-06-11 14:00:00', 'admin',6,0, 'admin', '2018-06-11 14:00:00');
+INSERT INTO public.htbl_gridmeasure(haction, hdate, huser, id, fk_ref_gm_status, mod_user, mod_date)
+VALUES (2, '2018-06-11 14:01:00', 'admin',6,1, 'admin', '2018-06-11 14:01:00');
+INSERT INTO public.htbl_gridmeasure(haction, hdate, huser, id, fk_ref_gm_status, mod_user, mod_date)
+VALUES (2, '2018-06-11 14:02:00', 'admin',6,3, 'admin', '2018-06-11 14:02:00');
+INSERT INTO public.htbl_gridmeasure(haction, hdate, huser, id, fk_ref_gm_status, mod_user, mod_date)
+VALUES (2, '2018-06-11 14:03:00', 'admin',6,4, 'admin', '2018-06-11 14:03:00');
+INSERT INTO public.htbl_gridmeasure(haction, hdate, huser, id, fk_ref_gm_status, mod_user, mod_date)
+VALUES (2, '2018-06-11 14:04:00', 'admin',6,5, 'admin', '2018-06-11 14:04:00');
+
+
+INSERT INTO public.htbl_gridmeasure(haction, hdate, huser, id, fk_ref_gm_status, mod_user, mod_date)
+VALUES (2, '2018-06-11 14:00:00', 'admin',5,0, 'admin', '2018-06-11 14:00:00');
+INSERT INTO public.htbl_gridmeasure(haction, hdate, huser, id, fk_ref_gm_status, mod_user, mod_date)
+VALUES (2, '2018-06-11 14:01:00', 'admin',5,1, 'admin', '2018-06-11 14:01:00');
+INSERT INTO public.htbl_gridmeasure(haction, hdate, huser, id, fk_ref_gm_status, mod_user, mod_date)
+VALUES (2, '2018-06-11 14:02:00', 'admin',5,3, 'admin', '2018-06-11 14:02:00');
+INSERT INTO public.htbl_gridmeasure(haction, hdate, huser, id, fk_ref_gm_status, mod_user, mod_date)
+VALUES (2, '2018-06-11 14:03:00', 'admin',5,4, 'admin', '2018-06-11 14:03:00');
+
+
+INSERT INTO public.htbl_gridmeasure(haction, hdate, huser, id, fk_ref_gm_status, mod_user, mod_date)
+VALUES (2, '2018-06-11 14:00:00', 'admin',4,0, 'admin', '2018-06-11 14:00:00');
+INSERT INTO public.htbl_gridmeasure(haction, hdate, huser, id, fk_ref_gm_status, mod_user, mod_date)
+VALUES (2, '2018-06-11 14:01:00', 'admin',4,1, 'admin', '2018-06-11 14:01:00');
+INSERT INTO public.htbl_gridmeasure(haction, hdate, huser, id, fk_ref_gm_status, mod_user, mod_date)
+VALUES (2, '2018-06-11 14:02:00', 'admin',4,3, 'admin', '2018-06-11 14:02:00');
+
+
+INSERT INTO public.htbl_gridmeasure(haction, hdate, huser, id, fk_ref_gm_status, mod_user, mod_date)
+VALUES (2, '2018-06-11 14:00:00', 'admin',3,0, 'admin', '2018-06-11 14:00:00');
+INSERT INTO public.htbl_gridmeasure(haction, hdate, huser, id, fk_ref_gm_status, mod_user, mod_date)
+VALUES (2, '2018-06-11 14:01:00', 'admin',3,1, 'admin', '2018-06-11 14:01:00');
+INSERT INTO public.htbl_gridmeasure(haction, hdate, huser, id, fk_ref_gm_status, mod_user, mod_date)
+VALUES (2, '2018-06-11 14:02:00', 'admin',3,3, 'admin', '2018-06-11 14:02:00');
+INSERT INTO public.htbl_gridmeasure(haction, hdate, huser, id, fk_ref_gm_status, mod_user, mod_date)
+VALUES (2, '2018-06-11 14:03:00', 'admin',3,2, 'admin', '2018-06-11 14:03:00');
+
+
+INSERT INTO public.htbl_gridmeasure(haction, hdate, huser, id, fk_ref_gm_status, mod_user, mod_date)
+VALUES (2, '2018-06-11 14:00:00', 'admin',2,0, 'jasper', '2018-06-11 14:00:00');
+INSERT INTO public.htbl_gridmeasure(haction, hdate, huser, id, fk_ref_gm_status, mod_user, mod_date)
+VALUES (2, '2018-06-11 14:01:00', 'admin',2,1, 'jasper', '2018-06-11 14:01:00');
+
+
+INSERT INTO public.htbl_gridmeasure(haction, hdate, huser, id, fk_ref_gm_status, mod_user, mod_date)
+VALUES (2, '2018-06-11 14:01:00', 'admin',1,0, 'otto', '2018-06-11 14:01:00');
+
+-- PUBLIC.HTBL_ID_COUNTER Automatic generanted History Table DDL --
+-- <GENERATED CODE!>
+
+DROP TABLE IF EXISTS PUBLIC.HTBL_ID_COUNTER;
+DROP SEQUENCE IF EXISTS PUBLIC.HTBL_ID_COUNTER_ID_SEQ;
+
+CREATE SEQUENCE PUBLIC.HTBL_ID_COUNTER_ID_SEQ
+ INCREMENT 1
+ MINVALUE 1
+ MAXVALUE 9223372036854775807
+ START 1
+ CACHE 1;
+
+ALTER TABLE PUBLIC.HTBL_ID_COUNTER_ID_SEQ
+ OWNER TO PLGM_SERVICE;
+
+CREATE TABLE PUBLIC.HTBL_ID_COUNTER
+(
+ HID integer NOT NULL DEFAULT nextval('HTBL_ID_COUNTER_ID_SEQ'::regclass),
+ HACTION integer NOT NULL,
+ HDATE timestamp without time zone NOT NULL,
+ HUSER character varying(100),
+
+ ID integer,
+ COUNTER integer,
+ COUNTER_TYPE character varying (256),
+ INFO character varying (256),
+
+ CREATE_USER character varying(100),
+ CREATE_DATE timestamp without time zone,
+ MOD_USER character varying(100),
+ MOD_DATE timestamp without time zone,
+ CONSTRAINT HTBL_ID_COUNTER_PKEY PRIMARY KEY (HID)
+)
+WITH (
+ OIDS=FALSE
+);
+
+ALTER TABLE PUBLIC.HTBL_ID_COUNTER
+ OWNER TO PLGM_SERVICE;
+GRANT ALL ON TABLE PUBLIC.HTBL_ID_COUNTER TO PLGM_SERVICE;
+
+
+
+-- PUBLIC.HTBL_SINGLE_GRIDMEASURE Automatic generanted History Table DDL --
+-- <GENERATED CODE!>
+
+DROP TABLE IF EXISTS PUBLIC.HTBL_SINGLE_GRIDMEASURE;
+DROP SEQUENCE IF EXISTS PUBLIC.HTBL_SINGLE_GRIDMEASURE_ID_SEQ;
+
+CREATE SEQUENCE PUBLIC.HTBL_SINGLE_GRIDMEASURE_ID_SEQ
+ INCREMENT 1
+ MINVALUE 1
+ MAXVALUE 9223372036854775807
+ START 1
+ CACHE 1;
+
+ALTER TABLE PUBLIC.HTBL_SINGLE_GRIDMEASURE_ID_SEQ
+ OWNER TO PLGM_SERVICE;
+
+
+
+CREATE TABLE PUBLIC.HTBL_SINGLE_GRIDMEASURE
+(
+ HID integer NOT NULL DEFAULT nextval('HTBL_SINGLE_GRIDMEASURE_ID_SEQ'::regclass),
+ HACTION integer NOT NULL,
+ HDATE timestamp without time zone NOT NULL,
+ HUSER character varying(100),
+
+ ID integer,
+ SORTORDER integer,
+ TITLE character varying (256),
+ SWITCHING_OBJECT character varying (256),
+ CIM_ID character varying (256),
+ CIM_NAME character varying (256),
+ CIM_DESCRIPTION character varying (1024),
+ RESPONSIBLE_ONSITE_NAME character varying(256),
+ RESPONSIBLE_ONSITE_DEPARTMENT character varying(256),
+ NETWORK_CONTROL character varying (256),
+ PLANNED_STARTTIME_SINGLEMEASURE timestamp without time zone,
+ PLANNED_ENDTIME_SINGLEMEASURE timestamp without time zone,
+ DESCRIPTION character varying (1024),
+ FK_TBL_GRIDMEASURE integer,
+
+ CREATE_USER character varying(100),
+ CREATE_DATE timestamp without time zone,
+ MOD_USER character varying(100),
+ MOD_DATE timestamp without time zone,
+ CONSTRAINT HTBL_SINGLE_GRIDMEASURE_PKEY PRIMARY KEY (HID)
+)
+WITH (
+ OIDS=FALSE
+);
+
+ALTER TABLE PUBLIC.HTBL_SINGLE_GRIDMEASURE
+ OWNER TO PLGM_SERVICE;
+GRANT ALL ON TABLE PUBLIC.HTBL_SINGLE_GRIDMEASURE TO PLGM_SERVICE;
+
+
+
+
+-- PUBLIC.HTBL_STEPS Automatic generanted History Table DDL --
+-- <GENERATED CODE!>
+
+DROP TABLE IF EXISTS PUBLIC.HTBL_STEPS;
+DROP SEQUENCE IF EXISTS PUBLIC.HTBL_STEPS_ID_SEQ;
+
+CREATE SEQUENCE PUBLIC.HTBL_STEPS_ID_SEQ
+ INCREMENT 1
+ MINVALUE 1
+ MAXVALUE 9223372036854775807
+ START 1
+ CACHE 1;
+
+ALTER TABLE PUBLIC.HTBL_STEPS_ID_SEQ
+ OWNER TO PLGM_SERVICE;
+
+CREATE TABLE PUBLIC.HTBL_STEPS
+(
+ HID integer NOT NULL DEFAULT nextval('HTBL_STEPS_ID_SEQ'::regclass),
+ HACTION integer NOT NULL,
+ HDATE timestamp without time zone NOT NULL,
+ HUSER character varying(100),
+
+ ID integer,
+ SORTORDER integer,
+ SWITCHING_OBJECT character varying (256),
+ TYPE character varying(256),
+ PRESENT_TIME character varying(256),
+ PRESENT_STATE character varying(256),
+ TARGET_STATE character varying (256),
+ OPERATOR character varying(256),
+ FK_TBL_SINGLE_GRIDMEASURE integer,
+ CREATE_USER character varying (100),
+ CREATE_DATE timestamp without time zone,
+ MOD_USER character varying (100),
+ MOD_DATE timestamp without time zone,
+
+ CONSTRAINT HTBL_STEPS_PKEY PRIMARY KEY (HID)
+)
+WITH (
+ OIDS=FALSE
+);
+
+ALTER TABLE PUBLIC.HTBL_STEPS
+ OWNER TO PLGM_SERVICE;
+GRANT ALL ON TABLE PUBLIC.HTBL_STEPS TO PLGM_SERVICE;
+
+
+-- PUBLIC.HTBL_DOCUMENTS Automatic generanted History Table DDL --
+-- <GENERATED CODE!>
+
+DROP TABLE IF EXISTS PUBLIC.HTBL_DOCUMENTS;
+DROP SEQUENCE IF EXISTS PUBLIC.HTBL_DOCUMENTS_ID_SEQ;
+
+CREATE SEQUENCE PUBLIC.HTBL_DOCUMENTS_ID_SEQ
+ INCREMENT 1
+ MINVALUE 1
+ MAXVALUE 9223372036854775807
+ START 1
+ CACHE 1;
+
+ALTER TABLE PUBLIC.HTBL_DOCUMENTS_ID_SEQ
+ OWNER TO PLGM_SERVICE;
+
+CREATE TABLE PUBLIC.HTBL_DOCUMENTS
+(
+ HID integer NOT NULL DEFAULT nextval('HTBL_DOCUMENTS_ID_SEQ'::regclass),
+ HACTION integer NOT NULL,
+ HDATE timestamp without time zone NOT NULL,
+ HUSER character varying(100),
+
+ ID integer,
+ DOCUMENT_NAME character varying (260),
+ DOCUMENT bytea,
+
+ CREATE_USER character varying(100),
+ CREATE_DATE timestamp without time zone,
+ MOD_USER character varying(100),
+ MOD_DATE timestamp without time zone,
+ CONSTRAINT HTBL_DOCUMENTS_PKEY PRIMARY KEY (HID)
+)
+WITH (
+ OIDS=FALSE
+);
+
+ALTER TABLE PUBLIC.HTBL_DOCUMENTS
+ OWNER TO PLGM_SERVICE;
+GRANT ALL ON TABLE PUBLIC.HTBL_DOCUMENTS TO PLGM_SERVICE;
+
+-- PUBLIC.HTBL_MEASURE_DOCUMENTS Automatic generanted History Table DDL --
+-- <GENERATED CODE!>
+
+DROP TABLE IF EXISTS PUBLIC.HTBL_MEASURE_DOCUMENTS;
+DROP SEQUENCE IF EXISTS PUBLIC.HTBL_MEASURE_DOCUMENTS_ID_SEQ;
+
+CREATE SEQUENCE PUBLIC.HTBL_MEASURE_DOCUMENTS_ID_SEQ
+ INCREMENT 1
+ MINVALUE 1
+ MAXVALUE 9223372036854775807
+ START 1
+ CACHE 1;
+
+ALTER TABLE PUBLIC.HTBL_MEASURE_DOCUMENTS_ID_SEQ
+ OWNER TO PLGM_SERVICE;
+
+CREATE TABLE PUBLIC.HTBL_MEASURE_DOCUMENTS
+(
+ HID integer NOT NULL DEFAULT nextval('HTBL_MEASURE_DOCUMENTS_ID_SEQ'::regclass),
+ HACTION integer NOT NULL,
+ HDATE timestamp without time zone NOT NULL,
+ HUSER character varying(100),
+
+ ID integer,
+ FK_TBL_MEASURE integer,
+ FK_TBL_DOCUMENTS integer,
+
+ CREATE_USER character varying(100),
+ CREATE_DATE timestamp without time zone,
+ MOD_USER character varying(100),
+ MOD_DATE timestamp without time zone,
+ CONSTRAINT HTBL_MEASURE_DOCUMENTS_PKEY PRIMARY KEY (HID)
+)
+WITH (
+ OIDS=FALSE
+);
+
+ALTER TABLE PUBLIC.HTBL_MEASURE_DOCUMENTS
+ OWNER TO PLGM_SERVICE;
+GRANT ALL ON TABLE PUBLIC.HTBL_MEASURE_DOCUMENTS TO PLGM_SERVICE;
+
+-- ----------------------------------------------------------------------------
+-- ----------------------------------------------------------------------------
+-- TRIGGER
+-- ----------------------------------------------------------------------------
+-- ----------------------------------------------------------------------------
+
+-- ---------------------------------------------
+-- TRIGGER REF_TERRITORY
+-- ---------------------------------------------
+
+
+-- PUBLIC.REF_TERRITORY INSERT TRIGGER --
+-- <GENERATED CODE!>
+CREATE OR REPLACE FUNCTION PUBLIC.REF_TERRITORY_INSERT_TRG()
+ RETURNS trigger AS
+$BODY$
+ BEGIN
+ INSERT INTO HREF_TERRITORY (
+ ID,NAME,DESCRIPTION,CREATE_USER,CREATE_DATE,MOD_USER,MOD_DATE,
+
+ HACTION,
+ HDATE,
+ HUSER
+ )
+ VALUES (
+
+ NEW.ID,NEW.NAME,NEW.DESCRIPTION,NEW.CREATE_USER,NEW.CREATE_DATE,NEW.MOD_USER,NEW.MOD_DATE,
+
+ 1,
+ current_timestamp,
+ NEW.CREATE_USER );
+
+ RETURN NEW;
+ END;
+$BODY$
+ LANGUAGE plpgsql VOLATILE
+ COST 100;
+ALTER FUNCTION PUBLIC.REF_TERRITORY_INSERT_TRG()
+ OWNER TO PLGM_SERVICE;
+
+
+DROP TRIGGER IF EXISTS REF_TERRITORY_INSERT_TRG ON PUBLIC.REF_TERRITORY;
+
+CREATE TRIGGER REF_TERRITORY_INSERT_TRG
+ BEFORE INSERT
+ ON PUBLIC.REF_TERRITORY
+ FOR EACH ROW
+ EXECUTE PROCEDURE PUBLIC.REF_TERRITORY_INSERT_TRG();
+
+
+
+-- PUBLIC.REF_TERRITORY UPDATE TRIGGER --
+-- <GENERATED CODE!>
+
+CREATE OR REPLACE FUNCTION PUBLIC.REF_TERRITORY_UPDATE_TRG()
+ RETURNS trigger AS
+$BODY$
+ BEGIN
+ INSERT INTO HREF_TERRITORY (
+ ID,NAME,DESCRIPTION,CREATE_USER,CREATE_DATE,MOD_USER,MOD_DATE,
+
+ HACTION,
+ HDATE,
+ HUSER
+ )
+ VALUES (
+ NEW.ID,NEW.NAME,NEW.DESCRIPTION,NEW.CREATE_USER,NEW.CREATE_DATE,NEW.MOD_USER,NEW.MOD_DATE,
+ 2,
+ current_timestamp,
+ NEW.MOD_USER
+ );
+
+ RETURN NEW;
+ END;
+$BODY$
+ LANGUAGE plpgsql VOLATILE
+ COST 100;
+ALTER FUNCTION PUBLIC.REF_TERRITORY_UPDATE_TRG()
+ OWNER TO PLGM_SERVICE;
+
+DROP TRIGGER IF EXISTS REF_TERRITORY_UPDATE_TRG ON PUBLIC.REF_TERRITORY;
+
+CREATE TRIGGER REF_TERRITORY_UPDATE_TRG
+ BEFORE UPDATE
+ ON PUBLIC.REF_TERRITORY
+ FOR EACH ROW
+ EXECUTE PROCEDURE PUBLIC.REF_TERRITORY_UPDATE_TRG();
+
+
+
+-- PUBLIC.REF_TERRITORY DELETE TRIGGER --
+-- <GENERATED CODE!>
+
+CREATE OR REPLACE FUNCTION PUBLIC.REF_TERRITORY_DELETE_TRG()
+ RETURNS trigger AS
+$BODY$
+ BEGIN
+ IF TG_OP = 'DELETE' THEN
+ INSERT INTO HREF_TERRITORY (
+
+ ID,NAME,DESCRIPTION,CREATE_USER,CREATE_DATE,MOD_USER,MOD_DATE,
+
+ HACTION,
+ HDATE,
+ HUSER
+ )
+ VALUES (
+ OLD.ID,OLD.NAME,OLD.DESCRIPTION,OLD.CREATE_USER,OLD.CREATE_DATE,OLD.MOD_USER,OLD.MOD_DATE,
+
+ 3,
+ current_timestamp,
+ OLD.MOD_USER );
+ END IF;
+
+ RETURN OLD;
+ END;
+$BODY$
+ LANGUAGE plpgsql VOLATILE
+ COST 100;
+ALTER FUNCTION PUBLIC.REF_TERRITORY_DELETE_TRG()
+ OWNER TO PLGM_SERVICE;
+
+DROP TRIGGER IF EXISTS REF_TERRITORY_DELETE_TRG ON PUBLIC.REF_TERRITORY;
+
+CREATE TRIGGER REF_TERRITORY_DELETE_TRG
+ BEFORE DELETE
+ ON PUBLIC.REF_TERRITORY
+ FOR EACH ROW
+ EXECUTE PROCEDURE PUBLIC.REF_TERRITORY_DELETE_TRG();
+
+
+
+-- PUBLIC.TBL_ID_COUNTER INSERT TRIGGER --
+-- <GENERATED CODE!>
+CREATE OR REPLACE FUNCTION PUBLIC.TBL_ID_COUNTER_INSERT_TRG()
+ RETURNS trigger AS
+$BODY$
+ BEGIN
+ INSERT INTO HTBL_ID_COUNTER (
+ ID,COUNTER,COUNTER_TYPE,INFO,CREATE_USER,CREATE_DATE,MOD_USER,MOD_DATE,
+
+ HACTION,
+ HDATE,
+ HUSER
+ )
+ VALUES (
+
+ NEW.ID,NEW.COUNTER,NEW.COUNTER_TYPE,NEW.INFO,NEW.CREATE_USER,NEW.CREATE_DATE,NEW.MOD_USER,NEW.MOD_DATE,
+
+ 1,
+ current_timestamp,
+ NEW.CREATE_USER );
+
+ RETURN NEW;
+ END;
+$BODY$
+ LANGUAGE plpgsql VOLATILE
+ COST 100;
+ALTER FUNCTION PUBLIC.TBL_ID_COUNTER_INSERT_TRG()
+ OWNER TO PLGM_SERVICE;
+
+
+DROP TRIGGER IF EXISTS TBL_ID_COUNTER_INSERT_TRG ON PUBLIC.TBL_ID_COUNTER;
+
+CREATE TRIGGER TBL_ID_COUNTER_INSERT_TRG
+ BEFORE INSERT
+ ON PUBLIC.TBL_ID_COUNTER
+ FOR EACH ROW
+ EXECUTE PROCEDURE PUBLIC.TBL_ID_COUNTER_INSERT_TRG();
+
+
+
+-- PUBLIC.TBL_ID_COUNTER UPDATE TRIGGER --
+-- <GENERATED CODE!>
+
+CREATE OR REPLACE FUNCTION PUBLIC.TBL_ID_COUNTER_UPDATE_TRG()
+ RETURNS trigger AS
+$BODY$
+ BEGIN
+ INSERT INTO HTBL_ID_COUNTER (
+ ID,COUNTER,COUNTER_TYPE,INFO,CREATE_USER,CREATE_DATE,MOD_USER,MOD_DATE,
+
+ HACTION,
+ HDATE,
+ HUSER
+ )
+ VALUES (
+ NEW.ID,NEW.COUNTER,NEW.COUNTER_TYPE,NEW.INFO,NEW.CREATE_USER,NEW.CREATE_DATE,NEW.MOD_USER,NEW.MOD_DATE,
+ 2,
+ current_timestamp,
+ NEW.MOD_USER
+ );
+
+ RETURN NEW;
+ END;
+$BODY$
+ LANGUAGE plpgsql VOLATILE
+ COST 100;
+ALTER FUNCTION PUBLIC.TBL_ID_COUNTER_UPDATE_TRG()
+ OWNER TO PLGM_SERVICE;
+
+DROP TRIGGER IF EXISTS TBL_ID_COUNTER_UPDATE_TRG ON PUBLIC.TBL_ID_COUNTER;
+
+CREATE TRIGGER TBL_ID_COUNTER_UPDATE_TRG
+ BEFORE UPDATE
+ ON PUBLIC.TBL_ID_COUNTER
+ FOR EACH ROW
+ EXECUTE PROCEDURE PUBLIC.TBL_ID_COUNTER_UPDATE_TRG();
+
+
+
+-- PUBLIC.TBL_ID_COUNTER DELETE TRIGGER --
+-- <GENERATED CODE!>
+
+CREATE OR REPLACE FUNCTION PUBLIC.TBL_ID_COUNTER_DELETE_TRG()
+ RETURNS trigger AS
+$BODY$
+ BEGIN
+ IF TG_OP = 'DELETE' THEN
+ INSERT INTO HTBL_ID_COUNTER (
+
+ ID,COUNTER,COUNTER_TYPE,INFO,CREATE_USER,CREATE_DATE,MOD_USER,MOD_DATE,
+
+ HACTION,
+ HDATE,
+ HUSER
+ )
+ VALUES (
+ OLD.ID,OLD.COUNTER,OLD.COUNTER_TYPE,OLD.INFO,OLD.CREATE_USER,OLD.CREATE_DATE,OLD.MOD_USER,OLD.MOD_DATE,
+
+ 3,
+ current_timestamp,
+ OLD.MOD_USER );
+ END IF;
+
+ RETURN OLD;
+ END;
+$BODY$
+ LANGUAGE plpgsql VOLATILE
+ COST 100;
+ALTER FUNCTION PUBLIC.TBL_ID_COUNTER_DELETE_TRG()
+ OWNER TO PLGM_SERVICE;
+
+DROP TRIGGER IF EXISTS TBL_ID_COUNTER_DELETE_TRG ON PUBLIC.TBL_ID_COUNTER;
+
+CREATE TRIGGER TBL_ID_COUNTER_DELETE_TRG
+ BEFORE DELETE
+ ON PUBLIC.TBL_ID_COUNTER
+ FOR EACH ROW
+ EXECUTE PROCEDURE PUBLIC.TBL_ID_COUNTER_DELETE_TRG();
+
+
+
+-- PUBLIC.TBL_SINGLE_GRIDMEASURE INSERT TRIGGER --
+-- <GENERATED CODE!>
+CREATE OR REPLACE FUNCTION PUBLIC.TBL_SINGLE_GRIDMEASURE_INSERT_TRG()
+ RETURNS trigger AS
+$BODY$
+ BEGIN
+ INSERT INTO HTBL_SINGLE_GRIDMEASURE (
+ ID,SORTORDER,TITLE,SWITCHING_OBJECT,CIM_ID,CIM_NAME,CIM_DESCRIPTION,PLANNED_STARTTIME_SINGLEMEASURE,PLANNED_ENDTIME_SINGLEMEASURE,DESCRIPTION, RESPONSIBLE_ONSITE_NAME, RESPONSIBLE_ONSITE_DEPARTMENT,NETWORK_CONTROL,FK_TBL_GRIDMEASURE,CREATE_USER,CREATE_DATE,MOD_USER,MOD_DATE,
+
+ HACTION,
+ HDATE,
+ HUSER
+ )
+ VALUES (
+
+ NEW.ID,NEW.SORTORDER,NEW.TITLE,NEW.SWITCHING_OBJECT,NEW.CIM_ID,NEW.CIM_NAME,NEW.CIM_DESCRIPTION,NEW.PLANNED_STARTTIME_SINGLEMEASURE,NEW.PLANNED_ENDTIME_SINGLEMEASURE,NEW.DESCRIPTION, NEW.RESPONSIBLE_ONSITE_NAME, NEW.RESPONSIBLE_ONSITE_DEPARTMENT,NEW.NETWORK_CONTROL,NEW.FK_TBL_GRIDMEASURE,NEW.CREATE_USER,NEW.CREATE_DATE,NEW.MOD_USER,NEW.MOD_DATE,
+
+ 1,
+ current_timestamp,
+ NEW.CREATE_USER );
+
+ RETURN NEW;
+ END;
+$BODY$
+ LANGUAGE plpgsql VOLATILE
+ COST 100;
+ALTER FUNCTION PUBLIC.TBL_SINGLE_GRIDMEASURE_INSERT_TRG()
+ OWNER TO PLGM_SERVICE;
+
+
+DROP TRIGGER IF EXISTS TBL_SINGLE_GRIDMEASURE_INSERT_TRG ON PUBLIC.TBL_SINGLE_GRIDMEASURE;
+
+CREATE TRIGGER TBL_SINGLE_GRIDMEASURE_INSERT_TRG
+ BEFORE INSERT
+ ON PUBLIC.TBL_SINGLE_GRIDMEASURE
+ FOR EACH ROW
+ EXECUTE PROCEDURE PUBLIC.TBL_SINGLE_GRIDMEASURE_INSERT_TRG();
+
+
+
+-- PUBLIC.TBL_SINGLE_GRIDMEASURE UPDATE TRIGGER --
+-- <GENERATED CODE!>
+
+CREATE OR REPLACE FUNCTION PUBLIC.TBL_SINGLE_GRIDMEASURE_UPDATE_TRG()
+ RETURNS trigger AS
+$BODY$
+ BEGIN
+ INSERT INTO HTBL_SINGLE_GRIDMEASURE (
+ ID,SORTORDER,TITLE,SWITCHING_OBJECT,CIM_ID,CIM_NAME,CIM_DESCRIPTION,PLANNED_STARTTIME_SINGLEMEASURE,PLANNED_ENDTIME_SINGLEMEASURE,DESCRIPTION,RESPONSIBLE_ONSITE_NAME, RESPONSIBLE_ONSITE_DEPARTMENT,NETWORK_CONTROL,FK_TBL_GRIDMEASURE,CREATE_USER,CREATE_DATE,MOD_USER,MOD_DATE,
+
+ HACTION,
+ HDATE,
+ HUSER
+ )
+ VALUES (
+ NEW.ID,NEW.SORTORDER,NEW.TITLE,NEW.SWITCHING_OBJECT,NEW.CIM_ID,NEW.CIM_NAME,NEW.CIM_DESCRIPTION,NEW.PLANNED_STARTTIME_SINGLEMEASURE,NEW.PLANNED_ENDTIME_SINGLEMEASURE,NEW.DESCRIPTION,NEW.RESPONSIBLE_ONSITE_NAME, NEW.RESPONSIBLE_ONSITE_DEPARTMENT,NEW.NETWORK_CONTROL,NEW.FK_TBL_GRIDMEASURE,NEW.CREATE_USER,NEW.CREATE_DATE,NEW.MOD_USER,NEW.MOD_DATE,
+ 2,
+ current_timestamp,
+ NEW.MOD_USER
+ );
+
+ RETURN NEW;
+ END;
+$BODY$
+ LANGUAGE plpgsql VOLATILE
+ COST 100;
+ALTER FUNCTION PUBLIC.TBL_SINGLE_GRIDMEASURE_UPDATE_TRG()
+ OWNER TO PLGM_SERVICE;
+
+DROP TRIGGER IF EXISTS TBL_SINGLE_GRIDMEASURE_UPDATE_TRG ON PUBLIC.TBL_SINGLE_GRIDMEASURE;
+
+CREATE TRIGGER TBL_SINGLE_GRIDMEASURE_UPDATE_TRG
+ BEFORE UPDATE
+ ON PUBLIC.TBL_SINGLE_GRIDMEASURE
+ FOR EACH ROW
+ EXECUTE PROCEDURE PUBLIC.TBL_SINGLE_GRIDMEASURE_UPDATE_TRG();
+
+
+
+-- PUBLIC.TBL_SINGLE_GRIDMEASURE DELETE TRIGGER --
+-- <GENERATED CODE!>
+
+CREATE OR REPLACE FUNCTION PUBLIC.TBL_SINGLE_GRIDMEASURE_DELETE_TRG()
+ RETURNS trigger AS
+$BODY$
+ BEGIN
+ IF TG_OP = 'DELETE' THEN
+ INSERT INTO HTBL_SINGLE_GRIDMEASURE (
+
+ ID,SORTORDER,TITLE,SWITCHING_OBJECT,CIM_ID,CIM_NAME,CIM_DESCRIPTION,PLANNED_STARTTIME_SINGLEMEASURE,PLANNED_ENDTIME_SINGLEMEASURE,DESCRIPTION,RESPONSIBLE_ONSITE_NAME, RESPONSIBLE_ONSITE_DEPARTMENT, NETWORK_CONTROL,FK_TBL_GRIDMEASURE,CREATE_USER,CREATE_DATE,MOD_USER,MOD_DATE,
+
+ HACTION,
+ HDATE,
+ HUSER
+ )
+ VALUES (
+ OLD.ID,OLD.SORTORDER,OLD.TITLE,OLD.SWITCHING_OBJECT,OLD.CIM_ID,OLD.CIM_NAME,OLD.CIM_DESCRIPTION,OLD.PLANNED_STARTTIME_SINGLEMEASURE,OLD.PLANNED_ENDTIME_SINGLEMEASURE,OLD.DESCRIPTION,OLD.RESPONSIBLE_ONSITE_NAME, OLD.RESPONSIBLE_ONSITE_DEPARTMENT,OLD.NETWORK_CONTROL,OLD.FK_TBL_GRIDMEASURE,OLD.CREATE_USER,OLD.CREATE_DATE,OLD.MOD_USER,OLD.MOD_DATE,
+
+ 3,
+ current_timestamp,
+ OLD.MOD_USER );
+ END IF;
+
+ RETURN OLD;
+ END;
+$BODY$
+ LANGUAGE plpgsql VOLATILE
+ COST 100;
+ALTER FUNCTION PUBLIC.TBL_SINGLE_GRIDMEASURE_DELETE_TRG()
+ OWNER TO PLGM_SERVICE;
+
+DROP TRIGGER IF EXISTS TBL_SINGLE_GRIDMEASURE_DELETE_TRG ON PUBLIC.TBL_SINGLE_GRIDMEASURE;
+
+CREATE TRIGGER TBL_SINGLE_GRIDMEASURE_DELETE_TRG
+ BEFORE DELETE
+ ON PUBLIC.TBL_SINGLE_GRIDMEASURE
+ FOR EACH ROW
+ EXECUTE PROCEDURE PUBLIC.TBL_SINGLE_GRIDMEASURE_DELETE_TRG();
+
+
+
+
+
+-- PUBLIC.TBL_STEPS INSERT TRIGGER --
+-- <GENERATED CODE!>
+CREATE OR REPLACE FUNCTION PUBLIC.TBL_STEPS_INSERT_TRG()
+ RETURNS trigger AS
+$BODY$
+ BEGIN
+ INSERT INTO HTBL_STEPS (
+ ID,SORTORDER,SWITCHING_OBJECT,TYPE,PRESENT_TIME, PRESENT_STATE, TARGET_STATE, OPERATOR, FK_TBL_SINGLE_GRIDMEASURE,CREATE_USER,CREATE_DATE,MOD_USER,MOD_DATE,
+
+ HACTION,
+ HDATE,
+ HUSER
+ )
+ VALUES (
+
+ NEW.ID,NEW.SORTORDER,NEW.SWITCHING_OBJECT,NEW.TYPE, NEW.PRESENT_TIME, NEW.PRESENT_STATE, NEW.TARGET_STATE, NEW.OPERATOR, NEW.FK_TBL_SINGLE_GRIDMEASURE,NEW.CREATE_USER,NEW.CREATE_DATE,NEW.MOD_USER,NEW.MOD_DATE,
+
+ 1,
+ current_timestamp,
+ NEW.CREATE_USER );
+
+ RETURN NEW;
+ END;
+$BODY$
+ LANGUAGE plpgsql VOLATILE
+ COST 100;
+ALTER FUNCTION PUBLIC.TBL_STEPS_INSERT_TRG()
+ OWNER TO PLGM_SERVICE;
+
+DROP TRIGGER IF EXISTS TBL_STEPS_INSERT_TRG ON PUBLIC.TBL_STEPS;
+
+CREATE TRIGGER TBL_STEPS_INSERT_TRG
+ BEFORE INSERT
+ ON PUBLIC.TBL_STEPS
+ FOR EACH ROW
+ EXECUTE PROCEDURE PUBLIC.TBL_STEPS_INSERT_TRG();
+
+
+
+-- PUBLIC.TBL_STEPS UPDATE TRIGGER --
+-- <GENERATED CODE!>
+
+CREATE OR REPLACE FUNCTION PUBLIC.TBL_STEPS_UPDATE_TRG()
+ RETURNS trigger AS
+$BODY$
+ BEGIN
+ INSERT INTO HTBL_STEPS (
+ ID,SORTORDER,SWITCHING_OBJECT,TYPE,PRESENT_TIME, PRESENT_STATE, TARGET_STATE, OPERATOR,FK_TBL_SINGLE_GRIDMEASURE,CREATE_USER,CREATE_DATE,MOD_USER,MOD_DATE,
+
+ HACTION,
+ HDATE,
+ HUSER
+ )
+ VALUES (
+ NEW.ID,NEW.SORTORDER,NEW.SWITCHING_OBJECT,NEW.TYPE,NEW.PRESENT_TIME, NEW.PRESENT_STATE, NEW.TARGET_STATE, NEW.OPERATOR,NEW.FK_TBL_SINGLE_GRIDMEASURE,NEW.CREATE_USER,NEW.CREATE_DATE,NEW.MOD_USER,NEW.MOD_DATE,
+ 2,
+ current_timestamp,
+ NEW.MOD_USER
+ );
+
+ RETURN NEW;
+ END;
+$BODY$
+ LANGUAGE plpgsql VOLATILE
+ COST 100;
+ALTER FUNCTION PUBLIC.TBL_STEPS_UPDATE_TRG()
+ OWNER TO PLGM_SERVICE;
+
+DROP TRIGGER IF EXISTS TBL_STEPS_UPDATE_TRG ON PUBLIC.TBL_STEPS;
+
+CREATE TRIGGER TBL_STEPS_UPDATE_TRG
+ BEFORE UPDATE
+ ON PUBLIC.TBL_STEPS
+ FOR EACH ROW
+ EXECUTE PROCEDURE PUBLIC.TBL_STEPS_UPDATE_TRG();
+
+
+
+-- PUBLIC.TBL_STEPS DELETE TRIGGER --
+-- <GENERATED CODE!>
+
+CREATE OR REPLACE FUNCTION PUBLIC.TBL_STEPS_DELETE_TRG()
+ RETURNS trigger AS
+$BODY$
+ BEGIN
+ IF TG_OP = 'DELETE' THEN
+ INSERT INTO HTBL_STEPS (
+
+ ID,SORTORDER,SWITCHING_OBJECT,TYPE,PRESENT_TIME, PRESENT_STATE, TARGET_STATE, OPERATOR,FK_TBL_SINGLE_GRIDMEASURE,CREATE_USER,CREATE_DATE,MOD_USER,MOD_DATE,
+
+ HACTION,
+ HDATE,
+ HUSER
+ )
+ VALUES (
+ OLD.ID,OLD.SORTORDER,OLD.SWITCHING_OBJECT,OLD.TYPE,OLD.PRESENT_TIME, OLD.PRESENT_STATE, OLD.TARGET_STATE, OLD.OPERATOR,OLD.FK_TBL_SINGLE_GRIDMEASURE,OLD.CREATE_USER,OLD.CREATE_DATE,OLD.MOD_USER,OLD.MOD_DATE,
+
+ 3,
+ current_timestamp,
+ OLD.MOD_USER );
+ END IF;
+
+ RETURN OLD;
+ END;
+$BODY$
+ LANGUAGE plpgsql VOLATILE
+ COST 100;
+ALTER FUNCTION PUBLIC.TBL_STEPS_DELETE_TRG()
+ OWNER TO PLGM_SERVICE;
+
+DROP TRIGGER IF EXISTS TBL_STEPS_DELETE_TRG ON PUBLIC.TBL_STEPS;
+
+CREATE TRIGGER TBL_STEPS_DELETE_TRG
+ BEFORE DELETE
+ ON PUBLIC.TBL_STEPS
+ FOR EACH ROW
+ EXECUTE PROCEDURE PUBLIC.TBL_STEPS_DELETE_TRG();
+
+
+-- PUBLIC.TBL_LOCK INSERT TRIGGER --
+-- <GENERATED CODE!>
+CREATE OR REPLACE FUNCTION PUBLIC.TBL_LOCK_INSERT_TRG()
+ RETURNS trigger AS
+$BODY$
+ BEGIN
+ INSERT INTO HTBL_LOCK (
+ ID,KEY,USERNAME,INFO,CREATE_USER,CREATE_DATE,MOD_USER,MOD_DATE,
+
+ HACTION,
+ HDATE,
+ HUSER
+ )
+ VALUES (
+
+ NEW.ID,NEW.KEY,NEW.USERNAME,NEW.INFO,NEW.CREATE_USER,NEW.CREATE_DATE,NEW.MOD_USER,NEW.MOD_DATE,
+
+ 1,
+ current_timestamp,
+ NEW.CREATE_USER );
+
+ RETURN NEW;
+ END;
+$BODY$
+ LANGUAGE plpgsql VOLATILE
+ COST 100;
+ALTER FUNCTION PUBLIC.TBL_LOCK_INSERT_TRG()
+ OWNER TO PLGM_SERVICE;
+
+
+DROP TRIGGER IF EXISTS TBL_LOCK_INSERT_TRG ON PUBLIC.TBL_LOCK;
+
+CREATE TRIGGER TBL_LOCK_INSERT_TRG
+ BEFORE INSERT
+ ON PUBLIC.TBL_LOCK
+ FOR EACH ROW
+ EXECUTE PROCEDURE PUBLIC.TBL_LOCK_INSERT_TRG();
+
+
+
+-- PUBLIC.TBL_LOCK UPDATE TRIGGER --
+-- <GENERATED CODE!>
+
+CREATE OR REPLACE FUNCTION PUBLIC.TBL_LOCK_UPDATE_TRG()
+ RETURNS trigger AS
+$BODY$
+ BEGIN
+ INSERT INTO HTBL_LOCK (
+ ID,KEY,USERNAME,INFO,CREATE_USER,CREATE_DATE,MOD_USER,MOD_DATE,
+
+ HACTION,
+ HDATE,
+ HUSER
+ )
+ VALUES (
+ NEW.ID,NEW.KEY,NEW.USERNAME,NEW.INFO,NEW.CREATE_USER,NEW.CREATE_DATE,NEW.MOD_USER,NEW.MOD_DATE,
+ 2,
+ current_timestamp,
+ NEW.MOD_USER
+ );
+
+ RETURN NEW;
+ END;
+$BODY$
+ LANGUAGE plpgsql VOLATILE
+ COST 100;
+ALTER FUNCTION PUBLIC.TBL_LOCK_UPDATE_TRG()
+ OWNER TO PLGM_SERVICE;
+
+DROP TRIGGER IF EXISTS TBL_LOCK_UPDATE_TRG ON PUBLIC.TBL_LOCK;
+
+CREATE TRIGGER TBL_LOCK_UPDATE_TRG
+ BEFORE UPDATE
+ ON PUBLIC.TBL_LOCK
+ FOR EACH ROW
+ EXECUTE PROCEDURE PUBLIC.TBL_LOCK_UPDATE_TRG();
+
+
+
+-- PUBLIC.TBL_LOCK DELETE TRIGGER --
+-- <GENERATED CODE!>
+
+CREATE OR REPLACE FUNCTION PUBLIC.TBL_LOCK_DELETE_TRG()
+ RETURNS trigger AS
+$BODY$
+ BEGIN
+ IF TG_OP = 'DELETE' THEN
+ INSERT INTO HTBL_LOCK (
+
+ ID,KEY,USERNAME,INFO,CREATE_USER,CREATE_DATE,MOD_USER,MOD_DATE,
+
+ HACTION,
+ HDATE,
+ HUSER
+ )
+ VALUES (
+ OLD.ID,OLD.KEY,OLD.USERNAME,OLD.INFO,OLD.CREATE_USER,OLD.CREATE_DATE,OLD.MOD_USER,OLD.MOD_DATE,
+
+ 3,
+ current_timestamp,
+ OLD.MOD_USER );
+ END IF;
+
+ RETURN OLD;
+ END;
+$BODY$
+ LANGUAGE plpgsql VOLATILE
+ COST 100;
+ALTER FUNCTION PUBLIC.TBL_LOCK_DELETE_TRG()
+ OWNER TO PLGM_SERVICE;
+
+DROP TRIGGER IF EXISTS TBL_LOCK_DELETE_TRG ON PUBLIC.TBL_LOCK;
+
+CREATE TRIGGER TBL_LOCK_DELETE_TRG
+ BEFORE DELETE
+ ON PUBLIC.TBL_LOCK
+ FOR EACH ROW
+ EXECUTE PROCEDURE PUBLIC.TBL_LOCK_DELETE_TRG();
+
+
+
+
+-- PUBLIC.TBL_USER_SETTINGS INSERT TRIGGER --
+-- <GENERATED CODE!>
+CREATE OR REPLACE FUNCTION PUBLIC.TBL_USER_SETTINGS_INSERT_TRG()
+ RETURNS trigger AS
+$BODY$
+ BEGIN
+ INSERT INTO HTBL_USER_SETTINGS (
+ ID,USERNAME,SETTING_TYPE,VALUE,CREATE_USER,CREATE_DATE,MOD_USER,MOD_DATE,
+
+ HACTION,
+ HDATE,
+ HUSER
+ )
+ VALUES (
+
+ NEW.ID,NEW.USERNAME,NEW.SETTING_TYPE,NEW.VALUE,NEW.CREATE_USER,NEW.CREATE_DATE,NEW.MOD_USER,NEW.MOD_DATE,
+
+ 1,
+ current_timestamp,
+ NEW.CREATE_USER );
+
+ RETURN NEW;
+ END;
+$BODY$
+ LANGUAGE plpgsql VOLATILE
+ COST 100;
+ALTER FUNCTION PUBLIC.TBL_USER_SETTINGS_INSERT_TRG()
+ OWNER TO PLGM_SERVICE;
+
+
+DROP TRIGGER IF EXISTS TBL_USER_SETTINGS_INSERT_TRG ON PUBLIC.TBL_USER_SETTINGS;
+
+CREATE TRIGGER TBL_USER_SETTINGS_INSERT_TRG
+ BEFORE INSERT
+ ON PUBLIC.TBL_USER_SETTINGS
+ FOR EACH ROW
+ EXECUTE PROCEDURE PUBLIC.TBL_USER_SETTINGS_INSERT_TRG();
+
+
+
+-- PUBLIC.TBL_USER_SETTINGS UPDATE TRIGGER --
+-- <GENERATED CODE!>
+
+CREATE OR REPLACE FUNCTION PUBLIC.TBL_USER_SETTINGS_UPDATE_TRG()
+ RETURNS trigger AS
+$BODY$
+ BEGIN
+ INSERT INTO HTBL_USER_SETTINGS (
+ ID,USERNAME,SETTING_TYPE,VALUE,CREATE_USER,CREATE_DATE,MOD_USER,MOD_DATE,
+
+ HACTION,
+ HDATE,
+ HUSER
+ )
+ VALUES (
+ NEW.ID,NEW.USERNAME,NEW.SETTING_TYPE,NEW.VALUE,NEW.CREATE_USER,NEW.CREATE_DATE,NEW.MOD_USER,NEW.MOD_DATE,
+ 2,
+ current_timestamp,
+ NEW.MOD_USER
+ );
+
+ RETURN NEW;
+ END;
+$BODY$
+ LANGUAGE plpgsql VOLATILE
+ COST 100;
+ALTER FUNCTION PUBLIC.TBL_USER_SETTINGS_UPDATE_TRG()
+ OWNER TO PLGM_SERVICE;
+
+DROP TRIGGER IF EXISTS TBL_USER_SETTINGS_UPDATE_TRG ON PUBLIC.TBL_USER_SETTINGS;
+
+CREATE TRIGGER TBL_USER_SETTINGS_UPDATE_TRG
+ BEFORE UPDATE
+ ON PUBLIC.TBL_USER_SETTINGS
+ FOR EACH ROW
+ EXECUTE PROCEDURE PUBLIC.TBL_USER_SETTINGS_UPDATE_TRG();
+
+
+
+-- PUBLIC.TBL_USER_SETTINGS DELETE TRIGGER --
+-- <GENERATED CODE!>
+
+CREATE OR REPLACE FUNCTION PUBLIC.TBL_USER_SETTINGS_DELETE_TRG()
+ RETURNS trigger AS
+$BODY$
+ BEGIN
+ IF TG_OP = 'DELETE' THEN
+ INSERT INTO HTBL_USER_SETTINGS (
+
+ ID,USERNAME,SETTING_TYPE,VALUE,CREATE_USER,CREATE_DATE,MOD_USER,MOD_DATE,
+
+ HACTION,
+ HDATE,
+ HUSER
+ )
+ VALUES (
+ OLD.ID,OLD.USERNAME,OLD.SETTING_TYPE,OLD.VALUE,OLD.CREATE_USER,OLD.CREATE_DATE,OLD.MOD_USER,OLD.MOD_DATE,
+
+ 3,
+ current_timestamp,
+ OLD.MOD_USER );
+ END IF;
+
+ RETURN OLD;
+ END;
+$BODY$
+ LANGUAGE plpgsql VOLATILE
+ COST 100;
+ALTER FUNCTION PUBLIC.TBL_USER_SETTINGS_DELETE_TRG()
+ OWNER TO PLGM_SERVICE;
+
+DROP TRIGGER IF EXISTS TBL_USER_SETTINGS_DELETE_TRG ON PUBLIC.TBL_USER_SETTINGS;
+
+CREATE TRIGGER TBL_USER_SETTINGS_DELETE_TRG
+ BEFORE DELETE
+ ON PUBLIC.TBL_USER_SETTINGS
+ FOR EACH ROW
+ EXECUTE PROCEDURE PUBLIC.TBL_USER_SETTINGS_DELETE_TRG();
+
+
+
+-- PUBLIC.REF_USER_DEPARTMENT INSERT TRIGGER --
+-- <GENERATED CODE!>
+CREATE OR REPLACE FUNCTION PUBLIC.REF_USER_DEPARTMENT_INSERT_TRG()
+ RETURNS trigger AS
+$BODY$
+ BEGIN
+ INSERT INTO HREF_USER_DEPARTMENT (
+ ID,NAME,CREATE_USER,CREATE_DATE,MOD_USER,MOD_DATE,
+
+ HACTION,
+ HDATE,
+ HUSER
+ )
+ VALUES (
+
+ NEW.ID,NEW.NAME,NEW.CREATE_USER,NEW.CREATE_DATE,NEW.MOD_USER,NEW.MOD_DATE,
+
+ 1,
+ current_timestamp,
+ NEW.CREATE_USER );
+
+ RETURN NEW;
+ END;
+$BODY$
+ LANGUAGE plpgsql VOLATILE
+ COST 100;
+ALTER FUNCTION PUBLIC.REF_USER_DEPARTMENT_INSERT_TRG()
+ OWNER TO PLGM_SERVICE;
+
+
+DROP TRIGGER IF EXISTS REF_USER_DEPARTMENT_INSERT_TRG ON PUBLIC.REF_USER_DEPARTMENT;
+
+CREATE TRIGGER REF_USER_DEPARTMENT_INSERT_TRG
+ BEFORE INSERT
+ ON PUBLIC.REF_USER_DEPARTMENT
+ FOR EACH ROW
+ EXECUTE PROCEDURE PUBLIC.REF_USER_DEPARTMENT_INSERT_TRG();
+
+
+
+-- PUBLIC.REF_USER_DEPARTMENT UPDATE TRIGGER --
+-- <GENERATED CODE!>
+
+CREATE OR REPLACE FUNCTION PUBLIC.REF_USER_DEPARTMENT_UPDATE_TRG()
+ RETURNS trigger AS
+$BODY$
+ BEGIN
+ INSERT INTO HREF_USER_DEPARTMENT (
+ ID,NAME,CREATE_USER,CREATE_DATE,MOD_USER,MOD_DATE,
+
+ HACTION,
+ HDATE,
+ HUSER
+ )
+ VALUES (
+ NEW.ID,NEW.NAME,NEW.CREATE_USER,NEW.CREATE_DATE,NEW.MOD_USER,NEW.MOD_DATE,
+ 2,
+ current_timestamp,
+ NEW.MOD_USER
+ );
+
+ RETURN NEW;
+ END;
+$BODY$
+ LANGUAGE plpgsql VOLATILE
+ COST 100;
+ALTER FUNCTION PUBLIC.REF_USER_DEPARTMENT_UPDATE_TRG()
+ OWNER TO PLGM_SERVICE;
+
+DROP TRIGGER IF EXISTS REF_USER_DEPARTMENT_UPDATE_TRG ON PUBLIC.REF_USER_DEPARTMENT;
+
+CREATE TRIGGER REF_USER_DEPARTMENT_UPDATE_TRG
+ BEFORE UPDATE
+ ON PUBLIC.REF_USER_DEPARTMENT
+ FOR EACH ROW
+ EXECUTE PROCEDURE PUBLIC.REF_USER_DEPARTMENT_UPDATE_TRG();
+
+
+
+-- PUBLIC.REF_USER_DEPARTMENT DELETE TRIGGER --
+-- <GENERATED CODE!>
+
+CREATE OR REPLACE FUNCTION PUBLIC.REF_USER_DEPARTMENT_DELETE_TRG()
+ RETURNS trigger AS
+$BODY$
+ BEGIN
+ IF TG_OP = 'DELETE' THEN
+ INSERT INTO HREF_USER_DEPARTMENT (
+
+ ID,NAME,CREATE_USER,CREATE_DATE,MOD_USER,MOD_DATE,
+
+ HACTION,
+ HDATE,
+ HUSER
+ )
+ VALUES (
+ OLD.ID,OLD.NAME,OLD.CREATE_USER,OLD.CREATE_DATE,OLD.MOD_USER,OLD.MOD_DATE,
+
+ 3,
+ current_timestamp,
+ OLD.MOD_USER );
+ END IF;
+
+ RETURN OLD;
+ END;
+$BODY$
+ LANGUAGE plpgsql VOLATILE
+ COST 100;
+ALTER FUNCTION PUBLIC.REF_USER_DEPARTMENT_DELETE_TRG()
+ OWNER TO PLGM_SERVICE;
+
+DROP TRIGGER IF EXISTS REF_USER_DEPARTMENT_DELETE_TRG ON PUBLIC.REF_USER_DEPARTMENT;
+
+CREATE TRIGGER REF_USER_DEPARTMENT_DELETE_TRG
+ BEFORE DELETE
+ ON PUBLIC.REF_USER_DEPARTMENT
+ FOR EACH ROW
+ EXECUTE PROCEDURE PUBLIC.REF_USER_DEPARTMENT_DELETE_TRG();
+
+
+-- PUBLIC.HREF_COST_CENTER INSERT TRIGGER --
+-- <GENERATED CODE!>
+CREATE OR REPLACE FUNCTION PUBLIC.HREF_COST_CENTER_INSERT_TRG()
+ RETURNS trigger AS
+$BODY$
+ BEGIN
+ INSERT INTO HHREF_COST_CENTER (
+ HID,HACTION,HDATE,HUSER,ID,NAME,DESCRIPTION,CREATE_USER,CREATE_DATE,MOD_USER,MOD_DATE,
+
+ HACTION,
+ HDATE,
+ HUSER
+ )
+ VALUES (
+
+ NEW.HID,NEW.HACTION,NEW.HDATE,NEW.HUSER,NEW.ID,NEW.NAME,NEW.DESCRIPTION,NEW.CREATE_USER,NEW.CREATE_DATE,NEW.MOD_USER,NEW.MOD_DATE,
+
+ 1,
+ current_timestamp,
+ NEW.CREATE_USER );
+
+ RETURN NEW;
+ END;
+$BODY$
+ LANGUAGE plpgsql VOLATILE
+ COST 100;
+ALTER FUNCTION PUBLIC.HREF_COST_CENTER_INSERT_TRG()
+ OWNER TO PLGM_SERVICE;
+
+
+DROP TRIGGER IF EXISTS HREF_COST_CENTER_INSERT_TRG ON PUBLIC.HREF_COST_CENTER;
+
+CREATE TRIGGER HREF_COST_CENTER_INSERT_TRG
+ BEFORE INSERT
+ ON PUBLIC.HREF_COST_CENTER
+ FOR EACH ROW
+ EXECUTE PROCEDURE PUBLIC.HREF_COST_CENTER_INSERT_TRG();
+
+
+
+-- PUBLIC.HREF_COST_CENTER UPDATE TRIGGER --
+-- <GENERATED CODE!>
+
+CREATE OR REPLACE FUNCTION PUBLIC.HREF_COST_CENTER_UPDATE_TRG()
+ RETURNS trigger AS
+$BODY$
+ BEGIN
+ INSERT INTO HHREF_COST_CENTER (
+ HID,HACTION,HDATE,HUSER,ID,NAME,DESCRIPTION,CREATE_USER,CREATE_DATE,MOD_USER,MOD_DATE,
+
+ HACTION,
+ HDATE,
+ HUSER
+ )
+ VALUES (
+ NEW.HID,NEW.HACTION,NEW.HDATE,NEW.HUSER,NEW.ID,NEW.NAME,NEW.DESCRIPTION,NEW.CREATE_USER,NEW.CREATE_DATE,NEW.MOD_USER,NEW.MOD_DATE,
+ 2,
+ current_timestamp,
+ NEW.MOD_USER
+ );
+
+ RETURN NEW;
+ END;
+$BODY$
+ LANGUAGE plpgsql VOLATILE
+ COST 100;
+ALTER FUNCTION PUBLIC.HREF_COST_CENTER_UPDATE_TRG()
+ OWNER TO PLGM_SERVICE;
+
+DROP TRIGGER IF EXISTS HREF_COST_CENTER_UPDATE_TRG ON PUBLIC.HREF_COST_CENTER;
+
+CREATE TRIGGER HREF_COST_CENTER_UPDATE_TRG
+ BEFORE UPDATE
+ ON PUBLIC.HREF_COST_CENTER
+ FOR EACH ROW
+ EXECUTE PROCEDURE PUBLIC.HREF_COST_CENTER_UPDATE_TRG();
+
+
+
+-- PUBLIC.HREF_COST_CENTER DELETE TRIGGER --
+-- <GENERATED CODE!>
+
+CREATE OR REPLACE FUNCTION PUBLIC.HREF_COST_CENTER_DELETE_TRG()
+ RETURNS trigger AS
+$BODY$
+ BEGIN
+ IF TG_OP = 'DELETE' THEN
+ INSERT INTO HHREF_COST_CENTER (
+
+ HID,HACTION,HDATE,HUSER,ID,NAME,DESCRIPTION,CREATE_USER,CREATE_DATE,MOD_USER,MOD_DATE,
+
+ HACTION,
+ HDATE,
+ HUSER
+ )
+ VALUES (
+ OLD.HID,OLD.HACTION,OLD.HDATE,OLD.HUSER,OLD.ID,OLD.NAME,OLD.DESCRIPTION,OLD.CREATE_USER,OLD.CREATE_DATE,OLD.MOD_USER,OLD.MOD_DATE,
+
+ 3,
+ current_timestamp,
+ OLD.MOD_USER );
+ END IF;
+
+ RETURN OLD;
+ END;
+$BODY$
+ LANGUAGE plpgsql VOLATILE
+ COST 100;
+ALTER FUNCTION PUBLIC.HREF_COST_CENTER_DELETE_TRG()
+ OWNER TO PLGM_SERVICE;
+
+DROP TRIGGER IF EXISTS HREF_COST_CENTER_DELETE_TRG ON PUBLIC.HREF_COST_CENTER;
+
+CREATE TRIGGER HREF_COST_CENTER_DELETE_TRG
+ BEFORE DELETE
+ ON PUBLIC.HREF_COST_CENTER
+ FOR EACH ROW
+ EXECUTE PROCEDURE PUBLIC.HREF_COST_CENTER_DELETE_TRG();
+
+
+
+-- PUBLIC.REF_BRANCH INSERT TRIGGER --
+-- <GENERATED CODE!>
+CREATE OR REPLACE FUNCTION PUBLIC.REF_BRANCH_INSERT_TRG()
+ RETURNS trigger AS
+$BODY$
+ BEGIN
+ INSERT INTO HREF_BRANCH (
+
+ ID,NAME,DESCRIPTION,COLOR_CODE,CREATE_USER,CREATE_DATE,MOD_USER,MOD_DATE,
+
+ HACTION,
+ HDATE,
+ HUSER
+ )
+ VALUES (
+
+ NEW.ID,NEW.NAME,NEW.DESCRIPTION,NEW.COLOR_CODE,NEW.CREATE_USER,NEW.CREATE_DATE,NEW.MOD_USER,NEW.MOD_DATE,
+ 1,
+ current_timestamp,
+ NEW.CREATE_USER );
+
+ RETURN NEW;
+ END;
+$BODY$
+ LANGUAGE plpgsql VOLATILE
+ COST 100;
+ALTER FUNCTION PUBLIC.REF_BRANCH_INSERT_TRG()
+ OWNER TO PLGM_SERVICE;
+
+
+DROP TRIGGER IF EXISTS REF_BRANCH_INSERT_TRG ON PUBLIC.REF_BRANCH;
+
+CREATE TRIGGER REF_BRANCH_INSERT_TRG
+ BEFORE INSERT
+ ON PUBLIC.REF_BRANCH
+ FOR EACH ROW
+ EXECUTE PROCEDURE PUBLIC.REF_BRANCH_INSERT_TRG();
+
+
+
+-- PUBLIC.REF_BRANCH UPDATE TRIGGER --
+-- <GENERATED CODE!>
+
+CREATE OR REPLACE FUNCTION PUBLIC.REF_BRANCH_UPDATE_TRG()
+ RETURNS trigger AS
+$BODY$
+ BEGIN
+ INSERT INTO HREF_BRANCH (
+ ID,NAME,DESCRIPTION,COLOR_CODE,CREATE_USER,CREATE_DATE,MOD_USER,MOD_DATE,
+
+ HACTION,
+ HDATE,
+ HUSER
+ )
+ VALUES (
+ NEW.ID,NEW.NAME,NEW.DESCRIPTION,NEW.COLOR_CODE,NEW.CREATE_USER,NEW.CREATE_DATE,NEW.MOD_USER,NEW.MOD_DATE,
+ 2,
+ current_timestamp,
+ NEW.MOD_USER
+ );
+
+ RETURN NEW;
+ END;
+$BODY$
+ LANGUAGE plpgsql VOLATILE
+ COST 100;
+ALTER FUNCTION PUBLIC.REF_BRANCH_UPDATE_TRG()
+ OWNER TO PLGM_SERVICE;
+
+DROP TRIGGER IF EXISTS REF_BRANCH_UPDATE_TRG ON PUBLIC.REF_BRANCH;
+
+CREATE TRIGGER REF_BRANCH_UPDATE_TRG
+ BEFORE UPDATE
+ ON PUBLIC.REF_BRANCH
+ FOR EACH ROW
+ EXECUTE PROCEDURE PUBLIC.REF_BRANCH_UPDATE_TRG();
+
+
+
+-- PUBLIC.REF_BRANCH DELETE TRIGGER --
+-- <GENERATED CODE!>
+
+CREATE OR REPLACE FUNCTION PUBLIC.REF_BRANCH_DELETE_TRG()
+ RETURNS trigger AS
+$BODY$
+ BEGIN
+ IF TG_OP = 'DELETE' THEN
+ INSERT INTO HREF_BRANCH (
+ ID,NAME,DESCRIPTION,COLOR_CODE,CREATE_USER,CREATE_DATE,MOD_USER,MOD_DATE,
+ HACTION,
+ HDATE,
+ HUSER
+ )
+ VALUES (
+ OLD.ID,OLD.NAME,OLD.DESCRIPTION,OLD.COLOR_CODE,OLD.CREATE_USER,OLD.CREATE_DATE,OLD.MOD_USER,OLD.MOD_DATE,
+ 3,
+ current_timestamp,
+ OLD.MOD_USER );
+ END IF;
+
+ RETURN OLD;
+ END;
+$BODY$
+ LANGUAGE plpgsql VOLATILE
+ COST 100;
+ALTER FUNCTION PUBLIC.REF_BRANCH_DELETE_TRG()
+ OWNER TO PLGM_SERVICE;
+
+DROP TRIGGER IF EXISTS REF_BRANCH_DELETE_TRG ON PUBLIC.REF_BRANCH;
+
+CREATE TRIGGER REF_BRANCH_DELETE_TRG
+ BEFORE DELETE
+ ON PUBLIC.REF_BRANCH
+ FOR EACH ROW
+ EXECUTE PROCEDURE PUBLIC.REF_BRANCH_DELETE_TRG();
+
+
+
+-- PUBLIC.REF_BRANCH_LEVEL INSERT TRIGGER --
+-- <GENERATED CODE!>
+CREATE OR REPLACE FUNCTION PUBLIC.REF_BRANCH_LEVEL_INSERT_TRG()
+ RETURNS trigger AS
+$BODY$
+ BEGIN
+ INSERT INTO HREF_BRANCH_LEVEL (
+ ID,NAME,DESCRIPTION,FK_REF_BRANCH,CREATE_USER,CREATE_DATE,MOD_USER,MOD_DATE,
+
+ HACTION,
+ HDATE,
+ HUSER
+ )
+ VALUES (
+
+ NEW.ID,NEW.NAME,NEW.DESCRIPTION,NEW.FK_REF_BRANCH,NEW.CREATE_USER,NEW.CREATE_DATE,NEW.MOD_USER,NEW.MOD_DATE,
+
+ 1,
+ current_timestamp,
+ NEW.CREATE_USER );
+
+ RETURN NEW;
+ END;
+$BODY$
+ LANGUAGE plpgsql VOLATILE
+ COST 100;
+ALTER FUNCTION PUBLIC.REF_BRANCH_LEVEL_INSERT_TRG()
+ OWNER TO PLGM_SERVICE;
+
+
+DROP TRIGGER IF EXISTS REF_BRANCH_LEVEL_INSERT_TRG ON PUBLIC.REF_BRANCH_LEVEL;
+
+CREATE TRIGGER REF_BRANCH_LEVEL_INSERT_TRG
+ BEFORE INSERT
+ ON PUBLIC.REF_BRANCH_LEVEL
+ FOR EACH ROW
+ EXECUTE PROCEDURE PUBLIC.REF_BRANCH_LEVEL_INSERT_TRG();
+
+
+
+-- PUBLIC.REF_BRANCH_LEVEL UPDATE TRIGGER --
+-- <GENERATED CODE!>
+
+CREATE OR REPLACE FUNCTION PUBLIC.REF_BRANCH_LEVEL_UPDATE_TRG()
+ RETURNS trigger AS
+$BODY$
+ BEGIN
+ INSERT INTO HREF_BRANCH_LEVEL (
+ ID,NAME,DESCRIPTION,FK_REF_BRANCH,CREATE_USER,CREATE_DATE,MOD_USER,MOD_DATE,
+
+ HACTION,
+ HDATE,
+ HUSER
+ )
+ VALUES (
+ NEW.ID,NEW.NAME,NEW.DESCRIPTION,NEW.FK_REF_BRANCH,NEW.CREATE_USER,NEW.CREATE_DATE,NEW.MOD_USER,NEW.MOD_DATE,
+ 2,
+ current_timestamp,
+ NEW.MOD_USER
+ );
+
+ RETURN NEW;
+ END;
+$BODY$
+ LANGUAGE plpgsql VOLATILE
+ COST 100;
+ALTER FUNCTION PUBLIC.REF_BRANCH_LEVEL_UPDATE_TRG()
+ OWNER TO PLGM_SERVICE;
+
+DROP TRIGGER IF EXISTS REF_BRANCH_LEVEL_UPDATE_TRG ON PUBLIC.REF_BRANCH_LEVEL;
+
+CREATE TRIGGER REF_BRANCH_LEVEL_UPDATE_TRG
+ BEFORE UPDATE
+ ON PUBLIC.REF_BRANCH_LEVEL
+ FOR EACH ROW
+ EXECUTE PROCEDURE PUBLIC.REF_BRANCH_LEVEL_UPDATE_TRG();
+
+
+
+-- PUBLIC.REF_BRANCH_LEVEL DELETE TRIGGER --
+-- <GENERATED CODE!>
+
+CREATE OR REPLACE FUNCTION PUBLIC.REF_BRANCH_LEVEL_DELETE_TRG()
+ RETURNS trigger AS
+$BODY$
+ BEGIN
+ IF TG_OP = 'DELETE' THEN
+ INSERT INTO HREF_BRANCH_LEVEL (
+
+ ID,NAME,DESCRIPTION,FK_REF_BRANCH,CREATE_USER,CREATE_DATE,MOD_USER,MOD_DATE,
+
+ HACTION,
+ HDATE,
+ HUSER
+ )
+ VALUES (
+ OLD.ID,OLD.NAME,OLD.DESCRIPTION,OLD.FK_REF_BRANCH,OLD.CREATE_USER,OLD.CREATE_DATE,OLD.MOD_USER,OLD.MOD_DATE,
+
+ 3,
+ current_timestamp,
+ OLD.MOD_USER );
+ END IF;
+
+ RETURN OLD;
+ END;
+$BODY$
+ LANGUAGE plpgsql VOLATILE
+ COST 100;
+ALTER FUNCTION PUBLIC.REF_BRANCH_LEVEL_DELETE_TRG()
+ OWNER TO PLGM_SERVICE;
+
+DROP TRIGGER IF EXISTS REF_BRANCH_LEVEL_DELETE_TRG ON PUBLIC.REF_BRANCH_LEVEL;
+
+CREATE TRIGGER REF_BRANCH_LEVEL_DELETE_TRG
+ BEFORE DELETE
+ ON PUBLIC.REF_BRANCH_LEVEL
+ FOR EACH ROW
+ EXECUTE PROCEDURE PUBLIC.REF_BRANCH_LEVEL_DELETE_TRG();
+
+
+
+
+
+-- PUBLIC.REF_GM_STATUS INSERT TRIGGER --
+-- <GENERATED CODE!>
+CREATE OR REPLACE FUNCTION PUBLIC.REF_GM_STATUS_INSERT_TRG()
+ RETURNS trigger AS
+$BODY$
+ BEGIN
+ INSERT INTO HREF_GM_STATUS (
+ ID,NAME,COLOR_CODE,CREATE_USER,CREATE_DATE,MOD_USER,MOD_DATE,
+
+ HACTION,
+ HDATE,
+ HUSER
+ )
+ VALUES (
+
+ NEW.ID,NEW.NAME,NEW.COLOR_CODE,NEW.CREATE_USER,NEW.CREATE_DATE,NEW.MOD_USER,NEW.MOD_DATE,
+
+ 1,
+ current_timestamp,
+ NEW.CREATE_USER );
+
+ RETURN NEW;
+ END;
+$BODY$
+ LANGUAGE plpgsql VOLATILE
+ COST 100;
+ALTER FUNCTION PUBLIC.REF_GM_STATUS_INSERT_TRG()
+ OWNER TO PLGM_SERVICE;
+
+
+DROP TRIGGER IF EXISTS REF_GM_STATUS_INSERT_TRG ON PUBLIC.REF_GM_STATUS;
+
+CREATE TRIGGER REF_GM_STATUS_INSERT_TRG
+ BEFORE INSERT
+ ON PUBLIC.REF_GM_STATUS
+ FOR EACH ROW
+ EXECUTE PROCEDURE PUBLIC.REF_GM_STATUS_INSERT_TRG();
+
+
+
+-- PUBLIC.REF_GM_STATUS UPDATE TRIGGER --
+-- <GENERATED CODE!>
+
+CREATE OR REPLACE FUNCTION PUBLIC.REF_GM_STATUS_UPDATE_TRG()
+ RETURNS trigger AS
+$BODY$
+ BEGIN
+ INSERT INTO HREF_GM_STATUS (
+ ID,NAME,COLOR_CODE,CREATE_USER,CREATE_DATE,MOD_USER,MOD_DATE,
+
+ HACTION,
+ HDATE,
+ HUSER
+ )
+ VALUES (
+ NEW.ID,NEW.NAME,NEW.COLOR_CODE,NEW.CREATE_USER,NEW.CREATE_DATE,NEW.MOD_USER,NEW.MOD_DATE,
+ 2,
+ current_timestamp,
+ NEW.MOD_USER
+ );
+
+ RETURN NEW;
+ END;
+$BODY$
+ LANGUAGE plpgsql VOLATILE
+ COST 100;
+ALTER FUNCTION PUBLIC.REF_GM_STATUS_UPDATE_TRG()
+ OWNER TO PLGM_SERVICE;
+
+DROP TRIGGER IF EXISTS REF_GM_STATUS_UPDATE_TRG ON PUBLIC.REF_GM_STATUS;
+
+CREATE TRIGGER REF_GM_STATUS_UPDATE_TRG
+ BEFORE UPDATE
+ ON PUBLIC.REF_GM_STATUS
+ FOR EACH ROW
+ EXECUTE PROCEDURE PUBLIC.REF_GM_STATUS_UPDATE_TRG();
+
+
+
+-- PUBLIC.REF_GM_STATUS DELETE TRIGGER --
+-- <GENERATED CODE!>
+
+CREATE OR REPLACE FUNCTION PUBLIC.REF_GM_STATUS_DELETE_TRG()
+ RETURNS trigger AS
+$BODY$
+ BEGIN
+ IF TG_OP = 'DELETE' THEN
+ INSERT INTO HREF_GM_STATUS (
+
+ ID,NAME,COLOR_CODE,CREATE_USER,CREATE_DATE,MOD_USER,MOD_DATE,
+
+ HACTION,
+ HDATE,
+ HUSER
+ )
+ VALUES (
+ OLD.ID,OLD.NAME,OLD.COLOR_CODE,OLD.CREATE_USER,OLD.CREATE_DATE,OLD.MOD_USER,OLD.MOD_DATE,
+
+ 3,
+ current_timestamp,
+ OLD.MOD_USER );
+ END IF;
+
+ RETURN OLD;
+ END;
+$BODY$
+ LANGUAGE plpgsql VOLATILE
+ COST 100;
+ALTER FUNCTION PUBLIC.REF_GM_STATUS_DELETE_TRG()
+ OWNER TO PLGM_SERVICE;
+
+DROP TRIGGER IF EXISTS REF_GM_STATUS_DELETE_TRG ON PUBLIC.REF_GM_STATUS;
+
+CREATE TRIGGER REF_GM_STATUS_DELETE_TRG
+ BEFORE DELETE
+ ON PUBLIC.REF_GM_STATUS
+ FOR EACH ROW
+ EXECUTE PROCEDURE PUBLIC.REF_GM_STATUS_DELETE_TRG();
+
+
+
+
+
+
+
+
+-- PUBLIC.TBL_GRIDMEASURE INSERT TRIGGER --
+-- <GENERATED CODE!>
+CREATE OR REPLACE FUNCTION PUBLIC.TBL_GRIDMEASURE_INSERT_TRG()
+ RETURNS trigger AS
+$BODY$
+ BEGIN
+ INSERT INTO HTBL_GRIDMEASURE (
+ ID,ID_DESCRIPTIVE,TITLE,AFFECTED_RESOURCE,REMARK,EMAIL_ADDRESSES,FK_REF_GM_STATUS,SWITCHING_OBJECT,COST_CENTER,APPROVAL_BY,AREA_OF_SWITCHING,APPOINTMENT_REPETITION,APPOINTMENT_STARTDATE,APPOINTMENT_NUMBEROF,PLANNED_STARTTIME_FIRST_SEQUENCE,PLANNED_STARTTIME_FIRST_SINGLEMEASURE,PLANNED_ENDTIME_LAST_SINGLEMEASURE,PLANNED_ENDTIME_GRIDMEASURE,STARTTIME_FIRST_SEQUENCE,STARTTIME_FIRST_SINGLEMEASURE,ENDTIME_LAST_SINGLEMEASURE,ENDTIME_GRIDMEASURE,TIME_OF_REALLOCATION,DESCRIPTION,FK_REF_BRANCH,FK_REF_BRANCH_LEVEL,CREATE_USER,CREATE_USER_DEPARTMENT,CREATE_DATE,MOD_USER,MOD_USER_DEPARTMENT,MOD_DATE,
+
+ HACTION,
+ HDATE,
+ HUSER
+ )
+ VALUES (
+
+ NEW.ID,NEW.ID_DESCRIPTIVE,NEW.TITLE,NEW.AFFECTED_RESOURCE,NEW.REMARK,NEW.EMAIL_ADDRESSES,NEW.FK_REF_GM_STATUS,NEW.SWITCHING_OBJECT,NEW.COST_CENTER,NEW.APPROVAL_BY,NEW.AREA_OF_SWITCHING,NEW.APPOINTMENT_REPETITION,NEW.APPOINTMENT_STARTDATE,NEW.APPOINTMENT_NUMBEROF,NEW.PLANNED_STARTTIME_FIRST_SEQUENCE,NEW.PLANNED_STARTTIME_FIRST_SINGLEMEASURE,NEW.PLANNED_ENDTIME_LAST_SINGLEMEASURE,NEW.PLANNED_ENDTIME_GRIDMEASURE,NEW.STARTTIME_FIRST_SEQUENCE,NEW.STARTTIME_FIRST_SINGLEMEASURE,NEW.ENDTIME_LAST_SINGLEMEASURE,NEW.ENDTIME_GRIDMEASURE,NEW.TIME_OF_REALLOCATION,NEW.DESCRIPTION,NEW.FK_REF_BRANCH,NEW.FK_REF_BRANCH_LEVEL,NEW.CREATE_USER,NEW.CREATE_USER_DEPARTMENT,NEW.CREATE_DATE,NEW.MOD_USER,NEW.MOD_USER_DEPARTMENT,NEW.MOD_DATE,
+
+ 1,
+ current_timestamp,
+ NEW.CREATE_USER );
+
+ RETURN NEW;
+ END;
+$BODY$
+ LANGUAGE plpgsql VOLATILE
+ COST 100;
+ALTER FUNCTION PUBLIC.TBL_GRIDMEASURE_INSERT_TRG()
+ OWNER TO PLGM_SERVICE;
+
+
+DROP TRIGGER IF EXISTS TBL_GRIDMEASURE_INSERT_TRG ON PUBLIC.TBL_GRIDMEASURE;
+
+CREATE TRIGGER TBL_GRIDMEASURE_INSERT_TRG
+ BEFORE INSERT
+ ON PUBLIC.TBL_GRIDMEASURE
+ FOR EACH ROW
+ EXECUTE PROCEDURE PUBLIC.TBL_GRIDMEASURE_INSERT_TRG();
+
+
+
+-- PUBLIC.TBL_GRIDMEASURE UPDATE TRIGGER --
+-- <GENERATED CODE!>
+
+CREATE OR REPLACE FUNCTION PUBLIC.TBL_GRIDMEASURE_UPDATE_TRG()
+ RETURNS trigger AS
+$BODY$
+ BEGIN
+ INSERT INTO HTBL_GRIDMEASURE (
+ ID,ID_DESCRIPTIVE,TITLE,AFFECTED_RESOURCE,REMARK,EMAIL_ADDRESSES,FK_REF_GM_STATUS,SWITCHING_OBJECT,COST_CENTER,APPROVAL_BY,AREA_OF_SWITCHING,APPOINTMENT_REPETITION,APPOINTMENT_STARTDATE,APPOINTMENT_NUMBEROF,PLANNED_STARTTIME_FIRST_SEQUENCE,PLANNED_STARTTIME_FIRST_SINGLEMEASURE,PLANNED_ENDTIME_LAST_SINGLEMEASURE,PLANNED_ENDTIME_GRIDMEASURE,STARTTIME_FIRST_SEQUENCE,STARTTIME_FIRST_SINGLEMEASURE,ENDTIME_LAST_SINGLEMEASURE,ENDTIME_GRIDMEASURE,TIME_OF_REALLOCATION,DESCRIPTION,FK_REF_BRANCH,FK_REF_BRANCH_LEVEL,CREATE_USER,CREATE_USER_DEPARTMENT,CREATE_DATE,MOD_USER,MOD_USER_DEPARTMENT,MOD_DATE,
+
+ HACTION,
+ HDATE,
+ HUSER
+ )
+ VALUES (
+ NEW.ID,NEW.ID_DESCRIPTIVE,NEW.TITLE,NEW.AFFECTED_RESOURCE,NEW.REMARK,NEW.EMAIL_ADDRESSES,NEW.FK_REF_GM_STATUS,NEW.SWITCHING_OBJECT,NEW.COST_CENTER,NEW.APPROVAL_BY,NEW.AREA_OF_SWITCHING,NEW.APPOINTMENT_REPETITION,NEW.APPOINTMENT_STARTDATE,NEW.APPOINTMENT_NUMBEROF,NEW.PLANNED_STARTTIME_FIRST_SEQUENCE,NEW.PLANNED_STARTTIME_FIRST_SINGLEMEASURE,NEW.PLANNED_ENDTIME_LAST_SINGLEMEASURE,NEW.PLANNED_ENDTIME_GRIDMEASURE,NEW.STARTTIME_FIRST_SEQUENCE,NEW.STARTTIME_FIRST_SINGLEMEASURE,NEW.ENDTIME_LAST_SINGLEMEASURE,NEW.ENDTIME_GRIDMEASURE,NEW.TIME_OF_REALLOCATION,NEW.DESCRIPTION,NEW.FK_REF_BRANCH,NEW.FK_REF_BRANCH_LEVEL,NEW.CREATE_USER,NEW.CREATE_USER_DEPARTMENT,NEW.CREATE_DATE,NEW.MOD_USER,NEW.MOD_USER_DEPARTMENT,NEW.MOD_DATE,
+ 2,
+ current_timestamp,
+ NEW.MOD_USER
+ );
+
+ RETURN NEW;
+ END;
+$BODY$
+ LANGUAGE plpgsql VOLATILE
+ COST 100;
+ALTER FUNCTION PUBLIC.TBL_GRIDMEASURE_UPDATE_TRG()
+ OWNER TO PLGM_SERVICE;
+
+DROP TRIGGER IF EXISTS TBL_GRIDMEASURE_UPDATE_TRG ON PUBLIC.TBL_GRIDMEASURE;
+
+CREATE TRIGGER TBL_GRIDMEASURE_UPDATE_TRG
+ BEFORE UPDATE
+ ON PUBLIC.TBL_GRIDMEASURE
+ FOR EACH ROW
+ EXECUTE PROCEDURE PUBLIC.TBL_GRIDMEASURE_UPDATE_TRG();
+
+
+
+-- PUBLIC.TBL_GRIDMEASURE DELETE TRIGGER --
+-- <GENERATED CODE!>
+
+CREATE OR REPLACE FUNCTION PUBLIC.TBL_GRIDMEASURE_DELETE_TRG()
+ RETURNS trigger AS
+$BODY$
+ BEGIN
+ IF TG_OP = 'DELETE' THEN
+ INSERT INTO HTBL_GRIDMEASURE (
+
+ ID,ID_DESCRIPTIVE,TITLE,AFFECTED_RESOURCE,REMARK,EMAIL_ADDRESSES,FK_REF_GM_STATUS,SWITCHING_OBJECT,COST_CENTER,APPROVAL_BY,AREA_OF_SWITCHING,APPOINTMENT_REPETITION,APPOINTMENT_STARTDATE,APPOINTMENT_NUMBEROF,PLANNED_STARTTIME_FIRST_SEQUENCE,PLANNED_STARTTIME_FIRST_SINGLEMEASURE,PLANNED_ENDTIME_LAST_SINGLEMEASURE,PLANNED_ENDTIME_GRIDMEASURE,STARTTIME_FIRST_SEQUENCE,STARTTIME_FIRST_SINGLEMEASURE,ENDTIME_LAST_SINGLEMEASURE,ENDTIME_GRIDMEASURE,TIME_OF_REALLOCATION,DESCRIPTION,FK_REF_BRANCH,FK_REF_BRANCH_LEVEL,CREATE_USER,CREATE_USER_DEPARTMENT,CREATE_DATE,MOD_USER,MOD_USER_DEPARTMENT,MOD_DATE,
+
+ HACTION,
+ HDATE,
+ HUSER
+ )
+ VALUES (
+ OLD.ID,OLD.ID_DESCRIPTIVE,OLD.TITLE,OLD.AFFECTED_RESOURCE,OLD.REMARK,OLD.EMAIL_ADDRESSES,OLD.FK_REF_GM_STATUS,OLD.SWITCHING_OBJECT,OLD.COST_CENTER,OLD.APPROVAL_BY,OLD.AREA_OF_SWITCHING,OLD.APPOINTMENT_REPETITION,OLD.APPOINTMENT_STARTDATE,OLD.APPOINTMENT_NUMBEROF,OLD.PLANNED_STARTTIME_FIRST_SEQUENCE,OLD.PLANNED_STARTTIME_FIRST_SINGLEMEASURE,OLD.PLANNED_ENDTIME_LAST_SINGLEMEASURE,OLD.PLANNED_ENDTIME_GRIDMEASURE,OLD.STARTTIME_FIRST_SEQUENCE,OLD.STARTTIME_FIRST_SINGLEMEASURE,OLD.ENDTIME_LAST_SINGLEMEASURE,OLD.ENDTIME_GRIDMEASURE,OLD.TIME_OF_REALLOCATION,OLD.DESCRIPTION,OLD.FK_REF_BRANCH,OLD.FK_REF_BRANCH_LEVEL,OLD.CREATE_USER,OLD.CREATE_USER_DEPARTMENT,OLD.CREATE_DATE,OLD.MOD_USER,OLD.MOD_USER_DEPARTMENT,OLD.MOD_DATE,
+
+ 3,
+ current_timestamp,
+ OLD.MOD_USER );
+ END IF;
+
+ RETURN OLD;
+ END;
+$BODY$
+ LANGUAGE plpgsql VOLATILE
+ COST 100;
+ALTER FUNCTION PUBLIC.TBL_GRIDMEASURE_DELETE_TRG()
+ OWNER TO PLGM_SERVICE;
+
+DROP TRIGGER IF EXISTS TBL_GRIDMEASURE_DELETE_TRG ON PUBLIC.TBL_GRIDMEASURE;
+
+CREATE TRIGGER TBL_GRIDMEASURE_DELETE_TRG
+ BEFORE DELETE
+ ON PUBLIC.TBL_GRIDMEASURE
+ FOR EACH ROW
+ EXECUTE PROCEDURE PUBLIC.TBL_GRIDMEASURE_DELETE_TRG();
+
+
+-- PUBLIC.TBL_DOCUMENTS INSERT TRIGGER --
+-- <GENERATED CODE!>
+CREATE OR REPLACE FUNCTION PUBLIC.TBL_DOCUMENTS_INSERT_TRG()
+ RETURNS trigger AS
+$BODY$
+ BEGIN
+ INSERT INTO HTBL_DOCUMENTS (
+ ID,DOCUMENT_NAME,CREATE_USER,CREATE_DATE,MOD_USER,MOD_DATE,
+
+ HACTION,
+ HDATE,
+ HUSER
+ )
+ VALUES (
+
+ NEW.ID,NEW.DOCUMENT_NAME,NEW.CREATE_USER,NEW.CREATE_DATE,NEW.MOD_USER,NEW.MOD_DATE,
+
+ 1,
+ current_timestamp,
+ NEW.CREATE_USER );
+
+ RETURN NEW;
+ END;
+$BODY$
+ LANGUAGE plpgsql VOLATILE
+ COST 100;
+ALTER FUNCTION PUBLIC.TBL_DOCUMENTS_INSERT_TRG()
+ OWNER TO PLGM_SERVICE;
+
+
+DROP TRIGGER IF EXISTS TBL_DOCUMENTS_INSERT_TRG ON PUBLIC.TBL_DOCUMENTS;
+
+CREATE TRIGGER TBL_DOCUMENTS_INSERT_TRG
+ BEFORE INSERT
+ ON PUBLIC.TBL_DOCUMENTS
+ FOR EACH ROW
+ EXECUTE PROCEDURE PUBLIC.TBL_DOCUMENTS_INSERT_TRG();
+
+
+
+-- PUBLIC.TBL_DOCUMENTS UPDATE TRIGGER --
+-- <GENERATED CODE!>
+
+CREATE OR REPLACE FUNCTION PUBLIC.TBL_DOCUMENTS_UPDATE_TRG()
+ RETURNS trigger AS
+$BODY$
+ BEGIN
+ INSERT INTO HTBL_DOCUMENTS (
+ ID,DOCUMENT_NAME,CREATE_USER,CREATE_DATE,MOD_USER,MOD_DATE,
+
+ HACTION,
+ HDATE,
+ HUSER
+ )
+ VALUES (
+ NEW.ID,NEW.DOCUMENT_NAME,NEW.CREATE_USER,NEW.CREATE_DATE,NEW.MOD_USER,NEW.MOD_DATE,
+ 2,
+ current_timestamp,
+ NEW.MOD_USER
+ );
+
+ RETURN NEW;
+ END;
+$BODY$
+ LANGUAGE plpgsql VOLATILE
+ COST 100;
+ALTER FUNCTION PUBLIC.TBL_DOCUMENTS_UPDATE_TRG()
+ OWNER TO PLGM_SERVICE;
+
+DROP TRIGGER IF EXISTS TBL_DOCUMENTS_UPDATE_TRG ON PUBLIC.TBL_DOCUMENTS;
+
+CREATE TRIGGER TBL_DOCUMENTS_UPDATE_TRG
+ BEFORE UPDATE
+ ON PUBLIC.TBL_DOCUMENTS
+ FOR EACH ROW
+ EXECUTE PROCEDURE PUBLIC.TBL_DOCUMENTS_UPDATE_TRG();
+
+
+
+-- PUBLIC.TBL_DOCUMENTS DELETE TRIGGER --
+-- <GENERATED CODE!>
+
+CREATE OR REPLACE FUNCTION PUBLIC.TBL_DOCUMENTS_DELETE_TRG()
+ RETURNS trigger AS
+$BODY$
+ BEGIN
+ IF TG_OP = 'DELETE' THEN
+ INSERT INTO HTBL_DOCUMENTS (
+
+ ID,DOCUMENT_NAME,CREATE_USER,CREATE_DATE,MOD_USER,MOD_DATE,
+
+ HACTION,
+ HDATE,
+ HUSER
+ )
+ VALUES (
+ OLD.ID,OLD.DOCUMENT_NAME,OLD.CREATE_USER,OLD.CREATE_DATE,OLD.MOD_USER,OLD.MOD_DATE,
+
+ 3,
+ current_timestamp,
+ OLD.MOD_USER );
+ END IF;
+
+ RETURN OLD;
+ END;
+$BODY$
+ LANGUAGE plpgsql VOLATILE
+ COST 100;
+ALTER FUNCTION PUBLIC.TBL_DOCUMENTS_DELETE_TRG()
+ OWNER TO PLGM_SERVICE;
+
+DROP TRIGGER IF EXISTS TBL_DOCUMENTS_DELETE_TRG ON PUBLIC.TBL_DOCUMENTS;
+
+CREATE TRIGGER TBL_DOCUMENTS_DELETE_TRG
+ BEFORE DELETE
+ ON PUBLIC.TBL_DOCUMENTS
+ FOR EACH ROW
+ EXECUTE PROCEDURE PUBLIC.TBL_DOCUMENTS_DELETE_TRG();
+
+
+
+
+
+
+-- PUBLIC.TBL_MEASURE_DOCUMENTS INSERT TRIGGER --
+-- <GENERATED CODE!>
+CREATE OR REPLACE FUNCTION PUBLIC.TBL_MEASURE_DOCUMENTS_INSERT_TRG()
+ RETURNS trigger AS
+$BODY$
+ BEGIN
+ INSERT INTO HTBL_MEASURE_DOCUMENTS (
+ ID,FK_TBL_MEASURE,FK_TBL_DOCUMENTS,CREATE_USER,CREATE_DATE,MOD_USER,MOD_DATE,
+
+ HACTION,
+ HDATE,
+ HUSER
+ )
+ VALUES (
+
+ NEW.ID,NEW.FK_TBL_MEASURE,NEW.FK_TBL_DOCUMENTS,NEW.CREATE_USER,NEW.CREATE_DATE,NEW.MOD_USER,NEW.MOD_DATE,
+
+ 1,
+ current_timestamp,
+ NEW.CREATE_USER );
+
+ RETURN NEW;
+ END;
+$BODY$
+ LANGUAGE plpgsql VOLATILE
+ COST 100;
+ALTER FUNCTION PUBLIC.TBL_MEASURE_DOCUMENTS_INSERT_TRG()
+ OWNER TO PLGM_SERVICE;
+
+
+DROP TRIGGER IF EXISTS TBL_MEASURE_DOCUMENTS_INSERT_TRG ON PUBLIC.TBL_MEASURE_DOCUMENTS;
+
+CREATE TRIGGER TBL_MEASURE_DOCUMENTS_INSERT_TRG
+ BEFORE INSERT
+ ON PUBLIC.TBL_MEASURE_DOCUMENTS
+ FOR EACH ROW
+ EXECUTE PROCEDURE PUBLIC.TBL_MEASURE_DOCUMENTS_INSERT_TRG();
+
+
+
+-- PUBLIC.TBL_MEASURE_DOCUMENTS UPDATE TRIGGER --
+-- <GENERATED CODE!>
+
+CREATE OR REPLACE FUNCTION PUBLIC.TBL_MEASURE_DOCUMENTS_UPDATE_TRG()
+ RETURNS trigger AS
+$BODY$
+ BEGIN
+ INSERT INTO HTBL_MEASURE_DOCUMENTS (
+ ID,FK_TBL_MEASURE,FK_TBL_DOCUMENTS,CREATE_USER,CREATE_DATE,MOD_USER,MOD_DATE,
+
+ HACTION,
+ HDATE,
+ HUSER
+ )
+ VALUES (
+ NEW.ID,NEW.FK_TBL_MEASURE,NEW.FK_TBL_DOCUMENTS,NEW.CREATE_USER,NEW.CREATE_DATE,NEW.MOD_USER,NEW.MOD_DATE,
+ 2,
+ current_timestamp,
+ NEW.MOD_USER
+ );
+
+ RETURN NEW;
+ END;
+$BODY$
+ LANGUAGE plpgsql VOLATILE
+ COST 100;
+ALTER FUNCTION PUBLIC.TBL_MEASURE_DOCUMENTS_UPDATE_TRG()
+ OWNER TO PLGM_SERVICE;
+
+DROP TRIGGER IF EXISTS TBL_MEASURE_DOCUMENTS_UPDATE_TRG ON PUBLIC.TBL_MEASURE_DOCUMENTS;
+
+CREATE TRIGGER TBL_MEASURE_DOCUMENTS_UPDATE_TRG
+ BEFORE UPDATE
+ ON PUBLIC.TBL_MEASURE_DOCUMENTS
+ FOR EACH ROW
+ EXECUTE PROCEDURE PUBLIC.TBL_MEASURE_DOCUMENTS_UPDATE_TRG();
+
+
+
+-- PUBLIC.TBL_MEASURE_DOCUMENTS DELETE TRIGGER --
+-- <GENERATED CODE!>
+
+CREATE OR REPLACE FUNCTION PUBLIC.TBL_MEASURE_DOCUMENTS_DELETE_TRG()
+ RETURNS trigger AS
+$BODY$
+ BEGIN
+ IF TG_OP = 'DELETE' THEN
+ INSERT INTO HTBL_MEASURE_DOCUMENTS (
+
+ ID,FK_TBL_MEASURE,FK_TBL_DOCUMENTS,CREATE_USER,CREATE_DATE,MOD_USER,MOD_DATE,
+
+ HACTION,
+ HDATE,
+ HUSER
+ )
+ VALUES (
+ OLD.ID,OLD.FK_TBL_MEASURE,OLD.FK_TBL_DOCUMENTS,OLD.CREATE_USER,OLD.CREATE_DATE,OLD.MOD_USER,OLD.MOD_DATE,
+
+ 3,
+ current_timestamp,
+ OLD.MOD_USER );
+ END IF;
+
+ RETURN OLD;
+ END;
+$BODY$
+ LANGUAGE plpgsql VOLATILE
+ COST 100;
+ALTER FUNCTION PUBLIC.TBL_MEASURE_DOCUMENTS_DELETE_TRG()
+ OWNER TO PLGM_SERVICE;
+
+DROP TRIGGER IF EXISTS TBL_MEASURE_DOCUMENTS_DELETE_TRG ON PUBLIC.TBL_MEASURE_DOCUMENTS;
+
+CREATE TRIGGER TBL_MEASURE_DOCUMENTS_DELETE_TRG
+ BEFORE DELETE
+ ON PUBLIC.TBL_MEASURE_DOCUMENTS
+ FOR EACH ROW
+ EXECUTE PROCEDURE PUBLIC.TBL_MEASURE_DOCUMENTS_DELETE_TRG();
diff --git a/db/migrations/V0_43__CREATE_PLGM_DB.sql b/db/migrations/V0_43__CREATE_PLGM_DB.sql
new file mode 100644
index 0000000..1a5ffa7
--- /dev/null
+++ b/db/migrations/V0_43__CREATE_PLGM_DB.sql
@@ -0,0 +1,3666 @@
+-----------------------------------------------------------------------------------
+-- *******************************************************************************
+-- * Copyright (c) 2018 Contributors to the Eclipse Foundation
+-- *
+-- * See the NOTICE file(s) distributed with this work for additional
+-- * information regarding copyright ownership.
+-- *
+-- * This program and the accompanying materials are made available under the
+-- * terms of the Eclipse Public License v. 2.0 which is available at
+-- * http://www.eclipse.org/legal/epl-2.0.
+-- *
+-- * SPDX-License-Identifier: EPL-2.0
+-- *******************************************************************************
+-----------------------------------------------------------------------------------
+--Field COLOR_CODE added in Table REF_GM_STATUS, HREF_GM_STATUS, Insert-, Delete-, and Update-Triggers
+
+-- ---------------------------------------------
+-- DROPS
+-- ---------------------------------------------
+DROP TABLE IF EXISTS public.TBL_STEPS;
+DROP SEQUENCE IF EXISTS public.TBL_STEPS_ID_SEQ;
+
+DROP TABLE IF EXISTS public.TBL_SINGLE_GRIDMEASURE;
+DROP SEQUENCE IF EXISTS public.TBL_SINGLE_GRIDMEASURE_ID_SEQ;
+
+DROP TABLE IF EXISTS public.TBL_LOCK CASCADE;
+DROP SEQUENCE IF EXISTS public.TBL_LOCK_ID_SEQ;
+
+DROP TABLE IF EXISTS public.REF_USER_SETTINGS CASCADE;
+DROP SEQUENCE IF EXISTS public.REF_USER_SETTINGS_ID_SEQ;
+
+DROP TABLE IF EXISTS public.TBL_USER_SETTINGS CASCADE;
+DROP SEQUENCE IF EXISTS public.TBL_USER_SETTINGS_ID_SEQ;
+
+DROP TABLE IF EXISTS public.REF_USER_DEPARTMENT CASCADE;
+DROP SEQUENCE IF EXISTS public.REF_USER_DEPARTMENT_ID_SEQ;
+
+DROP TABLE IF EXISTS public.REF_COST_CENTER CASCADE;
+DROP SEQUENCE IF EXISTS public.REF_COST_CENTER_ID_SEQ;
+
+DROP TABLE IF EXISTS public.TBL_GRIDMEASURE CASCADE;
+DROP SEQUENCE IF EXISTS public.TBL_GRIDMEASURE_ID_SEQ;
+
+DROP TABLE IF EXISTS public.REF_BRANCH CASCADE;
+DROP SEQUENCE IF EXISTS public.REF_BRANCH_ID_SEQ;
+
+DROP TABLE IF EXISTS public.REF_BRANCH_LEVEL CASCADE;
+DROP SEQUENCE IF EXISTS public.REF_BRANCH_LEVEL_ID_SEQ;
+
+DROP TABLE IF EXISTS public.REF_GM_STATUS CASCADE;
+DROP SEQUENCE IF EXISTS public.REF_GM_STATUS_ID_SEQ;
+
+DROP TABLE IF EXISTS public.tbl_documents CASCADE;
+DROP SEQUENCE IF EXISTS public.tbl_documents_id_seq;
+
+DROP TABLE IF EXISTS public.tbl_measure_documents CASCADE;
+DROP SEQUENCE IF EXISTS public.tbl_measure_documents_id_seq;
+
+DROP TABLE IF EXISTS public.tbl_id_counter CASCADE;
+DROP SEQUENCE IF EXISTS public.tbl_id_counter_id_seq;
+
+DROP TABLE IF EXISTS public.REF_TERRITORY CASCADE;
+DROP SEQUENCE IF EXISTS public.REF_TERRITORY_ID_SEQ;
+
+
+DROP INDEX IF EXISTS public.huser_index;
+
+-- ---------------------------------------------
+-- TABLE REF_TERRITORY
+-- ---------------------------------------------
+
+CREATE SEQUENCE public.REF_TERRITORY_ID_SEQ
+ INCREMENT 1
+ MINVALUE 1
+ MAXVALUE 9223372036854775807
+ START 1
+ CACHE 1;
+ALTER TABLE public.REF_TERRITORY_ID_SEQ
+ OWNER TO plgm_service;
+
+
+CREATE TABLE public.REF_TERRITORY
+(
+ id integer NOT NULL DEFAULT nextval('REF_TERRITORY_ID_SEQ'::regclass),
+ name character varying(50) NOT NULL,
+ description character varying(255),
+ create_user character varying(100) NOT NULL,
+ create_date timestamp without time zone NOT NULL,
+ mod_user character varying(100),
+ mod_date timestamp without time zone,
+ CONSTRAINT REF_TERRITORY_pkey PRIMARY KEY (id)
+)
+WITH (
+ OIDS=FALSE
+);
+ALTER TABLE public.REF_TERRITORY
+ OWNER TO plgm_service;
+GRANT ALL ON TABLE public.REF_TERRITORY TO plgm_service;
+
+INSERT INTO public.REF_TERRITORY(
+ name, description, create_user, create_date, mod_user, mod_date)
+ VALUES ('Nord', 'Region Nord', 'testuser','12.04.2018','testuser','12.04.2018');
+INSERT INTO public.REF_TERRITORY(
+ name, description, create_user, create_date, mod_user, mod_date)
+ VALUES ('Ost', 'Region Ost', 'testuser','12.04.2018','testuser','12.04.2018');
+INSERT INTO public.REF_TERRITORY(
+ name, description, create_user, create_date, mod_user, mod_date)
+ VALUES ('SUED', 'Region SUED', 'testuser','12.04.2018','testuser','12.04.2018');
+
+
+
+-- ---------------------------------------------
+-- TABLE TBL_LOCK
+-- ---------------------------------------------
+
+CREATE SEQUENCE public.TBL_LOCK_ID_SEQ
+ INCREMENT 1
+ MINVALUE 1
+ MAXVALUE 9223372036854775807
+ START 1
+ CACHE 1;
+ALTER TABLE public.TBL_LOCK_ID_SEQ
+ OWNER TO plgm_service;
+
+CREATE TABLE public.tbl_lock
+(
+ id integer NOT NULL DEFAULT nextval('TBL_LOCK_ID_SEQ'::regclass),
+ key integer NOT NULL, -- Id from tbl_gridmeasure
+ username character varying(50) NOT NULL,
+ info character varying(256),
+ create_user character varying(100) NOT NULL,
+ create_date timestamp without time zone NOT NULL,
+ mod_user character varying(100),
+ mod_date timestamp without time zone,
+ CONSTRAINT tbl_lock_pkey PRIMARY KEY (id)
+)
+WITH (
+ OIDS=FALSE
+);
+ALTER TABLE public.tbl_lock
+ OWNER TO plgm_service;
+GRANT ALL ON TABLE public.tbl_lock TO plgm_service;
+
+CREATE UNIQUE INDEX tbl_lock_unique_key ON public.tbl_lock (key ASC, info ASC );
+
+-- ---------------------------------------------
+-- TABLE TBL_USER_SETTINGS
+-- ---------------------------------------------
+
+CREATE SEQUENCE public.tbl_user_settings_id_seq
+ INCREMENT 1
+ MINVALUE 1
+ MAXVALUE 9223372036854775807
+ START 1
+ CACHE 1;
+ALTER TABLE public.tbl_user_settings_id_seq
+ OWNER TO plgm_service;
+
+CREATE TABLE public.tbl_user_settings
+(
+ id integer NOT NULL DEFAULT nextval('tbl_user_settings_id_seq'::regclass),
+ username character varying(50) NOT NULL,
+ setting_type character varying(50),
+ value character varying(4096),
+ create_user character varying(100) NOT NULL,
+ create_date timestamp without time zone NOT NULL,
+ mod_user character varying(100),
+ mod_date timestamp without time zone,
+ CONSTRAINT tbl_user_settings_pkey PRIMARY KEY (id)
+)
+WITH (
+ OIDS=FALSE
+);
+ALTER TABLE public.tbl_user_settings
+ OWNER TO plgm_service;
+GRANT ALL ON TABLE public.tbl_user_settings TO plgm_service;
+
+CREATE UNIQUE INDEX tbl_user_set_unique_key ON public.tbl_user_settings (username ASC, setting_type ASC );
+
+
+
+-- ---------------------------------------------
+-- TABLE TBL_ID_COUNTER
+-- ---------------------------------------------
+
+CREATE SEQUENCE public.tbl_id_counter_id_seq
+ INCREMENT 1
+ MINVALUE 1
+ MAXVALUE 9223372036854775807
+ START 1
+ CACHE 1;
+ALTER TABLE public.tbl_id_counter_id_seq
+ OWNER TO plgm_service;
+
+CREATE TABLE public.tbl_id_counter
+(
+ id integer NOT NULL DEFAULT nextval('tbl_id_counter_id_seq'::regclass),
+ counter integer NOT NULL,
+ counter_type character varying(256),
+ info character varying(256),
+ create_user character varying(100) NOT NULL,
+ create_date timestamp without time zone NOT NULL,
+ mod_user character varying(100),
+ mod_date timestamp without time zone,
+ CONSTRAINT tbl_id_counter_pkey PRIMARY KEY (id)
+)
+WITH (
+ OIDS=FALSE
+);
+ALTER TABLE public.tbl_id_counter
+ OWNER TO plgm_service;
+GRANT ALL ON TABLE public.tbl_id_counter TO plgm_service;
+
+
+-- ---------------------------------------------
+-- TABLE REF_USER_DEPARTMENT
+-- ---------------------------------------------
+
+CREATE SEQUENCE public.REF_USER_DEPARTMENT_ID_SEQ
+ INCREMENT 1
+ MINVALUE 1
+ MAXVALUE 9223372036854775807
+ START 3
+ CACHE 1;
+ALTER TABLE public.REF_USER_DEPARTMENT_ID_SEQ
+ OWNER TO plgm_service;
+
+
+CREATE TABLE public.REF_USER_DEPARTMENT
+(
+ id integer NOT NULL DEFAULT nextval('REF_USER_DEPARTMENT_ID_SEQ'::regclass),
+ name character varying(50) NOT NULL,
+ create_user character varying(100) NOT NULL,
+ create_date timestamp without time zone NOT NULL,
+ mod_user character varying(100),
+ mod_date timestamp without time zone,
+ CONSTRAINT ref_user_department_pkey PRIMARY KEY (id)
+)
+WITH (
+ OIDS=FALSE
+);
+ALTER TABLE public.REF_USER_DEPARTMENT
+ OWNER TO plgm_service;
+GRANT ALL ON TABLE public.REF_USER_DEPARTMENT TO plgm_service;
+
+
+INSERT INTO public.ref_user_department(
+ name, create_user, create_date, mod_user, mod_date)
+ VALUES ('Schnelle Truppe', 'testuser', '12.04.2018','testuser', '12.04.2018');
+INSERT INTO public.ref_user_department(
+ name, create_user, create_date, mod_user, mod_date)
+ VALUES ('Abt. Aufsicht', 'testuser', '12.04.2018','testuser', '12.04.2018');
+INSERT INTO public.ref_user_department(
+ name, create_user, create_date, mod_user, mod_date)
+ VALUES ('Abt. Wartung', 'testuser', '12.04.2018','testuser', '12.04.2018');
+
+-- ---------------------------------------------
+-- TABLE REF_COST_CENTER
+-- ---------------------------------------------
+
+CREATE SEQUENCE public.REF_COST_CENTER_ID_SEQ
+ INCREMENT 1
+ MINVALUE 1
+ MAXVALUE 9223372036854775807
+ START 1
+ CACHE 1;
+ALTER TABLE public.REF_COST_CENTER_ID_SEQ
+ OWNER TO plgm_service;
+
+
+CREATE TABLE public.REF_COST_CENTER
+(
+ id integer NOT NULL DEFAULT nextval('REF_COST_CENTER_id_seq'::regclass),
+ name character varying(50) NOT NULL,
+ description character varying(255),
+ create_user character varying(100) NOT NULL,
+ create_date timestamp without time zone NOT NULL,
+ mod_user character varying(100),
+ mod_date timestamp without time zone,
+ CONSTRAINT REF_COST_CENTER_pkey PRIMARY KEY (id)
+)
+WITH (
+ OIDS=FALSE
+);
+ALTER TABLE public.REF_COST_CENTER
+ OWNER TO plgm_service;
+GRANT ALL ON TABLE public.REF_COST_CENTER TO plgm_service;
+
+INSERT INTO public.ref_cost_center(
+ name, description, create_user, create_date, mod_user, mod_date)
+ VALUES ('K-155', 'Kostenstelle der Abteilung abc', 'testuser','12.04.2018','testuser','12.04.2018');
+INSERT INTO public.ref_cost_center(
+ name, description, create_user, create_date, mod_user, mod_date)
+ VALUES ('K-004', 'Kostenstelle der Abteilung xyz', 'testuser','12.04.2018','testuser','12.04.2018');
+INSERT INTO public.ref_cost_center(
+ name, description, create_user, create_date, mod_user, mod_date)
+ VALUES ('K-222', 'Kostenstelle der Abteilung hij', 'testuser','12.04.2018','testuser','12.04.2018');
+
+-- ---------------------------------------------
+-- TABLE REF_BRANCH
+-- ---------------------------------------------
+CREATE SEQUENCE public.REF_BRANCH_ID_SEQ
+ INCREMENT 1
+ MINVALUE 1
+ MAXVALUE 9223372036854775807
+ START 1
+ CACHE 1;
+
+ALTER TABLE public.REF_BRANCH_ID_SEQ
+ OWNER TO PLGM_SERVICE;
+
+CREATE TABLE public.REF_BRANCH
+(
+ ID integer NOT NULL DEFAULT nextval('REF_BRANCH_ID_SEQ'::regclass),
+ NAME character varying(50) NOT NULL,
+ DESCRIPTION character varying(255),
+ COLOR_CODE character varying(20),
+ CREATE_USER character varying(100) NOT NULL,
+ CREATE_DATE timestamp without time zone NOT NULL,
+ MOD_USER character varying(100),
+ MOD_DATE timestamp without time zone,
+ CONSTRAINT REF_BRANCH_PKEY PRIMARY KEY (id)
+)
+WITH (
+ OIDS=FALSE
+);
+
+ALTER TABLE public.REF_BRANCH
+ OWNER TO PLGM_SERVICE;
+GRANT ALL ON TABLE public.REF_BRANCH TO PLGM_SERVICE;
+
+INSERT INTO public.ref_branch(name, description, color_code, create_user, create_date, mod_user, mod_date)
+ VALUES ('S', 'Strom', '#fc6042','testuser', '12.04.2018', 'testuser', '12.04.2018');
+INSERT INTO public.ref_branch(name, description, color_code, create_user, create_date, mod_user, mod_date)
+ VALUES ('G', 'Gas', '#fdea64', 'testuser', '12.04.2018', 'testuser', '12.04.2018');
+INSERT INTO public.ref_branch(name, description, color_code, create_user, create_date, mod_user, mod_date)
+ VALUES ('F', 'Fernwärme', '#2cc990', 'testuser', '12.04.2018', 'testuser', '12.04.2018');
+INSERT INTO public.ref_branch(name, description, color_code, create_user, create_date, mod_user, mod_date)
+ VALUES ('W', 'Wasser', '#2c82c9', 'testuser', '12.04.2018', 'testuser', '12.04.2018');
+-- ---------------------------------------------
+-- TABLE REF_BRANCH_LEVEL
+-- ---------------------------------------------
+CREATE SEQUENCE public.ref_branch_level_id_seq
+ INCREMENT 1
+ MINVALUE 1
+ MAXVALUE 9223372036854775807
+ START 1
+ CACHE 1;
+ALTER TABLE public.ref_branch_level_id_seq
+ OWNER TO plgm_service;
+
+CREATE TABLE public.ref_branch_level
+(
+ id integer NOT NULL DEFAULT nextval('ref_branch_level_id_seq'::regclass),
+ name character varying(50) NOT NULL,
+ description character varying(255),
+ fk_ref_branch integer NULL,
+ create_user character varying(100) NOT NULL,
+ create_date timestamp without time zone NOT NULL,
+ mod_user character varying(100),
+ mod_date timestamp without time zone,
+ CONSTRAINT ref_branch_level_pkey PRIMARY KEY (id),
+ CONSTRAINT FK_REF_BRANCH_LEVEL__REF_BRANCH FOREIGN KEY (FK_REF_BRANCH)
+ REFERENCES public.REF_BRANCH (ID) MATCH SIMPLE
+ ON UPDATE NO ACTION ON DELETE NO ACTION
+)
+WITH (
+ OIDS=FALSE
+);
+ALTER TABLE public.ref_branch_level
+ OWNER TO plgm_service;
+GRANT ALL ON TABLE public.ref_branch_level TO plgm_service;
+
+INSERT INTO public.REF_BRANCH_LEVEL(
+ name, description, fk_ref_branch, create_user, create_date, mod_user, mod_date)
+ VALUES ('Strom Level1', 'eine Beschreibung', 1, 'testuser', '12.04.2018', 'testuser', '12.04.2018');
+INSERT INTO public.REF_BRANCH_LEVEL(
+ name, description, fk_ref_branch, create_user, create_date, mod_user, mod_date)
+ VALUES ('Strom Level2', 'eine Beschreibung', 1, 'testuser', '12.04.2018', 'testuser', '12.04.2018');
+INSERT INTO public.REF_BRANCH_LEVEL(
+ name, description, fk_ref_branch, create_user, create_date, mod_user, mod_date)
+ VALUES ('Strom Level3', 'eine Beschreibung', 1, 'testuser', '12.04.2018', 'testuser', '12.04.2018');
+INSERT INTO public.REF_BRANCH_LEVEL(
+ name, description, fk_ref_branch, create_user, create_date, mod_user, mod_date)
+ VALUES ('Gas Level1', 'eine Beschreibung', 2, 'testuser', '12.04.2018', 'testuser', '12.04.2018');
+INSERT INTO public.REF_BRANCH_LEVEL(
+ name, description, fk_ref_branch, create_user, create_date, mod_user, mod_date)
+ VALUES ('Gas Level2', 'noch eine Beschreibung', 2, 'testuser', '12.04.2018', 'testuser', '12.04.2018');
+INSERT INTO public.REF_BRANCH_LEVEL(
+ name, description, fk_ref_branch, create_user, create_date, mod_user, mod_date)
+ VALUES ('Fernwärme Level3', 'und noch eine Beschreibung', 3, 'testuser', '12.04.2018', 'testuser', '12.04.2018');
+
+-- ---------------------------------------------
+-- TABLE REF_GM_STATUS
+-- ---------------------------------------------
+CREATE SEQUENCE public.REF_GM_STATUS_ID_SEQ
+ INCREMENT 1
+ MINVALUE 1
+ MAXVALUE 9223372036854775807
+ START 1
+ CACHE 1;
+
+ALTER TABLE public.REF_GM_STATUS_ID_SEQ
+ OWNER TO PLGM_SERVICE;
+
+CREATE TABLE public.REF_GM_STATUS
+(
+ ID integer NOT NULL DEFAULT nextval('REF_GM_STATUS_ID_SEQ'::regclass),
+ NAME character varying(50) NOT NULL,
+ COLOR_CODE character varying(20),
+ CREATE_USER character varying(100) NOT NULL,
+ CREATE_DATE timestamp without time zone NOT NULL,
+ MOD_USER character varying(100),
+ MOD_DATE timestamp without time zone,
+ CONSTRAINT REF_GM_STATUS_PKEY PRIMARY KEY (id)
+)
+WITH (
+ OIDS=FALSE
+);
+
+ALTER TABLE public.REF_GM_STATUS
+ OWNER TO PLGM_SERVICE;
+GRANT ALL ON TABLE public.REF_GM_STATUS TO PLGM_SERVICE;
+
+INSERT INTO
+ public.REF_GM_STATUS(id, name, create_user, color_code, create_date, mod_user, mod_date)
+VALUES
+ (0,'Neu','system', '#79b61c', '09.04.2018','system','09.04.2018');
+INSERT INTO
+ public.REF_GM_STATUS(id, name, create_user, color_code, create_date, mod_user, mod_date)
+VALUES
+ (1,'Beantragt','system', '#6db12d', '09.04.2018','system','09.04.2018');
+INSERT INTO
+ public.REF_GM_STATUS(id, name, create_user, color_code, create_date, mod_user, mod_date)
+VALUES
+ (2,'Storniert','system', '#990000', '09.04.2018','system','09.04.2018');
+INSERT INTO
+ public.REF_GM_STATUS(id, name, create_user, color_code, create_date, mod_user, mod_date)
+VALUES
+ (3,'Zur Genehmigung','system', '#60ab3f', '09.04.2018','system','09.04.2018');
+INSERT INTO
+ public.REF_GM_STATUS(id, name, create_user, color_code, create_date, mod_user, mod_date)
+VALUES
+ (4,'Genehmigt','system', '#54a650', '09.04.2018','system','09.04.2018');
+INSERT INTO
+ public.REF_GM_STATUS(id, name, create_user, color_code, create_date, mod_user, mod_date)
+VALUES
+ (5,'Angefordert','system', '#379979', '09.04.2018','system','09.04.2018');
+INSERT INTO
+ public.REF_GM_STATUS(id, name, create_user, color_code, create_date, mod_user, mod_date)
+VALUES
+ (6,'Freigegeben','system', '#1c8d9f', '09.04.2018','system','09.04.2018');
+INSERT INTO
+ public.REF_GM_STATUS(id, name, create_user, color_code, create_date, mod_user, mod_date)
+VALUES
+ (7,'Schalten aktiv','system', '#1c8d9f', '09.04.2018','system','09.04.2018');
+INSERT INTO
+ public.REF_GM_STATUS(id, name, create_user, color_code, create_date, mod_user, mod_date)
+VALUES
+ (8,'In Arbeit','system', '#0281c4', '09.04.2018','system','09.04.2018');
+INSERT INTO
+ public.REF_GM_STATUS(id, name, create_user, color_code, create_date, mod_user, mod_date)
+VALUES
+ (9,'Arbeit beendet','system', '#0281c4', '09.04.2018','system','09.04.2018');
+INSERT INTO
+ public.REF_GM_STATUS(id, name, create_user, color_code, create_date, mod_user, mod_date)
+VALUES
+ (10,'Maßnahme beendet','system', '#0281c4', '09.04.2018','system','09.04.2018');
+INSERT INTO
+ public.REF_GM_STATUS(id, name, create_user, color_code, create_date, mod_user, mod_date)
+VALUES
+ (11,'Geschlossen','system', '#0281c4', '09.04.2018','system','09.04.2018');
+INSERT INTO
+ public.REF_GM_STATUS(id, name, create_user, color_code, create_date, mod_user, mod_date)
+VALUES
+ (12,'Abgelehnt','system', '#990000', '17.06.2018','system','17.06.2018');
+
+
+
+-- ---------------------------------------------
+-- TABLE TBL_GRIDMEASURE
+-- ---------------------------------------------
+-- REQUESTER_NAME COLUMN DELETED--
+CREATE SEQUENCE public.TBL_GRIDMEASURE_ID_SEQ
+ INCREMENT 1
+ MINVALUE 1
+ MAXVALUE 9223372036854775807
+ START 1
+ CACHE 1;
+
+ALTER TABLE public.TBL_GRIDMEASURE_ID_SEQ
+ OWNER TO PLGM_SERVICE;
+
+CREATE TABLE public.tbl_gridmeasure
+(
+ id integer NOT NULL DEFAULT nextval('tbl_gridmeasure_id_seq'::regclass),
+ id_descriptive character varying(50),
+ title character varying(256),
+ affected_resource character varying(256),
+ remark character varying(1024),
+ email_addresses character varying(1024),
+ fk_ref_gm_status integer,
+ switching_object character varying(256),
+ cost_center character varying(50),
+ approval_by character varying(256),
+ area_of_switching character varying(256),
+ appointment_repetition character varying(100),
+ appointment_startdate timestamp without time zone,
+ appointment_numberof integer,
+ planned_starttime_first_sequence timestamp without time zone,
+ planned_starttime_first_singlemeasure timestamp without time zone,
+ planned_endtime_last_singlemeasure timestamp without time zone,
+ planned_endtime_gridmeasure timestamp without time zone,
+ starttime_first_sequence timestamp without time zone,
+ starttime_first_singlemeasure timestamp without time zone,
+ endtime_last_singlemeasure timestamp without time zone,
+ endtime_gridmeasure timestamp without time zone,
+ time_of_reallocation character varying(100),
+ description character varying(1024),
+ fk_ref_branch integer,
+ fk_ref_branch_level integer,
+ create_user character varying(100) NOT NULL,
+ create_user_department character varying(100),
+ create_date timestamp without time zone NOT NULL,
+ mod_user character varying(100),
+ mod_user_department character varying(100),
+ mod_date timestamp without time zone,
+ CONSTRAINT tbl_gridmeasure_pkey PRIMARY KEY (id),
+ CONSTRAINT fk_gridmeasure__gm_status FOREIGN KEY (fk_ref_gm_status)
+ REFERENCES public.ref_gm_status (id) MATCH SIMPLE
+ ON UPDATE NO ACTION ON DELETE NO ACTION,
+ CONSTRAINT fk_gridmeasure__branch FOREIGN KEY (fk_ref_branch)
+ REFERENCES public.ref_branch (id) MATCH SIMPLE
+ ON UPDATE NO ACTION ON DELETE NO ACTION,
+ CONSTRAINT fk_gridmeasure__branch_level FOREIGN KEY (fk_ref_branch_level)
+ REFERENCES public.ref_branch_level (id) MATCH SIMPLE
+ ON UPDATE NO ACTION ON DELETE NO ACTION
+)
+WITH (
+ OIDS=FALSE
+);
+ALTER TABLE public.tbl_gridmeasure
+ OWNER TO plgm_service;
+GRANT ALL ON TABLE public.tbl_gridmeasure TO plgm_service;
+
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+
+INSERT INTO public.tbl_gridmeasure(
+ id_descriptive, title, affected_resource, remark, email_addresses, fk_ref_gm_status,
+ switching_object, cost_center,
+ approval_by, area_of_switching, appointment_repetition, appointment_startdate,
+ appointment_numberof, planned_starttime_first_sequence, planned_starttime_first_singlemeasure,
+ planned_endtime_last_singlemeasure, planned_endtime_gridmeasure,
+ starttime_first_sequence, starttime_first_singlemeasure, endtime_last_singlemeasure,
+ endtime_gridmeasure, time_of_reallocation, description, fk_ref_branch,
+ fk_ref_branch_level, create_user, create_user_department, create_date,
+ mod_user, mod_user_department, mod_date)
+ VALUES ('2018_1', 'Kabel erneuern', 'Kabel', 'Kabel defekt', 'mailingListRecipient@test.de; mailingList2Recipient@test.de', 0,
+ 'Kabel', 'K-155',
+ 'otto', 'Frankfurt', 'einmalig', '2018-06-14 15:15:00',
+ 7, '2018-06-09 15:00:00', '2018-06-10 16:30:00',
+ '2018-06-11 14:00:00', '2018-06-17 20:15:00',
+ '2018-06-14 15:15:00', '2018-06-15 15:45:00', '2018-06-16 13:00:00',
+ '2018-06-18 16:00:00', 'in zwei Tagen', 'Das Kabel austauschen', 1,
+ 1, 'otto', 4, '2018-06-09 15:00:00',
+ 'otto', 3, '2018-06-14 15:15:00');
+
+INSERT INTO public.tbl_gridmeasure(
+ id_descriptive, title, affected_resource, remark, email_addresses, fk_ref_gm_status,
+ switching_object, cost_center,
+ approval_by, area_of_switching, appointment_repetition, appointment_startdate,
+ appointment_numberof, planned_starttime_first_sequence, planned_starttime_first_singlemeasure,
+ planned_endtime_last_singlemeasure, planned_endtime_gridmeasure,
+ starttime_first_sequence, starttime_first_singlemeasure, endtime_last_singlemeasure,
+ endtime_gridmeasure, time_of_reallocation, description, fk_ref_branch,
+ fk_ref_branch_level, create_user, create_user_department, create_date,
+ mod_user, mod_user_department, mod_date)
+ VALUES ('2018_2', 'Lampe erneuern', 'Lampe', 'Lampe defekt', 'mailingListRecipient@test.de; mailingList2Recipient@test.de', 1,
+ 'Lampe', 'K-004',
+ 'jasper', 'Mannheim', 'einmalig', '2018-06-16 15:15:00',
+ 3, '2018-06-11 15:00:00', '2018-06-12 16:30:00',
+ '2018-06-13 14:00:00', '2018-06-19 20:15:00',
+ '2018-06-16 15:15:00', '2018-06-17 15:45:00', '2018-06-18 13:00:00',
+ '2018-06-20 16:00:00', 'in zwei Tagen', 'Die Lampe austauschen', 2,
+ 1, 'jasper', 3, '2018-06-11 15:00:00',
+ 'jasper', 4, '2018-06-14 15:15:00');
+
+INSERT INTO public.tbl_gridmeasure(
+ id_descriptive, title, affected_resource, remark, email_addresses, fk_ref_gm_status,
+ switching_object, cost_center,
+ approval_by, area_of_switching, appointment_repetition, appointment_startdate,
+ appointment_numberof, planned_starttime_first_sequence, planned_starttime_first_singlemeasure,
+ planned_endtime_last_singlemeasure, planned_endtime_gridmeasure,
+ starttime_first_sequence, starttime_first_singlemeasure, endtime_last_singlemeasure,
+ endtime_gridmeasure, time_of_reallocation, description, fk_ref_branch,
+ fk_ref_branch_level, create_user, create_user_department, create_date,
+ mod_user, mod_user_department, mod_date)
+ VALUES ('2018_3', 'Transformator erneuern', 'Transformator', 'Transformator defekt', 'mailingListRecipient@test.de; mailingList2Recipient@test.de', 2,
+ 'Transformator', 'K-222',
+ 'hugo', 'Murr', 'täglich', '2018-06-17 15:15:00',
+ 6, '2018-06-12 15:00:00', '2018-06-13 16:30:00',
+ '2018-06-14 14:00:00', '2018-06-20 20:15:00',
+ '2018-06-17 15:15:00', '2018-06-18 15:45:00', '2018-06-19 13:00:00',
+ '2018-06-21 16:00:00', 'in 8 Tagen', 'Den Transformator austauschen', 4,
+ 1, 'hugo', 4, '2018-06-12 15:00:00',
+ 'otto', 4, '2018-06-17 15:15:00');
+
+INSERT INTO public.tbl_gridmeasure(
+ id_descriptive, title, affected_resource, remark, email_addresses, fk_ref_gm_status,
+ switching_object, cost_center,
+ approval_by, area_of_switching, appointment_repetition, appointment_startdate,
+ appointment_numberof, planned_starttime_first_sequence, planned_starttime_first_singlemeasure,
+ planned_endtime_last_singlemeasure, planned_endtime_gridmeasure,
+ starttime_first_sequence, starttime_first_singlemeasure, endtime_last_singlemeasure,
+ endtime_gridmeasure, time_of_reallocation, description, fk_ref_branch,
+ fk_ref_branch_level, create_user, create_user_department, create_date,
+ mod_user, mod_user_department, mod_date)
+ VALUES ('2018_4', 'Transformator ersetzen', 'Transformator', 'Transformator kaputt', 'mailingListRecipient@test.de; mailingList2Recipient@test.de', 3,
+ 'Transformator', 'K-155',
+ 'otto', 'Stuttgart', 'einmalig', '2018-06-18 15:15:00',
+ 3, '2018-06-13 15:00:00', '2018-06-14 16:30:00',
+ '2018-06-15 14:00:00', '2018-06-21 20:15:00',
+ '2018-06-18 15:15:00', '2018-06-19 15:45:00', '2018-06-20 13:00:00',
+ '2018-06-22 16:00:00', 'in 9 Tagen', 'Den Transformator austauschen', 3,
+ 1, 'otto', 4, '2018-06-13 15:00:00',
+ 'otto', 5, '2018-06-18 15:15:00');
+
+INSERT INTO public.tbl_gridmeasure(
+ id_descriptive, title, affected_resource, remark, email_addresses, fk_ref_gm_status,
+ switching_object, cost_center,
+ approval_by, area_of_switching, appointment_repetition, appointment_startdate,
+ appointment_numberof, planned_starttime_first_sequence, planned_starttime_first_singlemeasure,
+ planned_endtime_last_singlemeasure, planned_endtime_gridmeasure,
+ starttime_first_sequence, starttime_first_singlemeasure, endtime_last_singlemeasure,
+ endtime_gridmeasure, time_of_reallocation, description, fk_ref_branch,
+ fk_ref_branch_level, create_user, create_user_department, create_date,
+ mod_user, mod_user_department, mod_date)
+ VALUES ('2018_5', 'Gas Station', 'Station', 'Station defekt', 'mailingListRecipient@test.de; mailingList2Recipient@test.de', 4,
+ 'Station', 'K-004',
+ 'otto', 'Ludwigsburg', 'wöchentlich', '2018-07-14 15:15:00',
+ 1, '2018-07-09 15:00:00', '2018-07-10 16:30:00',
+ '2018-07-11 14:00:00', '2018-07-17 20:15:00',
+ '2018-07-14 15:15:00', '2018-07-15 15:45:00', '2018-07-16 13:00:00',
+ '2018-07-18 16:00:00', 'in zwei Wochen', 'Die Gas Station untersuchen', 2,
+ 1, 'otto', 5, '2018-07-09 15:00:00',
+ 'otto', 3, '2018-07-14 15:15:00');
+
+INSERT INTO public.tbl_gridmeasure(
+ id_descriptive, title, affected_resource, remark, email_addresses, fk_ref_gm_status,
+ switching_object, cost_center,
+ approval_by, area_of_switching, appointment_repetition, appointment_startdate,
+ appointment_numberof, planned_starttime_first_sequence, planned_starttime_first_singlemeasure,
+ planned_endtime_last_singlemeasure, planned_endtime_gridmeasure,
+ starttime_first_sequence, starttime_first_singlemeasure, endtime_last_singlemeasure,
+ endtime_gridmeasure, time_of_reallocation, description, fk_ref_branch,
+ fk_ref_branch_level, create_user, create_user_department, create_date,
+ mod_user, mod_user_department, mod_date)
+ VALUES ('2018_6', 'Stuhl mit drei Beinen', 'Stuhl', 'Stuhl kaputt', 'mailingListRecipient@test.de; mailingList2Recipient@test.de', 5,
+ 'Stuhl', 'K-155',
+ 'otto', 'Hamburg', 'einmalig', '2018-06-12 15:15:00',
+ 3, '2018-06-07 15:00:00', '2018-06-08 16:30:00',
+ '2018-06-09 14:00:00', '2018-06-15 20:15:00',
+ '2018-06-12 15:15:00', '2018-06-13 15:45:00', '2018-06-14 13:00:00',
+ '2018-06-16 16:00:00', 'in zwei Tagen', 'Den Stuhl austauschen', 4,
+ 1, 'claudio', 4, '2018-06-07 15:00:00',
+ 'claudio', 3, '2018-06-12 15:15:00');
+
+INSERT INTO public.tbl_gridmeasure(
+ id_descriptive, title, affected_resource, remark, email_addresses, fk_ref_gm_status,
+ switching_object, cost_center,
+ approval_by, area_of_switching, appointment_repetition, appointment_startdate,
+ appointment_numberof, planned_starttime_first_sequence, planned_starttime_first_singlemeasure,
+ planned_endtime_last_singlemeasure, planned_endtime_gridmeasure,
+ starttime_first_sequence, starttime_first_singlemeasure, endtime_last_singlemeasure,
+ endtime_gridmeasure, time_of_reallocation, description, fk_ref_branch,
+ fk_ref_branch_level, create_user, create_user_department, create_date,
+ mod_user, mod_user_department, mod_date)
+ VALUES ('2018_7', 'Kabel vergrößern', 'Kabel', 'Kabel zu kurz', 'mailingListRecipient@test.de; mailingList2Recipient@test.de', 6,
+ 'Kabel', 'K-222',
+ 'dagmar', 'Steinheim', 'einmalig', '2018-08-14 15:15:00',
+ 27, '2018-08-09 15:00:00', '2018-08-10 16:30:00',
+ '2018-08-11 14:00:00', '2018-08-17 20:15:00',
+ '2018-08-14 15:15:00', '2018-08-15 15:45:00', '2018-06-16 13:00:00',
+ '2018-08-18 16:00:00', 'in zwei Wochen', 'Das Kabel vergrößern', 3,
+ 1, 'claudio', 3, '2018-08-09 15:00:00',
+ 'bruno', 5, '2018-08-14 15:15:00');
+
+INSERT INTO public.tbl_gridmeasure(
+ id_descriptive, title, affected_resource, remark, email_addresses, fk_ref_gm_status,
+ switching_object, cost_center,
+ approval_by, area_of_switching, appointment_repetition, appointment_startdate,
+ appointment_numberof, planned_starttime_first_sequence, planned_starttime_first_singlemeasure,
+ planned_endtime_last_singlemeasure, planned_endtime_gridmeasure,
+ starttime_first_sequence, starttime_first_singlemeasure, endtime_last_singlemeasure,
+ endtime_gridmeasure, time_of_reallocation, description, fk_ref_branch,
+ fk_ref_branch_level, create_user, create_user_department, create_date,
+ mod_user, mod_user_department, mod_date)
+ VALUES ('2018_8', 'Transformator austauschen', 'Transformator', 'Transformator 160 Grads', 'mailingListRecipient@test.de; mailingList2Recipient@test.de', 7,
+ 'Transformator', 'K-155',
+ 'dagmar', 'Murr', 'täglich', '2018-06-14 15:15:00',
+ 6, '2018-06-09 15:00:00', '2018-06-10 16:30:00',
+ '2018-06-11 14:00:00', '2018-06-17 20:15:00',
+ '2018-06-14 15:15:00', '2018-06-15 15:45:00', '2018-06-16 13:00:00',
+ '2018-06-18 16:00:00', 'in zwei Tagen', 'Den Transformator austauschen', 1,
+ 1, 'dagmar', 4, '2018-06-09 15:00:00',
+ 'dagmar', 3, '2018-06-14 15:15:00');
+
+INSERT INTO public.tbl_gridmeasure(
+ id_descriptive, title, affected_resource, remark, email_addresses, fk_ref_gm_status,
+ switching_object, cost_center,
+ approval_by, area_of_switching, appointment_repetition, appointment_startdate,
+ appointment_numberof, planned_starttime_first_sequence, planned_starttime_first_singlemeasure,
+ planned_endtime_last_singlemeasure, planned_endtime_gridmeasure,
+ starttime_first_sequence, starttime_first_singlemeasure, endtime_last_singlemeasure,
+ endtime_gridmeasure, time_of_reallocation, description, fk_ref_branch,
+ fk_ref_branch_level, create_user, create_user_department, create_date,
+ mod_user, mod_user_department, mod_date)
+ VALUES ('2018_9', 'Alles kaputt', 'Alles', 'Alles defekt', 'mailingListRecipient@test.de; mailingList2Recipient@test.de', 8,
+ 'Alles', 'K-222',
+ 'otto', 'Berlin', 'einmalig', '2018-06-15 15:15:00',
+ 2, '2018-06-10 15:00:00', '2018-06-11 16:30:00',
+ '2018-06-12 14:00:00', '2018-06-18 20:15:00',
+ '2018-06-15 15:15:00', '2018-06-16 15:45:00', '2018-06-17 13:00:00',
+ '2018-06-19 16:00:00', 'in zwei Jahren', 'Alles wegwerfen', 2,
+ 3, 'bruno', 5, '2018-06-10 15:00:00',
+ 'claudio', 5, '2018-06-15 15:15:00');
+
+INSERT INTO public.tbl_gridmeasure(
+ id_descriptive, title, affected_resource, remark, email_addresses, fk_ref_gm_status,
+ switching_object, cost_center,
+ approval_by, area_of_switching, appointment_repetition, appointment_startdate,
+ appointment_numberof, planned_starttime_first_sequence, planned_starttime_first_singlemeasure,
+ planned_endtime_last_singlemeasure, planned_endtime_gridmeasure,
+ starttime_first_sequence, starttime_first_singlemeasure, endtime_last_singlemeasure,
+ endtime_gridmeasure, time_of_reallocation, description, fk_ref_branch,
+ fk_ref_branch_level, create_user, create_user_department, create_date,
+ mod_user, mod_user_department, mod_date)
+ VALUES ('2018_10', 'Schalter erneuern', 'Schalter', 'Schalter defekt', 'mailingListRecipient@test.de; mailingList2Recipient@test.de', 9,
+ 'Schalter', 'K-004',
+ 'hugo', 'Kassel', 'einmalig', '2018-08-14 15:15:00',
+ 9, '2018-08-09 15:00:00', '2018-08-10 16:30:00',
+ '2018-08-11 14:00:00', '2018-08-17 20:15:00',
+ '2018-08-14 15:15:00', '2018-08-15 15:45:00', '2018-08-16 13:00:00',
+ '2018-08-18 16:00:00', 'in 6 Tagen', 'Den Schalter austauschen', 1,
+ 1, 'dagmar', 3, '2018-08-09 15:00:00',
+ 'otto', 3, '2018-08-14 15:15:00');
+
+INSERT INTO public.tbl_gridmeasure(
+ id_descriptive, title, affected_resource, remark, email_addresses, fk_ref_gm_status,
+ switching_object, cost_center,
+ approval_by, area_of_switching, appointment_repetition, appointment_startdate,
+ appointment_numberof, planned_starttime_first_sequence, planned_starttime_first_singlemeasure,
+ planned_endtime_last_singlemeasure, planned_endtime_gridmeasure,
+ starttime_first_sequence, starttime_first_singlemeasure, endtime_last_singlemeasure,
+ endtime_gridmeasure, time_of_reallocation, description, fk_ref_branch,
+ fk_ref_branch_level, create_user, create_user_department, create_date,
+ mod_user, mod_user_department, mod_date)
+ VALUES ('2018_11', 'Rechner austauschen', 'Rechner', 'Rechner defekt', 'mailingListRecipient@test.de; mailingList2Recipient@test.de', 10,
+ 'Rechner', 'K-155',
+ 'claudio', 'Murr', 'einmalig', '2018-06-12 15:15:00',
+ 3, '2018-06-07 15:00:00', '2018-06-08 16:30:00',
+ '2018-06-09 14:00:00', '2018-06-15 20:15:00',
+ '2018-06-12 15:15:00', '2018-06-13 15:45:00', '2018-06-14 13:00:00',
+ '2018-06-16 16:00:00', 'in zwei Tagen', 'Den Rechner austauschen', 4,
+ 1, 'hugo', 5, '2018-06-07 15:00:00',
+ 'otto', 3, '2018-06-12 15:15:00');
+
+INSERT INTO public.tbl_gridmeasure(
+ id_descriptive, title, affected_resource, remark, email_addresses, fk_ref_gm_status,
+ switching_object, cost_center,
+ approval_by, area_of_switching, appointment_repetition, appointment_startdate,
+ appointment_numberof, planned_starttime_first_sequence, planned_starttime_first_singlemeasure,
+ planned_endtime_last_singlemeasure, planned_endtime_gridmeasure,
+ starttime_first_sequence, starttime_first_singlemeasure, endtime_last_singlemeasure,
+ endtime_gridmeasure, time_of_reallocation, description, fk_ref_branch,
+ fk_ref_branch_level, create_user, create_user_department, create_date,
+ mod_user, mod_user_department, mod_date)
+ VALUES ('2018_12', 'Maschine untersuchen', 'Maschine', 'Maschine defekt', 'mailingListRecipient@test.de; mailingList2Recipient@test.de', 11,
+ 'Maschine', 'K-004',
+ 'otto', 'Ludwigsburg', 'einmalig', '2018-06-20 15:15:00',
+ 5, '2018-06-15 15:00:00', '2018-06-16 16:30:00',
+ '2018-06-17 14:00:00', '2018-06-23 20:15:00',
+ '2018-06-20 15:15:00', '2018-06-21 15:45:00', '2018-06-22 13:00:00',
+ '2018-06-24 16:00:00', 'in 8 Tagen', 'Die Maschine austauschen', 1,
+ 1, 'bruno', 4, '2018-06-15 15:00:00',
+ 'bruno', 3, '2018-06-20 15:15:00');
+
+
+
+
+-- ---------------------------------------------
+-- TABLE TBL_SINGLE_GRIDMEASURE
+-- ---------------------------------------------
+
+CREATE SEQUENCE public.tbl_single_gridmeasure_id_seq
+ INCREMENT 1
+ MINVALUE 1
+ MAXVALUE 9223372036854775807
+ START 1
+ CACHE 1;
+ALTER TABLE public.tbl_single_gridmeasure_id_seq
+ OWNER TO plgm_service;
+
+CREATE TABLE public.tbl_single_gridmeasure
+(
+ id integer NOT NULL DEFAULT nextval('tbl_single_gridmeasure_id_seq'::regclass),
+ sortorder integer NOT NULL,
+ title character varying(256),
+ switching_object character varying(256),
+ cim_id character varying(256),
+ cim_name character varying(256),
+ cim_description character varying(1024),
+ planned_starttime_singlemeasure timestamp without time zone,
+ planned_endtime_singlemeasure timestamp without time zone,
+ description character varying(1024),
+ responsible_onsite_name character varying(256),
+ responsible_onsite_department character varying(256),
+ network_control character varying(256),
+ fk_tbl_gridmeasure integer NOT NULL,
+ create_user character varying(100) NOT NULL,
+ create_date timestamp without time zone NOT NULL,
+ mod_user character varying(100),
+ mod_date timestamp without time zone,
+ CONSTRAINT tbl_single_gridmeasure_pkey PRIMARY KEY (id),
+ CONSTRAINT fk_single_gridmeasure__gridmeasure FOREIGN KEY (fk_tbl_gridmeasure)
+ REFERENCES public.tbl_gridmeasure (id) MATCH SIMPLE
+ ON UPDATE NO ACTION ON DELETE NO ACTION
+)
+WITH (
+ OIDS=FALSE
+);
+ALTER TABLE public.tbl_single_gridmeasure
+ OWNER TO plgm_service;
+GRANT ALL ON TABLE public.tbl_single_gridmeasure TO plgm_service;
+
+
+INSERT INTO public.tbl_single_gridmeasure(
+ sortorder, title, switching_object, cim_id, cim_name, cim_description,
+ planned_starttime_singlemeasure, planned_endtime_singlemeasure,
+ description, fk_tbl_gridmeasure, create_user, create_date, mod_user,
+ mod_date)
+ VALUES (1, 'Lampe ausschalten', 'Lampe', '2', 'cim', 'cim Beschreibung',
+ '2018-06-10 16:30:00', '2018-06-11 14:00:00',
+ 'Beschreibung', 1, 'Otto', '01.07.2018', 'Otto',
+ '01.07.2018');
+INSERT INTO public.tbl_single_gridmeasure(
+ sortorder, title, switching_object, cim_id, cim_name, cim_description,
+ planned_starttime_singlemeasure, planned_endtime_singlemeasure,
+ description, fk_tbl_gridmeasure, create_user, create_date, mod_user,
+ mod_date)
+ VALUES (2, 'Kabel kürzen', 'Kabel', '2', 'cim', 'cim Beschreibung',
+ '2018-06-10 16:30:00', '2018-06-11 14:00:00',
+ 'Beschreibung', 1, 'Otto', '01.07.2018', 'Otto',
+ '01.07.2018');
+INSERT INTO public.tbl_single_gridmeasure(
+ sortorder, title, switching_object, cim_id, cim_name, cim_description,
+ planned_starttime_singlemeasure, planned_endtime_singlemeasure,
+ description, fk_tbl_gridmeasure, create_user, create_date, mod_user,
+ mod_date)
+ VALUES (3, 'Transformator tauschen', 'Transformator', '2', 'cim', 'cim Beschreibung',
+ '2018-06-10 16:30:00', '2018-06-11 14:00:00',
+ 'Beschreibung', 1, 'Otto', '01.07.2018', 'Otto',
+ '01.07.2018');
+
+INSERT INTO public.tbl_single_gridmeasure(
+ sortorder, title, switching_object, cim_id, cim_name, cim_description,
+ planned_starttime_singlemeasure, planned_endtime_singlemeasure,
+ description, fk_tbl_gridmeasure, create_user, create_date, mod_user,
+ mod_date)
+ VALUES (1, 'Lampe erneuern', 'Lampe', '2', 'cim', 'cim Beschreibung',
+ '2018-06-12 16:30:00', '2018-06-13 14:00:00',
+ 'Beschreibung', 2, 'Hugo', '01.07.2018', 'Hugo',
+ '01.07.2018');
+
+INSERT INTO public.tbl_single_gridmeasure(
+ sortorder, title, switching_object, cim_id, cim_name, cim_description,
+ planned_starttime_singlemeasure, planned_endtime_singlemeasure,
+ description, fk_tbl_gridmeasure, create_user, create_date, mod_user,
+ mod_date)
+ VALUES (1, 'Transformator', 'Transformator', '2', 'cim', 'cim Beschreibung',
+ '2018-06-13 16:30:00', '2018-06-14 14:00:00',
+ 'Beschreibung', 3, 'Hugo', '01.07.2018', 'Hugo',
+ '01.07.2018');
+
+INSERT INTO public.tbl_single_gridmeasure(
+ sortorder, title, switching_object, cim_id, cim_name, cim_description,
+ planned_starttime_singlemeasure, planned_endtime_singlemeasure,
+ description, fk_tbl_gridmeasure, create_user, create_date, mod_user,
+ mod_date)
+ VALUES (1, 'Transformator', 'Transformator', '2', 'cim', 'cim Beschreibung',
+ '2018-06-14 16:30:00', '2018-06-15 14:00:00',
+ 'Beschreibung', 4, 'Hugo', '01.07.2018', 'Jasper',
+ '01.07.2018');
+
+INSERT INTO public.tbl_single_gridmeasure(
+ sortorder, title, switching_object, cim_id, cim_name, cim_description,
+ planned_starttime_singlemeasure, planned_endtime_singlemeasure,
+ description, fk_tbl_gridmeasure, create_user, create_date, mod_user,
+ mod_date)
+ VALUES (1, 'Gas', 'Gas', '2', 'cim', 'cim Beschreibung',
+ '2018-07-10 16:30:00', '2018-07-11 14:00:00',
+ 'Beschreibung', 5, 'Jasper', '01.07.2018', 'Jasper',
+ '01.07.2018');
+
+INSERT INTO public.tbl_single_gridmeasure(
+ sortorder, title, switching_object, cim_id, cim_name, cim_description,
+ planned_starttime_singlemeasure, planned_endtime_singlemeasure,
+ description, fk_tbl_gridmeasure, create_user, create_date, mod_user,
+ mod_date)
+ VALUES (2, 'Gas 2', 'Gas', '2', 'cim', 'cim Beschreibung',
+ '2018-07-10 16:30:00', '2018-07-11 14:00:00',
+ 'Beschreibung', 5, 'Jasper', '01.07.2018', 'Jasper',
+ '01.07.2018');
+
+INSERT INTO public.tbl_single_gridmeasure(
+ sortorder, title, switching_object, cim_id, cim_name, cim_description,
+ planned_starttime_singlemeasure, planned_endtime_singlemeasure,
+ description, fk_tbl_gridmeasure, create_user, create_date, mod_user,
+ mod_date)
+ VALUES (1, 'Stuhl', 'Stuhl', '2', 'cim', 'cim Beschreibung',
+ '2018-06-08 16:30:00', '2018-06-09 14:00:00',
+ 'Beschreibung', 6, 'Otto', '01.07.2018', 'Jasper',
+ '01.07.2018');
+
+INSERT INTO public.tbl_single_gridmeasure(
+ sortorder, title, switching_object, cim_id, cim_name, cim_description,
+ planned_starttime_singlemeasure, planned_endtime_singlemeasure,
+ description, fk_tbl_gridmeasure, create_user, create_date, mod_user,
+ mod_date)
+ VALUES (1, 'Kabel', 'Kabel', '2', 'cim', 'cim Beschreibung',
+ '2018-08-10 16:30:00', '2018-08-11 14:00:00',
+ 'Beschreibung', 7, 'Otto', '01.07.2018', 'Hugo',
+ '01.07.2018');
+
+INSERT INTO public.tbl_single_gridmeasure(
+ sortorder, title, switching_object, cim_id, cim_name, cim_description,
+ planned_starttime_singlemeasure, planned_endtime_singlemeasure,
+ description, fk_tbl_gridmeasure, create_user, create_date, mod_user,
+ mod_date)
+ VALUES (1, 'Transformator', 'Transformator', '2', 'cim', 'cim Beschreibung',
+ '2018-06-10 16:30:00', '2018-06-11 14:00:00',
+ 'Beschreibung', 8, 'Hugo', '01.07.2018', 'Jasper',
+ '01.07.2018');
+
+INSERT INTO public.tbl_single_gridmeasure(
+ sortorder, title, switching_object, cim_id, cim_name, cim_description,
+ planned_starttime_singlemeasure, planned_endtime_singlemeasure,
+ description, fk_tbl_gridmeasure, create_user, create_date, mod_user,
+ mod_date)
+ VALUES (2, 'Transformator 2', 'Transformator', '2', 'cim', 'cim Beschreibung',
+ '2018-06-10 16:30:00', '2018-06-11 14:00:00',
+ 'Beschreibung', 8, 'Hugo', '01.07.2018', 'Jasper',
+ '01.07.2018');
+
+INSERT INTO public.tbl_single_gridmeasure(
+ sortorder, title, switching_object, cim_id, cim_name, cim_description,
+ planned_starttime_singlemeasure, planned_endtime_singlemeasure,
+ description, fk_tbl_gridmeasure, create_user, create_date, mod_user,
+ mod_date)
+ VALUES (1, 'Alles', 'Alles', '2', 'cim', 'cim Beschreibung',
+ '2018-06-11 16:30:00', '2018-06-12 14:00:00',
+ 'Beschreibung', 9, 'Otto', '01.07.2018', 'Jasper',
+ '01.07.2018');
+
+INSERT INTO public.tbl_single_gridmeasure(
+ sortorder, title, switching_object, cim_id, cim_name, cim_description,
+ planned_starttime_singlemeasure, planned_endtime_singlemeasure,
+ description, fk_tbl_gridmeasure, create_user, create_date, mod_user,
+ mod_date)
+ VALUES (1, 'Schalter', 'Schalter', '2', 'cim', 'cim Beschreibung',
+ '2018-08-10 16:30:00', '2018-08-11 14:00:00',
+ 'Beschreibung', 10, 'Otto', '01.07.2018', 'Hugo',
+ '01.07.2018');
+
+INSERT INTO public.tbl_single_gridmeasure(
+ sortorder, title, switching_object, cim_id, cim_name, cim_description,
+ planned_starttime_singlemeasure, planned_endtime_singlemeasure,
+ description, fk_tbl_gridmeasure, create_user, create_date, mod_user,
+ mod_date)
+ VALUES (2, 'Schalter 2', 'Schalter', '2', 'cim', 'cim Beschreibung',
+ '2018-08-10 16:30:00', '2018-08-11 14:00:00',
+ 'Beschreibung', 10, 'Otto', '01.07.2018', 'Hugo',
+ '01.07.2018');
+
+INSERT INTO public.tbl_single_gridmeasure(
+ sortorder, title, switching_object, cim_id, cim_name, cim_description,
+ planned_starttime_singlemeasure, planned_endtime_singlemeasure,
+ description, fk_tbl_gridmeasure, create_user, create_date, mod_user,
+ mod_date)
+ VALUES (1, 'Rechner', 'Rechner', '2', 'cim', 'cim Beschreibung',
+ '2018-06-08 16:30:00', '2018-06-09 14:00:00',
+ 'Beschreibung', 11, 'Jasper', '01.07.2018', 'Jasper',
+ '01.07.2018');
+
+INSERT INTO public.tbl_single_gridmeasure(
+ sortorder, title, switching_object, cim_id, cim_name, cim_description,
+ planned_starttime_singlemeasure, planned_endtime_singlemeasure,
+ description, fk_tbl_gridmeasure, create_user, create_date, mod_user,
+ mod_date)
+ VALUES (1, 'Maschine', 'Maschine', '2', 'cim', 'cim Beschreibung',
+ '2018-06-16 16:30:00', '2018-06-17 14:00:00',
+ 'Beschreibung', 12, 'Hugo', '01.07.2018', 'Jasper',
+ '01.07.2018');
+
+
+-- ---------------------------------------------
+-- TABLE TBL_STEPS
+-- ---------------------------------------------
+
+CREATE SEQUENCE public.tbl_steps_id_seq
+ INCREMENT 1
+ MINVALUE 1
+ MAXVALUE 9223372036854775807
+ START 1
+ CACHE 1;
+ALTER TABLE public.tbl_steps_id_seq
+ OWNER TO plgm_service;
+
+CREATE TABLE public.tbl_steps
+(
+ id integer NOT NULL DEFAULT nextval('tbl_steps_id_seq'::regclass),
+ sortorder integer NOT NULL,
+ switching_object character varying(256),
+ type character varying(256),
+ present_time character varying(256),
+ present_state character varying(256),
+ target_state character varying(256),
+ operator character varying(256),
+ fk_tbl_single_gridmeasure integer NOT NULL,
+ create_user character varying(100) NOT NULL,
+ create_date timestamp without time zone NOT NULL,
+ mod_user character varying(100),
+ mod_date timestamp without time zone,
+ CONSTRAINT tbl_steps_pkey PRIMARY KEY (id),
+ CONSTRAINT fk_steps__single_gridmeasure FOREIGN KEY (fk_tbl_single_gridmeasure)
+ REFERENCES public.tbl_single_gridmeasure (id) MATCH SIMPLE
+ ON UPDATE NO ACTION ON DELETE NO ACTION
+)
+WITH (
+ OIDS=FALSE
+);
+ALTER TABLE public.tbl_steps
+ OWNER TO plgm_service;
+GRANT ALL ON TABLE public.tbl_steps TO plgm_service;
+
+
+-- ---------------------------------------------
+-- TABLE REF_VERSION
+-- ---------------------------------------------
+
+DROP TABLE IF EXISTS public.REF_VERSION;
+
+CREATE TABLE public.REF_VERSION
+(
+ id integer NOT NULL,
+ version character varying(100) NOT NULL,
+ CONSTRAINT ref_version_pkey PRIMARY KEY (id)
+)
+WITH (
+ OIDS=FALSE
+);
+ALTER TABLE public.REF_VERSION
+ OWNER TO PLGM_SERVICE;
+GRANT ALL ON TABLE public.REF_VERSION TO PLGM_SERVICE;
+
+INSERT INTO REF_VERSION VALUES (1, '0.0.1_PG');
+
+-- ---------------------------------------------
+-- TABLE TBL_DOCUMENTS
+-- ---------------------------------------------
+
+CREATE SEQUENCE public.tbl_documents_id_seq
+ INCREMENT 1
+ MINVALUE 1
+ MAXVALUE 9223372036854775807
+ START 1
+ CACHE 1;
+ALTER TABLE public.tbl_documents_id_seq
+ OWNER TO plgm_service;
+
+CREATE TABLE public.tbl_documents
+(
+ id integer NOT NULL DEFAULT nextval('tbl_documents_id_seq'::regclass),
+ document_name character varying(260),
+ document bytea,
+ create_user character varying(100) NOT NULL,
+ create_date timestamp without time zone NOT NULL,
+ mod_user character varying(100),
+ mod_date timestamp without time zone,
+ CONSTRAINT tbl_documents_pkey PRIMARY KEY (id)
+)
+WITH (
+ OIDS=FALSE
+);
+ALTER TABLE public.tbl_documents
+ OWNER TO plgm_service;
+GRANT ALL ON TABLE public.tbl_documents TO plgm_service;
+
+
+-- ---------------------------------------------
+-- TABLE TBL_MEASURE_DOCUMENTS
+-- ---------------------------------------------
+
+CREATE SEQUENCE public.tbl_measure_documents_id_seq
+ INCREMENT 1
+ MINVALUE 1
+ MAXVALUE 9223372036854775807
+ START 1
+ CACHE 1;
+ALTER TABLE public.tbl_measure_documents_id_seq
+ OWNER TO plgm_service;
+
+CREATE TABLE public.tbl_measure_documents
+(
+ id integer NOT NULL DEFAULT nextval('tbl_measure_documents_id_seq'::regclass),
+ fk_tbl_measure integer,
+ fk_tbl_documents integer,
+ create_user character varying(100) NOT NULL,
+ create_date timestamp without time zone NOT NULL,
+ mod_user character varying(100),
+ mod_date timestamp without time zone,
+ CONSTRAINT tbl_measure_documents_pkey PRIMARY KEY (id),
+ CONSTRAINT fk_tbl_measure_documents_measure FOREIGN KEY (fk_tbl_measure)
+ REFERENCES public.tbl_gridmeasure (id) MATCH SIMPLE
+ ON UPDATE NO ACTION ON DELETE CASCADE,
+ CONSTRAINT fk_tbl_measure_documents_documents FOREIGN KEY (fk_tbl_documents)
+ REFERENCES public.tbl_documents (id) MATCH SIMPLE
+ ON UPDATE NO ACTION ON DELETE NO ACTION
+)
+WITH (
+ OIDS=FALSE
+);
+ALTER TABLE public.tbl_measure_documents
+ OWNER TO plgm_service;
+GRANT ALL ON TABLE public.tbl_measure_documents TO plgm_service;
+
+
+
+-- ----------------------------------------------------------------------------
+-- ----------------------------------------------------------------------------
+-- HISTORY-TABLES
+-- ----------------------------------------------------------------------------
+-- ----------------------------------------------------------------------------
+
+-- PUBLIC.HREF_TERRITORY Automatic generanted History Table DDL --
+-- <GENERATED CODE!>
+
+DROP TABLE IF EXISTS PUBLIC.HREF_TERRITORY;
+DROP SEQUENCE IF EXISTS PUBLIC.HREF_TERRITORY_ID_SEQ;
+
+CREATE SEQUENCE PUBLIC.HREF_TERRITORY_ID_SEQ
+ INCREMENT 1
+ MINVALUE 1
+ MAXVALUE 9223372036854775807
+ START 1
+ CACHE 1;
+
+ALTER TABLE PUBLIC.HREF_TERRITORY_ID_SEQ
+ OWNER TO PLGM_SERVICE;
+
+CREATE TABLE PUBLIC.HREF_TERRITORY
+(
+ HID integer NOT NULL DEFAULT nextval('HREF_TERRITORY_ID_SEQ'::regclass),
+ HACTION integer NOT NULL,
+ HDATE timestamp without time zone NOT NULL,
+ HUSER character varying(100),
+
+ ID integer,
+ NAME character varying (50),
+ DESCRIPTION character varying (255),
+
+ CREATE_USER character varying(100),
+ CREATE_DATE timestamp without time zone,
+ MOD_USER character varying(100),
+ MOD_DATE timestamp without time zone,
+ CONSTRAINT HREF_TERRITORY_PKEY PRIMARY KEY (HID)
+)
+WITH (
+ OIDS=FALSE
+);
+
+ALTER TABLE PUBLIC.HREF_TERRITORY
+ OWNER TO PLGM_SERVICE;
+GRANT ALL ON TABLE PUBLIC.HREF_TERRITORY TO PLGM_SERVICE;
+
+
+
+-- PUBLIC.HTBL_LOCK Automatic generanted History Table DDL --
+-- <GENERATED CODE!>
+
+DROP TABLE IF EXISTS PUBLIC.HTBL_LOCK;
+DROP SEQUENCE IF EXISTS PUBLIC.HTBL_LOCK_ID_SEQ;
+
+CREATE SEQUENCE PUBLIC.HTBL_LOCK_ID_SEQ
+ INCREMENT 1
+ MINVALUE 1
+ MAXVALUE 9223372036854775807
+ START 1
+ CACHE 1;
+
+ALTER TABLE PUBLIC.HTBL_LOCK_ID_SEQ
+ OWNER TO PLGM_SERVICE;
+
+CREATE TABLE PUBLIC.HTBL_LOCK
+(
+ HID integer NOT NULL DEFAULT nextval('HTBL_LOCK_ID_SEQ'::regclass),
+ HACTION integer NOT NULL,
+ HDATE timestamp without time zone NOT NULL,
+ HUSER character varying(100),
+
+ ID integer,
+ KEY integer,
+ USERNAME character varying (50),
+ INFO character varying (256),
+
+ CREATE_USER character varying(100),
+ CREATE_DATE timestamp without time zone,
+ MOD_USER character varying(100),
+ MOD_DATE timestamp without time zone,
+ CONSTRAINT HTBL_LOCK_PKEY PRIMARY KEY (HID)
+)
+WITH (
+ OIDS=FALSE
+);
+
+ALTER TABLE PUBLIC.HTBL_LOCK
+ OWNER TO PLGM_SERVICE;
+GRANT ALL ON TABLE PUBLIC.HTBL_LOCK TO PLGM_SERVICE;
+
+
+
+
+-- PUBLIC.HTBL_USER_SETTINGS Automatic generanted History Table DDL --
+-- <GENERATED CODE!>
+
+DROP TABLE IF EXISTS PUBLIC.HTBL_USER_SETTINGS;
+DROP SEQUENCE IF EXISTS PUBLIC.HTBL_USER_SETTINGS_ID_SEQ;
+
+CREATE SEQUENCE PUBLIC.HTBL_USER_SETTINGS_ID_SEQ
+ INCREMENT 1
+ MINVALUE 1
+ MAXVALUE 9223372036854775807
+ START 1
+ CACHE 1;
+
+ALTER TABLE PUBLIC.HTBL_USER_SETTINGS_ID_SEQ
+ OWNER TO PLGM_SERVICE;
+
+CREATE TABLE PUBLIC.HTBL_USER_SETTINGS
+(
+ HID integer NOT NULL DEFAULT nextval('HTBL_USER_SETTINGS_ID_SEQ'::regclass),
+ HACTION integer NOT NULL,
+ HDATE timestamp without time zone NOT NULL,
+ HUSER character varying(100),
+
+ ID integer,
+ USERNAME character varying (50),
+ SETTING_TYPE character varying (50),
+ VALUE character varying(4096),
+
+ CREATE_USER character varying(100),
+ CREATE_DATE timestamp without time zone,
+ MOD_USER character varying(100),
+ MOD_DATE timestamp without time zone,
+ CONSTRAINT HTBL_USER_SETTINGS_PKEY PRIMARY KEY (HID)
+)
+WITH (
+ OIDS=FALSE
+);
+
+ALTER TABLE PUBLIC.HTBL_USER_SETTINGS
+ OWNER TO PLGM_SERVICE;
+GRANT ALL ON TABLE PUBLIC.HTBL_USER_SETTINGS TO PLGM_SERVICE;
+
+
+-- PUBLIC.HREF_USER_DEPARTMENT Automatic generanted History Table DDL --
+-- <GENERATED CODE!>
+
+DROP TABLE IF EXISTS PUBLIC.HREF_USER_DEPARTMENT;
+DROP SEQUENCE IF EXISTS PUBLIC.HREF_USER_DEPARTMENT_ID_SEQ;
+
+CREATE SEQUENCE PUBLIC.HREF_USER_DEPARTMENT_ID_SEQ
+ INCREMENT 1
+ MINVALUE 1
+ MAXVALUE 9223372036854775807
+ START 1
+ CACHE 1;
+
+ALTER TABLE PUBLIC.HREF_USER_DEPARTMENT_ID_SEQ
+ OWNER TO PLGM_SERVICE;
+
+CREATE TABLE PUBLIC.HREF_USER_DEPARTMENT
+(
+ HID integer NOT NULL DEFAULT nextval('HREF_USER_DEPARTMENT_ID_SEQ'::regclass),
+ HACTION integer NOT NULL,
+ HDATE timestamp without time zone NOT NULL,
+ HUSER character varying(100),
+
+ ID integer,
+ NAME character varying (50),
+
+ CREATE_USER character varying(100),
+ CREATE_DATE timestamp without time zone,
+ MOD_USER character varying(100),
+ MOD_DATE timestamp without time zone,
+ CONSTRAINT HREF_USER_DEPARTMENT_PKEY PRIMARY KEY (HID)
+)
+WITH (
+ OIDS=FALSE
+);
+
+ALTER TABLE PUBLIC.HREF_USER_DEPARTMENT
+ OWNER TO PLGM_SERVICE;
+GRANT ALL ON TABLE PUBLIC.HREF_USER_DEPARTMENT TO PLGM_SERVICE;
+
+
+-- PUBLIC.HREF_COST_CENTER Automatic generanted History Table DDL --
+-- <GENERATED CODE!>
+
+DROP TABLE IF EXISTS PUBLIC.HREF_COST_CENTER;
+DROP SEQUENCE IF EXISTS PUBLIC.HREF_COST_CENTER_ID_SEQ;
+
+CREATE SEQUENCE PUBLIC.HREF_COST_CENTER_ID_SEQ
+ INCREMENT 1
+ MINVALUE 1
+ MAXVALUE 9223372036854775807
+ START 1
+ CACHE 1;
+
+ALTER TABLE PUBLIC.HREF_COST_CENTER_ID_SEQ
+ OWNER TO PLGM_SERVICE;
+
+CREATE TABLE PUBLIC.HREF_COST_CENTER
+(
+ HID integer NOT NULL DEFAULT nextval('HREF_COST_CENTER_ID_SEQ'::regclass),
+ HACTION integer NOT NULL,
+ HDATE timestamp without time zone NOT NULL,
+ HUSER character varying(100),
+
+ ID integer,
+ NAME character varying (50),
+ DESCRIPTION character varying (255),
+
+ CREATE_USER character varying(100),
+ CREATE_DATE timestamp without time zone,
+ MOD_USER character varying(100),
+ MOD_DATE timestamp without time zone,
+ CONSTRAINT HREF_COST_CENTER_PKEY PRIMARY KEY (HID)
+)
+WITH (
+ OIDS=FALSE
+);
+
+ALTER TABLE PUBLIC.HREF_COST_CENTER
+ OWNER TO PLGM_SERVICE;
+GRANT ALL ON TABLE PUBLIC.HREF_COST_CENTER TO PLGM_SERVICE;
+
+-- PUBLIC.HREF_BRANCH Automatic generanted History Table DDL --
+-- <GENERATED CODE!>
+
+DROP TABLE IF EXISTS PUBLIC.HREF_BRANCH;
+DROP SEQUENCE IF EXISTS PUBLIC.HREF_BRANCH_ID_SEQ;
+
+CREATE SEQUENCE PUBLIC.HREF_BRANCH_ID_SEQ
+ INCREMENT 1
+ MINVALUE 1
+ MAXVALUE 9223372036854775807
+ START 1
+ CACHE 1;
+
+ALTER TABLE PUBLIC.HREF_BRANCH_ID_SEQ
+ OWNER TO PLGM_SERVICE;
+
+CREATE TABLE PUBLIC.HREF_BRANCH
+(
+ HID integer NOT NULL DEFAULT nextval('HREF_BRANCH_ID_SEQ'::regclass),
+ HACTION integer NOT NULL,
+ HDATE timestamp without time zone NOT NULL,
+ HUSER character varying(100),
+
+ ID integer,
+ NAME character varying (50),
+ DESCRIPTION character varying (255),
+ COLOR_CODE character varying (20),
+ CREATE_USER character varying(100),
+ CREATE_DATE timestamp without time zone,
+ MOD_USER character varying(100),
+ MOD_DATE timestamp without time zone,
+ CONSTRAINT HREF_BRANCH_PKEY PRIMARY KEY (HID)
+)
+WITH (
+ OIDS=FALSE
+);
+
+ALTER TABLE PUBLIC.HREF_BRANCH
+ OWNER TO PLGM_SERVICE;
+GRANT ALL ON TABLE PUBLIC.HREF_BRANCH TO PLGM_SERVICE;
+
+-- PUBLIC.HREF_BRANCH_LEVEL Automatic generanted History Table DDL --
+-- <GENERATED CODE!>
+
+DROP TABLE IF EXISTS PUBLIC.HREF_BRANCH_LEVEL;
+DROP SEQUENCE IF EXISTS PUBLIC.HREF_BRANCH_LEVEL_ID_SEQ;
+
+CREATE SEQUENCE PUBLIC.HREF_BRANCH_LEVEL_ID_SEQ
+ INCREMENT 1
+ MINVALUE 1
+ MAXVALUE 9223372036854775807
+ START 1
+ CACHE 1;
+
+ALTER TABLE PUBLIC.HREF_BRANCH_LEVEL_ID_SEQ
+ OWNER TO PLGM_SERVICE;
+
+CREATE TABLE PUBLIC.HREF_BRANCH_LEVEL
+(
+ HID integer NOT NULL DEFAULT nextval('HREF_BRANCH_LEVEL_ID_SEQ'::regclass),
+ HACTION integer NOT NULL,
+ HDATE timestamp without time zone NOT NULL,
+ HUSER character varying(100),
+
+ ID integer,
+ NAME character varying (50),
+ DESCRIPTION character varying (255),
+ FK_REF_BRANCH integer,
+
+ CREATE_USER character varying(100),
+ CREATE_DATE timestamp without time zone,
+ MOD_USER character varying(100),
+ MOD_DATE timestamp without time zone,
+ CONSTRAINT HREF_BRANCH_LEVEL_PKEY PRIMARY KEY (HID)
+)
+WITH (
+ OIDS=FALSE
+);
+
+ALTER TABLE PUBLIC.HREF_BRANCH_LEVEL
+ OWNER TO PLGM_SERVICE;
+GRANT ALL ON TABLE PUBLIC.HREF_BRANCH_LEVEL TO PLGM_SERVICE;
+
+
+-- PUBLIC.HREF_GM_STATUS Automatic generanted History Table DDL --
+-- <GENERATED CODE!>
+
+DROP TABLE IF EXISTS PUBLIC.HREF_GM_STATUS;
+DROP SEQUENCE IF EXISTS PUBLIC.HREF_GM_STATUS_ID_SEQ;
+
+CREATE SEQUENCE PUBLIC.HREF_GM_STATUS_ID_SEQ
+ INCREMENT 1
+ MINVALUE 1
+ MAXVALUE 9223372036854775807
+ START 1
+ CACHE 1;
+
+ALTER TABLE PUBLIC.HREF_GM_STATUS_ID_SEQ
+ OWNER TO PLGM_SERVICE;
+
+CREATE TABLE PUBLIC.HREF_GM_STATUS
+(
+ HID integer NOT NULL DEFAULT nextval('HREF_GM_STATUS_ID_SEQ'::regclass),
+ HACTION integer NOT NULL,
+ HDATE timestamp without time zone NOT NULL,
+ HUSER character varying(100),
+
+ ID integer,
+ NAME character varying(50),
+ COLOR_CODE character varying(20),
+
+ CREATE_USER character varying(100),
+ CREATE_DATE timestamp without time zone,
+ MOD_USER character varying(100),
+ MOD_DATE timestamp without time zone,
+ CONSTRAINT HREF_GM_STATUS_PKEY PRIMARY KEY (HID)
+)
+WITH (
+ OIDS=FALSE
+);
+
+ALTER TABLE PUBLIC.HREF_GM_STATUS
+ OWNER TO PLGM_SERVICE;
+GRANT ALL ON TABLE PUBLIC.HREF_GM_STATUS TO PLGM_SERVICE;
+
+
+-- PUBLIC.HTBL_GRIDMEASURE Automatic generanted History Table DDL --
+-- <GENERATED CODE!>
+
+-- REQUESTER_NAME COLUMN DELETED--
+
+DROP TABLE IF EXISTS PUBLIC.HTBL_GRIDMEASURE;
+DROP SEQUENCE IF EXISTS PUBLIC.HTBL_GRIDMEASURE_ID_SEQ;
+
+CREATE SEQUENCE PUBLIC.HTBL_GRIDMEASURE_ID_SEQ
+ INCREMENT 1
+ MINVALUE 1
+ MAXVALUE 9223372036854775807
+ START 1
+ CACHE 1;
+
+ALTER TABLE PUBLIC.HTBL_GRIDMEASURE_ID_SEQ
+ OWNER TO PLGM_SERVICE;
+
+CREATE TABLE PUBLIC.HTBL_GRIDMEASURE
+(
+ HID integer NOT NULL DEFAULT nextval('HTBL_GRIDMEASURE_ID_SEQ'::regclass),
+ HACTION integer NOT NULL,
+ HDATE timestamp without time zone NOT NULL,
+ HUSER character varying(100),
+
+ ID integer,
+ ID_DESCRIPTIVE character varying (50),
+ TITLE character varying (256),
+ AFFECTED_RESOURCE character varying (256),
+ REMARK character varying (1024),
+ EMAIL_ADDRESSES character varying(1024),
+ FK_REF_GM_STATUS integer,
+ SWITCHING_OBJECT character varying (256),
+ COST_CENTER character varying (50),
+ APPROVAL_BY character varying (256),
+ AREA_OF_SWITCHING character varying (256),
+ APPOINTMENT_REPETITION character varying (100),
+ APPOINTMENT_STARTDATE timestamp without time zone,
+ APPOINTMENT_NUMBEROF integer,
+ PLANNED_STARTTIME_FIRST_SEQUENCE timestamp without time zone,
+ PLANNED_STARTTIME_FIRST_SINGLEMEASURE timestamp without time zone,
+ PLANNED_ENDTIME_LAST_SINGLEMEASURE timestamp without time zone,
+ PLANNED_ENDTIME_GRIDMEASURE timestamp without time zone,
+ STARTTIME_FIRST_SEQUENCE timestamp without time zone,
+ STARTTIME_FIRST_SINGLEMEASURE timestamp without time zone,
+ ENDTIME_LAST_SINGLEMEASURE timestamp without time zone,
+ ENDTIME_GRIDMEASURE timestamp without time zone,
+ TIME_OF_REALLOCATION character varying (100),
+ DESCRIPTION character varying (1024),
+ FK_REF_BRANCH integer,
+ FK_REF_BRANCH_LEVEL integer,
+ CREATE_USER_DEPARTMENT character varying (100),
+ MOD_USER_DEPARTMENT character varying (100),
+
+ CREATE_USER character varying(100),
+ CREATE_DATE timestamp without time zone,
+ MOD_USER character varying(100),
+ MOD_DATE timestamp without time zone,
+ CONSTRAINT HTBL_GRIDMEASURE_PKEY PRIMARY KEY (HID)
+)
+WITH (
+ OIDS=FALSE
+);
+
+ALTER TABLE PUBLIC.HTBL_GRIDMEASURE
+ OWNER TO PLGM_SERVICE;
+GRANT ALL ON TABLE PUBLIC.HTBL_GRIDMEASURE TO PLGM_SERVICE;
+
+CREATE INDEX HUSER_INDEX ON PUBLIC.HTBL_GRIDMEASURE (HUSER);
+
+
+INSERT INTO public.htbl_gridmeasure(haction, hdate, huser, id, fk_ref_gm_status, mod_user, mod_date)
+VALUES (2, '2018-06-11 14:00:00', 'otto',12,0, 'admin', '2018-06-11 14:00:00');
+INSERT INTO public.htbl_gridmeasure(haction, hdate, huser, id, fk_ref_gm_status, mod_user, mod_date)
+VALUES (2, '2018-06-11 14:01:00', 'otto',12,1, 'admin', '2018-06-11 14:01:00');
+INSERT INTO public.htbl_gridmeasure(haction, hdate, huser, id, fk_ref_gm_status, mod_user, mod_date)
+VALUES (2, '2018-06-11 14:03:00', 'otto',12,3, 'admin', '2018-06-11 14:03:00');
+INSERT INTO public.htbl_gridmeasure(haction, hdate, huser, id, fk_ref_gm_status, mod_user, mod_date)
+VALUES (2, '2018-06-11 14:04:00', 'otto',12,4, 'admin', '2018-06-11 14:04:00');
+INSERT INTO public.htbl_gridmeasure(haction, hdate, huser, id, fk_ref_gm_status, mod_user, mod_date)
+VALUES (2, '2018-06-11 14:05:00', 'otto',12,5, 'admin', '2018-06-11 14:05:00');
+INSERT INTO public.htbl_gridmeasure(haction, hdate, huser, id, fk_ref_gm_status, mod_user, mod_date)
+VALUES (2, '2018-06-11 14:06:00', 'otto',12,6, 'admin', '2018-06-11 14:06:00');
+INSERT INTO public.htbl_gridmeasure(haction, hdate, huser, id, fk_ref_gm_status, mod_user, mod_date)
+VALUES (2, '2018-06-11 14:07:00', 'otto',12,7, 'admin', '2018-06-11 14:07:00');
+INSERT INTO public.htbl_gridmeasure(haction, hdate, huser, id, fk_ref_gm_status, mod_user, mod_date)
+VALUES (2, '2018-06-11 14:08:00', 'otto',12,8, 'admin', '2018-06-11 14:08:00');
+INSERT INTO public.htbl_gridmeasure(haction, hdate, huser, id, fk_ref_gm_status, mod_user, mod_date)
+VALUES (2, '2018-06-11 14:09:00', 'otto',12,9, 'admin', '2018-06-11 14:09:00');
+INSERT INTO public.htbl_gridmeasure(haction, hdate, huser, id, fk_ref_gm_status, mod_user, mod_date)
+VALUES (2, '2018-06-11 14:10:00', 'otto',12,10, 'admin', '2018-06-11 14:10:00');
+INSERT INTO public.htbl_gridmeasure(haction, hdate, huser, id, fk_ref_gm_status, mod_user, mod_date)
+VALUES (2, '2018-06-11 14:11:00', 'otto',12,11, 'admin', '2018-06-11 14:11:00');
+
+
+INSERT INTO public.htbl_gridmeasure(haction, hdate, huser, id, fk_ref_gm_status, mod_user, mod_date)
+VALUES (2, '2018-07-01 14:55:00', 'admin',13,0, 'admin', '2018-07-01 14:55:00');
+INSERT INTO public.htbl_gridmeasure(haction, hdate, huser, id, fk_ref_gm_status, mod_user, mod_date)
+VALUES (2, '2018-07-01 14:56:00', 'admin',13,1, 'admin', '2018-07-01 14:56:00');
+INSERT INTO public.htbl_gridmeasure(haction, hdate, huser, id, fk_ref_gm_status, mod_user, mod_date)
+VALUES (2, '2018-07-01 14:57:00', 'admin',13,3, 'admin', '2018-07-01 14:57:00');
+INSERT INTO public.htbl_gridmeasure(haction, hdate, huser, id, fk_ref_gm_status, mod_user, mod_date)
+VALUES (2, '2018-07-01 14:57:00', 'admin',13,12, 'admin', '2018-07-01 14:57:00');
+
+
+INSERT INTO public.htbl_gridmeasure(haction, hdate, huser, id, fk_ref_gm_status, mod_user, mod_date)
+VALUES (1, '2018-06-11 14:00:00', 'admin',11,0, 'admin', '2018-06-11 14:00:00');
+INSERT INTO public.htbl_gridmeasure(haction, hdate, huser, id, fk_ref_gm_status, mod_user, mod_date)
+VALUES (1, '2018-06-11 14:01:00', 'admin',11,1, 'admin', '2018-06-11 14:01:00');
+INSERT INTO public.htbl_gridmeasure(haction, hdate, huser, id, fk_ref_gm_status, mod_user, mod_date)
+VALUES (1, '2018-06-11 14:02:00', 'admin',11,3, 'admin', '2018-06-11 14:02:00');
+INSERT INTO public.htbl_gridmeasure(haction, hdate, huser, id, fk_ref_gm_status, mod_user, mod_date)
+VALUES (1, '2018-06-11 14:03:00', 'admin',11,4, 'admin', '2018-06-11 14:03:00');
+INSERT INTO public.htbl_gridmeasure(haction, hdate, huser, id, fk_ref_gm_status, mod_user, mod_date)
+VALUES (1, '2018-06-11 14:04:00', 'admin',11,5, 'admin', '2018-06-11 14:04:00');
+INSERT INTO public.htbl_gridmeasure(haction, hdate, huser, id, fk_ref_gm_status, mod_user, mod_date)
+VALUES (1, '2018-06-11 14:05:00', 'admin',11,6, 'admin', '2018-06-11 14:05:00');
+INSERT INTO public.htbl_gridmeasure(haction, hdate, huser, id, fk_ref_gm_status, mod_user, mod_date)
+VALUES (1, '2018-06-11 14:06:00', 'admin',11,7, 'admin', '2018-06-11 14:06:00');
+INSERT INTO public.htbl_gridmeasure(haction, hdate, huser, id, fk_ref_gm_status, mod_user, mod_date)
+VALUES (1, '2018-06-11 14:07:00', 'admin',11,8, 'admin', '2018-06-11 14:07:00');
+INSERT INTO public.htbl_gridmeasure(haction, hdate, huser, id, fk_ref_gm_status, mod_user, mod_date)
+VALUES (1, '2018-06-11 14:08:00', 'admin',11,9, 'admin', '2018-06-11 14:08:00');
+INSERT INTO public.htbl_gridmeasure(haction, hdate, huser, id, fk_ref_gm_status, mod_user, mod_date)
+VALUES (1, '2018-06-11 14:09:00', 'admin',11,10, 'admin', '2018-06-11 14:09:00');
+
+
+INSERT INTO public.htbl_gridmeasure(haction, hdate, huser, id, fk_ref_gm_status, mod_user, mod_date)
+VALUES (2, '2018-06-11 14:00:00', 'admin',10,0, 'admin', '2018-06-11 14:00:00');
+INSERT INTO public.htbl_gridmeasure(haction, hdate, huser, id, fk_ref_gm_status, mod_user, mod_date)
+VALUES (2, '2018-06-11 14:01:00', 'admin',10,1, 'admin', '2018-06-11 14:01:00');
+INSERT INTO public.htbl_gridmeasure(haction, hdate, huser, id, fk_ref_gm_status, mod_user, mod_date)
+VALUES (2, '2018-06-11 14:02:00', 'admin',10,3, 'admin', '2018-06-11 14:02:00');
+INSERT INTO public.htbl_gridmeasure(haction, hdate, huser, id, fk_ref_gm_status, mod_user, mod_date)
+VALUES (2, '2018-06-11 14:03:00', 'admin',10,4, 'admin', '2018-06-11 14:03:00');
+INSERT INTO public.htbl_gridmeasure(haction, hdate, huser, id, fk_ref_gm_status, mod_user, mod_date)
+VALUES (2, '2018-06-11 14:04:00', 'admin',10,5, 'admin', '2018-06-11 14:04:00');
+INSERT INTO public.htbl_gridmeasure(haction, hdate, huser, id, fk_ref_gm_status, mod_user, mod_date)
+VALUES (2, '2018-06-11 14:05:00', 'admin',10,6, 'admin', '2018-06-11 14:05:00');
+INSERT INTO public.htbl_gridmeasure(haction, hdate, huser, id, fk_ref_gm_status, mod_user, mod_date)
+VALUES (2, '2018-06-11 14:06:00', 'admin',10,7, 'admin', '2018-06-11 14:06:00');
+INSERT INTO public.htbl_gridmeasure(haction, hdate, huser, id, fk_ref_gm_status, mod_user, mod_date)
+VALUES (2, '2018-06-11 14:07:00', 'admin',10,8, 'admin', '2018-06-11 14:07:00');
+INSERT INTO public.htbl_gridmeasure(haction, hdate, huser, id, fk_ref_gm_status, mod_user, mod_date)
+VALUES (2, '2018-06-11 14:08:00', 'admin',10,9, 'admin', '2018-06-11 14:08:00');
+
+
+INSERT INTO public.htbl_gridmeasure(haction, hdate, huser, id, fk_ref_gm_status, mod_user, mod_date)
+VALUES (2, '2018-06-11 14:00:00', 'admin',9,0, 'admin', '2018-06-11 14:00:00');
+INSERT INTO public.htbl_gridmeasure(haction, hdate, huser, id, fk_ref_gm_status, mod_user, mod_date)
+VALUES (2, '2018-06-11 14:01:00', 'admin',9,1, 'admin', '2018-06-11 14:01:00');
+INSERT INTO public.htbl_gridmeasure(haction, hdate, huser, id, fk_ref_gm_status, mod_user, mod_date)
+VALUES (2, '2018-06-11 14:02:00', 'admin',9,3, 'admin', '2018-06-11 14:02:00');
+INSERT INTO public.htbl_gridmeasure(haction, hdate, huser, id, fk_ref_gm_status, mod_user, mod_date)
+VALUES (2, '2018-06-11 14:03:00', 'admin',9,4, 'admin', '2018-06-11 14:03:00');
+INSERT INTO public.htbl_gridmeasure(haction, hdate, huser, id, fk_ref_gm_status, mod_user, mod_date)
+VALUES (2, '2018-06-11 14:04:00', 'admin',9,5, 'admin', '2018-06-11 14:04:00');
+INSERT INTO public.htbl_gridmeasure(haction, hdate, huser, id, fk_ref_gm_status, mod_user, mod_date)
+VALUES (2, '2018-06-11 14:05:00', 'admin',9,6, 'admin', '2018-06-11 14:05:00');
+INSERT INTO public.htbl_gridmeasure(haction, hdate, huser, id, fk_ref_gm_status, mod_user, mod_date)
+VALUES (2, '2018-06-11 14:06:00', 'admin',9,7, 'admin', '2018-06-11 14:06:00');
+INSERT INTO public.htbl_gridmeasure(haction, hdate, huser, id, fk_ref_gm_status, mod_user, mod_date)
+VALUES (2, '2018-06-11 14:07:00', 'admin',9,8, 'admin', '2018-06-11 14:07:00');
+
+
+INSERT INTO public.htbl_gridmeasure(haction, hdate, huser, id, fk_ref_gm_status, mod_user, mod_date)
+VALUES (2, '2018-06-11 14:00:00', 'admin',8,0, 'admin', '2018-06-11 14:00:00');
+INSERT INTO public.htbl_gridmeasure(haction, hdate, huser, id, fk_ref_gm_status, mod_user, mod_date)
+VALUES (2, '2018-06-11 14:01:00', 'admin',8,1, 'admin', '2018-06-11 14:01:00');
+INSERT INTO public.htbl_gridmeasure(haction, hdate, huser, id, fk_ref_gm_status, mod_user, mod_date)
+VALUES (2, '2018-06-11 14:02:00', 'admin',8,3, 'admin', '2018-06-11 14:02:00');
+INSERT INTO public.htbl_gridmeasure(haction, hdate, huser, id, fk_ref_gm_status, mod_user, mod_date)
+VALUES (2, '2018-06-11 14:03:00', 'admin',8,4, 'admin', '2018-06-11 14:03:00');
+INSERT INTO public.htbl_gridmeasure(haction, hdate, huser, id, fk_ref_gm_status, mod_user, mod_date)
+VALUES (2, '2018-06-11 14:04:00', 'admin',8,5, 'admin', '2018-06-11 14:04:00');
+INSERT INTO public.htbl_gridmeasure(haction, hdate, huser, id, fk_ref_gm_status, mod_user, mod_date)
+VALUES (2, '2018-06-11 14:05:00', 'admin',8,6, 'admin', '2018-06-11 14:05:00');
+INSERT INTO public.htbl_gridmeasure(haction, hdate, huser, id, fk_ref_gm_status, mod_user, mod_date)
+VALUES (2, '2018-06-11 14:06:00', 'admin',8,7, 'admin', '2018-06-11 14:06:00');
+
+
+INSERT INTO public.htbl_gridmeasure(haction, hdate, huser, id, fk_ref_gm_status, mod_user, mod_date)
+VALUES (2, '2018-06-11 14:00:00', 'admin',7,0, 'admin', '2018-06-11 14:00:00');
+INSERT INTO public.htbl_gridmeasure(haction, hdate, huser, id, fk_ref_gm_status, mod_user, mod_date)
+VALUES (2, '2018-06-11 14:01:00', 'admin',7,1, 'admin', '2018-06-11 14:01:00');
+INSERT INTO public.htbl_gridmeasure(haction, hdate, huser, id, fk_ref_gm_status, mod_user, mod_date)
+VALUES (2, '2018-06-11 14:02:00', 'admin',7,3, 'admin', '2018-06-11 14:02:00');
+INSERT INTO public.htbl_gridmeasure(haction, hdate, huser, id, fk_ref_gm_status, mod_user, mod_date)
+VALUES (2, '2018-06-11 14:03:00', 'admin',7,4, 'admin', '2018-06-11 14:03:00');
+INSERT INTO public.htbl_gridmeasure(haction, hdate, huser, id, fk_ref_gm_status, mod_user, mod_date)
+VALUES (2, '2018-06-11 14:04:00', 'admin',7,5, 'admin', '2018-06-11 14:04:00');
+INSERT INTO public.htbl_gridmeasure(haction, hdate, huser, id, fk_ref_gm_status, mod_user, mod_date)
+VALUES (2, '2018-06-11 14:05:00', 'admin',7,6, 'admin', '2018-06-11 14:05:00');
+
+
+INSERT INTO public.htbl_gridmeasure(haction, hdate, huser, id, fk_ref_gm_status, mod_user, mod_date)
+VALUES (2, '2018-06-11 14:00:00', 'admin',6,0, 'admin', '2018-06-11 14:00:00');
+INSERT INTO public.htbl_gridmeasure(haction, hdate, huser, id, fk_ref_gm_status, mod_user, mod_date)
+VALUES (2, '2018-06-11 14:01:00', 'admin',6,1, 'admin', '2018-06-11 14:01:00');
+INSERT INTO public.htbl_gridmeasure(haction, hdate, huser, id, fk_ref_gm_status, mod_user, mod_date)
+VALUES (2, '2018-06-11 14:02:00', 'admin',6,3, 'admin', '2018-06-11 14:02:00');
+INSERT INTO public.htbl_gridmeasure(haction, hdate, huser, id, fk_ref_gm_status, mod_user, mod_date)
+VALUES (2, '2018-06-11 14:03:00', 'admin',6,4, 'admin', '2018-06-11 14:03:00');
+INSERT INTO public.htbl_gridmeasure(haction, hdate, huser, id, fk_ref_gm_status, mod_user, mod_date)
+VALUES (2, '2018-06-11 14:04:00', 'admin',6,5, 'admin', '2018-06-11 14:04:00');
+
+
+INSERT INTO public.htbl_gridmeasure(haction, hdate, huser, id, fk_ref_gm_status, mod_user, mod_date)
+VALUES (2, '2018-06-11 14:00:00', 'admin',5,0, 'admin', '2018-06-11 14:00:00');
+INSERT INTO public.htbl_gridmeasure(haction, hdate, huser, id, fk_ref_gm_status, mod_user, mod_date)
+VALUES (2, '2018-06-11 14:01:00', 'admin',5,1, 'admin', '2018-06-11 14:01:00');
+INSERT INTO public.htbl_gridmeasure(haction, hdate, huser, id, fk_ref_gm_status, mod_user, mod_date)
+VALUES (2, '2018-06-11 14:02:00', 'admin',5,3, 'admin', '2018-06-11 14:02:00');
+INSERT INTO public.htbl_gridmeasure(haction, hdate, huser, id, fk_ref_gm_status, mod_user, mod_date)
+VALUES (2, '2018-06-11 14:03:00', 'admin',5,4, 'admin', '2018-06-11 14:03:00');
+
+
+INSERT INTO public.htbl_gridmeasure(haction, hdate, huser, id, fk_ref_gm_status, mod_user, mod_date)
+VALUES (2, '2018-06-11 14:00:00', 'admin',4,0, 'admin', '2018-06-11 14:00:00');
+INSERT INTO public.htbl_gridmeasure(haction, hdate, huser, id, fk_ref_gm_status, mod_user, mod_date)
+VALUES (2, '2018-06-11 14:01:00', 'admin',4,1, 'admin', '2018-06-11 14:01:00');
+INSERT INTO public.htbl_gridmeasure(haction, hdate, huser, id, fk_ref_gm_status, mod_user, mod_date)
+VALUES (2, '2018-06-11 14:02:00', 'admin',4,3, 'admin', '2018-06-11 14:02:00');
+
+
+INSERT INTO public.htbl_gridmeasure(haction, hdate, huser, id, fk_ref_gm_status, mod_user, mod_date)
+VALUES (2, '2018-06-11 14:00:00', 'admin',3,0, 'admin', '2018-06-11 14:00:00');
+INSERT INTO public.htbl_gridmeasure(haction, hdate, huser, id, fk_ref_gm_status, mod_user, mod_date)
+VALUES (2, '2018-06-11 14:01:00', 'admin',3,1, 'admin', '2018-06-11 14:01:00');
+INSERT INTO public.htbl_gridmeasure(haction, hdate, huser, id, fk_ref_gm_status, mod_user, mod_date)
+VALUES (2, '2018-06-11 14:02:00', 'admin',3,3, 'admin', '2018-06-11 14:02:00');
+INSERT INTO public.htbl_gridmeasure(haction, hdate, huser, id, fk_ref_gm_status, mod_user, mod_date)
+VALUES (2, '2018-06-11 14:03:00', 'admin',3,2, 'admin', '2018-06-11 14:03:00');
+
+
+INSERT INTO public.htbl_gridmeasure(haction, hdate, huser, id, fk_ref_gm_status, mod_user, mod_date)
+VALUES (2, '2018-06-11 14:00:00', 'admin',2,0, 'jasper', '2018-06-11 14:00:00');
+INSERT INTO public.htbl_gridmeasure(haction, hdate, huser, id, fk_ref_gm_status, mod_user, mod_date)
+VALUES (2, '2018-06-11 14:01:00', 'admin',2,1, 'jasper', '2018-06-11 14:01:00');
+
+
+INSERT INTO public.htbl_gridmeasure(haction, hdate, huser, id, fk_ref_gm_status, mod_user, mod_date)
+VALUES (2, '2018-06-11 14:01:00', 'admin',1,0, 'otto', '2018-06-11 14:01:00');
+
+-- PUBLIC.HTBL_ID_COUNTER Automatic generanted History Table DDL --
+-- <GENERATED CODE!>
+
+DROP TABLE IF EXISTS PUBLIC.HTBL_ID_COUNTER;
+DROP SEQUENCE IF EXISTS PUBLIC.HTBL_ID_COUNTER_ID_SEQ;
+
+CREATE SEQUENCE PUBLIC.HTBL_ID_COUNTER_ID_SEQ
+ INCREMENT 1
+ MINVALUE 1
+ MAXVALUE 9223372036854775807
+ START 1
+ CACHE 1;
+
+ALTER TABLE PUBLIC.HTBL_ID_COUNTER_ID_SEQ
+ OWNER TO PLGM_SERVICE;
+
+CREATE TABLE PUBLIC.HTBL_ID_COUNTER
+(
+ HID integer NOT NULL DEFAULT nextval('HTBL_ID_COUNTER_ID_SEQ'::regclass),
+ HACTION integer NOT NULL,
+ HDATE timestamp without time zone NOT NULL,
+ HUSER character varying(100),
+
+ ID integer,
+ COUNTER integer,
+ COUNTER_TYPE character varying (256),
+ INFO character varying (256),
+
+ CREATE_USER character varying(100),
+ CREATE_DATE timestamp without time zone,
+ MOD_USER character varying(100),
+ MOD_DATE timestamp without time zone,
+ CONSTRAINT HTBL_ID_COUNTER_PKEY PRIMARY KEY (HID)
+)
+WITH (
+ OIDS=FALSE
+);
+
+ALTER TABLE PUBLIC.HTBL_ID_COUNTER
+ OWNER TO PLGM_SERVICE;
+GRANT ALL ON TABLE PUBLIC.HTBL_ID_COUNTER TO PLGM_SERVICE;
+
+
+
+-- PUBLIC.HTBL_SINGLE_GRIDMEASURE Automatic generanted History Table DDL --
+-- <GENERATED CODE!>
+
+DROP TABLE IF EXISTS PUBLIC.HTBL_SINGLE_GRIDMEASURE;
+DROP SEQUENCE IF EXISTS PUBLIC.HTBL_SINGLE_GRIDMEASURE_ID_SEQ;
+
+CREATE SEQUENCE PUBLIC.HTBL_SINGLE_GRIDMEASURE_ID_SEQ
+ INCREMENT 1
+ MINVALUE 1
+ MAXVALUE 9223372036854775807
+ START 1
+ CACHE 1;
+
+ALTER TABLE PUBLIC.HTBL_SINGLE_GRIDMEASURE_ID_SEQ
+ OWNER TO PLGM_SERVICE;
+
+
+
+CREATE TABLE PUBLIC.HTBL_SINGLE_GRIDMEASURE
+(
+ HID integer NOT NULL DEFAULT nextval('HTBL_SINGLE_GRIDMEASURE_ID_SEQ'::regclass),
+ HACTION integer NOT NULL,
+ HDATE timestamp without time zone NOT NULL,
+ HUSER character varying(100),
+
+ ID integer,
+ SORTORDER integer,
+ TITLE character varying (256),
+ SWITCHING_OBJECT character varying (256),
+ CIM_ID character varying (256),
+ CIM_NAME character varying (256),
+ CIM_DESCRIPTION character varying (1024),
+ RESPONSIBLE_ONSITE_NAME character varying(256),
+ RESPONSIBLE_ONSITE_DEPARTMENT character varying(256),
+ NETWORK_CONTROL character varying (256),
+ PLANNED_STARTTIME_SINGLEMEASURE timestamp without time zone,
+ PLANNED_ENDTIME_SINGLEMEASURE timestamp without time zone,
+ DESCRIPTION character varying (1024),
+ FK_TBL_GRIDMEASURE integer,
+
+ CREATE_USER character varying(100),
+ CREATE_DATE timestamp without time zone,
+ MOD_USER character varying(100),
+ MOD_DATE timestamp without time zone,
+ CONSTRAINT HTBL_SINGLE_GRIDMEASURE_PKEY PRIMARY KEY (HID)
+)
+WITH (
+ OIDS=FALSE
+);
+
+ALTER TABLE PUBLIC.HTBL_SINGLE_GRIDMEASURE
+ OWNER TO PLGM_SERVICE;
+GRANT ALL ON TABLE PUBLIC.HTBL_SINGLE_GRIDMEASURE TO PLGM_SERVICE;
+
+
+
+
+-- PUBLIC.HTBL_STEPS Automatic generanted History Table DDL --
+-- <GENERATED CODE!>
+
+DROP TABLE IF EXISTS PUBLIC.HTBL_STEPS;
+DROP SEQUENCE IF EXISTS PUBLIC.HTBL_STEPS_ID_SEQ;
+
+CREATE SEQUENCE PUBLIC.HTBL_STEPS_ID_SEQ
+ INCREMENT 1
+ MINVALUE 1
+ MAXVALUE 9223372036854775807
+ START 1
+ CACHE 1;
+
+ALTER TABLE PUBLIC.HTBL_STEPS_ID_SEQ
+ OWNER TO PLGM_SERVICE;
+
+CREATE TABLE PUBLIC.HTBL_STEPS
+(
+ HID integer NOT NULL DEFAULT nextval('HTBL_STEPS_ID_SEQ'::regclass),
+ HACTION integer NOT NULL,
+ HDATE timestamp without time zone NOT NULL,
+ HUSER character varying(100),
+
+ ID integer,
+ SORTORDER integer,
+ SWITCHING_OBJECT character varying (256),
+ TYPE character varying(256),
+ PRESENT_TIME character varying(256),
+ PRESENT_STATE character varying(256),
+ TARGET_STATE character varying (256),
+ OPERATOR character varying(256),
+ FK_TBL_SINGLE_GRIDMEASURE integer,
+ CREATE_USER character varying (100),
+ CREATE_DATE timestamp without time zone,
+ MOD_USER character varying (100),
+ MOD_DATE timestamp without time zone,
+
+ CONSTRAINT HTBL_STEPS_PKEY PRIMARY KEY (HID)
+)
+WITH (
+ OIDS=FALSE
+);
+
+ALTER TABLE PUBLIC.HTBL_STEPS
+ OWNER TO PLGM_SERVICE;
+GRANT ALL ON TABLE PUBLIC.HTBL_STEPS TO PLGM_SERVICE;
+
+
+-- PUBLIC.HTBL_DOCUMENTS Automatic generanted History Table DDL --
+-- <GENERATED CODE!>
+
+DROP TABLE IF EXISTS PUBLIC.HTBL_DOCUMENTS;
+DROP SEQUENCE IF EXISTS PUBLIC.HTBL_DOCUMENTS_ID_SEQ;
+
+CREATE SEQUENCE PUBLIC.HTBL_DOCUMENTS_ID_SEQ
+ INCREMENT 1
+ MINVALUE 1
+ MAXVALUE 9223372036854775807
+ START 1
+ CACHE 1;
+
+ALTER TABLE PUBLIC.HTBL_DOCUMENTS_ID_SEQ
+ OWNER TO PLGM_SERVICE;
+
+CREATE TABLE PUBLIC.HTBL_DOCUMENTS
+(
+ HID integer NOT NULL DEFAULT nextval('HTBL_DOCUMENTS_ID_SEQ'::regclass),
+ HACTION integer NOT NULL,
+ HDATE timestamp without time zone NOT NULL,
+ HUSER character varying(100),
+
+ ID integer,
+ DOCUMENT_NAME character varying (260),
+ DOCUMENT bytea,
+
+ CREATE_USER character varying(100),
+ CREATE_DATE timestamp without time zone,
+ MOD_USER character varying(100),
+ MOD_DATE timestamp without time zone,
+ CONSTRAINT HTBL_DOCUMENTS_PKEY PRIMARY KEY (HID)
+)
+WITH (
+ OIDS=FALSE
+);
+
+ALTER TABLE PUBLIC.HTBL_DOCUMENTS
+ OWNER TO PLGM_SERVICE;
+GRANT ALL ON TABLE PUBLIC.HTBL_DOCUMENTS TO PLGM_SERVICE;
+
+-- PUBLIC.HTBL_MEASURE_DOCUMENTS Automatic generanted History Table DDL --
+-- <GENERATED CODE!>
+
+DROP TABLE IF EXISTS PUBLIC.HTBL_MEASURE_DOCUMENTS;
+DROP SEQUENCE IF EXISTS PUBLIC.HTBL_MEASURE_DOCUMENTS_ID_SEQ;
+
+CREATE SEQUENCE PUBLIC.HTBL_MEASURE_DOCUMENTS_ID_SEQ
+ INCREMENT 1
+ MINVALUE 1
+ MAXVALUE 9223372036854775807
+ START 1
+ CACHE 1;
+
+ALTER TABLE PUBLIC.HTBL_MEASURE_DOCUMENTS_ID_SEQ
+ OWNER TO PLGM_SERVICE;
+
+CREATE TABLE PUBLIC.HTBL_MEASURE_DOCUMENTS
+(
+ HID integer NOT NULL DEFAULT nextval('HTBL_MEASURE_DOCUMENTS_ID_SEQ'::regclass),
+ HACTION integer NOT NULL,
+ HDATE timestamp without time zone NOT NULL,
+ HUSER character varying(100),
+
+ ID integer,
+ FK_TBL_MEASURE integer,
+ FK_TBL_DOCUMENTS integer,
+
+ CREATE_USER character varying(100),
+ CREATE_DATE timestamp without time zone,
+ MOD_USER character varying(100),
+ MOD_DATE timestamp without time zone,
+ CONSTRAINT HTBL_MEASURE_DOCUMENTS_PKEY PRIMARY KEY (HID)
+)
+WITH (
+ OIDS=FALSE
+);
+
+ALTER TABLE PUBLIC.HTBL_MEASURE_DOCUMENTS
+ OWNER TO PLGM_SERVICE;
+GRANT ALL ON TABLE PUBLIC.HTBL_MEASURE_DOCUMENTS TO PLGM_SERVICE;
+
+-- ----------------------------------------------------------------------------
+-- ----------------------------------------------------------------------------
+-- TRIGGER
+-- ----------------------------------------------------------------------------
+-- ----------------------------------------------------------------------------
+
+-- ---------------------------------------------
+-- TRIGGER REF_TERRITORY
+-- ---------------------------------------------
+
+
+-- PUBLIC.REF_TERRITORY INSERT TRIGGER --
+-- <GENERATED CODE!>
+CREATE OR REPLACE FUNCTION PUBLIC.REF_TERRITORY_INSERT_TRG()
+ RETURNS trigger AS
+$BODY$
+ BEGIN
+ INSERT INTO HREF_TERRITORY (
+ ID,NAME,DESCRIPTION,CREATE_USER,CREATE_DATE,MOD_USER,MOD_DATE,
+
+ HACTION,
+ HDATE,
+ HUSER
+ )
+ VALUES (
+
+ NEW.ID,NEW.NAME,NEW.DESCRIPTION,NEW.CREATE_USER,NEW.CREATE_DATE,NEW.MOD_USER,NEW.MOD_DATE,
+
+ 1,
+ current_timestamp,
+ NEW.CREATE_USER );
+
+ RETURN NEW;
+ END;
+$BODY$
+ LANGUAGE plpgsql VOLATILE
+ COST 100;
+ALTER FUNCTION PUBLIC.REF_TERRITORY_INSERT_TRG()
+ OWNER TO PLGM_SERVICE;
+
+
+DROP TRIGGER IF EXISTS REF_TERRITORY_INSERT_TRG ON PUBLIC.REF_TERRITORY;
+
+CREATE TRIGGER REF_TERRITORY_INSERT_TRG
+ BEFORE INSERT
+ ON PUBLIC.REF_TERRITORY
+ FOR EACH ROW
+ EXECUTE PROCEDURE PUBLIC.REF_TERRITORY_INSERT_TRG();
+
+
+
+-- PUBLIC.REF_TERRITORY UPDATE TRIGGER --
+-- <GENERATED CODE!>
+
+CREATE OR REPLACE FUNCTION PUBLIC.REF_TERRITORY_UPDATE_TRG()
+ RETURNS trigger AS
+$BODY$
+ BEGIN
+ INSERT INTO HREF_TERRITORY (
+ ID,NAME,DESCRIPTION,CREATE_USER,CREATE_DATE,MOD_USER,MOD_DATE,
+
+ HACTION,
+ HDATE,
+ HUSER
+ )
+ VALUES (
+ NEW.ID,NEW.NAME,NEW.DESCRIPTION,NEW.CREATE_USER,NEW.CREATE_DATE,NEW.MOD_USER,NEW.MOD_DATE,
+ 2,
+ current_timestamp,
+ NEW.MOD_USER
+ );
+
+ RETURN NEW;
+ END;
+$BODY$
+ LANGUAGE plpgsql VOLATILE
+ COST 100;
+ALTER FUNCTION PUBLIC.REF_TERRITORY_UPDATE_TRG()
+ OWNER TO PLGM_SERVICE;
+
+DROP TRIGGER IF EXISTS REF_TERRITORY_UPDATE_TRG ON PUBLIC.REF_TERRITORY;
+
+CREATE TRIGGER REF_TERRITORY_UPDATE_TRG
+ BEFORE UPDATE
+ ON PUBLIC.REF_TERRITORY
+ FOR EACH ROW
+ EXECUTE PROCEDURE PUBLIC.REF_TERRITORY_UPDATE_TRG();
+
+
+
+-- PUBLIC.REF_TERRITORY DELETE TRIGGER --
+-- <GENERATED CODE!>
+
+CREATE OR REPLACE FUNCTION PUBLIC.REF_TERRITORY_DELETE_TRG()
+ RETURNS trigger AS
+$BODY$
+ BEGIN
+ IF TG_OP = 'DELETE' THEN
+ INSERT INTO HREF_TERRITORY (
+
+ ID,NAME,DESCRIPTION,CREATE_USER,CREATE_DATE,MOD_USER,MOD_DATE,
+
+ HACTION,
+ HDATE,
+ HUSER
+ )
+ VALUES (
+ OLD.ID,OLD.NAME,OLD.DESCRIPTION,OLD.CREATE_USER,OLD.CREATE_DATE,OLD.MOD_USER,OLD.MOD_DATE,
+
+ 3,
+ current_timestamp,
+ OLD.MOD_USER );
+ END IF;
+
+ RETURN OLD;
+ END;
+$BODY$
+ LANGUAGE plpgsql VOLATILE
+ COST 100;
+ALTER FUNCTION PUBLIC.REF_TERRITORY_DELETE_TRG()
+ OWNER TO PLGM_SERVICE;
+
+DROP TRIGGER IF EXISTS REF_TERRITORY_DELETE_TRG ON PUBLIC.REF_TERRITORY;
+
+CREATE TRIGGER REF_TERRITORY_DELETE_TRG
+ BEFORE DELETE
+ ON PUBLIC.REF_TERRITORY
+ FOR EACH ROW
+ EXECUTE PROCEDURE PUBLIC.REF_TERRITORY_DELETE_TRG();
+
+
+
+-- PUBLIC.TBL_ID_COUNTER INSERT TRIGGER --
+-- <GENERATED CODE!>
+CREATE OR REPLACE FUNCTION PUBLIC.TBL_ID_COUNTER_INSERT_TRG()
+ RETURNS trigger AS
+$BODY$
+ BEGIN
+ INSERT INTO HTBL_ID_COUNTER (
+ ID,COUNTER,COUNTER_TYPE,INFO,CREATE_USER,CREATE_DATE,MOD_USER,MOD_DATE,
+
+ HACTION,
+ HDATE,
+ HUSER
+ )
+ VALUES (
+
+ NEW.ID,NEW.COUNTER,NEW.COUNTER_TYPE,NEW.INFO,NEW.CREATE_USER,NEW.CREATE_DATE,NEW.MOD_USER,NEW.MOD_DATE,
+
+ 1,
+ current_timestamp,
+ NEW.CREATE_USER );
+
+ RETURN NEW;
+ END;
+$BODY$
+ LANGUAGE plpgsql VOLATILE
+ COST 100;
+ALTER FUNCTION PUBLIC.TBL_ID_COUNTER_INSERT_TRG()
+ OWNER TO PLGM_SERVICE;
+
+
+DROP TRIGGER IF EXISTS TBL_ID_COUNTER_INSERT_TRG ON PUBLIC.TBL_ID_COUNTER;
+
+CREATE TRIGGER TBL_ID_COUNTER_INSERT_TRG
+ BEFORE INSERT
+ ON PUBLIC.TBL_ID_COUNTER
+ FOR EACH ROW
+ EXECUTE PROCEDURE PUBLIC.TBL_ID_COUNTER_INSERT_TRG();
+
+
+
+-- PUBLIC.TBL_ID_COUNTER UPDATE TRIGGER --
+-- <GENERATED CODE!>
+
+CREATE OR REPLACE FUNCTION PUBLIC.TBL_ID_COUNTER_UPDATE_TRG()
+ RETURNS trigger AS
+$BODY$
+ BEGIN
+ INSERT INTO HTBL_ID_COUNTER (
+ ID,COUNTER,COUNTER_TYPE,INFO,CREATE_USER,CREATE_DATE,MOD_USER,MOD_DATE,
+
+ HACTION,
+ HDATE,
+ HUSER
+ )
+ VALUES (
+ NEW.ID,NEW.COUNTER,NEW.COUNTER_TYPE,NEW.INFO,NEW.CREATE_USER,NEW.CREATE_DATE,NEW.MOD_USER,NEW.MOD_DATE,
+ 2,
+ current_timestamp,
+ NEW.MOD_USER
+ );
+
+ RETURN NEW;
+ END;
+$BODY$
+ LANGUAGE plpgsql VOLATILE
+ COST 100;
+ALTER FUNCTION PUBLIC.TBL_ID_COUNTER_UPDATE_TRG()
+ OWNER TO PLGM_SERVICE;
+
+DROP TRIGGER IF EXISTS TBL_ID_COUNTER_UPDATE_TRG ON PUBLIC.TBL_ID_COUNTER;
+
+CREATE TRIGGER TBL_ID_COUNTER_UPDATE_TRG
+ BEFORE UPDATE
+ ON PUBLIC.TBL_ID_COUNTER
+ FOR EACH ROW
+ EXECUTE PROCEDURE PUBLIC.TBL_ID_COUNTER_UPDATE_TRG();
+
+
+
+-- PUBLIC.TBL_ID_COUNTER DELETE TRIGGER --
+-- <GENERATED CODE!>
+
+CREATE OR REPLACE FUNCTION PUBLIC.TBL_ID_COUNTER_DELETE_TRG()
+ RETURNS trigger AS
+$BODY$
+ BEGIN
+ IF TG_OP = 'DELETE' THEN
+ INSERT INTO HTBL_ID_COUNTER (
+
+ ID,COUNTER,COUNTER_TYPE,INFO,CREATE_USER,CREATE_DATE,MOD_USER,MOD_DATE,
+
+ HACTION,
+ HDATE,
+ HUSER
+ )
+ VALUES (
+ OLD.ID,OLD.COUNTER,OLD.COUNTER_TYPE,OLD.INFO,OLD.CREATE_USER,OLD.CREATE_DATE,OLD.MOD_USER,OLD.MOD_DATE,
+
+ 3,
+ current_timestamp,
+ OLD.MOD_USER );
+ END IF;
+
+ RETURN OLD;
+ END;
+$BODY$
+ LANGUAGE plpgsql VOLATILE
+ COST 100;
+ALTER FUNCTION PUBLIC.TBL_ID_COUNTER_DELETE_TRG()
+ OWNER TO PLGM_SERVICE;
+
+DROP TRIGGER IF EXISTS TBL_ID_COUNTER_DELETE_TRG ON PUBLIC.TBL_ID_COUNTER;
+
+CREATE TRIGGER TBL_ID_COUNTER_DELETE_TRG
+ BEFORE DELETE
+ ON PUBLIC.TBL_ID_COUNTER
+ FOR EACH ROW
+ EXECUTE PROCEDURE PUBLIC.TBL_ID_COUNTER_DELETE_TRG();
+
+
+
+-- PUBLIC.TBL_SINGLE_GRIDMEASURE INSERT TRIGGER --
+-- <GENERATED CODE!>
+CREATE OR REPLACE FUNCTION PUBLIC.TBL_SINGLE_GRIDMEASURE_INSERT_TRG()
+ RETURNS trigger AS
+$BODY$
+ BEGIN
+ INSERT INTO HTBL_SINGLE_GRIDMEASURE (
+ ID,SORTORDER,TITLE,SWITCHING_OBJECT,CIM_ID,CIM_NAME,CIM_DESCRIPTION,PLANNED_STARTTIME_SINGLEMEASURE,PLANNED_ENDTIME_SINGLEMEASURE,DESCRIPTION, RESPONSIBLE_ONSITE_NAME, RESPONSIBLE_ONSITE_DEPARTMENT,NETWORK_CONTROL,FK_TBL_GRIDMEASURE,CREATE_USER,CREATE_DATE,MOD_USER,MOD_DATE,
+
+ HACTION,
+ HDATE,
+ HUSER
+ )
+ VALUES (
+
+ NEW.ID,NEW.SORTORDER,NEW.TITLE,NEW.SWITCHING_OBJECT,NEW.CIM_ID,NEW.CIM_NAME,NEW.CIM_DESCRIPTION,NEW.PLANNED_STARTTIME_SINGLEMEASURE,NEW.PLANNED_ENDTIME_SINGLEMEASURE,NEW.DESCRIPTION, NEW.RESPONSIBLE_ONSITE_NAME, NEW.RESPONSIBLE_ONSITE_DEPARTMENT,NEW.NETWORK_CONTROL,NEW.FK_TBL_GRIDMEASURE,NEW.CREATE_USER,NEW.CREATE_DATE,NEW.MOD_USER,NEW.MOD_DATE,
+
+ 1,
+ current_timestamp,
+ NEW.CREATE_USER );
+
+ RETURN NEW;
+ END;
+$BODY$
+ LANGUAGE plpgsql VOLATILE
+ COST 100;
+ALTER FUNCTION PUBLIC.TBL_SINGLE_GRIDMEASURE_INSERT_TRG()
+ OWNER TO PLGM_SERVICE;
+
+
+DROP TRIGGER IF EXISTS TBL_SINGLE_GRIDMEASURE_INSERT_TRG ON PUBLIC.TBL_SINGLE_GRIDMEASURE;
+
+CREATE TRIGGER TBL_SINGLE_GRIDMEASURE_INSERT_TRG
+ BEFORE INSERT
+ ON PUBLIC.TBL_SINGLE_GRIDMEASURE
+ FOR EACH ROW
+ EXECUTE PROCEDURE PUBLIC.TBL_SINGLE_GRIDMEASURE_INSERT_TRG();
+
+
+
+-- PUBLIC.TBL_SINGLE_GRIDMEASURE UPDATE TRIGGER --
+-- <GENERATED CODE!>
+
+CREATE OR REPLACE FUNCTION PUBLIC.TBL_SINGLE_GRIDMEASURE_UPDATE_TRG()
+ RETURNS trigger AS
+$BODY$
+ BEGIN
+ INSERT INTO HTBL_SINGLE_GRIDMEASURE (
+ ID,SORTORDER,TITLE,SWITCHING_OBJECT,CIM_ID,CIM_NAME,CIM_DESCRIPTION,PLANNED_STARTTIME_SINGLEMEASURE,PLANNED_ENDTIME_SINGLEMEASURE,DESCRIPTION,RESPONSIBLE_ONSITE_NAME, RESPONSIBLE_ONSITE_DEPARTMENT,NETWORK_CONTROL,FK_TBL_GRIDMEASURE,CREATE_USER,CREATE_DATE,MOD_USER,MOD_DATE,
+
+ HACTION,
+ HDATE,
+ HUSER
+ )
+ VALUES (
+ NEW.ID,NEW.SORTORDER,NEW.TITLE,NEW.SWITCHING_OBJECT,NEW.CIM_ID,NEW.CIM_NAME,NEW.CIM_DESCRIPTION,NEW.PLANNED_STARTTIME_SINGLEMEASURE,NEW.PLANNED_ENDTIME_SINGLEMEASURE,NEW.DESCRIPTION,NEW.RESPONSIBLE_ONSITE_NAME, NEW.RESPONSIBLE_ONSITE_DEPARTMENT,NEW.NETWORK_CONTROL,NEW.FK_TBL_GRIDMEASURE,NEW.CREATE_USER,NEW.CREATE_DATE,NEW.MOD_USER,NEW.MOD_DATE,
+ 2,
+ current_timestamp,
+ NEW.MOD_USER
+ );
+
+ RETURN NEW;
+ END;
+$BODY$
+ LANGUAGE plpgsql VOLATILE
+ COST 100;
+ALTER FUNCTION PUBLIC.TBL_SINGLE_GRIDMEASURE_UPDATE_TRG()
+ OWNER TO PLGM_SERVICE;
+
+DROP TRIGGER IF EXISTS TBL_SINGLE_GRIDMEASURE_UPDATE_TRG ON PUBLIC.TBL_SINGLE_GRIDMEASURE;
+
+CREATE TRIGGER TBL_SINGLE_GRIDMEASURE_UPDATE_TRG
+ BEFORE UPDATE
+ ON PUBLIC.TBL_SINGLE_GRIDMEASURE
+ FOR EACH ROW
+ EXECUTE PROCEDURE PUBLIC.TBL_SINGLE_GRIDMEASURE_UPDATE_TRG();
+
+
+
+-- PUBLIC.TBL_SINGLE_GRIDMEASURE DELETE TRIGGER --
+-- <GENERATED CODE!>
+
+CREATE OR REPLACE FUNCTION PUBLIC.TBL_SINGLE_GRIDMEASURE_DELETE_TRG()
+ RETURNS trigger AS
+$BODY$
+ BEGIN
+ IF TG_OP = 'DELETE' THEN
+ INSERT INTO HTBL_SINGLE_GRIDMEASURE (
+
+ ID,SORTORDER,TITLE,SWITCHING_OBJECT,CIM_ID,CIM_NAME,CIM_DESCRIPTION,PLANNED_STARTTIME_SINGLEMEASURE,PLANNED_ENDTIME_SINGLEMEASURE,DESCRIPTION,RESPONSIBLE_ONSITE_NAME, RESPONSIBLE_ONSITE_DEPARTMENT, NETWORK_CONTROL,FK_TBL_GRIDMEASURE,CREATE_USER,CREATE_DATE,MOD_USER,MOD_DATE,
+
+ HACTION,
+ HDATE,
+ HUSER
+ )
+ VALUES (
+ OLD.ID,OLD.SORTORDER,OLD.TITLE,OLD.SWITCHING_OBJECT,OLD.CIM_ID,OLD.CIM_NAME,OLD.CIM_DESCRIPTION,OLD.PLANNED_STARTTIME_SINGLEMEASURE,OLD.PLANNED_ENDTIME_SINGLEMEASURE,OLD.DESCRIPTION,OLD.RESPONSIBLE_ONSITE_NAME, OLD.RESPONSIBLE_ONSITE_DEPARTMENT,OLD.NETWORK_CONTROL,OLD.FK_TBL_GRIDMEASURE,OLD.CREATE_USER,OLD.CREATE_DATE,OLD.MOD_USER,OLD.MOD_DATE,
+
+ 3,
+ current_timestamp,
+ OLD.MOD_USER );
+ END IF;
+
+ RETURN OLD;
+ END;
+$BODY$
+ LANGUAGE plpgsql VOLATILE
+ COST 100;
+ALTER FUNCTION PUBLIC.TBL_SINGLE_GRIDMEASURE_DELETE_TRG()
+ OWNER TO PLGM_SERVICE;
+
+DROP TRIGGER IF EXISTS TBL_SINGLE_GRIDMEASURE_DELETE_TRG ON PUBLIC.TBL_SINGLE_GRIDMEASURE;
+
+CREATE TRIGGER TBL_SINGLE_GRIDMEASURE_DELETE_TRG
+ BEFORE DELETE
+ ON PUBLIC.TBL_SINGLE_GRIDMEASURE
+ FOR EACH ROW
+ EXECUTE PROCEDURE PUBLIC.TBL_SINGLE_GRIDMEASURE_DELETE_TRG();
+
+
+
+
+
+-- PUBLIC.TBL_STEPS INSERT TRIGGER --
+-- <GENERATED CODE!>
+CREATE OR REPLACE FUNCTION PUBLIC.TBL_STEPS_INSERT_TRG()
+ RETURNS trigger AS
+$BODY$
+ BEGIN
+ INSERT INTO HTBL_STEPS (
+ ID,SORTORDER,SWITCHING_OBJECT,TYPE,PRESENT_TIME, PRESENT_STATE, TARGET_STATE, OPERATOR, FK_TBL_SINGLE_GRIDMEASURE,CREATE_USER,CREATE_DATE,MOD_USER,MOD_DATE,
+
+ HACTION,
+ HDATE,
+ HUSER
+ )
+ VALUES (
+
+ NEW.ID,NEW.SORTORDER,NEW.SWITCHING_OBJECT,NEW.TYPE, NEW.PRESENT_TIME, NEW.PRESENT_STATE, NEW.TARGET_STATE, NEW.OPERATOR, NEW.FK_TBL_SINGLE_GRIDMEASURE,NEW.CREATE_USER,NEW.CREATE_DATE,NEW.MOD_USER,NEW.MOD_DATE,
+
+ 1,
+ current_timestamp,
+ NEW.CREATE_USER );
+
+ RETURN NEW;
+ END;
+$BODY$
+ LANGUAGE plpgsql VOLATILE
+ COST 100;
+ALTER FUNCTION PUBLIC.TBL_STEPS_INSERT_TRG()
+ OWNER TO PLGM_SERVICE;
+
+DROP TRIGGER IF EXISTS TBL_STEPS_INSERT_TRG ON PUBLIC.TBL_STEPS;
+
+CREATE TRIGGER TBL_STEPS_INSERT_TRG
+ BEFORE INSERT
+ ON PUBLIC.TBL_STEPS
+ FOR EACH ROW
+ EXECUTE PROCEDURE PUBLIC.TBL_STEPS_INSERT_TRG();
+
+
+
+-- PUBLIC.TBL_STEPS UPDATE TRIGGER --
+-- <GENERATED CODE!>
+
+CREATE OR REPLACE FUNCTION PUBLIC.TBL_STEPS_UPDATE_TRG()
+ RETURNS trigger AS
+$BODY$
+ BEGIN
+ INSERT INTO HTBL_STEPS (
+ ID,SORTORDER,SWITCHING_OBJECT,TYPE,PRESENT_TIME, PRESENT_STATE, TARGET_STATE, OPERATOR,FK_TBL_SINGLE_GRIDMEASURE,CREATE_USER,CREATE_DATE,MOD_USER,MOD_DATE,
+
+ HACTION,
+ HDATE,
+ HUSER
+ )
+ VALUES (
+ NEW.ID,NEW.SORTORDER,NEW.SWITCHING_OBJECT,NEW.TYPE,NEW.PRESENT_TIME, NEW.PRESENT_STATE, NEW.TARGET_STATE, NEW.OPERATOR,NEW.FK_TBL_SINGLE_GRIDMEASURE,NEW.CREATE_USER,NEW.CREATE_DATE,NEW.MOD_USER,NEW.MOD_DATE,
+ 2,
+ current_timestamp,
+ NEW.MOD_USER
+ );
+
+ RETURN NEW;
+ END;
+$BODY$
+ LANGUAGE plpgsql VOLATILE
+ COST 100;
+ALTER FUNCTION PUBLIC.TBL_STEPS_UPDATE_TRG()
+ OWNER TO PLGM_SERVICE;
+
+DROP TRIGGER IF EXISTS TBL_STEPS_UPDATE_TRG ON PUBLIC.TBL_STEPS;
+
+CREATE TRIGGER TBL_STEPS_UPDATE_TRG
+ BEFORE UPDATE
+ ON PUBLIC.TBL_STEPS
+ FOR EACH ROW
+ EXECUTE PROCEDURE PUBLIC.TBL_STEPS_UPDATE_TRG();
+
+
+
+-- PUBLIC.TBL_STEPS DELETE TRIGGER --
+-- <GENERATED CODE!>
+
+CREATE OR REPLACE FUNCTION PUBLIC.TBL_STEPS_DELETE_TRG()
+ RETURNS trigger AS
+$BODY$
+ BEGIN
+ IF TG_OP = 'DELETE' THEN
+ INSERT INTO HTBL_STEPS (
+
+ ID,SORTORDER,SWITCHING_OBJECT,TYPE,PRESENT_TIME, PRESENT_STATE, TARGET_STATE, OPERATOR,FK_TBL_SINGLE_GRIDMEASURE,CREATE_USER,CREATE_DATE,MOD_USER,MOD_DATE,
+
+ HACTION,
+ HDATE,
+ HUSER
+ )
+ VALUES (
+ OLD.ID,OLD.SORTORDER,OLD.SWITCHING_OBJECT,OLD.TYPE,OLD.PRESENT_TIME, OLD.PRESENT_STATE, OLD.TARGET_STATE, OLD.OPERATOR,OLD.FK_TBL_SINGLE_GRIDMEASURE,OLD.CREATE_USER,OLD.CREATE_DATE,OLD.MOD_USER,OLD.MOD_DATE,
+
+ 3,
+ current_timestamp,
+ OLD.MOD_USER );
+ END IF;
+
+ RETURN OLD;
+ END;
+$BODY$
+ LANGUAGE plpgsql VOLATILE
+ COST 100;
+ALTER FUNCTION PUBLIC.TBL_STEPS_DELETE_TRG()
+ OWNER TO PLGM_SERVICE;
+
+DROP TRIGGER IF EXISTS TBL_STEPS_DELETE_TRG ON PUBLIC.TBL_STEPS;
+
+CREATE TRIGGER TBL_STEPS_DELETE_TRG
+ BEFORE DELETE
+ ON PUBLIC.TBL_STEPS
+ FOR EACH ROW
+ EXECUTE PROCEDURE PUBLIC.TBL_STEPS_DELETE_TRG();
+
+
+-- PUBLIC.TBL_LOCK INSERT TRIGGER --
+-- <GENERATED CODE!>
+CREATE OR REPLACE FUNCTION PUBLIC.TBL_LOCK_INSERT_TRG()
+ RETURNS trigger AS
+$BODY$
+ BEGIN
+ INSERT INTO HTBL_LOCK (
+ ID,KEY,USERNAME,INFO,CREATE_USER,CREATE_DATE,MOD_USER,MOD_DATE,
+
+ HACTION,
+ HDATE,
+ HUSER
+ )
+ VALUES (
+
+ NEW.ID,NEW.KEY,NEW.USERNAME,NEW.INFO,NEW.CREATE_USER,NEW.CREATE_DATE,NEW.MOD_USER,NEW.MOD_DATE,
+
+ 1,
+ current_timestamp,
+ NEW.CREATE_USER );
+
+ RETURN NEW;
+ END;
+$BODY$
+ LANGUAGE plpgsql VOLATILE
+ COST 100;
+ALTER FUNCTION PUBLIC.TBL_LOCK_INSERT_TRG()
+ OWNER TO PLGM_SERVICE;
+
+
+DROP TRIGGER IF EXISTS TBL_LOCK_INSERT_TRG ON PUBLIC.TBL_LOCK;
+
+CREATE TRIGGER TBL_LOCK_INSERT_TRG
+ BEFORE INSERT
+ ON PUBLIC.TBL_LOCK
+ FOR EACH ROW
+ EXECUTE PROCEDURE PUBLIC.TBL_LOCK_INSERT_TRG();
+
+
+
+-- PUBLIC.TBL_LOCK UPDATE TRIGGER --
+-- <GENERATED CODE!>
+
+CREATE OR REPLACE FUNCTION PUBLIC.TBL_LOCK_UPDATE_TRG()
+ RETURNS trigger AS
+$BODY$
+ BEGIN
+ INSERT INTO HTBL_LOCK (
+ ID,KEY,USERNAME,INFO,CREATE_USER,CREATE_DATE,MOD_USER,MOD_DATE,
+
+ HACTION,
+ HDATE,
+ HUSER
+ )
+ VALUES (
+ NEW.ID,NEW.KEY,NEW.USERNAME,NEW.INFO,NEW.CREATE_USER,NEW.CREATE_DATE,NEW.MOD_USER,NEW.MOD_DATE,
+ 2,
+ current_timestamp,
+ NEW.MOD_USER
+ );
+
+ RETURN NEW;
+ END;
+$BODY$
+ LANGUAGE plpgsql VOLATILE
+ COST 100;
+ALTER FUNCTION PUBLIC.TBL_LOCK_UPDATE_TRG()
+ OWNER TO PLGM_SERVICE;
+
+DROP TRIGGER IF EXISTS TBL_LOCK_UPDATE_TRG ON PUBLIC.TBL_LOCK;
+
+CREATE TRIGGER TBL_LOCK_UPDATE_TRG
+ BEFORE UPDATE
+ ON PUBLIC.TBL_LOCK
+ FOR EACH ROW
+ EXECUTE PROCEDURE PUBLIC.TBL_LOCK_UPDATE_TRG();
+
+
+
+-- PUBLIC.TBL_LOCK DELETE TRIGGER --
+-- <GENERATED CODE!>
+
+CREATE OR REPLACE FUNCTION PUBLIC.TBL_LOCK_DELETE_TRG()
+ RETURNS trigger AS
+$BODY$
+ BEGIN
+ IF TG_OP = 'DELETE' THEN
+ INSERT INTO HTBL_LOCK (
+
+ ID,KEY,USERNAME,INFO,CREATE_USER,CREATE_DATE,MOD_USER,MOD_DATE,
+
+ HACTION,
+ HDATE,
+ HUSER
+ )
+ VALUES (
+ OLD.ID,OLD.KEY,OLD.USERNAME,OLD.INFO,OLD.CREATE_USER,OLD.CREATE_DATE,OLD.MOD_USER,OLD.MOD_DATE,
+
+ 3,
+ current_timestamp,
+ OLD.MOD_USER );
+ END IF;
+
+ RETURN OLD;
+ END;
+$BODY$
+ LANGUAGE plpgsql VOLATILE
+ COST 100;
+ALTER FUNCTION PUBLIC.TBL_LOCK_DELETE_TRG()
+ OWNER TO PLGM_SERVICE;
+
+DROP TRIGGER IF EXISTS TBL_LOCK_DELETE_TRG ON PUBLIC.TBL_LOCK;
+
+CREATE TRIGGER TBL_LOCK_DELETE_TRG
+ BEFORE DELETE
+ ON PUBLIC.TBL_LOCK
+ FOR EACH ROW
+ EXECUTE PROCEDURE PUBLIC.TBL_LOCK_DELETE_TRG();
+
+
+
+
+-- PUBLIC.TBL_USER_SETTINGS INSERT TRIGGER --
+-- <GENERATED CODE!>
+CREATE OR REPLACE FUNCTION PUBLIC.TBL_USER_SETTINGS_INSERT_TRG()
+ RETURNS trigger AS
+$BODY$
+ BEGIN
+ INSERT INTO HTBL_USER_SETTINGS (
+ ID,USERNAME,SETTING_TYPE,VALUE,CREATE_USER,CREATE_DATE,MOD_USER,MOD_DATE,
+
+ HACTION,
+ HDATE,
+ HUSER
+ )
+ VALUES (
+
+ NEW.ID,NEW.USERNAME,NEW.SETTING_TYPE,NEW.VALUE,NEW.CREATE_USER,NEW.CREATE_DATE,NEW.MOD_USER,NEW.MOD_DATE,
+
+ 1,
+ current_timestamp,
+ NEW.CREATE_USER );
+
+ RETURN NEW;
+ END;
+$BODY$
+ LANGUAGE plpgsql VOLATILE
+ COST 100;
+ALTER FUNCTION PUBLIC.TBL_USER_SETTINGS_INSERT_TRG()
+ OWNER TO PLGM_SERVICE;
+
+
+DROP TRIGGER IF EXISTS TBL_USER_SETTINGS_INSERT_TRG ON PUBLIC.TBL_USER_SETTINGS;
+
+CREATE TRIGGER TBL_USER_SETTINGS_INSERT_TRG
+ BEFORE INSERT
+ ON PUBLIC.TBL_USER_SETTINGS
+ FOR EACH ROW
+ EXECUTE PROCEDURE PUBLIC.TBL_USER_SETTINGS_INSERT_TRG();
+
+
+
+-- PUBLIC.TBL_USER_SETTINGS UPDATE TRIGGER --
+-- <GENERATED CODE!>
+
+CREATE OR REPLACE FUNCTION PUBLIC.TBL_USER_SETTINGS_UPDATE_TRG()
+ RETURNS trigger AS
+$BODY$
+ BEGIN
+ INSERT INTO HTBL_USER_SETTINGS (
+ ID,USERNAME,SETTING_TYPE,VALUE,CREATE_USER,CREATE_DATE,MOD_USER,MOD_DATE,
+
+ HACTION,
+ HDATE,
+ HUSER
+ )
+ VALUES (
+ NEW.ID,NEW.USERNAME,NEW.SETTING_TYPE,NEW.VALUE,NEW.CREATE_USER,NEW.CREATE_DATE,NEW.MOD_USER,NEW.MOD_DATE,
+ 2,
+ current_timestamp,
+ NEW.MOD_USER
+ );
+
+ RETURN NEW;
+ END;
+$BODY$
+ LANGUAGE plpgsql VOLATILE
+ COST 100;
+ALTER FUNCTION PUBLIC.TBL_USER_SETTINGS_UPDATE_TRG()
+ OWNER TO PLGM_SERVICE;
+
+DROP TRIGGER IF EXISTS TBL_USER_SETTINGS_UPDATE_TRG ON PUBLIC.TBL_USER_SETTINGS;
+
+CREATE TRIGGER TBL_USER_SETTINGS_UPDATE_TRG
+ BEFORE UPDATE
+ ON PUBLIC.TBL_USER_SETTINGS
+ FOR EACH ROW
+ EXECUTE PROCEDURE PUBLIC.TBL_USER_SETTINGS_UPDATE_TRG();
+
+
+
+-- PUBLIC.TBL_USER_SETTINGS DELETE TRIGGER --
+-- <GENERATED CODE!>
+
+CREATE OR REPLACE FUNCTION PUBLIC.TBL_USER_SETTINGS_DELETE_TRG()
+ RETURNS trigger AS
+$BODY$
+ BEGIN
+ IF TG_OP = 'DELETE' THEN
+ INSERT INTO HTBL_USER_SETTINGS (
+
+ ID,USERNAME,SETTING_TYPE,VALUE,CREATE_USER,CREATE_DATE,MOD_USER,MOD_DATE,
+
+ HACTION,
+ HDATE,
+ HUSER
+ )
+ VALUES (
+ OLD.ID,OLD.USERNAME,OLD.SETTING_TYPE,OLD.VALUE,OLD.CREATE_USER,OLD.CREATE_DATE,OLD.MOD_USER,OLD.MOD_DATE,
+
+ 3,
+ current_timestamp,
+ OLD.MOD_USER );
+ END IF;
+
+ RETURN OLD;
+ END;
+$BODY$
+ LANGUAGE plpgsql VOLATILE
+ COST 100;
+ALTER FUNCTION PUBLIC.TBL_USER_SETTINGS_DELETE_TRG()
+ OWNER TO PLGM_SERVICE;
+
+DROP TRIGGER IF EXISTS TBL_USER_SETTINGS_DELETE_TRG ON PUBLIC.TBL_USER_SETTINGS;
+
+CREATE TRIGGER TBL_USER_SETTINGS_DELETE_TRG
+ BEFORE DELETE
+ ON PUBLIC.TBL_USER_SETTINGS
+ FOR EACH ROW
+ EXECUTE PROCEDURE PUBLIC.TBL_USER_SETTINGS_DELETE_TRG();
+
+
+
+-- PUBLIC.REF_USER_DEPARTMENT INSERT TRIGGER --
+-- <GENERATED CODE!>
+CREATE OR REPLACE FUNCTION PUBLIC.REF_USER_DEPARTMENT_INSERT_TRG()
+ RETURNS trigger AS
+$BODY$
+ BEGIN
+ INSERT INTO HREF_USER_DEPARTMENT (
+ ID,NAME,CREATE_USER,CREATE_DATE,MOD_USER,MOD_DATE,
+
+ HACTION,
+ HDATE,
+ HUSER
+ )
+ VALUES (
+
+ NEW.ID,NEW.NAME,NEW.CREATE_USER,NEW.CREATE_DATE,NEW.MOD_USER,NEW.MOD_DATE,
+
+ 1,
+ current_timestamp,
+ NEW.CREATE_USER );
+
+ RETURN NEW;
+ END;
+$BODY$
+ LANGUAGE plpgsql VOLATILE
+ COST 100;
+ALTER FUNCTION PUBLIC.REF_USER_DEPARTMENT_INSERT_TRG()
+ OWNER TO PLGM_SERVICE;
+
+
+DROP TRIGGER IF EXISTS REF_USER_DEPARTMENT_INSERT_TRG ON PUBLIC.REF_USER_DEPARTMENT;
+
+CREATE TRIGGER REF_USER_DEPARTMENT_INSERT_TRG
+ BEFORE INSERT
+ ON PUBLIC.REF_USER_DEPARTMENT
+ FOR EACH ROW
+ EXECUTE PROCEDURE PUBLIC.REF_USER_DEPARTMENT_INSERT_TRG();
+
+
+
+-- PUBLIC.REF_USER_DEPARTMENT UPDATE TRIGGER --
+-- <GENERATED CODE!>
+
+CREATE OR REPLACE FUNCTION PUBLIC.REF_USER_DEPARTMENT_UPDATE_TRG()
+ RETURNS trigger AS
+$BODY$
+ BEGIN
+ INSERT INTO HREF_USER_DEPARTMENT (
+ ID,NAME,CREATE_USER,CREATE_DATE,MOD_USER,MOD_DATE,
+
+ HACTION,
+ HDATE,
+ HUSER
+ )
+ VALUES (
+ NEW.ID,NEW.NAME,NEW.CREATE_USER,NEW.CREATE_DATE,NEW.MOD_USER,NEW.MOD_DATE,
+ 2,
+ current_timestamp,
+ NEW.MOD_USER
+ );
+
+ RETURN NEW;
+ END;
+$BODY$
+ LANGUAGE plpgsql VOLATILE
+ COST 100;
+ALTER FUNCTION PUBLIC.REF_USER_DEPARTMENT_UPDATE_TRG()
+ OWNER TO PLGM_SERVICE;
+
+DROP TRIGGER IF EXISTS REF_USER_DEPARTMENT_UPDATE_TRG ON PUBLIC.REF_USER_DEPARTMENT;
+
+CREATE TRIGGER REF_USER_DEPARTMENT_UPDATE_TRG
+ BEFORE UPDATE
+ ON PUBLIC.REF_USER_DEPARTMENT
+ FOR EACH ROW
+ EXECUTE PROCEDURE PUBLIC.REF_USER_DEPARTMENT_UPDATE_TRG();
+
+
+
+-- PUBLIC.REF_USER_DEPARTMENT DELETE TRIGGER --
+-- <GENERATED CODE!>
+
+CREATE OR REPLACE FUNCTION PUBLIC.REF_USER_DEPARTMENT_DELETE_TRG()
+ RETURNS trigger AS
+$BODY$
+ BEGIN
+ IF TG_OP = 'DELETE' THEN
+ INSERT INTO HREF_USER_DEPARTMENT (
+
+ ID,NAME,CREATE_USER,CREATE_DATE,MOD_USER,MOD_DATE,
+
+ HACTION,
+ HDATE,
+ HUSER
+ )
+ VALUES (
+ OLD.ID,OLD.NAME,OLD.CREATE_USER,OLD.CREATE_DATE,OLD.MOD_USER,OLD.MOD_DATE,
+
+ 3,
+ current_timestamp,
+ OLD.MOD_USER );
+ END IF;
+
+ RETURN OLD;
+ END;
+$BODY$
+ LANGUAGE plpgsql VOLATILE
+ COST 100;
+ALTER FUNCTION PUBLIC.REF_USER_DEPARTMENT_DELETE_TRG()
+ OWNER TO PLGM_SERVICE;
+
+DROP TRIGGER IF EXISTS REF_USER_DEPARTMENT_DELETE_TRG ON PUBLIC.REF_USER_DEPARTMENT;
+
+CREATE TRIGGER REF_USER_DEPARTMENT_DELETE_TRG
+ BEFORE DELETE
+ ON PUBLIC.REF_USER_DEPARTMENT
+ FOR EACH ROW
+ EXECUTE PROCEDURE PUBLIC.REF_USER_DEPARTMENT_DELETE_TRG();
+
+
+-- PUBLIC.HREF_COST_CENTER INSERT TRIGGER --
+-- <GENERATED CODE!>
+CREATE OR REPLACE FUNCTION PUBLIC.HREF_COST_CENTER_INSERT_TRG()
+ RETURNS trigger AS
+$BODY$
+ BEGIN
+ INSERT INTO HHREF_COST_CENTER (
+ HID,HACTION,HDATE,HUSER,ID,NAME,DESCRIPTION,CREATE_USER,CREATE_DATE,MOD_USER,MOD_DATE,
+
+ HACTION,
+ HDATE,
+ HUSER
+ )
+ VALUES (
+
+ NEW.HID,NEW.HACTION,NEW.HDATE,NEW.HUSER,NEW.ID,NEW.NAME,NEW.DESCRIPTION,NEW.CREATE_USER,NEW.CREATE_DATE,NEW.MOD_USER,NEW.MOD_DATE,
+
+ 1,
+ current_timestamp,
+ NEW.CREATE_USER );
+
+ RETURN NEW;
+ END;
+$BODY$
+ LANGUAGE plpgsql VOLATILE
+ COST 100;
+ALTER FUNCTION PUBLIC.HREF_COST_CENTER_INSERT_TRG()
+ OWNER TO PLGM_SERVICE;
+
+
+DROP TRIGGER IF EXISTS HREF_COST_CENTER_INSERT_TRG ON PUBLIC.HREF_COST_CENTER;
+
+CREATE TRIGGER HREF_COST_CENTER_INSERT_TRG
+ BEFORE INSERT
+ ON PUBLIC.HREF_COST_CENTER
+ FOR EACH ROW
+ EXECUTE PROCEDURE PUBLIC.HREF_COST_CENTER_INSERT_TRG();
+
+
+
+-- PUBLIC.HREF_COST_CENTER UPDATE TRIGGER --
+-- <GENERATED CODE!>
+
+CREATE OR REPLACE FUNCTION PUBLIC.HREF_COST_CENTER_UPDATE_TRG()
+ RETURNS trigger AS
+$BODY$
+ BEGIN
+ INSERT INTO HHREF_COST_CENTER (
+ HID,HACTION,HDATE,HUSER,ID,NAME,DESCRIPTION,CREATE_USER,CREATE_DATE,MOD_USER,MOD_DATE,
+
+ HACTION,
+ HDATE,
+ HUSER
+ )
+ VALUES (
+ NEW.HID,NEW.HACTION,NEW.HDATE,NEW.HUSER,NEW.ID,NEW.NAME,NEW.DESCRIPTION,NEW.CREATE_USER,NEW.CREATE_DATE,NEW.MOD_USER,NEW.MOD_DATE,
+ 2,
+ current_timestamp,
+ NEW.MOD_USER
+ );
+
+ RETURN NEW;
+ END;
+$BODY$
+ LANGUAGE plpgsql VOLATILE
+ COST 100;
+ALTER FUNCTION PUBLIC.HREF_COST_CENTER_UPDATE_TRG()
+ OWNER TO PLGM_SERVICE;
+
+DROP TRIGGER IF EXISTS HREF_COST_CENTER_UPDATE_TRG ON PUBLIC.HREF_COST_CENTER;
+
+CREATE TRIGGER HREF_COST_CENTER_UPDATE_TRG
+ BEFORE UPDATE
+ ON PUBLIC.HREF_COST_CENTER
+ FOR EACH ROW
+ EXECUTE PROCEDURE PUBLIC.HREF_COST_CENTER_UPDATE_TRG();
+
+
+
+-- PUBLIC.HREF_COST_CENTER DELETE TRIGGER --
+-- <GENERATED CODE!>
+
+CREATE OR REPLACE FUNCTION PUBLIC.HREF_COST_CENTER_DELETE_TRG()
+ RETURNS trigger AS
+$BODY$
+ BEGIN
+ IF TG_OP = 'DELETE' THEN
+ INSERT INTO HHREF_COST_CENTER (
+
+ HID,HACTION,HDATE,HUSER,ID,NAME,DESCRIPTION,CREATE_USER,CREATE_DATE,MOD_USER,MOD_DATE,
+
+ HACTION,
+ HDATE,
+ HUSER
+ )
+ VALUES (
+ OLD.HID,OLD.HACTION,OLD.HDATE,OLD.HUSER,OLD.ID,OLD.NAME,OLD.DESCRIPTION,OLD.CREATE_USER,OLD.CREATE_DATE,OLD.MOD_USER,OLD.MOD_DATE,
+
+ 3,
+ current_timestamp,
+ OLD.MOD_USER );
+ END IF;
+
+ RETURN OLD;
+ END;
+$BODY$
+ LANGUAGE plpgsql VOLATILE
+ COST 100;
+ALTER FUNCTION PUBLIC.HREF_COST_CENTER_DELETE_TRG()
+ OWNER TO PLGM_SERVICE;
+
+DROP TRIGGER IF EXISTS HREF_COST_CENTER_DELETE_TRG ON PUBLIC.HREF_COST_CENTER;
+
+CREATE TRIGGER HREF_COST_CENTER_DELETE_TRG
+ BEFORE DELETE
+ ON PUBLIC.HREF_COST_CENTER
+ FOR EACH ROW
+ EXECUTE PROCEDURE PUBLIC.HREF_COST_CENTER_DELETE_TRG();
+
+
+
+-- PUBLIC.REF_BRANCH INSERT TRIGGER --
+-- <GENERATED CODE!>
+CREATE OR REPLACE FUNCTION PUBLIC.REF_BRANCH_INSERT_TRG()
+ RETURNS trigger AS
+$BODY$
+ BEGIN
+ INSERT INTO HREF_BRANCH (
+
+ ID,NAME,DESCRIPTION,COLOR_CODE,CREATE_USER,CREATE_DATE,MOD_USER,MOD_DATE,
+
+ HACTION,
+ HDATE,
+ HUSER
+ )
+ VALUES (
+
+ NEW.ID,NEW.NAME,NEW.DESCRIPTION,NEW.COLOR_CODE,NEW.CREATE_USER,NEW.CREATE_DATE,NEW.MOD_USER,NEW.MOD_DATE,
+ 1,
+ current_timestamp,
+ NEW.CREATE_USER );
+
+ RETURN NEW;
+ END;
+$BODY$
+ LANGUAGE plpgsql VOLATILE
+ COST 100;
+ALTER FUNCTION PUBLIC.REF_BRANCH_INSERT_TRG()
+ OWNER TO PLGM_SERVICE;
+
+
+DROP TRIGGER IF EXISTS REF_BRANCH_INSERT_TRG ON PUBLIC.REF_BRANCH;
+
+CREATE TRIGGER REF_BRANCH_INSERT_TRG
+ BEFORE INSERT
+ ON PUBLIC.REF_BRANCH
+ FOR EACH ROW
+ EXECUTE PROCEDURE PUBLIC.REF_BRANCH_INSERT_TRG();
+
+
+
+-- PUBLIC.REF_BRANCH UPDATE TRIGGER --
+-- <GENERATED CODE!>
+
+CREATE OR REPLACE FUNCTION PUBLIC.REF_BRANCH_UPDATE_TRG()
+ RETURNS trigger AS
+$BODY$
+ BEGIN
+ INSERT INTO HREF_BRANCH (
+ ID,NAME,DESCRIPTION,COLOR_CODE,CREATE_USER,CREATE_DATE,MOD_USER,MOD_DATE,
+
+ HACTION,
+ HDATE,
+ HUSER
+ )
+ VALUES (
+ NEW.ID,NEW.NAME,NEW.DESCRIPTION,NEW.COLOR_CODE,NEW.CREATE_USER,NEW.CREATE_DATE,NEW.MOD_USER,NEW.MOD_DATE,
+ 2,
+ current_timestamp,
+ NEW.MOD_USER
+ );
+
+ RETURN NEW;
+ END;
+$BODY$
+ LANGUAGE plpgsql VOLATILE
+ COST 100;
+ALTER FUNCTION PUBLIC.REF_BRANCH_UPDATE_TRG()
+ OWNER TO PLGM_SERVICE;
+
+DROP TRIGGER IF EXISTS REF_BRANCH_UPDATE_TRG ON PUBLIC.REF_BRANCH;
+
+CREATE TRIGGER REF_BRANCH_UPDATE_TRG
+ BEFORE UPDATE
+ ON PUBLIC.REF_BRANCH
+ FOR EACH ROW
+ EXECUTE PROCEDURE PUBLIC.REF_BRANCH_UPDATE_TRG();
+
+
+
+-- PUBLIC.REF_BRANCH DELETE TRIGGER --
+-- <GENERATED CODE!>
+
+CREATE OR REPLACE FUNCTION PUBLIC.REF_BRANCH_DELETE_TRG()
+ RETURNS trigger AS
+$BODY$
+ BEGIN
+ IF TG_OP = 'DELETE' THEN
+ INSERT INTO HREF_BRANCH (
+ ID,NAME,DESCRIPTION,COLOR_CODE,CREATE_USER,CREATE_DATE,MOD_USER,MOD_DATE,
+ HACTION,
+ HDATE,
+ HUSER
+ )
+ VALUES (
+ OLD.ID,OLD.NAME,OLD.DESCRIPTION,OLD.COLOR_CODE,OLD.CREATE_USER,OLD.CREATE_DATE,OLD.MOD_USER,OLD.MOD_DATE,
+ 3,
+ current_timestamp,
+ OLD.MOD_USER );
+ END IF;
+
+ RETURN OLD;
+ END;
+$BODY$
+ LANGUAGE plpgsql VOLATILE
+ COST 100;
+ALTER FUNCTION PUBLIC.REF_BRANCH_DELETE_TRG()
+ OWNER TO PLGM_SERVICE;
+
+DROP TRIGGER IF EXISTS REF_BRANCH_DELETE_TRG ON PUBLIC.REF_BRANCH;
+
+CREATE TRIGGER REF_BRANCH_DELETE_TRG
+ BEFORE DELETE
+ ON PUBLIC.REF_BRANCH
+ FOR EACH ROW
+ EXECUTE PROCEDURE PUBLIC.REF_BRANCH_DELETE_TRG();
+
+
+
+-- PUBLIC.REF_BRANCH_LEVEL INSERT TRIGGER --
+-- <GENERATED CODE!>
+CREATE OR REPLACE FUNCTION PUBLIC.REF_BRANCH_LEVEL_INSERT_TRG()
+ RETURNS trigger AS
+$BODY$
+ BEGIN
+ INSERT INTO HREF_BRANCH_LEVEL (
+ ID,NAME,DESCRIPTION,FK_REF_BRANCH,CREATE_USER,CREATE_DATE,MOD_USER,MOD_DATE,
+
+ HACTION,
+ HDATE,
+ HUSER
+ )
+ VALUES (
+
+ NEW.ID,NEW.NAME,NEW.DESCRIPTION,NEW.FK_REF_BRANCH,NEW.CREATE_USER,NEW.CREATE_DATE,NEW.MOD_USER,NEW.MOD_DATE,
+
+ 1,
+ current_timestamp,
+ NEW.CREATE_USER );
+
+ RETURN NEW;
+ END;
+$BODY$
+ LANGUAGE plpgsql VOLATILE
+ COST 100;
+ALTER FUNCTION PUBLIC.REF_BRANCH_LEVEL_INSERT_TRG()
+ OWNER TO PLGM_SERVICE;
+
+
+DROP TRIGGER IF EXISTS REF_BRANCH_LEVEL_INSERT_TRG ON PUBLIC.REF_BRANCH_LEVEL;
+
+CREATE TRIGGER REF_BRANCH_LEVEL_INSERT_TRG
+ BEFORE INSERT
+ ON PUBLIC.REF_BRANCH_LEVEL
+ FOR EACH ROW
+ EXECUTE PROCEDURE PUBLIC.REF_BRANCH_LEVEL_INSERT_TRG();
+
+
+
+-- PUBLIC.REF_BRANCH_LEVEL UPDATE TRIGGER --
+-- <GENERATED CODE!>
+
+CREATE OR REPLACE FUNCTION PUBLIC.REF_BRANCH_LEVEL_UPDATE_TRG()
+ RETURNS trigger AS
+$BODY$
+ BEGIN
+ INSERT INTO HREF_BRANCH_LEVEL (
+ ID,NAME,DESCRIPTION,FK_REF_BRANCH,CREATE_USER,CREATE_DATE,MOD_USER,MOD_DATE,
+
+ HACTION,
+ HDATE,
+ HUSER
+ )
+ VALUES (
+ NEW.ID,NEW.NAME,NEW.DESCRIPTION,NEW.FK_REF_BRANCH,NEW.CREATE_USER,NEW.CREATE_DATE,NEW.MOD_USER,NEW.MOD_DATE,
+ 2,
+ current_timestamp,
+ NEW.MOD_USER
+ );
+
+ RETURN NEW;
+ END;
+$BODY$
+ LANGUAGE plpgsql VOLATILE
+ COST 100;
+ALTER FUNCTION PUBLIC.REF_BRANCH_LEVEL_UPDATE_TRG()
+ OWNER TO PLGM_SERVICE;
+
+DROP TRIGGER IF EXISTS REF_BRANCH_LEVEL_UPDATE_TRG ON PUBLIC.REF_BRANCH_LEVEL;
+
+CREATE TRIGGER REF_BRANCH_LEVEL_UPDATE_TRG
+ BEFORE UPDATE
+ ON PUBLIC.REF_BRANCH_LEVEL
+ FOR EACH ROW
+ EXECUTE PROCEDURE PUBLIC.REF_BRANCH_LEVEL_UPDATE_TRG();
+
+
+
+-- PUBLIC.REF_BRANCH_LEVEL DELETE TRIGGER --
+-- <GENERATED CODE!>
+
+CREATE OR REPLACE FUNCTION PUBLIC.REF_BRANCH_LEVEL_DELETE_TRG()
+ RETURNS trigger AS
+$BODY$
+ BEGIN
+ IF TG_OP = 'DELETE' THEN
+ INSERT INTO HREF_BRANCH_LEVEL (
+
+ ID,NAME,DESCRIPTION,FK_REF_BRANCH,CREATE_USER,CREATE_DATE,MOD_USER,MOD_DATE,
+
+ HACTION,
+ HDATE,
+ HUSER
+ )
+ VALUES (
+ OLD.ID,OLD.NAME,OLD.DESCRIPTION,OLD.FK_REF_BRANCH,OLD.CREATE_USER,OLD.CREATE_DATE,OLD.MOD_USER,OLD.MOD_DATE,
+
+ 3,
+ current_timestamp,
+ OLD.MOD_USER );
+ END IF;
+
+ RETURN OLD;
+ END;
+$BODY$
+ LANGUAGE plpgsql VOLATILE
+ COST 100;
+ALTER FUNCTION PUBLIC.REF_BRANCH_LEVEL_DELETE_TRG()
+ OWNER TO PLGM_SERVICE;
+
+DROP TRIGGER IF EXISTS REF_BRANCH_LEVEL_DELETE_TRG ON PUBLIC.REF_BRANCH_LEVEL;
+
+CREATE TRIGGER REF_BRANCH_LEVEL_DELETE_TRG
+ BEFORE DELETE
+ ON PUBLIC.REF_BRANCH_LEVEL
+ FOR EACH ROW
+ EXECUTE PROCEDURE PUBLIC.REF_BRANCH_LEVEL_DELETE_TRG();
+
+
+
+
+
+-- PUBLIC.REF_GM_STATUS INSERT TRIGGER --
+-- <GENERATED CODE!>
+CREATE OR REPLACE FUNCTION PUBLIC.REF_GM_STATUS_INSERT_TRG()
+ RETURNS trigger AS
+$BODY$
+ BEGIN
+ INSERT INTO HREF_GM_STATUS (
+ ID,NAME,COLOR_CODE,CREATE_USER,CREATE_DATE,MOD_USER,MOD_DATE,
+
+ HACTION,
+ HDATE,
+ HUSER
+ )
+ VALUES (
+
+ NEW.ID,NEW.NAME,NEW.COLOR_CODE,NEW.CREATE_USER,NEW.CREATE_DATE,NEW.MOD_USER,NEW.MOD_DATE,
+
+ 1,
+ current_timestamp,
+ NEW.CREATE_USER );
+
+ RETURN NEW;
+ END;
+$BODY$
+ LANGUAGE plpgsql VOLATILE
+ COST 100;
+ALTER FUNCTION PUBLIC.REF_GM_STATUS_INSERT_TRG()
+ OWNER TO PLGM_SERVICE;
+
+
+DROP TRIGGER IF EXISTS REF_GM_STATUS_INSERT_TRG ON PUBLIC.REF_GM_STATUS;
+
+CREATE TRIGGER REF_GM_STATUS_INSERT_TRG
+ BEFORE INSERT
+ ON PUBLIC.REF_GM_STATUS
+ FOR EACH ROW
+ EXECUTE PROCEDURE PUBLIC.REF_GM_STATUS_INSERT_TRG();
+
+
+
+-- PUBLIC.REF_GM_STATUS UPDATE TRIGGER --
+-- <GENERATED CODE!>
+
+CREATE OR REPLACE FUNCTION PUBLIC.REF_GM_STATUS_UPDATE_TRG()
+ RETURNS trigger AS
+$BODY$
+ BEGIN
+ INSERT INTO HREF_GM_STATUS (
+ ID,NAME,COLOR_CODE,CREATE_USER,CREATE_DATE,MOD_USER,MOD_DATE,
+
+ HACTION,
+ HDATE,
+ HUSER
+ )
+ VALUES (
+ NEW.ID,NEW.NAME,NEW.COLOR_CODE,NEW.CREATE_USER,NEW.CREATE_DATE,NEW.MOD_USER,NEW.MOD_DATE,
+ 2,
+ current_timestamp,
+ NEW.MOD_USER
+ );
+
+ RETURN NEW;
+ END;
+$BODY$
+ LANGUAGE plpgsql VOLATILE
+ COST 100;
+ALTER FUNCTION PUBLIC.REF_GM_STATUS_UPDATE_TRG()
+ OWNER TO PLGM_SERVICE;
+
+DROP TRIGGER IF EXISTS REF_GM_STATUS_UPDATE_TRG ON PUBLIC.REF_GM_STATUS;
+
+CREATE TRIGGER REF_GM_STATUS_UPDATE_TRG
+ BEFORE UPDATE
+ ON PUBLIC.REF_GM_STATUS
+ FOR EACH ROW
+ EXECUTE PROCEDURE PUBLIC.REF_GM_STATUS_UPDATE_TRG();
+
+
+
+-- PUBLIC.REF_GM_STATUS DELETE TRIGGER --
+-- <GENERATED CODE!>
+
+CREATE OR REPLACE FUNCTION PUBLIC.REF_GM_STATUS_DELETE_TRG()
+ RETURNS trigger AS
+$BODY$
+ BEGIN
+ IF TG_OP = 'DELETE' THEN
+ INSERT INTO HREF_GM_STATUS (
+
+ ID,NAME,COLOR_CODE,CREATE_USER,CREATE_DATE,MOD_USER,MOD_DATE,
+
+ HACTION,
+ HDATE,
+ HUSER
+ )
+ VALUES (
+ OLD.ID,OLD.NAME,OLD.COLOR_CODE,OLD.CREATE_USER,OLD.CREATE_DATE,OLD.MOD_USER,OLD.MOD_DATE,
+
+ 3,
+ current_timestamp,
+ OLD.MOD_USER );
+ END IF;
+
+ RETURN OLD;
+ END;
+$BODY$
+ LANGUAGE plpgsql VOLATILE
+ COST 100;
+ALTER FUNCTION PUBLIC.REF_GM_STATUS_DELETE_TRG()
+ OWNER TO PLGM_SERVICE;
+
+DROP TRIGGER IF EXISTS REF_GM_STATUS_DELETE_TRG ON PUBLIC.REF_GM_STATUS;
+
+CREATE TRIGGER REF_GM_STATUS_DELETE_TRG
+ BEFORE DELETE
+ ON PUBLIC.REF_GM_STATUS
+ FOR EACH ROW
+ EXECUTE PROCEDURE PUBLIC.REF_GM_STATUS_DELETE_TRG();
+
+
+
+
+
+
+
+
+-- PUBLIC.TBL_GRIDMEASURE INSERT TRIGGER --
+-- <GENERATED CODE!>
+CREATE OR REPLACE FUNCTION PUBLIC.TBL_GRIDMEASURE_INSERT_TRG()
+ RETURNS trigger AS
+$BODY$
+ BEGIN
+ INSERT INTO HTBL_GRIDMEASURE (
+ ID,ID_DESCRIPTIVE,TITLE,AFFECTED_RESOURCE,REMARK,EMAIL_ADDRESSES,FK_REF_GM_STATUS,SWITCHING_OBJECT,COST_CENTER,APPROVAL_BY,AREA_OF_SWITCHING,APPOINTMENT_REPETITION,APPOINTMENT_STARTDATE,APPOINTMENT_NUMBEROF,PLANNED_STARTTIME_FIRST_SEQUENCE,PLANNED_STARTTIME_FIRST_SINGLEMEASURE,PLANNED_ENDTIME_LAST_SINGLEMEASURE,PLANNED_ENDTIME_GRIDMEASURE,STARTTIME_FIRST_SEQUENCE,STARTTIME_FIRST_SINGLEMEASURE,ENDTIME_LAST_SINGLEMEASURE,ENDTIME_GRIDMEASURE,TIME_OF_REALLOCATION,DESCRIPTION,FK_REF_BRANCH,FK_REF_BRANCH_LEVEL,CREATE_USER,CREATE_USER_DEPARTMENT,CREATE_DATE,MOD_USER,MOD_USER_DEPARTMENT,MOD_DATE,
+
+ HACTION,
+ HDATE,
+ HUSER
+ )
+ VALUES (
+
+ NEW.ID,NEW.ID_DESCRIPTIVE,NEW.TITLE,NEW.AFFECTED_RESOURCE,NEW.REMARK,NEW.EMAIL_ADDRESSES,NEW.FK_REF_GM_STATUS,NEW.SWITCHING_OBJECT,NEW.COST_CENTER,NEW.APPROVAL_BY,NEW.AREA_OF_SWITCHING,NEW.APPOINTMENT_REPETITION,NEW.APPOINTMENT_STARTDATE,NEW.APPOINTMENT_NUMBEROF,NEW.PLANNED_STARTTIME_FIRST_SEQUENCE,NEW.PLANNED_STARTTIME_FIRST_SINGLEMEASURE,NEW.PLANNED_ENDTIME_LAST_SINGLEMEASURE,NEW.PLANNED_ENDTIME_GRIDMEASURE,NEW.STARTTIME_FIRST_SEQUENCE,NEW.STARTTIME_FIRST_SINGLEMEASURE,NEW.ENDTIME_LAST_SINGLEMEASURE,NEW.ENDTIME_GRIDMEASURE,NEW.TIME_OF_REALLOCATION,NEW.DESCRIPTION,NEW.FK_REF_BRANCH,NEW.FK_REF_BRANCH_LEVEL,NEW.CREATE_USER,NEW.CREATE_USER_DEPARTMENT,NEW.CREATE_DATE,NEW.MOD_USER,NEW.MOD_USER_DEPARTMENT,NEW.MOD_DATE,
+
+ 1,
+ current_timestamp,
+ NEW.CREATE_USER );
+
+ RETURN NEW;
+ END;
+$BODY$
+ LANGUAGE plpgsql VOLATILE
+ COST 100;
+ALTER FUNCTION PUBLIC.TBL_GRIDMEASURE_INSERT_TRG()
+ OWNER TO PLGM_SERVICE;
+
+
+DROP TRIGGER IF EXISTS TBL_GRIDMEASURE_INSERT_TRG ON PUBLIC.TBL_GRIDMEASURE;
+
+CREATE TRIGGER TBL_GRIDMEASURE_INSERT_TRG
+ BEFORE INSERT
+ ON PUBLIC.TBL_GRIDMEASURE
+ FOR EACH ROW
+ EXECUTE PROCEDURE PUBLIC.TBL_GRIDMEASURE_INSERT_TRG();
+
+
+
+-- PUBLIC.TBL_GRIDMEASURE UPDATE TRIGGER --
+-- <GENERATED CODE!>
+
+CREATE OR REPLACE FUNCTION PUBLIC.TBL_GRIDMEASURE_UPDATE_TRG()
+ RETURNS trigger AS
+$BODY$
+ BEGIN
+ INSERT INTO HTBL_GRIDMEASURE (
+ ID,ID_DESCRIPTIVE,TITLE,AFFECTED_RESOURCE,REMARK,EMAIL_ADDRESSES,FK_REF_GM_STATUS,SWITCHING_OBJECT,COST_CENTER,APPROVAL_BY,AREA_OF_SWITCHING,APPOINTMENT_REPETITION,APPOINTMENT_STARTDATE,APPOINTMENT_NUMBEROF,PLANNED_STARTTIME_FIRST_SEQUENCE,PLANNED_STARTTIME_FIRST_SINGLEMEASURE,PLANNED_ENDTIME_LAST_SINGLEMEASURE,PLANNED_ENDTIME_GRIDMEASURE,STARTTIME_FIRST_SEQUENCE,STARTTIME_FIRST_SINGLEMEASURE,ENDTIME_LAST_SINGLEMEASURE,ENDTIME_GRIDMEASURE,TIME_OF_REALLOCATION,DESCRIPTION,FK_REF_BRANCH,FK_REF_BRANCH_LEVEL,CREATE_USER,CREATE_USER_DEPARTMENT,CREATE_DATE,MOD_USER,MOD_USER_DEPARTMENT,MOD_DATE,
+
+ HACTION,
+ HDATE,
+ HUSER
+ )
+ VALUES (
+ NEW.ID,NEW.ID_DESCRIPTIVE,NEW.TITLE,NEW.AFFECTED_RESOURCE,NEW.REMARK,NEW.EMAIL_ADDRESSES,NEW.FK_REF_GM_STATUS,NEW.SWITCHING_OBJECT,NEW.COST_CENTER,NEW.APPROVAL_BY,NEW.AREA_OF_SWITCHING,NEW.APPOINTMENT_REPETITION,NEW.APPOINTMENT_STARTDATE,NEW.APPOINTMENT_NUMBEROF,NEW.PLANNED_STARTTIME_FIRST_SEQUENCE,NEW.PLANNED_STARTTIME_FIRST_SINGLEMEASURE,NEW.PLANNED_ENDTIME_LAST_SINGLEMEASURE,NEW.PLANNED_ENDTIME_GRIDMEASURE,NEW.STARTTIME_FIRST_SEQUENCE,NEW.STARTTIME_FIRST_SINGLEMEASURE,NEW.ENDTIME_LAST_SINGLEMEASURE,NEW.ENDTIME_GRIDMEASURE,NEW.TIME_OF_REALLOCATION,NEW.DESCRIPTION,NEW.FK_REF_BRANCH,NEW.FK_REF_BRANCH_LEVEL,NEW.CREATE_USER,NEW.CREATE_USER_DEPARTMENT,NEW.CREATE_DATE,NEW.MOD_USER,NEW.MOD_USER_DEPARTMENT,NEW.MOD_DATE,
+ 2,
+ current_timestamp,
+ NEW.MOD_USER
+ );
+
+ RETURN NEW;
+ END;
+$BODY$
+ LANGUAGE plpgsql VOLATILE
+ COST 100;
+ALTER FUNCTION PUBLIC.TBL_GRIDMEASURE_UPDATE_TRG()
+ OWNER TO PLGM_SERVICE;
+
+DROP TRIGGER IF EXISTS TBL_GRIDMEASURE_UPDATE_TRG ON PUBLIC.TBL_GRIDMEASURE;
+
+CREATE TRIGGER TBL_GRIDMEASURE_UPDATE_TRG
+ BEFORE UPDATE
+ ON PUBLIC.TBL_GRIDMEASURE
+ FOR EACH ROW
+ EXECUTE PROCEDURE PUBLIC.TBL_GRIDMEASURE_UPDATE_TRG();
+
+
+
+-- PUBLIC.TBL_GRIDMEASURE DELETE TRIGGER --
+-- <GENERATED CODE!>
+
+CREATE OR REPLACE FUNCTION PUBLIC.TBL_GRIDMEASURE_DELETE_TRG()
+ RETURNS trigger AS
+$BODY$
+ BEGIN
+ IF TG_OP = 'DELETE' THEN
+ INSERT INTO HTBL_GRIDMEASURE (
+
+ ID,ID_DESCRIPTIVE,TITLE,AFFECTED_RESOURCE,REMARK,EMAIL_ADDRESSES,FK_REF_GM_STATUS,SWITCHING_OBJECT,COST_CENTER,APPROVAL_BY,AREA_OF_SWITCHING,APPOINTMENT_REPETITION,APPOINTMENT_STARTDATE,APPOINTMENT_NUMBEROF,PLANNED_STARTTIME_FIRST_SEQUENCE,PLANNED_STARTTIME_FIRST_SINGLEMEASURE,PLANNED_ENDTIME_LAST_SINGLEMEASURE,PLANNED_ENDTIME_GRIDMEASURE,STARTTIME_FIRST_SEQUENCE,STARTTIME_FIRST_SINGLEMEASURE,ENDTIME_LAST_SINGLEMEASURE,ENDTIME_GRIDMEASURE,TIME_OF_REALLOCATION,DESCRIPTION,FK_REF_BRANCH,FK_REF_BRANCH_LEVEL,CREATE_USER,CREATE_USER_DEPARTMENT,CREATE_DATE,MOD_USER,MOD_USER_DEPARTMENT,MOD_DATE,
+
+ HACTION,
+ HDATE,
+ HUSER
+ )
+ VALUES (
+ OLD.ID,OLD.ID_DESCRIPTIVE,OLD.TITLE,OLD.AFFECTED_RESOURCE,OLD.REMARK,OLD.EMAIL_ADDRESSES,OLD.FK_REF_GM_STATUS,OLD.SWITCHING_OBJECT,OLD.COST_CENTER,OLD.APPROVAL_BY,OLD.AREA_OF_SWITCHING,OLD.APPOINTMENT_REPETITION,OLD.APPOINTMENT_STARTDATE,OLD.APPOINTMENT_NUMBEROF,OLD.PLANNED_STARTTIME_FIRST_SEQUENCE,OLD.PLANNED_STARTTIME_FIRST_SINGLEMEASURE,OLD.PLANNED_ENDTIME_LAST_SINGLEMEASURE,OLD.PLANNED_ENDTIME_GRIDMEASURE,OLD.STARTTIME_FIRST_SEQUENCE,OLD.STARTTIME_FIRST_SINGLEMEASURE,OLD.ENDTIME_LAST_SINGLEMEASURE,OLD.ENDTIME_GRIDMEASURE,OLD.TIME_OF_REALLOCATION,OLD.DESCRIPTION,OLD.FK_REF_BRANCH,OLD.FK_REF_BRANCH_LEVEL,OLD.CREATE_USER,OLD.CREATE_USER_DEPARTMENT,OLD.CREATE_DATE,OLD.MOD_USER,OLD.MOD_USER_DEPARTMENT,OLD.MOD_DATE,
+
+ 3,
+ current_timestamp,
+ OLD.MOD_USER );
+ END IF;
+
+ RETURN OLD;
+ END;
+$BODY$
+ LANGUAGE plpgsql VOLATILE
+ COST 100;
+ALTER FUNCTION PUBLIC.TBL_GRIDMEASURE_DELETE_TRG()
+ OWNER TO PLGM_SERVICE;
+
+DROP TRIGGER IF EXISTS TBL_GRIDMEASURE_DELETE_TRG ON PUBLIC.TBL_GRIDMEASURE;
+
+CREATE TRIGGER TBL_GRIDMEASURE_DELETE_TRG
+ BEFORE DELETE
+ ON PUBLIC.TBL_GRIDMEASURE
+ FOR EACH ROW
+ EXECUTE PROCEDURE PUBLIC.TBL_GRIDMEASURE_DELETE_TRG();
+
+
+-- PUBLIC.TBL_DOCUMENTS INSERT TRIGGER --
+-- <GENERATED CODE!>
+CREATE OR REPLACE FUNCTION PUBLIC.TBL_DOCUMENTS_INSERT_TRG()
+ RETURNS trigger AS
+$BODY$
+ BEGIN
+ INSERT INTO HTBL_DOCUMENTS (
+ ID,DOCUMENT_NAME,CREATE_USER,CREATE_DATE,MOD_USER,MOD_DATE,
+
+ HACTION,
+ HDATE,
+ HUSER
+ )
+ VALUES (
+
+ NEW.ID,NEW.DOCUMENT_NAME,NEW.CREATE_USER,NEW.CREATE_DATE,NEW.MOD_USER,NEW.MOD_DATE,
+
+ 1,
+ current_timestamp,
+ NEW.CREATE_USER );
+
+ RETURN NEW;
+ END;
+$BODY$
+ LANGUAGE plpgsql VOLATILE
+ COST 100;
+ALTER FUNCTION PUBLIC.TBL_DOCUMENTS_INSERT_TRG()
+ OWNER TO PLGM_SERVICE;
+
+
+DROP TRIGGER IF EXISTS TBL_DOCUMENTS_INSERT_TRG ON PUBLIC.TBL_DOCUMENTS;
+
+CREATE TRIGGER TBL_DOCUMENTS_INSERT_TRG
+ BEFORE INSERT
+ ON PUBLIC.TBL_DOCUMENTS
+ FOR EACH ROW
+ EXECUTE PROCEDURE PUBLIC.TBL_DOCUMENTS_INSERT_TRG();
+
+
+
+-- PUBLIC.TBL_DOCUMENTS UPDATE TRIGGER --
+-- <GENERATED CODE!>
+
+CREATE OR REPLACE FUNCTION PUBLIC.TBL_DOCUMENTS_UPDATE_TRG()
+ RETURNS trigger AS
+$BODY$
+ BEGIN
+ INSERT INTO HTBL_DOCUMENTS (
+ ID,DOCUMENT_NAME,CREATE_USER,CREATE_DATE,MOD_USER,MOD_DATE,
+
+ HACTION,
+ HDATE,
+ HUSER
+ )
+ VALUES (
+ NEW.ID,NEW.DOCUMENT_NAME,NEW.CREATE_USER,NEW.CREATE_DATE,NEW.MOD_USER,NEW.MOD_DATE,
+ 2,
+ current_timestamp,
+ NEW.MOD_USER
+ );
+
+ RETURN NEW;
+ END;
+$BODY$
+ LANGUAGE plpgsql VOLATILE
+ COST 100;
+ALTER FUNCTION PUBLIC.TBL_DOCUMENTS_UPDATE_TRG()
+ OWNER TO PLGM_SERVICE;
+
+DROP TRIGGER IF EXISTS TBL_DOCUMENTS_UPDATE_TRG ON PUBLIC.TBL_DOCUMENTS;
+
+CREATE TRIGGER TBL_DOCUMENTS_UPDATE_TRG
+ BEFORE UPDATE
+ ON PUBLIC.TBL_DOCUMENTS
+ FOR EACH ROW
+ EXECUTE PROCEDURE PUBLIC.TBL_DOCUMENTS_UPDATE_TRG();
+
+
+
+-- PUBLIC.TBL_DOCUMENTS DELETE TRIGGER --
+-- <GENERATED CODE!>
+
+CREATE OR REPLACE FUNCTION PUBLIC.TBL_DOCUMENTS_DELETE_TRG()
+ RETURNS trigger AS
+$BODY$
+ BEGIN
+ IF TG_OP = 'DELETE' THEN
+ INSERT INTO HTBL_DOCUMENTS (
+
+ ID,DOCUMENT_NAME,CREATE_USER,CREATE_DATE,MOD_USER,MOD_DATE,
+
+ HACTION,
+ HDATE,
+ HUSER
+ )
+ VALUES (
+ OLD.ID,OLD.DOCUMENT_NAME,OLD.CREATE_USER,OLD.CREATE_DATE,OLD.MOD_USER,OLD.MOD_DATE,
+
+ 3,
+ current_timestamp,
+ OLD.MOD_USER );
+ END IF;
+
+ RETURN OLD;
+ END;
+$BODY$
+ LANGUAGE plpgsql VOLATILE
+ COST 100;
+ALTER FUNCTION PUBLIC.TBL_DOCUMENTS_DELETE_TRG()
+ OWNER TO PLGM_SERVICE;
+
+DROP TRIGGER IF EXISTS TBL_DOCUMENTS_DELETE_TRG ON PUBLIC.TBL_DOCUMENTS;
+
+CREATE TRIGGER TBL_DOCUMENTS_DELETE_TRG
+ BEFORE DELETE
+ ON PUBLIC.TBL_DOCUMENTS
+ FOR EACH ROW
+ EXECUTE PROCEDURE PUBLIC.TBL_DOCUMENTS_DELETE_TRG();
+
+
+
+
+
+
+-- PUBLIC.TBL_MEASURE_DOCUMENTS INSERT TRIGGER --
+-- <GENERATED CODE!>
+CREATE OR REPLACE FUNCTION PUBLIC.TBL_MEASURE_DOCUMENTS_INSERT_TRG()
+ RETURNS trigger AS
+$BODY$
+ BEGIN
+ INSERT INTO HTBL_MEASURE_DOCUMENTS (
+ ID,FK_TBL_MEASURE,FK_TBL_DOCUMENTS,CREATE_USER,CREATE_DATE,MOD_USER,MOD_DATE,
+
+ HACTION,
+ HDATE,
+ HUSER
+ )
+ VALUES (
+
+ NEW.ID,NEW.FK_TBL_MEASURE,NEW.FK_TBL_DOCUMENTS,NEW.CREATE_USER,NEW.CREATE_DATE,NEW.MOD_USER,NEW.MOD_DATE,
+
+ 1,
+ current_timestamp,
+ NEW.CREATE_USER );
+
+ RETURN NEW;
+ END;
+$BODY$
+ LANGUAGE plpgsql VOLATILE
+ COST 100;
+ALTER FUNCTION PUBLIC.TBL_MEASURE_DOCUMENTS_INSERT_TRG()
+ OWNER TO PLGM_SERVICE;
+
+
+DROP TRIGGER IF EXISTS TBL_MEASURE_DOCUMENTS_INSERT_TRG ON PUBLIC.TBL_MEASURE_DOCUMENTS;
+
+CREATE TRIGGER TBL_MEASURE_DOCUMENTS_INSERT_TRG
+ BEFORE INSERT
+ ON PUBLIC.TBL_MEASURE_DOCUMENTS
+ FOR EACH ROW
+ EXECUTE PROCEDURE PUBLIC.TBL_MEASURE_DOCUMENTS_INSERT_TRG();
+
+
+
+-- PUBLIC.TBL_MEASURE_DOCUMENTS UPDATE TRIGGER --
+-- <GENERATED CODE!>
+
+CREATE OR REPLACE FUNCTION PUBLIC.TBL_MEASURE_DOCUMENTS_UPDATE_TRG()
+ RETURNS trigger AS
+$BODY$
+ BEGIN
+ INSERT INTO HTBL_MEASURE_DOCUMENTS (
+ ID,FK_TBL_MEASURE,FK_TBL_DOCUMENTS,CREATE_USER,CREATE_DATE,MOD_USER,MOD_DATE,
+
+ HACTION,
+ HDATE,
+ HUSER
+ )
+ VALUES (
+ NEW.ID,NEW.FK_TBL_MEASURE,NEW.FK_TBL_DOCUMENTS,NEW.CREATE_USER,NEW.CREATE_DATE,NEW.MOD_USER,NEW.MOD_DATE,
+ 2,
+ current_timestamp,
+ NEW.MOD_USER
+ );
+
+ RETURN NEW;
+ END;
+$BODY$
+ LANGUAGE plpgsql VOLATILE
+ COST 100;
+ALTER FUNCTION PUBLIC.TBL_MEASURE_DOCUMENTS_UPDATE_TRG()
+ OWNER TO PLGM_SERVICE;
+
+DROP TRIGGER IF EXISTS TBL_MEASURE_DOCUMENTS_UPDATE_TRG ON PUBLIC.TBL_MEASURE_DOCUMENTS;
+
+CREATE TRIGGER TBL_MEASURE_DOCUMENTS_UPDATE_TRG
+ BEFORE UPDATE
+ ON PUBLIC.TBL_MEASURE_DOCUMENTS
+ FOR EACH ROW
+ EXECUTE PROCEDURE PUBLIC.TBL_MEASURE_DOCUMENTS_UPDATE_TRG();
+
+
+
+-- PUBLIC.TBL_MEASURE_DOCUMENTS DELETE TRIGGER --
+-- <GENERATED CODE!>
+
+CREATE OR REPLACE FUNCTION PUBLIC.TBL_MEASURE_DOCUMENTS_DELETE_TRG()
+ RETURNS trigger AS
+$BODY$
+ BEGIN
+ IF TG_OP = 'DELETE' THEN
+ INSERT INTO HTBL_MEASURE_DOCUMENTS (
+
+ ID,FK_TBL_MEASURE,FK_TBL_DOCUMENTS,CREATE_USER,CREATE_DATE,MOD_USER,MOD_DATE,
+
+ HACTION,
+ HDATE,
+ HUSER
+ )
+ VALUES (
+ OLD.ID,OLD.FK_TBL_MEASURE,OLD.FK_TBL_DOCUMENTS,OLD.CREATE_USER,OLD.CREATE_DATE,OLD.MOD_USER,OLD.MOD_DATE,
+
+ 3,
+ current_timestamp,
+ OLD.MOD_USER );
+ END IF;
+
+ RETURN OLD;
+ END;
+$BODY$
+ LANGUAGE plpgsql VOLATILE
+ COST 100;
+ALTER FUNCTION PUBLIC.TBL_MEASURE_DOCUMENTS_DELETE_TRG()
+ OWNER TO PLGM_SERVICE;
+
+DROP TRIGGER IF EXISTS TBL_MEASURE_DOCUMENTS_DELETE_TRG ON PUBLIC.TBL_MEASURE_DOCUMENTS;
+
+CREATE TRIGGER TBL_MEASURE_DOCUMENTS_DELETE_TRG
+ BEFORE DELETE
+ ON PUBLIC.TBL_MEASURE_DOCUMENTS
+ FOR EACH ROW
+ EXECUTE PROCEDURE PUBLIC.TBL_MEASURE_DOCUMENTS_DELETE_TRG();
diff --git a/db/migrations/V0_44__CREATE_PLGM_DB.sql b/db/migrations/V0_44__CREATE_PLGM_DB.sql
new file mode 100644
index 0000000..7709872
--- /dev/null
+++ b/db/migrations/V0_44__CREATE_PLGM_DB.sql
@@ -0,0 +1,3606 @@
+-----------------------------------------------------------------------------------
+-- *******************************************************************************
+-- * Copyright (c) 2018 Contributors to the Eclipse Foundation
+-- *
+-- * See the NOTICE file(s) distributed with this work for additional
+-- * information regarding copyright ownership.
+-- *
+-- * This program and the accompanying materials are made available under the
+-- * terms of the Eclipse Public License v. 2.0 which is available at
+-- * http://www.eclipse.org/legal/epl-2.0.
+-- *
+-- * SPDX-License-Identifier: EPL-2.0
+-- *******************************************************************************
+-----------------------------------------------------------------------------------
+--Field COLOR_CODE added in Table REF_GM_STATUS, HREF_GM_STATUS, Insert-, Delete-, and Update-Triggers
+
+-- ---------------------------------------------
+-- DROPS
+-- ---------------------------------------------
+DROP TABLE IF EXISTS public.TBL_STEPS;
+DROP SEQUENCE IF EXISTS public.TBL_STEPS_ID_SEQ;
+
+DROP TABLE IF EXISTS public.TBL_SINGLE_GRIDMEASURE;
+DROP SEQUENCE IF EXISTS public.TBL_SINGLE_GRIDMEASURE_ID_SEQ;
+
+DROP TABLE IF EXISTS public.TBL_LOCK CASCADE;
+DROP SEQUENCE IF EXISTS public.TBL_LOCK_ID_SEQ;
+
+DROP TABLE IF EXISTS public.REF_USER_SETTINGS CASCADE;
+DROP SEQUENCE IF EXISTS public.REF_USER_SETTINGS_ID_SEQ;
+
+DROP TABLE IF EXISTS public.TBL_USER_SETTINGS CASCADE;
+DROP SEQUENCE IF EXISTS public.TBL_USER_SETTINGS_ID_SEQ;
+
+DROP TABLE IF EXISTS public.REF_USER_DEPARTMENT CASCADE;
+DROP SEQUENCE IF EXISTS public.REF_USER_DEPARTMENT_ID_SEQ;
+
+DROP TABLE IF EXISTS public.REF_COST_CENTER CASCADE;
+DROP SEQUENCE IF EXISTS public.REF_COST_CENTER_ID_SEQ;
+
+DROP TABLE IF EXISTS public.TBL_GRIDMEASURE CASCADE;
+DROP SEQUENCE IF EXISTS public.TBL_GRIDMEASURE_ID_SEQ;
+
+DROP TABLE IF EXISTS public.REF_BRANCH CASCADE;
+DROP SEQUENCE IF EXISTS public.REF_BRANCH_ID_SEQ;
+
+DROP TABLE IF EXISTS public.REF_BRANCH_LEVEL CASCADE;
+DROP SEQUENCE IF EXISTS public.REF_BRANCH_LEVEL_ID_SEQ;
+
+DROP TABLE IF EXISTS public.REF_GM_STATUS CASCADE;
+DROP SEQUENCE IF EXISTS public.REF_GM_STATUS_ID_SEQ;
+
+DROP TABLE IF EXISTS public.tbl_documents CASCADE;
+DROP SEQUENCE IF EXISTS public.tbl_documents_id_seq;
+
+DROP TABLE IF EXISTS public.tbl_measure_documents CASCADE;
+DROP SEQUENCE IF EXISTS public.tbl_measure_documents_id_seq;
+
+DROP TABLE IF EXISTS public.tbl_id_counter CASCADE;
+DROP SEQUENCE IF EXISTS public.tbl_id_counter_id_seq;
+
+DROP TABLE IF EXISTS public.REF_TERRITORY CASCADE;
+DROP SEQUENCE IF EXISTS public.REF_TERRITORY_ID_SEQ;
+
+
+DROP INDEX IF EXISTS public.huser_index;
+
+-- ---------------------------------------------
+-- TABLE REF_TERRITORY
+-- ---------------------------------------------
+
+CREATE SEQUENCE public.REF_TERRITORY_ID_SEQ
+ INCREMENT 1
+ MINVALUE 1
+ MAXVALUE 9223372036854775807
+ START 1
+ CACHE 1;
+ALTER TABLE public.REF_TERRITORY_ID_SEQ
+ OWNER TO plgm_service;
+
+
+CREATE TABLE public.REF_TERRITORY
+(
+ id integer NOT NULL DEFAULT nextval('REF_TERRITORY_ID_SEQ'::regclass),
+ name character varying(50) NOT NULL,
+ description character varying(255),
+ create_user character varying(100) NOT NULL,
+ create_date timestamp without time zone NOT NULL,
+ mod_user character varying(100),
+ mod_date timestamp without time zone,
+ CONSTRAINT REF_TERRITORY_pkey PRIMARY KEY (id)
+)
+WITH (
+ OIDS=FALSE
+);
+ALTER TABLE public.REF_TERRITORY
+ OWNER TO plgm_service;
+GRANT ALL ON TABLE public.REF_TERRITORY TO plgm_service;
+
+INSERT INTO public.REF_TERRITORY(
+ name, description, create_user, create_date, mod_user, mod_date)
+ VALUES ('Nord', 'Region Nord', 'testuser','12.04.2018','testuser','12.04.2018');
+INSERT INTO public.REF_TERRITORY(
+ name, description, create_user, create_date, mod_user, mod_date)
+ VALUES ('Ost', 'Region Ost', 'testuser','12.04.2018','testuser','12.04.2018');
+INSERT INTO public.REF_TERRITORY(
+ name, description, create_user, create_date, mod_user, mod_date)
+ VALUES ('SUED', 'Region SUED', 'testuser','12.04.2018','testuser','12.04.2018');
+
+
+
+-- ---------------------------------------------
+-- TABLE TBL_LOCK
+-- ---------------------------------------------
+
+CREATE SEQUENCE public.TBL_LOCK_ID_SEQ
+ INCREMENT 1
+ MINVALUE 1
+ MAXVALUE 9223372036854775807
+ START 1
+ CACHE 1;
+ALTER TABLE public.TBL_LOCK_ID_SEQ
+ OWNER TO plgm_service;
+
+CREATE TABLE public.tbl_lock
+(
+ id integer NOT NULL DEFAULT nextval('TBL_LOCK_ID_SEQ'::regclass),
+ key integer NOT NULL, -- Id from tbl_gridmeasure
+ username character varying(50) NOT NULL,
+ info character varying(256),
+ create_user character varying(100) NOT NULL,
+ create_date timestamp without time zone NOT NULL,
+ mod_user character varying(100),
+ mod_date timestamp without time zone,
+ CONSTRAINT tbl_lock_pkey PRIMARY KEY (id)
+)
+WITH (
+ OIDS=FALSE
+);
+ALTER TABLE public.tbl_lock
+ OWNER TO plgm_service;
+GRANT ALL ON TABLE public.tbl_lock TO plgm_service;
+
+CREATE UNIQUE INDEX tbl_lock_unique_key ON public.tbl_lock (key ASC, info ASC );
+
+-- ---------------------------------------------
+-- TABLE TBL_USER_SETTINGS
+-- ---------------------------------------------
+
+CREATE SEQUENCE public.tbl_user_settings_id_seq
+ INCREMENT 1
+ MINVALUE 1
+ MAXVALUE 9223372036854775807
+ START 1
+ CACHE 1;
+ALTER TABLE public.tbl_user_settings_id_seq
+ OWNER TO plgm_service;
+
+CREATE TABLE public.tbl_user_settings
+(
+ id integer NOT NULL DEFAULT nextval('tbl_user_settings_id_seq'::regclass),
+ username character varying(50) NOT NULL,
+ setting_type character varying(50),
+ value character varying(4096),
+ create_user character varying(100) NOT NULL,
+ create_date timestamp without time zone NOT NULL,
+ mod_user character varying(100),
+ mod_date timestamp without time zone,
+ CONSTRAINT tbl_user_settings_pkey PRIMARY KEY (id)
+)
+WITH (
+ OIDS=FALSE
+);
+ALTER TABLE public.tbl_user_settings
+ OWNER TO plgm_service;
+GRANT ALL ON TABLE public.tbl_user_settings TO plgm_service;
+
+CREATE UNIQUE INDEX tbl_user_set_unique_key ON public.tbl_user_settings (username ASC, setting_type ASC );
+
+
+
+-- ---------------------------------------------
+-- TABLE TBL_ID_COUNTER
+-- ---------------------------------------------
+
+CREATE SEQUENCE public.tbl_id_counter_id_seq
+ INCREMENT 1
+ MINVALUE 1
+ MAXVALUE 9223372036854775807
+ START 1
+ CACHE 1;
+ALTER TABLE public.tbl_id_counter_id_seq
+ OWNER TO plgm_service;
+
+CREATE TABLE public.tbl_id_counter
+(
+ id integer NOT NULL DEFAULT nextval('tbl_id_counter_id_seq'::regclass),
+ counter integer NOT NULL,
+ counter_type character varying(256),
+ info character varying(256),
+ create_user character varying(100) NOT NULL,
+ create_date timestamp without time zone NOT NULL,
+ mod_user character varying(100),
+ mod_date timestamp without time zone,
+ CONSTRAINT tbl_id_counter_pkey PRIMARY KEY (id)
+)
+WITH (
+ OIDS=FALSE
+);
+ALTER TABLE public.tbl_id_counter
+ OWNER TO plgm_service;
+GRANT ALL ON TABLE public.tbl_id_counter TO plgm_service;
+
+
+-- ---------------------------------------------
+-- TABLE REF_USER_DEPARTMENT
+-- ---------------------------------------------
+
+CREATE SEQUENCE public.REF_USER_DEPARTMENT_ID_SEQ
+ INCREMENT 1
+ MINVALUE 1
+ MAXVALUE 9223372036854775807
+ START 3
+ CACHE 1;
+ALTER TABLE public.REF_USER_DEPARTMENT_ID_SEQ
+ OWNER TO plgm_service;
+
+
+CREATE TABLE public.REF_USER_DEPARTMENT
+(
+ id integer NOT NULL DEFAULT nextval('REF_USER_DEPARTMENT_ID_SEQ'::regclass),
+ name character varying(50) NOT NULL,
+ create_user character varying(100) NOT NULL,
+ create_date timestamp without time zone NOT NULL,
+ mod_user character varying(100),
+ mod_date timestamp without time zone,
+ CONSTRAINT ref_user_department_pkey PRIMARY KEY (id)
+)
+WITH (
+ OIDS=FALSE
+);
+ALTER TABLE public.REF_USER_DEPARTMENT
+ OWNER TO plgm_service;
+GRANT ALL ON TABLE public.REF_USER_DEPARTMENT TO plgm_service;
+
+
+INSERT INTO public.ref_user_department(
+ name, create_user, create_date, mod_user, mod_date)
+ VALUES ('Schnelle Truppe', 'testuser', '12.04.2018','testuser', '12.04.2018');
+INSERT INTO public.ref_user_department(
+ name, create_user, create_date, mod_user, mod_date)
+ VALUES ('Abt. Aufsicht', 'testuser', '12.04.2018','testuser', '12.04.2018');
+INSERT INTO public.ref_user_department(
+ name, create_user, create_date, mod_user, mod_date)
+ VALUES ('Abt. Wartung', 'testuser', '12.04.2018','testuser', '12.04.2018');
+
+-- ---------------------------------------------
+-- TABLE REF_COST_CENTER
+-- ---------------------------------------------
+
+CREATE SEQUENCE public.REF_COST_CENTER_ID_SEQ
+ INCREMENT 1
+ MINVALUE 1
+ MAXVALUE 9223372036854775807
+ START 1
+ CACHE 1;
+ALTER TABLE public.REF_COST_CENTER_ID_SEQ
+ OWNER TO plgm_service;
+
+
+CREATE TABLE public.REF_COST_CENTER
+(
+ id integer NOT NULL DEFAULT nextval('REF_COST_CENTER_id_seq'::regclass),
+ name character varying(50) NOT NULL,
+ description character varying(255),
+ create_user character varying(100) NOT NULL,
+ create_date timestamp without time zone NOT NULL,
+ mod_user character varying(100),
+ mod_date timestamp without time zone,
+ CONSTRAINT REF_COST_CENTER_pkey PRIMARY KEY (id)
+)
+WITH (
+ OIDS=FALSE
+);
+ALTER TABLE public.REF_COST_CENTER
+ OWNER TO plgm_service;
+GRANT ALL ON TABLE public.REF_COST_CENTER TO plgm_service;
+
+INSERT INTO public.ref_cost_center(
+ name, description, create_user, create_date, mod_user, mod_date)
+ VALUES ('K-155', 'Kostenstelle der Abteilung abc', 'testuser','12.04.2018','testuser','12.04.2018');
+INSERT INTO public.ref_cost_center(
+ name, description, create_user, create_date, mod_user, mod_date)
+ VALUES ('K-004', 'Kostenstelle der Abteilung xyz', 'testuser','12.04.2018','testuser','12.04.2018');
+INSERT INTO public.ref_cost_center(
+ name, description, create_user, create_date, mod_user, mod_date)
+ VALUES ('K-222', 'Kostenstelle der Abteilung hij', 'testuser','12.04.2018','testuser','12.04.2018');
+
+-- ---------------------------------------------
+-- TABLE REF_BRANCH
+-- ---------------------------------------------
+CREATE SEQUENCE public.REF_BRANCH_ID_SEQ
+ INCREMENT 1
+ MINVALUE 1
+ MAXVALUE 9223372036854775807
+ START 1
+ CACHE 1;
+
+ALTER TABLE public.REF_BRANCH_ID_SEQ
+ OWNER TO PLGM_SERVICE;
+
+CREATE TABLE public.REF_BRANCH
+(
+ ID integer NOT NULL DEFAULT nextval('REF_BRANCH_ID_SEQ'::regclass),
+ NAME character varying(50) NOT NULL,
+ DESCRIPTION character varying(255),
+ COLOR_CODE character varying(20),
+ CREATE_USER character varying(100) NOT NULL,
+ CREATE_DATE timestamp without time zone NOT NULL,
+ MOD_USER character varying(100),
+ MOD_DATE timestamp without time zone,
+ CONSTRAINT REF_BRANCH_PKEY PRIMARY KEY (id)
+)
+WITH (
+ OIDS=FALSE
+);
+
+ALTER TABLE public.REF_BRANCH
+ OWNER TO PLGM_SERVICE;
+GRANT ALL ON TABLE public.REF_BRANCH TO PLGM_SERVICE;
+
+INSERT INTO public.ref_branch(name, description, color_code, create_user, create_date, mod_user, mod_date)
+ VALUES ('S', 'Strom', '#fc6042','testuser', '12.04.2018', 'testuser', '12.04.2018');
+INSERT INTO public.ref_branch(name, description, color_code, create_user, create_date, mod_user, mod_date)
+ VALUES ('G', 'Gas', '#fdea64', 'testuser', '12.04.2018', 'testuser', '12.04.2018');
+INSERT INTO public.ref_branch(name, description, color_code, create_user, create_date, mod_user, mod_date)
+ VALUES ('F', 'Fernwärme', '#2cc990', 'testuser', '12.04.2018', 'testuser', '12.04.2018');
+INSERT INTO public.ref_branch(name, description, color_code, create_user, create_date, mod_user, mod_date)
+ VALUES ('W', 'Wasser', '#2c82c9', 'testuser', '12.04.2018', 'testuser', '12.04.2018');
+-- ---------------------------------------------
+-- TABLE REF_BRANCH_LEVEL
+-- ---------------------------------------------
+CREATE SEQUENCE public.ref_branch_level_id_seq
+ INCREMENT 1
+ MINVALUE 1
+ MAXVALUE 9223372036854775807
+ START 1
+ CACHE 1;
+ALTER TABLE public.ref_branch_level_id_seq
+ OWNER TO plgm_service;
+
+CREATE TABLE public.ref_branch_level
+(
+ id integer NOT NULL DEFAULT nextval('ref_branch_level_id_seq'::regclass),
+ name character varying(50) NOT NULL,
+ description character varying(255),
+ fk_ref_branch integer NULL,
+ create_user character varying(100) NOT NULL,
+ create_date timestamp without time zone NOT NULL,
+ mod_user character varying(100),
+ mod_date timestamp without time zone,
+ CONSTRAINT ref_branch_level_pkey PRIMARY KEY (id),
+ CONSTRAINT FK_REF_BRANCH_LEVEL__REF_BRANCH FOREIGN KEY (FK_REF_BRANCH)
+ REFERENCES public.REF_BRANCH (ID) MATCH SIMPLE
+ ON UPDATE NO ACTION ON DELETE NO ACTION
+)
+WITH (
+ OIDS=FALSE
+);
+ALTER TABLE public.ref_branch_level
+ OWNER TO plgm_service;
+GRANT ALL ON TABLE public.ref_branch_level TO plgm_service;
+
+INSERT INTO public.REF_BRANCH_LEVEL(
+ name, description, fk_ref_branch, create_user, create_date, mod_user, mod_date)
+ VALUES ('Strom Level1', 'eine Beschreibung', 1, 'testuser', '12.04.2018', 'testuser', '12.04.2018');
+INSERT INTO public.REF_BRANCH_LEVEL(
+ name, description, fk_ref_branch, create_user, create_date, mod_user, mod_date)
+ VALUES ('Strom Level2', 'eine Beschreibung', 1, 'testuser', '12.04.2018', 'testuser', '12.04.2018');
+INSERT INTO public.REF_BRANCH_LEVEL(
+ name, description, fk_ref_branch, create_user, create_date, mod_user, mod_date)
+ VALUES ('Strom Level3', 'eine Beschreibung', 1, 'testuser', '12.04.2018', 'testuser', '12.04.2018');
+INSERT INTO public.REF_BRANCH_LEVEL(
+ name, description, fk_ref_branch, create_user, create_date, mod_user, mod_date)
+ VALUES ('Gas Level1', 'eine Beschreibung', 2, 'testuser', '12.04.2018', 'testuser', '12.04.2018');
+INSERT INTO public.REF_BRANCH_LEVEL(
+ name, description, fk_ref_branch, create_user, create_date, mod_user, mod_date)
+ VALUES ('Gas Level2', 'noch eine Beschreibung', 2, 'testuser', '12.04.2018', 'testuser', '12.04.2018');
+INSERT INTO public.REF_BRANCH_LEVEL(
+ name, description, fk_ref_branch, create_user, create_date, mod_user, mod_date)
+ VALUES ('Fernwärme Level3', 'und noch eine Beschreibung', 3, 'testuser', '12.04.2018', 'testuser', '12.04.2018');
+
+-- ---------------------------------------------
+-- TABLE REF_GM_STATUS
+-- ---------------------------------------------
+CREATE SEQUENCE public.REF_GM_STATUS_ID_SEQ
+ INCREMENT 1
+ MINVALUE 1
+ MAXVALUE 9223372036854775807
+ START 1
+ CACHE 1;
+
+ALTER TABLE public.REF_GM_STATUS_ID_SEQ
+ OWNER TO PLGM_SERVICE;
+
+CREATE TABLE public.REF_GM_STATUS
+(
+ ID integer NOT NULL DEFAULT nextval('REF_GM_STATUS_ID_SEQ'::regclass),
+ NAME character varying(50) NOT NULL,
+ COLOR_CODE character varying(20),
+ CREATE_USER character varying(100) NOT NULL,
+ CREATE_DATE timestamp without time zone NOT NULL,
+ MOD_USER character varying(100),
+ MOD_DATE timestamp without time zone,
+ CONSTRAINT REF_GM_STATUS_PKEY PRIMARY KEY (id)
+)
+WITH (
+ OIDS=FALSE
+);
+
+ALTER TABLE public.REF_GM_STATUS
+ OWNER TO PLGM_SERVICE;
+GRANT ALL ON TABLE public.REF_GM_STATUS TO PLGM_SERVICE;
+
+INSERT INTO
+ public.REF_GM_STATUS(id, name, create_user, color_code, create_date, mod_user, mod_date)
+VALUES
+ (0,'Neu','system', '#79b61c', '09.04.2018','system','09.04.2018');
+INSERT INTO
+ public.REF_GM_STATUS(id, name, create_user, color_code, create_date, mod_user, mod_date)
+VALUES
+ (1,'Beantragt','system', '#6db12d', '09.04.2018','system','09.04.2018');
+INSERT INTO
+ public.REF_GM_STATUS(id, name, create_user, color_code, create_date, mod_user, mod_date)
+VALUES
+ (2,'Storniert','system', '#990000', '09.04.2018','system','09.04.2018');
+INSERT INTO
+ public.REF_GM_STATUS(id, name, create_user, color_code, create_date, mod_user, mod_date)
+VALUES
+ (3,'Zur Genehmigung','system', '#60ab3f', '09.04.2018','system','09.04.2018');
+INSERT INTO
+ public.REF_GM_STATUS(id, name, create_user, color_code, create_date, mod_user, mod_date)
+VALUES
+ (4,'Genehmigt','system', '#54a650', '09.04.2018','system','09.04.2018');
+INSERT INTO
+ public.REF_GM_STATUS(id, name, create_user, color_code, create_date, mod_user, mod_date)
+VALUES
+ (5,'Angefordert','system', '#379979', '09.04.2018','system','09.04.2018');
+INSERT INTO
+ public.REF_GM_STATUS(id, name, create_user, color_code, create_date, mod_user, mod_date)
+VALUES
+ (6,'Freigegeben','system', '#1c8d9f', '09.04.2018','system','09.04.2018');
+INSERT INTO
+ public.REF_GM_STATUS(id, name, create_user, color_code, create_date, mod_user, mod_date)
+VALUES
+ (7,'Schalten aktiv','system', '#1c8d9f', '09.04.2018','system','09.04.2018');
+INSERT INTO
+ public.REF_GM_STATUS(id, name, create_user, color_code, create_date, mod_user, mod_date)
+VALUES
+ (8,'In Arbeit','system', '#0281c4', '09.04.2018','system','09.04.2018');
+INSERT INTO
+ public.REF_GM_STATUS(id, name, create_user, color_code, create_date, mod_user, mod_date)
+VALUES
+ (9,'Arbeit beendet','system', '#0281c4', '09.04.2018','system','09.04.2018');
+INSERT INTO
+ public.REF_GM_STATUS(id, name, create_user, color_code, create_date, mod_user, mod_date)
+VALUES
+ (10,'Maßnahme beendet','system', '#0281c4', '09.04.2018','system','09.04.2018');
+INSERT INTO
+ public.REF_GM_STATUS(id, name, create_user, color_code, create_date, mod_user, mod_date)
+VALUES
+ (11,'Geschlossen','system', '#0281c4', '09.04.2018','system','09.04.2018');
+INSERT INTO
+ public.REF_GM_STATUS(id, name, create_user, color_code, create_date, mod_user, mod_date)
+VALUES
+ (12,'Abgelehnt','system', '#990000', '17.06.2018','system','17.06.2018');
+
+
+
+-- ---------------------------------------------
+-- TABLE TBL_GRIDMEASURE
+-- ---------------------------------------------
+-- REQUESTER_NAME COLUMN DELETED--
+CREATE SEQUENCE public.TBL_GRIDMEASURE_ID_SEQ
+ INCREMENT 1
+ MINVALUE 1
+ MAXVALUE 9223372036854775807
+ START 1
+ CACHE 1;
+
+ALTER TABLE public.TBL_GRIDMEASURE_ID_SEQ
+ OWNER TO PLGM_SERVICE;
+
+CREATE TABLE public.tbl_gridmeasure
+(
+ id integer NOT NULL DEFAULT nextval('tbl_gridmeasure_id_seq'::regclass),
+ id_descriptive character varying(50),
+ title character varying(256),
+ affected_resource character varying(256),
+ remark character varying(1024),
+ email_addresses character varying(1024),
+ fk_ref_gm_status integer,
+ switching_object character varying(256),
+ cost_center character varying(50),
+ approval_by character varying(256),
+ area_of_switching character varying(256),
+ appointment_repetition character varying(100),
+ appointment_startdate timestamp without time zone,
+ appointment_numberof integer,
+ planned_starttime_first_singlemeasure timestamp without time zone,
+ endtime_gridmeasure timestamp without time zone,
+ time_of_reallocation character varying(100),
+ description character varying(1024),
+ fk_ref_branch integer,
+ fk_ref_branch_level integer,
+ create_user character varying(100) NOT NULL,
+ create_user_department character varying(100),
+ create_date timestamp without time zone NOT NULL,
+ mod_user character varying(100),
+ mod_user_department character varying(100),
+ mod_date timestamp without time zone,
+ CONSTRAINT tbl_gridmeasure_pkey PRIMARY KEY (id),
+ CONSTRAINT fk_gridmeasure__gm_status FOREIGN KEY (fk_ref_gm_status)
+ REFERENCES public.ref_gm_status (id) MATCH SIMPLE
+ ON UPDATE NO ACTION ON DELETE NO ACTION,
+ CONSTRAINT fk_gridmeasure__branch FOREIGN KEY (fk_ref_branch)
+ REFERENCES public.ref_branch (id) MATCH SIMPLE
+ ON UPDATE NO ACTION ON DELETE NO ACTION,
+ CONSTRAINT fk_gridmeasure__branch_level FOREIGN KEY (fk_ref_branch_level)
+ REFERENCES public.ref_branch_level (id) MATCH SIMPLE
+ ON UPDATE NO ACTION ON DELETE NO ACTION
+)
+WITH (
+ OIDS=FALSE
+);
+ALTER TABLE public.tbl_gridmeasure
+ OWNER TO plgm_service;
+GRANT ALL ON TABLE public.tbl_gridmeasure TO plgm_service;
+
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+
+INSERT INTO public.tbl_gridmeasure(
+ id_descriptive, title, affected_resource, remark, email_addresses, fk_ref_gm_status,
+ switching_object, cost_center,
+ approval_by, area_of_switching, appointment_repetition, appointment_startdate,
+ appointment_numberof, planned_starttime_first_singlemeasure,
+ endtime_gridmeasure, time_of_reallocation, description, fk_ref_branch,
+ fk_ref_branch_level, create_user, create_user_department, create_date,
+ mod_user, mod_user_department, mod_date)
+ VALUES ('2018_1', 'Kabel erneuern', 'Kabel', 'Kabel defekt', 'mailingListRecipient@test.de; mailingList2Recipient@test.de', 0,
+ 'Kabel', 'K-155',
+ 'otto', 'Frankfurt', 'einmalig', '2018-06-14 15:15:00',
+ 7, '2018-06-10 16:30:00',
+ '2018-06-18 16:00:00', 'in zwei Tagen', 'Das Kabel austauschen', 1,
+ 1, 'otto', 4, '2018-06-09 15:00:00',
+ 'otto', 3, '2018-06-14 15:15:00');
+
+INSERT INTO public.tbl_gridmeasure(
+ id_descriptive, title, affected_resource, remark, email_addresses, fk_ref_gm_status,
+ switching_object, cost_center,
+ approval_by, area_of_switching, appointment_repetition, appointment_startdate,
+ appointment_numberof, planned_starttime_first_singlemeasure,
+ endtime_gridmeasure, time_of_reallocation, description, fk_ref_branch,
+ fk_ref_branch_level, create_user, create_user_department, create_date,
+ mod_user, mod_user_department, mod_date)
+ VALUES ('2018_2', 'Lampe erneuern', 'Lampe', 'Lampe defekt', 'mailingListRecipient@test.de; mailingList2Recipient@test.de', 1,
+ 'Lampe', 'K-004',
+ 'jasper', 'Mannheim', 'einmalig', '2018-06-16 15:15:00',
+ 3, '2018-06-12 16:30:00',
+ '2018-06-20 16:00:00', 'in zwei Tagen', 'Die Lampe austauschen', 2,
+ 1, 'jasper', 3, '2018-06-11 15:00:00',
+ 'jasper', 4, '2018-06-14 15:15:00');
+
+INSERT INTO public.tbl_gridmeasure(
+ id_descriptive, title, affected_resource, remark, email_addresses, fk_ref_gm_status,
+ switching_object, cost_center,
+ approval_by, area_of_switching, appointment_repetition, appointment_startdate,
+ appointment_numberof, planned_starttime_first_singlemeasure,
+ endtime_gridmeasure, time_of_reallocation, description, fk_ref_branch,
+ fk_ref_branch_level, create_user, create_user_department, create_date,
+ mod_user, mod_user_department, mod_date)
+ VALUES ('2018_3', 'Transformator erneuern', 'Transformator', 'Transformator defekt', 'mailingListRecipient@test.de; mailingList2Recipient@test.de', 2,
+ 'Transformator', 'K-222',
+ 'hugo', 'Murr', 'täglich', '2018-06-17 15:15:00',
+ 6, '2018-06-13 16:30:00',
+ '2018-06-21 16:00:00', 'in 8 Tagen', 'Den Transformator austauschen', 4,
+ 1, 'hugo', 4, '2018-06-12 15:00:00',
+ 'otto', 4, '2018-06-17 15:15:00');
+
+INSERT INTO public.tbl_gridmeasure(
+ id_descriptive, title, affected_resource, remark, email_addresses, fk_ref_gm_status,
+ switching_object, cost_center,
+ approval_by, area_of_switching, appointment_repetition, appointment_startdate,
+ appointment_numberof, planned_starttime_first_singlemeasure,
+ endtime_gridmeasure, time_of_reallocation, description, fk_ref_branch,
+ fk_ref_branch_level, create_user, create_user_department, create_date,
+ mod_user, mod_user_department, mod_date)
+ VALUES ('2018_4', 'Transformator ersetzen', 'Transformator', 'Transformator kaputt', 'mailingListRecipient@test.de; mailingList2Recipient@test.de', 3,
+ 'Transformator', 'K-155',
+ 'otto', 'Stuttgart', 'einmalig', '2018-06-18 15:15:00',
+ 3, '2018-06-14 16:30:00',
+ '2018-06-22 16:00:00', 'in 9 Tagen', 'Den Transformator austauschen', 3,
+ 1, 'otto', 4, '2018-06-13 15:00:00',
+ 'otto', 5, '2018-06-18 15:15:00');
+
+INSERT INTO public.tbl_gridmeasure(
+ id_descriptive, title, affected_resource, remark, email_addresses, fk_ref_gm_status,
+ switching_object, cost_center,
+ approval_by, area_of_switching, appointment_repetition, appointment_startdate,
+ appointment_numberof, planned_starttime_first_singlemeasure,
+ endtime_gridmeasure, time_of_reallocation, description, fk_ref_branch,
+ fk_ref_branch_level, create_user, create_user_department, create_date,
+ mod_user, mod_user_department, mod_date)
+ VALUES ('2018_5', 'Gas Station', 'Station', 'Station defekt', 'mailingListRecipient@test.de; mailingList2Recipient@test.de', 4,
+ 'Station', 'K-004',
+ 'otto', 'Ludwigsburg', 'wöchentlich', '2018-07-14 15:15:00',
+ 1, '2018-07-10 16:30:00',
+ '2018-07-18 16:00:00', 'in zwei Wochen', 'Die Gas Station untersuchen', 2,
+ 1, 'otto', 5, '2018-07-09 15:00:00',
+ 'otto', 3, '2018-07-14 15:15:00');
+
+INSERT INTO public.tbl_gridmeasure(
+ id_descriptive, title, affected_resource, remark, email_addresses, fk_ref_gm_status,
+ switching_object, cost_center,
+ approval_by, area_of_switching, appointment_repetition, appointment_startdate,
+ appointment_numberof, planned_starttime_first_singlemeasure,
+ endtime_gridmeasure, time_of_reallocation, description, fk_ref_branch,
+ fk_ref_branch_level, create_user, create_user_department, create_date,
+ mod_user, mod_user_department, mod_date)
+ VALUES ('2018_6', 'Stuhl mit drei Beinen', 'Stuhl', 'Stuhl kaputt', 'mailingListRecipient@test.de; mailingList2Recipient@test.de', 5,
+ 'Stuhl', 'K-155',
+ 'otto', 'Hamburg', 'einmalig', '2018-06-12 15:15:00',
+ 3, '2018-06-08 16:30:00',
+ '2018-06-16 16:00:00', 'in zwei Tagen', 'Den Stuhl austauschen', 4,
+ 1, 'claudio', 4, '2018-06-07 15:00:00',
+ 'claudio', 3, '2018-06-12 15:15:00');
+
+INSERT INTO public.tbl_gridmeasure(
+ id_descriptive, title, affected_resource, remark, email_addresses, fk_ref_gm_status,
+ switching_object, cost_center,
+ approval_by, area_of_switching, appointment_repetition, appointment_startdate,
+ appointment_numberof, planned_starttime_first_singlemeasure,
+ endtime_gridmeasure, time_of_reallocation, description, fk_ref_branch,
+ fk_ref_branch_level, create_user, create_user_department, create_date,
+ mod_user, mod_user_department, mod_date)
+ VALUES ('2018_7', 'Kabel vergrößern', 'Kabel', 'Kabel zu kurz', 'mailingListRecipient@test.de; mailingList2Recipient@test.de', 6,
+ 'Kabel', 'K-222',
+ 'dagmar', 'Steinheim', 'einmalig', '2018-08-14 15:15:00',
+ 27, '2018-08-10 16:30:00',
+ '2018-08-18 16:00:00', 'in zwei Wochen', 'Das Kabel vergrößern', 3,
+ 1, 'claudio', 3, '2018-08-09 15:00:00',
+ 'bruno', 5, '2018-08-14 15:15:00');
+
+INSERT INTO public.tbl_gridmeasure(
+ id_descriptive, title, affected_resource, remark, email_addresses, fk_ref_gm_status,
+ switching_object, cost_center,
+ approval_by, area_of_switching, appointment_repetition, appointment_startdate,
+ appointment_numberof, planned_starttime_first_singlemeasure,
+ endtime_gridmeasure, time_of_reallocation, description, fk_ref_branch,
+ fk_ref_branch_level, create_user, create_user_department, create_date,
+ mod_user, mod_user_department, mod_date)
+ VALUES ('2018_8', 'Transformator austauschen', 'Transformator', 'Transformator 160 Grads', 'mailingListRecipient@test.de; mailingList2Recipient@test.de', 7,
+ 'Transformator', 'K-155',
+ 'dagmar', 'Murr', 'täglich', '2018-06-14 15:15:00',
+ 6, '2018-06-10 16:30:00',
+ '2018-06-18 16:00:00', 'in zwei Tagen', 'Den Transformator austauschen', 1,
+ 1, 'dagmar', 4, '2018-06-09 15:00:00',
+ 'dagmar', 3, '2018-06-14 15:15:00');
+
+INSERT INTO public.tbl_gridmeasure(
+ id_descriptive, title, affected_resource, remark, email_addresses, fk_ref_gm_status,
+ switching_object, cost_center,
+ approval_by, area_of_switching, appointment_repetition, appointment_startdate,
+ appointment_numberof, planned_starttime_first_singlemeasure,
+ endtime_gridmeasure, time_of_reallocation, description, fk_ref_branch,
+ fk_ref_branch_level, create_user, create_user_department, create_date,
+ mod_user, mod_user_department, mod_date)
+ VALUES ('2018_9', 'Alles kaputt', 'Alles', 'Alles defekt', 'mailingListRecipient@test.de; mailingList2Recipient@test.de', 8,
+ 'Alles', 'K-222',
+ 'otto', 'Berlin', 'einmalig', '2018-06-15 15:15:00',
+ 2, '2018-06-11 16:30:00',
+ '2018-06-19 16:00:00', 'in zwei Jahren', 'Alles wegwerfen', 2,
+ 3, 'bruno', 5, '2018-06-10 15:00:00',
+ 'claudio', 5, '2018-06-15 15:15:00');
+
+INSERT INTO public.tbl_gridmeasure(
+ id_descriptive, title, affected_resource, remark, email_addresses, fk_ref_gm_status,
+ switching_object, cost_center,
+ approval_by, area_of_switching, appointment_repetition, appointment_startdate,
+ appointment_numberof, planned_starttime_first_singlemeasure,
+ endtime_gridmeasure, time_of_reallocation, description, fk_ref_branch,
+ fk_ref_branch_level, create_user, create_user_department, create_date,
+ mod_user, mod_user_department, mod_date)
+ VALUES ('2018_10', 'Schalter erneuern', 'Schalter', 'Schalter defekt', 'mailingListRecipient@test.de; mailingList2Recipient@test.de', 9,
+ 'Schalter', 'K-004',
+ 'hugo', 'Kassel', 'einmalig', '2018-08-14 15:15:00',
+ 9, '2018-08-10 16:30:00',
+ '2018-08-18 16:00:00', 'in 6 Tagen', 'Den Schalter austauschen', 1,
+ 1, 'dagmar', 3, '2018-08-09 15:00:00',
+ 'otto', 3, '2018-08-14 15:15:00');
+
+INSERT INTO public.tbl_gridmeasure(
+ id_descriptive, title, affected_resource, remark, email_addresses, fk_ref_gm_status,
+ switching_object, cost_center,
+ approval_by, area_of_switching, appointment_repetition, appointment_startdate,
+ appointment_numberof, planned_starttime_first_singlemeasure,
+ endtime_gridmeasure, time_of_reallocation, description, fk_ref_branch,
+ fk_ref_branch_level, create_user, create_user_department, create_date,
+ mod_user, mod_user_department, mod_date)
+ VALUES ('2018_11', 'Rechner austauschen', 'Rechner', 'Rechner defekt', 'mailingListRecipient@test.de; mailingList2Recipient@test.de', 10,
+ 'Rechner', 'K-155',
+ 'claudio', 'Murr', 'einmalig', '2018-06-12 15:15:00',
+ 3, '2018-06-08 16:30:00',
+ '2018-06-16 16:00:00', 'in zwei Tagen', 'Den Rechner austauschen', 4,
+ 1, 'hugo', 5, '2018-06-07 15:00:00',
+ 'otto', 3, '2018-06-12 15:15:00');
+
+INSERT INTO public.tbl_gridmeasure(
+ id_descriptive, title, affected_resource, remark, email_addresses, fk_ref_gm_status,
+ switching_object, cost_center,
+ approval_by, area_of_switching, appointment_repetition, appointment_startdate,
+ appointment_numberof, planned_starttime_first_singlemeasure,
+ endtime_gridmeasure, time_of_reallocation, description, fk_ref_branch,
+ fk_ref_branch_level, create_user, create_user_department, create_date,
+ mod_user, mod_user_department, mod_date)
+ VALUES ('2018_12', 'Maschine untersuchen', 'Maschine', 'Maschine defekt', 'mailingListRecipient@test.de; mailingList2Recipient@test.de', 11,
+ 'Maschine', 'K-004',
+ 'otto', 'Ludwigsburg', 'einmalig', '2018-06-20 15:15:00',
+ 5, '2018-06-16 16:30:00',
+ '2018-06-24 16:00:00', 'in 8 Tagen', 'Die Maschine austauschen', 1,
+ 1, 'bruno', 4, '2018-06-15 15:00:00',
+ 'bruno', 3, '2018-06-20 15:15:00');
+
+
+
+
+-- ---------------------------------------------
+-- TABLE TBL_SINGLE_GRIDMEASURE
+-- ---------------------------------------------
+
+CREATE SEQUENCE public.tbl_single_gridmeasure_id_seq
+ INCREMENT 1
+ MINVALUE 1
+ MAXVALUE 9223372036854775807
+ START 1
+ CACHE 1;
+ALTER TABLE public.tbl_single_gridmeasure_id_seq
+ OWNER TO plgm_service;
+
+CREATE TABLE public.tbl_single_gridmeasure
+(
+ id integer NOT NULL DEFAULT nextval('tbl_single_gridmeasure_id_seq'::regclass),
+ sortorder integer NOT NULL,
+ title character varying(256),
+ switching_object character varying(256),
+ cim_id character varying(256),
+ cim_name character varying(256),
+ cim_description character varying(1024),
+ planned_starttime_singlemeasure timestamp without time zone,
+ planned_endtime_singlemeasure timestamp without time zone,
+ description character varying(1024),
+ responsible_onsite_name character varying(256),
+ responsible_onsite_department character varying(256),
+ network_control character varying(256),
+ fk_tbl_gridmeasure integer NOT NULL,
+ create_user character varying(100) NOT NULL,
+ create_date timestamp without time zone NOT NULL,
+ mod_user character varying(100),
+ mod_date timestamp without time zone,
+ CONSTRAINT tbl_single_gridmeasure_pkey PRIMARY KEY (id),
+ CONSTRAINT fk_single_gridmeasure__gridmeasure FOREIGN KEY (fk_tbl_gridmeasure)
+ REFERENCES public.tbl_gridmeasure (id) MATCH SIMPLE
+ ON UPDATE NO ACTION ON DELETE NO ACTION
+)
+WITH (
+ OIDS=FALSE
+);
+ALTER TABLE public.tbl_single_gridmeasure
+ OWNER TO plgm_service;
+GRANT ALL ON TABLE public.tbl_single_gridmeasure TO plgm_service;
+
+
+INSERT INTO public.tbl_single_gridmeasure(
+ sortorder, title, switching_object, cim_id, cim_name, cim_description,
+ planned_starttime_singlemeasure, planned_endtime_singlemeasure,
+ description, fk_tbl_gridmeasure, create_user, create_date, mod_user,
+ mod_date)
+ VALUES (1, 'Lampe ausschalten', 'Lampe', '2', 'cim', 'cim Beschreibung',
+ '2018-06-10 16:30:00', '2018-06-11 14:00:00',
+ 'Beschreibung', 1, 'Otto', '01.07.2018', 'Otto',
+ '01.07.2018');
+INSERT INTO public.tbl_single_gridmeasure(
+ sortorder, title, switching_object, cim_id, cim_name, cim_description,
+ planned_starttime_singlemeasure, planned_endtime_singlemeasure,
+ description, fk_tbl_gridmeasure, create_user, create_date, mod_user,
+ mod_date)
+ VALUES (2, 'Kabel kürzen', 'Kabel', '2', 'cim', 'cim Beschreibung',
+ '2018-06-10 16:30:00', '2018-06-11 14:00:00',
+ 'Beschreibung', 1, 'Otto', '01.07.2018', 'Otto',
+ '01.07.2018');
+INSERT INTO public.tbl_single_gridmeasure(
+ sortorder, title, switching_object, cim_id, cim_name, cim_description,
+ planned_starttime_singlemeasure, planned_endtime_singlemeasure,
+ description, fk_tbl_gridmeasure, create_user, create_date, mod_user,
+ mod_date)
+ VALUES (3, 'Transformator tauschen', 'Transformator', '2', 'cim', 'cim Beschreibung',
+ '2018-06-10 16:30:00', '2018-06-11 14:00:00',
+ 'Beschreibung', 1, 'Otto', '01.07.2018', 'Otto',
+ '01.07.2018');
+
+INSERT INTO public.tbl_single_gridmeasure(
+ sortorder, title, switching_object, cim_id, cim_name, cim_description,
+ planned_starttime_singlemeasure, planned_endtime_singlemeasure,
+ description, fk_tbl_gridmeasure, create_user, create_date, mod_user,
+ mod_date)
+ VALUES (1, 'Lampe erneuern', 'Lampe', '2', 'cim', 'cim Beschreibung',
+ '2018-06-12 16:30:00', '2018-06-13 14:00:00',
+ 'Beschreibung', 2, 'Hugo', '01.07.2018', 'Hugo',
+ '01.07.2018');
+
+INSERT INTO public.tbl_single_gridmeasure(
+ sortorder, title, switching_object, cim_id, cim_name, cim_description,
+ planned_starttime_singlemeasure, planned_endtime_singlemeasure,
+ description, fk_tbl_gridmeasure, create_user, create_date, mod_user,
+ mod_date)
+ VALUES (1, 'Transformator', 'Transformator', '2', 'cim', 'cim Beschreibung',
+ '2018-06-13 16:30:00', '2018-06-14 14:00:00',
+ 'Beschreibung', 3, 'Hugo', '01.07.2018', 'Hugo',
+ '01.07.2018');
+
+INSERT INTO public.tbl_single_gridmeasure(
+ sortorder, title, switching_object, cim_id, cim_name, cim_description,
+ planned_starttime_singlemeasure, planned_endtime_singlemeasure,
+ description, fk_tbl_gridmeasure, create_user, create_date, mod_user,
+ mod_date)
+ VALUES (1, 'Transformator', 'Transformator', '2', 'cim', 'cim Beschreibung',
+ '2018-06-14 16:30:00', '2018-06-15 14:00:00',
+ 'Beschreibung', 4, 'Hugo', '01.07.2018', 'Jasper',
+ '01.07.2018');
+
+INSERT INTO public.tbl_single_gridmeasure(
+ sortorder, title, switching_object, cim_id, cim_name, cim_description,
+ planned_starttime_singlemeasure, planned_endtime_singlemeasure,
+ description, fk_tbl_gridmeasure, create_user, create_date, mod_user,
+ mod_date)
+ VALUES (1, 'Gas', 'Gas', '2', 'cim', 'cim Beschreibung',
+ '2018-07-10 16:30:00', '2018-07-11 14:00:00',
+ 'Beschreibung', 5, 'Jasper', '01.07.2018', 'Jasper',
+ '01.07.2018');
+
+INSERT INTO public.tbl_single_gridmeasure(
+ sortorder, title, switching_object, cim_id, cim_name, cim_description,
+ planned_starttime_singlemeasure, planned_endtime_singlemeasure,
+ description, fk_tbl_gridmeasure, create_user, create_date, mod_user,
+ mod_date)
+ VALUES (2, 'Gas 2', 'Gas', '2', 'cim', 'cim Beschreibung',
+ '2018-07-10 16:30:00', '2018-07-11 14:00:00',
+ 'Beschreibung', 5, 'Jasper', '01.07.2018', 'Jasper',
+ '01.07.2018');
+
+INSERT INTO public.tbl_single_gridmeasure(
+ sortorder, title, switching_object, cim_id, cim_name, cim_description,
+ planned_starttime_singlemeasure, planned_endtime_singlemeasure,
+ description, fk_tbl_gridmeasure, create_user, create_date, mod_user,
+ mod_date)
+ VALUES (1, 'Stuhl', 'Stuhl', '2', 'cim', 'cim Beschreibung',
+ '2018-06-08 16:30:00', '2018-06-09 14:00:00',
+ 'Beschreibung', 6, 'Otto', '01.07.2018', 'Jasper',
+ '01.07.2018');
+
+INSERT INTO public.tbl_single_gridmeasure(
+ sortorder, title, switching_object, cim_id, cim_name, cim_description,
+ planned_starttime_singlemeasure, planned_endtime_singlemeasure,
+ description, fk_tbl_gridmeasure, create_user, create_date, mod_user,
+ mod_date)
+ VALUES (1, 'Kabel', 'Kabel', '2', 'cim', 'cim Beschreibung',
+ '2018-08-10 16:30:00', '2018-08-11 14:00:00',
+ 'Beschreibung', 7, 'Otto', '01.07.2018', 'Hugo',
+ '01.07.2018');
+
+INSERT INTO public.tbl_single_gridmeasure(
+ sortorder, title, switching_object, cim_id, cim_name, cim_description,
+ planned_starttime_singlemeasure, planned_endtime_singlemeasure,
+ description, fk_tbl_gridmeasure, create_user, create_date, mod_user,
+ mod_date)
+ VALUES (1, 'Transformator', 'Transformator', '2', 'cim', 'cim Beschreibung',
+ '2018-06-10 16:30:00', '2018-06-11 14:00:00',
+ 'Beschreibung', 8, 'Hugo', '01.07.2018', 'Jasper',
+ '01.07.2018');
+
+INSERT INTO public.tbl_single_gridmeasure(
+ sortorder, title, switching_object, cim_id, cim_name, cim_description,
+ planned_starttime_singlemeasure, planned_endtime_singlemeasure,
+ description, fk_tbl_gridmeasure, create_user, create_date, mod_user,
+ mod_date)
+ VALUES (2, 'Transformator 2', 'Transformator', '2', 'cim', 'cim Beschreibung',
+ '2018-06-10 16:30:00', '2018-06-11 14:00:00',
+ 'Beschreibung', 8, 'Hugo', '01.07.2018', 'Jasper',
+ '01.07.2018');
+
+INSERT INTO public.tbl_single_gridmeasure(
+ sortorder, title, switching_object, cim_id, cim_name, cim_description,
+ planned_starttime_singlemeasure, planned_endtime_singlemeasure,
+ description, fk_tbl_gridmeasure, create_user, create_date, mod_user,
+ mod_date)
+ VALUES (1, 'Alles', 'Alles', '2', 'cim', 'cim Beschreibung',
+ '2018-06-11 16:30:00', '2018-06-12 14:00:00',
+ 'Beschreibung', 9, 'Otto', '01.07.2018', 'Jasper',
+ '01.07.2018');
+
+INSERT INTO public.tbl_single_gridmeasure(
+ sortorder, title, switching_object, cim_id, cim_name, cim_description,
+ planned_starttime_singlemeasure, planned_endtime_singlemeasure,
+ description, fk_tbl_gridmeasure, create_user, create_date, mod_user,
+ mod_date)
+ VALUES (1, 'Schalter', 'Schalter', '2', 'cim', 'cim Beschreibung',
+ '2018-08-10 16:30:00', '2018-08-11 14:00:00',
+ 'Beschreibung', 10, 'Otto', '01.07.2018', 'Hugo',
+ '01.07.2018');
+
+INSERT INTO public.tbl_single_gridmeasure(
+ sortorder, title, switching_object, cim_id, cim_name, cim_description,
+ planned_starttime_singlemeasure, planned_endtime_singlemeasure,
+ description, fk_tbl_gridmeasure, create_user, create_date, mod_user,
+ mod_date)
+ VALUES (2, 'Schalter 2', 'Schalter', '2', 'cim', 'cim Beschreibung',
+ '2018-08-10 16:30:00', '2018-08-11 14:00:00',
+ 'Beschreibung', 10, 'Otto', '01.07.2018', 'Hugo',
+ '01.07.2018');
+
+INSERT INTO public.tbl_single_gridmeasure(
+ sortorder, title, switching_object, cim_id, cim_name, cim_description,
+ planned_starttime_singlemeasure, planned_endtime_singlemeasure,
+ description, fk_tbl_gridmeasure, create_user, create_date, mod_user,
+ mod_date)
+ VALUES (1, 'Rechner', 'Rechner', '2', 'cim', 'cim Beschreibung',
+ '2018-06-08 16:30:00', '2018-06-09 14:00:00',
+ 'Beschreibung', 11, 'Jasper', '01.07.2018', 'Jasper',
+ '01.07.2018');
+
+INSERT INTO public.tbl_single_gridmeasure(
+ sortorder, title, switching_object, cim_id, cim_name, cim_description,
+ planned_starttime_singlemeasure, planned_endtime_singlemeasure,
+ description, fk_tbl_gridmeasure, create_user, create_date, mod_user,
+ mod_date)
+ VALUES (1, 'Maschine', 'Maschine', '2', 'cim', 'cim Beschreibung',
+ '2018-06-16 16:30:00', '2018-06-17 14:00:00',
+ 'Beschreibung', 12, 'Hugo', '01.07.2018', 'Jasper',
+ '01.07.2018');
+
+
+-- ---------------------------------------------
+-- TABLE TBL_STEPS
+-- ---------------------------------------------
+
+CREATE SEQUENCE public.tbl_steps_id_seq
+ INCREMENT 1
+ MINVALUE 1
+ MAXVALUE 9223372036854775807
+ START 1
+ CACHE 1;
+ALTER TABLE public.tbl_steps_id_seq
+ OWNER TO plgm_service;
+
+CREATE TABLE public.tbl_steps
+(
+ id integer NOT NULL DEFAULT nextval('tbl_steps_id_seq'::regclass),
+ sortorder integer NOT NULL,
+ switching_object character varying(256),
+ type character varying(256),
+ present_time character varying(256),
+ present_state character varying(256),
+ target_state character varying(256),
+ operator character varying(256),
+ fk_tbl_single_gridmeasure integer NOT NULL,
+ create_user character varying(100) NOT NULL,
+ create_date timestamp without time zone NOT NULL,
+ mod_user character varying(100),
+ mod_date timestamp without time zone,
+ CONSTRAINT tbl_steps_pkey PRIMARY KEY (id),
+ CONSTRAINT fk_steps__single_gridmeasure FOREIGN KEY (fk_tbl_single_gridmeasure)
+ REFERENCES public.tbl_single_gridmeasure (id) MATCH SIMPLE
+ ON UPDATE NO ACTION ON DELETE NO ACTION
+)
+WITH (
+ OIDS=FALSE
+);
+ALTER TABLE public.tbl_steps
+ OWNER TO plgm_service;
+GRANT ALL ON TABLE public.tbl_steps TO plgm_service;
+
+
+-- ---------------------------------------------
+-- TABLE REF_VERSION
+-- ---------------------------------------------
+
+DROP TABLE IF EXISTS public.REF_VERSION;
+
+CREATE TABLE public.REF_VERSION
+(
+ id integer NOT NULL,
+ version character varying(100) NOT NULL,
+ CONSTRAINT ref_version_pkey PRIMARY KEY (id)
+)
+WITH (
+ OIDS=FALSE
+);
+ALTER TABLE public.REF_VERSION
+ OWNER TO PLGM_SERVICE;
+GRANT ALL ON TABLE public.REF_VERSION TO PLGM_SERVICE;
+
+INSERT INTO REF_VERSION VALUES (1, '0.0.1_PG');
+
+-- ---------------------------------------------
+-- TABLE TBL_DOCUMENTS
+-- ---------------------------------------------
+
+CREATE SEQUENCE public.tbl_documents_id_seq
+ INCREMENT 1
+ MINVALUE 1
+ MAXVALUE 9223372036854775807
+ START 1
+ CACHE 1;
+ALTER TABLE public.tbl_documents_id_seq
+ OWNER TO plgm_service;
+
+CREATE TABLE public.tbl_documents
+(
+ id integer NOT NULL DEFAULT nextval('tbl_documents_id_seq'::regclass),
+ document_name character varying(260),
+ document bytea,
+ create_user character varying(100) NOT NULL,
+ create_date timestamp without time zone NOT NULL,
+ mod_user character varying(100),
+ mod_date timestamp without time zone,
+ CONSTRAINT tbl_documents_pkey PRIMARY KEY (id)
+)
+WITH (
+ OIDS=FALSE
+);
+ALTER TABLE public.tbl_documents
+ OWNER TO plgm_service;
+GRANT ALL ON TABLE public.tbl_documents TO plgm_service;
+
+
+-- ---------------------------------------------
+-- TABLE TBL_MEASURE_DOCUMENTS
+-- ---------------------------------------------
+
+CREATE SEQUENCE public.tbl_measure_documents_id_seq
+ INCREMENT 1
+ MINVALUE 1
+ MAXVALUE 9223372036854775807
+ START 1
+ CACHE 1;
+ALTER TABLE public.tbl_measure_documents_id_seq
+ OWNER TO plgm_service;
+
+CREATE TABLE public.tbl_measure_documents
+(
+ id integer NOT NULL DEFAULT nextval('tbl_measure_documents_id_seq'::regclass),
+ fk_tbl_measure integer,
+ fk_tbl_documents integer,
+ create_user character varying(100) NOT NULL,
+ create_date timestamp without time zone NOT NULL,
+ mod_user character varying(100),
+ mod_date timestamp without time zone,
+ CONSTRAINT tbl_measure_documents_pkey PRIMARY KEY (id),
+ CONSTRAINT fk_tbl_measure_documents_measure FOREIGN KEY (fk_tbl_measure)
+ REFERENCES public.tbl_gridmeasure (id) MATCH SIMPLE
+ ON UPDATE NO ACTION ON DELETE CASCADE,
+ CONSTRAINT fk_tbl_measure_documents_documents FOREIGN KEY (fk_tbl_documents)
+ REFERENCES public.tbl_documents (id) MATCH SIMPLE
+ ON UPDATE NO ACTION ON DELETE NO ACTION
+)
+WITH (
+ OIDS=FALSE
+);
+ALTER TABLE public.tbl_measure_documents
+ OWNER TO plgm_service;
+GRANT ALL ON TABLE public.tbl_measure_documents TO plgm_service;
+
+
+
+-- ----------------------------------------------------------------------------
+-- ----------------------------------------------------------------------------
+-- HISTORY-TABLES
+-- ----------------------------------------------------------------------------
+-- ----------------------------------------------------------------------------
+
+-- PUBLIC.HREF_TERRITORY Automatic generanted History Table DDL --
+-- <GENERATED CODE!>
+
+DROP TABLE IF EXISTS PUBLIC.HREF_TERRITORY;
+DROP SEQUENCE IF EXISTS PUBLIC.HREF_TERRITORY_ID_SEQ;
+
+CREATE SEQUENCE PUBLIC.HREF_TERRITORY_ID_SEQ
+ INCREMENT 1
+ MINVALUE 1
+ MAXVALUE 9223372036854775807
+ START 1
+ CACHE 1;
+
+ALTER TABLE PUBLIC.HREF_TERRITORY_ID_SEQ
+ OWNER TO PLGM_SERVICE;
+
+CREATE TABLE PUBLIC.HREF_TERRITORY
+(
+ HID integer NOT NULL DEFAULT nextval('HREF_TERRITORY_ID_SEQ'::regclass),
+ HACTION integer NOT NULL,
+ HDATE timestamp without time zone NOT NULL,
+ HUSER character varying(100),
+
+ ID integer,
+ NAME character varying (50),
+ DESCRIPTION character varying (255),
+
+ CREATE_USER character varying(100),
+ CREATE_DATE timestamp without time zone,
+ MOD_USER character varying(100),
+ MOD_DATE timestamp without time zone,
+ CONSTRAINT HREF_TERRITORY_PKEY PRIMARY KEY (HID)
+)
+WITH (
+ OIDS=FALSE
+);
+
+ALTER TABLE PUBLIC.HREF_TERRITORY
+ OWNER TO PLGM_SERVICE;
+GRANT ALL ON TABLE PUBLIC.HREF_TERRITORY TO PLGM_SERVICE;
+
+
+
+-- PUBLIC.HTBL_LOCK Automatic generanted History Table DDL --
+-- <GENERATED CODE!>
+
+DROP TABLE IF EXISTS PUBLIC.HTBL_LOCK;
+DROP SEQUENCE IF EXISTS PUBLIC.HTBL_LOCK_ID_SEQ;
+
+CREATE SEQUENCE PUBLIC.HTBL_LOCK_ID_SEQ
+ INCREMENT 1
+ MINVALUE 1
+ MAXVALUE 9223372036854775807
+ START 1
+ CACHE 1;
+
+ALTER TABLE PUBLIC.HTBL_LOCK_ID_SEQ
+ OWNER TO PLGM_SERVICE;
+
+CREATE TABLE PUBLIC.HTBL_LOCK
+(
+ HID integer NOT NULL DEFAULT nextval('HTBL_LOCK_ID_SEQ'::regclass),
+ HACTION integer NOT NULL,
+ HDATE timestamp without time zone NOT NULL,
+ HUSER character varying(100),
+
+ ID integer,
+ KEY integer,
+ USERNAME character varying (50),
+ INFO character varying (256),
+
+ CREATE_USER character varying(100),
+ CREATE_DATE timestamp without time zone,
+ MOD_USER character varying(100),
+ MOD_DATE timestamp without time zone,
+ CONSTRAINT HTBL_LOCK_PKEY PRIMARY KEY (HID)
+)
+WITH (
+ OIDS=FALSE
+);
+
+ALTER TABLE PUBLIC.HTBL_LOCK
+ OWNER TO PLGM_SERVICE;
+GRANT ALL ON TABLE PUBLIC.HTBL_LOCK TO PLGM_SERVICE;
+
+
+
+
+-- PUBLIC.HTBL_USER_SETTINGS Automatic generanted History Table DDL --
+-- <GENERATED CODE!>
+
+DROP TABLE IF EXISTS PUBLIC.HTBL_USER_SETTINGS;
+DROP SEQUENCE IF EXISTS PUBLIC.HTBL_USER_SETTINGS_ID_SEQ;
+
+CREATE SEQUENCE PUBLIC.HTBL_USER_SETTINGS_ID_SEQ
+ INCREMENT 1
+ MINVALUE 1
+ MAXVALUE 9223372036854775807
+ START 1
+ CACHE 1;
+
+ALTER TABLE PUBLIC.HTBL_USER_SETTINGS_ID_SEQ
+ OWNER TO PLGM_SERVICE;
+
+CREATE TABLE PUBLIC.HTBL_USER_SETTINGS
+(
+ HID integer NOT NULL DEFAULT nextval('HTBL_USER_SETTINGS_ID_SEQ'::regclass),
+ HACTION integer NOT NULL,
+ HDATE timestamp without time zone NOT NULL,
+ HUSER character varying(100),
+
+ ID integer,
+ USERNAME character varying (50),
+ SETTING_TYPE character varying (50),
+ VALUE character varying(4096),
+
+ CREATE_USER character varying(100),
+ CREATE_DATE timestamp without time zone,
+ MOD_USER character varying(100),
+ MOD_DATE timestamp without time zone,
+ CONSTRAINT HTBL_USER_SETTINGS_PKEY PRIMARY KEY (HID)
+)
+WITH (
+ OIDS=FALSE
+);
+
+ALTER TABLE PUBLIC.HTBL_USER_SETTINGS
+ OWNER TO PLGM_SERVICE;
+GRANT ALL ON TABLE PUBLIC.HTBL_USER_SETTINGS TO PLGM_SERVICE;
+
+
+-- PUBLIC.HREF_USER_DEPARTMENT Automatic generanted History Table DDL --
+-- <GENERATED CODE!>
+
+DROP TABLE IF EXISTS PUBLIC.HREF_USER_DEPARTMENT;
+DROP SEQUENCE IF EXISTS PUBLIC.HREF_USER_DEPARTMENT_ID_SEQ;
+
+CREATE SEQUENCE PUBLIC.HREF_USER_DEPARTMENT_ID_SEQ
+ INCREMENT 1
+ MINVALUE 1
+ MAXVALUE 9223372036854775807
+ START 1
+ CACHE 1;
+
+ALTER TABLE PUBLIC.HREF_USER_DEPARTMENT_ID_SEQ
+ OWNER TO PLGM_SERVICE;
+
+CREATE TABLE PUBLIC.HREF_USER_DEPARTMENT
+(
+ HID integer NOT NULL DEFAULT nextval('HREF_USER_DEPARTMENT_ID_SEQ'::regclass),
+ HACTION integer NOT NULL,
+ HDATE timestamp without time zone NOT NULL,
+ HUSER character varying(100),
+
+ ID integer,
+ NAME character varying (50),
+
+ CREATE_USER character varying(100),
+ CREATE_DATE timestamp without time zone,
+ MOD_USER character varying(100),
+ MOD_DATE timestamp without time zone,
+ CONSTRAINT HREF_USER_DEPARTMENT_PKEY PRIMARY KEY (HID)
+)
+WITH (
+ OIDS=FALSE
+);
+
+ALTER TABLE PUBLIC.HREF_USER_DEPARTMENT
+ OWNER TO PLGM_SERVICE;
+GRANT ALL ON TABLE PUBLIC.HREF_USER_DEPARTMENT TO PLGM_SERVICE;
+
+
+-- PUBLIC.HREF_COST_CENTER Automatic generanted History Table DDL --
+-- <GENERATED CODE!>
+
+DROP TABLE IF EXISTS PUBLIC.HREF_COST_CENTER;
+DROP SEQUENCE IF EXISTS PUBLIC.HREF_COST_CENTER_ID_SEQ;
+
+CREATE SEQUENCE PUBLIC.HREF_COST_CENTER_ID_SEQ
+ INCREMENT 1
+ MINVALUE 1
+ MAXVALUE 9223372036854775807
+ START 1
+ CACHE 1;
+
+ALTER TABLE PUBLIC.HREF_COST_CENTER_ID_SEQ
+ OWNER TO PLGM_SERVICE;
+
+CREATE TABLE PUBLIC.HREF_COST_CENTER
+(
+ HID integer NOT NULL DEFAULT nextval('HREF_COST_CENTER_ID_SEQ'::regclass),
+ HACTION integer NOT NULL,
+ HDATE timestamp without time zone NOT NULL,
+ HUSER character varying(100),
+
+ ID integer,
+ NAME character varying (50),
+ DESCRIPTION character varying (255),
+
+ CREATE_USER character varying(100),
+ CREATE_DATE timestamp without time zone,
+ MOD_USER character varying(100),
+ MOD_DATE timestamp without time zone,
+ CONSTRAINT HREF_COST_CENTER_PKEY PRIMARY KEY (HID)
+)
+WITH (
+ OIDS=FALSE
+);
+
+ALTER TABLE PUBLIC.HREF_COST_CENTER
+ OWNER TO PLGM_SERVICE;
+GRANT ALL ON TABLE PUBLIC.HREF_COST_CENTER TO PLGM_SERVICE;
+
+-- PUBLIC.HREF_BRANCH Automatic generanted History Table DDL --
+-- <GENERATED CODE!>
+
+DROP TABLE IF EXISTS PUBLIC.HREF_BRANCH;
+DROP SEQUENCE IF EXISTS PUBLIC.HREF_BRANCH_ID_SEQ;
+
+CREATE SEQUENCE PUBLIC.HREF_BRANCH_ID_SEQ
+ INCREMENT 1
+ MINVALUE 1
+ MAXVALUE 9223372036854775807
+ START 1
+ CACHE 1;
+
+ALTER TABLE PUBLIC.HREF_BRANCH_ID_SEQ
+ OWNER TO PLGM_SERVICE;
+
+CREATE TABLE PUBLIC.HREF_BRANCH
+(
+ HID integer NOT NULL DEFAULT nextval('HREF_BRANCH_ID_SEQ'::regclass),
+ HACTION integer NOT NULL,
+ HDATE timestamp without time zone NOT NULL,
+ HUSER character varying(100),
+
+ ID integer,
+ NAME character varying (50),
+ DESCRIPTION character varying (255),
+ COLOR_CODE character varying (20),
+ CREATE_USER character varying(100),
+ CREATE_DATE timestamp without time zone,
+ MOD_USER character varying(100),
+ MOD_DATE timestamp without time zone,
+ CONSTRAINT HREF_BRANCH_PKEY PRIMARY KEY (HID)
+)
+WITH (
+ OIDS=FALSE
+);
+
+ALTER TABLE PUBLIC.HREF_BRANCH
+ OWNER TO PLGM_SERVICE;
+GRANT ALL ON TABLE PUBLIC.HREF_BRANCH TO PLGM_SERVICE;
+
+-- PUBLIC.HREF_BRANCH_LEVEL Automatic generanted History Table DDL --
+-- <GENERATED CODE!>
+
+DROP TABLE IF EXISTS PUBLIC.HREF_BRANCH_LEVEL;
+DROP SEQUENCE IF EXISTS PUBLIC.HREF_BRANCH_LEVEL_ID_SEQ;
+
+CREATE SEQUENCE PUBLIC.HREF_BRANCH_LEVEL_ID_SEQ
+ INCREMENT 1
+ MINVALUE 1
+ MAXVALUE 9223372036854775807
+ START 1
+ CACHE 1;
+
+ALTER TABLE PUBLIC.HREF_BRANCH_LEVEL_ID_SEQ
+ OWNER TO PLGM_SERVICE;
+
+CREATE TABLE PUBLIC.HREF_BRANCH_LEVEL
+(
+ HID integer NOT NULL DEFAULT nextval('HREF_BRANCH_LEVEL_ID_SEQ'::regclass),
+ HACTION integer NOT NULL,
+ HDATE timestamp without time zone NOT NULL,
+ HUSER character varying(100),
+
+ ID integer,
+ NAME character varying (50),
+ DESCRIPTION character varying (255),
+ FK_REF_BRANCH integer,
+
+ CREATE_USER character varying(100),
+ CREATE_DATE timestamp without time zone,
+ MOD_USER character varying(100),
+ MOD_DATE timestamp without time zone,
+ CONSTRAINT HREF_BRANCH_LEVEL_PKEY PRIMARY KEY (HID)
+)
+WITH (
+ OIDS=FALSE
+);
+
+ALTER TABLE PUBLIC.HREF_BRANCH_LEVEL
+ OWNER TO PLGM_SERVICE;
+GRANT ALL ON TABLE PUBLIC.HREF_BRANCH_LEVEL TO PLGM_SERVICE;
+
+
+-- PUBLIC.HREF_GM_STATUS Automatic generanted History Table DDL --
+-- <GENERATED CODE!>
+
+DROP TABLE IF EXISTS PUBLIC.HREF_GM_STATUS;
+DROP SEQUENCE IF EXISTS PUBLIC.HREF_GM_STATUS_ID_SEQ;
+
+CREATE SEQUENCE PUBLIC.HREF_GM_STATUS_ID_SEQ
+ INCREMENT 1
+ MINVALUE 1
+ MAXVALUE 9223372036854775807
+ START 1
+ CACHE 1;
+
+ALTER TABLE PUBLIC.HREF_GM_STATUS_ID_SEQ
+ OWNER TO PLGM_SERVICE;
+
+CREATE TABLE PUBLIC.HREF_GM_STATUS
+(
+ HID integer NOT NULL DEFAULT nextval('HREF_GM_STATUS_ID_SEQ'::regclass),
+ HACTION integer NOT NULL,
+ HDATE timestamp without time zone NOT NULL,
+ HUSER character varying(100),
+
+ ID integer,
+ NAME character varying(50),
+ COLOR_CODE character varying(20),
+
+ CREATE_USER character varying(100),
+ CREATE_DATE timestamp without time zone,
+ MOD_USER character varying(100),
+ MOD_DATE timestamp without time zone,
+ CONSTRAINT HREF_GM_STATUS_PKEY PRIMARY KEY (HID)
+)
+WITH (
+ OIDS=FALSE
+);
+
+ALTER TABLE PUBLIC.HREF_GM_STATUS
+ OWNER TO PLGM_SERVICE;
+GRANT ALL ON TABLE PUBLIC.HREF_GM_STATUS TO PLGM_SERVICE;
+
+
+-- PUBLIC.HTBL_GRIDMEASURE Automatic generanted History Table DDL --
+-- <GENERATED CODE!>
+
+-- REQUESTER_NAME COLUMN DELETED--
+
+DROP TABLE IF EXISTS PUBLIC.HTBL_GRIDMEASURE;
+DROP SEQUENCE IF EXISTS PUBLIC.HTBL_GRIDMEASURE_ID_SEQ;
+
+CREATE SEQUENCE PUBLIC.HTBL_GRIDMEASURE_ID_SEQ
+ INCREMENT 1
+ MINVALUE 1
+ MAXVALUE 9223372036854775807
+ START 1
+ CACHE 1;
+
+ALTER TABLE PUBLIC.HTBL_GRIDMEASURE_ID_SEQ
+ OWNER TO PLGM_SERVICE;
+
+CREATE TABLE PUBLIC.HTBL_GRIDMEASURE
+(
+ HID integer NOT NULL DEFAULT nextval('HTBL_GRIDMEASURE_ID_SEQ'::regclass),
+ HACTION integer NOT NULL,
+ HDATE timestamp without time zone NOT NULL,
+ HUSER character varying(100),
+
+ ID integer,
+ ID_DESCRIPTIVE character varying (50),
+ TITLE character varying (256),
+ AFFECTED_RESOURCE character varying (256),
+ REMARK character varying (1024),
+ EMAIL_ADDRESSES character varying(1024),
+ FK_REF_GM_STATUS integer,
+ SWITCHING_OBJECT character varying (256),
+ COST_CENTER character varying (50),
+ APPROVAL_BY character varying (256),
+ AREA_OF_SWITCHING character varying (256),
+ APPOINTMENT_REPETITION character varying (100),
+ APPOINTMENT_STARTDATE timestamp without time zone,
+ APPOINTMENT_NUMBEROF integer,
+ PLANNED_STARTTIME_FIRST_SINGLEMEASURE timestamp without time zone,
+ ENDTIME_GRIDMEASURE timestamp without time zone,
+ TIME_OF_REALLOCATION character varying (100),
+ DESCRIPTION character varying (1024),
+ FK_REF_BRANCH integer,
+ FK_REF_BRANCH_LEVEL integer,
+ CREATE_USER_DEPARTMENT character varying (100),
+ MOD_USER_DEPARTMENT character varying (100),
+
+ CREATE_USER character varying(100),
+ CREATE_DATE timestamp without time zone,
+ MOD_USER character varying(100),
+ MOD_DATE timestamp without time zone,
+ CONSTRAINT HTBL_GRIDMEASURE_PKEY PRIMARY KEY (HID)
+)
+WITH (
+ OIDS=FALSE
+);
+
+ALTER TABLE PUBLIC.HTBL_GRIDMEASURE
+ OWNER TO PLGM_SERVICE;
+GRANT ALL ON TABLE PUBLIC.HTBL_GRIDMEASURE TO PLGM_SERVICE;
+
+CREATE INDEX HUSER_INDEX ON PUBLIC.HTBL_GRIDMEASURE (HUSER);
+
+
+INSERT INTO public.htbl_gridmeasure(haction, hdate, huser, id, fk_ref_gm_status, mod_user, mod_date)
+VALUES (2, '2018-06-11 14:00:00', 'otto',12,0, 'admin', '2018-06-11 14:00:00');
+INSERT INTO public.htbl_gridmeasure(haction, hdate, huser, id, fk_ref_gm_status, mod_user, mod_date)
+VALUES (2, '2018-06-11 14:01:00', 'otto',12,1, 'admin', '2018-06-11 14:01:00');
+INSERT INTO public.htbl_gridmeasure(haction, hdate, huser, id, fk_ref_gm_status, mod_user, mod_date)
+VALUES (2, '2018-06-11 14:03:00', 'otto',12,3, 'admin', '2018-06-11 14:03:00');
+INSERT INTO public.htbl_gridmeasure(haction, hdate, huser, id, fk_ref_gm_status, mod_user, mod_date)
+VALUES (2, '2018-06-11 14:04:00', 'otto',12,4, 'admin', '2018-06-11 14:04:00');
+INSERT INTO public.htbl_gridmeasure(haction, hdate, huser, id, fk_ref_gm_status, mod_user, mod_date)
+VALUES (2, '2018-06-11 14:05:00', 'otto',12,5, 'admin', '2018-06-11 14:05:00');
+INSERT INTO public.htbl_gridmeasure(haction, hdate, huser, id, fk_ref_gm_status, mod_user, mod_date)
+VALUES (2, '2018-06-11 14:06:00', 'otto',12,6, 'admin', '2018-06-11 14:06:00');
+INSERT INTO public.htbl_gridmeasure(haction, hdate, huser, id, fk_ref_gm_status, mod_user, mod_date)
+VALUES (2, '2018-06-11 14:07:00', 'otto',12,7, 'admin', '2018-06-11 14:07:00');
+INSERT INTO public.htbl_gridmeasure(haction, hdate, huser, id, fk_ref_gm_status, mod_user, mod_date)
+VALUES (2, '2018-06-11 14:08:00', 'otto',12,8, 'admin', '2018-06-11 14:08:00');
+INSERT INTO public.htbl_gridmeasure(haction, hdate, huser, id, fk_ref_gm_status, mod_user, mod_date)
+VALUES (2, '2018-06-11 14:09:00', 'otto',12,9, 'admin', '2018-06-11 14:09:00');
+INSERT INTO public.htbl_gridmeasure(haction, hdate, huser, id, fk_ref_gm_status, mod_user, mod_date)
+VALUES (2, '2018-06-11 14:10:00', 'otto',12,10, 'admin', '2018-06-11 14:10:00');
+INSERT INTO public.htbl_gridmeasure(haction, hdate, huser, id, fk_ref_gm_status, mod_user, mod_date)
+VALUES (2, '2018-06-11 14:11:00', 'otto',12,11, 'admin', '2018-06-11 14:11:00');
+
+
+INSERT INTO public.htbl_gridmeasure(haction, hdate, huser, id, fk_ref_gm_status, mod_user, mod_date)
+VALUES (2, '2018-07-01 14:55:00', 'admin',13,0, 'admin', '2018-07-01 14:55:00');
+INSERT INTO public.htbl_gridmeasure(haction, hdate, huser, id, fk_ref_gm_status, mod_user, mod_date)
+VALUES (2, '2018-07-01 14:56:00', 'admin',13,1, 'admin', '2018-07-01 14:56:00');
+INSERT INTO public.htbl_gridmeasure(haction, hdate, huser, id, fk_ref_gm_status, mod_user, mod_date)
+VALUES (2, '2018-07-01 14:57:00', 'admin',13,3, 'admin', '2018-07-01 14:57:00');
+INSERT INTO public.htbl_gridmeasure(haction, hdate, huser, id, fk_ref_gm_status, mod_user, mod_date)
+VALUES (2, '2018-07-01 14:57:00', 'admin',13,12, 'admin', '2018-07-01 14:57:00');
+
+
+INSERT INTO public.htbl_gridmeasure(haction, hdate, huser, id, fk_ref_gm_status, mod_user, mod_date)
+VALUES (1, '2018-06-11 14:00:00', 'admin',11,0, 'admin', '2018-06-11 14:00:00');
+INSERT INTO public.htbl_gridmeasure(haction, hdate, huser, id, fk_ref_gm_status, mod_user, mod_date)
+VALUES (1, '2018-06-11 14:01:00', 'admin',11,1, 'admin', '2018-06-11 14:01:00');
+INSERT INTO public.htbl_gridmeasure(haction, hdate, huser, id, fk_ref_gm_status, mod_user, mod_date)
+VALUES (1, '2018-06-11 14:02:00', 'admin',11,3, 'admin', '2018-06-11 14:02:00');
+INSERT INTO public.htbl_gridmeasure(haction, hdate, huser, id, fk_ref_gm_status, mod_user, mod_date)
+VALUES (1, '2018-06-11 14:03:00', 'admin',11,4, 'admin', '2018-06-11 14:03:00');
+INSERT INTO public.htbl_gridmeasure(haction, hdate, huser, id, fk_ref_gm_status, mod_user, mod_date)
+VALUES (1, '2018-06-11 14:04:00', 'admin',11,5, 'admin', '2018-06-11 14:04:00');
+INSERT INTO public.htbl_gridmeasure(haction, hdate, huser, id, fk_ref_gm_status, mod_user, mod_date)
+VALUES (1, '2018-06-11 14:05:00', 'admin',11,6, 'admin', '2018-06-11 14:05:00');
+INSERT INTO public.htbl_gridmeasure(haction, hdate, huser, id, fk_ref_gm_status, mod_user, mod_date)
+VALUES (1, '2018-06-11 14:06:00', 'admin',11,7, 'admin', '2018-06-11 14:06:00');
+INSERT INTO public.htbl_gridmeasure(haction, hdate, huser, id, fk_ref_gm_status, mod_user, mod_date)
+VALUES (1, '2018-06-11 14:07:00', 'admin',11,8, 'admin', '2018-06-11 14:07:00');
+INSERT INTO public.htbl_gridmeasure(haction, hdate, huser, id, fk_ref_gm_status, mod_user, mod_date)
+VALUES (1, '2018-06-11 14:08:00', 'admin',11,9, 'admin', '2018-06-11 14:08:00');
+INSERT INTO public.htbl_gridmeasure(haction, hdate, huser, id, fk_ref_gm_status, mod_user, mod_date)
+VALUES (1, '2018-06-11 14:09:00', 'admin',11,10, 'admin', '2018-06-11 14:09:00');
+
+
+INSERT INTO public.htbl_gridmeasure(haction, hdate, huser, id, fk_ref_gm_status, mod_user, mod_date)
+VALUES (2, '2018-06-11 14:00:00', 'admin',10,0, 'admin', '2018-06-11 14:00:00');
+INSERT INTO public.htbl_gridmeasure(haction, hdate, huser, id, fk_ref_gm_status, mod_user, mod_date)
+VALUES (2, '2018-06-11 14:01:00', 'admin',10,1, 'admin', '2018-06-11 14:01:00');
+INSERT INTO public.htbl_gridmeasure(haction, hdate, huser, id, fk_ref_gm_status, mod_user, mod_date)
+VALUES (2, '2018-06-11 14:02:00', 'admin',10,3, 'admin', '2018-06-11 14:02:00');
+INSERT INTO public.htbl_gridmeasure(haction, hdate, huser, id, fk_ref_gm_status, mod_user, mod_date)
+VALUES (2, '2018-06-11 14:03:00', 'admin',10,4, 'admin', '2018-06-11 14:03:00');
+INSERT INTO public.htbl_gridmeasure(haction, hdate, huser, id, fk_ref_gm_status, mod_user, mod_date)
+VALUES (2, '2018-06-11 14:04:00', 'admin',10,5, 'admin', '2018-06-11 14:04:00');
+INSERT INTO public.htbl_gridmeasure(haction, hdate, huser, id, fk_ref_gm_status, mod_user, mod_date)
+VALUES (2, '2018-06-11 14:05:00', 'admin',10,6, 'admin', '2018-06-11 14:05:00');
+INSERT INTO public.htbl_gridmeasure(haction, hdate, huser, id, fk_ref_gm_status, mod_user, mod_date)
+VALUES (2, '2018-06-11 14:06:00', 'admin',10,7, 'admin', '2018-06-11 14:06:00');
+INSERT INTO public.htbl_gridmeasure(haction, hdate, huser, id, fk_ref_gm_status, mod_user, mod_date)
+VALUES (2, '2018-06-11 14:07:00', 'admin',10,8, 'admin', '2018-06-11 14:07:00');
+INSERT INTO public.htbl_gridmeasure(haction, hdate, huser, id, fk_ref_gm_status, mod_user, mod_date)
+VALUES (2, '2018-06-11 14:08:00', 'admin',10,9, 'admin', '2018-06-11 14:08:00');
+
+
+INSERT INTO public.htbl_gridmeasure(haction, hdate, huser, id, fk_ref_gm_status, mod_user, mod_date)
+VALUES (2, '2018-06-11 14:00:00', 'admin',9,0, 'admin', '2018-06-11 14:00:00');
+INSERT INTO public.htbl_gridmeasure(haction, hdate, huser, id, fk_ref_gm_status, mod_user, mod_date)
+VALUES (2, '2018-06-11 14:01:00', 'admin',9,1, 'admin', '2018-06-11 14:01:00');
+INSERT INTO public.htbl_gridmeasure(haction, hdate, huser, id, fk_ref_gm_status, mod_user, mod_date)
+VALUES (2, '2018-06-11 14:02:00', 'admin',9,3, 'admin', '2018-06-11 14:02:00');
+INSERT INTO public.htbl_gridmeasure(haction, hdate, huser, id, fk_ref_gm_status, mod_user, mod_date)
+VALUES (2, '2018-06-11 14:03:00', 'admin',9,4, 'admin', '2018-06-11 14:03:00');
+INSERT INTO public.htbl_gridmeasure(haction, hdate, huser, id, fk_ref_gm_status, mod_user, mod_date)
+VALUES (2, '2018-06-11 14:04:00', 'admin',9,5, 'admin', '2018-06-11 14:04:00');
+INSERT INTO public.htbl_gridmeasure(haction, hdate, huser, id, fk_ref_gm_status, mod_user, mod_date)
+VALUES (2, '2018-06-11 14:05:00', 'admin',9,6, 'admin', '2018-06-11 14:05:00');
+INSERT INTO public.htbl_gridmeasure(haction, hdate, huser, id, fk_ref_gm_status, mod_user, mod_date)
+VALUES (2, '2018-06-11 14:06:00', 'admin',9,7, 'admin', '2018-06-11 14:06:00');
+INSERT INTO public.htbl_gridmeasure(haction, hdate, huser, id, fk_ref_gm_status, mod_user, mod_date)
+VALUES (2, '2018-06-11 14:07:00', 'admin',9,8, 'admin', '2018-06-11 14:07:00');
+
+
+INSERT INTO public.htbl_gridmeasure(haction, hdate, huser, id, fk_ref_gm_status, mod_user, mod_date)
+VALUES (2, '2018-06-11 14:00:00', 'admin',8,0, 'admin', '2018-06-11 14:00:00');
+INSERT INTO public.htbl_gridmeasure(haction, hdate, huser, id, fk_ref_gm_status, mod_user, mod_date)
+VALUES (2, '2018-06-11 14:01:00', 'admin',8,1, 'admin', '2018-06-11 14:01:00');
+INSERT INTO public.htbl_gridmeasure(haction, hdate, huser, id, fk_ref_gm_status, mod_user, mod_date)
+VALUES (2, '2018-06-11 14:02:00', 'admin',8,3, 'admin', '2018-06-11 14:02:00');
+INSERT INTO public.htbl_gridmeasure(haction, hdate, huser, id, fk_ref_gm_status, mod_user, mod_date)
+VALUES (2, '2018-06-11 14:03:00', 'admin',8,4, 'admin', '2018-06-11 14:03:00');
+INSERT INTO public.htbl_gridmeasure(haction, hdate, huser, id, fk_ref_gm_status, mod_user, mod_date)
+VALUES (2, '2018-06-11 14:04:00', 'admin',8,5, 'admin', '2018-06-11 14:04:00');
+INSERT INTO public.htbl_gridmeasure(haction, hdate, huser, id, fk_ref_gm_status, mod_user, mod_date)
+VALUES (2, '2018-06-11 14:05:00', 'admin',8,6, 'admin', '2018-06-11 14:05:00');
+INSERT INTO public.htbl_gridmeasure(haction, hdate, huser, id, fk_ref_gm_status, mod_user, mod_date)
+VALUES (2, '2018-06-11 14:06:00', 'admin',8,7, 'admin', '2018-06-11 14:06:00');
+
+
+INSERT INTO public.htbl_gridmeasure(haction, hdate, huser, id, fk_ref_gm_status, mod_user, mod_date)
+VALUES (2, '2018-06-11 14:00:00', 'admin',7,0, 'admin', '2018-06-11 14:00:00');
+INSERT INTO public.htbl_gridmeasure(haction, hdate, huser, id, fk_ref_gm_status, mod_user, mod_date)
+VALUES (2, '2018-06-11 14:01:00', 'admin',7,1, 'admin', '2018-06-11 14:01:00');
+INSERT INTO public.htbl_gridmeasure(haction, hdate, huser, id, fk_ref_gm_status, mod_user, mod_date)
+VALUES (2, '2018-06-11 14:02:00', 'admin',7,3, 'admin', '2018-06-11 14:02:00');
+INSERT INTO public.htbl_gridmeasure(haction, hdate, huser, id, fk_ref_gm_status, mod_user, mod_date)
+VALUES (2, '2018-06-11 14:03:00', 'admin',7,4, 'admin', '2018-06-11 14:03:00');
+INSERT INTO public.htbl_gridmeasure(haction, hdate, huser, id, fk_ref_gm_status, mod_user, mod_date)
+VALUES (2, '2018-06-11 14:04:00', 'admin',7,5, 'admin', '2018-06-11 14:04:00');
+INSERT INTO public.htbl_gridmeasure(haction, hdate, huser, id, fk_ref_gm_status, mod_user, mod_date)
+VALUES (2, '2018-06-11 14:05:00', 'admin',7,6, 'admin', '2018-06-11 14:05:00');
+
+
+INSERT INTO public.htbl_gridmeasure(haction, hdate, huser, id, fk_ref_gm_status, mod_user, mod_date)
+VALUES (2, '2018-06-11 14:00:00', 'admin',6,0, 'admin', '2018-06-11 14:00:00');
+INSERT INTO public.htbl_gridmeasure(haction, hdate, huser, id, fk_ref_gm_status, mod_user, mod_date)
+VALUES (2, '2018-06-11 14:01:00', 'admin',6,1, 'admin', '2018-06-11 14:01:00');
+INSERT INTO public.htbl_gridmeasure(haction, hdate, huser, id, fk_ref_gm_status, mod_user, mod_date)
+VALUES (2, '2018-06-11 14:02:00', 'admin',6,3, 'admin', '2018-06-11 14:02:00');
+INSERT INTO public.htbl_gridmeasure(haction, hdate, huser, id, fk_ref_gm_status, mod_user, mod_date)
+VALUES (2, '2018-06-11 14:03:00', 'admin',6,4, 'admin', '2018-06-11 14:03:00');
+INSERT INTO public.htbl_gridmeasure(haction, hdate, huser, id, fk_ref_gm_status, mod_user, mod_date)
+VALUES (2, '2018-06-11 14:04:00', 'admin',6,5, 'admin', '2018-06-11 14:04:00');
+
+
+INSERT INTO public.htbl_gridmeasure(haction, hdate, huser, id, fk_ref_gm_status, mod_user, mod_date)
+VALUES (2, '2018-06-11 14:00:00', 'admin',5,0, 'admin', '2018-06-11 14:00:00');
+INSERT INTO public.htbl_gridmeasure(haction, hdate, huser, id, fk_ref_gm_status, mod_user, mod_date)
+VALUES (2, '2018-06-11 14:01:00', 'admin',5,1, 'admin', '2018-06-11 14:01:00');
+INSERT INTO public.htbl_gridmeasure(haction, hdate, huser, id, fk_ref_gm_status, mod_user, mod_date)
+VALUES (2, '2018-06-11 14:02:00', 'admin',5,3, 'admin', '2018-06-11 14:02:00');
+INSERT INTO public.htbl_gridmeasure(haction, hdate, huser, id, fk_ref_gm_status, mod_user, mod_date)
+VALUES (2, '2018-06-11 14:03:00', 'admin',5,4, 'admin', '2018-06-11 14:03:00');
+
+
+INSERT INTO public.htbl_gridmeasure(haction, hdate, huser, id, fk_ref_gm_status, mod_user, mod_date)
+VALUES (2, '2018-06-11 14:00:00', 'admin',4,0, 'admin', '2018-06-11 14:00:00');
+INSERT INTO public.htbl_gridmeasure(haction, hdate, huser, id, fk_ref_gm_status, mod_user, mod_date)
+VALUES (2, '2018-06-11 14:01:00', 'admin',4,1, 'admin', '2018-06-11 14:01:00');
+INSERT INTO public.htbl_gridmeasure(haction, hdate, huser, id, fk_ref_gm_status, mod_user, mod_date)
+VALUES (2, '2018-06-11 14:02:00', 'admin',4,3, 'admin', '2018-06-11 14:02:00');
+
+
+INSERT INTO public.htbl_gridmeasure(haction, hdate, huser, id, fk_ref_gm_status, mod_user, mod_date)
+VALUES (2, '2018-06-11 14:00:00', 'admin',3,0, 'admin', '2018-06-11 14:00:00');
+INSERT INTO public.htbl_gridmeasure(haction, hdate, huser, id, fk_ref_gm_status, mod_user, mod_date)
+VALUES (2, '2018-06-11 14:01:00', 'admin',3,1, 'admin', '2018-06-11 14:01:00');
+INSERT INTO public.htbl_gridmeasure(haction, hdate, huser, id, fk_ref_gm_status, mod_user, mod_date)
+VALUES (2, '2018-06-11 14:02:00', 'admin',3,3, 'admin', '2018-06-11 14:02:00');
+INSERT INTO public.htbl_gridmeasure(haction, hdate, huser, id, fk_ref_gm_status, mod_user, mod_date)
+VALUES (2, '2018-06-11 14:03:00', 'admin',3,2, 'admin', '2018-06-11 14:03:00');
+
+
+INSERT INTO public.htbl_gridmeasure(haction, hdate, huser, id, fk_ref_gm_status, mod_user, mod_date)
+VALUES (2, '2018-06-11 14:00:00', 'admin',2,0, 'jasper', '2018-06-11 14:00:00');
+INSERT INTO public.htbl_gridmeasure(haction, hdate, huser, id, fk_ref_gm_status, mod_user, mod_date)
+VALUES (2, '2018-06-11 14:01:00', 'admin',2,1, 'jasper', '2018-06-11 14:01:00');
+
+
+INSERT INTO public.htbl_gridmeasure(haction, hdate, huser, id, fk_ref_gm_status, mod_user, mod_date)
+VALUES (2, '2018-06-11 14:01:00', 'admin',1,0, 'otto', '2018-06-11 14:01:00');
+
+-- PUBLIC.HTBL_ID_COUNTER Automatic generanted History Table DDL --
+-- <GENERATED CODE!>
+
+DROP TABLE IF EXISTS PUBLIC.HTBL_ID_COUNTER;
+DROP SEQUENCE IF EXISTS PUBLIC.HTBL_ID_COUNTER_ID_SEQ;
+
+CREATE SEQUENCE PUBLIC.HTBL_ID_COUNTER_ID_SEQ
+ INCREMENT 1
+ MINVALUE 1
+ MAXVALUE 9223372036854775807
+ START 1
+ CACHE 1;
+
+ALTER TABLE PUBLIC.HTBL_ID_COUNTER_ID_SEQ
+ OWNER TO PLGM_SERVICE;
+
+CREATE TABLE PUBLIC.HTBL_ID_COUNTER
+(
+ HID integer NOT NULL DEFAULT nextval('HTBL_ID_COUNTER_ID_SEQ'::regclass),
+ HACTION integer NOT NULL,
+ HDATE timestamp without time zone NOT NULL,
+ HUSER character varying(100),
+
+ ID integer,
+ COUNTER integer,
+ COUNTER_TYPE character varying (256),
+ INFO character varying (256),
+
+ CREATE_USER character varying(100),
+ CREATE_DATE timestamp without time zone,
+ MOD_USER character varying(100),
+ MOD_DATE timestamp without time zone,
+ CONSTRAINT HTBL_ID_COUNTER_PKEY PRIMARY KEY (HID)
+)
+WITH (
+ OIDS=FALSE
+);
+
+ALTER TABLE PUBLIC.HTBL_ID_COUNTER
+ OWNER TO PLGM_SERVICE;
+GRANT ALL ON TABLE PUBLIC.HTBL_ID_COUNTER TO PLGM_SERVICE;
+
+
+
+-- PUBLIC.HTBL_SINGLE_GRIDMEASURE Automatic generanted History Table DDL --
+-- <GENERATED CODE!>
+
+DROP TABLE IF EXISTS PUBLIC.HTBL_SINGLE_GRIDMEASURE;
+DROP SEQUENCE IF EXISTS PUBLIC.HTBL_SINGLE_GRIDMEASURE_ID_SEQ;
+
+CREATE SEQUENCE PUBLIC.HTBL_SINGLE_GRIDMEASURE_ID_SEQ
+ INCREMENT 1
+ MINVALUE 1
+ MAXVALUE 9223372036854775807
+ START 1
+ CACHE 1;
+
+ALTER TABLE PUBLIC.HTBL_SINGLE_GRIDMEASURE_ID_SEQ
+ OWNER TO PLGM_SERVICE;
+
+
+
+CREATE TABLE PUBLIC.HTBL_SINGLE_GRIDMEASURE
+(
+ HID integer NOT NULL DEFAULT nextval('HTBL_SINGLE_GRIDMEASURE_ID_SEQ'::regclass),
+ HACTION integer NOT NULL,
+ HDATE timestamp without time zone NOT NULL,
+ HUSER character varying(100),
+
+ ID integer,
+ SORTORDER integer,
+ TITLE character varying (256),
+ SWITCHING_OBJECT character varying (256),
+ CIM_ID character varying (256),
+ CIM_NAME character varying (256),
+ CIM_DESCRIPTION character varying (1024),
+ RESPONSIBLE_ONSITE_NAME character varying(256),
+ RESPONSIBLE_ONSITE_DEPARTMENT character varying(256),
+ NETWORK_CONTROL character varying (256),
+ PLANNED_STARTTIME_SINGLEMEASURE timestamp without time zone,
+ PLANNED_ENDTIME_SINGLEMEASURE timestamp without time zone,
+ DESCRIPTION character varying (1024),
+ FK_TBL_GRIDMEASURE integer,
+
+ CREATE_USER character varying(100),
+ CREATE_DATE timestamp without time zone,
+ MOD_USER character varying(100),
+ MOD_DATE timestamp without time zone,
+ CONSTRAINT HTBL_SINGLE_GRIDMEASURE_PKEY PRIMARY KEY (HID)
+)
+WITH (
+ OIDS=FALSE
+);
+
+ALTER TABLE PUBLIC.HTBL_SINGLE_GRIDMEASURE
+ OWNER TO PLGM_SERVICE;
+GRANT ALL ON TABLE PUBLIC.HTBL_SINGLE_GRIDMEASURE TO PLGM_SERVICE;
+
+
+
+
+-- PUBLIC.HTBL_STEPS Automatic generanted History Table DDL --
+-- <GENERATED CODE!>
+
+DROP TABLE IF EXISTS PUBLIC.HTBL_STEPS;
+DROP SEQUENCE IF EXISTS PUBLIC.HTBL_STEPS_ID_SEQ;
+
+CREATE SEQUENCE PUBLIC.HTBL_STEPS_ID_SEQ
+ INCREMENT 1
+ MINVALUE 1
+ MAXVALUE 9223372036854775807
+ START 1
+ CACHE 1;
+
+ALTER TABLE PUBLIC.HTBL_STEPS_ID_SEQ
+ OWNER TO PLGM_SERVICE;
+
+CREATE TABLE PUBLIC.HTBL_STEPS
+(
+ HID integer NOT NULL DEFAULT nextval('HTBL_STEPS_ID_SEQ'::regclass),
+ HACTION integer NOT NULL,
+ HDATE timestamp without time zone NOT NULL,
+ HUSER character varying(100),
+
+ ID integer,
+ SORTORDER integer,
+ SWITCHING_OBJECT character varying (256),
+ TYPE character varying(256),
+ PRESENT_TIME character varying(256),
+ PRESENT_STATE character varying(256),
+ TARGET_STATE character varying (256),
+ OPERATOR character varying(256),
+ FK_TBL_SINGLE_GRIDMEASURE integer,
+ CREATE_USER character varying (100),
+ CREATE_DATE timestamp without time zone,
+ MOD_USER character varying (100),
+ MOD_DATE timestamp without time zone,
+
+ CONSTRAINT HTBL_STEPS_PKEY PRIMARY KEY (HID)
+)
+WITH (
+ OIDS=FALSE
+);
+
+ALTER TABLE PUBLIC.HTBL_STEPS
+ OWNER TO PLGM_SERVICE;
+GRANT ALL ON TABLE PUBLIC.HTBL_STEPS TO PLGM_SERVICE;
+
+
+-- PUBLIC.HTBL_DOCUMENTS Automatic generanted History Table DDL --
+-- <GENERATED CODE!>
+
+DROP TABLE IF EXISTS PUBLIC.HTBL_DOCUMENTS;
+DROP SEQUENCE IF EXISTS PUBLIC.HTBL_DOCUMENTS_ID_SEQ;
+
+CREATE SEQUENCE PUBLIC.HTBL_DOCUMENTS_ID_SEQ
+ INCREMENT 1
+ MINVALUE 1
+ MAXVALUE 9223372036854775807
+ START 1
+ CACHE 1;
+
+ALTER TABLE PUBLIC.HTBL_DOCUMENTS_ID_SEQ
+ OWNER TO PLGM_SERVICE;
+
+CREATE TABLE PUBLIC.HTBL_DOCUMENTS
+(
+ HID integer NOT NULL DEFAULT nextval('HTBL_DOCUMENTS_ID_SEQ'::regclass),
+ HACTION integer NOT NULL,
+ HDATE timestamp without time zone NOT NULL,
+ HUSER character varying(100),
+
+ ID integer,
+ DOCUMENT_NAME character varying (260),
+ DOCUMENT bytea,
+
+ CREATE_USER character varying(100),
+ CREATE_DATE timestamp without time zone,
+ MOD_USER character varying(100),
+ MOD_DATE timestamp without time zone,
+ CONSTRAINT HTBL_DOCUMENTS_PKEY PRIMARY KEY (HID)
+)
+WITH (
+ OIDS=FALSE
+);
+
+ALTER TABLE PUBLIC.HTBL_DOCUMENTS
+ OWNER TO PLGM_SERVICE;
+GRANT ALL ON TABLE PUBLIC.HTBL_DOCUMENTS TO PLGM_SERVICE;
+
+-- PUBLIC.HTBL_MEASURE_DOCUMENTS Automatic generanted History Table DDL --
+-- <GENERATED CODE!>
+
+DROP TABLE IF EXISTS PUBLIC.HTBL_MEASURE_DOCUMENTS;
+DROP SEQUENCE IF EXISTS PUBLIC.HTBL_MEASURE_DOCUMENTS_ID_SEQ;
+
+CREATE SEQUENCE PUBLIC.HTBL_MEASURE_DOCUMENTS_ID_SEQ
+ INCREMENT 1
+ MINVALUE 1
+ MAXVALUE 9223372036854775807
+ START 1
+ CACHE 1;
+
+ALTER TABLE PUBLIC.HTBL_MEASURE_DOCUMENTS_ID_SEQ
+ OWNER TO PLGM_SERVICE;
+
+CREATE TABLE PUBLIC.HTBL_MEASURE_DOCUMENTS
+(
+ HID integer NOT NULL DEFAULT nextval('HTBL_MEASURE_DOCUMENTS_ID_SEQ'::regclass),
+ HACTION integer NOT NULL,
+ HDATE timestamp without time zone NOT NULL,
+ HUSER character varying(100),
+
+ ID integer,
+ FK_TBL_MEASURE integer,
+ FK_TBL_DOCUMENTS integer,
+
+ CREATE_USER character varying(100),
+ CREATE_DATE timestamp without time zone,
+ MOD_USER character varying(100),
+ MOD_DATE timestamp without time zone,
+ CONSTRAINT HTBL_MEASURE_DOCUMENTS_PKEY PRIMARY KEY (HID)
+)
+WITH (
+ OIDS=FALSE
+);
+
+ALTER TABLE PUBLIC.HTBL_MEASURE_DOCUMENTS
+ OWNER TO PLGM_SERVICE;
+GRANT ALL ON TABLE PUBLIC.HTBL_MEASURE_DOCUMENTS TO PLGM_SERVICE;
+
+-- ----------------------------------------------------------------------------
+-- ----------------------------------------------------------------------------
+-- TRIGGER
+-- ----------------------------------------------------------------------------
+-- ----------------------------------------------------------------------------
+
+-- ---------------------------------------------
+-- TRIGGER REF_TERRITORY
+-- ---------------------------------------------
+
+
+-- PUBLIC.REF_TERRITORY INSERT TRIGGER --
+-- <GENERATED CODE!>
+CREATE OR REPLACE FUNCTION PUBLIC.REF_TERRITORY_INSERT_TRG()
+ RETURNS trigger AS
+$BODY$
+ BEGIN
+ INSERT INTO HREF_TERRITORY (
+ ID,NAME,DESCRIPTION,CREATE_USER,CREATE_DATE,MOD_USER,MOD_DATE,
+
+ HACTION,
+ HDATE,
+ HUSER
+ )
+ VALUES (
+
+ NEW.ID,NEW.NAME,NEW.DESCRIPTION,NEW.CREATE_USER,NEW.CREATE_DATE,NEW.MOD_USER,NEW.MOD_DATE,
+
+ 1,
+ current_timestamp,
+ NEW.CREATE_USER );
+
+ RETURN NEW;
+ END;
+$BODY$
+ LANGUAGE plpgsql VOLATILE
+ COST 100;
+ALTER FUNCTION PUBLIC.REF_TERRITORY_INSERT_TRG()
+ OWNER TO PLGM_SERVICE;
+
+
+DROP TRIGGER IF EXISTS REF_TERRITORY_INSERT_TRG ON PUBLIC.REF_TERRITORY;
+
+CREATE TRIGGER REF_TERRITORY_INSERT_TRG
+ BEFORE INSERT
+ ON PUBLIC.REF_TERRITORY
+ FOR EACH ROW
+ EXECUTE PROCEDURE PUBLIC.REF_TERRITORY_INSERT_TRG();
+
+
+
+-- PUBLIC.REF_TERRITORY UPDATE TRIGGER --
+-- <GENERATED CODE!>
+
+CREATE OR REPLACE FUNCTION PUBLIC.REF_TERRITORY_UPDATE_TRG()
+ RETURNS trigger AS
+$BODY$
+ BEGIN
+ INSERT INTO HREF_TERRITORY (
+ ID,NAME,DESCRIPTION,CREATE_USER,CREATE_DATE,MOD_USER,MOD_DATE,
+
+ HACTION,
+ HDATE,
+ HUSER
+ )
+ VALUES (
+ NEW.ID,NEW.NAME,NEW.DESCRIPTION,NEW.CREATE_USER,NEW.CREATE_DATE,NEW.MOD_USER,NEW.MOD_DATE,
+ 2,
+ current_timestamp,
+ NEW.MOD_USER
+ );
+
+ RETURN NEW;
+ END;
+$BODY$
+ LANGUAGE plpgsql VOLATILE
+ COST 100;
+ALTER FUNCTION PUBLIC.REF_TERRITORY_UPDATE_TRG()
+ OWNER TO PLGM_SERVICE;
+
+DROP TRIGGER IF EXISTS REF_TERRITORY_UPDATE_TRG ON PUBLIC.REF_TERRITORY;
+
+CREATE TRIGGER REF_TERRITORY_UPDATE_TRG
+ BEFORE UPDATE
+ ON PUBLIC.REF_TERRITORY
+ FOR EACH ROW
+ EXECUTE PROCEDURE PUBLIC.REF_TERRITORY_UPDATE_TRG();
+
+
+
+-- PUBLIC.REF_TERRITORY DELETE TRIGGER --
+-- <GENERATED CODE!>
+
+CREATE OR REPLACE FUNCTION PUBLIC.REF_TERRITORY_DELETE_TRG()
+ RETURNS trigger AS
+$BODY$
+ BEGIN
+ IF TG_OP = 'DELETE' THEN
+ INSERT INTO HREF_TERRITORY (
+
+ ID,NAME,DESCRIPTION,CREATE_USER,CREATE_DATE,MOD_USER,MOD_DATE,
+
+ HACTION,
+ HDATE,
+ HUSER
+ )
+ VALUES (
+ OLD.ID,OLD.NAME,OLD.DESCRIPTION,OLD.CREATE_USER,OLD.CREATE_DATE,OLD.MOD_USER,OLD.MOD_DATE,
+
+ 3,
+ current_timestamp,
+ OLD.MOD_USER );
+ END IF;
+
+ RETURN OLD;
+ END;
+$BODY$
+ LANGUAGE plpgsql VOLATILE
+ COST 100;
+ALTER FUNCTION PUBLIC.REF_TERRITORY_DELETE_TRG()
+ OWNER TO PLGM_SERVICE;
+
+DROP TRIGGER IF EXISTS REF_TERRITORY_DELETE_TRG ON PUBLIC.REF_TERRITORY;
+
+CREATE TRIGGER REF_TERRITORY_DELETE_TRG
+ BEFORE DELETE
+ ON PUBLIC.REF_TERRITORY
+ FOR EACH ROW
+ EXECUTE PROCEDURE PUBLIC.REF_TERRITORY_DELETE_TRG();
+
+
+
+-- PUBLIC.TBL_ID_COUNTER INSERT TRIGGER --
+-- <GENERATED CODE!>
+CREATE OR REPLACE FUNCTION PUBLIC.TBL_ID_COUNTER_INSERT_TRG()
+ RETURNS trigger AS
+$BODY$
+ BEGIN
+ INSERT INTO HTBL_ID_COUNTER (
+ ID,COUNTER,COUNTER_TYPE,INFO,CREATE_USER,CREATE_DATE,MOD_USER,MOD_DATE,
+
+ HACTION,
+ HDATE,
+ HUSER
+ )
+ VALUES (
+
+ NEW.ID,NEW.COUNTER,NEW.COUNTER_TYPE,NEW.INFO,NEW.CREATE_USER,NEW.CREATE_DATE,NEW.MOD_USER,NEW.MOD_DATE,
+
+ 1,
+ current_timestamp,
+ NEW.CREATE_USER );
+
+ RETURN NEW;
+ END;
+$BODY$
+ LANGUAGE plpgsql VOLATILE
+ COST 100;
+ALTER FUNCTION PUBLIC.TBL_ID_COUNTER_INSERT_TRG()
+ OWNER TO PLGM_SERVICE;
+
+
+DROP TRIGGER IF EXISTS TBL_ID_COUNTER_INSERT_TRG ON PUBLIC.TBL_ID_COUNTER;
+
+CREATE TRIGGER TBL_ID_COUNTER_INSERT_TRG
+ BEFORE INSERT
+ ON PUBLIC.TBL_ID_COUNTER
+ FOR EACH ROW
+ EXECUTE PROCEDURE PUBLIC.TBL_ID_COUNTER_INSERT_TRG();
+
+
+
+-- PUBLIC.TBL_ID_COUNTER UPDATE TRIGGER --
+-- <GENERATED CODE!>
+
+CREATE OR REPLACE FUNCTION PUBLIC.TBL_ID_COUNTER_UPDATE_TRG()
+ RETURNS trigger AS
+$BODY$
+ BEGIN
+ INSERT INTO HTBL_ID_COUNTER (
+ ID,COUNTER,COUNTER_TYPE,INFO,CREATE_USER,CREATE_DATE,MOD_USER,MOD_DATE,
+
+ HACTION,
+ HDATE,
+ HUSER
+ )
+ VALUES (
+ NEW.ID,NEW.COUNTER,NEW.COUNTER_TYPE,NEW.INFO,NEW.CREATE_USER,NEW.CREATE_DATE,NEW.MOD_USER,NEW.MOD_DATE,
+ 2,
+ current_timestamp,
+ NEW.MOD_USER
+ );
+
+ RETURN NEW;
+ END;
+$BODY$
+ LANGUAGE plpgsql VOLATILE
+ COST 100;
+ALTER FUNCTION PUBLIC.TBL_ID_COUNTER_UPDATE_TRG()
+ OWNER TO PLGM_SERVICE;
+
+DROP TRIGGER IF EXISTS TBL_ID_COUNTER_UPDATE_TRG ON PUBLIC.TBL_ID_COUNTER;
+
+CREATE TRIGGER TBL_ID_COUNTER_UPDATE_TRG
+ BEFORE UPDATE
+ ON PUBLIC.TBL_ID_COUNTER
+ FOR EACH ROW
+ EXECUTE PROCEDURE PUBLIC.TBL_ID_COUNTER_UPDATE_TRG();
+
+
+
+-- PUBLIC.TBL_ID_COUNTER DELETE TRIGGER --
+-- <GENERATED CODE!>
+
+CREATE OR REPLACE FUNCTION PUBLIC.TBL_ID_COUNTER_DELETE_TRG()
+ RETURNS trigger AS
+$BODY$
+ BEGIN
+ IF TG_OP = 'DELETE' THEN
+ INSERT INTO HTBL_ID_COUNTER (
+
+ ID,COUNTER,COUNTER_TYPE,INFO,CREATE_USER,CREATE_DATE,MOD_USER,MOD_DATE,
+
+ HACTION,
+ HDATE,
+ HUSER
+ )
+ VALUES (
+ OLD.ID,OLD.COUNTER,OLD.COUNTER_TYPE,OLD.INFO,OLD.CREATE_USER,OLD.CREATE_DATE,OLD.MOD_USER,OLD.MOD_DATE,
+
+ 3,
+ current_timestamp,
+ OLD.MOD_USER );
+ END IF;
+
+ RETURN OLD;
+ END;
+$BODY$
+ LANGUAGE plpgsql VOLATILE
+ COST 100;
+ALTER FUNCTION PUBLIC.TBL_ID_COUNTER_DELETE_TRG()
+ OWNER TO PLGM_SERVICE;
+
+DROP TRIGGER IF EXISTS TBL_ID_COUNTER_DELETE_TRG ON PUBLIC.TBL_ID_COUNTER;
+
+CREATE TRIGGER TBL_ID_COUNTER_DELETE_TRG
+ BEFORE DELETE
+ ON PUBLIC.TBL_ID_COUNTER
+ FOR EACH ROW
+ EXECUTE PROCEDURE PUBLIC.TBL_ID_COUNTER_DELETE_TRG();
+
+
+
+-- PUBLIC.TBL_SINGLE_GRIDMEASURE INSERT TRIGGER --
+-- <GENERATED CODE!>
+CREATE OR REPLACE FUNCTION PUBLIC.TBL_SINGLE_GRIDMEASURE_INSERT_TRG()
+ RETURNS trigger AS
+$BODY$
+ BEGIN
+ INSERT INTO HTBL_SINGLE_GRIDMEASURE (
+ ID,SORTORDER,TITLE,SWITCHING_OBJECT,CIM_ID,CIM_NAME,CIM_DESCRIPTION,PLANNED_STARTTIME_SINGLEMEASURE,PLANNED_ENDTIME_SINGLEMEASURE,DESCRIPTION, RESPONSIBLE_ONSITE_NAME, RESPONSIBLE_ONSITE_DEPARTMENT,NETWORK_CONTROL,FK_TBL_GRIDMEASURE,CREATE_USER,CREATE_DATE,MOD_USER,MOD_DATE,
+
+ HACTION,
+ HDATE,
+ HUSER
+ )
+ VALUES (
+
+ NEW.ID,NEW.SORTORDER,NEW.TITLE,NEW.SWITCHING_OBJECT,NEW.CIM_ID,NEW.CIM_NAME,NEW.CIM_DESCRIPTION,NEW.PLANNED_STARTTIME_SINGLEMEASURE,NEW.PLANNED_ENDTIME_SINGLEMEASURE,NEW.DESCRIPTION, NEW.RESPONSIBLE_ONSITE_NAME, NEW.RESPONSIBLE_ONSITE_DEPARTMENT,NEW.NETWORK_CONTROL,NEW.FK_TBL_GRIDMEASURE,NEW.CREATE_USER,NEW.CREATE_DATE,NEW.MOD_USER,NEW.MOD_DATE,
+
+ 1,
+ current_timestamp,
+ NEW.CREATE_USER );
+
+ RETURN NEW;
+ END;
+$BODY$
+ LANGUAGE plpgsql VOLATILE
+ COST 100;
+ALTER FUNCTION PUBLIC.TBL_SINGLE_GRIDMEASURE_INSERT_TRG()
+ OWNER TO PLGM_SERVICE;
+
+
+DROP TRIGGER IF EXISTS TBL_SINGLE_GRIDMEASURE_INSERT_TRG ON PUBLIC.TBL_SINGLE_GRIDMEASURE;
+
+CREATE TRIGGER TBL_SINGLE_GRIDMEASURE_INSERT_TRG
+ BEFORE INSERT
+ ON PUBLIC.TBL_SINGLE_GRIDMEASURE
+ FOR EACH ROW
+ EXECUTE PROCEDURE PUBLIC.TBL_SINGLE_GRIDMEASURE_INSERT_TRG();
+
+
+
+-- PUBLIC.TBL_SINGLE_GRIDMEASURE UPDATE TRIGGER --
+-- <GENERATED CODE!>
+
+CREATE OR REPLACE FUNCTION PUBLIC.TBL_SINGLE_GRIDMEASURE_UPDATE_TRG()
+ RETURNS trigger AS
+$BODY$
+ BEGIN
+ INSERT INTO HTBL_SINGLE_GRIDMEASURE (
+ ID,SORTORDER,TITLE,SWITCHING_OBJECT,CIM_ID,CIM_NAME,CIM_DESCRIPTION,PLANNED_STARTTIME_SINGLEMEASURE,PLANNED_ENDTIME_SINGLEMEASURE,DESCRIPTION,RESPONSIBLE_ONSITE_NAME, RESPONSIBLE_ONSITE_DEPARTMENT,NETWORK_CONTROL,FK_TBL_GRIDMEASURE,CREATE_USER,CREATE_DATE,MOD_USER,MOD_DATE,
+
+ HACTION,
+ HDATE,
+ HUSER
+ )
+ VALUES (
+ NEW.ID,NEW.SORTORDER,NEW.TITLE,NEW.SWITCHING_OBJECT,NEW.CIM_ID,NEW.CIM_NAME,NEW.CIM_DESCRIPTION,NEW.PLANNED_STARTTIME_SINGLEMEASURE,NEW.PLANNED_ENDTIME_SINGLEMEASURE,NEW.DESCRIPTION,NEW.RESPONSIBLE_ONSITE_NAME, NEW.RESPONSIBLE_ONSITE_DEPARTMENT,NEW.NETWORK_CONTROL,NEW.FK_TBL_GRIDMEASURE,NEW.CREATE_USER,NEW.CREATE_DATE,NEW.MOD_USER,NEW.MOD_DATE,
+ 2,
+ current_timestamp,
+ NEW.MOD_USER
+ );
+
+ RETURN NEW;
+ END;
+$BODY$
+ LANGUAGE plpgsql VOLATILE
+ COST 100;
+ALTER FUNCTION PUBLIC.TBL_SINGLE_GRIDMEASURE_UPDATE_TRG()
+ OWNER TO PLGM_SERVICE;
+
+DROP TRIGGER IF EXISTS TBL_SINGLE_GRIDMEASURE_UPDATE_TRG ON PUBLIC.TBL_SINGLE_GRIDMEASURE;
+
+CREATE TRIGGER TBL_SINGLE_GRIDMEASURE_UPDATE_TRG
+ BEFORE UPDATE
+ ON PUBLIC.TBL_SINGLE_GRIDMEASURE
+ FOR EACH ROW
+ EXECUTE PROCEDURE PUBLIC.TBL_SINGLE_GRIDMEASURE_UPDATE_TRG();
+
+
+
+-- PUBLIC.TBL_SINGLE_GRIDMEASURE DELETE TRIGGER --
+-- <GENERATED CODE!>
+
+CREATE OR REPLACE FUNCTION PUBLIC.TBL_SINGLE_GRIDMEASURE_DELETE_TRG()
+ RETURNS trigger AS
+$BODY$
+ BEGIN
+ IF TG_OP = 'DELETE' THEN
+ INSERT INTO HTBL_SINGLE_GRIDMEASURE (
+
+ ID,SORTORDER,TITLE,SWITCHING_OBJECT,CIM_ID,CIM_NAME,CIM_DESCRIPTION,PLANNED_STARTTIME_SINGLEMEASURE,PLANNED_ENDTIME_SINGLEMEASURE,DESCRIPTION,RESPONSIBLE_ONSITE_NAME, RESPONSIBLE_ONSITE_DEPARTMENT, NETWORK_CONTROL,FK_TBL_GRIDMEASURE,CREATE_USER,CREATE_DATE,MOD_USER,MOD_DATE,
+
+ HACTION,
+ HDATE,
+ HUSER
+ )
+ VALUES (
+ OLD.ID,OLD.SORTORDER,OLD.TITLE,OLD.SWITCHING_OBJECT,OLD.CIM_ID,OLD.CIM_NAME,OLD.CIM_DESCRIPTION,OLD.PLANNED_STARTTIME_SINGLEMEASURE,OLD.PLANNED_ENDTIME_SINGLEMEASURE,OLD.DESCRIPTION,OLD.RESPONSIBLE_ONSITE_NAME, OLD.RESPONSIBLE_ONSITE_DEPARTMENT,OLD.NETWORK_CONTROL,OLD.FK_TBL_GRIDMEASURE,OLD.CREATE_USER,OLD.CREATE_DATE,OLD.MOD_USER,OLD.MOD_DATE,
+
+ 3,
+ current_timestamp,
+ OLD.MOD_USER );
+ END IF;
+
+ RETURN OLD;
+ END;
+$BODY$
+ LANGUAGE plpgsql VOLATILE
+ COST 100;
+ALTER FUNCTION PUBLIC.TBL_SINGLE_GRIDMEASURE_DELETE_TRG()
+ OWNER TO PLGM_SERVICE;
+
+DROP TRIGGER IF EXISTS TBL_SINGLE_GRIDMEASURE_DELETE_TRG ON PUBLIC.TBL_SINGLE_GRIDMEASURE;
+
+CREATE TRIGGER TBL_SINGLE_GRIDMEASURE_DELETE_TRG
+ BEFORE DELETE
+ ON PUBLIC.TBL_SINGLE_GRIDMEASURE
+ FOR EACH ROW
+ EXECUTE PROCEDURE PUBLIC.TBL_SINGLE_GRIDMEASURE_DELETE_TRG();
+
+
+
+
+
+-- PUBLIC.TBL_STEPS INSERT TRIGGER --
+-- <GENERATED CODE!>
+CREATE OR REPLACE FUNCTION PUBLIC.TBL_STEPS_INSERT_TRG()
+ RETURNS trigger AS
+$BODY$
+ BEGIN
+ INSERT INTO HTBL_STEPS (
+ ID,SORTORDER,SWITCHING_OBJECT,TYPE,PRESENT_TIME, PRESENT_STATE, TARGET_STATE, OPERATOR, FK_TBL_SINGLE_GRIDMEASURE,CREATE_USER,CREATE_DATE,MOD_USER,MOD_DATE,
+
+ HACTION,
+ HDATE,
+ HUSER
+ )
+ VALUES (
+
+ NEW.ID,NEW.SORTORDER,NEW.SWITCHING_OBJECT,NEW.TYPE, NEW.PRESENT_TIME, NEW.PRESENT_STATE, NEW.TARGET_STATE, NEW.OPERATOR, NEW.FK_TBL_SINGLE_GRIDMEASURE,NEW.CREATE_USER,NEW.CREATE_DATE,NEW.MOD_USER,NEW.MOD_DATE,
+
+ 1,
+ current_timestamp,
+ NEW.CREATE_USER );
+
+ RETURN NEW;
+ END;
+$BODY$
+ LANGUAGE plpgsql VOLATILE
+ COST 100;
+ALTER FUNCTION PUBLIC.TBL_STEPS_INSERT_TRG()
+ OWNER TO PLGM_SERVICE;
+
+DROP TRIGGER IF EXISTS TBL_STEPS_INSERT_TRG ON PUBLIC.TBL_STEPS;
+
+CREATE TRIGGER TBL_STEPS_INSERT_TRG
+ BEFORE INSERT
+ ON PUBLIC.TBL_STEPS
+ FOR EACH ROW
+ EXECUTE PROCEDURE PUBLIC.TBL_STEPS_INSERT_TRG();
+
+
+
+-- PUBLIC.TBL_STEPS UPDATE TRIGGER --
+-- <GENERATED CODE!>
+
+CREATE OR REPLACE FUNCTION PUBLIC.TBL_STEPS_UPDATE_TRG()
+ RETURNS trigger AS
+$BODY$
+ BEGIN
+ INSERT INTO HTBL_STEPS (
+ ID,SORTORDER,SWITCHING_OBJECT,TYPE,PRESENT_TIME, PRESENT_STATE, TARGET_STATE, OPERATOR,FK_TBL_SINGLE_GRIDMEASURE,CREATE_USER,CREATE_DATE,MOD_USER,MOD_DATE,
+
+ HACTION,
+ HDATE,
+ HUSER
+ )
+ VALUES (
+ NEW.ID,NEW.SORTORDER,NEW.SWITCHING_OBJECT,NEW.TYPE,NEW.PRESENT_TIME, NEW.PRESENT_STATE, NEW.TARGET_STATE, NEW.OPERATOR,NEW.FK_TBL_SINGLE_GRIDMEASURE,NEW.CREATE_USER,NEW.CREATE_DATE,NEW.MOD_USER,NEW.MOD_DATE,
+ 2,
+ current_timestamp,
+ NEW.MOD_USER
+ );
+
+ RETURN NEW;
+ END;
+$BODY$
+ LANGUAGE plpgsql VOLATILE
+ COST 100;
+ALTER FUNCTION PUBLIC.TBL_STEPS_UPDATE_TRG()
+ OWNER TO PLGM_SERVICE;
+
+DROP TRIGGER IF EXISTS TBL_STEPS_UPDATE_TRG ON PUBLIC.TBL_STEPS;
+
+CREATE TRIGGER TBL_STEPS_UPDATE_TRG
+ BEFORE UPDATE
+ ON PUBLIC.TBL_STEPS
+ FOR EACH ROW
+ EXECUTE PROCEDURE PUBLIC.TBL_STEPS_UPDATE_TRG();
+
+
+
+-- PUBLIC.TBL_STEPS DELETE TRIGGER --
+-- <GENERATED CODE!>
+
+CREATE OR REPLACE FUNCTION PUBLIC.TBL_STEPS_DELETE_TRG()
+ RETURNS trigger AS
+$BODY$
+ BEGIN
+ IF TG_OP = 'DELETE' THEN
+ INSERT INTO HTBL_STEPS (
+
+ ID,SORTORDER,SWITCHING_OBJECT,TYPE,PRESENT_TIME, PRESENT_STATE, TARGET_STATE, OPERATOR,FK_TBL_SINGLE_GRIDMEASURE,CREATE_USER,CREATE_DATE,MOD_USER,MOD_DATE,
+
+ HACTION,
+ HDATE,
+ HUSER
+ )
+ VALUES (
+ OLD.ID,OLD.SORTORDER,OLD.SWITCHING_OBJECT,OLD.TYPE,OLD.PRESENT_TIME, OLD.PRESENT_STATE, OLD.TARGET_STATE, OLD.OPERATOR,OLD.FK_TBL_SINGLE_GRIDMEASURE,OLD.CREATE_USER,OLD.CREATE_DATE,OLD.MOD_USER,OLD.MOD_DATE,
+
+ 3,
+ current_timestamp,
+ OLD.MOD_USER );
+ END IF;
+
+ RETURN OLD;
+ END;
+$BODY$
+ LANGUAGE plpgsql VOLATILE
+ COST 100;
+ALTER FUNCTION PUBLIC.TBL_STEPS_DELETE_TRG()
+ OWNER TO PLGM_SERVICE;
+
+DROP TRIGGER IF EXISTS TBL_STEPS_DELETE_TRG ON PUBLIC.TBL_STEPS;
+
+CREATE TRIGGER TBL_STEPS_DELETE_TRG
+ BEFORE DELETE
+ ON PUBLIC.TBL_STEPS
+ FOR EACH ROW
+ EXECUTE PROCEDURE PUBLIC.TBL_STEPS_DELETE_TRG();
+
+
+-- PUBLIC.TBL_LOCK INSERT TRIGGER --
+-- <GENERATED CODE!>
+CREATE OR REPLACE FUNCTION PUBLIC.TBL_LOCK_INSERT_TRG()
+ RETURNS trigger AS
+$BODY$
+ BEGIN
+ INSERT INTO HTBL_LOCK (
+ ID,KEY,USERNAME,INFO,CREATE_USER,CREATE_DATE,MOD_USER,MOD_DATE,
+
+ HACTION,
+ HDATE,
+ HUSER
+ )
+ VALUES (
+
+ NEW.ID,NEW.KEY,NEW.USERNAME,NEW.INFO,NEW.CREATE_USER,NEW.CREATE_DATE,NEW.MOD_USER,NEW.MOD_DATE,
+
+ 1,
+ current_timestamp,
+ NEW.CREATE_USER );
+
+ RETURN NEW;
+ END;
+$BODY$
+ LANGUAGE plpgsql VOLATILE
+ COST 100;
+ALTER FUNCTION PUBLIC.TBL_LOCK_INSERT_TRG()
+ OWNER TO PLGM_SERVICE;
+
+
+DROP TRIGGER IF EXISTS TBL_LOCK_INSERT_TRG ON PUBLIC.TBL_LOCK;
+
+CREATE TRIGGER TBL_LOCK_INSERT_TRG
+ BEFORE INSERT
+ ON PUBLIC.TBL_LOCK
+ FOR EACH ROW
+ EXECUTE PROCEDURE PUBLIC.TBL_LOCK_INSERT_TRG();
+
+
+
+-- PUBLIC.TBL_LOCK UPDATE TRIGGER --
+-- <GENERATED CODE!>
+
+CREATE OR REPLACE FUNCTION PUBLIC.TBL_LOCK_UPDATE_TRG()
+ RETURNS trigger AS
+$BODY$
+ BEGIN
+ INSERT INTO HTBL_LOCK (
+ ID,KEY,USERNAME,INFO,CREATE_USER,CREATE_DATE,MOD_USER,MOD_DATE,
+
+ HACTION,
+ HDATE,
+ HUSER
+ )
+ VALUES (
+ NEW.ID,NEW.KEY,NEW.USERNAME,NEW.INFO,NEW.CREATE_USER,NEW.CREATE_DATE,NEW.MOD_USER,NEW.MOD_DATE,
+ 2,
+ current_timestamp,
+ NEW.MOD_USER
+ );
+
+ RETURN NEW;
+ END;
+$BODY$
+ LANGUAGE plpgsql VOLATILE
+ COST 100;
+ALTER FUNCTION PUBLIC.TBL_LOCK_UPDATE_TRG()
+ OWNER TO PLGM_SERVICE;
+
+DROP TRIGGER IF EXISTS TBL_LOCK_UPDATE_TRG ON PUBLIC.TBL_LOCK;
+
+CREATE TRIGGER TBL_LOCK_UPDATE_TRG
+ BEFORE UPDATE
+ ON PUBLIC.TBL_LOCK
+ FOR EACH ROW
+ EXECUTE PROCEDURE PUBLIC.TBL_LOCK_UPDATE_TRG();
+
+
+
+-- PUBLIC.TBL_LOCK DELETE TRIGGER --
+-- <GENERATED CODE!>
+
+CREATE OR REPLACE FUNCTION PUBLIC.TBL_LOCK_DELETE_TRG()
+ RETURNS trigger AS
+$BODY$
+ BEGIN
+ IF TG_OP = 'DELETE' THEN
+ INSERT INTO HTBL_LOCK (
+
+ ID,KEY,USERNAME,INFO,CREATE_USER,CREATE_DATE,MOD_USER,MOD_DATE,
+
+ HACTION,
+ HDATE,
+ HUSER
+ )
+ VALUES (
+ OLD.ID,OLD.KEY,OLD.USERNAME,OLD.INFO,OLD.CREATE_USER,OLD.CREATE_DATE,OLD.MOD_USER,OLD.MOD_DATE,
+
+ 3,
+ current_timestamp,
+ OLD.MOD_USER );
+ END IF;
+
+ RETURN OLD;
+ END;
+$BODY$
+ LANGUAGE plpgsql VOLATILE
+ COST 100;
+ALTER FUNCTION PUBLIC.TBL_LOCK_DELETE_TRG()
+ OWNER TO PLGM_SERVICE;
+
+DROP TRIGGER IF EXISTS TBL_LOCK_DELETE_TRG ON PUBLIC.TBL_LOCK;
+
+CREATE TRIGGER TBL_LOCK_DELETE_TRG
+ BEFORE DELETE
+ ON PUBLIC.TBL_LOCK
+ FOR EACH ROW
+ EXECUTE PROCEDURE PUBLIC.TBL_LOCK_DELETE_TRG();
+
+
+
+
+-- PUBLIC.TBL_USER_SETTINGS INSERT TRIGGER --
+-- <GENERATED CODE!>
+CREATE OR REPLACE FUNCTION PUBLIC.TBL_USER_SETTINGS_INSERT_TRG()
+ RETURNS trigger AS
+$BODY$
+ BEGIN
+ INSERT INTO HTBL_USER_SETTINGS (
+ ID,USERNAME,SETTING_TYPE,VALUE,CREATE_USER,CREATE_DATE,MOD_USER,MOD_DATE,
+
+ HACTION,
+ HDATE,
+ HUSER
+ )
+ VALUES (
+
+ NEW.ID,NEW.USERNAME,NEW.SETTING_TYPE,NEW.VALUE,NEW.CREATE_USER,NEW.CREATE_DATE,NEW.MOD_USER,NEW.MOD_DATE,
+
+ 1,
+ current_timestamp,
+ NEW.CREATE_USER );
+
+ RETURN NEW;
+ END;
+$BODY$
+ LANGUAGE plpgsql VOLATILE
+ COST 100;
+ALTER FUNCTION PUBLIC.TBL_USER_SETTINGS_INSERT_TRG()
+ OWNER TO PLGM_SERVICE;
+
+
+DROP TRIGGER IF EXISTS TBL_USER_SETTINGS_INSERT_TRG ON PUBLIC.TBL_USER_SETTINGS;
+
+CREATE TRIGGER TBL_USER_SETTINGS_INSERT_TRG
+ BEFORE INSERT
+ ON PUBLIC.TBL_USER_SETTINGS
+ FOR EACH ROW
+ EXECUTE PROCEDURE PUBLIC.TBL_USER_SETTINGS_INSERT_TRG();
+
+
+
+-- PUBLIC.TBL_USER_SETTINGS UPDATE TRIGGER --
+-- <GENERATED CODE!>
+
+CREATE OR REPLACE FUNCTION PUBLIC.TBL_USER_SETTINGS_UPDATE_TRG()
+ RETURNS trigger AS
+$BODY$
+ BEGIN
+ INSERT INTO HTBL_USER_SETTINGS (
+ ID,USERNAME,SETTING_TYPE,VALUE,CREATE_USER,CREATE_DATE,MOD_USER,MOD_DATE,
+
+ HACTION,
+ HDATE,
+ HUSER
+ )
+ VALUES (
+ NEW.ID,NEW.USERNAME,NEW.SETTING_TYPE,NEW.VALUE,NEW.CREATE_USER,NEW.CREATE_DATE,NEW.MOD_USER,NEW.MOD_DATE,
+ 2,
+ current_timestamp,
+ NEW.MOD_USER
+ );
+
+ RETURN NEW;
+ END;
+$BODY$
+ LANGUAGE plpgsql VOLATILE
+ COST 100;
+ALTER FUNCTION PUBLIC.TBL_USER_SETTINGS_UPDATE_TRG()
+ OWNER TO PLGM_SERVICE;
+
+DROP TRIGGER IF EXISTS TBL_USER_SETTINGS_UPDATE_TRG ON PUBLIC.TBL_USER_SETTINGS;
+
+CREATE TRIGGER TBL_USER_SETTINGS_UPDATE_TRG
+ BEFORE UPDATE
+ ON PUBLIC.TBL_USER_SETTINGS
+ FOR EACH ROW
+ EXECUTE PROCEDURE PUBLIC.TBL_USER_SETTINGS_UPDATE_TRG();
+
+
+
+-- PUBLIC.TBL_USER_SETTINGS DELETE TRIGGER --
+-- <GENERATED CODE!>
+
+CREATE OR REPLACE FUNCTION PUBLIC.TBL_USER_SETTINGS_DELETE_TRG()
+ RETURNS trigger AS
+$BODY$
+ BEGIN
+ IF TG_OP = 'DELETE' THEN
+ INSERT INTO HTBL_USER_SETTINGS (
+
+ ID,USERNAME,SETTING_TYPE,VALUE,CREATE_USER,CREATE_DATE,MOD_USER,MOD_DATE,
+
+ HACTION,
+ HDATE,
+ HUSER
+ )
+ VALUES (
+ OLD.ID,OLD.USERNAME,OLD.SETTING_TYPE,OLD.VALUE,OLD.CREATE_USER,OLD.CREATE_DATE,OLD.MOD_USER,OLD.MOD_DATE,
+
+ 3,
+ current_timestamp,
+ OLD.MOD_USER );
+ END IF;
+
+ RETURN OLD;
+ END;
+$BODY$
+ LANGUAGE plpgsql VOLATILE
+ COST 100;
+ALTER FUNCTION PUBLIC.TBL_USER_SETTINGS_DELETE_TRG()
+ OWNER TO PLGM_SERVICE;
+
+DROP TRIGGER IF EXISTS TBL_USER_SETTINGS_DELETE_TRG ON PUBLIC.TBL_USER_SETTINGS;
+
+CREATE TRIGGER TBL_USER_SETTINGS_DELETE_TRG
+ BEFORE DELETE
+ ON PUBLIC.TBL_USER_SETTINGS
+ FOR EACH ROW
+ EXECUTE PROCEDURE PUBLIC.TBL_USER_SETTINGS_DELETE_TRG();
+
+
+
+-- PUBLIC.REF_USER_DEPARTMENT INSERT TRIGGER --
+-- <GENERATED CODE!>
+CREATE OR REPLACE FUNCTION PUBLIC.REF_USER_DEPARTMENT_INSERT_TRG()
+ RETURNS trigger AS
+$BODY$
+ BEGIN
+ INSERT INTO HREF_USER_DEPARTMENT (
+ ID,NAME,CREATE_USER,CREATE_DATE,MOD_USER,MOD_DATE,
+
+ HACTION,
+ HDATE,
+ HUSER
+ )
+ VALUES (
+
+ NEW.ID,NEW.NAME,NEW.CREATE_USER,NEW.CREATE_DATE,NEW.MOD_USER,NEW.MOD_DATE,
+
+ 1,
+ current_timestamp,
+ NEW.CREATE_USER );
+
+ RETURN NEW;
+ END;
+$BODY$
+ LANGUAGE plpgsql VOLATILE
+ COST 100;
+ALTER FUNCTION PUBLIC.REF_USER_DEPARTMENT_INSERT_TRG()
+ OWNER TO PLGM_SERVICE;
+
+
+DROP TRIGGER IF EXISTS REF_USER_DEPARTMENT_INSERT_TRG ON PUBLIC.REF_USER_DEPARTMENT;
+
+CREATE TRIGGER REF_USER_DEPARTMENT_INSERT_TRG
+ BEFORE INSERT
+ ON PUBLIC.REF_USER_DEPARTMENT
+ FOR EACH ROW
+ EXECUTE PROCEDURE PUBLIC.REF_USER_DEPARTMENT_INSERT_TRG();
+
+
+
+-- PUBLIC.REF_USER_DEPARTMENT UPDATE TRIGGER --
+-- <GENERATED CODE!>
+
+CREATE OR REPLACE FUNCTION PUBLIC.REF_USER_DEPARTMENT_UPDATE_TRG()
+ RETURNS trigger AS
+$BODY$
+ BEGIN
+ INSERT INTO HREF_USER_DEPARTMENT (
+ ID,NAME,CREATE_USER,CREATE_DATE,MOD_USER,MOD_DATE,
+
+ HACTION,
+ HDATE,
+ HUSER
+ )
+ VALUES (
+ NEW.ID,NEW.NAME,NEW.CREATE_USER,NEW.CREATE_DATE,NEW.MOD_USER,NEW.MOD_DATE,
+ 2,
+ current_timestamp,
+ NEW.MOD_USER
+ );
+
+ RETURN NEW;
+ END;
+$BODY$
+ LANGUAGE plpgsql VOLATILE
+ COST 100;
+ALTER FUNCTION PUBLIC.REF_USER_DEPARTMENT_UPDATE_TRG()
+ OWNER TO PLGM_SERVICE;
+
+DROP TRIGGER IF EXISTS REF_USER_DEPARTMENT_UPDATE_TRG ON PUBLIC.REF_USER_DEPARTMENT;
+
+CREATE TRIGGER REF_USER_DEPARTMENT_UPDATE_TRG
+ BEFORE UPDATE
+ ON PUBLIC.REF_USER_DEPARTMENT
+ FOR EACH ROW
+ EXECUTE PROCEDURE PUBLIC.REF_USER_DEPARTMENT_UPDATE_TRG();
+
+
+
+-- PUBLIC.REF_USER_DEPARTMENT DELETE TRIGGER --
+-- <GENERATED CODE!>
+
+CREATE OR REPLACE FUNCTION PUBLIC.REF_USER_DEPARTMENT_DELETE_TRG()
+ RETURNS trigger AS
+$BODY$
+ BEGIN
+ IF TG_OP = 'DELETE' THEN
+ INSERT INTO HREF_USER_DEPARTMENT (
+
+ ID,NAME,CREATE_USER,CREATE_DATE,MOD_USER,MOD_DATE,
+
+ HACTION,
+ HDATE,
+ HUSER
+ )
+ VALUES (
+ OLD.ID,OLD.NAME,OLD.CREATE_USER,OLD.CREATE_DATE,OLD.MOD_USER,OLD.MOD_DATE,
+
+ 3,
+ current_timestamp,
+ OLD.MOD_USER );
+ END IF;
+
+ RETURN OLD;
+ END;
+$BODY$
+ LANGUAGE plpgsql VOLATILE
+ COST 100;
+ALTER FUNCTION PUBLIC.REF_USER_DEPARTMENT_DELETE_TRG()
+ OWNER TO PLGM_SERVICE;
+
+DROP TRIGGER IF EXISTS REF_USER_DEPARTMENT_DELETE_TRG ON PUBLIC.REF_USER_DEPARTMENT;
+
+CREATE TRIGGER REF_USER_DEPARTMENT_DELETE_TRG
+ BEFORE DELETE
+ ON PUBLIC.REF_USER_DEPARTMENT
+ FOR EACH ROW
+ EXECUTE PROCEDURE PUBLIC.REF_USER_DEPARTMENT_DELETE_TRG();
+
+
+-- PUBLIC.HREF_COST_CENTER INSERT TRIGGER --
+-- <GENERATED CODE!>
+CREATE OR REPLACE FUNCTION PUBLIC.HREF_COST_CENTER_INSERT_TRG()
+ RETURNS trigger AS
+$BODY$
+ BEGIN
+ INSERT INTO HHREF_COST_CENTER (
+ HID,HACTION,HDATE,HUSER,ID,NAME,DESCRIPTION,CREATE_USER,CREATE_DATE,MOD_USER,MOD_DATE,
+
+ HACTION,
+ HDATE,
+ HUSER
+ )
+ VALUES (
+
+ NEW.HID,NEW.HACTION,NEW.HDATE,NEW.HUSER,NEW.ID,NEW.NAME,NEW.DESCRIPTION,NEW.CREATE_USER,NEW.CREATE_DATE,NEW.MOD_USER,NEW.MOD_DATE,
+
+ 1,
+ current_timestamp,
+ NEW.CREATE_USER );
+
+ RETURN NEW;
+ END;
+$BODY$
+ LANGUAGE plpgsql VOLATILE
+ COST 100;
+ALTER FUNCTION PUBLIC.HREF_COST_CENTER_INSERT_TRG()
+ OWNER TO PLGM_SERVICE;
+
+
+DROP TRIGGER IF EXISTS HREF_COST_CENTER_INSERT_TRG ON PUBLIC.HREF_COST_CENTER;
+
+CREATE TRIGGER HREF_COST_CENTER_INSERT_TRG
+ BEFORE INSERT
+ ON PUBLIC.HREF_COST_CENTER
+ FOR EACH ROW
+ EXECUTE PROCEDURE PUBLIC.HREF_COST_CENTER_INSERT_TRG();
+
+
+
+-- PUBLIC.HREF_COST_CENTER UPDATE TRIGGER --
+-- <GENERATED CODE!>
+
+CREATE OR REPLACE FUNCTION PUBLIC.HREF_COST_CENTER_UPDATE_TRG()
+ RETURNS trigger AS
+$BODY$
+ BEGIN
+ INSERT INTO HHREF_COST_CENTER (
+ HID,HACTION,HDATE,HUSER,ID,NAME,DESCRIPTION,CREATE_USER,CREATE_DATE,MOD_USER,MOD_DATE,
+
+ HACTION,
+ HDATE,
+ HUSER
+ )
+ VALUES (
+ NEW.HID,NEW.HACTION,NEW.HDATE,NEW.HUSER,NEW.ID,NEW.NAME,NEW.DESCRIPTION,NEW.CREATE_USER,NEW.CREATE_DATE,NEW.MOD_USER,NEW.MOD_DATE,
+ 2,
+ current_timestamp,
+ NEW.MOD_USER
+ );
+
+ RETURN NEW;
+ END;
+$BODY$
+ LANGUAGE plpgsql VOLATILE
+ COST 100;
+ALTER FUNCTION PUBLIC.HREF_COST_CENTER_UPDATE_TRG()
+ OWNER TO PLGM_SERVICE;
+
+DROP TRIGGER IF EXISTS HREF_COST_CENTER_UPDATE_TRG ON PUBLIC.HREF_COST_CENTER;
+
+CREATE TRIGGER HREF_COST_CENTER_UPDATE_TRG
+ BEFORE UPDATE
+ ON PUBLIC.HREF_COST_CENTER
+ FOR EACH ROW
+ EXECUTE PROCEDURE PUBLIC.HREF_COST_CENTER_UPDATE_TRG();
+
+
+
+-- PUBLIC.HREF_COST_CENTER DELETE TRIGGER --
+-- <GENERATED CODE!>
+
+CREATE OR REPLACE FUNCTION PUBLIC.HREF_COST_CENTER_DELETE_TRG()
+ RETURNS trigger AS
+$BODY$
+ BEGIN
+ IF TG_OP = 'DELETE' THEN
+ INSERT INTO HHREF_COST_CENTER (
+
+ HID,HACTION,HDATE,HUSER,ID,NAME,DESCRIPTION,CREATE_USER,CREATE_DATE,MOD_USER,MOD_DATE,
+
+ HACTION,
+ HDATE,
+ HUSER
+ )
+ VALUES (
+ OLD.HID,OLD.HACTION,OLD.HDATE,OLD.HUSER,OLD.ID,OLD.NAME,OLD.DESCRIPTION,OLD.CREATE_USER,OLD.CREATE_DATE,OLD.MOD_USER,OLD.MOD_DATE,
+
+ 3,
+ current_timestamp,
+ OLD.MOD_USER );
+ END IF;
+
+ RETURN OLD;
+ END;
+$BODY$
+ LANGUAGE plpgsql VOLATILE
+ COST 100;
+ALTER FUNCTION PUBLIC.HREF_COST_CENTER_DELETE_TRG()
+ OWNER TO PLGM_SERVICE;
+
+DROP TRIGGER IF EXISTS HREF_COST_CENTER_DELETE_TRG ON PUBLIC.HREF_COST_CENTER;
+
+CREATE TRIGGER HREF_COST_CENTER_DELETE_TRG
+ BEFORE DELETE
+ ON PUBLIC.HREF_COST_CENTER
+ FOR EACH ROW
+ EXECUTE PROCEDURE PUBLIC.HREF_COST_CENTER_DELETE_TRG();
+
+
+
+-- PUBLIC.REF_BRANCH INSERT TRIGGER --
+-- <GENERATED CODE!>
+CREATE OR REPLACE FUNCTION PUBLIC.REF_BRANCH_INSERT_TRG()
+ RETURNS trigger AS
+$BODY$
+ BEGIN
+ INSERT INTO HREF_BRANCH (
+
+ ID,NAME,DESCRIPTION,COLOR_CODE,CREATE_USER,CREATE_DATE,MOD_USER,MOD_DATE,
+
+ HACTION,
+ HDATE,
+ HUSER
+ )
+ VALUES (
+
+ NEW.ID,NEW.NAME,NEW.DESCRIPTION,NEW.COLOR_CODE,NEW.CREATE_USER,NEW.CREATE_DATE,NEW.MOD_USER,NEW.MOD_DATE,
+ 1,
+ current_timestamp,
+ NEW.CREATE_USER );
+
+ RETURN NEW;
+ END;
+$BODY$
+ LANGUAGE plpgsql VOLATILE
+ COST 100;
+ALTER FUNCTION PUBLIC.REF_BRANCH_INSERT_TRG()
+ OWNER TO PLGM_SERVICE;
+
+
+DROP TRIGGER IF EXISTS REF_BRANCH_INSERT_TRG ON PUBLIC.REF_BRANCH;
+
+CREATE TRIGGER REF_BRANCH_INSERT_TRG
+ BEFORE INSERT
+ ON PUBLIC.REF_BRANCH
+ FOR EACH ROW
+ EXECUTE PROCEDURE PUBLIC.REF_BRANCH_INSERT_TRG();
+
+
+
+-- PUBLIC.REF_BRANCH UPDATE TRIGGER --
+-- <GENERATED CODE!>
+
+CREATE OR REPLACE FUNCTION PUBLIC.REF_BRANCH_UPDATE_TRG()
+ RETURNS trigger AS
+$BODY$
+ BEGIN
+ INSERT INTO HREF_BRANCH (
+ ID,NAME,DESCRIPTION,COLOR_CODE,CREATE_USER,CREATE_DATE,MOD_USER,MOD_DATE,
+
+ HACTION,
+ HDATE,
+ HUSER
+ )
+ VALUES (
+ NEW.ID,NEW.NAME,NEW.DESCRIPTION,NEW.COLOR_CODE,NEW.CREATE_USER,NEW.CREATE_DATE,NEW.MOD_USER,NEW.MOD_DATE,
+ 2,
+ current_timestamp,
+ NEW.MOD_USER
+ );
+
+ RETURN NEW;
+ END;
+$BODY$
+ LANGUAGE plpgsql VOLATILE
+ COST 100;
+ALTER FUNCTION PUBLIC.REF_BRANCH_UPDATE_TRG()
+ OWNER TO PLGM_SERVICE;
+
+DROP TRIGGER IF EXISTS REF_BRANCH_UPDATE_TRG ON PUBLIC.REF_BRANCH;
+
+CREATE TRIGGER REF_BRANCH_UPDATE_TRG
+ BEFORE UPDATE
+ ON PUBLIC.REF_BRANCH
+ FOR EACH ROW
+ EXECUTE PROCEDURE PUBLIC.REF_BRANCH_UPDATE_TRG();
+
+
+
+-- PUBLIC.REF_BRANCH DELETE TRIGGER --
+-- <GENERATED CODE!>
+
+CREATE OR REPLACE FUNCTION PUBLIC.REF_BRANCH_DELETE_TRG()
+ RETURNS trigger AS
+$BODY$
+ BEGIN
+ IF TG_OP = 'DELETE' THEN
+ INSERT INTO HREF_BRANCH (
+ ID,NAME,DESCRIPTION,COLOR_CODE,CREATE_USER,CREATE_DATE,MOD_USER,MOD_DATE,
+ HACTION,
+ HDATE,
+ HUSER
+ )
+ VALUES (
+ OLD.ID,OLD.NAME,OLD.DESCRIPTION,OLD.COLOR_CODE,OLD.CREATE_USER,OLD.CREATE_DATE,OLD.MOD_USER,OLD.MOD_DATE,
+ 3,
+ current_timestamp,
+ OLD.MOD_USER );
+ END IF;
+
+ RETURN OLD;
+ END;
+$BODY$
+ LANGUAGE plpgsql VOLATILE
+ COST 100;
+ALTER FUNCTION PUBLIC.REF_BRANCH_DELETE_TRG()
+ OWNER TO PLGM_SERVICE;
+
+DROP TRIGGER IF EXISTS REF_BRANCH_DELETE_TRG ON PUBLIC.REF_BRANCH;
+
+CREATE TRIGGER REF_BRANCH_DELETE_TRG
+ BEFORE DELETE
+ ON PUBLIC.REF_BRANCH
+ FOR EACH ROW
+ EXECUTE PROCEDURE PUBLIC.REF_BRANCH_DELETE_TRG();
+
+
+
+-- PUBLIC.REF_BRANCH_LEVEL INSERT TRIGGER --
+-- <GENERATED CODE!>
+CREATE OR REPLACE FUNCTION PUBLIC.REF_BRANCH_LEVEL_INSERT_TRG()
+ RETURNS trigger AS
+$BODY$
+ BEGIN
+ INSERT INTO HREF_BRANCH_LEVEL (
+ ID,NAME,DESCRIPTION,FK_REF_BRANCH,CREATE_USER,CREATE_DATE,MOD_USER,MOD_DATE,
+
+ HACTION,
+ HDATE,
+ HUSER
+ )
+ VALUES (
+
+ NEW.ID,NEW.NAME,NEW.DESCRIPTION,NEW.FK_REF_BRANCH,NEW.CREATE_USER,NEW.CREATE_DATE,NEW.MOD_USER,NEW.MOD_DATE,
+
+ 1,
+ current_timestamp,
+ NEW.CREATE_USER );
+
+ RETURN NEW;
+ END;
+$BODY$
+ LANGUAGE plpgsql VOLATILE
+ COST 100;
+ALTER FUNCTION PUBLIC.REF_BRANCH_LEVEL_INSERT_TRG()
+ OWNER TO PLGM_SERVICE;
+
+
+DROP TRIGGER IF EXISTS REF_BRANCH_LEVEL_INSERT_TRG ON PUBLIC.REF_BRANCH_LEVEL;
+
+CREATE TRIGGER REF_BRANCH_LEVEL_INSERT_TRG
+ BEFORE INSERT
+ ON PUBLIC.REF_BRANCH_LEVEL
+ FOR EACH ROW
+ EXECUTE PROCEDURE PUBLIC.REF_BRANCH_LEVEL_INSERT_TRG();
+
+
+
+-- PUBLIC.REF_BRANCH_LEVEL UPDATE TRIGGER --
+-- <GENERATED CODE!>
+
+CREATE OR REPLACE FUNCTION PUBLIC.REF_BRANCH_LEVEL_UPDATE_TRG()
+ RETURNS trigger AS
+$BODY$
+ BEGIN
+ INSERT INTO HREF_BRANCH_LEVEL (
+ ID,NAME,DESCRIPTION,FK_REF_BRANCH,CREATE_USER,CREATE_DATE,MOD_USER,MOD_DATE,
+
+ HACTION,
+ HDATE,
+ HUSER
+ )
+ VALUES (
+ NEW.ID,NEW.NAME,NEW.DESCRIPTION,NEW.FK_REF_BRANCH,NEW.CREATE_USER,NEW.CREATE_DATE,NEW.MOD_USER,NEW.MOD_DATE,
+ 2,
+ current_timestamp,
+ NEW.MOD_USER
+ );
+
+ RETURN NEW;
+ END;
+$BODY$
+ LANGUAGE plpgsql VOLATILE
+ COST 100;
+ALTER FUNCTION PUBLIC.REF_BRANCH_LEVEL_UPDATE_TRG()
+ OWNER TO PLGM_SERVICE;
+
+DROP TRIGGER IF EXISTS REF_BRANCH_LEVEL_UPDATE_TRG ON PUBLIC.REF_BRANCH_LEVEL;
+
+CREATE TRIGGER REF_BRANCH_LEVEL_UPDATE_TRG
+ BEFORE UPDATE
+ ON PUBLIC.REF_BRANCH_LEVEL
+ FOR EACH ROW
+ EXECUTE PROCEDURE PUBLIC.REF_BRANCH_LEVEL_UPDATE_TRG();
+
+
+
+-- PUBLIC.REF_BRANCH_LEVEL DELETE TRIGGER --
+-- <GENERATED CODE!>
+
+CREATE OR REPLACE FUNCTION PUBLIC.REF_BRANCH_LEVEL_DELETE_TRG()
+ RETURNS trigger AS
+$BODY$
+ BEGIN
+ IF TG_OP = 'DELETE' THEN
+ INSERT INTO HREF_BRANCH_LEVEL (
+
+ ID,NAME,DESCRIPTION,FK_REF_BRANCH,CREATE_USER,CREATE_DATE,MOD_USER,MOD_DATE,
+
+ HACTION,
+ HDATE,
+ HUSER
+ )
+ VALUES (
+ OLD.ID,OLD.NAME,OLD.DESCRIPTION,OLD.FK_REF_BRANCH,OLD.CREATE_USER,OLD.CREATE_DATE,OLD.MOD_USER,OLD.MOD_DATE,
+
+ 3,
+ current_timestamp,
+ OLD.MOD_USER );
+ END IF;
+
+ RETURN OLD;
+ END;
+$BODY$
+ LANGUAGE plpgsql VOLATILE
+ COST 100;
+ALTER FUNCTION PUBLIC.REF_BRANCH_LEVEL_DELETE_TRG()
+ OWNER TO PLGM_SERVICE;
+
+DROP TRIGGER IF EXISTS REF_BRANCH_LEVEL_DELETE_TRG ON PUBLIC.REF_BRANCH_LEVEL;
+
+CREATE TRIGGER REF_BRANCH_LEVEL_DELETE_TRG
+ BEFORE DELETE
+ ON PUBLIC.REF_BRANCH_LEVEL
+ FOR EACH ROW
+ EXECUTE PROCEDURE PUBLIC.REF_BRANCH_LEVEL_DELETE_TRG();
+
+
+
+
+
+-- PUBLIC.REF_GM_STATUS INSERT TRIGGER --
+-- <GENERATED CODE!>
+CREATE OR REPLACE FUNCTION PUBLIC.REF_GM_STATUS_INSERT_TRG()
+ RETURNS trigger AS
+$BODY$
+ BEGIN
+ INSERT INTO HREF_GM_STATUS (
+ ID,NAME,COLOR_CODE,CREATE_USER,CREATE_DATE,MOD_USER,MOD_DATE,
+
+ HACTION,
+ HDATE,
+ HUSER
+ )
+ VALUES (
+
+ NEW.ID,NEW.NAME,NEW.COLOR_CODE,NEW.CREATE_USER,NEW.CREATE_DATE,NEW.MOD_USER,NEW.MOD_DATE,
+
+ 1,
+ current_timestamp,
+ NEW.CREATE_USER );
+
+ RETURN NEW;
+ END;
+$BODY$
+ LANGUAGE plpgsql VOLATILE
+ COST 100;
+ALTER FUNCTION PUBLIC.REF_GM_STATUS_INSERT_TRG()
+ OWNER TO PLGM_SERVICE;
+
+
+DROP TRIGGER IF EXISTS REF_GM_STATUS_INSERT_TRG ON PUBLIC.REF_GM_STATUS;
+
+CREATE TRIGGER REF_GM_STATUS_INSERT_TRG
+ BEFORE INSERT
+ ON PUBLIC.REF_GM_STATUS
+ FOR EACH ROW
+ EXECUTE PROCEDURE PUBLIC.REF_GM_STATUS_INSERT_TRG();
+
+
+
+-- PUBLIC.REF_GM_STATUS UPDATE TRIGGER --
+-- <GENERATED CODE!>
+
+CREATE OR REPLACE FUNCTION PUBLIC.REF_GM_STATUS_UPDATE_TRG()
+ RETURNS trigger AS
+$BODY$
+ BEGIN
+ INSERT INTO HREF_GM_STATUS (
+ ID,NAME,COLOR_CODE,CREATE_USER,CREATE_DATE,MOD_USER,MOD_DATE,
+
+ HACTION,
+ HDATE,
+ HUSER
+ )
+ VALUES (
+ NEW.ID,NEW.NAME,NEW.COLOR_CODE,NEW.CREATE_USER,NEW.CREATE_DATE,NEW.MOD_USER,NEW.MOD_DATE,
+ 2,
+ current_timestamp,
+ NEW.MOD_USER
+ );
+
+ RETURN NEW;
+ END;
+$BODY$
+ LANGUAGE plpgsql VOLATILE
+ COST 100;
+ALTER FUNCTION PUBLIC.REF_GM_STATUS_UPDATE_TRG()
+ OWNER TO PLGM_SERVICE;
+
+DROP TRIGGER IF EXISTS REF_GM_STATUS_UPDATE_TRG ON PUBLIC.REF_GM_STATUS;
+
+CREATE TRIGGER REF_GM_STATUS_UPDATE_TRG
+ BEFORE UPDATE
+ ON PUBLIC.REF_GM_STATUS
+ FOR EACH ROW
+ EXECUTE PROCEDURE PUBLIC.REF_GM_STATUS_UPDATE_TRG();
+
+
+
+-- PUBLIC.REF_GM_STATUS DELETE TRIGGER --
+-- <GENERATED CODE!>
+
+CREATE OR REPLACE FUNCTION PUBLIC.REF_GM_STATUS_DELETE_TRG()
+ RETURNS trigger AS
+$BODY$
+ BEGIN
+ IF TG_OP = 'DELETE' THEN
+ INSERT INTO HREF_GM_STATUS (
+
+ ID,NAME,COLOR_CODE,CREATE_USER,CREATE_DATE,MOD_USER,MOD_DATE,
+
+ HACTION,
+ HDATE,
+ HUSER
+ )
+ VALUES (
+ OLD.ID,OLD.NAME,OLD.COLOR_CODE,OLD.CREATE_USER,OLD.CREATE_DATE,OLD.MOD_USER,OLD.MOD_DATE,
+
+ 3,
+ current_timestamp,
+ OLD.MOD_USER );
+ END IF;
+
+ RETURN OLD;
+ END;
+$BODY$
+ LANGUAGE plpgsql VOLATILE
+ COST 100;
+ALTER FUNCTION PUBLIC.REF_GM_STATUS_DELETE_TRG()
+ OWNER TO PLGM_SERVICE;
+
+DROP TRIGGER IF EXISTS REF_GM_STATUS_DELETE_TRG ON PUBLIC.REF_GM_STATUS;
+
+CREATE TRIGGER REF_GM_STATUS_DELETE_TRG
+ BEFORE DELETE
+ ON PUBLIC.REF_GM_STATUS
+ FOR EACH ROW
+ EXECUTE PROCEDURE PUBLIC.REF_GM_STATUS_DELETE_TRG();
+
+
+
+
+
+
+
+
+-- PUBLIC.TBL_GRIDMEASURE INSERT TRIGGER --
+-- <GENERATED CODE!>
+CREATE OR REPLACE FUNCTION PUBLIC.TBL_GRIDMEASURE_INSERT_TRG()
+ RETURNS trigger AS
+$BODY$
+ BEGIN
+ INSERT INTO HTBL_GRIDMEASURE (
+ ID,ID_DESCRIPTIVE,TITLE,AFFECTED_RESOURCE,REMARK,EMAIL_ADDRESSES,FK_REF_GM_STATUS,SWITCHING_OBJECT,COST_CENTER,APPROVAL_BY,AREA_OF_SWITCHING,APPOINTMENT_REPETITION,APPOINTMENT_STARTDATE,APPOINTMENT_NUMBEROF,PLANNED_STARTTIME_FIRST_SINGLEMEASURE,ENDTIME_GRIDMEASURE,TIME_OF_REALLOCATION,DESCRIPTION,FK_REF_BRANCH,FK_REF_BRANCH_LEVEL,CREATE_USER,CREATE_USER_DEPARTMENT,CREATE_DATE,MOD_USER,MOD_USER_DEPARTMENT,MOD_DATE,
+
+ HACTION,
+ HDATE,
+ HUSER
+ )
+ VALUES (
+
+ NEW.ID,NEW.ID_DESCRIPTIVE,NEW.TITLE,NEW.AFFECTED_RESOURCE,NEW.REMARK,NEW.EMAIL_ADDRESSES,NEW.FK_REF_GM_STATUS,NEW.SWITCHING_OBJECT,NEW.COST_CENTER,NEW.APPROVAL_BY,NEW.AREA_OF_SWITCHING,NEW.APPOINTMENT_REPETITION,NEW.APPOINTMENT_STARTDATE,NEW.APPOINTMENT_NUMBEROF,NEW.PLANNED_STARTTIME_FIRST_SINGLEMEASURE,NEW.ENDTIME_GRIDMEASURE,NEW.TIME_OF_REALLOCATION,NEW.DESCRIPTION,NEW.FK_REF_BRANCH,NEW.FK_REF_BRANCH_LEVEL,NEW.CREATE_USER,NEW.CREATE_USER_DEPARTMENT,NEW.CREATE_DATE,NEW.MOD_USER,NEW.MOD_USER_DEPARTMENT,NEW.MOD_DATE,
+
+ 1,
+ current_timestamp,
+ NEW.CREATE_USER );
+
+ RETURN NEW;
+ END;
+$BODY$
+ LANGUAGE plpgsql VOLATILE
+ COST 100;
+ALTER FUNCTION PUBLIC.TBL_GRIDMEASURE_INSERT_TRG()
+ OWNER TO PLGM_SERVICE;
+
+
+DROP TRIGGER IF EXISTS TBL_GRIDMEASURE_INSERT_TRG ON PUBLIC.TBL_GRIDMEASURE;
+
+CREATE TRIGGER TBL_GRIDMEASURE_INSERT_TRG
+ BEFORE INSERT
+ ON PUBLIC.TBL_GRIDMEASURE
+ FOR EACH ROW
+ EXECUTE PROCEDURE PUBLIC.TBL_GRIDMEASURE_INSERT_TRG();
+
+
+
+-- PUBLIC.TBL_GRIDMEASURE UPDATE TRIGGER --
+-- <GENERATED CODE!>
+
+CREATE OR REPLACE FUNCTION PUBLIC.TBL_GRIDMEASURE_UPDATE_TRG()
+ RETURNS trigger AS
+$BODY$
+ BEGIN
+ INSERT INTO HTBL_GRIDMEASURE (
+ ID,ID_DESCRIPTIVE,TITLE,AFFECTED_RESOURCE,REMARK,EMAIL_ADDRESSES,FK_REF_GM_STATUS,SWITCHING_OBJECT,COST_CENTER,APPROVAL_BY,AREA_OF_SWITCHING,APPOINTMENT_REPETITION,APPOINTMENT_STARTDATE,APPOINTMENT_NUMBEROF,PLANNED_STARTTIME_FIRST_SINGLEMEASURE,ENDTIME_GRIDMEASURE,TIME_OF_REALLOCATION,DESCRIPTION,FK_REF_BRANCH,FK_REF_BRANCH_LEVEL,CREATE_USER,CREATE_USER_DEPARTMENT,CREATE_DATE,MOD_USER,MOD_USER_DEPARTMENT,MOD_DATE,
+
+ HACTION,
+ HDATE,
+ HUSER
+ )
+ VALUES (
+ NEW.ID,NEW.ID_DESCRIPTIVE,NEW.TITLE,NEW.AFFECTED_RESOURCE,NEW.REMARK,NEW.EMAIL_ADDRESSES,NEW.FK_REF_GM_STATUS,NEW.SWITCHING_OBJECT,NEW.COST_CENTER,NEW.APPROVAL_BY,NEW.AREA_OF_SWITCHING,NEW.APPOINTMENT_REPETITION,NEW.APPOINTMENT_STARTDATE,NEW.APPOINTMENT_NUMBEROF,NEW.PLANNED_STARTTIME_FIRST_SINGLEMEASURE,NEW.ENDTIME_GRIDMEASURE,NEW.TIME_OF_REALLOCATION,NEW.DESCRIPTION,NEW.FK_REF_BRANCH,NEW.FK_REF_BRANCH_LEVEL,NEW.CREATE_USER,NEW.CREATE_USER_DEPARTMENT,NEW.CREATE_DATE,NEW.MOD_USER,NEW.MOD_USER_DEPARTMENT,NEW.MOD_DATE,
+ 2,
+ current_timestamp,
+ NEW.MOD_USER
+ );
+
+ RETURN NEW;
+ END;
+$BODY$
+ LANGUAGE plpgsql VOLATILE
+ COST 100;
+ALTER FUNCTION PUBLIC.TBL_GRIDMEASURE_UPDATE_TRG()
+ OWNER TO PLGM_SERVICE;
+
+DROP TRIGGER IF EXISTS TBL_GRIDMEASURE_UPDATE_TRG ON PUBLIC.TBL_GRIDMEASURE;
+
+CREATE TRIGGER TBL_GRIDMEASURE_UPDATE_TRG
+ BEFORE UPDATE
+ ON PUBLIC.TBL_GRIDMEASURE
+ FOR EACH ROW
+ EXECUTE PROCEDURE PUBLIC.TBL_GRIDMEASURE_UPDATE_TRG();
+
+
+
+-- PUBLIC.TBL_GRIDMEASURE DELETE TRIGGER --
+-- <GENERATED CODE!>
+
+CREATE OR REPLACE FUNCTION PUBLIC.TBL_GRIDMEASURE_DELETE_TRG()
+ RETURNS trigger AS
+$BODY$
+ BEGIN
+ IF TG_OP = 'DELETE' THEN
+ INSERT INTO HTBL_GRIDMEASURE (
+
+ ID,ID_DESCRIPTIVE,TITLE,AFFECTED_RESOURCE,REMARK,EMAIL_ADDRESSES,FK_REF_GM_STATUS,SWITCHING_OBJECT,COST_CENTER,APPROVAL_BY,AREA_OF_SWITCHING,APPOINTMENT_REPETITION,APPOINTMENT_STARTDATE,APPOINTMENT_NUMBEROF,PLANNED_STARTTIME_FIRST_SINGLEMEASURE,ENDTIME_GRIDMEASURE,TIME_OF_REALLOCATION,DESCRIPTION,FK_REF_BRANCH,FK_REF_BRANCH_LEVEL,CREATE_USER,CREATE_USER_DEPARTMENT,CREATE_DATE,MOD_USER,MOD_USER_DEPARTMENT,MOD_DATE,
+
+ HACTION,
+ HDATE,
+ HUSER
+ )
+ VALUES (
+ OLD.ID,OLD.ID_DESCRIPTIVE,OLD.TITLE,OLD.AFFECTED_RESOURCE,OLD.REMARK,OLD.EMAIL_ADDRESSES,OLD.FK_REF_GM_STATUS,OLD.SWITCHING_OBJECT,OLD.COST_CENTER,OLD.APPROVAL_BY,OLD.AREA_OF_SWITCHING,OLD.APPOINTMENT_REPETITION,OLD.APPOINTMENT_STARTDATE,OLD.APPOINTMENT_NUMBEROF,OLD.PLANNED_STARTTIME_FIRST_SINGLEMEASURE,OLD.ENDTIME_GRIDMEASURE,OLD.TIME_OF_REALLOCATION,OLD.DESCRIPTION,OLD.FK_REF_BRANCH,OLD.FK_REF_BRANCH_LEVEL,OLD.CREATE_USER,OLD.CREATE_USER_DEPARTMENT,OLD.CREATE_DATE,OLD.MOD_USER,OLD.MOD_USER_DEPARTMENT,OLD.MOD_DATE,
+
+ 3,
+ current_timestamp,
+ OLD.MOD_USER );
+ END IF;
+
+ RETURN OLD;
+ END;
+$BODY$
+ LANGUAGE plpgsql VOLATILE
+ COST 100;
+ALTER FUNCTION PUBLIC.TBL_GRIDMEASURE_DELETE_TRG()
+ OWNER TO PLGM_SERVICE;
+
+DROP TRIGGER IF EXISTS TBL_GRIDMEASURE_DELETE_TRG ON PUBLIC.TBL_GRIDMEASURE;
+
+CREATE TRIGGER TBL_GRIDMEASURE_DELETE_TRG
+ BEFORE DELETE
+ ON PUBLIC.TBL_GRIDMEASURE
+ FOR EACH ROW
+ EXECUTE PROCEDURE PUBLIC.TBL_GRIDMEASURE_DELETE_TRG();
+
+
+-- PUBLIC.TBL_DOCUMENTS INSERT TRIGGER --
+-- <GENERATED CODE!>
+CREATE OR REPLACE FUNCTION PUBLIC.TBL_DOCUMENTS_INSERT_TRG()
+ RETURNS trigger AS
+$BODY$
+ BEGIN
+ INSERT INTO HTBL_DOCUMENTS (
+ ID,DOCUMENT_NAME,CREATE_USER,CREATE_DATE,MOD_USER,MOD_DATE,
+
+ HACTION,
+ HDATE,
+ HUSER
+ )
+ VALUES (
+
+ NEW.ID,NEW.DOCUMENT_NAME,NEW.CREATE_USER,NEW.CREATE_DATE,NEW.MOD_USER,NEW.MOD_DATE,
+
+ 1,
+ current_timestamp,
+ NEW.CREATE_USER );
+
+ RETURN NEW;
+ END;
+$BODY$
+ LANGUAGE plpgsql VOLATILE
+ COST 100;
+ALTER FUNCTION PUBLIC.TBL_DOCUMENTS_INSERT_TRG()
+ OWNER TO PLGM_SERVICE;
+
+
+DROP TRIGGER IF EXISTS TBL_DOCUMENTS_INSERT_TRG ON PUBLIC.TBL_DOCUMENTS;
+
+CREATE TRIGGER TBL_DOCUMENTS_INSERT_TRG
+ BEFORE INSERT
+ ON PUBLIC.TBL_DOCUMENTS
+ FOR EACH ROW
+ EXECUTE PROCEDURE PUBLIC.TBL_DOCUMENTS_INSERT_TRG();
+
+
+
+-- PUBLIC.TBL_DOCUMENTS UPDATE TRIGGER --
+-- <GENERATED CODE!>
+
+CREATE OR REPLACE FUNCTION PUBLIC.TBL_DOCUMENTS_UPDATE_TRG()
+ RETURNS trigger AS
+$BODY$
+ BEGIN
+ INSERT INTO HTBL_DOCUMENTS (
+ ID,DOCUMENT_NAME,CREATE_USER,CREATE_DATE,MOD_USER,MOD_DATE,
+
+ HACTION,
+ HDATE,
+ HUSER
+ )
+ VALUES (
+ NEW.ID,NEW.DOCUMENT_NAME,NEW.CREATE_USER,NEW.CREATE_DATE,NEW.MOD_USER,NEW.MOD_DATE,
+ 2,
+ current_timestamp,
+ NEW.MOD_USER
+ );
+
+ RETURN NEW;
+ END;
+$BODY$
+ LANGUAGE plpgsql VOLATILE
+ COST 100;
+ALTER FUNCTION PUBLIC.TBL_DOCUMENTS_UPDATE_TRG()
+ OWNER TO PLGM_SERVICE;
+
+DROP TRIGGER IF EXISTS TBL_DOCUMENTS_UPDATE_TRG ON PUBLIC.TBL_DOCUMENTS;
+
+CREATE TRIGGER TBL_DOCUMENTS_UPDATE_TRG
+ BEFORE UPDATE
+ ON PUBLIC.TBL_DOCUMENTS
+ FOR EACH ROW
+ EXECUTE PROCEDURE PUBLIC.TBL_DOCUMENTS_UPDATE_TRG();
+
+
+
+-- PUBLIC.TBL_DOCUMENTS DELETE TRIGGER --
+-- <GENERATED CODE!>
+
+CREATE OR REPLACE FUNCTION PUBLIC.TBL_DOCUMENTS_DELETE_TRG()
+ RETURNS trigger AS
+$BODY$
+ BEGIN
+ IF TG_OP = 'DELETE' THEN
+ INSERT INTO HTBL_DOCUMENTS (
+
+ ID,DOCUMENT_NAME,CREATE_USER,CREATE_DATE,MOD_USER,MOD_DATE,
+
+ HACTION,
+ HDATE,
+ HUSER
+ )
+ VALUES (
+ OLD.ID,OLD.DOCUMENT_NAME,OLD.CREATE_USER,OLD.CREATE_DATE,OLD.MOD_USER,OLD.MOD_DATE,
+
+ 3,
+ current_timestamp,
+ OLD.MOD_USER );
+ END IF;
+
+ RETURN OLD;
+ END;
+$BODY$
+ LANGUAGE plpgsql VOLATILE
+ COST 100;
+ALTER FUNCTION PUBLIC.TBL_DOCUMENTS_DELETE_TRG()
+ OWNER TO PLGM_SERVICE;
+
+DROP TRIGGER IF EXISTS TBL_DOCUMENTS_DELETE_TRG ON PUBLIC.TBL_DOCUMENTS;
+
+CREATE TRIGGER TBL_DOCUMENTS_DELETE_TRG
+ BEFORE DELETE
+ ON PUBLIC.TBL_DOCUMENTS
+ FOR EACH ROW
+ EXECUTE PROCEDURE PUBLIC.TBL_DOCUMENTS_DELETE_TRG();
+
+
+
+
+
+
+-- PUBLIC.TBL_MEASURE_DOCUMENTS INSERT TRIGGER --
+-- <GENERATED CODE!>
+CREATE OR REPLACE FUNCTION PUBLIC.TBL_MEASURE_DOCUMENTS_INSERT_TRG()
+ RETURNS trigger AS
+$BODY$
+ BEGIN
+ INSERT INTO HTBL_MEASURE_DOCUMENTS (
+ ID,FK_TBL_MEASURE,FK_TBL_DOCUMENTS,CREATE_USER,CREATE_DATE,MOD_USER,MOD_DATE,
+
+ HACTION,
+ HDATE,
+ HUSER
+ )
+ VALUES (
+
+ NEW.ID,NEW.FK_TBL_MEASURE,NEW.FK_TBL_DOCUMENTS,NEW.CREATE_USER,NEW.CREATE_DATE,NEW.MOD_USER,NEW.MOD_DATE,
+
+ 1,
+ current_timestamp,
+ NEW.CREATE_USER );
+
+ RETURN NEW;
+ END;
+$BODY$
+ LANGUAGE plpgsql VOLATILE
+ COST 100;
+ALTER FUNCTION PUBLIC.TBL_MEASURE_DOCUMENTS_INSERT_TRG()
+ OWNER TO PLGM_SERVICE;
+
+
+DROP TRIGGER IF EXISTS TBL_MEASURE_DOCUMENTS_INSERT_TRG ON PUBLIC.TBL_MEASURE_DOCUMENTS;
+
+CREATE TRIGGER TBL_MEASURE_DOCUMENTS_INSERT_TRG
+ BEFORE INSERT
+ ON PUBLIC.TBL_MEASURE_DOCUMENTS
+ FOR EACH ROW
+ EXECUTE PROCEDURE PUBLIC.TBL_MEASURE_DOCUMENTS_INSERT_TRG();
+
+
+
+-- PUBLIC.TBL_MEASURE_DOCUMENTS UPDATE TRIGGER --
+-- <GENERATED CODE!>
+
+CREATE OR REPLACE FUNCTION PUBLIC.TBL_MEASURE_DOCUMENTS_UPDATE_TRG()
+ RETURNS trigger AS
+$BODY$
+ BEGIN
+ INSERT INTO HTBL_MEASURE_DOCUMENTS (
+ ID,FK_TBL_MEASURE,FK_TBL_DOCUMENTS,CREATE_USER,CREATE_DATE,MOD_USER,MOD_DATE,
+
+ HACTION,
+ HDATE,
+ HUSER
+ )
+ VALUES (
+ NEW.ID,NEW.FK_TBL_MEASURE,NEW.FK_TBL_DOCUMENTS,NEW.CREATE_USER,NEW.CREATE_DATE,NEW.MOD_USER,NEW.MOD_DATE,
+ 2,
+ current_timestamp,
+ NEW.MOD_USER
+ );
+
+ RETURN NEW;
+ END;
+$BODY$
+ LANGUAGE plpgsql VOLATILE
+ COST 100;
+ALTER FUNCTION PUBLIC.TBL_MEASURE_DOCUMENTS_UPDATE_TRG()
+ OWNER TO PLGM_SERVICE;
+
+DROP TRIGGER IF EXISTS TBL_MEASURE_DOCUMENTS_UPDATE_TRG ON PUBLIC.TBL_MEASURE_DOCUMENTS;
+
+CREATE TRIGGER TBL_MEASURE_DOCUMENTS_UPDATE_TRG
+ BEFORE UPDATE
+ ON PUBLIC.TBL_MEASURE_DOCUMENTS
+ FOR EACH ROW
+ EXECUTE PROCEDURE PUBLIC.TBL_MEASURE_DOCUMENTS_UPDATE_TRG();
+
+
+
+-- PUBLIC.TBL_MEASURE_DOCUMENTS DELETE TRIGGER --
+-- <GENERATED CODE!>
+
+CREATE OR REPLACE FUNCTION PUBLIC.TBL_MEASURE_DOCUMENTS_DELETE_TRG()
+ RETURNS trigger AS
+$BODY$
+ BEGIN
+ IF TG_OP = 'DELETE' THEN
+ INSERT INTO HTBL_MEASURE_DOCUMENTS (
+
+ ID,FK_TBL_MEASURE,FK_TBL_DOCUMENTS,CREATE_USER,CREATE_DATE,MOD_USER,MOD_DATE,
+
+ HACTION,
+ HDATE,
+ HUSER
+ )
+ VALUES (
+ OLD.ID,OLD.FK_TBL_MEASURE,OLD.FK_TBL_DOCUMENTS,OLD.CREATE_USER,OLD.CREATE_DATE,OLD.MOD_USER,OLD.MOD_DATE,
+
+ 3,
+ current_timestamp,
+ OLD.MOD_USER );
+ END IF;
+
+ RETURN OLD;
+ END;
+$BODY$
+ LANGUAGE plpgsql VOLATILE
+ COST 100;
+ALTER FUNCTION PUBLIC.TBL_MEASURE_DOCUMENTS_DELETE_TRG()
+ OWNER TO PLGM_SERVICE;
+
+DROP TRIGGER IF EXISTS TBL_MEASURE_DOCUMENTS_DELETE_TRG ON PUBLIC.TBL_MEASURE_DOCUMENTS;
+
+CREATE TRIGGER TBL_MEASURE_DOCUMENTS_DELETE_TRG
+ BEFORE DELETE
+ ON PUBLIC.TBL_MEASURE_DOCUMENTS
+ FOR EACH ROW
+ EXECUTE PROCEDURE PUBLIC.TBL_MEASURE_DOCUMENTS_DELETE_TRG();
diff --git a/db/migrations/V0_45__CREATE_PLGM_DB.sql b/db/migrations/V0_45__CREATE_PLGM_DB.sql
new file mode 100644
index 0000000..793fde4
--- /dev/null
+++ b/db/migrations/V0_45__CREATE_PLGM_DB.sql
@@ -0,0 +1,3381 @@
+
+--Field COLOR_CODE added in Table REF_GM_STATUS, HREF_GM_STATUS, Insert-, Delete-, and Update-Triggers
+
+-- ---------------------------------------------
+-- DROPS
+-- ---------------------------------------------
+DROP TABLE IF EXISTS public.TBL_STEPS;
+DROP SEQUENCE IF EXISTS public.TBL_STEPS_ID_SEQ;
+
+DROP TABLE IF EXISTS public.TBL_SINGLE_GRIDMEASURE;
+DROP SEQUENCE IF EXISTS public.TBL_SINGLE_GRIDMEASURE_ID_SEQ;
+
+DROP TABLE IF EXISTS public.TBL_LOCK CASCADE;
+DROP SEQUENCE IF EXISTS public.TBL_LOCK_ID_SEQ;
+
+DROP TABLE IF EXISTS public.REF_USER_SETTINGS CASCADE;
+DROP SEQUENCE IF EXISTS public.REF_USER_SETTINGS_ID_SEQ;
+
+DROP TABLE IF EXISTS public.TBL_USER_SETTINGS CASCADE;
+DROP SEQUENCE IF EXISTS public.TBL_USER_SETTINGS_ID_SEQ;
+
+DROP TABLE IF EXISTS public.REF_COST_CENTER CASCADE;
+DROP SEQUENCE IF EXISTS public.REF_COST_CENTER_ID_SEQ;
+
+DROP TABLE IF EXISTS public.TBL_GRIDMEASURE CASCADE;
+DROP SEQUENCE IF EXISTS public.TBL_GRIDMEASURE_ID_SEQ;
+
+DROP TABLE IF EXISTS public.REF_BRANCH CASCADE;
+DROP SEQUENCE IF EXISTS public.REF_BRANCH_ID_SEQ;
+
+DROP TABLE IF EXISTS public.REF_BRANCH_LEVEL CASCADE;
+DROP SEQUENCE IF EXISTS public.REF_BRANCH_LEVEL_ID_SEQ;
+
+DROP TABLE IF EXISTS public.REF_GM_STATUS CASCADE;
+DROP SEQUENCE IF EXISTS public.REF_GM_STATUS_ID_SEQ;
+
+DROP TABLE IF EXISTS public.tbl_documents CASCADE;
+DROP SEQUENCE IF EXISTS public.tbl_documents_id_seq;
+
+DROP TABLE IF EXISTS public.tbl_measure_documents CASCADE;
+DROP SEQUENCE IF EXISTS public.tbl_measure_documents_id_seq;
+
+DROP TABLE IF EXISTS public.tbl_id_counter CASCADE;
+DROP SEQUENCE IF EXISTS public.tbl_id_counter_id_seq;
+
+DROP TABLE IF EXISTS public.REF_TERRITORY CASCADE;
+DROP SEQUENCE IF EXISTS public.REF_TERRITORY_ID_SEQ;
+
+
+DROP INDEX IF EXISTS public.huser_index;
+
+-- ---------------------------------------------
+-- TABLE REF_TERRITORY
+-- ---------------------------------------------
+
+CREATE SEQUENCE public.REF_TERRITORY_ID_SEQ
+ INCREMENT 1
+ MINVALUE 1
+ MAXVALUE 9223372036854775807
+ START 1
+ CACHE 1;
+ALTER TABLE public.REF_TERRITORY_ID_SEQ
+ OWNER TO plgm_service;
+
+
+CREATE TABLE public.REF_TERRITORY
+(
+ id integer NOT NULL DEFAULT nextval('REF_TERRITORY_ID_SEQ'::regclass),
+ name character varying(50) NOT NULL,
+ description character varying(255),
+ create_user character varying(100) NOT NULL,
+ create_date timestamp without time zone NOT NULL,
+ mod_user character varying(100),
+ mod_date timestamp without time zone,
+ CONSTRAINT REF_TERRITORY_pkey PRIMARY KEY (id)
+)
+WITH (
+ OIDS=FALSE
+);
+ALTER TABLE public.REF_TERRITORY
+ OWNER TO plgm_service;
+GRANT ALL ON TABLE public.REF_TERRITORY TO plgm_service;
+
+INSERT INTO public.REF_TERRITORY(
+ name, description, create_user, create_date, mod_user, mod_date)
+ VALUES ('Nord', 'Region Nord', 'testuser','12.04.2018','testuser','12.04.2018');
+INSERT INTO public.REF_TERRITORY(
+ name, description, create_user, create_date, mod_user, mod_date)
+ VALUES ('Ost', 'Region Ost', 'testuser','12.04.2018','testuser','12.04.2018');
+INSERT INTO public.REF_TERRITORY(
+ name, description, create_user, create_date, mod_user, mod_date)
+ VALUES ('SUED', 'Region SUED', 'testuser','12.04.2018','testuser','12.04.2018');
+
+
+
+-- ---------------------------------------------
+-- TABLE TBL_LOCK
+-- ---------------------------------------------
+
+CREATE SEQUENCE public.TBL_LOCK_ID_SEQ
+ INCREMENT 1
+ MINVALUE 1
+ MAXVALUE 9223372036854775807
+ START 1
+ CACHE 1;
+ALTER TABLE public.TBL_LOCK_ID_SEQ
+ OWNER TO plgm_service;
+
+CREATE TABLE public.tbl_lock
+(
+ id integer NOT NULL DEFAULT nextval('TBL_LOCK_ID_SEQ'::regclass),
+ key integer NOT NULL, -- Id from tbl_gridmeasure
+ username character varying(50) NOT NULL,
+ info character varying(256),
+ create_user character varying(100) NOT NULL,
+ create_date timestamp without time zone NOT NULL,
+ mod_user character varying(100),
+ mod_date timestamp without time zone,
+ CONSTRAINT tbl_lock_pkey PRIMARY KEY (id)
+)
+WITH (
+ OIDS=FALSE
+);
+ALTER TABLE public.tbl_lock
+ OWNER TO plgm_service;
+GRANT ALL ON TABLE public.tbl_lock TO plgm_service;
+
+CREATE UNIQUE INDEX tbl_lock_unique_key ON public.tbl_lock (key ASC, info ASC );
+
+-- ---------------------------------------------
+-- TABLE TBL_USER_SETTINGS
+-- ---------------------------------------------
+
+CREATE SEQUENCE public.tbl_user_settings_id_seq
+ INCREMENT 1
+ MINVALUE 1
+ MAXVALUE 9223372036854775807
+ START 1
+ CACHE 1;
+ALTER TABLE public.tbl_user_settings_id_seq
+ OWNER TO plgm_service;
+
+CREATE TABLE public.tbl_user_settings
+(
+ id integer NOT NULL DEFAULT nextval('tbl_user_settings_id_seq'::regclass),
+ username character varying(50) NOT NULL,
+ setting_type character varying(50),
+ value character varying(4096),
+ create_user character varying(100) NOT NULL,
+ create_date timestamp without time zone NOT NULL,
+ mod_user character varying(100),
+ mod_date timestamp without time zone,
+ CONSTRAINT tbl_user_settings_pkey PRIMARY KEY (id)
+)
+WITH (
+ OIDS=FALSE
+);
+ALTER TABLE public.tbl_user_settings
+ OWNER TO plgm_service;
+GRANT ALL ON TABLE public.tbl_user_settings TO plgm_service;
+
+CREATE UNIQUE INDEX tbl_user_set_unique_key ON public.tbl_user_settings (username ASC, setting_type ASC );
+
+
+
+-- ---------------------------------------------
+-- TABLE TBL_ID_COUNTER
+-- ---------------------------------------------
+
+CREATE SEQUENCE public.tbl_id_counter_id_seq
+ INCREMENT 1
+ MINVALUE 1
+ MAXVALUE 9223372036854775807
+ START 1
+ CACHE 1;
+ALTER TABLE public.tbl_id_counter_id_seq
+ OWNER TO plgm_service;
+
+CREATE TABLE public.tbl_id_counter
+(
+ id integer NOT NULL DEFAULT nextval('tbl_id_counter_id_seq'::regclass),
+ counter integer NOT NULL,
+ counter_type character varying(256),
+ info character varying(256),
+ create_user character varying(100) NOT NULL,
+ create_date timestamp without time zone NOT NULL,
+ mod_user character varying(100),
+ mod_date timestamp without time zone,
+ CONSTRAINT tbl_id_counter_pkey PRIMARY KEY (id)
+)
+WITH (
+ OIDS=FALSE
+);
+ALTER TABLE public.tbl_id_counter
+ OWNER TO plgm_service;
+GRANT ALL ON TABLE public.tbl_id_counter TO plgm_service;
+
+
+-- ---------------------------------------------
+-- TABLE REF_COST_CENTER
+-- ---------------------------------------------
+
+CREATE SEQUENCE public.REF_COST_CENTER_ID_SEQ
+ INCREMENT 1
+ MINVALUE 1
+ MAXVALUE 9223372036854775807
+ START 1
+ CACHE 1;
+ALTER TABLE public.REF_COST_CENTER_ID_SEQ
+ OWNER TO plgm_service;
+
+
+CREATE TABLE public.REF_COST_CENTER
+(
+ id integer NOT NULL DEFAULT nextval('REF_COST_CENTER_id_seq'::regclass),
+ name character varying(50) NOT NULL,
+ description character varying(255),
+ create_user character varying(100) NOT NULL,
+ create_date timestamp without time zone NOT NULL,
+ mod_user character varying(100),
+ mod_date timestamp without time zone,
+ CONSTRAINT REF_COST_CENTER_pkey PRIMARY KEY (id)
+)
+WITH (
+ OIDS=FALSE
+);
+ALTER TABLE public.REF_COST_CENTER
+ OWNER TO plgm_service;
+GRANT ALL ON TABLE public.REF_COST_CENTER TO plgm_service;
+
+INSERT INTO public.ref_cost_center(
+ name, description, create_user, create_date, mod_user, mod_date)
+ VALUES ('K-155', 'Kostenstelle der Abteilung abc', 'testuser','12.04.2018','testuser','12.04.2018');
+INSERT INTO public.ref_cost_center(
+ name, description, create_user, create_date, mod_user, mod_date)
+ VALUES ('K-004', 'Kostenstelle der Abteilung xyz', 'testuser','12.04.2018','testuser','12.04.2018');
+INSERT INTO public.ref_cost_center(
+ name, description, create_user, create_date, mod_user, mod_date)
+ VALUES ('K-222', 'Kostenstelle der Abteilung hij', 'testuser','12.04.2018','testuser','12.04.2018');
+
+-- ---------------------------------------------
+-- TABLE REF_BRANCH
+-- ---------------------------------------------
+CREATE SEQUENCE public.REF_BRANCH_ID_SEQ
+ INCREMENT 1
+ MINVALUE 1
+ MAXVALUE 9223372036854775807
+ START 1
+ CACHE 1;
+
+ALTER TABLE public.REF_BRANCH_ID_SEQ
+ OWNER TO PLGM_SERVICE;
+
+CREATE TABLE public.REF_BRANCH
+(
+ ID integer NOT NULL DEFAULT nextval('REF_BRANCH_ID_SEQ'::regclass),
+ NAME character varying(50) NOT NULL,
+ DESCRIPTION character varying(255),
+ COLOR_CODE character varying(20),
+ CREATE_USER character varying(100) NOT NULL,
+ CREATE_DATE timestamp without time zone NOT NULL,
+ MOD_USER character varying(100),
+ MOD_DATE timestamp without time zone,
+ CONSTRAINT REF_BRANCH_PKEY PRIMARY KEY (id)
+)
+WITH (
+ OIDS=FALSE
+);
+
+ALTER TABLE public.REF_BRANCH
+ OWNER TO PLGM_SERVICE;
+GRANT ALL ON TABLE public.REF_BRANCH TO PLGM_SERVICE;
+
+INSERT INTO public.ref_branch(name, description, color_code, create_user, create_date, mod_user, mod_date)
+ VALUES ('S', 'Strom', '#fc6042','testuser', '12.04.2018', 'testuser', '12.04.2018');
+INSERT INTO public.ref_branch(name, description, color_code, create_user, create_date, mod_user, mod_date)
+ VALUES ('G', 'Gas', '#fdea64', 'testuser', '12.04.2018', 'testuser', '12.04.2018');
+INSERT INTO public.ref_branch(name, description, color_code, create_user, create_date, mod_user, mod_date)
+ VALUES ('F', 'Fernwärme', '#2cc990', 'testuser', '12.04.2018', 'testuser', '12.04.2018');
+INSERT INTO public.ref_branch(name, description, color_code, create_user, create_date, mod_user, mod_date)
+ VALUES ('W', 'Wasser', '#2c82c9', 'testuser', '12.04.2018', 'testuser', '12.04.2018');
+-- ---------------------------------------------
+-- TABLE REF_BRANCH_LEVEL
+-- ---------------------------------------------
+CREATE SEQUENCE public.ref_branch_level_id_seq
+ INCREMENT 1
+ MINVALUE 1
+ MAXVALUE 9223372036854775807
+ START 1
+ CACHE 1;
+ALTER TABLE public.ref_branch_level_id_seq
+ OWNER TO plgm_service;
+
+CREATE TABLE public.ref_branch_level
+(
+ id integer NOT NULL DEFAULT nextval('ref_branch_level_id_seq'::regclass),
+ name character varying(50) NOT NULL,
+ description character varying(255),
+ fk_ref_branch integer NULL,
+ create_user character varying(100) NOT NULL,
+ create_date timestamp without time zone NOT NULL,
+ mod_user character varying(100),
+ mod_date timestamp without time zone,
+ CONSTRAINT ref_branch_level_pkey PRIMARY KEY (id),
+ CONSTRAINT FK_REF_BRANCH_LEVEL__REF_BRANCH FOREIGN KEY (FK_REF_BRANCH)
+ REFERENCES public.REF_BRANCH (ID) MATCH SIMPLE
+ ON UPDATE NO ACTION ON DELETE NO ACTION
+)
+WITH (
+ OIDS=FALSE
+);
+ALTER TABLE public.ref_branch_level
+ OWNER TO plgm_service;
+GRANT ALL ON TABLE public.ref_branch_level TO plgm_service;
+
+INSERT INTO public.REF_BRANCH_LEVEL(
+ name, description, fk_ref_branch, create_user, create_date, mod_user, mod_date)
+ VALUES ('Strom Level1', 'eine Beschreibung', 1, 'testuser', '12.04.2018', 'testuser', '12.04.2018');
+INSERT INTO public.REF_BRANCH_LEVEL(
+ name, description, fk_ref_branch, create_user, create_date, mod_user, mod_date)
+ VALUES ('Strom Level2', 'eine Beschreibung', 1, 'testuser', '12.04.2018', 'testuser', '12.04.2018');
+INSERT INTO public.REF_BRANCH_LEVEL(
+ name, description, fk_ref_branch, create_user, create_date, mod_user, mod_date)
+ VALUES ('Strom Level3', 'eine Beschreibung', 1, 'testuser', '12.04.2018', 'testuser', '12.04.2018');
+INSERT INTO public.REF_BRANCH_LEVEL(
+ name, description, fk_ref_branch, create_user, create_date, mod_user, mod_date)
+ VALUES ('Gas Level1', 'eine Beschreibung', 2, 'testuser', '12.04.2018', 'testuser', '12.04.2018');
+INSERT INTO public.REF_BRANCH_LEVEL(
+ name, description, fk_ref_branch, create_user, create_date, mod_user, mod_date)
+ VALUES ('Gas Level2', 'noch eine Beschreibung', 2, 'testuser', '12.04.2018', 'testuser', '12.04.2018');
+INSERT INTO public.REF_BRANCH_LEVEL(
+ name, description, fk_ref_branch, create_user, create_date, mod_user, mod_date)
+ VALUES ('Fernwärme Level3', 'und noch eine Beschreibung', 3, 'testuser', '12.04.2018', 'testuser', '12.04.2018');
+
+-- ---------------------------------------------
+-- TABLE REF_GM_STATUS
+-- ---------------------------------------------
+CREATE SEQUENCE public.REF_GM_STATUS_ID_SEQ
+ INCREMENT 1
+ MINVALUE 1
+ MAXVALUE 9223372036854775807
+ START 1
+ CACHE 1;
+
+ALTER TABLE public.REF_GM_STATUS_ID_SEQ
+ OWNER TO PLGM_SERVICE;
+
+CREATE TABLE public.REF_GM_STATUS
+(
+ ID integer NOT NULL DEFAULT nextval('REF_GM_STATUS_ID_SEQ'::regclass),
+ NAME character varying(50) NOT NULL,
+ COLOR_CODE character varying(20),
+ CREATE_USER character varying(100) NOT NULL,
+ CREATE_DATE timestamp without time zone NOT NULL,
+ MOD_USER character varying(100),
+ MOD_DATE timestamp without time zone,
+ CONSTRAINT REF_GM_STATUS_PKEY PRIMARY KEY (id)
+)
+WITH (
+ OIDS=FALSE
+);
+
+ALTER TABLE public.REF_GM_STATUS
+ OWNER TO PLGM_SERVICE;
+GRANT ALL ON TABLE public.REF_GM_STATUS TO PLGM_SERVICE;
+
+INSERT INTO
+ public.REF_GM_STATUS(id, name, create_user, color_code, create_date, mod_user, mod_date)
+VALUES
+ (0,'Neu','system', '#79b61c', '09.04.2018','system','09.04.2018');
+INSERT INTO
+ public.REF_GM_STATUS(id, name, create_user, color_code, create_date, mod_user, mod_date)
+VALUES
+ (1,'Beantragt','system', '#6db12d', '09.04.2018','system','09.04.2018');
+INSERT INTO
+ public.REF_GM_STATUS(id, name, create_user, color_code, create_date, mod_user, mod_date)
+VALUES
+ (2,'Storniert','system', '#990000', '09.04.2018','system','09.04.2018');
+INSERT INTO
+ public.REF_GM_STATUS(id, name, create_user, color_code, create_date, mod_user, mod_date)
+VALUES
+ (3,'Zur Genehmigung','system', '#60ab3f', '09.04.2018','system','09.04.2018');
+INSERT INTO
+ public.REF_GM_STATUS(id, name, create_user, color_code, create_date, mod_user, mod_date)
+VALUES
+ (4,'Genehmigt','system', '#54a650', '09.04.2018','system','09.04.2018');
+INSERT INTO
+ public.REF_GM_STATUS(id, name, create_user, color_code, create_date, mod_user, mod_date)
+VALUES
+ (5,'Angefordert','system', '#379979', '09.04.2018','system','09.04.2018');
+INSERT INTO
+ public.REF_GM_STATUS(id, name, create_user, color_code, create_date, mod_user, mod_date)
+VALUES
+ (6,'Freigegeben','system', '#1c8d9f', '09.04.2018','system','09.04.2018');
+INSERT INTO
+ public.REF_GM_STATUS(id, name, create_user, color_code, create_date, mod_user, mod_date)
+VALUES
+ (7,'Schalten aktiv','system', '#1c8d9f', '09.04.2018','system','09.04.2018');
+INSERT INTO
+ public.REF_GM_STATUS(id, name, create_user, color_code, create_date, mod_user, mod_date)
+VALUES
+ (8,'In Arbeit','system', '#0281c4', '09.04.2018','system','09.04.2018');
+INSERT INTO
+ public.REF_GM_STATUS(id, name, create_user, color_code, create_date, mod_user, mod_date)
+VALUES
+ (9,'Arbeit beendet','system', '#0281c4', '09.04.2018','system','09.04.2018');
+INSERT INTO
+ public.REF_GM_STATUS(id, name, create_user, color_code, create_date, mod_user, mod_date)
+VALUES
+ (10,'Maßnahme beendet','system', '#0281c4', '09.04.2018','system','09.04.2018');
+INSERT INTO
+ public.REF_GM_STATUS(id, name, create_user, color_code, create_date, mod_user, mod_date)
+VALUES
+ (11,'Geschlossen','system', '#0281c4', '09.04.2018','system','09.04.2018');
+INSERT INTO
+ public.REF_GM_STATUS(id, name, create_user, color_code, create_date, mod_user, mod_date)
+VALUES
+ (12,'Abgelehnt','system', '#990000', '17.06.2018','system','17.06.2018');
+
+
+
+-- ---------------------------------------------
+-- TABLE TBL_GRIDMEASURE
+-- ---------------------------------------------
+-- REQUESTER_NAME COLUMN DELETED--
+CREATE SEQUENCE public.TBL_GRIDMEASURE_ID_SEQ
+ INCREMENT 1
+ MINVALUE 1
+ MAXVALUE 9223372036854775807
+ START 1
+ CACHE 1;
+
+ALTER TABLE public.TBL_GRIDMEASURE_ID_SEQ
+ OWNER TO PLGM_SERVICE;
+
+CREATE TABLE public.tbl_gridmeasure
+(
+ id integer NOT NULL DEFAULT nextval('tbl_gridmeasure_id_seq'::regclass),
+ id_descriptive character varying(50),
+ title character varying(256),
+ affected_resource character varying(256),
+ remark character varying(1024),
+ email_addresses character varying(1024),
+ fk_ref_gm_status integer,
+ switching_object character varying(256),
+ cost_center character varying(50),
+ approval_by character varying(256),
+ area_of_switching character varying(256),
+ appointment_repetition character varying(100),
+ appointment_startdate timestamp without time zone,
+ appointment_numberof integer,
+ planned_starttime_first_singlemeasure timestamp without time zone,
+ endtime_gridmeasure timestamp without time zone,
+ time_of_reallocation character varying(100),
+ description character varying(1024),
+ fk_ref_branch integer,
+ fk_ref_branch_level integer,
+ create_user character varying(100) NOT NULL,
+ create_user_department character varying(100),
+ create_date timestamp without time zone NOT NULL,
+ mod_user character varying(100),
+ mod_user_department character varying(100),
+ mod_date timestamp without time zone,
+ CONSTRAINT tbl_gridmeasure_pkey PRIMARY KEY (id),
+ CONSTRAINT fk_gridmeasure__gm_status FOREIGN KEY (fk_ref_gm_status)
+ REFERENCES public.ref_gm_status (id) MATCH SIMPLE
+ ON UPDATE NO ACTION ON DELETE NO ACTION,
+ CONSTRAINT fk_gridmeasure__branch FOREIGN KEY (fk_ref_branch)
+ REFERENCES public.ref_branch (id) MATCH SIMPLE
+ ON UPDATE NO ACTION ON DELETE NO ACTION,
+ CONSTRAINT fk_gridmeasure__branch_level FOREIGN KEY (fk_ref_branch_level)
+ REFERENCES public.ref_branch_level (id) MATCH SIMPLE
+ ON UPDATE NO ACTION ON DELETE NO ACTION
+)
+WITH (
+ OIDS=FALSE
+);
+ALTER TABLE public.tbl_gridmeasure
+ OWNER TO plgm_service;
+GRANT ALL ON TABLE public.tbl_gridmeasure TO plgm_service;
+
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+
+INSERT INTO public.tbl_gridmeasure(
+ id_descriptive, title, affected_resource, remark, email_addresses, fk_ref_gm_status,
+ switching_object, cost_center,
+ approval_by, area_of_switching, appointment_repetition, appointment_startdate,
+ appointment_numberof, planned_starttime_first_singlemeasure,
+ endtime_gridmeasure, time_of_reallocation, description, fk_ref_branch,
+ fk_ref_branch_level, create_user, create_user_department, create_date,
+ mod_user, mod_user_department, mod_date)
+ VALUES ('2018_1', 'Kabel erneuern', 'Kabel', 'Kabel defekt', 'mailingListRecipient@test.de; mailingList2Recipient@test.de', 0,
+ 'Kabel', 'K-155',
+ 'otto', 'Frankfurt', 'einmalig', '2018-06-14 15:15:00',
+ 7, '2018-06-10 16:30:00',
+ '2018-06-18 16:00:00', 'in zwei Tagen', 'Das Kabel austauschen', 1,
+ 1, 'otto', 'Abteilung abc', '2018-06-09 15:00:00',
+ 'otto', 'Abteilung abc', '2018-06-14 15:15:00');
+
+INSERT INTO public.tbl_gridmeasure(
+ id_descriptive, title, affected_resource, remark, email_addresses, fk_ref_gm_status,
+ switching_object, cost_center,
+ approval_by, area_of_switching, appointment_repetition, appointment_startdate,
+ appointment_numberof, planned_starttime_first_singlemeasure,
+ endtime_gridmeasure, time_of_reallocation, description, fk_ref_branch,
+ fk_ref_branch_level, create_user, create_user_department, create_date,
+ mod_user, mod_user_department, mod_date)
+ VALUES ('2018_2', 'Lampe erneuern', 'Lampe', 'Lampe defekt', 'mailingListRecipient@test.de; mailingList2Recipient@test.de', 1,
+ 'Lampe', 'K-004',
+ 'jasper', 'Mannheim', 'einmalig', '2018-06-16 15:15:00',
+ 3, '2018-06-12 16:30:00',
+ '2018-06-20 16:00:00', 'in zwei Tagen', 'Die Lampe austauschen', 2,
+ 1, 'jasper', 'Abteilung cde', '2018-06-11 15:00:00',
+ 'jasper', 'Abteilung cde', '2018-06-14 15:15:00');
+
+INSERT INTO public.tbl_gridmeasure(
+ id_descriptive, title, affected_resource, remark, email_addresses, fk_ref_gm_status,
+ switching_object, cost_center,
+ approval_by, area_of_switching, appointment_repetition, appointment_startdate,
+ appointment_numberof, planned_starttime_first_singlemeasure,
+ endtime_gridmeasure, time_of_reallocation, description, fk_ref_branch,
+ fk_ref_branch_level, create_user, create_user_department, create_date,
+ mod_user, mod_user_department, mod_date)
+ VALUES ('2018_3', 'Transformator erneuern', 'Transformator', 'Transformator defekt', 'mailingListRecipient@test.de; mailingList2Recipient@test.de', 2,
+ 'Transformator', 'K-222',
+ 'hugo', 'Murr', 'täglich', '2018-06-17 15:15:00',
+ 6, '2018-06-13 16:30:00',
+ '2018-06-21 16:00:00', 'in 8 Tagen', 'Den Transformator austauschen', 4,
+ 1, 'hugo', 'Abteilung xyz', '2018-06-12 15:00:00',
+ 'otto', 'Abteilung abc', '2018-06-17 15:15:00');
+
+INSERT INTO public.tbl_gridmeasure(
+ id_descriptive, title, affected_resource, remark, email_addresses, fk_ref_gm_status,
+ switching_object, cost_center,
+ approval_by, area_of_switching, appointment_repetition, appointment_startdate,
+ appointment_numberof, planned_starttime_first_singlemeasure,
+ endtime_gridmeasure, time_of_reallocation, description, fk_ref_branch,
+ fk_ref_branch_level, create_user, create_user_department, create_date,
+ mod_user, mod_user_department, mod_date)
+ VALUES ('2018_4', 'Transformator ersetzen', 'Transformator', 'Transformator kaputt', 'mailingListRecipient@test.de; mailingList2Recipient@test.de', 3,
+ 'Transformator', 'K-155',
+ 'otto', 'Stuttgart', 'einmalig', '2018-06-18 15:15:00',
+ 3, '2018-06-14 16:30:00',
+ '2018-06-22 16:00:00', 'in 9 Tagen', 'Den Transformator austauschen', 3,
+ 1, 'otto', 'Abteilung abc', '2018-06-13 15:00:00',
+ 'otto', 'Abteilung syx', '2018-06-18 15:15:00');
+
+INSERT INTO public.tbl_gridmeasure(
+ id_descriptive, title, affected_resource, remark, email_addresses, fk_ref_gm_status,
+ switching_object, cost_center,
+ approval_by, area_of_switching, appointment_repetition, appointment_startdate,
+ appointment_numberof, planned_starttime_first_singlemeasure,
+ endtime_gridmeasure, time_of_reallocation, description, fk_ref_branch,
+ fk_ref_branch_level, create_user, create_user_department, create_date,
+ mod_user, mod_user_department, mod_date)
+ VALUES ('2018_5', 'Gas Station', 'Station', 'Station defekt', 'mailingListRecipient@test.de; mailingList2Recipient@test.de', 4,
+ 'Station', 'K-004',
+ 'otto', 'Ludwigsburg', 'wöchentlich', '2018-07-14 15:15:00',
+ 1, '2018-07-10 16:30:00',
+ '2018-07-18 16:00:00', 'in zwei Wochen', 'Die Gas Station untersuchen', 2,
+ 1, 'otto', 'Abteilung lmn', '2018-07-09 15:00:00',
+ 'otto', 'Abteilung lmn', '2018-07-14 15:15:00');
+
+INSERT INTO public.tbl_gridmeasure(
+ id_descriptive, title, affected_resource, remark, email_addresses, fk_ref_gm_status,
+ switching_object, cost_center,
+ approval_by, area_of_switching, appointment_repetition, appointment_startdate,
+ appointment_numberof, planned_starttime_first_singlemeasure,
+ endtime_gridmeasure, time_of_reallocation, description, fk_ref_branch,
+ fk_ref_branch_level, create_user, create_user_department, create_date,
+ mod_user, mod_user_department, mod_date)
+ VALUES ('2018_6', 'Stuhl mit drei Beinen', 'Stuhl', 'Stuhl kaputt', 'mailingListRecipient@test.de; mailingList2Recipient@test.de', 5,
+ 'Stuhl', 'K-155',
+ 'otto', 'Hamburg', 'einmalig', '2018-06-12 15:15:00',
+ 3, '2018-06-08 16:30:00',
+ '2018-06-16 16:00:00', 'in zwei Tagen', 'Den Stuhl austauschen', 4,
+ 1, 'claudio', 'Abteilung lmn', '2018-06-07 15:00:00',
+ 'claudio', 'Abteilung lmn', '2018-06-12 15:15:00');
+
+INSERT INTO public.tbl_gridmeasure(
+ id_descriptive, title, affected_resource, remark, email_addresses, fk_ref_gm_status,
+ switching_object, cost_center,
+ approval_by, area_of_switching, appointment_repetition, appointment_startdate,
+ appointment_numberof, planned_starttime_first_singlemeasure,
+ endtime_gridmeasure, time_of_reallocation, description, fk_ref_branch,
+ fk_ref_branch_level, create_user, create_user_department, create_date,
+ mod_user, mod_user_department, mod_date)
+ VALUES ('2018_7', 'Kabel vergrößern', 'Kabel', 'Kabel zu kurz', 'mailingListRecipient@test.de; mailingList2Recipient@test.de', 6,
+ 'Kabel', 'K-222',
+ 'dagmar', 'Steinheim', 'einmalig', '2018-08-14 15:15:00',
+ 27, '2018-08-10 16:30:00',
+ '2018-08-18 16:00:00', 'in zwei Wochen', 'Das Kabel vergrößern', 3,
+ 1, 'claudio', 'Abteilung lmn', '2018-08-09 15:00:00',
+ 'bruno', 'Abteilung lmn', '2018-08-14 15:15:00');
+
+INSERT INTO public.tbl_gridmeasure(
+ id_descriptive, title, affected_resource, remark, email_addresses, fk_ref_gm_status,
+ switching_object, cost_center,
+ approval_by, area_of_switching, appointment_repetition, appointment_startdate,
+ appointment_numberof, planned_starttime_first_singlemeasure,
+ endtime_gridmeasure, time_of_reallocation, description, fk_ref_branch,
+ fk_ref_branch_level, create_user, create_user_department, create_date,
+ mod_user, mod_user_department, mod_date)
+ VALUES ('2018_8', 'Transformator austauschen', 'Transformator', 'Transformator 160 Grads', 'mailingListRecipient@test.de; mailingList2Recipient@test.de', 7,
+ 'Transformator', 'K-155',
+ 'dagmar', 'Murr', 'täglich', '2018-06-14 15:15:00',
+ 6, '2018-06-10 16:30:00',
+ '2018-06-18 16:00:00', 'in zwei Tagen', 'Den Transformator austauschen', 1,
+ 1, 'dagmar', 'Abteilung opq', '2018-06-09 15:00:00',
+ 'dagmar', 'Abteilung opq', '2018-06-14 15:15:00');
+
+INSERT INTO public.tbl_gridmeasure(
+ id_descriptive, title, affected_resource, remark, email_addresses, fk_ref_gm_status,
+ switching_object, cost_center,
+ approval_by, area_of_switching, appointment_repetition, appointment_startdate,
+ appointment_numberof, planned_starttime_first_singlemeasure,
+ endtime_gridmeasure, time_of_reallocation, description, fk_ref_branch,
+ fk_ref_branch_level, create_user, create_user_department, create_date,
+ mod_user, mod_user_department, mod_date)
+ VALUES ('2018_9', 'Alles kaputt', 'Alles', 'Alles defekt', 'mailingListRecipient@test.de; mailingList2Recipient@test.de', 8,
+ 'Alles', 'K-222',
+ 'otto', 'Berlin', 'einmalig', '2018-06-15 15:15:00',
+ 2, '2018-06-11 16:30:00',
+ '2018-06-19 16:00:00', 'in zwei Jahren', 'Alles wegwerfen', 2,
+ 3, 'bruno', 'Abteilung opq', '2018-06-10 15:00:00',
+ 'claudio', 'Abteilung opq', '2018-06-15 15:15:00');
+
+INSERT INTO public.tbl_gridmeasure(
+ id_descriptive, title, affected_resource, remark, email_addresses, fk_ref_gm_status,
+ switching_object, cost_center,
+ approval_by, area_of_switching, appointment_repetition, appointment_startdate,
+ appointment_numberof, planned_starttime_first_singlemeasure,
+ endtime_gridmeasure, time_of_reallocation, description, fk_ref_branch,
+ fk_ref_branch_level, create_user, create_user_department, create_date,
+ mod_user, mod_user_department, mod_date)
+ VALUES ('2018_10', 'Schalter erneuern', 'Schalter', 'Schalter defekt', 'mailingListRecipient@test.de; mailingList2Recipient@test.de', 9,
+ 'Schalter', 'K-004',
+ 'hugo', 'Kassel', 'einmalig', '2018-08-14 15:15:00',
+ 9, '2018-08-10 16:30:00',
+ '2018-08-18 16:00:00', 'in 6 Tagen', 'Den Schalter austauschen', 1,
+ 1, 'dagmar', 'Abteilung opq', '2018-08-09 15:00:00',
+ 'otto', 'Abteilung opq', '2018-08-14 15:15:00');
+
+INSERT INTO public.tbl_gridmeasure(
+ id_descriptive, title, affected_resource, remark, email_addresses, fk_ref_gm_status,
+ switching_object, cost_center,
+ approval_by, area_of_switching, appointment_repetition, appointment_startdate,
+ appointment_numberof, planned_starttime_first_singlemeasure,
+ endtime_gridmeasure, time_of_reallocation, description, fk_ref_branch,
+ fk_ref_branch_level, create_user, create_user_department, create_date,
+ mod_user, mod_user_department, mod_date)
+ VALUES ('2018_11', 'Rechner austauschen', 'Rechner', 'Rechner defekt', 'mailingListRecipient@test.de; mailingList2Recipient@test.de', 10,
+ 'Rechner', 'K-155',
+ 'claudio', 'Murr', 'einmalig', '2018-06-12 15:15:00',
+ 3, '2018-06-08 16:30:00',
+ '2018-06-16 16:00:00', 'in zwei Tagen', 'Den Rechner austauschen', 4,
+ 1, 'hugo', 'Abteilung opq', '2018-06-07 15:00:00',
+ 'otto', 'Abteilung opq', '2018-06-12 15:15:00');
+
+INSERT INTO public.tbl_gridmeasure(
+ id_descriptive, title, affected_resource, remark, email_addresses, fk_ref_gm_status,
+ switching_object, cost_center,
+ approval_by, area_of_switching, appointment_repetition, appointment_startdate,
+ appointment_numberof, planned_starttime_first_singlemeasure,
+ endtime_gridmeasure, time_of_reallocation, description, fk_ref_branch,
+ fk_ref_branch_level, create_user, create_user_department, create_date,
+ mod_user, mod_user_department, mod_date)
+ VALUES ('2018_12', 'Maschine untersuchen', 'Maschine', 'Maschine defekt', 'mailingListRecipient@test.de; mailingList2Recipient@test.de', 11,
+ 'Maschine', 'K-004',
+ 'otto', 'Ludwigsburg', 'einmalig', '2018-06-20 15:15:00',
+ 5, '2018-06-16 16:30:00',
+ '2018-06-24 16:00:00', 'in 8 Tagen', 'Die Maschine austauschen', 1,
+ 1, 'bruno', 'Abteilung opq', '2018-06-15 15:00:00',
+ 'bruno', 'Abteilung opq', '2018-06-20 15:15:00');
+
+
+
+
+-- ---------------------------------------------
+-- TABLE TBL_SINGLE_GRIDMEASURE
+-- ---------------------------------------------
+
+CREATE SEQUENCE public.tbl_single_gridmeasure_id_seq
+ INCREMENT 1
+ MINVALUE 1
+ MAXVALUE 9223372036854775807
+ START 1
+ CACHE 1;
+ALTER TABLE public.tbl_single_gridmeasure_id_seq
+ OWNER TO plgm_service;
+
+CREATE TABLE public.tbl_single_gridmeasure
+(
+ id integer NOT NULL DEFAULT nextval('tbl_single_gridmeasure_id_seq'::regclass),
+ sortorder integer NOT NULL,
+ title character varying(256),
+ switching_object character varying(256),
+ cim_id character varying(256),
+ cim_name character varying(256),
+ cim_description character varying(1024),
+ planned_starttime_singlemeasure timestamp without time zone,
+ planned_endtime_singlemeasure timestamp without time zone,
+ description character varying(1024),
+ responsible_onsite_name character varying(256),
+ responsible_onsite_department character varying(256),
+ network_control character varying(256),
+ fk_tbl_gridmeasure integer NOT NULL,
+ create_user character varying(100) NOT NULL,
+ create_date timestamp without time zone NOT NULL,
+ mod_user character varying(100),
+ mod_date timestamp without time zone,
+ CONSTRAINT tbl_single_gridmeasure_pkey PRIMARY KEY (id),
+ CONSTRAINT fk_single_gridmeasure__gridmeasure FOREIGN KEY (fk_tbl_gridmeasure)
+ REFERENCES public.tbl_gridmeasure (id) MATCH SIMPLE
+ ON UPDATE NO ACTION ON DELETE NO ACTION
+)
+WITH (
+ OIDS=FALSE
+);
+ALTER TABLE public.tbl_single_gridmeasure
+ OWNER TO plgm_service;
+GRANT ALL ON TABLE public.tbl_single_gridmeasure TO plgm_service;
+
+
+INSERT INTO public.tbl_single_gridmeasure(
+ sortorder, title, switching_object, cim_id, cim_name, cim_description,
+ planned_starttime_singlemeasure, planned_endtime_singlemeasure,
+ description, responsible_onsite_name, responsible_onsite_department, fk_tbl_gridmeasure, create_user, create_date, mod_user,
+ mod_date)
+ VALUES (1, 'Lampe ausschalten', 'Lampe', '2', 'cim', 'cim Beschreibung',
+ '2018-06-10 16:30:00', '2018-06-11 14:00:00',
+ 'Beschreibung','Otto','Abteilung abc', 1, 'Otto', '01.07.2018', 'Otto',
+ '01.07.2018');
+INSERT INTO public.tbl_single_gridmeasure(
+ sortorder, title, switching_object, cim_id, cim_name, cim_description,
+ planned_starttime_singlemeasure, planned_endtime_singlemeasure,
+ description, responsible_onsite_name, responsible_onsite_department,fk_tbl_gridmeasure, create_user, create_date, mod_user,
+ mod_date)
+ VALUES (2, 'Kabel kürzen', 'Kabel', '2', 'cim', 'cim Beschreibung',
+ '2018-06-10 16:30:00', '2018-06-11 14:00:00',
+ 'Beschreibung', 'Otto','Abteilung def',1, 'Otto', '01.07.2018', 'Otto',
+ '01.07.2018');
+INSERT INTO public.tbl_single_gridmeasure(
+ sortorder, title, switching_object, cim_id, cim_name, cim_description,
+ planned_starttime_singlemeasure, planned_endtime_singlemeasure,
+ description, responsible_onsite_name, responsible_onsite_department,fk_tbl_gridmeasure, create_user, create_date, mod_user,
+ mod_date)
+ VALUES (3, 'Transformator tauschen', 'Transformator', '2', 'cim', 'cim Beschreibung',
+ '2018-06-10 16:30:00', '2018-06-11 14:00:00',
+ 'Beschreibung', 'Otto','Abteilung ghi',1, 'Otto', '01.07.2018', 'Otto',
+ '01.07.2018');
+
+INSERT INTO public.tbl_single_gridmeasure(
+ sortorder, title, switching_object, cim_id, cim_name, cim_description,
+ planned_starttime_singlemeasure, planned_endtime_singlemeasure,
+ description, responsible_onsite_name, responsible_onsite_department,fk_tbl_gridmeasure, create_user, create_date, mod_user,
+ mod_date)
+ VALUES (1, 'Lampe erneuern', 'Lampe', '2', 'cim', 'cim Beschreibung',
+ '2018-06-12 16:30:00', '2018-06-13 14:00:00',
+ 'Beschreibung', 'Otto','Abteilung jkl',2, 'Hugo', '01.07.2018', 'Hugo',
+ '01.07.2018');
+
+INSERT INTO public.tbl_single_gridmeasure(
+ sortorder, title, switching_object, cim_id, cim_name, cim_description,
+ planned_starttime_singlemeasure, planned_endtime_singlemeasure,
+ description, responsible_onsite_name, responsible_onsite_department,fk_tbl_gridmeasure, create_user, create_date, mod_user,
+ mod_date)
+ VALUES (1, 'Transformator', 'Transformator', '2', 'cim', 'cim Beschreibung',
+ '2018-06-13 16:30:00', '2018-06-14 14:00:00',
+ 'Beschreibung', 'Otto','Abteilung mno',3, 'Hugo', '01.07.2018', 'Hugo',
+ '01.07.2018');
+
+INSERT INTO public.tbl_single_gridmeasure(
+ sortorder, title, switching_object, cim_id, cim_name, cim_description,
+ planned_starttime_singlemeasure, planned_endtime_singlemeasure,
+ description, responsible_onsite_name, responsible_onsite_department,fk_tbl_gridmeasure, create_user, create_date, mod_user,
+ mod_date)
+ VALUES (1, 'Transformator', 'Transformator', '2', 'cim', 'cim Beschreibung',
+ '2018-06-14 16:30:00', '2018-06-15 14:00:00',
+ 'Beschreibung', 'Otto','Abteilung pqr',4, 'Hugo', '01.07.2018', 'Jasper',
+ '01.07.2018');
+
+INSERT INTO public.tbl_single_gridmeasure(
+ sortorder, title, switching_object, cim_id, cim_name, cim_description,
+ planned_starttime_singlemeasure, planned_endtime_singlemeasure,
+ description, responsible_onsite_name, responsible_onsite_department,fk_tbl_gridmeasure, create_user, create_date, mod_user,
+ mod_date)
+ VALUES (1, 'Gas', 'Gas', '2', 'cim', 'cim Beschreibung',
+ '2018-07-10 16:30:00', '2018-07-11 14:00:00',
+ 'Beschreibung', 'Otto','Abteilung stu',5, 'Jasper', '01.07.2018', 'Jasper',
+ '01.07.2018');
+
+INSERT INTO public.tbl_single_gridmeasure(
+ sortorder, title, switching_object, cim_id, cim_name, cim_description,
+ planned_starttime_singlemeasure, planned_endtime_singlemeasure,
+ description, responsible_onsite_name, responsible_onsite_department,fk_tbl_gridmeasure, create_user, create_date, mod_user,
+ mod_date)
+ VALUES (2, 'Gas 2', 'Gas', '2', 'cim', 'cim Beschreibung',
+ '2018-07-10 16:30:00', '2018-07-11 14:00:00',
+ 'Beschreibung', 'Otto','Abteilung vwx',5, 'Jasper', '01.07.2018', 'Jasper',
+ '01.07.2018');
+
+INSERT INTO public.tbl_single_gridmeasure(
+ sortorder, title, switching_object, cim_id, cim_name, cim_description,
+ planned_starttime_singlemeasure, planned_endtime_singlemeasure,
+ description, responsible_onsite_name, responsible_onsite_department,fk_tbl_gridmeasure, create_user, create_date, mod_user,
+ mod_date)
+ VALUES (1, 'Stuhl', 'Stuhl', '2', 'cim', 'cim Beschreibung',
+ '2018-06-08 16:30:00', '2018-06-09 14:00:00',
+ 'Beschreibung', 'Otto','Abteilung yz',6, 'Otto', '01.07.2018', 'Jasper',
+ '01.07.2018');
+
+INSERT INTO public.tbl_single_gridmeasure(
+ sortorder, title, switching_object, cim_id, cim_name, cim_description,
+ planned_starttime_singlemeasure, planned_endtime_singlemeasure,
+ description, responsible_onsite_name, responsible_onsite_department,fk_tbl_gridmeasure, create_user, create_date, mod_user,
+ mod_date)
+ VALUES (1, 'Kabel', 'Kabel', '2', 'cim', 'cim Beschreibung',
+ '2018-08-10 16:30:00', '2018-08-11 14:00:00',
+ 'Beschreibung', 'Otto','Abteilung abc',7, 'Otto', '01.07.2018', 'Hugo',
+ '01.07.2018');
+
+INSERT INTO public.tbl_single_gridmeasure(
+ sortorder, title, switching_object, cim_id, cim_name, cim_description,
+ planned_starttime_singlemeasure, planned_endtime_singlemeasure,
+ description, responsible_onsite_name, responsible_onsite_department,fk_tbl_gridmeasure, create_user, create_date, mod_user,
+ mod_date)
+ VALUES (1, 'Transformator', 'Transformator', '2', 'cim', 'cim Beschreibung',
+ '2018-06-10 16:30:00', '2018-06-11 14:00:00',
+ 'Beschreibung', 'Otto','Abteilung abc',8, 'Hugo', '01.07.2018', 'Jasper',
+ '01.07.2018');
+
+INSERT INTO public.tbl_single_gridmeasure(
+ sortorder, title, switching_object, cim_id, cim_name, cim_description,
+ planned_starttime_singlemeasure, planned_endtime_singlemeasure,
+ description, responsible_onsite_name, responsible_onsite_department,fk_tbl_gridmeasure, create_user, create_date, mod_user,
+ mod_date)
+ VALUES (2, 'Transformator 2', 'Transformator', '2', 'cim', 'cim Beschreibung',
+ '2018-06-10 16:30:00', '2018-06-11 14:00:00',
+ 'Beschreibung', 'Otto','Abteilung abc',8, 'Hugo', '01.07.2018', 'Jasper',
+ '01.07.2018');
+
+INSERT INTO public.tbl_single_gridmeasure(
+ sortorder, title, switching_object, cim_id, cim_name, cim_description,
+ planned_starttime_singlemeasure, planned_endtime_singlemeasure,
+ description, responsible_onsite_name, responsible_onsite_department,fk_tbl_gridmeasure, create_user, create_date, mod_user,
+ mod_date)
+ VALUES (1, 'Alles', 'Alles', '2', 'cim', 'cim Beschreibung',
+ '2018-06-11 16:30:00', '2018-06-12 14:00:00',
+ 'Beschreibung', 'Otto','Abteilung abc',9, 'Otto', '01.07.2018', 'Jasper',
+ '01.07.2018');
+
+INSERT INTO public.tbl_single_gridmeasure(
+ sortorder, title, switching_object, cim_id, cim_name, cim_description,
+ planned_starttime_singlemeasure, planned_endtime_singlemeasure,
+ description, responsible_onsite_name, responsible_onsite_department,fk_tbl_gridmeasure, create_user, create_date, mod_user,
+ mod_date)
+ VALUES (1, 'Schalter', 'Schalter', '2', 'cim', 'cim Beschreibung',
+ '2018-08-10 16:30:00', '2018-08-11 14:00:00',
+ 'Beschreibung', 'Otto','Abteilung abc',10, 'Otto', '01.07.2018', 'Hugo',
+ '01.07.2018');
+
+INSERT INTO public.tbl_single_gridmeasure(
+ sortorder, title, switching_object, cim_id, cim_name, cim_description,
+ planned_starttime_singlemeasure, planned_endtime_singlemeasure,
+ description, responsible_onsite_name, responsible_onsite_department,fk_tbl_gridmeasure, create_user, create_date, mod_user,
+ mod_date)
+ VALUES (2, 'Schalter 2', 'Schalter', '2', 'cim', 'cim Beschreibung',
+ '2018-08-10 16:30:00', '2018-08-11 14:00:00',
+ 'Beschreibung', 'Otto','Abteilung abc',10, 'Otto', '01.07.2018', 'Hugo',
+ '01.07.2018');
+
+INSERT INTO public.tbl_single_gridmeasure(
+ sortorder, title, switching_object, cim_id, cim_name, cim_description,
+ planned_starttime_singlemeasure, planned_endtime_singlemeasure,
+ description, responsible_onsite_name, responsible_onsite_department,fk_tbl_gridmeasure, create_user, create_date, mod_user,
+ mod_date)
+ VALUES (1, 'Rechner', 'Rechner', '2', 'cim', 'cim Beschreibung',
+ '2018-06-08 16:30:00', '2018-06-09 14:00:00',
+ 'Beschreibung', 'Otto','Abteilung abc',11, 'Jasper', '01.07.2018', 'Jasper',
+ '01.07.2018');
+
+INSERT INTO public.tbl_single_gridmeasure(
+ sortorder, title, switching_object, cim_id, cim_name, cim_description,
+ planned_starttime_singlemeasure, planned_endtime_singlemeasure,
+ description, responsible_onsite_name, responsible_onsite_department,fk_tbl_gridmeasure, create_user, create_date, mod_user,
+ mod_date)
+ VALUES (1, 'Maschine', 'Maschine', '2', 'cim', 'cim Beschreibung',
+ '2018-06-16 16:30:00', '2018-06-17 14:00:00',
+ 'Beschreibung', 'Otto','Abteilung abc',12, 'Hugo', '01.07.2018', 'Jasper',
+ '01.07.2018');
+
+
+-- ---------------------------------------------
+-- TABLE TBL_STEPS
+-- ---------------------------------------------
+
+CREATE SEQUENCE public.tbl_steps_id_seq
+ INCREMENT 1
+ MINVALUE 1
+ MAXVALUE 9223372036854775807
+ START 1
+ CACHE 1;
+ALTER TABLE public.tbl_steps_id_seq
+ OWNER TO plgm_service;
+
+CREATE TABLE public.tbl_steps
+(
+ id integer NOT NULL DEFAULT nextval('tbl_steps_id_seq'::regclass),
+ sortorder integer NOT NULL,
+ switching_object character varying(256),
+ type character varying(256),
+ present_time character varying(256),
+ present_state character varying(256),
+ target_state character varying(256),
+ operator character varying(256),
+ fk_tbl_single_gridmeasure integer NOT NULL,
+ create_user character varying(100) NOT NULL,
+ create_date timestamp without time zone NOT NULL,
+ mod_user character varying(100),
+ mod_date timestamp without time zone,
+ CONSTRAINT tbl_steps_pkey PRIMARY KEY (id),
+ CONSTRAINT fk_steps__single_gridmeasure FOREIGN KEY (fk_tbl_single_gridmeasure)
+ REFERENCES public.tbl_single_gridmeasure (id) MATCH SIMPLE
+ ON UPDATE NO ACTION ON DELETE NO ACTION
+)
+WITH (
+ OIDS=FALSE
+);
+ALTER TABLE public.tbl_steps
+ OWNER TO plgm_service;
+GRANT ALL ON TABLE public.tbl_steps TO plgm_service;
+
+
+-- ---------------------------------------------
+-- TABLE REF_VERSION
+-- ---------------------------------------------
+
+DROP TABLE IF EXISTS public.REF_VERSION;
+
+CREATE TABLE public.REF_VERSION
+(
+ id integer NOT NULL,
+ version character varying(100) NOT NULL,
+ CONSTRAINT ref_version_pkey PRIMARY KEY (id)
+)
+WITH (
+ OIDS=FALSE
+);
+ALTER TABLE public.REF_VERSION
+ OWNER TO PLGM_SERVICE;
+GRANT ALL ON TABLE public.REF_VERSION TO PLGM_SERVICE;
+
+INSERT INTO REF_VERSION VALUES (1, '0.0.1_PG');
+
+-- ---------------------------------------------
+-- TABLE TBL_DOCUMENTS
+-- ---------------------------------------------
+
+CREATE SEQUENCE public.tbl_documents_id_seq
+ INCREMENT 1
+ MINVALUE 1
+ MAXVALUE 9223372036854775807
+ START 1
+ CACHE 1;
+ALTER TABLE public.tbl_documents_id_seq
+ OWNER TO plgm_service;
+
+CREATE TABLE public.tbl_documents
+(
+ id integer NOT NULL DEFAULT nextval('tbl_documents_id_seq'::regclass),
+ document_name character varying(260),
+ document bytea,
+ create_user character varying(100) NOT NULL,
+ create_date timestamp without time zone NOT NULL,
+ mod_user character varying(100),
+ mod_date timestamp without time zone,
+ CONSTRAINT tbl_documents_pkey PRIMARY KEY (id)
+)
+WITH (
+ OIDS=FALSE
+);
+ALTER TABLE public.tbl_documents
+ OWNER TO plgm_service;
+GRANT ALL ON TABLE public.tbl_documents TO plgm_service;
+
+
+-- ---------------------------------------------
+-- TABLE TBL_MEASURE_DOCUMENTS
+-- ---------------------------------------------
+
+CREATE SEQUENCE public.tbl_measure_documents_id_seq
+ INCREMENT 1
+ MINVALUE 1
+ MAXVALUE 9223372036854775807
+ START 1
+ CACHE 1;
+ALTER TABLE public.tbl_measure_documents_id_seq
+ OWNER TO plgm_service;
+
+CREATE TABLE public.tbl_measure_documents
+(
+ id integer NOT NULL DEFAULT nextval('tbl_measure_documents_id_seq'::regclass),
+ fk_tbl_measure integer,
+ fk_tbl_documents integer,
+ create_user character varying(100) NOT NULL,
+ create_date timestamp without time zone NOT NULL,
+ mod_user character varying(100),
+ mod_date timestamp without time zone,
+ CONSTRAINT tbl_measure_documents_pkey PRIMARY KEY (id),
+ CONSTRAINT fk_tbl_measure_documents_measure FOREIGN KEY (fk_tbl_measure)
+ REFERENCES public.tbl_gridmeasure (id) MATCH SIMPLE
+ ON UPDATE NO ACTION ON DELETE CASCADE,
+ CONSTRAINT fk_tbl_measure_documents_documents FOREIGN KEY (fk_tbl_documents)
+ REFERENCES public.tbl_documents (id) MATCH SIMPLE
+ ON UPDATE NO ACTION ON DELETE NO ACTION
+)
+WITH (
+ OIDS=FALSE
+);
+ALTER TABLE public.tbl_measure_documents
+ OWNER TO plgm_service;
+GRANT ALL ON TABLE public.tbl_measure_documents TO plgm_service;
+
+
+
+-- ----------------------------------------------------------------------------
+-- ----------------------------------------------------------------------------
+-- HISTORY-TABLES
+-- ----------------------------------------------------------------------------
+-- ----------------------------------------------------------------------------
+
+-- PUBLIC.HREF_TERRITORY Automatic generanted History Table DDL --
+-- <GENERATED CODE!>
+
+DROP TABLE IF EXISTS PUBLIC.HREF_TERRITORY;
+DROP SEQUENCE IF EXISTS PUBLIC.HREF_TERRITORY_ID_SEQ;
+
+CREATE SEQUENCE PUBLIC.HREF_TERRITORY_ID_SEQ
+ INCREMENT 1
+ MINVALUE 1
+ MAXVALUE 9223372036854775807
+ START 1
+ CACHE 1;
+
+ALTER TABLE PUBLIC.HREF_TERRITORY_ID_SEQ
+ OWNER TO PLGM_SERVICE;
+
+CREATE TABLE PUBLIC.HREF_TERRITORY
+(
+ HID integer NOT NULL DEFAULT nextval('HREF_TERRITORY_ID_SEQ'::regclass),
+ HACTION integer NOT NULL,
+ HDATE timestamp without time zone NOT NULL,
+ HUSER character varying(100),
+
+ ID integer,
+ NAME character varying (50),
+ DESCRIPTION character varying (255),
+
+ CREATE_USER character varying(100),
+ CREATE_DATE timestamp without time zone,
+ MOD_USER character varying(100),
+ MOD_DATE timestamp without time zone,
+ CONSTRAINT HREF_TERRITORY_PKEY PRIMARY KEY (HID)
+)
+WITH (
+ OIDS=FALSE
+);
+
+ALTER TABLE PUBLIC.HREF_TERRITORY
+ OWNER TO PLGM_SERVICE;
+GRANT ALL ON TABLE PUBLIC.HREF_TERRITORY TO PLGM_SERVICE;
+
+
+
+-- PUBLIC.HTBL_LOCK Automatic generanted History Table DDL --
+-- <GENERATED CODE!>
+
+DROP TABLE IF EXISTS PUBLIC.HTBL_LOCK;
+DROP SEQUENCE IF EXISTS PUBLIC.HTBL_LOCK_ID_SEQ;
+
+CREATE SEQUENCE PUBLIC.HTBL_LOCK_ID_SEQ
+ INCREMENT 1
+ MINVALUE 1
+ MAXVALUE 9223372036854775807
+ START 1
+ CACHE 1;
+
+ALTER TABLE PUBLIC.HTBL_LOCK_ID_SEQ
+ OWNER TO PLGM_SERVICE;
+
+CREATE TABLE PUBLIC.HTBL_LOCK
+(
+ HID integer NOT NULL DEFAULT nextval('HTBL_LOCK_ID_SEQ'::regclass),
+ HACTION integer NOT NULL,
+ HDATE timestamp without time zone NOT NULL,
+ HUSER character varying(100),
+
+ ID integer,
+ KEY integer,
+ USERNAME character varying (50),
+ INFO character varying (256),
+
+ CREATE_USER character varying(100),
+ CREATE_DATE timestamp without time zone,
+ MOD_USER character varying(100),
+ MOD_DATE timestamp without time zone,
+ CONSTRAINT HTBL_LOCK_PKEY PRIMARY KEY (HID)
+)
+WITH (
+ OIDS=FALSE
+);
+
+ALTER TABLE PUBLIC.HTBL_LOCK
+ OWNER TO PLGM_SERVICE;
+GRANT ALL ON TABLE PUBLIC.HTBL_LOCK TO PLGM_SERVICE;
+
+
+
+
+-- PUBLIC.HTBL_USER_SETTINGS Automatic generanted History Table DDL --
+-- <GENERATED CODE!>
+
+DROP TABLE IF EXISTS PUBLIC.HTBL_USER_SETTINGS;
+DROP SEQUENCE IF EXISTS PUBLIC.HTBL_USER_SETTINGS_ID_SEQ;
+
+CREATE SEQUENCE PUBLIC.HTBL_USER_SETTINGS_ID_SEQ
+ INCREMENT 1
+ MINVALUE 1
+ MAXVALUE 9223372036854775807
+ START 1
+ CACHE 1;
+
+ALTER TABLE PUBLIC.HTBL_USER_SETTINGS_ID_SEQ
+ OWNER TO PLGM_SERVICE;
+
+CREATE TABLE PUBLIC.HTBL_USER_SETTINGS
+(
+ HID integer NOT NULL DEFAULT nextval('HTBL_USER_SETTINGS_ID_SEQ'::regclass),
+ HACTION integer NOT NULL,
+ HDATE timestamp without time zone NOT NULL,
+ HUSER character varying(100),
+
+ ID integer,
+ USERNAME character varying (50),
+ SETTING_TYPE character varying (50),
+ VALUE character varying(4096),
+
+ CREATE_USER character varying(100),
+ CREATE_DATE timestamp without time zone,
+ MOD_USER character varying(100),
+ MOD_DATE timestamp without time zone,
+ CONSTRAINT HTBL_USER_SETTINGS_PKEY PRIMARY KEY (HID)
+)
+WITH (
+ OIDS=FALSE
+);
+
+ALTER TABLE PUBLIC.HTBL_USER_SETTINGS
+ OWNER TO PLGM_SERVICE;
+GRANT ALL ON TABLE PUBLIC.HTBL_USER_SETTINGS TO PLGM_SERVICE;
+
+
+-- PUBLIC.HREF_COST_CENTER Automatic generanted History Table DDL --
+-- <GENERATED CODE!>
+
+DROP TABLE IF EXISTS PUBLIC.HREF_COST_CENTER;
+DROP SEQUENCE IF EXISTS PUBLIC.HREF_COST_CENTER_ID_SEQ;
+
+CREATE SEQUENCE PUBLIC.HREF_COST_CENTER_ID_SEQ
+ INCREMENT 1
+ MINVALUE 1
+ MAXVALUE 9223372036854775807
+ START 1
+ CACHE 1;
+
+ALTER TABLE PUBLIC.HREF_COST_CENTER_ID_SEQ
+ OWNER TO PLGM_SERVICE;
+
+CREATE TABLE PUBLIC.HREF_COST_CENTER
+(
+ HID integer NOT NULL DEFAULT nextval('HREF_COST_CENTER_ID_SEQ'::regclass),
+ HACTION integer NOT NULL,
+ HDATE timestamp without time zone NOT NULL,
+ HUSER character varying(100),
+
+ ID integer,
+ NAME character varying (50),
+ DESCRIPTION character varying (255),
+
+ CREATE_USER character varying(100),
+ CREATE_DATE timestamp without time zone,
+ MOD_USER character varying(100),
+ MOD_DATE timestamp without time zone,
+ CONSTRAINT HREF_COST_CENTER_PKEY PRIMARY KEY (HID)
+)
+WITH (
+ OIDS=FALSE
+);
+
+ALTER TABLE PUBLIC.HREF_COST_CENTER
+ OWNER TO PLGM_SERVICE;
+GRANT ALL ON TABLE PUBLIC.HREF_COST_CENTER TO PLGM_SERVICE;
+
+-- PUBLIC.HREF_BRANCH Automatic generanted History Table DDL --
+-- <GENERATED CODE!>
+
+DROP TABLE IF EXISTS PUBLIC.HREF_BRANCH;
+DROP SEQUENCE IF EXISTS PUBLIC.HREF_BRANCH_ID_SEQ;
+
+CREATE SEQUENCE PUBLIC.HREF_BRANCH_ID_SEQ
+ INCREMENT 1
+ MINVALUE 1
+ MAXVALUE 9223372036854775807
+ START 1
+ CACHE 1;
+
+ALTER TABLE PUBLIC.HREF_BRANCH_ID_SEQ
+ OWNER TO PLGM_SERVICE;
+
+CREATE TABLE PUBLIC.HREF_BRANCH
+(
+ HID integer NOT NULL DEFAULT nextval('HREF_BRANCH_ID_SEQ'::regclass),
+ HACTION integer NOT NULL,
+ HDATE timestamp without time zone NOT NULL,
+ HUSER character varying(100),
+
+ ID integer,
+ NAME character varying (50),
+ DESCRIPTION character varying (255),
+ COLOR_CODE character varying (20),
+ CREATE_USER character varying(100),
+ CREATE_DATE timestamp without time zone,
+ MOD_USER character varying(100),
+ MOD_DATE timestamp without time zone,
+ CONSTRAINT HREF_BRANCH_PKEY PRIMARY KEY (HID)
+)
+WITH (
+ OIDS=FALSE
+);
+
+ALTER TABLE PUBLIC.HREF_BRANCH
+ OWNER TO PLGM_SERVICE;
+GRANT ALL ON TABLE PUBLIC.HREF_BRANCH TO PLGM_SERVICE;
+
+-- PUBLIC.HREF_BRANCH_LEVEL Automatic generanted History Table DDL --
+-- <GENERATED CODE!>
+
+DROP TABLE IF EXISTS PUBLIC.HREF_BRANCH_LEVEL;
+DROP SEQUENCE IF EXISTS PUBLIC.HREF_BRANCH_LEVEL_ID_SEQ;
+
+CREATE SEQUENCE PUBLIC.HREF_BRANCH_LEVEL_ID_SEQ
+ INCREMENT 1
+ MINVALUE 1
+ MAXVALUE 9223372036854775807
+ START 1
+ CACHE 1;
+
+ALTER TABLE PUBLIC.HREF_BRANCH_LEVEL_ID_SEQ
+ OWNER TO PLGM_SERVICE;
+
+CREATE TABLE PUBLIC.HREF_BRANCH_LEVEL
+(
+ HID integer NOT NULL DEFAULT nextval('HREF_BRANCH_LEVEL_ID_SEQ'::regclass),
+ HACTION integer NOT NULL,
+ HDATE timestamp without time zone NOT NULL,
+ HUSER character varying(100),
+
+ ID integer,
+ NAME character varying (50),
+ DESCRIPTION character varying (255),
+ FK_REF_BRANCH integer,
+
+ CREATE_USER character varying(100),
+ CREATE_DATE timestamp without time zone,
+ MOD_USER character varying(100),
+ MOD_DATE timestamp without time zone,
+ CONSTRAINT HREF_BRANCH_LEVEL_PKEY PRIMARY KEY (HID)
+)
+WITH (
+ OIDS=FALSE
+);
+
+ALTER TABLE PUBLIC.HREF_BRANCH_LEVEL
+ OWNER TO PLGM_SERVICE;
+GRANT ALL ON TABLE PUBLIC.HREF_BRANCH_LEVEL TO PLGM_SERVICE;
+
+
+-- PUBLIC.HREF_GM_STATUS Automatic generanted History Table DDL --
+-- <GENERATED CODE!>
+
+DROP TABLE IF EXISTS PUBLIC.HREF_GM_STATUS;
+DROP SEQUENCE IF EXISTS PUBLIC.HREF_GM_STATUS_ID_SEQ;
+
+CREATE SEQUENCE PUBLIC.HREF_GM_STATUS_ID_SEQ
+ INCREMENT 1
+ MINVALUE 1
+ MAXVALUE 9223372036854775807
+ START 1
+ CACHE 1;
+
+ALTER TABLE PUBLIC.HREF_GM_STATUS_ID_SEQ
+ OWNER TO PLGM_SERVICE;
+
+CREATE TABLE PUBLIC.HREF_GM_STATUS
+(
+ HID integer NOT NULL DEFAULT nextval('HREF_GM_STATUS_ID_SEQ'::regclass),
+ HACTION integer NOT NULL,
+ HDATE timestamp without time zone NOT NULL,
+ HUSER character varying(100),
+
+ ID integer,
+ NAME character varying(50),
+ COLOR_CODE character varying(20),
+
+ CREATE_USER character varying(100),
+ CREATE_DATE timestamp without time zone,
+ MOD_USER character varying(100),
+ MOD_DATE timestamp without time zone,
+ CONSTRAINT HREF_GM_STATUS_PKEY PRIMARY KEY (HID)
+)
+WITH (
+ OIDS=FALSE
+);
+
+ALTER TABLE PUBLIC.HREF_GM_STATUS
+ OWNER TO PLGM_SERVICE;
+GRANT ALL ON TABLE PUBLIC.HREF_GM_STATUS TO PLGM_SERVICE;
+
+
+-- PUBLIC.HTBL_GRIDMEASURE Automatic generanted History Table DDL --
+-- <GENERATED CODE!>
+
+-- REQUESTER_NAME COLUMN DELETED--
+
+DROP TABLE IF EXISTS PUBLIC.HTBL_GRIDMEASURE;
+DROP SEQUENCE IF EXISTS PUBLIC.HTBL_GRIDMEASURE_ID_SEQ;
+
+CREATE SEQUENCE PUBLIC.HTBL_GRIDMEASURE_ID_SEQ
+ INCREMENT 1
+ MINVALUE 1
+ MAXVALUE 9223372036854775807
+ START 1
+ CACHE 1;
+
+ALTER TABLE PUBLIC.HTBL_GRIDMEASURE_ID_SEQ
+ OWNER TO PLGM_SERVICE;
+
+CREATE TABLE PUBLIC.HTBL_GRIDMEASURE
+(
+ HID integer NOT NULL DEFAULT nextval('HTBL_GRIDMEASURE_ID_SEQ'::regclass),
+ HACTION integer NOT NULL,
+ HDATE timestamp without time zone NOT NULL,
+ HUSER character varying(100),
+
+ ID integer,
+ ID_DESCRIPTIVE character varying (50),
+ TITLE character varying (256),
+ AFFECTED_RESOURCE character varying (256),
+ REMARK character varying (1024),
+ EMAIL_ADDRESSES character varying(1024),
+ FK_REF_GM_STATUS integer,
+ SWITCHING_OBJECT character varying (256),
+ COST_CENTER character varying (50),
+ APPROVAL_BY character varying (256),
+ AREA_OF_SWITCHING character varying (256),
+ APPOINTMENT_REPETITION character varying (100),
+ APPOINTMENT_STARTDATE timestamp without time zone,
+ APPOINTMENT_NUMBEROF integer,
+ PLANNED_STARTTIME_FIRST_SINGLEMEASURE timestamp without time zone,
+ ENDTIME_GRIDMEASURE timestamp without time zone,
+ TIME_OF_REALLOCATION character varying (100),
+ DESCRIPTION character varying (1024),
+ FK_REF_BRANCH integer,
+ FK_REF_BRANCH_LEVEL integer,
+ CREATE_USER_DEPARTMENT character varying (100),
+ MOD_USER_DEPARTMENT character varying (100),
+
+ CREATE_USER character varying(100),
+ CREATE_DATE timestamp without time zone,
+ MOD_USER character varying(100),
+ MOD_DATE timestamp without time zone,
+ CONSTRAINT HTBL_GRIDMEASURE_PKEY PRIMARY KEY (HID)
+)
+WITH (
+ OIDS=FALSE
+);
+
+ALTER TABLE PUBLIC.HTBL_GRIDMEASURE
+ OWNER TO PLGM_SERVICE;
+GRANT ALL ON TABLE PUBLIC.HTBL_GRIDMEASURE TO PLGM_SERVICE;
+
+CREATE INDEX HUSER_INDEX ON PUBLIC.HTBL_GRIDMEASURE (HUSER);
+
+
+INSERT INTO public.htbl_gridmeasure(haction, hdate, huser, id, fk_ref_gm_status, mod_user, mod_date)
+VALUES (2, '2018-06-11 14:00:00', 'otto',12,0, 'admin', '2018-06-11 14:00:00');
+INSERT INTO public.htbl_gridmeasure(haction, hdate, huser, id, fk_ref_gm_status, mod_user, mod_date)
+VALUES (2, '2018-06-11 14:01:00', 'otto',12,1, 'admin', '2018-06-11 14:01:00');
+INSERT INTO public.htbl_gridmeasure(haction, hdate, huser, id, fk_ref_gm_status, mod_user, mod_date)
+VALUES (2, '2018-06-11 14:03:00', 'otto',12,3, 'admin', '2018-06-11 14:03:00');
+INSERT INTO public.htbl_gridmeasure(haction, hdate, huser, id, fk_ref_gm_status, mod_user, mod_date)
+VALUES (2, '2018-06-11 14:04:00', 'otto',12,4, 'admin', '2018-06-11 14:04:00');
+INSERT INTO public.htbl_gridmeasure(haction, hdate, huser, id, fk_ref_gm_status, mod_user, mod_date)
+VALUES (2, '2018-06-11 14:05:00', 'otto',12,5, 'admin', '2018-06-11 14:05:00');
+INSERT INTO public.htbl_gridmeasure(haction, hdate, huser, id, fk_ref_gm_status, mod_user, mod_date)
+VALUES (2, '2018-06-11 14:06:00', 'otto',12,6, 'admin', '2018-06-11 14:06:00');
+INSERT INTO public.htbl_gridmeasure(haction, hdate, huser, id, fk_ref_gm_status, mod_user, mod_date)
+VALUES (2, '2018-06-11 14:07:00', 'otto',12,7, 'admin', '2018-06-11 14:07:00');
+INSERT INTO public.htbl_gridmeasure(haction, hdate, huser, id, fk_ref_gm_status, mod_user, mod_date)
+VALUES (2, '2018-06-11 14:08:00', 'otto',12,8, 'admin', '2018-06-11 14:08:00');
+INSERT INTO public.htbl_gridmeasure(haction, hdate, huser, id, fk_ref_gm_status, mod_user, mod_date)
+VALUES (2, '2018-06-11 14:09:00', 'otto',12,9, 'admin', '2018-06-11 14:09:00');
+INSERT INTO public.htbl_gridmeasure(haction, hdate, huser, id, fk_ref_gm_status, mod_user, mod_date)
+VALUES (2, '2018-06-11 14:10:00', 'otto',12,10, 'admin', '2018-06-11 14:10:00');
+INSERT INTO public.htbl_gridmeasure(haction, hdate, huser, id, fk_ref_gm_status, mod_user, mod_date)
+VALUES (2, '2018-06-11 14:11:00', 'otto',12,11, 'admin', '2018-06-11 14:11:00');
+
+
+INSERT INTO public.htbl_gridmeasure(haction, hdate, huser, id, fk_ref_gm_status, mod_user, mod_date)
+VALUES (2, '2018-07-01 14:55:00', 'admin',13,0, 'admin', '2018-07-01 14:55:00');
+INSERT INTO public.htbl_gridmeasure(haction, hdate, huser, id, fk_ref_gm_status, mod_user, mod_date)
+VALUES (2, '2018-07-01 14:56:00', 'admin',13,1, 'admin', '2018-07-01 14:56:00');
+INSERT INTO public.htbl_gridmeasure(haction, hdate, huser, id, fk_ref_gm_status, mod_user, mod_date)
+VALUES (2, '2018-07-01 14:57:00', 'admin',13,3, 'admin', '2018-07-01 14:57:00');
+INSERT INTO public.htbl_gridmeasure(haction, hdate, huser, id, fk_ref_gm_status, mod_user, mod_date)
+VALUES (2, '2018-07-01 14:57:00', 'admin',13,12, 'admin', '2018-07-01 14:57:00');
+
+
+INSERT INTO public.htbl_gridmeasure(haction, hdate, huser, id, fk_ref_gm_status, mod_user, mod_date)
+VALUES (1, '2018-06-11 14:00:00', 'admin',11,0, 'admin', '2018-06-11 14:00:00');
+INSERT INTO public.htbl_gridmeasure(haction, hdate, huser, id, fk_ref_gm_status, mod_user, mod_date)
+VALUES (1, '2018-06-11 14:01:00', 'admin',11,1, 'admin', '2018-06-11 14:01:00');
+INSERT INTO public.htbl_gridmeasure(haction, hdate, huser, id, fk_ref_gm_status, mod_user, mod_date)
+VALUES (1, '2018-06-11 14:02:00', 'admin',11,3, 'admin', '2018-06-11 14:02:00');
+INSERT INTO public.htbl_gridmeasure(haction, hdate, huser, id, fk_ref_gm_status, mod_user, mod_date)
+VALUES (1, '2018-06-11 14:03:00', 'admin',11,4, 'admin', '2018-06-11 14:03:00');
+INSERT INTO public.htbl_gridmeasure(haction, hdate, huser, id, fk_ref_gm_status, mod_user, mod_date)
+VALUES (1, '2018-06-11 14:04:00', 'admin',11,5, 'admin', '2018-06-11 14:04:00');
+INSERT INTO public.htbl_gridmeasure(haction, hdate, huser, id, fk_ref_gm_status, mod_user, mod_date)
+VALUES (1, '2018-06-11 14:05:00', 'admin',11,6, 'admin', '2018-06-11 14:05:00');
+INSERT INTO public.htbl_gridmeasure(haction, hdate, huser, id, fk_ref_gm_status, mod_user, mod_date)
+VALUES (1, '2018-06-11 14:06:00', 'admin',11,7, 'admin', '2018-06-11 14:06:00');
+INSERT INTO public.htbl_gridmeasure(haction, hdate, huser, id, fk_ref_gm_status, mod_user, mod_date)
+VALUES (1, '2018-06-11 14:07:00', 'admin',11,8, 'admin', '2018-06-11 14:07:00');
+INSERT INTO public.htbl_gridmeasure(haction, hdate, huser, id, fk_ref_gm_status, mod_user, mod_date)
+VALUES (1, '2018-06-11 14:08:00', 'admin',11,9, 'admin', '2018-06-11 14:08:00');
+INSERT INTO public.htbl_gridmeasure(haction, hdate, huser, id, fk_ref_gm_status, mod_user, mod_date)
+VALUES (1, '2018-06-11 14:09:00', 'admin',11,10, 'admin', '2018-06-11 14:09:00');
+
+
+INSERT INTO public.htbl_gridmeasure(haction, hdate, huser, id, fk_ref_gm_status, mod_user, mod_date)
+VALUES (2, '2018-06-11 14:00:00', 'admin',10,0, 'admin', '2018-06-11 14:00:00');
+INSERT INTO public.htbl_gridmeasure(haction, hdate, huser, id, fk_ref_gm_status, mod_user, mod_date)
+VALUES (2, '2018-06-11 14:01:00', 'admin',10,1, 'admin', '2018-06-11 14:01:00');
+INSERT INTO public.htbl_gridmeasure(haction, hdate, huser, id, fk_ref_gm_status, mod_user, mod_date)
+VALUES (2, '2018-06-11 14:02:00', 'admin',10,3, 'admin', '2018-06-11 14:02:00');
+INSERT INTO public.htbl_gridmeasure(haction, hdate, huser, id, fk_ref_gm_status, mod_user, mod_date)
+VALUES (2, '2018-06-11 14:03:00', 'admin',10,4, 'admin', '2018-06-11 14:03:00');
+INSERT INTO public.htbl_gridmeasure(haction, hdate, huser, id, fk_ref_gm_status, mod_user, mod_date)
+VALUES (2, '2018-06-11 14:04:00', 'admin',10,5, 'admin', '2018-06-11 14:04:00');
+INSERT INTO public.htbl_gridmeasure(haction, hdate, huser, id, fk_ref_gm_status, mod_user, mod_date)
+VALUES (2, '2018-06-11 14:05:00', 'admin',10,6, 'admin', '2018-06-11 14:05:00');
+INSERT INTO public.htbl_gridmeasure(haction, hdate, huser, id, fk_ref_gm_status, mod_user, mod_date)
+VALUES (2, '2018-06-11 14:06:00', 'admin',10,7, 'admin', '2018-06-11 14:06:00');
+INSERT INTO public.htbl_gridmeasure(haction, hdate, huser, id, fk_ref_gm_status, mod_user, mod_date)
+VALUES (2, '2018-06-11 14:07:00', 'admin',10,8, 'admin', '2018-06-11 14:07:00');
+INSERT INTO public.htbl_gridmeasure(haction, hdate, huser, id, fk_ref_gm_status, mod_user, mod_date)
+VALUES (2, '2018-06-11 14:08:00', 'admin',10,9, 'admin', '2018-06-11 14:08:00');
+
+
+INSERT INTO public.htbl_gridmeasure(haction, hdate, huser, id, fk_ref_gm_status, mod_user, mod_date)
+VALUES (2, '2018-06-11 14:00:00', 'admin',9,0, 'admin', '2018-06-11 14:00:00');
+INSERT INTO public.htbl_gridmeasure(haction, hdate, huser, id, fk_ref_gm_status, mod_user, mod_date)
+VALUES (2, '2018-06-11 14:01:00', 'admin',9,1, 'admin', '2018-06-11 14:01:00');
+INSERT INTO public.htbl_gridmeasure(haction, hdate, huser, id, fk_ref_gm_status, mod_user, mod_date)
+VALUES (2, '2018-06-11 14:02:00', 'admin',9,3, 'admin', '2018-06-11 14:02:00');
+INSERT INTO public.htbl_gridmeasure(haction, hdate, huser, id, fk_ref_gm_status, mod_user, mod_date)
+VALUES (2, '2018-06-11 14:03:00', 'admin',9,4, 'admin', '2018-06-11 14:03:00');
+INSERT INTO public.htbl_gridmeasure(haction, hdate, huser, id, fk_ref_gm_status, mod_user, mod_date)
+VALUES (2, '2018-06-11 14:04:00', 'admin',9,5, 'admin', '2018-06-11 14:04:00');
+INSERT INTO public.htbl_gridmeasure(haction, hdate, huser, id, fk_ref_gm_status, mod_user, mod_date)
+VALUES (2, '2018-06-11 14:05:00', 'admin',9,6, 'admin', '2018-06-11 14:05:00');
+INSERT INTO public.htbl_gridmeasure(haction, hdate, huser, id, fk_ref_gm_status, mod_user, mod_date)
+VALUES (2, '2018-06-11 14:06:00', 'admin',9,7, 'admin', '2018-06-11 14:06:00');
+INSERT INTO public.htbl_gridmeasure(haction, hdate, huser, id, fk_ref_gm_status, mod_user, mod_date)
+VALUES (2, '2018-06-11 14:07:00', 'admin',9,8, 'admin', '2018-06-11 14:07:00');
+
+
+INSERT INTO public.htbl_gridmeasure(haction, hdate, huser, id, fk_ref_gm_status, mod_user, mod_date)
+VALUES (2, '2018-06-11 14:00:00', 'admin',8,0, 'admin', '2018-06-11 14:00:00');
+INSERT INTO public.htbl_gridmeasure(haction, hdate, huser, id, fk_ref_gm_status, mod_user, mod_date)
+VALUES (2, '2018-06-11 14:01:00', 'admin',8,1, 'admin', '2018-06-11 14:01:00');
+INSERT INTO public.htbl_gridmeasure(haction, hdate, huser, id, fk_ref_gm_status, mod_user, mod_date)
+VALUES (2, '2018-06-11 14:02:00', 'admin',8,3, 'admin', '2018-06-11 14:02:00');
+INSERT INTO public.htbl_gridmeasure(haction, hdate, huser, id, fk_ref_gm_status, mod_user, mod_date)
+VALUES (2, '2018-06-11 14:03:00', 'admin',8,4, 'admin', '2018-06-11 14:03:00');
+INSERT INTO public.htbl_gridmeasure(haction, hdate, huser, id, fk_ref_gm_status, mod_user, mod_date)
+VALUES (2, '2018-06-11 14:04:00', 'admin',8,5, 'admin', '2018-06-11 14:04:00');
+INSERT INTO public.htbl_gridmeasure(haction, hdate, huser, id, fk_ref_gm_status, mod_user, mod_date)
+VALUES (2, '2018-06-11 14:05:00', 'admin',8,6, 'admin', '2018-06-11 14:05:00');
+INSERT INTO public.htbl_gridmeasure(haction, hdate, huser, id, fk_ref_gm_status, mod_user, mod_date)
+VALUES (2, '2018-06-11 14:06:00', 'admin',8,7, 'admin', '2018-06-11 14:06:00');
+
+
+INSERT INTO public.htbl_gridmeasure(haction, hdate, huser, id, fk_ref_gm_status, mod_user, mod_date)
+VALUES (2, '2018-06-11 14:00:00', 'admin',7,0, 'admin', '2018-06-11 14:00:00');
+INSERT INTO public.htbl_gridmeasure(haction, hdate, huser, id, fk_ref_gm_status, mod_user, mod_date)
+VALUES (2, '2018-06-11 14:01:00', 'admin',7,1, 'admin', '2018-06-11 14:01:00');
+INSERT INTO public.htbl_gridmeasure(haction, hdate, huser, id, fk_ref_gm_status, mod_user, mod_date)
+VALUES (2, '2018-06-11 14:02:00', 'admin',7,3, 'admin', '2018-06-11 14:02:00');
+INSERT INTO public.htbl_gridmeasure(haction, hdate, huser, id, fk_ref_gm_status, mod_user, mod_date)
+VALUES (2, '2018-06-11 14:03:00', 'admin',7,4, 'admin', '2018-06-11 14:03:00');
+INSERT INTO public.htbl_gridmeasure(haction, hdate, huser, id, fk_ref_gm_status, mod_user, mod_date)
+VALUES (2, '2018-06-11 14:04:00', 'admin',7,5, 'admin', '2018-06-11 14:04:00');
+INSERT INTO public.htbl_gridmeasure(haction, hdate, huser, id, fk_ref_gm_status, mod_user, mod_date)
+VALUES (2, '2018-06-11 14:05:00', 'admin',7,6, 'admin', '2018-06-11 14:05:00');
+
+
+INSERT INTO public.htbl_gridmeasure(haction, hdate, huser, id, fk_ref_gm_status, mod_user, mod_date)
+VALUES (2, '2018-06-11 14:00:00', 'admin',6,0, 'admin', '2018-06-11 14:00:00');
+INSERT INTO public.htbl_gridmeasure(haction, hdate, huser, id, fk_ref_gm_status, mod_user, mod_date)
+VALUES (2, '2018-06-11 14:01:00', 'admin',6,1, 'admin', '2018-06-11 14:01:00');
+INSERT INTO public.htbl_gridmeasure(haction, hdate, huser, id, fk_ref_gm_status, mod_user, mod_date)
+VALUES (2, '2018-06-11 14:02:00', 'admin',6,3, 'admin', '2018-06-11 14:02:00');
+INSERT INTO public.htbl_gridmeasure(haction, hdate, huser, id, fk_ref_gm_status, mod_user, mod_date)
+VALUES (2, '2018-06-11 14:03:00', 'admin',6,4, 'admin', '2018-06-11 14:03:00');
+INSERT INTO public.htbl_gridmeasure(haction, hdate, huser, id, fk_ref_gm_status, mod_user, mod_date)
+VALUES (2, '2018-06-11 14:04:00', 'admin',6,5, 'admin', '2018-06-11 14:04:00');
+
+
+INSERT INTO public.htbl_gridmeasure(haction, hdate, huser, id, fk_ref_gm_status, mod_user, mod_date)
+VALUES (2, '2018-06-11 14:00:00', 'admin',5,0, 'admin', '2018-06-11 14:00:00');
+INSERT INTO public.htbl_gridmeasure(haction, hdate, huser, id, fk_ref_gm_status, mod_user, mod_date)
+VALUES (2, '2018-06-11 14:01:00', 'admin',5,1, 'admin', '2018-06-11 14:01:00');
+INSERT INTO public.htbl_gridmeasure(haction, hdate, huser, id, fk_ref_gm_status, mod_user, mod_date)
+VALUES (2, '2018-06-11 14:02:00', 'admin',5,3, 'admin', '2018-06-11 14:02:00');
+INSERT INTO public.htbl_gridmeasure(haction, hdate, huser, id, fk_ref_gm_status, mod_user, mod_date)
+VALUES (2, '2018-06-11 14:03:00', 'admin',5,4, 'admin', '2018-06-11 14:03:00');
+
+
+INSERT INTO public.htbl_gridmeasure(haction, hdate, huser, id, fk_ref_gm_status, mod_user, mod_date)
+VALUES (2, '2018-06-11 14:00:00', 'admin',4,0, 'admin', '2018-06-11 14:00:00');
+INSERT INTO public.htbl_gridmeasure(haction, hdate, huser, id, fk_ref_gm_status, mod_user, mod_date)
+VALUES (2, '2018-06-11 14:01:00', 'admin',4,1, 'admin', '2018-06-11 14:01:00');
+INSERT INTO public.htbl_gridmeasure(haction, hdate, huser, id, fk_ref_gm_status, mod_user, mod_date)
+VALUES (2, '2018-06-11 14:02:00', 'admin',4,3, 'admin', '2018-06-11 14:02:00');
+
+
+INSERT INTO public.htbl_gridmeasure(haction, hdate, huser, id, fk_ref_gm_status, mod_user, mod_date)
+VALUES (2, '2018-06-11 14:00:00', 'admin',3,0, 'admin', '2018-06-11 14:00:00');
+INSERT INTO public.htbl_gridmeasure(haction, hdate, huser, id, fk_ref_gm_status, mod_user, mod_date)
+VALUES (2, '2018-06-11 14:01:00', 'admin',3,1, 'admin', '2018-06-11 14:01:00');
+INSERT INTO public.htbl_gridmeasure(haction, hdate, huser, id, fk_ref_gm_status, mod_user, mod_date)
+VALUES (2, '2018-06-11 14:02:00', 'admin',3,3, 'admin', '2018-06-11 14:02:00');
+INSERT INTO public.htbl_gridmeasure(haction, hdate, huser, id, fk_ref_gm_status, mod_user, mod_date)
+VALUES (2, '2018-06-11 14:03:00', 'admin',3,2, 'admin', '2018-06-11 14:03:00');
+
+
+INSERT INTO public.htbl_gridmeasure(haction, hdate, huser, id, fk_ref_gm_status, mod_user, mod_date)
+VALUES (2, '2018-06-11 14:00:00', 'admin',2,0, 'jasper', '2018-06-11 14:00:00');
+INSERT INTO public.htbl_gridmeasure(haction, hdate, huser, id, fk_ref_gm_status, mod_user, mod_date)
+VALUES (2, '2018-06-11 14:01:00', 'admin',2,1, 'jasper', '2018-06-11 14:01:00');
+
+
+INSERT INTO public.htbl_gridmeasure(haction, hdate, huser, id, fk_ref_gm_status, mod_user, mod_date)
+VALUES (2, '2018-06-11 14:01:00', 'admin',1,0, 'otto', '2018-06-11 14:01:00');
+
+-- PUBLIC.HTBL_ID_COUNTER Automatic generanted History Table DDL --
+-- <GENERATED CODE!>
+
+DROP TABLE IF EXISTS PUBLIC.HTBL_ID_COUNTER;
+DROP SEQUENCE IF EXISTS PUBLIC.HTBL_ID_COUNTER_ID_SEQ;
+
+CREATE SEQUENCE PUBLIC.HTBL_ID_COUNTER_ID_SEQ
+ INCREMENT 1
+ MINVALUE 1
+ MAXVALUE 9223372036854775807
+ START 1
+ CACHE 1;
+
+ALTER TABLE PUBLIC.HTBL_ID_COUNTER_ID_SEQ
+ OWNER TO PLGM_SERVICE;
+
+CREATE TABLE PUBLIC.HTBL_ID_COUNTER
+(
+ HID integer NOT NULL DEFAULT nextval('HTBL_ID_COUNTER_ID_SEQ'::regclass),
+ HACTION integer NOT NULL,
+ HDATE timestamp without time zone NOT NULL,
+ HUSER character varying(100),
+
+ ID integer,
+ COUNTER integer,
+ COUNTER_TYPE character varying (256),
+ INFO character varying (256),
+
+ CREATE_USER character varying(100),
+ CREATE_DATE timestamp without time zone,
+ MOD_USER character varying(100),
+ MOD_DATE timestamp without time zone,
+ CONSTRAINT HTBL_ID_COUNTER_PKEY PRIMARY KEY (HID)
+)
+WITH (
+ OIDS=FALSE
+);
+
+ALTER TABLE PUBLIC.HTBL_ID_COUNTER
+ OWNER TO PLGM_SERVICE;
+GRANT ALL ON TABLE PUBLIC.HTBL_ID_COUNTER TO PLGM_SERVICE;
+
+
+
+-- PUBLIC.HTBL_SINGLE_GRIDMEASURE Automatic generanted History Table DDL --
+-- <GENERATED CODE!>
+
+DROP TABLE IF EXISTS PUBLIC.HTBL_SINGLE_GRIDMEASURE;
+DROP SEQUENCE IF EXISTS PUBLIC.HTBL_SINGLE_GRIDMEASURE_ID_SEQ;
+
+CREATE SEQUENCE PUBLIC.HTBL_SINGLE_GRIDMEASURE_ID_SEQ
+ INCREMENT 1
+ MINVALUE 1
+ MAXVALUE 9223372036854775807
+ START 1
+ CACHE 1;
+
+ALTER TABLE PUBLIC.HTBL_SINGLE_GRIDMEASURE_ID_SEQ
+ OWNER TO PLGM_SERVICE;
+
+
+
+CREATE TABLE PUBLIC.HTBL_SINGLE_GRIDMEASURE
+(
+ HID integer NOT NULL DEFAULT nextval('HTBL_SINGLE_GRIDMEASURE_ID_SEQ'::regclass),
+ HACTION integer NOT NULL,
+ HDATE timestamp without time zone NOT NULL,
+ HUSER character varying(100),
+
+ ID integer,
+ SORTORDER integer,
+ TITLE character varying (256),
+ SWITCHING_OBJECT character varying (256),
+ CIM_ID character varying (256),
+ CIM_NAME character varying (256),
+ CIM_DESCRIPTION character varying (1024),
+ RESPONSIBLE_ONSITE_NAME character varying(256),
+ RESPONSIBLE_ONSITE_DEPARTMENT character varying(256),
+ NETWORK_CONTROL character varying (256),
+ PLANNED_STARTTIME_SINGLEMEASURE timestamp without time zone,
+ PLANNED_ENDTIME_SINGLEMEASURE timestamp without time zone,
+ DESCRIPTION character varying (1024),
+ FK_TBL_GRIDMEASURE integer,
+
+ CREATE_USER character varying(100),
+ CREATE_DATE timestamp without time zone,
+ MOD_USER character varying(100),
+ MOD_DATE timestamp without time zone,
+ CONSTRAINT HTBL_SINGLE_GRIDMEASURE_PKEY PRIMARY KEY (HID)
+)
+WITH (
+ OIDS=FALSE
+);
+
+ALTER TABLE PUBLIC.HTBL_SINGLE_GRIDMEASURE
+ OWNER TO PLGM_SERVICE;
+GRANT ALL ON TABLE PUBLIC.HTBL_SINGLE_GRIDMEASURE TO PLGM_SERVICE;
+
+
+
+
+-- PUBLIC.HTBL_STEPS Automatic generanted History Table DDL --
+-- <GENERATED CODE!>
+
+DROP TABLE IF EXISTS PUBLIC.HTBL_STEPS;
+DROP SEQUENCE IF EXISTS PUBLIC.HTBL_STEPS_ID_SEQ;
+
+CREATE SEQUENCE PUBLIC.HTBL_STEPS_ID_SEQ
+ INCREMENT 1
+ MINVALUE 1
+ MAXVALUE 9223372036854775807
+ START 1
+ CACHE 1;
+
+ALTER TABLE PUBLIC.HTBL_STEPS_ID_SEQ
+ OWNER TO PLGM_SERVICE;
+
+CREATE TABLE PUBLIC.HTBL_STEPS
+(
+ HID integer NOT NULL DEFAULT nextval('HTBL_STEPS_ID_SEQ'::regclass),
+ HACTION integer NOT NULL,
+ HDATE timestamp without time zone NOT NULL,
+ HUSER character varying(100),
+
+ ID integer,
+ SORTORDER integer,
+ SWITCHING_OBJECT character varying (256),
+ TYPE character varying(256),
+ PRESENT_TIME character varying(256),
+ PRESENT_STATE character varying(256),
+ TARGET_STATE character varying (256),
+ OPERATOR character varying(256),
+ FK_TBL_SINGLE_GRIDMEASURE integer,
+ CREATE_USER character varying (100),
+ CREATE_DATE timestamp without time zone,
+ MOD_USER character varying (100),
+ MOD_DATE timestamp without time zone,
+
+ CONSTRAINT HTBL_STEPS_PKEY PRIMARY KEY (HID)
+)
+WITH (
+ OIDS=FALSE
+);
+
+ALTER TABLE PUBLIC.HTBL_STEPS
+ OWNER TO PLGM_SERVICE;
+GRANT ALL ON TABLE PUBLIC.HTBL_STEPS TO PLGM_SERVICE;
+
+
+-- PUBLIC.HTBL_DOCUMENTS Automatic generanted History Table DDL --
+-- <GENERATED CODE!>
+
+DROP TABLE IF EXISTS PUBLIC.HTBL_DOCUMENTS;
+DROP SEQUENCE IF EXISTS PUBLIC.HTBL_DOCUMENTS_ID_SEQ;
+
+CREATE SEQUENCE PUBLIC.HTBL_DOCUMENTS_ID_SEQ
+ INCREMENT 1
+ MINVALUE 1
+ MAXVALUE 9223372036854775807
+ START 1
+ CACHE 1;
+
+ALTER TABLE PUBLIC.HTBL_DOCUMENTS_ID_SEQ
+ OWNER TO PLGM_SERVICE;
+
+CREATE TABLE PUBLIC.HTBL_DOCUMENTS
+(
+ HID integer NOT NULL DEFAULT nextval('HTBL_DOCUMENTS_ID_SEQ'::regclass),
+ HACTION integer NOT NULL,
+ HDATE timestamp without time zone NOT NULL,
+ HUSER character varying(100),
+
+ ID integer,
+ DOCUMENT_NAME character varying (260),
+ DOCUMENT bytea,
+
+ CREATE_USER character varying(100),
+ CREATE_DATE timestamp without time zone,
+ MOD_USER character varying(100),
+ MOD_DATE timestamp without time zone,
+ CONSTRAINT HTBL_DOCUMENTS_PKEY PRIMARY KEY (HID)
+)
+WITH (
+ OIDS=FALSE
+);
+
+ALTER TABLE PUBLIC.HTBL_DOCUMENTS
+ OWNER TO PLGM_SERVICE;
+GRANT ALL ON TABLE PUBLIC.HTBL_DOCUMENTS TO PLGM_SERVICE;
+
+-- PUBLIC.HTBL_MEASURE_DOCUMENTS Automatic generanted History Table DDL --
+-- <GENERATED CODE!>
+
+DROP TABLE IF EXISTS PUBLIC.HTBL_MEASURE_DOCUMENTS;
+DROP SEQUENCE IF EXISTS PUBLIC.HTBL_MEASURE_DOCUMENTS_ID_SEQ;
+
+CREATE SEQUENCE PUBLIC.HTBL_MEASURE_DOCUMENTS_ID_SEQ
+ INCREMENT 1
+ MINVALUE 1
+ MAXVALUE 9223372036854775807
+ START 1
+ CACHE 1;
+
+ALTER TABLE PUBLIC.HTBL_MEASURE_DOCUMENTS_ID_SEQ
+ OWNER TO PLGM_SERVICE;
+
+CREATE TABLE PUBLIC.HTBL_MEASURE_DOCUMENTS
+(
+ HID integer NOT NULL DEFAULT nextval('HTBL_MEASURE_DOCUMENTS_ID_SEQ'::regclass),
+ HACTION integer NOT NULL,
+ HDATE timestamp without time zone NOT NULL,
+ HUSER character varying(100),
+
+ ID integer,
+ FK_TBL_MEASURE integer,
+ FK_TBL_DOCUMENTS integer,
+
+ CREATE_USER character varying(100),
+ CREATE_DATE timestamp without time zone,
+ MOD_USER character varying(100),
+ MOD_DATE timestamp without time zone,
+ CONSTRAINT HTBL_MEASURE_DOCUMENTS_PKEY PRIMARY KEY (HID)
+)
+WITH (
+ OIDS=FALSE
+);
+
+ALTER TABLE PUBLIC.HTBL_MEASURE_DOCUMENTS
+ OWNER TO PLGM_SERVICE;
+GRANT ALL ON TABLE PUBLIC.HTBL_MEASURE_DOCUMENTS TO PLGM_SERVICE;
+
+-- ----------------------------------------------------------------------------
+-- ----------------------------------------------------------------------------
+-- TRIGGER
+-- ----------------------------------------------------------------------------
+-- ----------------------------------------------------------------------------
+
+-- ---------------------------------------------
+-- TRIGGER REF_TERRITORY
+-- ---------------------------------------------
+
+
+-- PUBLIC.REF_TERRITORY INSERT TRIGGER --
+-- <GENERATED CODE!>
+CREATE OR REPLACE FUNCTION PUBLIC.REF_TERRITORY_INSERT_TRG()
+ RETURNS trigger AS
+$BODY$
+ BEGIN
+ INSERT INTO HREF_TERRITORY (
+ ID,NAME,DESCRIPTION,CREATE_USER,CREATE_DATE,MOD_USER,MOD_DATE,
+
+ HACTION,
+ HDATE,
+ HUSER
+ )
+ VALUES (
+
+ NEW.ID,NEW.NAME,NEW.DESCRIPTION,NEW.CREATE_USER,NEW.CREATE_DATE,NEW.MOD_USER,NEW.MOD_DATE,
+
+ 1,
+ current_timestamp,
+ NEW.CREATE_USER );
+
+ RETURN NEW;
+ END;
+$BODY$
+ LANGUAGE plpgsql VOLATILE
+ COST 100;
+ALTER FUNCTION PUBLIC.REF_TERRITORY_INSERT_TRG()
+ OWNER TO PLGM_SERVICE;
+
+
+DROP TRIGGER IF EXISTS REF_TERRITORY_INSERT_TRG ON PUBLIC.REF_TERRITORY;
+
+CREATE TRIGGER REF_TERRITORY_INSERT_TRG
+ BEFORE INSERT
+ ON PUBLIC.REF_TERRITORY
+ FOR EACH ROW
+ EXECUTE PROCEDURE PUBLIC.REF_TERRITORY_INSERT_TRG();
+
+
+
+-- PUBLIC.REF_TERRITORY UPDATE TRIGGER --
+-- <GENERATED CODE!>
+
+CREATE OR REPLACE FUNCTION PUBLIC.REF_TERRITORY_UPDATE_TRG()
+ RETURNS trigger AS
+$BODY$
+ BEGIN
+ INSERT INTO HREF_TERRITORY (
+ ID,NAME,DESCRIPTION,CREATE_USER,CREATE_DATE,MOD_USER,MOD_DATE,
+
+ HACTION,
+ HDATE,
+ HUSER
+ )
+ VALUES (
+ NEW.ID,NEW.NAME,NEW.DESCRIPTION,NEW.CREATE_USER,NEW.CREATE_DATE,NEW.MOD_USER,NEW.MOD_DATE,
+ 2,
+ current_timestamp,
+ NEW.MOD_USER
+ );
+
+ RETURN NEW;
+ END;
+$BODY$
+ LANGUAGE plpgsql VOLATILE
+ COST 100;
+ALTER FUNCTION PUBLIC.REF_TERRITORY_UPDATE_TRG()
+ OWNER TO PLGM_SERVICE;
+
+DROP TRIGGER IF EXISTS REF_TERRITORY_UPDATE_TRG ON PUBLIC.REF_TERRITORY;
+
+CREATE TRIGGER REF_TERRITORY_UPDATE_TRG
+ BEFORE UPDATE
+ ON PUBLIC.REF_TERRITORY
+ FOR EACH ROW
+ EXECUTE PROCEDURE PUBLIC.REF_TERRITORY_UPDATE_TRG();
+
+
+
+-- PUBLIC.REF_TERRITORY DELETE TRIGGER --
+-- <GENERATED CODE!>
+
+CREATE OR REPLACE FUNCTION PUBLIC.REF_TERRITORY_DELETE_TRG()
+ RETURNS trigger AS
+$BODY$
+ BEGIN
+ IF TG_OP = 'DELETE' THEN
+ INSERT INTO HREF_TERRITORY (
+
+ ID,NAME,DESCRIPTION,CREATE_USER,CREATE_DATE,MOD_USER,MOD_DATE,
+
+ HACTION,
+ HDATE,
+ HUSER
+ )
+ VALUES (
+ OLD.ID,OLD.NAME,OLD.DESCRIPTION,OLD.CREATE_USER,OLD.CREATE_DATE,OLD.MOD_USER,OLD.MOD_DATE,
+
+ 3,
+ current_timestamp,
+ OLD.MOD_USER );
+ END IF;
+
+ RETURN OLD;
+ END;
+$BODY$
+ LANGUAGE plpgsql VOLATILE
+ COST 100;
+ALTER FUNCTION PUBLIC.REF_TERRITORY_DELETE_TRG()
+ OWNER TO PLGM_SERVICE;
+
+DROP TRIGGER IF EXISTS REF_TERRITORY_DELETE_TRG ON PUBLIC.REF_TERRITORY;
+
+CREATE TRIGGER REF_TERRITORY_DELETE_TRG
+ BEFORE DELETE
+ ON PUBLIC.REF_TERRITORY
+ FOR EACH ROW
+ EXECUTE PROCEDURE PUBLIC.REF_TERRITORY_DELETE_TRG();
+
+
+
+-- PUBLIC.TBL_ID_COUNTER INSERT TRIGGER --
+-- <GENERATED CODE!>
+CREATE OR REPLACE FUNCTION PUBLIC.TBL_ID_COUNTER_INSERT_TRG()
+ RETURNS trigger AS
+$BODY$
+ BEGIN
+ INSERT INTO HTBL_ID_COUNTER (
+ ID,COUNTER,COUNTER_TYPE,INFO,CREATE_USER,CREATE_DATE,MOD_USER,MOD_DATE,
+
+ HACTION,
+ HDATE,
+ HUSER
+ )
+ VALUES (
+
+ NEW.ID,NEW.COUNTER,NEW.COUNTER_TYPE,NEW.INFO,NEW.CREATE_USER,NEW.CREATE_DATE,NEW.MOD_USER,NEW.MOD_DATE,
+
+ 1,
+ current_timestamp,
+ NEW.CREATE_USER );
+
+ RETURN NEW;
+ END;
+$BODY$
+ LANGUAGE plpgsql VOLATILE
+ COST 100;
+ALTER FUNCTION PUBLIC.TBL_ID_COUNTER_INSERT_TRG()
+ OWNER TO PLGM_SERVICE;
+
+
+DROP TRIGGER IF EXISTS TBL_ID_COUNTER_INSERT_TRG ON PUBLIC.TBL_ID_COUNTER;
+
+CREATE TRIGGER TBL_ID_COUNTER_INSERT_TRG
+ BEFORE INSERT
+ ON PUBLIC.TBL_ID_COUNTER
+ FOR EACH ROW
+ EXECUTE PROCEDURE PUBLIC.TBL_ID_COUNTER_INSERT_TRG();
+
+
+
+-- PUBLIC.TBL_ID_COUNTER UPDATE TRIGGER --
+-- <GENERATED CODE!>
+
+CREATE OR REPLACE FUNCTION PUBLIC.TBL_ID_COUNTER_UPDATE_TRG()
+ RETURNS trigger AS
+$BODY$
+ BEGIN
+ INSERT INTO HTBL_ID_COUNTER (
+ ID,COUNTER,COUNTER_TYPE,INFO,CREATE_USER,CREATE_DATE,MOD_USER,MOD_DATE,
+
+ HACTION,
+ HDATE,
+ HUSER
+ )
+ VALUES (
+ NEW.ID,NEW.COUNTER,NEW.COUNTER_TYPE,NEW.INFO,NEW.CREATE_USER,NEW.CREATE_DATE,NEW.MOD_USER,NEW.MOD_DATE,
+ 2,
+ current_timestamp,
+ NEW.MOD_USER
+ );
+
+ RETURN NEW;
+ END;
+$BODY$
+ LANGUAGE plpgsql VOLATILE
+ COST 100;
+ALTER FUNCTION PUBLIC.TBL_ID_COUNTER_UPDATE_TRG()
+ OWNER TO PLGM_SERVICE;
+
+DROP TRIGGER IF EXISTS TBL_ID_COUNTER_UPDATE_TRG ON PUBLIC.TBL_ID_COUNTER;
+
+CREATE TRIGGER TBL_ID_COUNTER_UPDATE_TRG
+ BEFORE UPDATE
+ ON PUBLIC.TBL_ID_COUNTER
+ FOR EACH ROW
+ EXECUTE PROCEDURE PUBLIC.TBL_ID_COUNTER_UPDATE_TRG();
+
+
+
+-- PUBLIC.TBL_ID_COUNTER DELETE TRIGGER --
+-- <GENERATED CODE!>
+
+CREATE OR REPLACE FUNCTION PUBLIC.TBL_ID_COUNTER_DELETE_TRG()
+ RETURNS trigger AS
+$BODY$
+ BEGIN
+ IF TG_OP = 'DELETE' THEN
+ INSERT INTO HTBL_ID_COUNTER (
+
+ ID,COUNTER,COUNTER_TYPE,INFO,CREATE_USER,CREATE_DATE,MOD_USER,MOD_DATE,
+
+ HACTION,
+ HDATE,
+ HUSER
+ )
+ VALUES (
+ OLD.ID,OLD.COUNTER,OLD.COUNTER_TYPE,OLD.INFO,OLD.CREATE_USER,OLD.CREATE_DATE,OLD.MOD_USER,OLD.MOD_DATE,
+
+ 3,
+ current_timestamp,
+ OLD.MOD_USER );
+ END IF;
+
+ RETURN OLD;
+ END;
+$BODY$
+ LANGUAGE plpgsql VOLATILE
+ COST 100;
+ALTER FUNCTION PUBLIC.TBL_ID_COUNTER_DELETE_TRG()
+ OWNER TO PLGM_SERVICE;
+
+DROP TRIGGER IF EXISTS TBL_ID_COUNTER_DELETE_TRG ON PUBLIC.TBL_ID_COUNTER;
+
+CREATE TRIGGER TBL_ID_COUNTER_DELETE_TRG
+ BEFORE DELETE
+ ON PUBLIC.TBL_ID_COUNTER
+ FOR EACH ROW
+ EXECUTE PROCEDURE PUBLIC.TBL_ID_COUNTER_DELETE_TRG();
+
+
+
+-- PUBLIC.TBL_SINGLE_GRIDMEASURE INSERT TRIGGER --
+-- <GENERATED CODE!>
+CREATE OR REPLACE FUNCTION PUBLIC.TBL_SINGLE_GRIDMEASURE_INSERT_TRG()
+ RETURNS trigger AS
+$BODY$
+ BEGIN
+ INSERT INTO HTBL_SINGLE_GRIDMEASURE (
+ ID,SORTORDER,TITLE,SWITCHING_OBJECT,CIM_ID,CIM_NAME,CIM_DESCRIPTION,PLANNED_STARTTIME_SINGLEMEASURE,PLANNED_ENDTIME_SINGLEMEASURE,DESCRIPTION, RESPONSIBLE_ONSITE_NAME, RESPONSIBLE_ONSITE_DEPARTMENT,NETWORK_CONTROL,FK_TBL_GRIDMEASURE,CREATE_USER,CREATE_DATE,MOD_USER,MOD_DATE,
+
+ HACTION,
+ HDATE,
+ HUSER
+ )
+ VALUES (
+
+ NEW.ID,NEW.SORTORDER,NEW.TITLE,NEW.SWITCHING_OBJECT,NEW.CIM_ID,NEW.CIM_NAME,NEW.CIM_DESCRIPTION,NEW.PLANNED_STARTTIME_SINGLEMEASURE,NEW.PLANNED_ENDTIME_SINGLEMEASURE,NEW.DESCRIPTION, NEW.RESPONSIBLE_ONSITE_NAME, NEW.RESPONSIBLE_ONSITE_DEPARTMENT,NEW.NETWORK_CONTROL,NEW.FK_TBL_GRIDMEASURE,NEW.CREATE_USER,NEW.CREATE_DATE,NEW.MOD_USER,NEW.MOD_DATE,
+
+ 1,
+ current_timestamp,
+ NEW.CREATE_USER );
+
+ RETURN NEW;
+ END;
+$BODY$
+ LANGUAGE plpgsql VOLATILE
+ COST 100;
+ALTER FUNCTION PUBLIC.TBL_SINGLE_GRIDMEASURE_INSERT_TRG()
+ OWNER TO PLGM_SERVICE;
+
+
+DROP TRIGGER IF EXISTS TBL_SINGLE_GRIDMEASURE_INSERT_TRG ON PUBLIC.TBL_SINGLE_GRIDMEASURE;
+
+CREATE TRIGGER TBL_SINGLE_GRIDMEASURE_INSERT_TRG
+ BEFORE INSERT
+ ON PUBLIC.TBL_SINGLE_GRIDMEASURE
+ FOR EACH ROW
+ EXECUTE PROCEDURE PUBLIC.TBL_SINGLE_GRIDMEASURE_INSERT_TRG();
+
+
+
+-- PUBLIC.TBL_SINGLE_GRIDMEASURE UPDATE TRIGGER --
+-- <GENERATED CODE!>
+
+CREATE OR REPLACE FUNCTION PUBLIC.TBL_SINGLE_GRIDMEASURE_UPDATE_TRG()
+ RETURNS trigger AS
+$BODY$
+ BEGIN
+ INSERT INTO HTBL_SINGLE_GRIDMEASURE (
+ ID,SORTORDER,TITLE,SWITCHING_OBJECT,CIM_ID,CIM_NAME,CIM_DESCRIPTION,PLANNED_STARTTIME_SINGLEMEASURE,PLANNED_ENDTIME_SINGLEMEASURE,DESCRIPTION,RESPONSIBLE_ONSITE_NAME, RESPONSIBLE_ONSITE_DEPARTMENT,NETWORK_CONTROL,FK_TBL_GRIDMEASURE,CREATE_USER,CREATE_DATE,MOD_USER,MOD_DATE,
+
+ HACTION,
+ HDATE,
+ HUSER
+ )
+ VALUES (
+ NEW.ID,NEW.SORTORDER,NEW.TITLE,NEW.SWITCHING_OBJECT,NEW.CIM_ID,NEW.CIM_NAME,NEW.CIM_DESCRIPTION,NEW.PLANNED_STARTTIME_SINGLEMEASURE,NEW.PLANNED_ENDTIME_SINGLEMEASURE,NEW.DESCRIPTION,NEW.RESPONSIBLE_ONSITE_NAME, NEW.RESPONSIBLE_ONSITE_DEPARTMENT,NEW.NETWORK_CONTROL,NEW.FK_TBL_GRIDMEASURE,NEW.CREATE_USER,NEW.CREATE_DATE,NEW.MOD_USER,NEW.MOD_DATE,
+ 2,
+ current_timestamp,
+ NEW.MOD_USER
+ );
+
+ RETURN NEW;
+ END;
+$BODY$
+ LANGUAGE plpgsql VOLATILE
+ COST 100;
+ALTER FUNCTION PUBLIC.TBL_SINGLE_GRIDMEASURE_UPDATE_TRG()
+ OWNER TO PLGM_SERVICE;
+
+DROP TRIGGER IF EXISTS TBL_SINGLE_GRIDMEASURE_UPDATE_TRG ON PUBLIC.TBL_SINGLE_GRIDMEASURE;
+
+CREATE TRIGGER TBL_SINGLE_GRIDMEASURE_UPDATE_TRG
+ BEFORE UPDATE
+ ON PUBLIC.TBL_SINGLE_GRIDMEASURE
+ FOR EACH ROW
+ EXECUTE PROCEDURE PUBLIC.TBL_SINGLE_GRIDMEASURE_UPDATE_TRG();
+
+
+
+-- PUBLIC.TBL_SINGLE_GRIDMEASURE DELETE TRIGGER --
+-- <GENERATED CODE!>
+
+CREATE OR REPLACE FUNCTION PUBLIC.TBL_SINGLE_GRIDMEASURE_DELETE_TRG()
+ RETURNS trigger AS
+$BODY$
+ BEGIN
+ IF TG_OP = 'DELETE' THEN
+ INSERT INTO HTBL_SINGLE_GRIDMEASURE (
+
+ ID,SORTORDER,TITLE,SWITCHING_OBJECT,CIM_ID,CIM_NAME,CIM_DESCRIPTION,PLANNED_STARTTIME_SINGLEMEASURE,PLANNED_ENDTIME_SINGLEMEASURE,DESCRIPTION,RESPONSIBLE_ONSITE_NAME, RESPONSIBLE_ONSITE_DEPARTMENT, NETWORK_CONTROL,FK_TBL_GRIDMEASURE,CREATE_USER,CREATE_DATE,MOD_USER,MOD_DATE,
+
+ HACTION,
+ HDATE,
+ HUSER
+ )
+ VALUES (
+ OLD.ID,OLD.SORTORDER,OLD.TITLE,OLD.SWITCHING_OBJECT,OLD.CIM_ID,OLD.CIM_NAME,OLD.CIM_DESCRIPTION,OLD.PLANNED_STARTTIME_SINGLEMEASURE,OLD.PLANNED_ENDTIME_SINGLEMEASURE,OLD.DESCRIPTION,OLD.RESPONSIBLE_ONSITE_NAME, OLD.RESPONSIBLE_ONSITE_DEPARTMENT,OLD.NETWORK_CONTROL,OLD.FK_TBL_GRIDMEASURE,OLD.CREATE_USER,OLD.CREATE_DATE,OLD.MOD_USER,OLD.MOD_DATE,
+
+ 3,
+ current_timestamp,
+ OLD.MOD_USER );
+ END IF;
+
+ RETURN OLD;
+ END;
+$BODY$
+ LANGUAGE plpgsql VOLATILE
+ COST 100;
+ALTER FUNCTION PUBLIC.TBL_SINGLE_GRIDMEASURE_DELETE_TRG()
+ OWNER TO PLGM_SERVICE;
+
+DROP TRIGGER IF EXISTS TBL_SINGLE_GRIDMEASURE_DELETE_TRG ON PUBLIC.TBL_SINGLE_GRIDMEASURE;
+
+CREATE TRIGGER TBL_SINGLE_GRIDMEASURE_DELETE_TRG
+ BEFORE DELETE
+ ON PUBLIC.TBL_SINGLE_GRIDMEASURE
+ FOR EACH ROW
+ EXECUTE PROCEDURE PUBLIC.TBL_SINGLE_GRIDMEASURE_DELETE_TRG();
+
+
+
+
+
+-- PUBLIC.TBL_STEPS INSERT TRIGGER --
+-- <GENERATED CODE!>
+CREATE OR REPLACE FUNCTION PUBLIC.TBL_STEPS_INSERT_TRG()
+ RETURNS trigger AS
+$BODY$
+ BEGIN
+ INSERT INTO HTBL_STEPS (
+ ID,SORTORDER,SWITCHING_OBJECT,TYPE,PRESENT_TIME, PRESENT_STATE, TARGET_STATE, OPERATOR, FK_TBL_SINGLE_GRIDMEASURE,CREATE_USER,CREATE_DATE,MOD_USER,MOD_DATE,
+
+ HACTION,
+ HDATE,
+ HUSER
+ )
+ VALUES (
+
+ NEW.ID,NEW.SORTORDER,NEW.SWITCHING_OBJECT,NEW.TYPE, NEW.PRESENT_TIME, NEW.PRESENT_STATE, NEW.TARGET_STATE, NEW.OPERATOR, NEW.FK_TBL_SINGLE_GRIDMEASURE,NEW.CREATE_USER,NEW.CREATE_DATE,NEW.MOD_USER,NEW.MOD_DATE,
+
+ 1,
+ current_timestamp,
+ NEW.CREATE_USER );
+
+ RETURN NEW;
+ END;
+$BODY$
+ LANGUAGE plpgsql VOLATILE
+ COST 100;
+ALTER FUNCTION PUBLIC.TBL_STEPS_INSERT_TRG()
+ OWNER TO PLGM_SERVICE;
+
+DROP TRIGGER IF EXISTS TBL_STEPS_INSERT_TRG ON PUBLIC.TBL_STEPS;
+
+CREATE TRIGGER TBL_STEPS_INSERT_TRG
+ BEFORE INSERT
+ ON PUBLIC.TBL_STEPS
+ FOR EACH ROW
+ EXECUTE PROCEDURE PUBLIC.TBL_STEPS_INSERT_TRG();
+
+
+
+-- PUBLIC.TBL_STEPS UPDATE TRIGGER --
+-- <GENERATED CODE!>
+
+CREATE OR REPLACE FUNCTION PUBLIC.TBL_STEPS_UPDATE_TRG()
+ RETURNS trigger AS
+$BODY$
+ BEGIN
+ INSERT INTO HTBL_STEPS (
+ ID,SORTORDER,SWITCHING_OBJECT,TYPE,PRESENT_TIME, PRESENT_STATE, TARGET_STATE, OPERATOR,FK_TBL_SINGLE_GRIDMEASURE,CREATE_USER,CREATE_DATE,MOD_USER,MOD_DATE,
+
+ HACTION,
+ HDATE,
+ HUSER
+ )
+ VALUES (
+ NEW.ID,NEW.SORTORDER,NEW.SWITCHING_OBJECT,NEW.TYPE,NEW.PRESENT_TIME, NEW.PRESENT_STATE, NEW.TARGET_STATE, NEW.OPERATOR,NEW.FK_TBL_SINGLE_GRIDMEASURE,NEW.CREATE_USER,NEW.CREATE_DATE,NEW.MOD_USER,NEW.MOD_DATE,
+ 2,
+ current_timestamp,
+ NEW.MOD_USER
+ );
+
+ RETURN NEW;
+ END;
+$BODY$
+ LANGUAGE plpgsql VOLATILE
+ COST 100;
+ALTER FUNCTION PUBLIC.TBL_STEPS_UPDATE_TRG()
+ OWNER TO PLGM_SERVICE;
+
+DROP TRIGGER IF EXISTS TBL_STEPS_UPDATE_TRG ON PUBLIC.TBL_STEPS;
+
+CREATE TRIGGER TBL_STEPS_UPDATE_TRG
+ BEFORE UPDATE
+ ON PUBLIC.TBL_STEPS
+ FOR EACH ROW
+ EXECUTE PROCEDURE PUBLIC.TBL_STEPS_UPDATE_TRG();
+
+
+
+-- PUBLIC.TBL_STEPS DELETE TRIGGER --
+-- <GENERATED CODE!>
+
+CREATE OR REPLACE FUNCTION PUBLIC.TBL_STEPS_DELETE_TRG()
+ RETURNS trigger AS
+$BODY$
+ BEGIN
+ IF TG_OP = 'DELETE' THEN
+ INSERT INTO HTBL_STEPS (
+
+ ID,SORTORDER,SWITCHING_OBJECT,TYPE,PRESENT_TIME, PRESENT_STATE, TARGET_STATE, OPERATOR,FK_TBL_SINGLE_GRIDMEASURE,CREATE_USER,CREATE_DATE,MOD_USER,MOD_DATE,
+
+ HACTION,
+ HDATE,
+ HUSER
+ )
+ VALUES (
+ OLD.ID,OLD.SORTORDER,OLD.SWITCHING_OBJECT,OLD.TYPE,OLD.PRESENT_TIME, OLD.PRESENT_STATE, OLD.TARGET_STATE, OLD.OPERATOR,OLD.FK_TBL_SINGLE_GRIDMEASURE,OLD.CREATE_USER,OLD.CREATE_DATE,OLD.MOD_USER,OLD.MOD_DATE,
+
+ 3,
+ current_timestamp,
+ OLD.MOD_USER );
+ END IF;
+
+ RETURN OLD;
+ END;
+$BODY$
+ LANGUAGE plpgsql VOLATILE
+ COST 100;
+ALTER FUNCTION PUBLIC.TBL_STEPS_DELETE_TRG()
+ OWNER TO PLGM_SERVICE;
+
+DROP TRIGGER IF EXISTS TBL_STEPS_DELETE_TRG ON PUBLIC.TBL_STEPS;
+
+CREATE TRIGGER TBL_STEPS_DELETE_TRG
+ BEFORE DELETE
+ ON PUBLIC.TBL_STEPS
+ FOR EACH ROW
+ EXECUTE PROCEDURE PUBLIC.TBL_STEPS_DELETE_TRG();
+
+
+-- PUBLIC.TBL_LOCK INSERT TRIGGER --
+-- <GENERATED CODE!>
+CREATE OR REPLACE FUNCTION PUBLIC.TBL_LOCK_INSERT_TRG()
+ RETURNS trigger AS
+$BODY$
+ BEGIN
+ INSERT INTO HTBL_LOCK (
+ ID,KEY,USERNAME,INFO,CREATE_USER,CREATE_DATE,MOD_USER,MOD_DATE,
+
+ HACTION,
+ HDATE,
+ HUSER
+ )
+ VALUES (
+
+ NEW.ID,NEW.KEY,NEW.USERNAME,NEW.INFO,NEW.CREATE_USER,NEW.CREATE_DATE,NEW.MOD_USER,NEW.MOD_DATE,
+
+ 1,
+ current_timestamp,
+ NEW.CREATE_USER );
+
+ RETURN NEW;
+ END;
+$BODY$
+ LANGUAGE plpgsql VOLATILE
+ COST 100;
+ALTER FUNCTION PUBLIC.TBL_LOCK_INSERT_TRG()
+ OWNER TO PLGM_SERVICE;
+
+
+DROP TRIGGER IF EXISTS TBL_LOCK_INSERT_TRG ON PUBLIC.TBL_LOCK;
+
+CREATE TRIGGER TBL_LOCK_INSERT_TRG
+ BEFORE INSERT
+ ON PUBLIC.TBL_LOCK
+ FOR EACH ROW
+ EXECUTE PROCEDURE PUBLIC.TBL_LOCK_INSERT_TRG();
+
+
+
+-- PUBLIC.TBL_LOCK UPDATE TRIGGER --
+-- <GENERATED CODE!>
+
+CREATE OR REPLACE FUNCTION PUBLIC.TBL_LOCK_UPDATE_TRG()
+ RETURNS trigger AS
+$BODY$
+ BEGIN
+ INSERT INTO HTBL_LOCK (
+ ID,KEY,USERNAME,INFO,CREATE_USER,CREATE_DATE,MOD_USER,MOD_DATE,
+
+ HACTION,
+ HDATE,
+ HUSER
+ )
+ VALUES (
+ NEW.ID,NEW.KEY,NEW.USERNAME,NEW.INFO,NEW.CREATE_USER,NEW.CREATE_DATE,NEW.MOD_USER,NEW.MOD_DATE,
+ 2,
+ current_timestamp,
+ NEW.MOD_USER
+ );
+
+ RETURN NEW;
+ END;
+$BODY$
+ LANGUAGE plpgsql VOLATILE
+ COST 100;
+ALTER FUNCTION PUBLIC.TBL_LOCK_UPDATE_TRG()
+ OWNER TO PLGM_SERVICE;
+
+DROP TRIGGER IF EXISTS TBL_LOCK_UPDATE_TRG ON PUBLIC.TBL_LOCK;
+
+CREATE TRIGGER TBL_LOCK_UPDATE_TRG
+ BEFORE UPDATE
+ ON PUBLIC.TBL_LOCK
+ FOR EACH ROW
+ EXECUTE PROCEDURE PUBLIC.TBL_LOCK_UPDATE_TRG();
+
+
+
+-- PUBLIC.TBL_LOCK DELETE TRIGGER --
+-- <GENERATED CODE!>
+
+CREATE OR REPLACE FUNCTION PUBLIC.TBL_LOCK_DELETE_TRG()
+ RETURNS trigger AS
+$BODY$
+ BEGIN
+ IF TG_OP = 'DELETE' THEN
+ INSERT INTO HTBL_LOCK (
+
+ ID,KEY,USERNAME,INFO,CREATE_USER,CREATE_DATE,MOD_USER,MOD_DATE,
+
+ HACTION,
+ HDATE,
+ HUSER
+ )
+ VALUES (
+ OLD.ID,OLD.KEY,OLD.USERNAME,OLD.INFO,OLD.CREATE_USER,OLD.CREATE_DATE,OLD.MOD_USER,OLD.MOD_DATE,
+
+ 3,
+ current_timestamp,
+ OLD.MOD_USER );
+ END IF;
+
+ RETURN OLD;
+ END;
+$BODY$
+ LANGUAGE plpgsql VOLATILE
+ COST 100;
+ALTER FUNCTION PUBLIC.TBL_LOCK_DELETE_TRG()
+ OWNER TO PLGM_SERVICE;
+
+DROP TRIGGER IF EXISTS TBL_LOCK_DELETE_TRG ON PUBLIC.TBL_LOCK;
+
+CREATE TRIGGER TBL_LOCK_DELETE_TRG
+ BEFORE DELETE
+ ON PUBLIC.TBL_LOCK
+ FOR EACH ROW
+ EXECUTE PROCEDURE PUBLIC.TBL_LOCK_DELETE_TRG();
+
+
+
+
+-- PUBLIC.TBL_USER_SETTINGS INSERT TRIGGER --
+-- <GENERATED CODE!>
+CREATE OR REPLACE FUNCTION PUBLIC.TBL_USER_SETTINGS_INSERT_TRG()
+ RETURNS trigger AS
+$BODY$
+ BEGIN
+ INSERT INTO HTBL_USER_SETTINGS (
+ ID,USERNAME,SETTING_TYPE,VALUE,CREATE_USER,CREATE_DATE,MOD_USER,MOD_DATE,
+
+ HACTION,
+ HDATE,
+ HUSER
+ )
+ VALUES (
+
+ NEW.ID,NEW.USERNAME,NEW.SETTING_TYPE,NEW.VALUE,NEW.CREATE_USER,NEW.CREATE_DATE,NEW.MOD_USER,NEW.MOD_DATE,
+
+ 1,
+ current_timestamp,
+ NEW.CREATE_USER );
+
+ RETURN NEW;
+ END;
+$BODY$
+ LANGUAGE plpgsql VOLATILE
+ COST 100;
+ALTER FUNCTION PUBLIC.TBL_USER_SETTINGS_INSERT_TRG()
+ OWNER TO PLGM_SERVICE;
+
+
+DROP TRIGGER IF EXISTS TBL_USER_SETTINGS_INSERT_TRG ON PUBLIC.TBL_USER_SETTINGS;
+
+CREATE TRIGGER TBL_USER_SETTINGS_INSERT_TRG
+ BEFORE INSERT
+ ON PUBLIC.TBL_USER_SETTINGS
+ FOR EACH ROW
+ EXECUTE PROCEDURE PUBLIC.TBL_USER_SETTINGS_INSERT_TRG();
+
+
+
+-- PUBLIC.TBL_USER_SETTINGS UPDATE TRIGGER --
+-- <GENERATED CODE!>
+
+CREATE OR REPLACE FUNCTION PUBLIC.TBL_USER_SETTINGS_UPDATE_TRG()
+ RETURNS trigger AS
+$BODY$
+ BEGIN
+ INSERT INTO HTBL_USER_SETTINGS (
+ ID,USERNAME,SETTING_TYPE,VALUE,CREATE_USER,CREATE_DATE,MOD_USER,MOD_DATE,
+
+ HACTION,
+ HDATE,
+ HUSER
+ )
+ VALUES (
+ NEW.ID,NEW.USERNAME,NEW.SETTING_TYPE,NEW.VALUE,NEW.CREATE_USER,NEW.CREATE_DATE,NEW.MOD_USER,NEW.MOD_DATE,
+ 2,
+ current_timestamp,
+ NEW.MOD_USER
+ );
+
+ RETURN NEW;
+ END;
+$BODY$
+ LANGUAGE plpgsql VOLATILE
+ COST 100;
+ALTER FUNCTION PUBLIC.TBL_USER_SETTINGS_UPDATE_TRG()
+ OWNER TO PLGM_SERVICE;
+
+DROP TRIGGER IF EXISTS TBL_USER_SETTINGS_UPDATE_TRG ON PUBLIC.TBL_USER_SETTINGS;
+
+CREATE TRIGGER TBL_USER_SETTINGS_UPDATE_TRG
+ BEFORE UPDATE
+ ON PUBLIC.TBL_USER_SETTINGS
+ FOR EACH ROW
+ EXECUTE PROCEDURE PUBLIC.TBL_USER_SETTINGS_UPDATE_TRG();
+
+
+
+-- PUBLIC.TBL_USER_SETTINGS DELETE TRIGGER --
+-- <GENERATED CODE!>
+
+CREATE OR REPLACE FUNCTION PUBLIC.TBL_USER_SETTINGS_DELETE_TRG()
+ RETURNS trigger AS
+$BODY$
+ BEGIN
+ IF TG_OP = 'DELETE' THEN
+ INSERT INTO HTBL_USER_SETTINGS (
+
+ ID,USERNAME,SETTING_TYPE,VALUE,CREATE_USER,CREATE_DATE,MOD_USER,MOD_DATE,
+
+ HACTION,
+ HDATE,
+ HUSER
+ )
+ VALUES (
+ OLD.ID,OLD.USERNAME,OLD.SETTING_TYPE,OLD.VALUE,OLD.CREATE_USER,OLD.CREATE_DATE,OLD.MOD_USER,OLD.MOD_DATE,
+
+ 3,
+ current_timestamp,
+ OLD.MOD_USER );
+ END IF;
+
+ RETURN OLD;
+ END;
+$BODY$
+ LANGUAGE plpgsql VOLATILE
+ COST 100;
+ALTER FUNCTION PUBLIC.TBL_USER_SETTINGS_DELETE_TRG()
+ OWNER TO PLGM_SERVICE;
+
+DROP TRIGGER IF EXISTS TBL_USER_SETTINGS_DELETE_TRG ON PUBLIC.TBL_USER_SETTINGS;
+
+CREATE TRIGGER TBL_USER_SETTINGS_DELETE_TRG
+ BEFORE DELETE
+ ON PUBLIC.TBL_USER_SETTINGS
+ FOR EACH ROW
+ EXECUTE PROCEDURE PUBLIC.TBL_USER_SETTINGS_DELETE_TRG();
+
+
+-- PUBLIC.HREF_COST_CENTER INSERT TRIGGER --
+-- <GENERATED CODE!>
+CREATE OR REPLACE FUNCTION PUBLIC.HREF_COST_CENTER_INSERT_TRG()
+ RETURNS trigger AS
+$BODY$
+ BEGIN
+ INSERT INTO HHREF_COST_CENTER (
+ HID,HACTION,HDATE,HUSER,ID,NAME,DESCRIPTION,CREATE_USER,CREATE_DATE,MOD_USER,MOD_DATE,
+
+ HACTION,
+ HDATE,
+ HUSER
+ )
+ VALUES (
+
+ NEW.HID,NEW.HACTION,NEW.HDATE,NEW.HUSER,NEW.ID,NEW.NAME,NEW.DESCRIPTION,NEW.CREATE_USER,NEW.CREATE_DATE,NEW.MOD_USER,NEW.MOD_DATE,
+
+ 1,
+ current_timestamp,
+ NEW.CREATE_USER );
+
+ RETURN NEW;
+ END;
+$BODY$
+ LANGUAGE plpgsql VOLATILE
+ COST 100;
+ALTER FUNCTION PUBLIC.HREF_COST_CENTER_INSERT_TRG()
+ OWNER TO PLGM_SERVICE;
+
+
+DROP TRIGGER IF EXISTS HREF_COST_CENTER_INSERT_TRG ON PUBLIC.HREF_COST_CENTER;
+
+CREATE TRIGGER HREF_COST_CENTER_INSERT_TRG
+ BEFORE INSERT
+ ON PUBLIC.HREF_COST_CENTER
+ FOR EACH ROW
+ EXECUTE PROCEDURE PUBLIC.HREF_COST_CENTER_INSERT_TRG();
+
+
+
+-- PUBLIC.HREF_COST_CENTER UPDATE TRIGGER --
+-- <GENERATED CODE!>
+
+CREATE OR REPLACE FUNCTION PUBLIC.HREF_COST_CENTER_UPDATE_TRG()
+ RETURNS trigger AS
+$BODY$
+ BEGIN
+ INSERT INTO HHREF_COST_CENTER (
+ HID,HACTION,HDATE,HUSER,ID,NAME,DESCRIPTION,CREATE_USER,CREATE_DATE,MOD_USER,MOD_DATE,
+
+ HACTION,
+ HDATE,
+ HUSER
+ )
+ VALUES (
+ NEW.HID,NEW.HACTION,NEW.HDATE,NEW.HUSER,NEW.ID,NEW.NAME,NEW.DESCRIPTION,NEW.CREATE_USER,NEW.CREATE_DATE,NEW.MOD_USER,NEW.MOD_DATE,
+ 2,
+ current_timestamp,
+ NEW.MOD_USER
+ );
+
+ RETURN NEW;
+ END;
+$BODY$
+ LANGUAGE plpgsql VOLATILE
+ COST 100;
+ALTER FUNCTION PUBLIC.HREF_COST_CENTER_UPDATE_TRG()
+ OWNER TO PLGM_SERVICE;
+
+DROP TRIGGER IF EXISTS HREF_COST_CENTER_UPDATE_TRG ON PUBLIC.HREF_COST_CENTER;
+
+CREATE TRIGGER HREF_COST_CENTER_UPDATE_TRG
+ BEFORE UPDATE
+ ON PUBLIC.HREF_COST_CENTER
+ FOR EACH ROW
+ EXECUTE PROCEDURE PUBLIC.HREF_COST_CENTER_UPDATE_TRG();
+
+
+
+-- PUBLIC.HREF_COST_CENTER DELETE TRIGGER --
+-- <GENERATED CODE!>
+
+CREATE OR REPLACE FUNCTION PUBLIC.HREF_COST_CENTER_DELETE_TRG()
+ RETURNS trigger AS
+$BODY$
+ BEGIN
+ IF TG_OP = 'DELETE' THEN
+ INSERT INTO HHREF_COST_CENTER (
+
+ HID,HACTION,HDATE,HUSER,ID,NAME,DESCRIPTION,CREATE_USER,CREATE_DATE,MOD_USER,MOD_DATE,
+
+ HACTION,
+ HDATE,
+ HUSER
+ )
+ VALUES (
+ OLD.HID,OLD.HACTION,OLD.HDATE,OLD.HUSER,OLD.ID,OLD.NAME,OLD.DESCRIPTION,OLD.CREATE_USER,OLD.CREATE_DATE,OLD.MOD_USER,OLD.MOD_DATE,
+
+ 3,
+ current_timestamp,
+ OLD.MOD_USER );
+ END IF;
+
+ RETURN OLD;
+ END;
+$BODY$
+ LANGUAGE plpgsql VOLATILE
+ COST 100;
+ALTER FUNCTION PUBLIC.HREF_COST_CENTER_DELETE_TRG()
+ OWNER TO PLGM_SERVICE;
+
+DROP TRIGGER IF EXISTS HREF_COST_CENTER_DELETE_TRG ON PUBLIC.HREF_COST_CENTER;
+
+CREATE TRIGGER HREF_COST_CENTER_DELETE_TRG
+ BEFORE DELETE
+ ON PUBLIC.HREF_COST_CENTER
+ FOR EACH ROW
+ EXECUTE PROCEDURE PUBLIC.HREF_COST_CENTER_DELETE_TRG();
+
+
+
+-- PUBLIC.REF_BRANCH INSERT TRIGGER --
+-- <GENERATED CODE!>
+CREATE OR REPLACE FUNCTION PUBLIC.REF_BRANCH_INSERT_TRG()
+ RETURNS trigger AS
+$BODY$
+ BEGIN
+ INSERT INTO HREF_BRANCH (
+
+ ID,NAME,DESCRIPTION,COLOR_CODE,CREATE_USER,CREATE_DATE,MOD_USER,MOD_DATE,
+
+ HACTION,
+ HDATE,
+ HUSER
+ )
+ VALUES (
+
+ NEW.ID,NEW.NAME,NEW.DESCRIPTION,NEW.COLOR_CODE,NEW.CREATE_USER,NEW.CREATE_DATE,NEW.MOD_USER,NEW.MOD_DATE,
+ 1,
+ current_timestamp,
+ NEW.CREATE_USER );
+
+ RETURN NEW;
+ END;
+$BODY$
+ LANGUAGE plpgsql VOLATILE
+ COST 100;
+ALTER FUNCTION PUBLIC.REF_BRANCH_INSERT_TRG()
+ OWNER TO PLGM_SERVICE;
+
+
+DROP TRIGGER IF EXISTS REF_BRANCH_INSERT_TRG ON PUBLIC.REF_BRANCH;
+
+CREATE TRIGGER REF_BRANCH_INSERT_TRG
+ BEFORE INSERT
+ ON PUBLIC.REF_BRANCH
+ FOR EACH ROW
+ EXECUTE PROCEDURE PUBLIC.REF_BRANCH_INSERT_TRG();
+
+
+
+-- PUBLIC.REF_BRANCH UPDATE TRIGGER --
+-- <GENERATED CODE!>
+
+CREATE OR REPLACE FUNCTION PUBLIC.REF_BRANCH_UPDATE_TRG()
+ RETURNS trigger AS
+$BODY$
+ BEGIN
+ INSERT INTO HREF_BRANCH (
+ ID,NAME,DESCRIPTION,COLOR_CODE,CREATE_USER,CREATE_DATE,MOD_USER,MOD_DATE,
+
+ HACTION,
+ HDATE,
+ HUSER
+ )
+ VALUES (
+ NEW.ID,NEW.NAME,NEW.DESCRIPTION,NEW.COLOR_CODE,NEW.CREATE_USER,NEW.CREATE_DATE,NEW.MOD_USER,NEW.MOD_DATE,
+ 2,
+ current_timestamp,
+ NEW.MOD_USER
+ );
+
+ RETURN NEW;
+ END;
+$BODY$
+ LANGUAGE plpgsql VOLATILE
+ COST 100;
+ALTER FUNCTION PUBLIC.REF_BRANCH_UPDATE_TRG()
+ OWNER TO PLGM_SERVICE;
+
+DROP TRIGGER IF EXISTS REF_BRANCH_UPDATE_TRG ON PUBLIC.REF_BRANCH;
+
+CREATE TRIGGER REF_BRANCH_UPDATE_TRG
+ BEFORE UPDATE
+ ON PUBLIC.REF_BRANCH
+ FOR EACH ROW
+ EXECUTE PROCEDURE PUBLIC.REF_BRANCH_UPDATE_TRG();
+
+
+
+-- PUBLIC.REF_BRANCH DELETE TRIGGER --
+-- <GENERATED CODE!>
+
+CREATE OR REPLACE FUNCTION PUBLIC.REF_BRANCH_DELETE_TRG()
+ RETURNS trigger AS
+$BODY$
+ BEGIN
+ IF TG_OP = 'DELETE' THEN
+ INSERT INTO HREF_BRANCH (
+ ID,NAME,DESCRIPTION,COLOR_CODE,CREATE_USER,CREATE_DATE,MOD_USER,MOD_DATE,
+ HACTION,
+ HDATE,
+ HUSER
+ )
+ VALUES (
+ OLD.ID,OLD.NAME,OLD.DESCRIPTION,OLD.COLOR_CODE,OLD.CREATE_USER,OLD.CREATE_DATE,OLD.MOD_USER,OLD.MOD_DATE,
+ 3,
+ current_timestamp,
+ OLD.MOD_USER );
+ END IF;
+
+ RETURN OLD;
+ END;
+$BODY$
+ LANGUAGE plpgsql VOLATILE
+ COST 100;
+ALTER FUNCTION PUBLIC.REF_BRANCH_DELETE_TRG()
+ OWNER TO PLGM_SERVICE;
+
+DROP TRIGGER IF EXISTS REF_BRANCH_DELETE_TRG ON PUBLIC.REF_BRANCH;
+
+CREATE TRIGGER REF_BRANCH_DELETE_TRG
+ BEFORE DELETE
+ ON PUBLIC.REF_BRANCH
+ FOR EACH ROW
+ EXECUTE PROCEDURE PUBLIC.REF_BRANCH_DELETE_TRG();
+
+
+
+-- PUBLIC.REF_BRANCH_LEVEL INSERT TRIGGER --
+-- <GENERATED CODE!>
+CREATE OR REPLACE FUNCTION PUBLIC.REF_BRANCH_LEVEL_INSERT_TRG()
+ RETURNS trigger AS
+$BODY$
+ BEGIN
+ INSERT INTO HREF_BRANCH_LEVEL (
+ ID,NAME,DESCRIPTION,FK_REF_BRANCH,CREATE_USER,CREATE_DATE,MOD_USER,MOD_DATE,
+
+ HACTION,
+ HDATE,
+ HUSER
+ )
+ VALUES (
+
+ NEW.ID,NEW.NAME,NEW.DESCRIPTION,NEW.FK_REF_BRANCH,NEW.CREATE_USER,NEW.CREATE_DATE,NEW.MOD_USER,NEW.MOD_DATE,
+
+ 1,
+ current_timestamp,
+ NEW.CREATE_USER );
+
+ RETURN NEW;
+ END;
+$BODY$
+ LANGUAGE plpgsql VOLATILE
+ COST 100;
+ALTER FUNCTION PUBLIC.REF_BRANCH_LEVEL_INSERT_TRG()
+ OWNER TO PLGM_SERVICE;
+
+
+DROP TRIGGER IF EXISTS REF_BRANCH_LEVEL_INSERT_TRG ON PUBLIC.REF_BRANCH_LEVEL;
+
+CREATE TRIGGER REF_BRANCH_LEVEL_INSERT_TRG
+ BEFORE INSERT
+ ON PUBLIC.REF_BRANCH_LEVEL
+ FOR EACH ROW
+ EXECUTE PROCEDURE PUBLIC.REF_BRANCH_LEVEL_INSERT_TRG();
+
+
+
+-- PUBLIC.REF_BRANCH_LEVEL UPDATE TRIGGER --
+-- <GENERATED CODE!>
+
+CREATE OR REPLACE FUNCTION PUBLIC.REF_BRANCH_LEVEL_UPDATE_TRG()
+ RETURNS trigger AS
+$BODY$
+ BEGIN
+ INSERT INTO HREF_BRANCH_LEVEL (
+ ID,NAME,DESCRIPTION,FK_REF_BRANCH,CREATE_USER,CREATE_DATE,MOD_USER,MOD_DATE,
+
+ HACTION,
+ HDATE,
+ HUSER
+ )
+ VALUES (
+ NEW.ID,NEW.NAME,NEW.DESCRIPTION,NEW.FK_REF_BRANCH,NEW.CREATE_USER,NEW.CREATE_DATE,NEW.MOD_USER,NEW.MOD_DATE,
+ 2,
+ current_timestamp,
+ NEW.MOD_USER
+ );
+
+ RETURN NEW;
+ END;
+$BODY$
+ LANGUAGE plpgsql VOLATILE
+ COST 100;
+ALTER FUNCTION PUBLIC.REF_BRANCH_LEVEL_UPDATE_TRG()
+ OWNER TO PLGM_SERVICE;
+
+DROP TRIGGER IF EXISTS REF_BRANCH_LEVEL_UPDATE_TRG ON PUBLIC.REF_BRANCH_LEVEL;
+
+CREATE TRIGGER REF_BRANCH_LEVEL_UPDATE_TRG
+ BEFORE UPDATE
+ ON PUBLIC.REF_BRANCH_LEVEL
+ FOR EACH ROW
+ EXECUTE PROCEDURE PUBLIC.REF_BRANCH_LEVEL_UPDATE_TRG();
+
+
+
+-- PUBLIC.REF_BRANCH_LEVEL DELETE TRIGGER --
+-- <GENERATED CODE!>
+
+CREATE OR REPLACE FUNCTION PUBLIC.REF_BRANCH_LEVEL_DELETE_TRG()
+ RETURNS trigger AS
+$BODY$
+ BEGIN
+ IF TG_OP = 'DELETE' THEN
+ INSERT INTO HREF_BRANCH_LEVEL (
+
+ ID,NAME,DESCRIPTION,FK_REF_BRANCH,CREATE_USER,CREATE_DATE,MOD_USER,MOD_DATE,
+
+ HACTION,
+ HDATE,
+ HUSER
+ )
+ VALUES (
+ OLD.ID,OLD.NAME,OLD.DESCRIPTION,OLD.FK_REF_BRANCH,OLD.CREATE_USER,OLD.CREATE_DATE,OLD.MOD_USER,OLD.MOD_DATE,
+
+ 3,
+ current_timestamp,
+ OLD.MOD_USER );
+ END IF;
+
+ RETURN OLD;
+ END;
+$BODY$
+ LANGUAGE plpgsql VOLATILE
+ COST 100;
+ALTER FUNCTION PUBLIC.REF_BRANCH_LEVEL_DELETE_TRG()
+ OWNER TO PLGM_SERVICE;
+
+DROP TRIGGER IF EXISTS REF_BRANCH_LEVEL_DELETE_TRG ON PUBLIC.REF_BRANCH_LEVEL;
+
+CREATE TRIGGER REF_BRANCH_LEVEL_DELETE_TRG
+ BEFORE DELETE
+ ON PUBLIC.REF_BRANCH_LEVEL
+ FOR EACH ROW
+ EXECUTE PROCEDURE PUBLIC.REF_BRANCH_LEVEL_DELETE_TRG();
+
+
+
+
+
+-- PUBLIC.REF_GM_STATUS INSERT TRIGGER --
+-- <GENERATED CODE!>
+CREATE OR REPLACE FUNCTION PUBLIC.REF_GM_STATUS_INSERT_TRG()
+ RETURNS trigger AS
+$BODY$
+ BEGIN
+ INSERT INTO HREF_GM_STATUS (
+ ID,NAME,COLOR_CODE,CREATE_USER,CREATE_DATE,MOD_USER,MOD_DATE,
+
+ HACTION,
+ HDATE,
+ HUSER
+ )
+ VALUES (
+
+ NEW.ID,NEW.NAME,NEW.COLOR_CODE,NEW.CREATE_USER,NEW.CREATE_DATE,NEW.MOD_USER,NEW.MOD_DATE,
+
+ 1,
+ current_timestamp,
+ NEW.CREATE_USER );
+
+ RETURN NEW;
+ END;
+$BODY$
+ LANGUAGE plpgsql VOLATILE
+ COST 100;
+ALTER FUNCTION PUBLIC.REF_GM_STATUS_INSERT_TRG()
+ OWNER TO PLGM_SERVICE;
+
+
+DROP TRIGGER IF EXISTS REF_GM_STATUS_INSERT_TRG ON PUBLIC.REF_GM_STATUS;
+
+CREATE TRIGGER REF_GM_STATUS_INSERT_TRG
+ BEFORE INSERT
+ ON PUBLIC.REF_GM_STATUS
+ FOR EACH ROW
+ EXECUTE PROCEDURE PUBLIC.REF_GM_STATUS_INSERT_TRG();
+
+
+
+-- PUBLIC.REF_GM_STATUS UPDATE TRIGGER --
+-- <GENERATED CODE!>
+
+CREATE OR REPLACE FUNCTION PUBLIC.REF_GM_STATUS_UPDATE_TRG()
+ RETURNS trigger AS
+$BODY$
+ BEGIN
+ INSERT INTO HREF_GM_STATUS (
+ ID,NAME,COLOR_CODE,CREATE_USER,CREATE_DATE,MOD_USER,MOD_DATE,
+
+ HACTION,
+ HDATE,
+ HUSER
+ )
+ VALUES (
+ NEW.ID,NEW.NAME,NEW.COLOR_CODE,NEW.CREATE_USER,NEW.CREATE_DATE,NEW.MOD_USER,NEW.MOD_DATE,
+ 2,
+ current_timestamp,
+ NEW.MOD_USER
+ );
+
+ RETURN NEW;
+ END;
+$BODY$
+ LANGUAGE plpgsql VOLATILE
+ COST 100;
+ALTER FUNCTION PUBLIC.REF_GM_STATUS_UPDATE_TRG()
+ OWNER TO PLGM_SERVICE;
+
+DROP TRIGGER IF EXISTS REF_GM_STATUS_UPDATE_TRG ON PUBLIC.REF_GM_STATUS;
+
+CREATE TRIGGER REF_GM_STATUS_UPDATE_TRG
+ BEFORE UPDATE
+ ON PUBLIC.REF_GM_STATUS
+ FOR EACH ROW
+ EXECUTE PROCEDURE PUBLIC.REF_GM_STATUS_UPDATE_TRG();
+
+
+
+-- PUBLIC.REF_GM_STATUS DELETE TRIGGER --
+-- <GENERATED CODE!>
+
+CREATE OR REPLACE FUNCTION PUBLIC.REF_GM_STATUS_DELETE_TRG()
+ RETURNS trigger AS
+$BODY$
+ BEGIN
+ IF TG_OP = 'DELETE' THEN
+ INSERT INTO HREF_GM_STATUS (
+
+ ID,NAME,COLOR_CODE,CREATE_USER,CREATE_DATE,MOD_USER,MOD_DATE,
+
+ HACTION,
+ HDATE,
+ HUSER
+ )
+ VALUES (
+ OLD.ID,OLD.NAME,OLD.COLOR_CODE,OLD.CREATE_USER,OLD.CREATE_DATE,OLD.MOD_USER,OLD.MOD_DATE,
+
+ 3,
+ current_timestamp,
+ OLD.MOD_USER );
+ END IF;
+
+ RETURN OLD;
+ END;
+$BODY$
+ LANGUAGE plpgsql VOLATILE
+ COST 100;
+ALTER FUNCTION PUBLIC.REF_GM_STATUS_DELETE_TRG()
+ OWNER TO PLGM_SERVICE;
+
+DROP TRIGGER IF EXISTS REF_GM_STATUS_DELETE_TRG ON PUBLIC.REF_GM_STATUS;
+
+CREATE TRIGGER REF_GM_STATUS_DELETE_TRG
+ BEFORE DELETE
+ ON PUBLIC.REF_GM_STATUS
+ FOR EACH ROW
+ EXECUTE PROCEDURE PUBLIC.REF_GM_STATUS_DELETE_TRG();
+
+
+
+-- PUBLIC.TBL_GRIDMEASURE INSERT TRIGGER --
+-- <GENERATED CODE!>
+CREATE OR REPLACE FUNCTION PUBLIC.TBL_GRIDMEASURE_INSERT_TRG()
+ RETURNS trigger AS
+$BODY$
+ BEGIN
+ INSERT INTO HTBL_GRIDMEASURE (
+ ID,ID_DESCRIPTIVE,TITLE,AFFECTED_RESOURCE,REMARK,EMAIL_ADDRESSES,FK_REF_GM_STATUS,SWITCHING_OBJECT,COST_CENTER,APPROVAL_BY,AREA_OF_SWITCHING,APPOINTMENT_REPETITION,APPOINTMENT_STARTDATE,APPOINTMENT_NUMBEROF,PLANNED_STARTTIME_FIRST_SINGLEMEASURE,ENDTIME_GRIDMEASURE,TIME_OF_REALLOCATION,DESCRIPTION,FK_REF_BRANCH,FK_REF_BRANCH_LEVEL,CREATE_USER,CREATE_USER_DEPARTMENT,CREATE_DATE,MOD_USER,MOD_USER_DEPARTMENT,MOD_DATE,
+
+ HACTION,
+ HDATE,
+ HUSER
+ )
+ VALUES (
+
+ NEW.ID,NEW.ID_DESCRIPTIVE,NEW.TITLE,NEW.AFFECTED_RESOURCE,NEW.REMARK,NEW.EMAIL_ADDRESSES,NEW.FK_REF_GM_STATUS,NEW.SWITCHING_OBJECT,NEW.COST_CENTER,NEW.APPROVAL_BY,NEW.AREA_OF_SWITCHING,NEW.APPOINTMENT_REPETITION,NEW.APPOINTMENT_STARTDATE,NEW.APPOINTMENT_NUMBEROF,NEW.PLANNED_STARTTIME_FIRST_SINGLEMEASURE,NEW.ENDTIME_GRIDMEASURE,NEW.TIME_OF_REALLOCATION,NEW.DESCRIPTION,NEW.FK_REF_BRANCH,NEW.FK_REF_BRANCH_LEVEL,NEW.CREATE_USER,NEW.CREATE_USER_DEPARTMENT,NEW.CREATE_DATE,NEW.MOD_USER,NEW.MOD_USER_DEPARTMENT,NEW.MOD_DATE,
+
+ 1,
+ current_timestamp,
+ NEW.CREATE_USER );
+
+ RETURN NEW;
+ END;
+$BODY$
+ LANGUAGE plpgsql VOLATILE
+ COST 100;
+ALTER FUNCTION PUBLIC.TBL_GRIDMEASURE_INSERT_TRG()
+ OWNER TO PLGM_SERVICE;
+
+
+DROP TRIGGER IF EXISTS TBL_GRIDMEASURE_INSERT_TRG ON PUBLIC.TBL_GRIDMEASURE;
+
+CREATE TRIGGER TBL_GRIDMEASURE_INSERT_TRG
+ BEFORE INSERT
+ ON PUBLIC.TBL_GRIDMEASURE
+ FOR EACH ROW
+ EXECUTE PROCEDURE PUBLIC.TBL_GRIDMEASURE_INSERT_TRG();
+
+
+
+-- PUBLIC.TBL_GRIDMEASURE UPDATE TRIGGER --
+-- <GENERATED CODE!>
+
+CREATE OR REPLACE FUNCTION PUBLIC.TBL_GRIDMEASURE_UPDATE_TRG()
+ RETURNS trigger AS
+$BODY$
+ BEGIN
+ INSERT INTO HTBL_GRIDMEASURE (
+ ID,ID_DESCRIPTIVE,TITLE,AFFECTED_RESOURCE,REMARK,EMAIL_ADDRESSES,FK_REF_GM_STATUS,SWITCHING_OBJECT,COST_CENTER,APPROVAL_BY,AREA_OF_SWITCHING,APPOINTMENT_REPETITION,APPOINTMENT_STARTDATE,APPOINTMENT_NUMBEROF,PLANNED_STARTTIME_FIRST_SINGLEMEASURE,ENDTIME_GRIDMEASURE,TIME_OF_REALLOCATION,DESCRIPTION,FK_REF_BRANCH,FK_REF_BRANCH_LEVEL,CREATE_USER,CREATE_USER_DEPARTMENT,CREATE_DATE,MOD_USER,MOD_USER_DEPARTMENT,MOD_DATE,
+
+ HACTION,
+ HDATE,
+ HUSER
+ )
+ VALUES (
+ NEW.ID,NEW.ID_DESCRIPTIVE,NEW.TITLE,NEW.AFFECTED_RESOURCE,NEW.REMARK,NEW.EMAIL_ADDRESSES,NEW.FK_REF_GM_STATUS,NEW.SWITCHING_OBJECT,NEW.COST_CENTER,NEW.APPROVAL_BY,NEW.AREA_OF_SWITCHING,NEW.APPOINTMENT_REPETITION,NEW.APPOINTMENT_STARTDATE,NEW.APPOINTMENT_NUMBEROF,NEW.PLANNED_STARTTIME_FIRST_SINGLEMEASURE,NEW.ENDTIME_GRIDMEASURE,NEW.TIME_OF_REALLOCATION,NEW.DESCRIPTION,NEW.FK_REF_BRANCH,NEW.FK_REF_BRANCH_LEVEL,NEW.CREATE_USER,NEW.CREATE_USER_DEPARTMENT,NEW.CREATE_DATE,NEW.MOD_USER,NEW.MOD_USER_DEPARTMENT,NEW.MOD_DATE,
+ 2,
+ current_timestamp,
+ NEW.MOD_USER
+ );
+
+ RETURN NEW;
+ END;
+$BODY$
+ LANGUAGE plpgsql VOLATILE
+ COST 100;
+ALTER FUNCTION PUBLIC.TBL_GRIDMEASURE_UPDATE_TRG()
+ OWNER TO PLGM_SERVICE;
+
+DROP TRIGGER IF EXISTS TBL_GRIDMEASURE_UPDATE_TRG ON PUBLIC.TBL_GRIDMEASURE;
+
+CREATE TRIGGER TBL_GRIDMEASURE_UPDATE_TRG
+ BEFORE UPDATE
+ ON PUBLIC.TBL_GRIDMEASURE
+ FOR EACH ROW
+ EXECUTE PROCEDURE PUBLIC.TBL_GRIDMEASURE_UPDATE_TRG();
+
+
+
+-- PUBLIC.TBL_GRIDMEASURE DELETE TRIGGER --
+-- <GENERATED CODE!>
+
+CREATE OR REPLACE FUNCTION PUBLIC.TBL_GRIDMEASURE_DELETE_TRG()
+ RETURNS trigger AS
+$BODY$
+ BEGIN
+ IF TG_OP = 'DELETE' THEN
+ INSERT INTO HTBL_GRIDMEASURE (
+
+ ID,ID_DESCRIPTIVE,TITLE,AFFECTED_RESOURCE,REMARK,EMAIL_ADDRESSES,FK_REF_GM_STATUS,SWITCHING_OBJECT,COST_CENTER,APPROVAL_BY,AREA_OF_SWITCHING,APPOINTMENT_REPETITION,APPOINTMENT_STARTDATE,APPOINTMENT_NUMBEROF,PLANNED_STARTTIME_FIRST_SINGLEMEASURE,ENDTIME_GRIDMEASURE,TIME_OF_REALLOCATION,DESCRIPTION,FK_REF_BRANCH,FK_REF_BRANCH_LEVEL,CREATE_USER,CREATE_USER_DEPARTMENT,CREATE_DATE,MOD_USER,MOD_USER_DEPARTMENT,MOD_DATE,
+
+ HACTION,
+ HDATE,
+ HUSER
+ )
+ VALUES (
+ OLD.ID,OLD.ID_DESCRIPTIVE,OLD.TITLE,OLD.AFFECTED_RESOURCE,OLD.REMARK,OLD.EMAIL_ADDRESSES,OLD.FK_REF_GM_STATUS,OLD.SWITCHING_OBJECT,OLD.COST_CENTER,OLD.APPROVAL_BY,OLD.AREA_OF_SWITCHING,OLD.APPOINTMENT_REPETITION,OLD.APPOINTMENT_STARTDATE,OLD.APPOINTMENT_NUMBEROF,OLD.PLANNED_STARTTIME_FIRST_SINGLEMEASURE,OLD.ENDTIME_GRIDMEASURE,OLD.TIME_OF_REALLOCATION,OLD.DESCRIPTION,OLD.FK_REF_BRANCH,OLD.FK_REF_BRANCH_LEVEL,OLD.CREATE_USER,OLD.CREATE_USER_DEPARTMENT,OLD.CREATE_DATE,OLD.MOD_USER,OLD.MOD_USER_DEPARTMENT,OLD.MOD_DATE,
+
+ 3,
+ current_timestamp,
+ OLD.MOD_USER );
+ END IF;
+
+ RETURN OLD;
+ END;
+$BODY$
+ LANGUAGE plpgsql VOLATILE
+ COST 100;
+ALTER FUNCTION PUBLIC.TBL_GRIDMEASURE_DELETE_TRG()
+ OWNER TO PLGM_SERVICE;
+
+DROP TRIGGER IF EXISTS TBL_GRIDMEASURE_DELETE_TRG ON PUBLIC.TBL_GRIDMEASURE;
+
+CREATE TRIGGER TBL_GRIDMEASURE_DELETE_TRG
+ BEFORE DELETE
+ ON PUBLIC.TBL_GRIDMEASURE
+ FOR EACH ROW
+ EXECUTE PROCEDURE PUBLIC.TBL_GRIDMEASURE_DELETE_TRG();
+
+
+-- PUBLIC.TBL_DOCUMENTS INSERT TRIGGER --
+-- <GENERATED CODE!>
+CREATE OR REPLACE FUNCTION PUBLIC.TBL_DOCUMENTS_INSERT_TRG()
+ RETURNS trigger AS
+$BODY$
+ BEGIN
+ INSERT INTO HTBL_DOCUMENTS (
+ ID,DOCUMENT_NAME,CREATE_USER,CREATE_DATE,MOD_USER,MOD_DATE,
+
+ HACTION,
+ HDATE,
+ HUSER
+ )
+ VALUES (
+
+ NEW.ID,NEW.DOCUMENT_NAME,NEW.CREATE_USER,NEW.CREATE_DATE,NEW.MOD_USER,NEW.MOD_DATE,
+
+ 1,
+ current_timestamp,
+ NEW.CREATE_USER );
+
+ RETURN NEW;
+ END;
+$BODY$
+ LANGUAGE plpgsql VOLATILE
+ COST 100;
+ALTER FUNCTION PUBLIC.TBL_DOCUMENTS_INSERT_TRG()
+ OWNER TO PLGM_SERVICE;
+
+
+DROP TRIGGER IF EXISTS TBL_DOCUMENTS_INSERT_TRG ON PUBLIC.TBL_DOCUMENTS;
+
+CREATE TRIGGER TBL_DOCUMENTS_INSERT_TRG
+ BEFORE INSERT
+ ON PUBLIC.TBL_DOCUMENTS
+ FOR EACH ROW
+ EXECUTE PROCEDURE PUBLIC.TBL_DOCUMENTS_INSERT_TRG();
+
+
+
+-- PUBLIC.TBL_DOCUMENTS UPDATE TRIGGER --
+-- <GENERATED CODE!>
+
+CREATE OR REPLACE FUNCTION PUBLIC.TBL_DOCUMENTS_UPDATE_TRG()
+ RETURNS trigger AS
+$BODY$
+ BEGIN
+ INSERT INTO HTBL_DOCUMENTS (
+ ID,DOCUMENT_NAME,CREATE_USER,CREATE_DATE,MOD_USER,MOD_DATE,
+
+ HACTION,
+ HDATE,
+ HUSER
+ )
+ VALUES (
+ NEW.ID,NEW.DOCUMENT_NAME,NEW.CREATE_USER,NEW.CREATE_DATE,NEW.MOD_USER,NEW.MOD_DATE,
+ 2,
+ current_timestamp,
+ NEW.MOD_USER
+ );
+
+ RETURN NEW;
+ END;
+$BODY$
+ LANGUAGE plpgsql VOLATILE
+ COST 100;
+ALTER FUNCTION PUBLIC.TBL_DOCUMENTS_UPDATE_TRG()
+ OWNER TO PLGM_SERVICE;
+
+DROP TRIGGER IF EXISTS TBL_DOCUMENTS_UPDATE_TRG ON PUBLIC.TBL_DOCUMENTS;
+
+CREATE TRIGGER TBL_DOCUMENTS_UPDATE_TRG
+ BEFORE UPDATE
+ ON PUBLIC.TBL_DOCUMENTS
+ FOR EACH ROW
+ EXECUTE PROCEDURE PUBLIC.TBL_DOCUMENTS_UPDATE_TRG();
+
+
+
+-- PUBLIC.TBL_DOCUMENTS DELETE TRIGGER --
+-- <GENERATED CODE!>
+
+CREATE OR REPLACE FUNCTION PUBLIC.TBL_DOCUMENTS_DELETE_TRG()
+ RETURNS trigger AS
+$BODY$
+ BEGIN
+ IF TG_OP = 'DELETE' THEN
+ INSERT INTO HTBL_DOCUMENTS (
+
+ ID,DOCUMENT_NAME,CREATE_USER,CREATE_DATE,MOD_USER,MOD_DATE,
+
+ HACTION,
+ HDATE,
+ HUSER
+ )
+ VALUES (
+ OLD.ID,OLD.DOCUMENT_NAME,OLD.CREATE_USER,OLD.CREATE_DATE,OLD.MOD_USER,OLD.MOD_DATE,
+
+ 3,
+ current_timestamp,
+ OLD.MOD_USER );
+ END IF;
+
+ RETURN OLD;
+ END;
+$BODY$
+ LANGUAGE plpgsql VOLATILE
+ COST 100;
+ALTER FUNCTION PUBLIC.TBL_DOCUMENTS_DELETE_TRG()
+ OWNER TO PLGM_SERVICE;
+
+DROP TRIGGER IF EXISTS TBL_DOCUMENTS_DELETE_TRG ON PUBLIC.TBL_DOCUMENTS;
+
+CREATE TRIGGER TBL_DOCUMENTS_DELETE_TRG
+ BEFORE DELETE
+ ON PUBLIC.TBL_DOCUMENTS
+ FOR EACH ROW
+ EXECUTE PROCEDURE PUBLIC.TBL_DOCUMENTS_DELETE_TRG();
+
+
+
+
+
+
+-- PUBLIC.TBL_MEASURE_DOCUMENTS INSERT TRIGGER --
+-- <GENERATED CODE!>
+CREATE OR REPLACE FUNCTION PUBLIC.TBL_MEASURE_DOCUMENTS_INSERT_TRG()
+ RETURNS trigger AS
+$BODY$
+ BEGIN
+ INSERT INTO HTBL_MEASURE_DOCUMENTS (
+ ID,FK_TBL_MEASURE,FK_TBL_DOCUMENTS,CREATE_USER,CREATE_DATE,MOD_USER,MOD_DATE,
+
+ HACTION,
+ HDATE,
+ HUSER
+ )
+ VALUES (
+
+ NEW.ID,NEW.FK_TBL_MEASURE,NEW.FK_TBL_DOCUMENTS,NEW.CREATE_USER,NEW.CREATE_DATE,NEW.MOD_USER,NEW.MOD_DATE,
+
+ 1,
+ current_timestamp,
+ NEW.CREATE_USER );
+
+ RETURN NEW;
+ END;
+$BODY$
+ LANGUAGE plpgsql VOLATILE
+ COST 100;
+ALTER FUNCTION PUBLIC.TBL_MEASURE_DOCUMENTS_INSERT_TRG()
+ OWNER TO PLGM_SERVICE;
+
+
+DROP TRIGGER IF EXISTS TBL_MEASURE_DOCUMENTS_INSERT_TRG ON PUBLIC.TBL_MEASURE_DOCUMENTS;
+
+CREATE TRIGGER TBL_MEASURE_DOCUMENTS_INSERT_TRG
+ BEFORE INSERT
+ ON PUBLIC.TBL_MEASURE_DOCUMENTS
+ FOR EACH ROW
+ EXECUTE PROCEDURE PUBLIC.TBL_MEASURE_DOCUMENTS_INSERT_TRG();
+
+
+
+-- PUBLIC.TBL_MEASURE_DOCUMENTS UPDATE TRIGGER --
+-- <GENERATED CODE!>
+
+CREATE OR REPLACE FUNCTION PUBLIC.TBL_MEASURE_DOCUMENTS_UPDATE_TRG()
+ RETURNS trigger AS
+$BODY$
+ BEGIN
+ INSERT INTO HTBL_MEASURE_DOCUMENTS (
+ ID,FK_TBL_MEASURE,FK_TBL_DOCUMENTS,CREATE_USER,CREATE_DATE,MOD_USER,MOD_DATE,
+
+ HACTION,
+ HDATE,
+ HUSER
+ )
+ VALUES (
+ NEW.ID,NEW.FK_TBL_MEASURE,NEW.FK_TBL_DOCUMENTS,NEW.CREATE_USER,NEW.CREATE_DATE,NEW.MOD_USER,NEW.MOD_DATE,
+ 2,
+ current_timestamp,
+ NEW.MOD_USER
+ );
+
+ RETURN NEW;
+ END;
+$BODY$
+ LANGUAGE plpgsql VOLATILE
+ COST 100;
+ALTER FUNCTION PUBLIC.TBL_MEASURE_DOCUMENTS_UPDATE_TRG()
+ OWNER TO PLGM_SERVICE;
+
+DROP TRIGGER IF EXISTS TBL_MEASURE_DOCUMENTS_UPDATE_TRG ON PUBLIC.TBL_MEASURE_DOCUMENTS;
+
+CREATE TRIGGER TBL_MEASURE_DOCUMENTS_UPDATE_TRG
+ BEFORE UPDATE
+ ON PUBLIC.TBL_MEASURE_DOCUMENTS
+ FOR EACH ROW
+ EXECUTE PROCEDURE PUBLIC.TBL_MEASURE_DOCUMENTS_UPDATE_TRG();
+
+
+
+-- PUBLIC.TBL_MEASURE_DOCUMENTS DELETE TRIGGER --
+-- <GENERATED CODE!>
+
+CREATE OR REPLACE FUNCTION PUBLIC.TBL_MEASURE_DOCUMENTS_DELETE_TRG()
+ RETURNS trigger AS
+$BODY$
+ BEGIN
+ IF TG_OP = 'DELETE' THEN
+ INSERT INTO HTBL_MEASURE_DOCUMENTS (
+
+ ID,FK_TBL_MEASURE,FK_TBL_DOCUMENTS,CREATE_USER,CREATE_DATE,MOD_USER,MOD_DATE,
+
+ HACTION,
+ HDATE,
+ HUSER
+ )
+ VALUES (
+ OLD.ID,OLD.FK_TBL_MEASURE,OLD.FK_TBL_DOCUMENTS,OLD.CREATE_USER,OLD.CREATE_DATE,OLD.MOD_USER,OLD.MOD_DATE,
+
+ 3,
+ current_timestamp,
+ OLD.MOD_USER );
+ END IF;
+
+ RETURN OLD;
+ END;
+$BODY$
+ LANGUAGE plpgsql VOLATILE
+ COST 100;
+ALTER FUNCTION PUBLIC.TBL_MEASURE_DOCUMENTS_DELETE_TRG()
+ OWNER TO PLGM_SERVICE;
+
+DROP TRIGGER IF EXISTS TBL_MEASURE_DOCUMENTS_DELETE_TRG ON PUBLIC.TBL_MEASURE_DOCUMENTS;
+
+CREATE TRIGGER TBL_MEASURE_DOCUMENTS_DELETE_TRG
+ BEFORE DELETE
+ ON PUBLIC.TBL_MEASURE_DOCUMENTS
+ FOR EACH ROW
+ EXECUTE PROCEDURE PUBLIC.TBL_MEASURE_DOCUMENTS_DELETE_TRG();
diff --git a/db/migrations/V0_46__CREATE_PLGM_DB.sql b/db/migrations/V0_46__CREATE_PLGM_DB.sql
new file mode 100644
index 0000000..d70dfec
--- /dev/null
+++ b/db/migrations/V0_46__CREATE_PLGM_DB.sql
@@ -0,0 +1,3381 @@
+
+--Field COLOR_CODE added in Table REF_GM_STATUS, HREF_GM_STATUS, Insert-, Delete-, and Update-Triggers
+
+-- ---------------------------------------------
+-- DROPS
+-- ---------------------------------------------
+DROP TABLE IF EXISTS public.TBL_STEPS;
+DROP SEQUENCE IF EXISTS public.TBL_STEPS_ID_SEQ;
+
+DROP TABLE IF EXISTS public.TBL_SINGLE_GRIDMEASURE;
+DROP SEQUENCE IF EXISTS public.TBL_SINGLE_GRIDMEASURE_ID_SEQ;
+
+DROP TABLE IF EXISTS public.TBL_LOCK CASCADE;
+DROP SEQUENCE IF EXISTS public.TBL_LOCK_ID_SEQ;
+
+DROP TABLE IF EXISTS public.REF_USER_SETTINGS CASCADE;
+DROP SEQUENCE IF EXISTS public.REF_USER_SETTINGS_ID_SEQ;
+
+DROP TABLE IF EXISTS public.TBL_USER_SETTINGS CASCADE;
+DROP SEQUENCE IF EXISTS public.TBL_USER_SETTINGS_ID_SEQ;
+
+DROP TABLE IF EXISTS public.REF_COST_CENTER CASCADE;
+DROP SEQUENCE IF EXISTS public.REF_COST_CENTER_ID_SEQ;
+
+DROP TABLE IF EXISTS public.TBL_GRIDMEASURE CASCADE;
+DROP SEQUENCE IF EXISTS public.TBL_GRIDMEASURE_ID_SEQ;
+
+DROP TABLE IF EXISTS public.REF_BRANCH CASCADE;
+DROP SEQUENCE IF EXISTS public.REF_BRANCH_ID_SEQ;
+
+DROP TABLE IF EXISTS public.REF_BRANCH_LEVEL CASCADE;
+DROP SEQUENCE IF EXISTS public.REF_BRANCH_LEVEL_ID_SEQ;
+
+DROP TABLE IF EXISTS public.REF_GM_STATUS CASCADE;
+DROP SEQUENCE IF EXISTS public.REF_GM_STATUS_ID_SEQ;
+
+DROP TABLE IF EXISTS public.tbl_documents CASCADE;
+DROP SEQUENCE IF EXISTS public.tbl_documents_id_seq;
+
+DROP TABLE IF EXISTS public.tbl_measure_documents CASCADE;
+DROP SEQUENCE IF EXISTS public.tbl_measure_documents_id_seq;
+
+DROP TABLE IF EXISTS public.tbl_id_counter CASCADE;
+DROP SEQUENCE IF EXISTS public.tbl_id_counter_id_seq;
+
+DROP TABLE IF EXISTS public.REF_TERRITORY CASCADE;
+DROP SEQUENCE IF EXISTS public.REF_TERRITORY_ID_SEQ;
+
+
+DROP INDEX IF EXISTS public.huser_index;
+
+-- ---------------------------------------------
+-- TABLE REF_TERRITORY
+-- ---------------------------------------------
+
+CREATE SEQUENCE public.REF_TERRITORY_ID_SEQ
+ INCREMENT 1
+ MINVALUE 1
+ MAXVALUE 9223372036854775807
+ START 1
+ CACHE 1;
+ALTER TABLE public.REF_TERRITORY_ID_SEQ
+ OWNER TO plgm_service;
+
+
+CREATE TABLE public.REF_TERRITORY
+(
+ id integer NOT NULL DEFAULT nextval('REF_TERRITORY_ID_SEQ'::regclass),
+ name character varying(50) NOT NULL,
+ description character varying(255),
+ create_user character varying(100) NOT NULL,
+ create_date timestamp without time zone NOT NULL,
+ mod_user character varying(100),
+ mod_date timestamp without time zone,
+ CONSTRAINT REF_TERRITORY_pkey PRIMARY KEY (id)
+)
+WITH (
+ OIDS=FALSE
+);
+ALTER TABLE public.REF_TERRITORY
+ OWNER TO plgm_service;
+GRANT ALL ON TABLE public.REF_TERRITORY TO plgm_service;
+
+INSERT INTO public.REF_TERRITORY(
+ name, description, create_user, create_date, mod_user, mod_date)
+ VALUES ('Nord', 'Region Nord', 'testuser','12.04.2018','testuser','12.04.2018');
+INSERT INTO public.REF_TERRITORY(
+ name, description, create_user, create_date, mod_user, mod_date)
+ VALUES ('Ost', 'Region Ost', 'testuser','12.04.2018','testuser','12.04.2018');
+INSERT INTO public.REF_TERRITORY(
+ name, description, create_user, create_date, mod_user, mod_date)
+ VALUES ('SUED', 'Region SUED', 'testuser','12.04.2018','testuser','12.04.2018');
+
+
+
+-- ---------------------------------------------
+-- TABLE TBL_LOCK
+-- ---------------------------------------------
+
+CREATE SEQUENCE public.TBL_LOCK_ID_SEQ
+ INCREMENT 1
+ MINVALUE 1
+ MAXVALUE 9223372036854775807
+ START 1
+ CACHE 1;
+ALTER TABLE public.TBL_LOCK_ID_SEQ
+ OWNER TO plgm_service;
+
+CREATE TABLE public.tbl_lock
+(
+ id integer NOT NULL DEFAULT nextval('TBL_LOCK_ID_SEQ'::regclass),
+ key integer NOT NULL, -- Id from tbl_gridmeasure
+ username character varying(50) NOT NULL,
+ info character varying(256),
+ create_user character varying(100) NOT NULL,
+ create_date timestamp without time zone NOT NULL,
+ mod_user character varying(100),
+ mod_date timestamp without time zone,
+ CONSTRAINT tbl_lock_pkey PRIMARY KEY (id)
+)
+WITH (
+ OIDS=FALSE
+);
+ALTER TABLE public.tbl_lock
+ OWNER TO plgm_service;
+GRANT ALL ON TABLE public.tbl_lock TO plgm_service;
+
+CREATE UNIQUE INDEX tbl_lock_unique_key ON public.tbl_lock (key ASC, info ASC );
+
+-- ---------------------------------------------
+-- TABLE TBL_USER_SETTINGS
+-- ---------------------------------------------
+
+CREATE SEQUENCE public.tbl_user_settings_id_seq
+ INCREMENT 1
+ MINVALUE 1
+ MAXVALUE 9223372036854775807
+ START 1
+ CACHE 1;
+ALTER TABLE public.tbl_user_settings_id_seq
+ OWNER TO plgm_service;
+
+CREATE TABLE public.tbl_user_settings
+(
+ id integer NOT NULL DEFAULT nextval('tbl_user_settings_id_seq'::regclass),
+ username character varying(50) NOT NULL,
+ setting_type character varying(50),
+ value character varying(4096),
+ create_user character varying(100) NOT NULL,
+ create_date timestamp without time zone NOT NULL,
+ mod_user character varying(100),
+ mod_date timestamp without time zone,
+ CONSTRAINT tbl_user_settings_pkey PRIMARY KEY (id)
+)
+WITH (
+ OIDS=FALSE
+);
+ALTER TABLE public.tbl_user_settings
+ OWNER TO plgm_service;
+GRANT ALL ON TABLE public.tbl_user_settings TO plgm_service;
+
+CREATE UNIQUE INDEX tbl_user_set_unique_key ON public.tbl_user_settings (username ASC, setting_type ASC );
+
+
+
+-- ---------------------------------------------
+-- TABLE TBL_ID_COUNTER
+-- ---------------------------------------------
+
+CREATE SEQUENCE public.tbl_id_counter_id_seq
+ INCREMENT 1
+ MINVALUE 1
+ MAXVALUE 9223372036854775807
+ START 1
+ CACHE 1;
+ALTER TABLE public.tbl_id_counter_id_seq
+ OWNER TO plgm_service;
+
+CREATE TABLE public.tbl_id_counter
+(
+ id integer NOT NULL DEFAULT nextval('tbl_id_counter_id_seq'::regclass),
+ counter integer NOT NULL,
+ counter_type character varying(256),
+ info character varying(256),
+ create_user character varying(100) NOT NULL,
+ create_date timestamp without time zone NOT NULL,
+ mod_user character varying(100),
+ mod_date timestamp without time zone,
+ CONSTRAINT tbl_id_counter_pkey PRIMARY KEY (id)
+)
+WITH (
+ OIDS=FALSE
+);
+ALTER TABLE public.tbl_id_counter
+ OWNER TO plgm_service;
+GRANT ALL ON TABLE public.tbl_id_counter TO plgm_service;
+
+
+-- ---------------------------------------------
+-- TABLE REF_COST_CENTER
+-- ---------------------------------------------
+
+CREATE SEQUENCE public.REF_COST_CENTER_ID_SEQ
+ INCREMENT 1
+ MINVALUE 1
+ MAXVALUE 9223372036854775807
+ START 1
+ CACHE 1;
+ALTER TABLE public.REF_COST_CENTER_ID_SEQ
+ OWNER TO plgm_service;
+
+
+CREATE TABLE public.REF_COST_CENTER
+(
+ id integer NOT NULL DEFAULT nextval('REF_COST_CENTER_id_seq'::regclass),
+ name character varying(50) NOT NULL,
+ description character varying(255),
+ create_user character varying(100) NOT NULL,
+ create_date timestamp without time zone NOT NULL,
+ mod_user character varying(100),
+ mod_date timestamp without time zone,
+ CONSTRAINT REF_COST_CENTER_pkey PRIMARY KEY (id)
+)
+WITH (
+ OIDS=FALSE
+);
+ALTER TABLE public.REF_COST_CENTER
+ OWNER TO plgm_service;
+GRANT ALL ON TABLE public.REF_COST_CENTER TO plgm_service;
+
+INSERT INTO public.ref_cost_center(
+ name, description, create_user, create_date, mod_user, mod_date)
+ VALUES ('K-155', 'Kostenstelle der Abteilung abc', 'testuser','12.04.2018','testuser','12.04.2018');
+INSERT INTO public.ref_cost_center(
+ name, description, create_user, create_date, mod_user, mod_date)
+ VALUES ('K-004', 'Kostenstelle der Abteilung xyz', 'testuser','12.04.2018','testuser','12.04.2018');
+INSERT INTO public.ref_cost_center(
+ name, description, create_user, create_date, mod_user, mod_date)
+ VALUES ('K-222', 'Kostenstelle der Abteilung hij', 'testuser','12.04.2018','testuser','12.04.2018');
+
+-- ---------------------------------------------
+-- TABLE REF_BRANCH
+-- ---------------------------------------------
+CREATE SEQUENCE public.REF_BRANCH_ID_SEQ
+ INCREMENT 1
+ MINVALUE 1
+ MAXVALUE 9223372036854775807
+ START 1
+ CACHE 1;
+
+ALTER TABLE public.REF_BRANCH_ID_SEQ
+ OWNER TO PLGM_SERVICE;
+
+CREATE TABLE public.REF_BRANCH
+(
+ ID integer NOT NULL DEFAULT nextval('REF_BRANCH_ID_SEQ'::regclass),
+ NAME character varying(50) NOT NULL,
+ DESCRIPTION character varying(255),
+ COLOR_CODE character varying(20),
+ CREATE_USER character varying(100) NOT NULL,
+ CREATE_DATE timestamp without time zone NOT NULL,
+ MOD_USER character varying(100),
+ MOD_DATE timestamp without time zone,
+ CONSTRAINT REF_BRANCH_PKEY PRIMARY KEY (id)
+)
+WITH (
+ OIDS=FALSE
+);
+
+ALTER TABLE public.REF_BRANCH
+ OWNER TO PLGM_SERVICE;
+GRANT ALL ON TABLE public.REF_BRANCH TO PLGM_SERVICE;
+
+INSERT INTO public.ref_branch(name, description, color_code, create_user, create_date, mod_user, mod_date)
+ VALUES ('S', 'Strom', '#fc6042','testuser', '12.04.2018', 'testuser', '12.04.2018');
+INSERT INTO public.ref_branch(name, description, color_code, create_user, create_date, mod_user, mod_date)
+ VALUES ('G', 'Gas', '#fdea64', 'testuser', '12.04.2018', 'testuser', '12.04.2018');
+INSERT INTO public.ref_branch(name, description, color_code, create_user, create_date, mod_user, mod_date)
+ VALUES ('F', 'Fernwärme', '#2cc990', 'testuser', '12.04.2018', 'testuser', '12.04.2018');
+INSERT INTO public.ref_branch(name, description, color_code, create_user, create_date, mod_user, mod_date)
+ VALUES ('W', 'Wasser', '#2c82c9', 'testuser', '12.04.2018', 'testuser', '12.04.2018');
+-- ---------------------------------------------
+-- TABLE REF_BRANCH_LEVEL
+-- ---------------------------------------------
+CREATE SEQUENCE public.ref_branch_level_id_seq
+ INCREMENT 1
+ MINVALUE 1
+ MAXVALUE 9223372036854775807
+ START 1
+ CACHE 1;
+ALTER TABLE public.ref_branch_level_id_seq
+ OWNER TO plgm_service;
+
+CREATE TABLE public.ref_branch_level
+(
+ id integer NOT NULL DEFAULT nextval('ref_branch_level_id_seq'::regclass),
+ name character varying(50) NOT NULL,
+ description character varying(255),
+ fk_ref_branch integer NULL,
+ create_user character varying(100) NOT NULL,
+ create_date timestamp without time zone NOT NULL,
+ mod_user character varying(100),
+ mod_date timestamp without time zone,
+ CONSTRAINT ref_branch_level_pkey PRIMARY KEY (id),
+ CONSTRAINT FK_REF_BRANCH_LEVEL__REF_BRANCH FOREIGN KEY (FK_REF_BRANCH)
+ REFERENCES public.REF_BRANCH (ID) MATCH SIMPLE
+ ON UPDATE NO ACTION ON DELETE NO ACTION
+)
+WITH (
+ OIDS=FALSE
+);
+ALTER TABLE public.ref_branch_level
+ OWNER TO plgm_service;
+GRANT ALL ON TABLE public.ref_branch_level TO plgm_service;
+
+INSERT INTO public.REF_BRANCH_LEVEL(
+ name, description, fk_ref_branch, create_user, create_date, mod_user, mod_date)
+ VALUES ('Strom Level1', 'eine Beschreibung', 1, 'testuser', '12.04.2018', 'testuser', '12.04.2018');
+INSERT INTO public.REF_BRANCH_LEVEL(
+ name, description, fk_ref_branch, create_user, create_date, mod_user, mod_date)
+ VALUES ('Strom Level2', 'eine Beschreibung', 1, 'testuser', '12.04.2018', 'testuser', '12.04.2018');
+INSERT INTO public.REF_BRANCH_LEVEL(
+ name, description, fk_ref_branch, create_user, create_date, mod_user, mod_date)
+ VALUES ('Strom Level3', 'eine Beschreibung', 1, 'testuser', '12.04.2018', 'testuser', '12.04.2018');
+INSERT INTO public.REF_BRANCH_LEVEL(
+ name, description, fk_ref_branch, create_user, create_date, mod_user, mod_date)
+ VALUES ('Gas Level1', 'eine Beschreibung', 2, 'testuser', '12.04.2018', 'testuser', '12.04.2018');
+INSERT INTO public.REF_BRANCH_LEVEL(
+ name, description, fk_ref_branch, create_user, create_date, mod_user, mod_date)
+ VALUES ('Gas Level2', 'noch eine Beschreibung', 2, 'testuser', '12.04.2018', 'testuser', '12.04.2018');
+INSERT INTO public.REF_BRANCH_LEVEL(
+ name, description, fk_ref_branch, create_user, create_date, mod_user, mod_date)
+ VALUES ('Fernwärme Level3', 'und noch eine Beschreibung', 3, 'testuser', '12.04.2018', 'testuser', '12.04.2018');
+
+-- ---------------------------------------------
+-- TABLE REF_GM_STATUS
+-- ---------------------------------------------
+CREATE SEQUENCE public.REF_GM_STATUS_ID_SEQ
+ INCREMENT 1
+ MINVALUE 1
+ MAXVALUE 9223372036854775807
+ START 1
+ CACHE 1;
+
+ALTER TABLE public.REF_GM_STATUS_ID_SEQ
+ OWNER TO PLGM_SERVICE;
+
+CREATE TABLE public.REF_GM_STATUS
+(
+ ID integer NOT NULL DEFAULT nextval('REF_GM_STATUS_ID_SEQ'::regclass),
+ NAME character varying(50) NOT NULL,
+ COLOR_CODE character varying(20),
+ CREATE_USER character varying(100) NOT NULL,
+ CREATE_DATE timestamp without time zone NOT NULL,
+ MOD_USER character varying(100),
+ MOD_DATE timestamp without time zone,
+ CONSTRAINT REF_GM_STATUS_PKEY PRIMARY KEY (id)
+)
+WITH (
+ OIDS=FALSE
+);
+
+ALTER TABLE public.REF_GM_STATUS
+ OWNER TO PLGM_SERVICE;
+GRANT ALL ON TABLE public.REF_GM_STATUS TO PLGM_SERVICE;
+
+INSERT INTO
+ public.REF_GM_STATUS(id, name, create_user, color_code, create_date, mod_user, mod_date)
+VALUES
+ (0,'Neu','system', 'rgba(121,182,28,1)', '09.04.2018','system','09.04.2018');
+INSERT INTO
+ public.REF_GM_STATUS(id, name, create_user, color_code, create_date, mod_user, mod_date)
+VALUES
+ (1,'Beantragt','system', 'rgba(109,177,45,1)', '09.04.2018','system','09.04.2018');
+INSERT INTO
+ public.REF_GM_STATUS(id, name, create_user, color_code, create_date, mod_user, mod_date)
+VALUES
+ (2,'Storniert','system', 'rgba(153,0,0,1)', '09.04.2018','system','09.04.2018');
+INSERT INTO
+ public.REF_GM_STATUS(id, name, create_user, color_code, create_date, mod_user, mod_date)
+VALUES
+ (3,'Zur Genehmigung','system', 'rgba(96,171,63,1)', '09.04.2018','system','09.04.2018');
+INSERT INTO
+ public.REF_GM_STATUS(id, name, create_user, color_code, create_date, mod_user, mod_date)
+VALUES
+ (4,'Genehmigt','system', 'rgba(84,166,80,1)', '09.04.2018','system','09.04.2018');
+INSERT INTO
+ public.REF_GM_STATUS(id, name, create_user, color_code, create_date, mod_user, mod_date)
+VALUES
+ (5,'Angefordert','system', 'rgba(69,159,101,1)', '09.04.2018','system','09.04.2018');
+INSERT INTO
+ public.REF_GM_STATUS(id, name, create_user, color_code, create_date, mod_user, mod_date)
+VALUES
+ (6,'Freigegeben','system', 'rgba(55,153,121,1)', '09.04.2018','system','09.04.2018');
+INSERT INTO
+ public.REF_GM_STATUS(id, name, create_user, color_code, create_date, mod_user, mod_date)
+VALUES
+ (7,'Schalten aktiv','system', 'rgba(41,146,141,1)', '09.04.2018','system','09.04.2018');
+INSERT INTO
+ public.REF_GM_STATUS(id, name, create_user, color_code, create_date, mod_user, mod_date)
+VALUES
+ (8,'In Arbeit','system', 'rgba(28,141,159,1)', '09.04.2018','system','09.04.2018');
+INSERT INTO
+ public.REF_GM_STATUS(id, name, create_user, color_code, create_date, mod_user, mod_date)
+VALUES
+ (9,'Arbeit beendet','system', 'rgba(12,133,182,1)', '09.04.2018','system','09.04.2018');
+INSERT INTO
+ public.REF_GM_STATUS(id, name, create_user, color_code, create_date, mod_user, mod_date)
+VALUES
+ (10,'Maßnahme beendet','system', 'rgba(2,129,196,1)', '09.04.2018','system','09.04.2018');
+INSERT INTO
+ public.REF_GM_STATUS(id, name, create_user, color_code, create_date, mod_user, mod_date)
+VALUES
+ (11,'Geschlossen','system', 'rgba(2,129,196,1)', '09.04.2018','system','09.04.2018');
+INSERT INTO
+ public.REF_GM_STATUS(id, name, create_user, color_code, create_date, mod_user, mod_date)
+VALUES
+ (12,'Abgelehnt','system', 'rgba(153,0,0,1)', '17.06.2018','system','17.06.2018');
+
+
+
+-- ---------------------------------------------
+-- TABLE TBL_GRIDMEASURE
+-- ---------------------------------------------
+-- REQUESTER_NAME COLUMN DELETED--
+CREATE SEQUENCE public.TBL_GRIDMEASURE_ID_SEQ
+ INCREMENT 1
+ MINVALUE 1
+ MAXVALUE 9223372036854775807
+ START 1
+ CACHE 1;
+
+ALTER TABLE public.TBL_GRIDMEASURE_ID_SEQ
+ OWNER TO PLGM_SERVICE;
+
+CREATE TABLE public.tbl_gridmeasure
+(
+ id integer NOT NULL DEFAULT nextval('tbl_gridmeasure_id_seq'::regclass),
+ id_descriptive character varying(50),
+ title character varying(256),
+ affected_resource character varying(256),
+ remark character varying(1024),
+ email_addresses character varying(1024),
+ fk_ref_gm_status integer,
+ switching_object character varying(256),
+ cost_center character varying(50),
+ approval_by character varying(256),
+ area_of_switching character varying(256),
+ appointment_repetition character varying(100),
+ appointment_startdate timestamp without time zone,
+ appointment_numberof integer,
+ planned_starttime_first_singlemeasure timestamp without time zone,
+ endtime_gridmeasure timestamp without time zone,
+ time_of_reallocation character varying(100),
+ description character varying(1024),
+ fk_ref_branch integer,
+ fk_ref_branch_level integer,
+ create_user character varying(100) NOT NULL,
+ create_user_department character varying(100),
+ create_date timestamp without time zone NOT NULL,
+ mod_user character varying(100),
+ mod_user_department character varying(100),
+ mod_date timestamp without time zone,
+ CONSTRAINT tbl_gridmeasure_pkey PRIMARY KEY (id),
+ CONSTRAINT fk_gridmeasure__gm_status FOREIGN KEY (fk_ref_gm_status)
+ REFERENCES public.ref_gm_status (id) MATCH SIMPLE
+ ON UPDATE NO ACTION ON DELETE NO ACTION,
+ CONSTRAINT fk_gridmeasure__branch FOREIGN KEY (fk_ref_branch)
+ REFERENCES public.ref_branch (id) MATCH SIMPLE
+ ON UPDATE NO ACTION ON DELETE NO ACTION,
+ CONSTRAINT fk_gridmeasure__branch_level FOREIGN KEY (fk_ref_branch_level)
+ REFERENCES public.ref_branch_level (id) MATCH SIMPLE
+ ON UPDATE NO ACTION ON DELETE NO ACTION
+)
+WITH (
+ OIDS=FALSE
+);
+ALTER TABLE public.tbl_gridmeasure
+ OWNER TO plgm_service;
+GRANT ALL ON TABLE public.tbl_gridmeasure TO plgm_service;
+
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+
+INSERT INTO public.tbl_gridmeasure(
+ id_descriptive, title, affected_resource, remark, email_addresses, fk_ref_gm_status,
+ switching_object, cost_center,
+ approval_by, area_of_switching, appointment_repetition, appointment_startdate,
+ appointment_numberof, planned_starttime_first_singlemeasure,
+ endtime_gridmeasure, time_of_reallocation, description, fk_ref_branch,
+ fk_ref_branch_level, create_user, create_user_department, create_date,
+ mod_user, mod_user_department, mod_date)
+ VALUES ('2018_1', 'Kabel erneuern', 'Kabel', 'Kabel defekt', 'mailingListRecipient@test.de; mailingList2Recipient@test.de', 0,
+ 'Kabel', 'K-155',
+ 'otto', 'Frankfurt', 'einmalig', '2018-06-14 15:15:00',
+ 7, '2018-06-10 16:30:00',
+ '2018-06-18 16:00:00', 'in zwei Tagen', 'Das Kabel austauschen', 1,
+ 1, 'otto', 'Abteilung abc', '2018-06-09 15:00:00',
+ 'otto', 'Abteilung abc', '2018-06-14 15:15:00');
+
+INSERT INTO public.tbl_gridmeasure(
+ id_descriptive, title, affected_resource, remark, email_addresses, fk_ref_gm_status,
+ switching_object, cost_center,
+ approval_by, area_of_switching, appointment_repetition, appointment_startdate,
+ appointment_numberof, planned_starttime_first_singlemeasure,
+ endtime_gridmeasure, time_of_reallocation, description, fk_ref_branch,
+ fk_ref_branch_level, create_user, create_user_department, create_date,
+ mod_user, mod_user_department, mod_date)
+ VALUES ('2018_2', 'Lampe erneuern', 'Lampe', 'Lampe defekt', 'mailingListRecipient@test.de; mailingList2Recipient@test.de', 1,
+ 'Lampe', 'K-004',
+ 'jasper', 'Mannheim', 'einmalig', '2018-06-16 15:15:00',
+ 3, '2018-06-12 16:30:00',
+ '2018-06-20 16:00:00', 'in zwei Tagen', 'Die Lampe austauschen', 2,
+ 1, 'jasper', 'Abteilung cde', '2018-06-11 15:00:00',
+ 'jasper', 'Abteilung cde', '2018-06-14 15:15:00');
+
+INSERT INTO public.tbl_gridmeasure(
+ id_descriptive, title, affected_resource, remark, email_addresses, fk_ref_gm_status,
+ switching_object, cost_center,
+ approval_by, area_of_switching, appointment_repetition, appointment_startdate,
+ appointment_numberof, planned_starttime_first_singlemeasure,
+ endtime_gridmeasure, time_of_reallocation, description, fk_ref_branch,
+ fk_ref_branch_level, create_user, create_user_department, create_date,
+ mod_user, mod_user_department, mod_date)
+ VALUES ('2018_3', 'Transformator erneuern', 'Transformator', 'Transformator defekt', 'mailingListRecipient@test.de; mailingList2Recipient@test.de', 2,
+ 'Transformator', 'K-222',
+ 'hugo', 'Murr', 'täglich', '2018-06-17 15:15:00',
+ 6, '2018-06-13 16:30:00',
+ '2018-06-21 16:00:00', 'in 8 Tagen', 'Den Transformator austauschen', 4,
+ 1, 'hugo', 'Abteilung xyz', '2018-06-12 15:00:00',
+ 'otto', 'Abteilung abc', '2018-06-17 15:15:00');
+
+INSERT INTO public.tbl_gridmeasure(
+ id_descriptive, title, affected_resource, remark, email_addresses, fk_ref_gm_status,
+ switching_object, cost_center,
+ approval_by, area_of_switching, appointment_repetition, appointment_startdate,
+ appointment_numberof, planned_starttime_first_singlemeasure,
+ endtime_gridmeasure, time_of_reallocation, description, fk_ref_branch,
+ fk_ref_branch_level, create_user, create_user_department, create_date,
+ mod_user, mod_user_department, mod_date)
+ VALUES ('2018_4', 'Transformator ersetzen', 'Transformator', 'Transformator kaputt', 'mailingListRecipient@test.de; mailingList2Recipient@test.de', 3,
+ 'Transformator', 'K-155',
+ 'otto', 'Stuttgart', 'einmalig', '2018-06-18 15:15:00',
+ 3, '2018-06-14 16:30:00',
+ '2018-06-22 16:00:00', 'in 9 Tagen', 'Den Transformator austauschen', 3,
+ 1, 'otto', 'Abteilung abc', '2018-06-13 15:00:00',
+ 'otto', 'Abteilung syx', '2018-06-18 15:15:00');
+
+INSERT INTO public.tbl_gridmeasure(
+ id_descriptive, title, affected_resource, remark, email_addresses, fk_ref_gm_status,
+ switching_object, cost_center,
+ approval_by, area_of_switching, appointment_repetition, appointment_startdate,
+ appointment_numberof, planned_starttime_first_singlemeasure,
+ endtime_gridmeasure, time_of_reallocation, description, fk_ref_branch,
+ fk_ref_branch_level, create_user, create_user_department, create_date,
+ mod_user, mod_user_department, mod_date)
+ VALUES ('2018_5', 'Gas Station', 'Station', 'Station defekt', 'mailingListRecipient@test.de; mailingList2Recipient@test.de', 4,
+ 'Station', 'K-004',
+ 'otto', 'Ludwigsburg', 'wöchentlich', '2018-07-14 15:15:00',
+ 1, '2018-07-10 16:30:00',
+ '2018-07-18 16:00:00', 'in zwei Wochen', 'Die Gas Station untersuchen', 2,
+ 1, 'otto', 'Abteilung lmn', '2018-07-09 15:00:00',
+ 'otto', 'Abteilung lmn', '2018-07-14 15:15:00');
+
+INSERT INTO public.tbl_gridmeasure(
+ id_descriptive, title, affected_resource, remark, email_addresses, fk_ref_gm_status,
+ switching_object, cost_center,
+ approval_by, area_of_switching, appointment_repetition, appointment_startdate,
+ appointment_numberof, planned_starttime_first_singlemeasure,
+ endtime_gridmeasure, time_of_reallocation, description, fk_ref_branch,
+ fk_ref_branch_level, create_user, create_user_department, create_date,
+ mod_user, mod_user_department, mod_date)
+ VALUES ('2018_6', 'Stuhl mit drei Beinen', 'Stuhl', 'Stuhl kaputt', 'mailingListRecipient@test.de; mailingList2Recipient@test.de', 5,
+ 'Stuhl', 'K-155',
+ 'otto', 'Hamburg', 'einmalig', '2018-06-12 15:15:00',
+ 3, '2018-06-08 16:30:00',
+ '2018-06-16 16:00:00', 'in zwei Tagen', 'Den Stuhl austauschen', 4,
+ 1, 'claudio', 'Abteilung lmn', '2018-06-07 15:00:00',
+ 'claudio', 'Abteilung lmn', '2018-06-12 15:15:00');
+
+INSERT INTO public.tbl_gridmeasure(
+ id_descriptive, title, affected_resource, remark, email_addresses, fk_ref_gm_status,
+ switching_object, cost_center,
+ approval_by, area_of_switching, appointment_repetition, appointment_startdate,
+ appointment_numberof, planned_starttime_first_singlemeasure,
+ endtime_gridmeasure, time_of_reallocation, description, fk_ref_branch,
+ fk_ref_branch_level, create_user, create_user_department, create_date,
+ mod_user, mod_user_department, mod_date)
+ VALUES ('2018_7', 'Kabel vergrößern', 'Kabel', 'Kabel zu kurz', 'mailingListRecipient@test.de; mailingList2Recipient@test.de', 6,
+ 'Kabel', 'K-222',
+ 'dagmar', 'Steinheim', 'einmalig', '2018-08-14 15:15:00',
+ 27, '2018-08-10 16:30:00',
+ '2018-08-18 16:00:00', 'in zwei Wochen', 'Das Kabel vergrößern', 3,
+ 1, 'claudio', 'Abteilung lmn', '2018-08-09 15:00:00',
+ 'bruno', 'Abteilung lmn', '2018-08-14 15:15:00');
+
+INSERT INTO public.tbl_gridmeasure(
+ id_descriptive, title, affected_resource, remark, email_addresses, fk_ref_gm_status,
+ switching_object, cost_center,
+ approval_by, area_of_switching, appointment_repetition, appointment_startdate,
+ appointment_numberof, planned_starttime_first_singlemeasure,
+ endtime_gridmeasure, time_of_reallocation, description, fk_ref_branch,
+ fk_ref_branch_level, create_user, create_user_department, create_date,
+ mod_user, mod_user_department, mod_date)
+ VALUES ('2018_8', 'Transformator austauschen', 'Transformator', 'Transformator 160 Grads', 'mailingListRecipient@test.de; mailingList2Recipient@test.de', 7,
+ 'Transformator', 'K-155',
+ 'dagmar', 'Murr', 'täglich', '2018-06-14 15:15:00',
+ 6, '2018-06-10 16:30:00',
+ '2018-06-18 16:00:00', 'in zwei Tagen', 'Den Transformator austauschen', 1,
+ 1, 'dagmar', 'Abteilung opq', '2018-06-09 15:00:00',
+ 'dagmar', 'Abteilung opq', '2018-06-14 15:15:00');
+
+INSERT INTO public.tbl_gridmeasure(
+ id_descriptive, title, affected_resource, remark, email_addresses, fk_ref_gm_status,
+ switching_object, cost_center,
+ approval_by, area_of_switching, appointment_repetition, appointment_startdate,
+ appointment_numberof, planned_starttime_first_singlemeasure,
+ endtime_gridmeasure, time_of_reallocation, description, fk_ref_branch,
+ fk_ref_branch_level, create_user, create_user_department, create_date,
+ mod_user, mod_user_department, mod_date)
+ VALUES ('2018_9', 'Alles kaputt', 'Alles', 'Alles defekt', 'mailingListRecipient@test.de; mailingList2Recipient@test.de', 8,
+ 'Alles', 'K-222',
+ 'otto', 'Berlin', 'einmalig', '2018-06-15 15:15:00',
+ 2, '2018-06-11 16:30:00',
+ '2018-06-19 16:00:00', 'in zwei Jahren', 'Alles wegwerfen', 2,
+ 3, 'bruno', 'Abteilung opq', '2018-06-10 15:00:00',
+ 'claudio', 'Abteilung opq', '2018-06-15 15:15:00');
+
+INSERT INTO public.tbl_gridmeasure(
+ id_descriptive, title, affected_resource, remark, email_addresses, fk_ref_gm_status,
+ switching_object, cost_center,
+ approval_by, area_of_switching, appointment_repetition, appointment_startdate,
+ appointment_numberof, planned_starttime_first_singlemeasure,
+ endtime_gridmeasure, time_of_reallocation, description, fk_ref_branch,
+ fk_ref_branch_level, create_user, create_user_department, create_date,
+ mod_user, mod_user_department, mod_date)
+ VALUES ('2018_10', 'Schalter erneuern', 'Schalter', 'Schalter defekt', 'mailingListRecipient@test.de; mailingList2Recipient@test.de', 9,
+ 'Schalter', 'K-004',
+ 'hugo', 'Kassel', 'einmalig', '2018-08-14 15:15:00',
+ 9, '2018-08-10 16:30:00',
+ '2018-08-18 16:00:00', 'in 6 Tagen', 'Den Schalter austauschen', 1,
+ 1, 'dagmar', 'Abteilung opq', '2018-08-09 15:00:00',
+ 'otto', 'Abteilung opq', '2018-08-14 15:15:00');
+
+INSERT INTO public.tbl_gridmeasure(
+ id_descriptive, title, affected_resource, remark, email_addresses, fk_ref_gm_status,
+ switching_object, cost_center,
+ approval_by, area_of_switching, appointment_repetition, appointment_startdate,
+ appointment_numberof, planned_starttime_first_singlemeasure,
+ endtime_gridmeasure, time_of_reallocation, description, fk_ref_branch,
+ fk_ref_branch_level, create_user, create_user_department, create_date,
+ mod_user, mod_user_department, mod_date)
+ VALUES ('2018_11', 'Rechner austauschen', 'Rechner', 'Rechner defekt', 'mailingListRecipient@test.de; mailingList2Recipient@test.de', 10,
+ 'Rechner', 'K-155',
+ 'claudio', 'Murr', 'einmalig', '2018-06-12 15:15:00',
+ 3, '2018-06-08 16:30:00',
+ '2018-06-16 16:00:00', 'in zwei Tagen', 'Den Rechner austauschen', 4,
+ 1, 'hugo', 'Abteilung opq', '2018-06-07 15:00:00',
+ 'otto', 'Abteilung opq', '2018-06-12 15:15:00');
+
+INSERT INTO public.tbl_gridmeasure(
+ id_descriptive, title, affected_resource, remark, email_addresses, fk_ref_gm_status,
+ switching_object, cost_center,
+ approval_by, area_of_switching, appointment_repetition, appointment_startdate,
+ appointment_numberof, planned_starttime_first_singlemeasure,
+ endtime_gridmeasure, time_of_reallocation, description, fk_ref_branch,
+ fk_ref_branch_level, create_user, create_user_department, create_date,
+ mod_user, mod_user_department, mod_date)
+ VALUES ('2018_12', 'Maschine untersuchen', 'Maschine', 'Maschine defekt', 'mailingListRecipient@test.de; mailingList2Recipient@test.de', 11,
+ 'Maschine', 'K-004',
+ 'otto', 'Ludwigsburg', 'einmalig', '2018-06-20 15:15:00',
+ 5, '2018-06-16 16:30:00',
+ '2018-06-24 16:00:00', 'in 8 Tagen', 'Die Maschine austauschen', 1,
+ 1, 'bruno', 'Abteilung opq', '2018-06-15 15:00:00',
+ 'bruno', 'Abteilung opq', '2018-06-20 15:15:00');
+
+
+
+
+-- ---------------------------------------------
+-- TABLE TBL_SINGLE_GRIDMEASURE
+-- ---------------------------------------------
+
+CREATE SEQUENCE public.tbl_single_gridmeasure_id_seq
+ INCREMENT 1
+ MINVALUE 1
+ MAXVALUE 9223372036854775807
+ START 1
+ CACHE 1;
+ALTER TABLE public.tbl_single_gridmeasure_id_seq
+ OWNER TO plgm_service;
+
+CREATE TABLE public.tbl_single_gridmeasure
+(
+ id integer NOT NULL DEFAULT nextval('tbl_single_gridmeasure_id_seq'::regclass),
+ sortorder integer NOT NULL,
+ title character varying(256),
+ switching_object character varying(256),
+ cim_id character varying(256),
+ cim_name character varying(256),
+ cim_description character varying(1024),
+ planned_starttime_singlemeasure timestamp without time zone,
+ planned_endtime_singlemeasure timestamp without time zone,
+ description character varying(1024),
+ responsible_onsite_name character varying(256),
+ responsible_onsite_department character varying(256),
+ network_control character varying(256),
+ fk_tbl_gridmeasure integer NOT NULL,
+ create_user character varying(100) NOT NULL,
+ create_date timestamp without time zone NOT NULL,
+ mod_user character varying(100),
+ mod_date timestamp without time zone,
+ CONSTRAINT tbl_single_gridmeasure_pkey PRIMARY KEY (id),
+ CONSTRAINT fk_single_gridmeasure__gridmeasure FOREIGN KEY (fk_tbl_gridmeasure)
+ REFERENCES public.tbl_gridmeasure (id) MATCH SIMPLE
+ ON UPDATE NO ACTION ON DELETE NO ACTION
+)
+WITH (
+ OIDS=FALSE
+);
+ALTER TABLE public.tbl_single_gridmeasure
+ OWNER TO plgm_service;
+GRANT ALL ON TABLE public.tbl_single_gridmeasure TO plgm_service;
+
+
+INSERT INTO public.tbl_single_gridmeasure(
+ sortorder, title, switching_object, cim_id, cim_name, cim_description,
+ planned_starttime_singlemeasure, planned_endtime_singlemeasure,
+ description, responsible_onsite_name, responsible_onsite_department, fk_tbl_gridmeasure, create_user, create_date, mod_user,
+ mod_date)
+ VALUES (1, 'Lampe ausschalten', 'Lampe', '2', 'cim', 'cim Beschreibung',
+ '2018-06-10 16:30:00', '2018-06-11 14:00:00',
+ 'Beschreibung','Otto','Abteilung abc', 1, 'Otto', '01.07.2018', 'Otto',
+ '01.07.2018');
+INSERT INTO public.tbl_single_gridmeasure(
+ sortorder, title, switching_object, cim_id, cim_name, cim_description,
+ planned_starttime_singlemeasure, planned_endtime_singlemeasure,
+ description, responsible_onsite_name, responsible_onsite_department,fk_tbl_gridmeasure, create_user, create_date, mod_user,
+ mod_date)
+ VALUES (2, 'Kabel kürzen', 'Kabel', '2', 'cim', 'cim Beschreibung',
+ '2018-06-10 16:30:00', '2018-06-11 14:00:00',
+ 'Beschreibung', 'Otto','Abteilung def',1, 'Otto', '01.07.2018', 'Otto',
+ '01.07.2018');
+INSERT INTO public.tbl_single_gridmeasure(
+ sortorder, title, switching_object, cim_id, cim_name, cim_description,
+ planned_starttime_singlemeasure, planned_endtime_singlemeasure,
+ description, responsible_onsite_name, responsible_onsite_department,fk_tbl_gridmeasure, create_user, create_date, mod_user,
+ mod_date)
+ VALUES (3, 'Transformator tauschen', 'Transformator', '2', 'cim', 'cim Beschreibung',
+ '2018-06-10 16:30:00', '2018-06-11 14:00:00',
+ 'Beschreibung', 'Otto','Abteilung ghi',1, 'Otto', '01.07.2018', 'Otto',
+ '01.07.2018');
+
+INSERT INTO public.tbl_single_gridmeasure(
+ sortorder, title, switching_object, cim_id, cim_name, cim_description,
+ planned_starttime_singlemeasure, planned_endtime_singlemeasure,
+ description, responsible_onsite_name, responsible_onsite_department,fk_tbl_gridmeasure, create_user, create_date, mod_user,
+ mod_date)
+ VALUES (1, 'Lampe erneuern', 'Lampe', '2', 'cim', 'cim Beschreibung',
+ '2018-06-12 16:30:00', '2018-06-13 14:00:00',
+ 'Beschreibung', 'Otto','Abteilung jkl',2, 'Hugo', '01.07.2018', 'Hugo',
+ '01.07.2018');
+
+INSERT INTO public.tbl_single_gridmeasure(
+ sortorder, title, switching_object, cim_id, cim_name, cim_description,
+ planned_starttime_singlemeasure, planned_endtime_singlemeasure,
+ description, responsible_onsite_name, responsible_onsite_department,fk_tbl_gridmeasure, create_user, create_date, mod_user,
+ mod_date)
+ VALUES (1, 'Transformator', 'Transformator', '2', 'cim', 'cim Beschreibung',
+ '2018-06-13 16:30:00', '2018-06-14 14:00:00',
+ 'Beschreibung', 'Otto','Abteilung mno',3, 'Hugo', '01.07.2018', 'Hugo',
+ '01.07.2018');
+
+INSERT INTO public.tbl_single_gridmeasure(
+ sortorder, title, switching_object, cim_id, cim_name, cim_description,
+ planned_starttime_singlemeasure, planned_endtime_singlemeasure,
+ description, responsible_onsite_name, responsible_onsite_department,fk_tbl_gridmeasure, create_user, create_date, mod_user,
+ mod_date)
+ VALUES (1, 'Transformator', 'Transformator', '2', 'cim', 'cim Beschreibung',
+ '2018-06-14 16:30:00', '2018-06-15 14:00:00',
+ 'Beschreibung', 'Otto','Abteilung pqr',4, 'Hugo', '01.07.2018', 'Jasper',
+ '01.07.2018');
+
+INSERT INTO public.tbl_single_gridmeasure(
+ sortorder, title, switching_object, cim_id, cim_name, cim_description,
+ planned_starttime_singlemeasure, planned_endtime_singlemeasure,
+ description, responsible_onsite_name, responsible_onsite_department,fk_tbl_gridmeasure, create_user, create_date, mod_user,
+ mod_date)
+ VALUES (1, 'Gas', 'Gas', '2', 'cim', 'cim Beschreibung',
+ '2018-07-10 16:30:00', '2018-07-11 14:00:00',
+ 'Beschreibung', 'Otto','Abteilung stu',5, 'Jasper', '01.07.2018', 'Jasper',
+ '01.07.2018');
+
+INSERT INTO public.tbl_single_gridmeasure(
+ sortorder, title, switching_object, cim_id, cim_name, cim_description,
+ planned_starttime_singlemeasure, planned_endtime_singlemeasure,
+ description, responsible_onsite_name, responsible_onsite_department,fk_tbl_gridmeasure, create_user, create_date, mod_user,
+ mod_date)
+ VALUES (2, 'Gas 2', 'Gas', '2', 'cim', 'cim Beschreibung',
+ '2018-07-10 16:30:00', '2018-07-11 14:00:00',
+ 'Beschreibung', 'Otto','Abteilung vwx',5, 'Jasper', '01.07.2018', 'Jasper',
+ '01.07.2018');
+
+INSERT INTO public.tbl_single_gridmeasure(
+ sortorder, title, switching_object, cim_id, cim_name, cim_description,
+ planned_starttime_singlemeasure, planned_endtime_singlemeasure,
+ description, responsible_onsite_name, responsible_onsite_department,fk_tbl_gridmeasure, create_user, create_date, mod_user,
+ mod_date)
+ VALUES (1, 'Stuhl', 'Stuhl', '2', 'cim', 'cim Beschreibung',
+ '2018-06-08 16:30:00', '2018-06-09 14:00:00',
+ 'Beschreibung', 'Otto','Abteilung yz',6, 'Otto', '01.07.2018', 'Jasper',
+ '01.07.2018');
+
+INSERT INTO public.tbl_single_gridmeasure(
+ sortorder, title, switching_object, cim_id, cim_name, cim_description,
+ planned_starttime_singlemeasure, planned_endtime_singlemeasure,
+ description, responsible_onsite_name, responsible_onsite_department,fk_tbl_gridmeasure, create_user, create_date, mod_user,
+ mod_date)
+ VALUES (1, 'Kabel', 'Kabel', '2', 'cim', 'cim Beschreibung',
+ '2018-08-10 16:30:00', '2018-08-11 14:00:00',
+ 'Beschreibung', 'Otto','Abteilung abc',7, 'Otto', '01.07.2018', 'Hugo',
+ '01.07.2018');
+
+INSERT INTO public.tbl_single_gridmeasure(
+ sortorder, title, switching_object, cim_id, cim_name, cim_description,
+ planned_starttime_singlemeasure, planned_endtime_singlemeasure,
+ description, responsible_onsite_name, responsible_onsite_department,fk_tbl_gridmeasure, create_user, create_date, mod_user,
+ mod_date)
+ VALUES (1, 'Transformator', 'Transformator', '2', 'cim', 'cim Beschreibung',
+ '2018-06-10 16:30:00', '2018-06-11 14:00:00',
+ 'Beschreibung', 'Otto','Abteilung abc',8, 'Hugo', '01.07.2018', 'Jasper',
+ '01.07.2018');
+
+INSERT INTO public.tbl_single_gridmeasure(
+ sortorder, title, switching_object, cim_id, cim_name, cim_description,
+ planned_starttime_singlemeasure, planned_endtime_singlemeasure,
+ description, responsible_onsite_name, responsible_onsite_department,fk_tbl_gridmeasure, create_user, create_date, mod_user,
+ mod_date)
+ VALUES (2, 'Transformator 2', 'Transformator', '2', 'cim', 'cim Beschreibung',
+ '2018-06-10 16:30:00', '2018-06-11 14:00:00',
+ 'Beschreibung', 'Otto','Abteilung abc',8, 'Hugo', '01.07.2018', 'Jasper',
+ '01.07.2018');
+
+INSERT INTO public.tbl_single_gridmeasure(
+ sortorder, title, switching_object, cim_id, cim_name, cim_description,
+ planned_starttime_singlemeasure, planned_endtime_singlemeasure,
+ description, responsible_onsite_name, responsible_onsite_department,fk_tbl_gridmeasure, create_user, create_date, mod_user,
+ mod_date)
+ VALUES (1, 'Alles', 'Alles', '2', 'cim', 'cim Beschreibung',
+ '2018-06-11 16:30:00', '2018-06-12 14:00:00',
+ 'Beschreibung', 'Otto','Abteilung abc',9, 'Otto', '01.07.2018', 'Jasper',
+ '01.07.2018');
+
+INSERT INTO public.tbl_single_gridmeasure(
+ sortorder, title, switching_object, cim_id, cim_name, cim_description,
+ planned_starttime_singlemeasure, planned_endtime_singlemeasure,
+ description, responsible_onsite_name, responsible_onsite_department,fk_tbl_gridmeasure, create_user, create_date, mod_user,
+ mod_date)
+ VALUES (1, 'Schalter', 'Schalter', '2', 'cim', 'cim Beschreibung',
+ '2018-08-10 16:30:00', '2018-08-11 14:00:00',
+ 'Beschreibung', 'Otto','Abteilung abc',10, 'Otto', '01.07.2018', 'Hugo',
+ '01.07.2018');
+
+INSERT INTO public.tbl_single_gridmeasure(
+ sortorder, title, switching_object, cim_id, cim_name, cim_description,
+ planned_starttime_singlemeasure, planned_endtime_singlemeasure,
+ description, responsible_onsite_name, responsible_onsite_department,fk_tbl_gridmeasure, create_user, create_date, mod_user,
+ mod_date)
+ VALUES (2, 'Schalter 2', 'Schalter', '2', 'cim', 'cim Beschreibung',
+ '2018-08-10 16:30:00', '2018-08-11 14:00:00',
+ 'Beschreibung', 'Otto','Abteilung abc',10, 'Otto', '01.07.2018', 'Hugo',
+ '01.07.2018');
+
+INSERT INTO public.tbl_single_gridmeasure(
+ sortorder, title, switching_object, cim_id, cim_name, cim_description,
+ planned_starttime_singlemeasure, planned_endtime_singlemeasure,
+ description, responsible_onsite_name, responsible_onsite_department,fk_tbl_gridmeasure, create_user, create_date, mod_user,
+ mod_date)
+ VALUES (1, 'Rechner', 'Rechner', '2', 'cim', 'cim Beschreibung',
+ '2018-06-08 16:30:00', '2018-06-09 14:00:00',
+ 'Beschreibung', 'Otto','Abteilung abc',11, 'Jasper', '01.07.2018', 'Jasper',
+ '01.07.2018');
+
+INSERT INTO public.tbl_single_gridmeasure(
+ sortorder, title, switching_object, cim_id, cim_name, cim_description,
+ planned_starttime_singlemeasure, planned_endtime_singlemeasure,
+ description, responsible_onsite_name, responsible_onsite_department,fk_tbl_gridmeasure, create_user, create_date, mod_user,
+ mod_date)
+ VALUES (1, 'Maschine', 'Maschine', '2', 'cim', 'cim Beschreibung',
+ '2018-06-16 16:30:00', '2018-06-17 14:00:00',
+ 'Beschreibung', 'Otto','Abteilung abc',12, 'Hugo', '01.07.2018', 'Jasper',
+ '01.07.2018');
+
+
+-- ---------------------------------------------
+-- TABLE TBL_STEPS
+-- ---------------------------------------------
+
+CREATE SEQUENCE public.tbl_steps_id_seq
+ INCREMENT 1
+ MINVALUE 1
+ MAXVALUE 9223372036854775807
+ START 1
+ CACHE 1;
+ALTER TABLE public.tbl_steps_id_seq
+ OWNER TO plgm_service;
+
+CREATE TABLE public.tbl_steps
+(
+ id integer NOT NULL DEFAULT nextval('tbl_steps_id_seq'::regclass),
+ sortorder integer NOT NULL,
+ switching_object character varying(256),
+ type character varying(256),
+ present_time character varying(256),
+ present_state character varying(256),
+ target_state character varying(256),
+ operator character varying(256),
+ fk_tbl_single_gridmeasure integer NOT NULL,
+ create_user character varying(100) NOT NULL,
+ create_date timestamp without time zone NOT NULL,
+ mod_user character varying(100),
+ mod_date timestamp without time zone,
+ CONSTRAINT tbl_steps_pkey PRIMARY KEY (id),
+ CONSTRAINT fk_steps__single_gridmeasure FOREIGN KEY (fk_tbl_single_gridmeasure)
+ REFERENCES public.tbl_single_gridmeasure (id) MATCH SIMPLE
+ ON UPDATE NO ACTION ON DELETE NO ACTION
+)
+WITH (
+ OIDS=FALSE
+);
+ALTER TABLE public.tbl_steps
+ OWNER TO plgm_service;
+GRANT ALL ON TABLE public.tbl_steps TO plgm_service;
+
+
+-- ---------------------------------------------
+-- TABLE REF_VERSION
+-- ---------------------------------------------
+
+DROP TABLE IF EXISTS public.REF_VERSION;
+
+CREATE TABLE public.REF_VERSION
+(
+ id integer NOT NULL,
+ version character varying(100) NOT NULL,
+ CONSTRAINT ref_version_pkey PRIMARY KEY (id)
+)
+WITH (
+ OIDS=FALSE
+);
+ALTER TABLE public.REF_VERSION
+ OWNER TO PLGM_SERVICE;
+GRANT ALL ON TABLE public.REF_VERSION TO PLGM_SERVICE;
+
+INSERT INTO REF_VERSION VALUES (1, '0.0.1_PG');
+
+-- ---------------------------------------------
+-- TABLE TBL_DOCUMENTS
+-- ---------------------------------------------
+
+CREATE SEQUENCE public.tbl_documents_id_seq
+ INCREMENT 1
+ MINVALUE 1
+ MAXVALUE 9223372036854775807
+ START 1
+ CACHE 1;
+ALTER TABLE public.tbl_documents_id_seq
+ OWNER TO plgm_service;
+
+CREATE TABLE public.tbl_documents
+(
+ id integer NOT NULL DEFAULT nextval('tbl_documents_id_seq'::regclass),
+ document_name character varying(260),
+ document bytea,
+ create_user character varying(100) NOT NULL,
+ create_date timestamp without time zone NOT NULL,
+ mod_user character varying(100),
+ mod_date timestamp without time zone,
+ CONSTRAINT tbl_documents_pkey PRIMARY KEY (id)
+)
+WITH (
+ OIDS=FALSE
+);
+ALTER TABLE public.tbl_documents
+ OWNER TO plgm_service;
+GRANT ALL ON TABLE public.tbl_documents TO plgm_service;
+
+
+-- ---------------------------------------------
+-- TABLE TBL_MEASURE_DOCUMENTS
+-- ---------------------------------------------
+
+CREATE SEQUENCE public.tbl_measure_documents_id_seq
+ INCREMENT 1
+ MINVALUE 1
+ MAXVALUE 9223372036854775807
+ START 1
+ CACHE 1;
+ALTER TABLE public.tbl_measure_documents_id_seq
+ OWNER TO plgm_service;
+
+CREATE TABLE public.tbl_measure_documents
+(
+ id integer NOT NULL DEFAULT nextval('tbl_measure_documents_id_seq'::regclass),
+ fk_tbl_measure integer,
+ fk_tbl_documents integer,
+ create_user character varying(100) NOT NULL,
+ create_date timestamp without time zone NOT NULL,
+ mod_user character varying(100),
+ mod_date timestamp without time zone,
+ CONSTRAINT tbl_measure_documents_pkey PRIMARY KEY (id),
+ CONSTRAINT fk_tbl_measure_documents_measure FOREIGN KEY (fk_tbl_measure)
+ REFERENCES public.tbl_gridmeasure (id) MATCH SIMPLE
+ ON UPDATE NO ACTION ON DELETE CASCADE,
+ CONSTRAINT fk_tbl_measure_documents_documents FOREIGN KEY (fk_tbl_documents)
+ REFERENCES public.tbl_documents (id) MATCH SIMPLE
+ ON UPDATE NO ACTION ON DELETE NO ACTION
+)
+WITH (
+ OIDS=FALSE
+);
+ALTER TABLE public.tbl_measure_documents
+ OWNER TO plgm_service;
+GRANT ALL ON TABLE public.tbl_measure_documents TO plgm_service;
+
+
+
+-- ----------------------------------------------------------------------------
+-- ----------------------------------------------------------------------------
+-- HISTORY-TABLES
+-- ----------------------------------------------------------------------------
+-- ----------------------------------------------------------------------------
+
+-- PUBLIC.HREF_TERRITORY Automatic generanted History Table DDL --
+-- <GENERATED CODE!>
+
+DROP TABLE IF EXISTS PUBLIC.HREF_TERRITORY;
+DROP SEQUENCE IF EXISTS PUBLIC.HREF_TERRITORY_ID_SEQ;
+
+CREATE SEQUENCE PUBLIC.HREF_TERRITORY_ID_SEQ
+ INCREMENT 1
+ MINVALUE 1
+ MAXVALUE 9223372036854775807
+ START 1
+ CACHE 1;
+
+ALTER TABLE PUBLIC.HREF_TERRITORY_ID_SEQ
+ OWNER TO PLGM_SERVICE;
+
+CREATE TABLE PUBLIC.HREF_TERRITORY
+(
+ HID integer NOT NULL DEFAULT nextval('HREF_TERRITORY_ID_SEQ'::regclass),
+ HACTION integer NOT NULL,
+ HDATE timestamp without time zone NOT NULL,
+ HUSER character varying(100),
+
+ ID integer,
+ NAME character varying (50),
+ DESCRIPTION character varying (255),
+
+ CREATE_USER character varying(100),
+ CREATE_DATE timestamp without time zone,
+ MOD_USER character varying(100),
+ MOD_DATE timestamp without time zone,
+ CONSTRAINT HREF_TERRITORY_PKEY PRIMARY KEY (HID)
+)
+WITH (
+ OIDS=FALSE
+);
+
+ALTER TABLE PUBLIC.HREF_TERRITORY
+ OWNER TO PLGM_SERVICE;
+GRANT ALL ON TABLE PUBLIC.HREF_TERRITORY TO PLGM_SERVICE;
+
+
+
+-- PUBLIC.HTBL_LOCK Automatic generanted History Table DDL --
+-- <GENERATED CODE!>
+
+DROP TABLE IF EXISTS PUBLIC.HTBL_LOCK;
+DROP SEQUENCE IF EXISTS PUBLIC.HTBL_LOCK_ID_SEQ;
+
+CREATE SEQUENCE PUBLIC.HTBL_LOCK_ID_SEQ
+ INCREMENT 1
+ MINVALUE 1
+ MAXVALUE 9223372036854775807
+ START 1
+ CACHE 1;
+
+ALTER TABLE PUBLIC.HTBL_LOCK_ID_SEQ
+ OWNER TO PLGM_SERVICE;
+
+CREATE TABLE PUBLIC.HTBL_LOCK
+(
+ HID integer NOT NULL DEFAULT nextval('HTBL_LOCK_ID_SEQ'::regclass),
+ HACTION integer NOT NULL,
+ HDATE timestamp without time zone NOT NULL,
+ HUSER character varying(100),
+
+ ID integer,
+ KEY integer,
+ USERNAME character varying (50),
+ INFO character varying (256),
+
+ CREATE_USER character varying(100),
+ CREATE_DATE timestamp without time zone,
+ MOD_USER character varying(100),
+ MOD_DATE timestamp without time zone,
+ CONSTRAINT HTBL_LOCK_PKEY PRIMARY KEY (HID)
+)
+WITH (
+ OIDS=FALSE
+);
+
+ALTER TABLE PUBLIC.HTBL_LOCK
+ OWNER TO PLGM_SERVICE;
+GRANT ALL ON TABLE PUBLIC.HTBL_LOCK TO PLGM_SERVICE;
+
+
+
+
+-- PUBLIC.HTBL_USER_SETTINGS Automatic generanted History Table DDL --
+-- <GENERATED CODE!>
+
+DROP TABLE IF EXISTS PUBLIC.HTBL_USER_SETTINGS;
+DROP SEQUENCE IF EXISTS PUBLIC.HTBL_USER_SETTINGS_ID_SEQ;
+
+CREATE SEQUENCE PUBLIC.HTBL_USER_SETTINGS_ID_SEQ
+ INCREMENT 1
+ MINVALUE 1
+ MAXVALUE 9223372036854775807
+ START 1
+ CACHE 1;
+
+ALTER TABLE PUBLIC.HTBL_USER_SETTINGS_ID_SEQ
+ OWNER TO PLGM_SERVICE;
+
+CREATE TABLE PUBLIC.HTBL_USER_SETTINGS
+(
+ HID integer NOT NULL DEFAULT nextval('HTBL_USER_SETTINGS_ID_SEQ'::regclass),
+ HACTION integer NOT NULL,
+ HDATE timestamp without time zone NOT NULL,
+ HUSER character varying(100),
+
+ ID integer,
+ USERNAME character varying (50),
+ SETTING_TYPE character varying (50),
+ VALUE character varying(4096),
+
+ CREATE_USER character varying(100),
+ CREATE_DATE timestamp without time zone,
+ MOD_USER character varying(100),
+ MOD_DATE timestamp without time zone,
+ CONSTRAINT HTBL_USER_SETTINGS_PKEY PRIMARY KEY (HID)
+)
+WITH (
+ OIDS=FALSE
+);
+
+ALTER TABLE PUBLIC.HTBL_USER_SETTINGS
+ OWNER TO PLGM_SERVICE;
+GRANT ALL ON TABLE PUBLIC.HTBL_USER_SETTINGS TO PLGM_SERVICE;
+
+
+-- PUBLIC.HREF_COST_CENTER Automatic generanted History Table DDL --
+-- <GENERATED CODE!>
+
+DROP TABLE IF EXISTS PUBLIC.HREF_COST_CENTER;
+DROP SEQUENCE IF EXISTS PUBLIC.HREF_COST_CENTER_ID_SEQ;
+
+CREATE SEQUENCE PUBLIC.HREF_COST_CENTER_ID_SEQ
+ INCREMENT 1
+ MINVALUE 1
+ MAXVALUE 9223372036854775807
+ START 1
+ CACHE 1;
+
+ALTER TABLE PUBLIC.HREF_COST_CENTER_ID_SEQ
+ OWNER TO PLGM_SERVICE;
+
+CREATE TABLE PUBLIC.HREF_COST_CENTER
+(
+ HID integer NOT NULL DEFAULT nextval('HREF_COST_CENTER_ID_SEQ'::regclass),
+ HACTION integer NOT NULL,
+ HDATE timestamp without time zone NOT NULL,
+ HUSER character varying(100),
+
+ ID integer,
+ NAME character varying (50),
+ DESCRIPTION character varying (255),
+
+ CREATE_USER character varying(100),
+ CREATE_DATE timestamp without time zone,
+ MOD_USER character varying(100),
+ MOD_DATE timestamp without time zone,
+ CONSTRAINT HREF_COST_CENTER_PKEY PRIMARY KEY (HID)
+)
+WITH (
+ OIDS=FALSE
+);
+
+ALTER TABLE PUBLIC.HREF_COST_CENTER
+ OWNER TO PLGM_SERVICE;
+GRANT ALL ON TABLE PUBLIC.HREF_COST_CENTER TO PLGM_SERVICE;
+
+-- PUBLIC.HREF_BRANCH Automatic generanted History Table DDL --
+-- <GENERATED CODE!>
+
+DROP TABLE IF EXISTS PUBLIC.HREF_BRANCH;
+DROP SEQUENCE IF EXISTS PUBLIC.HREF_BRANCH_ID_SEQ;
+
+CREATE SEQUENCE PUBLIC.HREF_BRANCH_ID_SEQ
+ INCREMENT 1
+ MINVALUE 1
+ MAXVALUE 9223372036854775807
+ START 1
+ CACHE 1;
+
+ALTER TABLE PUBLIC.HREF_BRANCH_ID_SEQ
+ OWNER TO PLGM_SERVICE;
+
+CREATE TABLE PUBLIC.HREF_BRANCH
+(
+ HID integer NOT NULL DEFAULT nextval('HREF_BRANCH_ID_SEQ'::regclass),
+ HACTION integer NOT NULL,
+ HDATE timestamp without time zone NOT NULL,
+ HUSER character varying(100),
+
+ ID integer,
+ NAME character varying (50),
+ DESCRIPTION character varying (255),
+ COLOR_CODE character varying (20),
+ CREATE_USER character varying(100),
+ CREATE_DATE timestamp without time zone,
+ MOD_USER character varying(100),
+ MOD_DATE timestamp without time zone,
+ CONSTRAINT HREF_BRANCH_PKEY PRIMARY KEY (HID)
+)
+WITH (
+ OIDS=FALSE
+);
+
+ALTER TABLE PUBLIC.HREF_BRANCH
+ OWNER TO PLGM_SERVICE;
+GRANT ALL ON TABLE PUBLIC.HREF_BRANCH TO PLGM_SERVICE;
+
+-- PUBLIC.HREF_BRANCH_LEVEL Automatic generanted History Table DDL --
+-- <GENERATED CODE!>
+
+DROP TABLE IF EXISTS PUBLIC.HREF_BRANCH_LEVEL;
+DROP SEQUENCE IF EXISTS PUBLIC.HREF_BRANCH_LEVEL_ID_SEQ;
+
+CREATE SEQUENCE PUBLIC.HREF_BRANCH_LEVEL_ID_SEQ
+ INCREMENT 1
+ MINVALUE 1
+ MAXVALUE 9223372036854775807
+ START 1
+ CACHE 1;
+
+ALTER TABLE PUBLIC.HREF_BRANCH_LEVEL_ID_SEQ
+ OWNER TO PLGM_SERVICE;
+
+CREATE TABLE PUBLIC.HREF_BRANCH_LEVEL
+(
+ HID integer NOT NULL DEFAULT nextval('HREF_BRANCH_LEVEL_ID_SEQ'::regclass),
+ HACTION integer NOT NULL,
+ HDATE timestamp without time zone NOT NULL,
+ HUSER character varying(100),
+
+ ID integer,
+ NAME character varying (50),
+ DESCRIPTION character varying (255),
+ FK_REF_BRANCH integer,
+
+ CREATE_USER character varying(100),
+ CREATE_DATE timestamp without time zone,
+ MOD_USER character varying(100),
+ MOD_DATE timestamp without time zone,
+ CONSTRAINT HREF_BRANCH_LEVEL_PKEY PRIMARY KEY (HID)
+)
+WITH (
+ OIDS=FALSE
+);
+
+ALTER TABLE PUBLIC.HREF_BRANCH_LEVEL
+ OWNER TO PLGM_SERVICE;
+GRANT ALL ON TABLE PUBLIC.HREF_BRANCH_LEVEL TO PLGM_SERVICE;
+
+
+-- PUBLIC.HREF_GM_STATUS Automatic generanted History Table DDL --
+-- <GENERATED CODE!>
+
+DROP TABLE IF EXISTS PUBLIC.HREF_GM_STATUS;
+DROP SEQUENCE IF EXISTS PUBLIC.HREF_GM_STATUS_ID_SEQ;
+
+CREATE SEQUENCE PUBLIC.HREF_GM_STATUS_ID_SEQ
+ INCREMENT 1
+ MINVALUE 1
+ MAXVALUE 9223372036854775807
+ START 1
+ CACHE 1;
+
+ALTER TABLE PUBLIC.HREF_GM_STATUS_ID_SEQ
+ OWNER TO PLGM_SERVICE;
+
+CREATE TABLE PUBLIC.HREF_GM_STATUS
+(
+ HID integer NOT NULL DEFAULT nextval('HREF_GM_STATUS_ID_SEQ'::regclass),
+ HACTION integer NOT NULL,
+ HDATE timestamp without time zone NOT NULL,
+ HUSER character varying(100),
+
+ ID integer,
+ NAME character varying(50),
+ COLOR_CODE character varying(20),
+
+ CREATE_USER character varying(100),
+ CREATE_DATE timestamp without time zone,
+ MOD_USER character varying(100),
+ MOD_DATE timestamp without time zone,
+ CONSTRAINT HREF_GM_STATUS_PKEY PRIMARY KEY (HID)
+)
+WITH (
+ OIDS=FALSE
+);
+
+ALTER TABLE PUBLIC.HREF_GM_STATUS
+ OWNER TO PLGM_SERVICE;
+GRANT ALL ON TABLE PUBLIC.HREF_GM_STATUS TO PLGM_SERVICE;
+
+
+-- PUBLIC.HTBL_GRIDMEASURE Automatic generanted History Table DDL --
+-- <GENERATED CODE!>
+
+-- REQUESTER_NAME COLUMN DELETED--
+
+DROP TABLE IF EXISTS PUBLIC.HTBL_GRIDMEASURE;
+DROP SEQUENCE IF EXISTS PUBLIC.HTBL_GRIDMEASURE_ID_SEQ;
+
+CREATE SEQUENCE PUBLIC.HTBL_GRIDMEASURE_ID_SEQ
+ INCREMENT 1
+ MINVALUE 1
+ MAXVALUE 9223372036854775807
+ START 1
+ CACHE 1;
+
+ALTER TABLE PUBLIC.HTBL_GRIDMEASURE_ID_SEQ
+ OWNER TO PLGM_SERVICE;
+
+CREATE TABLE PUBLIC.HTBL_GRIDMEASURE
+(
+ HID integer NOT NULL DEFAULT nextval('HTBL_GRIDMEASURE_ID_SEQ'::regclass),
+ HACTION integer NOT NULL,
+ HDATE timestamp without time zone NOT NULL,
+ HUSER character varying(100),
+
+ ID integer,
+ ID_DESCRIPTIVE character varying (50),
+ TITLE character varying (256),
+ AFFECTED_RESOURCE character varying (256),
+ REMARK character varying (1024),
+ EMAIL_ADDRESSES character varying(1024),
+ FK_REF_GM_STATUS integer,
+ SWITCHING_OBJECT character varying (256),
+ COST_CENTER character varying (50),
+ APPROVAL_BY character varying (256),
+ AREA_OF_SWITCHING character varying (256),
+ APPOINTMENT_REPETITION character varying (100),
+ APPOINTMENT_STARTDATE timestamp without time zone,
+ APPOINTMENT_NUMBEROF integer,
+ PLANNED_STARTTIME_FIRST_SINGLEMEASURE timestamp without time zone,
+ ENDTIME_GRIDMEASURE timestamp without time zone,
+ TIME_OF_REALLOCATION character varying (100),
+ DESCRIPTION character varying (1024),
+ FK_REF_BRANCH integer,
+ FK_REF_BRANCH_LEVEL integer,
+ CREATE_USER_DEPARTMENT character varying (100),
+ MOD_USER_DEPARTMENT character varying (100),
+
+ CREATE_USER character varying(100),
+ CREATE_DATE timestamp without time zone,
+ MOD_USER character varying(100),
+ MOD_DATE timestamp without time zone,
+ CONSTRAINT HTBL_GRIDMEASURE_PKEY PRIMARY KEY (HID)
+)
+WITH (
+ OIDS=FALSE
+);
+
+ALTER TABLE PUBLIC.HTBL_GRIDMEASURE
+ OWNER TO PLGM_SERVICE;
+GRANT ALL ON TABLE PUBLIC.HTBL_GRIDMEASURE TO PLGM_SERVICE;
+
+CREATE INDEX HUSER_INDEX ON PUBLIC.HTBL_GRIDMEASURE (HUSER);
+
+
+INSERT INTO public.htbl_gridmeasure(haction, hdate, huser, id, fk_ref_gm_status, mod_user, mod_date)
+VALUES (2, '2018-06-11 14:00:00', 'otto',12,0, 'admin', '2018-06-11 14:00:00');
+INSERT INTO public.htbl_gridmeasure(haction, hdate, huser, id, fk_ref_gm_status, mod_user, mod_date)
+VALUES (2, '2018-06-11 14:01:00', 'otto',12,1, 'admin', '2018-06-11 14:01:00');
+INSERT INTO public.htbl_gridmeasure(haction, hdate, huser, id, fk_ref_gm_status, mod_user, mod_date)
+VALUES (2, '2018-06-11 14:03:00', 'otto',12,3, 'admin', '2018-06-11 14:03:00');
+INSERT INTO public.htbl_gridmeasure(haction, hdate, huser, id, fk_ref_gm_status, mod_user, mod_date)
+VALUES (2, '2018-06-11 14:04:00', 'otto',12,4, 'admin', '2018-06-11 14:04:00');
+INSERT INTO public.htbl_gridmeasure(haction, hdate, huser, id, fk_ref_gm_status, mod_user, mod_date)
+VALUES (2, '2018-06-11 14:05:00', 'otto',12,5, 'admin', '2018-06-11 14:05:00');
+INSERT INTO public.htbl_gridmeasure(haction, hdate, huser, id, fk_ref_gm_status, mod_user, mod_date)
+VALUES (2, '2018-06-11 14:06:00', 'otto',12,6, 'admin', '2018-06-11 14:06:00');
+INSERT INTO public.htbl_gridmeasure(haction, hdate, huser, id, fk_ref_gm_status, mod_user, mod_date)
+VALUES (2, '2018-06-11 14:07:00', 'otto',12,7, 'admin', '2018-06-11 14:07:00');
+INSERT INTO public.htbl_gridmeasure(haction, hdate, huser, id, fk_ref_gm_status, mod_user, mod_date)
+VALUES (2, '2018-06-11 14:08:00', 'otto',12,8, 'admin', '2018-06-11 14:08:00');
+INSERT INTO public.htbl_gridmeasure(haction, hdate, huser, id, fk_ref_gm_status, mod_user, mod_date)
+VALUES (2, '2018-06-11 14:09:00', 'otto',12,9, 'admin', '2018-06-11 14:09:00');
+INSERT INTO public.htbl_gridmeasure(haction, hdate, huser, id, fk_ref_gm_status, mod_user, mod_date)
+VALUES (2, '2018-06-11 14:10:00', 'otto',12,10, 'admin', '2018-06-11 14:10:00');
+INSERT INTO public.htbl_gridmeasure(haction, hdate, huser, id, fk_ref_gm_status, mod_user, mod_date)
+VALUES (2, '2018-06-11 14:11:00', 'otto',12,11, 'admin', '2018-06-11 14:11:00');
+
+
+INSERT INTO public.htbl_gridmeasure(haction, hdate, huser, id, fk_ref_gm_status, mod_user, mod_date)
+VALUES (2, '2018-07-01 14:55:00', 'admin',13,0, 'admin', '2018-07-01 14:55:00');
+INSERT INTO public.htbl_gridmeasure(haction, hdate, huser, id, fk_ref_gm_status, mod_user, mod_date)
+VALUES (2, '2018-07-01 14:56:00', 'admin',13,1, 'admin', '2018-07-01 14:56:00');
+INSERT INTO public.htbl_gridmeasure(haction, hdate, huser, id, fk_ref_gm_status, mod_user, mod_date)
+VALUES (2, '2018-07-01 14:57:00', 'admin',13,3, 'admin', '2018-07-01 14:57:00');
+INSERT INTO public.htbl_gridmeasure(haction, hdate, huser, id, fk_ref_gm_status, mod_user, mod_date)
+VALUES (2, '2018-07-01 14:57:00', 'admin',13,12, 'admin', '2018-07-01 14:57:00');
+
+
+INSERT INTO public.htbl_gridmeasure(haction, hdate, huser, id, fk_ref_gm_status, mod_user, mod_date)
+VALUES (1, '2018-06-11 14:00:00', 'admin',11,0, 'admin', '2018-06-11 14:00:00');
+INSERT INTO public.htbl_gridmeasure(haction, hdate, huser, id, fk_ref_gm_status, mod_user, mod_date)
+VALUES (1, '2018-06-11 14:01:00', 'admin',11,1, 'admin', '2018-06-11 14:01:00');
+INSERT INTO public.htbl_gridmeasure(haction, hdate, huser, id, fk_ref_gm_status, mod_user, mod_date)
+VALUES (1, '2018-06-11 14:02:00', 'admin',11,3, 'admin', '2018-06-11 14:02:00');
+INSERT INTO public.htbl_gridmeasure(haction, hdate, huser, id, fk_ref_gm_status, mod_user, mod_date)
+VALUES (1, '2018-06-11 14:03:00', 'admin',11,4, 'admin', '2018-06-11 14:03:00');
+INSERT INTO public.htbl_gridmeasure(haction, hdate, huser, id, fk_ref_gm_status, mod_user, mod_date)
+VALUES (1, '2018-06-11 14:04:00', 'admin',11,5, 'admin', '2018-06-11 14:04:00');
+INSERT INTO public.htbl_gridmeasure(haction, hdate, huser, id, fk_ref_gm_status, mod_user, mod_date)
+VALUES (1, '2018-06-11 14:05:00', 'admin',11,6, 'admin', '2018-06-11 14:05:00');
+INSERT INTO public.htbl_gridmeasure(haction, hdate, huser, id, fk_ref_gm_status, mod_user, mod_date)
+VALUES (1, '2018-06-11 14:06:00', 'admin',11,7, 'admin', '2018-06-11 14:06:00');
+INSERT INTO public.htbl_gridmeasure(haction, hdate, huser, id, fk_ref_gm_status, mod_user, mod_date)
+VALUES (1, '2018-06-11 14:07:00', 'admin',11,8, 'admin', '2018-06-11 14:07:00');
+INSERT INTO public.htbl_gridmeasure(haction, hdate, huser, id, fk_ref_gm_status, mod_user, mod_date)
+VALUES (1, '2018-06-11 14:08:00', 'admin',11,9, 'admin', '2018-06-11 14:08:00');
+INSERT INTO public.htbl_gridmeasure(haction, hdate, huser, id, fk_ref_gm_status, mod_user, mod_date)
+VALUES (1, '2018-06-11 14:09:00', 'admin',11,10, 'admin', '2018-06-11 14:09:00');
+
+
+INSERT INTO public.htbl_gridmeasure(haction, hdate, huser, id, fk_ref_gm_status, mod_user, mod_date)
+VALUES (2, '2018-06-11 14:00:00', 'admin',10,0, 'admin', '2018-06-11 14:00:00');
+INSERT INTO public.htbl_gridmeasure(haction, hdate, huser, id, fk_ref_gm_status, mod_user, mod_date)
+VALUES (2, '2018-06-11 14:01:00', 'admin',10,1, 'admin', '2018-06-11 14:01:00');
+INSERT INTO public.htbl_gridmeasure(haction, hdate, huser, id, fk_ref_gm_status, mod_user, mod_date)
+VALUES (2, '2018-06-11 14:02:00', 'admin',10,3, 'admin', '2018-06-11 14:02:00');
+INSERT INTO public.htbl_gridmeasure(haction, hdate, huser, id, fk_ref_gm_status, mod_user, mod_date)
+VALUES (2, '2018-06-11 14:03:00', 'admin',10,4, 'admin', '2018-06-11 14:03:00');
+INSERT INTO public.htbl_gridmeasure(haction, hdate, huser, id, fk_ref_gm_status, mod_user, mod_date)
+VALUES (2, '2018-06-11 14:04:00', 'admin',10,5, 'admin', '2018-06-11 14:04:00');
+INSERT INTO public.htbl_gridmeasure(haction, hdate, huser, id, fk_ref_gm_status, mod_user, mod_date)
+VALUES (2, '2018-06-11 14:05:00', 'admin',10,6, 'admin', '2018-06-11 14:05:00');
+INSERT INTO public.htbl_gridmeasure(haction, hdate, huser, id, fk_ref_gm_status, mod_user, mod_date)
+VALUES (2, '2018-06-11 14:06:00', 'admin',10,7, 'admin', '2018-06-11 14:06:00');
+INSERT INTO public.htbl_gridmeasure(haction, hdate, huser, id, fk_ref_gm_status, mod_user, mod_date)
+VALUES (2, '2018-06-11 14:07:00', 'admin',10,8, 'admin', '2018-06-11 14:07:00');
+INSERT INTO public.htbl_gridmeasure(haction, hdate, huser, id, fk_ref_gm_status, mod_user, mod_date)
+VALUES (2, '2018-06-11 14:08:00', 'admin',10,9, 'admin', '2018-06-11 14:08:00');
+
+
+INSERT INTO public.htbl_gridmeasure(haction, hdate, huser, id, fk_ref_gm_status, mod_user, mod_date)
+VALUES (2, '2018-06-11 14:00:00', 'admin',9,0, 'admin', '2018-06-11 14:00:00');
+INSERT INTO public.htbl_gridmeasure(haction, hdate, huser, id, fk_ref_gm_status, mod_user, mod_date)
+VALUES (2, '2018-06-11 14:01:00', 'admin',9,1, 'admin', '2018-06-11 14:01:00');
+INSERT INTO public.htbl_gridmeasure(haction, hdate, huser, id, fk_ref_gm_status, mod_user, mod_date)
+VALUES (2, '2018-06-11 14:02:00', 'admin',9,3, 'admin', '2018-06-11 14:02:00');
+INSERT INTO public.htbl_gridmeasure(haction, hdate, huser, id, fk_ref_gm_status, mod_user, mod_date)
+VALUES (2, '2018-06-11 14:03:00', 'admin',9,4, 'admin', '2018-06-11 14:03:00');
+INSERT INTO public.htbl_gridmeasure(haction, hdate, huser, id, fk_ref_gm_status, mod_user, mod_date)
+VALUES (2, '2018-06-11 14:04:00', 'admin',9,5, 'admin', '2018-06-11 14:04:00');
+INSERT INTO public.htbl_gridmeasure(haction, hdate, huser, id, fk_ref_gm_status, mod_user, mod_date)
+VALUES (2, '2018-06-11 14:05:00', 'admin',9,6, 'admin', '2018-06-11 14:05:00');
+INSERT INTO public.htbl_gridmeasure(haction, hdate, huser, id, fk_ref_gm_status, mod_user, mod_date)
+VALUES (2, '2018-06-11 14:06:00', 'admin',9,7, 'admin', '2018-06-11 14:06:00');
+INSERT INTO public.htbl_gridmeasure(haction, hdate, huser, id, fk_ref_gm_status, mod_user, mod_date)
+VALUES (2, '2018-06-11 14:07:00', 'admin',9,8, 'admin', '2018-06-11 14:07:00');
+
+
+INSERT INTO public.htbl_gridmeasure(haction, hdate, huser, id, fk_ref_gm_status, mod_user, mod_date)
+VALUES (2, '2018-06-11 14:00:00', 'admin',8,0, 'admin', '2018-06-11 14:00:00');
+INSERT INTO public.htbl_gridmeasure(haction, hdate, huser, id, fk_ref_gm_status, mod_user, mod_date)
+VALUES (2, '2018-06-11 14:01:00', 'admin',8,1, 'admin', '2018-06-11 14:01:00');
+INSERT INTO public.htbl_gridmeasure(haction, hdate, huser, id, fk_ref_gm_status, mod_user, mod_date)
+VALUES (2, '2018-06-11 14:02:00', 'admin',8,3, 'admin', '2018-06-11 14:02:00');
+INSERT INTO public.htbl_gridmeasure(haction, hdate, huser, id, fk_ref_gm_status, mod_user, mod_date)
+VALUES (2, '2018-06-11 14:03:00', 'admin',8,4, 'admin', '2018-06-11 14:03:00');
+INSERT INTO public.htbl_gridmeasure(haction, hdate, huser, id, fk_ref_gm_status, mod_user, mod_date)
+VALUES (2, '2018-06-11 14:04:00', 'admin',8,5, 'admin', '2018-06-11 14:04:00');
+INSERT INTO public.htbl_gridmeasure(haction, hdate, huser, id, fk_ref_gm_status, mod_user, mod_date)
+VALUES (2, '2018-06-11 14:05:00', 'admin',8,6, 'admin', '2018-06-11 14:05:00');
+INSERT INTO public.htbl_gridmeasure(haction, hdate, huser, id, fk_ref_gm_status, mod_user, mod_date)
+VALUES (2, '2018-06-11 14:06:00', 'admin',8,7, 'admin', '2018-06-11 14:06:00');
+
+
+INSERT INTO public.htbl_gridmeasure(haction, hdate, huser, id, fk_ref_gm_status, mod_user, mod_date)
+VALUES (2, '2018-06-11 14:00:00', 'admin',7,0, 'admin', '2018-06-11 14:00:00');
+INSERT INTO public.htbl_gridmeasure(haction, hdate, huser, id, fk_ref_gm_status, mod_user, mod_date)
+VALUES (2, '2018-06-11 14:01:00', 'admin',7,1, 'admin', '2018-06-11 14:01:00');
+INSERT INTO public.htbl_gridmeasure(haction, hdate, huser, id, fk_ref_gm_status, mod_user, mod_date)
+VALUES (2, '2018-06-11 14:02:00', 'admin',7,3, 'admin', '2018-06-11 14:02:00');
+INSERT INTO public.htbl_gridmeasure(haction, hdate, huser, id, fk_ref_gm_status, mod_user, mod_date)
+VALUES (2, '2018-06-11 14:03:00', 'admin',7,4, 'admin', '2018-06-11 14:03:00');
+INSERT INTO public.htbl_gridmeasure(haction, hdate, huser, id, fk_ref_gm_status, mod_user, mod_date)
+VALUES (2, '2018-06-11 14:04:00', 'admin',7,5, 'admin', '2018-06-11 14:04:00');
+INSERT INTO public.htbl_gridmeasure(haction, hdate, huser, id, fk_ref_gm_status, mod_user, mod_date)
+VALUES (2, '2018-06-11 14:05:00', 'admin',7,6, 'admin', '2018-06-11 14:05:00');
+
+
+INSERT INTO public.htbl_gridmeasure(haction, hdate, huser, id, fk_ref_gm_status, mod_user, mod_date)
+VALUES (2, '2018-06-11 14:00:00', 'admin',6,0, 'admin', '2018-06-11 14:00:00');
+INSERT INTO public.htbl_gridmeasure(haction, hdate, huser, id, fk_ref_gm_status, mod_user, mod_date)
+VALUES (2, '2018-06-11 14:01:00', 'admin',6,1, 'admin', '2018-06-11 14:01:00');
+INSERT INTO public.htbl_gridmeasure(haction, hdate, huser, id, fk_ref_gm_status, mod_user, mod_date)
+VALUES (2, '2018-06-11 14:02:00', 'admin',6,3, 'admin', '2018-06-11 14:02:00');
+INSERT INTO public.htbl_gridmeasure(haction, hdate, huser, id, fk_ref_gm_status, mod_user, mod_date)
+VALUES (2, '2018-06-11 14:03:00', 'admin',6,4, 'admin', '2018-06-11 14:03:00');
+INSERT INTO public.htbl_gridmeasure(haction, hdate, huser, id, fk_ref_gm_status, mod_user, mod_date)
+VALUES (2, '2018-06-11 14:04:00', 'admin',6,5, 'admin', '2018-06-11 14:04:00');
+
+
+INSERT INTO public.htbl_gridmeasure(haction, hdate, huser, id, fk_ref_gm_status, mod_user, mod_date)
+VALUES (2, '2018-06-11 14:00:00', 'admin',5,0, 'admin', '2018-06-11 14:00:00');
+INSERT INTO public.htbl_gridmeasure(haction, hdate, huser, id, fk_ref_gm_status, mod_user, mod_date)
+VALUES (2, '2018-06-11 14:01:00', 'admin',5,1, 'admin', '2018-06-11 14:01:00');
+INSERT INTO public.htbl_gridmeasure(haction, hdate, huser, id, fk_ref_gm_status, mod_user, mod_date)
+VALUES (2, '2018-06-11 14:02:00', 'admin',5,3, 'admin', '2018-06-11 14:02:00');
+INSERT INTO public.htbl_gridmeasure(haction, hdate, huser, id, fk_ref_gm_status, mod_user, mod_date)
+VALUES (2, '2018-06-11 14:03:00', 'admin',5,4, 'admin', '2018-06-11 14:03:00');
+
+
+INSERT INTO public.htbl_gridmeasure(haction, hdate, huser, id, fk_ref_gm_status, mod_user, mod_date)
+VALUES (2, '2018-06-11 14:00:00', 'admin',4,0, 'admin', '2018-06-11 14:00:00');
+INSERT INTO public.htbl_gridmeasure(haction, hdate, huser, id, fk_ref_gm_status, mod_user, mod_date)
+VALUES (2, '2018-06-11 14:01:00', 'admin',4,1, 'admin', '2018-06-11 14:01:00');
+INSERT INTO public.htbl_gridmeasure(haction, hdate, huser, id, fk_ref_gm_status, mod_user, mod_date)
+VALUES (2, '2018-06-11 14:02:00', 'admin',4,3, 'admin', '2018-06-11 14:02:00');
+
+
+INSERT INTO public.htbl_gridmeasure(haction, hdate, huser, id, fk_ref_gm_status, mod_user, mod_date)
+VALUES (2, '2018-06-11 14:00:00', 'admin',3,0, 'admin', '2018-06-11 14:00:00');
+INSERT INTO public.htbl_gridmeasure(haction, hdate, huser, id, fk_ref_gm_status, mod_user, mod_date)
+VALUES (2, '2018-06-11 14:01:00', 'admin',3,1, 'admin', '2018-06-11 14:01:00');
+INSERT INTO public.htbl_gridmeasure(haction, hdate, huser, id, fk_ref_gm_status, mod_user, mod_date)
+VALUES (2, '2018-06-11 14:02:00', 'admin',3,3, 'admin', '2018-06-11 14:02:00');
+INSERT INTO public.htbl_gridmeasure(haction, hdate, huser, id, fk_ref_gm_status, mod_user, mod_date)
+VALUES (2, '2018-06-11 14:03:00', 'admin',3,2, 'admin', '2018-06-11 14:03:00');
+
+
+INSERT INTO public.htbl_gridmeasure(haction, hdate, huser, id, fk_ref_gm_status, mod_user, mod_date)
+VALUES (2, '2018-06-11 14:00:00', 'admin',2,0, 'jasper', '2018-06-11 14:00:00');
+INSERT INTO public.htbl_gridmeasure(haction, hdate, huser, id, fk_ref_gm_status, mod_user, mod_date)
+VALUES (2, '2018-06-11 14:01:00', 'admin',2,1, 'jasper', '2018-06-11 14:01:00');
+
+
+INSERT INTO public.htbl_gridmeasure(haction, hdate, huser, id, fk_ref_gm_status, mod_user, mod_date)
+VALUES (2, '2018-06-11 14:01:00', 'admin',1,0, 'otto', '2018-06-11 14:01:00');
+
+-- PUBLIC.HTBL_ID_COUNTER Automatic generanted History Table DDL --
+-- <GENERATED CODE!>
+
+DROP TABLE IF EXISTS PUBLIC.HTBL_ID_COUNTER;
+DROP SEQUENCE IF EXISTS PUBLIC.HTBL_ID_COUNTER_ID_SEQ;
+
+CREATE SEQUENCE PUBLIC.HTBL_ID_COUNTER_ID_SEQ
+ INCREMENT 1
+ MINVALUE 1
+ MAXVALUE 9223372036854775807
+ START 1
+ CACHE 1;
+
+ALTER TABLE PUBLIC.HTBL_ID_COUNTER_ID_SEQ
+ OWNER TO PLGM_SERVICE;
+
+CREATE TABLE PUBLIC.HTBL_ID_COUNTER
+(
+ HID integer NOT NULL DEFAULT nextval('HTBL_ID_COUNTER_ID_SEQ'::regclass),
+ HACTION integer NOT NULL,
+ HDATE timestamp without time zone NOT NULL,
+ HUSER character varying(100),
+
+ ID integer,
+ COUNTER integer,
+ COUNTER_TYPE character varying (256),
+ INFO character varying (256),
+
+ CREATE_USER character varying(100),
+ CREATE_DATE timestamp without time zone,
+ MOD_USER character varying(100),
+ MOD_DATE timestamp without time zone,
+ CONSTRAINT HTBL_ID_COUNTER_PKEY PRIMARY KEY (HID)
+)
+WITH (
+ OIDS=FALSE
+);
+
+ALTER TABLE PUBLIC.HTBL_ID_COUNTER
+ OWNER TO PLGM_SERVICE;
+GRANT ALL ON TABLE PUBLIC.HTBL_ID_COUNTER TO PLGM_SERVICE;
+
+
+
+-- PUBLIC.HTBL_SINGLE_GRIDMEASURE Automatic generanted History Table DDL --
+-- <GENERATED CODE!>
+
+DROP TABLE IF EXISTS PUBLIC.HTBL_SINGLE_GRIDMEASURE;
+DROP SEQUENCE IF EXISTS PUBLIC.HTBL_SINGLE_GRIDMEASURE_ID_SEQ;
+
+CREATE SEQUENCE PUBLIC.HTBL_SINGLE_GRIDMEASURE_ID_SEQ
+ INCREMENT 1
+ MINVALUE 1
+ MAXVALUE 9223372036854775807
+ START 1
+ CACHE 1;
+
+ALTER TABLE PUBLIC.HTBL_SINGLE_GRIDMEASURE_ID_SEQ
+ OWNER TO PLGM_SERVICE;
+
+
+
+CREATE TABLE PUBLIC.HTBL_SINGLE_GRIDMEASURE
+(
+ HID integer NOT NULL DEFAULT nextval('HTBL_SINGLE_GRIDMEASURE_ID_SEQ'::regclass),
+ HACTION integer NOT NULL,
+ HDATE timestamp without time zone NOT NULL,
+ HUSER character varying(100),
+
+ ID integer,
+ SORTORDER integer,
+ TITLE character varying (256),
+ SWITCHING_OBJECT character varying (256),
+ CIM_ID character varying (256),
+ CIM_NAME character varying (256),
+ CIM_DESCRIPTION character varying (1024),
+ RESPONSIBLE_ONSITE_NAME character varying(256),
+ RESPONSIBLE_ONSITE_DEPARTMENT character varying(256),
+ NETWORK_CONTROL character varying (256),
+ PLANNED_STARTTIME_SINGLEMEASURE timestamp without time zone,
+ PLANNED_ENDTIME_SINGLEMEASURE timestamp without time zone,
+ DESCRIPTION character varying (1024),
+ FK_TBL_GRIDMEASURE integer,
+
+ CREATE_USER character varying(100),
+ CREATE_DATE timestamp without time zone,
+ MOD_USER character varying(100),
+ MOD_DATE timestamp without time zone,
+ CONSTRAINT HTBL_SINGLE_GRIDMEASURE_PKEY PRIMARY KEY (HID)
+)
+WITH (
+ OIDS=FALSE
+);
+
+ALTER TABLE PUBLIC.HTBL_SINGLE_GRIDMEASURE
+ OWNER TO PLGM_SERVICE;
+GRANT ALL ON TABLE PUBLIC.HTBL_SINGLE_GRIDMEASURE TO PLGM_SERVICE;
+
+
+
+
+-- PUBLIC.HTBL_STEPS Automatic generanted History Table DDL --
+-- <GENERATED CODE!>
+
+DROP TABLE IF EXISTS PUBLIC.HTBL_STEPS;
+DROP SEQUENCE IF EXISTS PUBLIC.HTBL_STEPS_ID_SEQ;
+
+CREATE SEQUENCE PUBLIC.HTBL_STEPS_ID_SEQ
+ INCREMENT 1
+ MINVALUE 1
+ MAXVALUE 9223372036854775807
+ START 1
+ CACHE 1;
+
+ALTER TABLE PUBLIC.HTBL_STEPS_ID_SEQ
+ OWNER TO PLGM_SERVICE;
+
+CREATE TABLE PUBLIC.HTBL_STEPS
+(
+ HID integer NOT NULL DEFAULT nextval('HTBL_STEPS_ID_SEQ'::regclass),
+ HACTION integer NOT NULL,
+ HDATE timestamp without time zone NOT NULL,
+ HUSER character varying(100),
+
+ ID integer,
+ SORTORDER integer,
+ SWITCHING_OBJECT character varying (256),
+ TYPE character varying(256),
+ PRESENT_TIME character varying(256),
+ PRESENT_STATE character varying(256),
+ TARGET_STATE character varying (256),
+ OPERATOR character varying(256),
+ FK_TBL_SINGLE_GRIDMEASURE integer,
+ CREATE_USER character varying (100),
+ CREATE_DATE timestamp without time zone,
+ MOD_USER character varying (100),
+ MOD_DATE timestamp without time zone,
+
+ CONSTRAINT HTBL_STEPS_PKEY PRIMARY KEY (HID)
+)
+WITH (
+ OIDS=FALSE
+);
+
+ALTER TABLE PUBLIC.HTBL_STEPS
+ OWNER TO PLGM_SERVICE;
+GRANT ALL ON TABLE PUBLIC.HTBL_STEPS TO PLGM_SERVICE;
+
+
+-- PUBLIC.HTBL_DOCUMENTS Automatic generanted History Table DDL --
+-- <GENERATED CODE!>
+
+DROP TABLE IF EXISTS PUBLIC.HTBL_DOCUMENTS;
+DROP SEQUENCE IF EXISTS PUBLIC.HTBL_DOCUMENTS_ID_SEQ;
+
+CREATE SEQUENCE PUBLIC.HTBL_DOCUMENTS_ID_SEQ
+ INCREMENT 1
+ MINVALUE 1
+ MAXVALUE 9223372036854775807
+ START 1
+ CACHE 1;
+
+ALTER TABLE PUBLIC.HTBL_DOCUMENTS_ID_SEQ
+ OWNER TO PLGM_SERVICE;
+
+CREATE TABLE PUBLIC.HTBL_DOCUMENTS
+(
+ HID integer NOT NULL DEFAULT nextval('HTBL_DOCUMENTS_ID_SEQ'::regclass),
+ HACTION integer NOT NULL,
+ HDATE timestamp without time zone NOT NULL,
+ HUSER character varying(100),
+
+ ID integer,
+ DOCUMENT_NAME character varying (260),
+ DOCUMENT bytea,
+
+ CREATE_USER character varying(100),
+ CREATE_DATE timestamp without time zone,
+ MOD_USER character varying(100),
+ MOD_DATE timestamp without time zone,
+ CONSTRAINT HTBL_DOCUMENTS_PKEY PRIMARY KEY (HID)
+)
+WITH (
+ OIDS=FALSE
+);
+
+ALTER TABLE PUBLIC.HTBL_DOCUMENTS
+ OWNER TO PLGM_SERVICE;
+GRANT ALL ON TABLE PUBLIC.HTBL_DOCUMENTS TO PLGM_SERVICE;
+
+-- PUBLIC.HTBL_MEASURE_DOCUMENTS Automatic generanted History Table DDL --
+-- <GENERATED CODE!>
+
+DROP TABLE IF EXISTS PUBLIC.HTBL_MEASURE_DOCUMENTS;
+DROP SEQUENCE IF EXISTS PUBLIC.HTBL_MEASURE_DOCUMENTS_ID_SEQ;
+
+CREATE SEQUENCE PUBLIC.HTBL_MEASURE_DOCUMENTS_ID_SEQ
+ INCREMENT 1
+ MINVALUE 1
+ MAXVALUE 9223372036854775807
+ START 1
+ CACHE 1;
+
+ALTER TABLE PUBLIC.HTBL_MEASURE_DOCUMENTS_ID_SEQ
+ OWNER TO PLGM_SERVICE;
+
+CREATE TABLE PUBLIC.HTBL_MEASURE_DOCUMENTS
+(
+ HID integer NOT NULL DEFAULT nextval('HTBL_MEASURE_DOCUMENTS_ID_SEQ'::regclass),
+ HACTION integer NOT NULL,
+ HDATE timestamp without time zone NOT NULL,
+ HUSER character varying(100),
+
+ ID integer,
+ FK_TBL_MEASURE integer,
+ FK_TBL_DOCUMENTS integer,
+
+ CREATE_USER character varying(100),
+ CREATE_DATE timestamp without time zone,
+ MOD_USER character varying(100),
+ MOD_DATE timestamp without time zone,
+ CONSTRAINT HTBL_MEASURE_DOCUMENTS_PKEY PRIMARY KEY (HID)
+)
+WITH (
+ OIDS=FALSE
+);
+
+ALTER TABLE PUBLIC.HTBL_MEASURE_DOCUMENTS
+ OWNER TO PLGM_SERVICE;
+GRANT ALL ON TABLE PUBLIC.HTBL_MEASURE_DOCUMENTS TO PLGM_SERVICE;
+
+-- ----------------------------------------------------------------------------
+-- ----------------------------------------------------------------------------
+-- TRIGGER
+-- ----------------------------------------------------------------------------
+-- ----------------------------------------------------------------------------
+
+-- ---------------------------------------------
+-- TRIGGER REF_TERRITORY
+-- ---------------------------------------------
+
+
+-- PUBLIC.REF_TERRITORY INSERT TRIGGER --
+-- <GENERATED CODE!>
+CREATE OR REPLACE FUNCTION PUBLIC.REF_TERRITORY_INSERT_TRG()
+ RETURNS trigger AS
+$BODY$
+ BEGIN
+ INSERT INTO HREF_TERRITORY (
+ ID,NAME,DESCRIPTION,CREATE_USER,CREATE_DATE,MOD_USER,MOD_DATE,
+
+ HACTION,
+ HDATE,
+ HUSER
+ )
+ VALUES (
+
+ NEW.ID,NEW.NAME,NEW.DESCRIPTION,NEW.CREATE_USER,NEW.CREATE_DATE,NEW.MOD_USER,NEW.MOD_DATE,
+
+ 1,
+ current_timestamp,
+ NEW.CREATE_USER );
+
+ RETURN NEW;
+ END;
+$BODY$
+ LANGUAGE plpgsql VOLATILE
+ COST 100;
+ALTER FUNCTION PUBLIC.REF_TERRITORY_INSERT_TRG()
+ OWNER TO PLGM_SERVICE;
+
+
+DROP TRIGGER IF EXISTS REF_TERRITORY_INSERT_TRG ON PUBLIC.REF_TERRITORY;
+
+CREATE TRIGGER REF_TERRITORY_INSERT_TRG
+ BEFORE INSERT
+ ON PUBLIC.REF_TERRITORY
+ FOR EACH ROW
+ EXECUTE PROCEDURE PUBLIC.REF_TERRITORY_INSERT_TRG();
+
+
+
+-- PUBLIC.REF_TERRITORY UPDATE TRIGGER --
+-- <GENERATED CODE!>
+
+CREATE OR REPLACE FUNCTION PUBLIC.REF_TERRITORY_UPDATE_TRG()
+ RETURNS trigger AS
+$BODY$
+ BEGIN
+ INSERT INTO HREF_TERRITORY (
+ ID,NAME,DESCRIPTION,CREATE_USER,CREATE_DATE,MOD_USER,MOD_DATE,
+
+ HACTION,
+ HDATE,
+ HUSER
+ )
+ VALUES (
+ NEW.ID,NEW.NAME,NEW.DESCRIPTION,NEW.CREATE_USER,NEW.CREATE_DATE,NEW.MOD_USER,NEW.MOD_DATE,
+ 2,
+ current_timestamp,
+ NEW.MOD_USER
+ );
+
+ RETURN NEW;
+ END;
+$BODY$
+ LANGUAGE plpgsql VOLATILE
+ COST 100;
+ALTER FUNCTION PUBLIC.REF_TERRITORY_UPDATE_TRG()
+ OWNER TO PLGM_SERVICE;
+
+DROP TRIGGER IF EXISTS REF_TERRITORY_UPDATE_TRG ON PUBLIC.REF_TERRITORY;
+
+CREATE TRIGGER REF_TERRITORY_UPDATE_TRG
+ BEFORE UPDATE
+ ON PUBLIC.REF_TERRITORY
+ FOR EACH ROW
+ EXECUTE PROCEDURE PUBLIC.REF_TERRITORY_UPDATE_TRG();
+
+
+
+-- PUBLIC.REF_TERRITORY DELETE TRIGGER --
+-- <GENERATED CODE!>
+
+CREATE OR REPLACE FUNCTION PUBLIC.REF_TERRITORY_DELETE_TRG()
+ RETURNS trigger AS
+$BODY$
+ BEGIN
+ IF TG_OP = 'DELETE' THEN
+ INSERT INTO HREF_TERRITORY (
+
+ ID,NAME,DESCRIPTION,CREATE_USER,CREATE_DATE,MOD_USER,MOD_DATE,
+
+ HACTION,
+ HDATE,
+ HUSER
+ )
+ VALUES (
+ OLD.ID,OLD.NAME,OLD.DESCRIPTION,OLD.CREATE_USER,OLD.CREATE_DATE,OLD.MOD_USER,OLD.MOD_DATE,
+
+ 3,
+ current_timestamp,
+ OLD.MOD_USER );
+ END IF;
+
+ RETURN OLD;
+ END;
+$BODY$
+ LANGUAGE plpgsql VOLATILE
+ COST 100;
+ALTER FUNCTION PUBLIC.REF_TERRITORY_DELETE_TRG()
+ OWNER TO PLGM_SERVICE;
+
+DROP TRIGGER IF EXISTS REF_TERRITORY_DELETE_TRG ON PUBLIC.REF_TERRITORY;
+
+CREATE TRIGGER REF_TERRITORY_DELETE_TRG
+ BEFORE DELETE
+ ON PUBLIC.REF_TERRITORY
+ FOR EACH ROW
+ EXECUTE PROCEDURE PUBLIC.REF_TERRITORY_DELETE_TRG();
+
+
+
+-- PUBLIC.TBL_ID_COUNTER INSERT TRIGGER --
+-- <GENERATED CODE!>
+CREATE OR REPLACE FUNCTION PUBLIC.TBL_ID_COUNTER_INSERT_TRG()
+ RETURNS trigger AS
+$BODY$
+ BEGIN
+ INSERT INTO HTBL_ID_COUNTER (
+ ID,COUNTER,COUNTER_TYPE,INFO,CREATE_USER,CREATE_DATE,MOD_USER,MOD_DATE,
+
+ HACTION,
+ HDATE,
+ HUSER
+ )
+ VALUES (
+
+ NEW.ID,NEW.COUNTER,NEW.COUNTER_TYPE,NEW.INFO,NEW.CREATE_USER,NEW.CREATE_DATE,NEW.MOD_USER,NEW.MOD_DATE,
+
+ 1,
+ current_timestamp,
+ NEW.CREATE_USER );
+
+ RETURN NEW;
+ END;
+$BODY$
+ LANGUAGE plpgsql VOLATILE
+ COST 100;
+ALTER FUNCTION PUBLIC.TBL_ID_COUNTER_INSERT_TRG()
+ OWNER TO PLGM_SERVICE;
+
+
+DROP TRIGGER IF EXISTS TBL_ID_COUNTER_INSERT_TRG ON PUBLIC.TBL_ID_COUNTER;
+
+CREATE TRIGGER TBL_ID_COUNTER_INSERT_TRG
+ BEFORE INSERT
+ ON PUBLIC.TBL_ID_COUNTER
+ FOR EACH ROW
+ EXECUTE PROCEDURE PUBLIC.TBL_ID_COUNTER_INSERT_TRG();
+
+
+
+-- PUBLIC.TBL_ID_COUNTER UPDATE TRIGGER --
+-- <GENERATED CODE!>
+
+CREATE OR REPLACE FUNCTION PUBLIC.TBL_ID_COUNTER_UPDATE_TRG()
+ RETURNS trigger AS
+$BODY$
+ BEGIN
+ INSERT INTO HTBL_ID_COUNTER (
+ ID,COUNTER,COUNTER_TYPE,INFO,CREATE_USER,CREATE_DATE,MOD_USER,MOD_DATE,
+
+ HACTION,
+ HDATE,
+ HUSER
+ )
+ VALUES (
+ NEW.ID,NEW.COUNTER,NEW.COUNTER_TYPE,NEW.INFO,NEW.CREATE_USER,NEW.CREATE_DATE,NEW.MOD_USER,NEW.MOD_DATE,
+ 2,
+ current_timestamp,
+ NEW.MOD_USER
+ );
+
+ RETURN NEW;
+ END;
+$BODY$
+ LANGUAGE plpgsql VOLATILE
+ COST 100;
+ALTER FUNCTION PUBLIC.TBL_ID_COUNTER_UPDATE_TRG()
+ OWNER TO PLGM_SERVICE;
+
+DROP TRIGGER IF EXISTS TBL_ID_COUNTER_UPDATE_TRG ON PUBLIC.TBL_ID_COUNTER;
+
+CREATE TRIGGER TBL_ID_COUNTER_UPDATE_TRG
+ BEFORE UPDATE
+ ON PUBLIC.TBL_ID_COUNTER
+ FOR EACH ROW
+ EXECUTE PROCEDURE PUBLIC.TBL_ID_COUNTER_UPDATE_TRG();
+
+
+
+-- PUBLIC.TBL_ID_COUNTER DELETE TRIGGER --
+-- <GENERATED CODE!>
+
+CREATE OR REPLACE FUNCTION PUBLIC.TBL_ID_COUNTER_DELETE_TRG()
+ RETURNS trigger AS
+$BODY$
+ BEGIN
+ IF TG_OP = 'DELETE' THEN
+ INSERT INTO HTBL_ID_COUNTER (
+
+ ID,COUNTER,COUNTER_TYPE,INFO,CREATE_USER,CREATE_DATE,MOD_USER,MOD_DATE,
+
+ HACTION,
+ HDATE,
+ HUSER
+ )
+ VALUES (
+ OLD.ID,OLD.COUNTER,OLD.COUNTER_TYPE,OLD.INFO,OLD.CREATE_USER,OLD.CREATE_DATE,OLD.MOD_USER,OLD.MOD_DATE,
+
+ 3,
+ current_timestamp,
+ OLD.MOD_USER );
+ END IF;
+
+ RETURN OLD;
+ END;
+$BODY$
+ LANGUAGE plpgsql VOLATILE
+ COST 100;
+ALTER FUNCTION PUBLIC.TBL_ID_COUNTER_DELETE_TRG()
+ OWNER TO PLGM_SERVICE;
+
+DROP TRIGGER IF EXISTS TBL_ID_COUNTER_DELETE_TRG ON PUBLIC.TBL_ID_COUNTER;
+
+CREATE TRIGGER TBL_ID_COUNTER_DELETE_TRG
+ BEFORE DELETE
+ ON PUBLIC.TBL_ID_COUNTER
+ FOR EACH ROW
+ EXECUTE PROCEDURE PUBLIC.TBL_ID_COUNTER_DELETE_TRG();
+
+
+
+-- PUBLIC.TBL_SINGLE_GRIDMEASURE INSERT TRIGGER --
+-- <GENERATED CODE!>
+CREATE OR REPLACE FUNCTION PUBLIC.TBL_SINGLE_GRIDMEASURE_INSERT_TRG()
+ RETURNS trigger AS
+$BODY$
+ BEGIN
+ INSERT INTO HTBL_SINGLE_GRIDMEASURE (
+ ID,SORTORDER,TITLE,SWITCHING_OBJECT,CIM_ID,CIM_NAME,CIM_DESCRIPTION,PLANNED_STARTTIME_SINGLEMEASURE,PLANNED_ENDTIME_SINGLEMEASURE,DESCRIPTION, RESPONSIBLE_ONSITE_NAME, RESPONSIBLE_ONSITE_DEPARTMENT,NETWORK_CONTROL,FK_TBL_GRIDMEASURE,CREATE_USER,CREATE_DATE,MOD_USER,MOD_DATE,
+
+ HACTION,
+ HDATE,
+ HUSER
+ )
+ VALUES (
+
+ NEW.ID,NEW.SORTORDER,NEW.TITLE,NEW.SWITCHING_OBJECT,NEW.CIM_ID,NEW.CIM_NAME,NEW.CIM_DESCRIPTION,NEW.PLANNED_STARTTIME_SINGLEMEASURE,NEW.PLANNED_ENDTIME_SINGLEMEASURE,NEW.DESCRIPTION, NEW.RESPONSIBLE_ONSITE_NAME, NEW.RESPONSIBLE_ONSITE_DEPARTMENT,NEW.NETWORK_CONTROL,NEW.FK_TBL_GRIDMEASURE,NEW.CREATE_USER,NEW.CREATE_DATE,NEW.MOD_USER,NEW.MOD_DATE,
+
+ 1,
+ current_timestamp,
+ NEW.CREATE_USER );
+
+ RETURN NEW;
+ END;
+$BODY$
+ LANGUAGE plpgsql VOLATILE
+ COST 100;
+ALTER FUNCTION PUBLIC.TBL_SINGLE_GRIDMEASURE_INSERT_TRG()
+ OWNER TO PLGM_SERVICE;
+
+
+DROP TRIGGER IF EXISTS TBL_SINGLE_GRIDMEASURE_INSERT_TRG ON PUBLIC.TBL_SINGLE_GRIDMEASURE;
+
+CREATE TRIGGER TBL_SINGLE_GRIDMEASURE_INSERT_TRG
+ BEFORE INSERT
+ ON PUBLIC.TBL_SINGLE_GRIDMEASURE
+ FOR EACH ROW
+ EXECUTE PROCEDURE PUBLIC.TBL_SINGLE_GRIDMEASURE_INSERT_TRG();
+
+
+
+-- PUBLIC.TBL_SINGLE_GRIDMEASURE UPDATE TRIGGER --
+-- <GENERATED CODE!>
+
+CREATE OR REPLACE FUNCTION PUBLIC.TBL_SINGLE_GRIDMEASURE_UPDATE_TRG()
+ RETURNS trigger AS
+$BODY$
+ BEGIN
+ INSERT INTO HTBL_SINGLE_GRIDMEASURE (
+ ID,SORTORDER,TITLE,SWITCHING_OBJECT,CIM_ID,CIM_NAME,CIM_DESCRIPTION,PLANNED_STARTTIME_SINGLEMEASURE,PLANNED_ENDTIME_SINGLEMEASURE,DESCRIPTION,RESPONSIBLE_ONSITE_NAME, RESPONSIBLE_ONSITE_DEPARTMENT,NETWORK_CONTROL,FK_TBL_GRIDMEASURE,CREATE_USER,CREATE_DATE,MOD_USER,MOD_DATE,
+
+ HACTION,
+ HDATE,
+ HUSER
+ )
+ VALUES (
+ NEW.ID,NEW.SORTORDER,NEW.TITLE,NEW.SWITCHING_OBJECT,NEW.CIM_ID,NEW.CIM_NAME,NEW.CIM_DESCRIPTION,NEW.PLANNED_STARTTIME_SINGLEMEASURE,NEW.PLANNED_ENDTIME_SINGLEMEASURE,NEW.DESCRIPTION,NEW.RESPONSIBLE_ONSITE_NAME, NEW.RESPONSIBLE_ONSITE_DEPARTMENT,NEW.NETWORK_CONTROL,NEW.FK_TBL_GRIDMEASURE,NEW.CREATE_USER,NEW.CREATE_DATE,NEW.MOD_USER,NEW.MOD_DATE,
+ 2,
+ current_timestamp,
+ NEW.MOD_USER
+ );
+
+ RETURN NEW;
+ END;
+$BODY$
+ LANGUAGE plpgsql VOLATILE
+ COST 100;
+ALTER FUNCTION PUBLIC.TBL_SINGLE_GRIDMEASURE_UPDATE_TRG()
+ OWNER TO PLGM_SERVICE;
+
+DROP TRIGGER IF EXISTS TBL_SINGLE_GRIDMEASURE_UPDATE_TRG ON PUBLIC.TBL_SINGLE_GRIDMEASURE;
+
+CREATE TRIGGER TBL_SINGLE_GRIDMEASURE_UPDATE_TRG
+ BEFORE UPDATE
+ ON PUBLIC.TBL_SINGLE_GRIDMEASURE
+ FOR EACH ROW
+ EXECUTE PROCEDURE PUBLIC.TBL_SINGLE_GRIDMEASURE_UPDATE_TRG();
+
+
+
+-- PUBLIC.TBL_SINGLE_GRIDMEASURE DELETE TRIGGER --
+-- <GENERATED CODE!>
+
+CREATE OR REPLACE FUNCTION PUBLIC.TBL_SINGLE_GRIDMEASURE_DELETE_TRG()
+ RETURNS trigger AS
+$BODY$
+ BEGIN
+ IF TG_OP = 'DELETE' THEN
+ INSERT INTO HTBL_SINGLE_GRIDMEASURE (
+
+ ID,SORTORDER,TITLE,SWITCHING_OBJECT,CIM_ID,CIM_NAME,CIM_DESCRIPTION,PLANNED_STARTTIME_SINGLEMEASURE,PLANNED_ENDTIME_SINGLEMEASURE,DESCRIPTION,RESPONSIBLE_ONSITE_NAME, RESPONSIBLE_ONSITE_DEPARTMENT, NETWORK_CONTROL,FK_TBL_GRIDMEASURE,CREATE_USER,CREATE_DATE,MOD_USER,MOD_DATE,
+
+ HACTION,
+ HDATE,
+ HUSER
+ )
+ VALUES (
+ OLD.ID,OLD.SORTORDER,OLD.TITLE,OLD.SWITCHING_OBJECT,OLD.CIM_ID,OLD.CIM_NAME,OLD.CIM_DESCRIPTION,OLD.PLANNED_STARTTIME_SINGLEMEASURE,OLD.PLANNED_ENDTIME_SINGLEMEASURE,OLD.DESCRIPTION,OLD.RESPONSIBLE_ONSITE_NAME, OLD.RESPONSIBLE_ONSITE_DEPARTMENT,OLD.NETWORK_CONTROL,OLD.FK_TBL_GRIDMEASURE,OLD.CREATE_USER,OLD.CREATE_DATE,OLD.MOD_USER,OLD.MOD_DATE,
+
+ 3,
+ current_timestamp,
+ OLD.MOD_USER );
+ END IF;
+
+ RETURN OLD;
+ END;
+$BODY$
+ LANGUAGE plpgsql VOLATILE
+ COST 100;
+ALTER FUNCTION PUBLIC.TBL_SINGLE_GRIDMEASURE_DELETE_TRG()
+ OWNER TO PLGM_SERVICE;
+
+DROP TRIGGER IF EXISTS TBL_SINGLE_GRIDMEASURE_DELETE_TRG ON PUBLIC.TBL_SINGLE_GRIDMEASURE;
+
+CREATE TRIGGER TBL_SINGLE_GRIDMEASURE_DELETE_TRG
+ BEFORE DELETE
+ ON PUBLIC.TBL_SINGLE_GRIDMEASURE
+ FOR EACH ROW
+ EXECUTE PROCEDURE PUBLIC.TBL_SINGLE_GRIDMEASURE_DELETE_TRG();
+
+
+
+
+
+-- PUBLIC.TBL_STEPS INSERT TRIGGER --
+-- <GENERATED CODE!>
+CREATE OR REPLACE FUNCTION PUBLIC.TBL_STEPS_INSERT_TRG()
+ RETURNS trigger AS
+$BODY$
+ BEGIN
+ INSERT INTO HTBL_STEPS (
+ ID,SORTORDER,SWITCHING_OBJECT,TYPE,PRESENT_TIME, PRESENT_STATE, TARGET_STATE, OPERATOR, FK_TBL_SINGLE_GRIDMEASURE,CREATE_USER,CREATE_DATE,MOD_USER,MOD_DATE,
+
+ HACTION,
+ HDATE,
+ HUSER
+ )
+ VALUES (
+
+ NEW.ID,NEW.SORTORDER,NEW.SWITCHING_OBJECT,NEW.TYPE, NEW.PRESENT_TIME, NEW.PRESENT_STATE, NEW.TARGET_STATE, NEW.OPERATOR, NEW.FK_TBL_SINGLE_GRIDMEASURE,NEW.CREATE_USER,NEW.CREATE_DATE,NEW.MOD_USER,NEW.MOD_DATE,
+
+ 1,
+ current_timestamp,
+ NEW.CREATE_USER );
+
+ RETURN NEW;
+ END;
+$BODY$
+ LANGUAGE plpgsql VOLATILE
+ COST 100;
+ALTER FUNCTION PUBLIC.TBL_STEPS_INSERT_TRG()
+ OWNER TO PLGM_SERVICE;
+
+DROP TRIGGER IF EXISTS TBL_STEPS_INSERT_TRG ON PUBLIC.TBL_STEPS;
+
+CREATE TRIGGER TBL_STEPS_INSERT_TRG
+ BEFORE INSERT
+ ON PUBLIC.TBL_STEPS
+ FOR EACH ROW
+ EXECUTE PROCEDURE PUBLIC.TBL_STEPS_INSERT_TRG();
+
+
+
+-- PUBLIC.TBL_STEPS UPDATE TRIGGER --
+-- <GENERATED CODE!>
+
+CREATE OR REPLACE FUNCTION PUBLIC.TBL_STEPS_UPDATE_TRG()
+ RETURNS trigger AS
+$BODY$
+ BEGIN
+ INSERT INTO HTBL_STEPS (
+ ID,SORTORDER,SWITCHING_OBJECT,TYPE,PRESENT_TIME, PRESENT_STATE, TARGET_STATE, OPERATOR,FK_TBL_SINGLE_GRIDMEASURE,CREATE_USER,CREATE_DATE,MOD_USER,MOD_DATE,
+
+ HACTION,
+ HDATE,
+ HUSER
+ )
+ VALUES (
+ NEW.ID,NEW.SORTORDER,NEW.SWITCHING_OBJECT,NEW.TYPE,NEW.PRESENT_TIME, NEW.PRESENT_STATE, NEW.TARGET_STATE, NEW.OPERATOR,NEW.FK_TBL_SINGLE_GRIDMEASURE,NEW.CREATE_USER,NEW.CREATE_DATE,NEW.MOD_USER,NEW.MOD_DATE,
+ 2,
+ current_timestamp,
+ NEW.MOD_USER
+ );
+
+ RETURN NEW;
+ END;
+$BODY$
+ LANGUAGE plpgsql VOLATILE
+ COST 100;
+ALTER FUNCTION PUBLIC.TBL_STEPS_UPDATE_TRG()
+ OWNER TO PLGM_SERVICE;
+
+DROP TRIGGER IF EXISTS TBL_STEPS_UPDATE_TRG ON PUBLIC.TBL_STEPS;
+
+CREATE TRIGGER TBL_STEPS_UPDATE_TRG
+ BEFORE UPDATE
+ ON PUBLIC.TBL_STEPS
+ FOR EACH ROW
+ EXECUTE PROCEDURE PUBLIC.TBL_STEPS_UPDATE_TRG();
+
+
+
+-- PUBLIC.TBL_STEPS DELETE TRIGGER --
+-- <GENERATED CODE!>
+
+CREATE OR REPLACE FUNCTION PUBLIC.TBL_STEPS_DELETE_TRG()
+ RETURNS trigger AS
+$BODY$
+ BEGIN
+ IF TG_OP = 'DELETE' THEN
+ INSERT INTO HTBL_STEPS (
+
+ ID,SORTORDER,SWITCHING_OBJECT,TYPE,PRESENT_TIME, PRESENT_STATE, TARGET_STATE, OPERATOR,FK_TBL_SINGLE_GRIDMEASURE,CREATE_USER,CREATE_DATE,MOD_USER,MOD_DATE,
+
+ HACTION,
+ HDATE,
+ HUSER
+ )
+ VALUES (
+ OLD.ID,OLD.SORTORDER,OLD.SWITCHING_OBJECT,OLD.TYPE,OLD.PRESENT_TIME, OLD.PRESENT_STATE, OLD.TARGET_STATE, OLD.OPERATOR,OLD.FK_TBL_SINGLE_GRIDMEASURE,OLD.CREATE_USER,OLD.CREATE_DATE,OLD.MOD_USER,OLD.MOD_DATE,
+
+ 3,
+ current_timestamp,
+ OLD.MOD_USER );
+ END IF;
+
+ RETURN OLD;
+ END;
+$BODY$
+ LANGUAGE plpgsql VOLATILE
+ COST 100;
+ALTER FUNCTION PUBLIC.TBL_STEPS_DELETE_TRG()
+ OWNER TO PLGM_SERVICE;
+
+DROP TRIGGER IF EXISTS TBL_STEPS_DELETE_TRG ON PUBLIC.TBL_STEPS;
+
+CREATE TRIGGER TBL_STEPS_DELETE_TRG
+ BEFORE DELETE
+ ON PUBLIC.TBL_STEPS
+ FOR EACH ROW
+ EXECUTE PROCEDURE PUBLIC.TBL_STEPS_DELETE_TRG();
+
+
+-- PUBLIC.TBL_LOCK INSERT TRIGGER --
+-- <GENERATED CODE!>
+CREATE OR REPLACE FUNCTION PUBLIC.TBL_LOCK_INSERT_TRG()
+ RETURNS trigger AS
+$BODY$
+ BEGIN
+ INSERT INTO HTBL_LOCK (
+ ID,KEY,USERNAME,INFO,CREATE_USER,CREATE_DATE,MOD_USER,MOD_DATE,
+
+ HACTION,
+ HDATE,
+ HUSER
+ )
+ VALUES (
+
+ NEW.ID,NEW.KEY,NEW.USERNAME,NEW.INFO,NEW.CREATE_USER,NEW.CREATE_DATE,NEW.MOD_USER,NEW.MOD_DATE,
+
+ 1,
+ current_timestamp,
+ NEW.CREATE_USER );
+
+ RETURN NEW;
+ END;
+$BODY$
+ LANGUAGE plpgsql VOLATILE
+ COST 100;
+ALTER FUNCTION PUBLIC.TBL_LOCK_INSERT_TRG()
+ OWNER TO PLGM_SERVICE;
+
+
+DROP TRIGGER IF EXISTS TBL_LOCK_INSERT_TRG ON PUBLIC.TBL_LOCK;
+
+CREATE TRIGGER TBL_LOCK_INSERT_TRG
+ BEFORE INSERT
+ ON PUBLIC.TBL_LOCK
+ FOR EACH ROW
+ EXECUTE PROCEDURE PUBLIC.TBL_LOCK_INSERT_TRG();
+
+
+
+-- PUBLIC.TBL_LOCK UPDATE TRIGGER --
+-- <GENERATED CODE!>
+
+CREATE OR REPLACE FUNCTION PUBLIC.TBL_LOCK_UPDATE_TRG()
+ RETURNS trigger AS
+$BODY$
+ BEGIN
+ INSERT INTO HTBL_LOCK (
+ ID,KEY,USERNAME,INFO,CREATE_USER,CREATE_DATE,MOD_USER,MOD_DATE,
+
+ HACTION,
+ HDATE,
+ HUSER
+ )
+ VALUES (
+ NEW.ID,NEW.KEY,NEW.USERNAME,NEW.INFO,NEW.CREATE_USER,NEW.CREATE_DATE,NEW.MOD_USER,NEW.MOD_DATE,
+ 2,
+ current_timestamp,
+ NEW.MOD_USER
+ );
+
+ RETURN NEW;
+ END;
+$BODY$
+ LANGUAGE plpgsql VOLATILE
+ COST 100;
+ALTER FUNCTION PUBLIC.TBL_LOCK_UPDATE_TRG()
+ OWNER TO PLGM_SERVICE;
+
+DROP TRIGGER IF EXISTS TBL_LOCK_UPDATE_TRG ON PUBLIC.TBL_LOCK;
+
+CREATE TRIGGER TBL_LOCK_UPDATE_TRG
+ BEFORE UPDATE
+ ON PUBLIC.TBL_LOCK
+ FOR EACH ROW
+ EXECUTE PROCEDURE PUBLIC.TBL_LOCK_UPDATE_TRG();
+
+
+
+-- PUBLIC.TBL_LOCK DELETE TRIGGER --
+-- <GENERATED CODE!>
+
+CREATE OR REPLACE FUNCTION PUBLIC.TBL_LOCK_DELETE_TRG()
+ RETURNS trigger AS
+$BODY$
+ BEGIN
+ IF TG_OP = 'DELETE' THEN
+ INSERT INTO HTBL_LOCK (
+
+ ID,KEY,USERNAME,INFO,CREATE_USER,CREATE_DATE,MOD_USER,MOD_DATE,
+
+ HACTION,
+ HDATE,
+ HUSER
+ )
+ VALUES (
+ OLD.ID,OLD.KEY,OLD.USERNAME,OLD.INFO,OLD.CREATE_USER,OLD.CREATE_DATE,OLD.MOD_USER,OLD.MOD_DATE,
+
+ 3,
+ current_timestamp,
+ OLD.MOD_USER );
+ END IF;
+
+ RETURN OLD;
+ END;
+$BODY$
+ LANGUAGE plpgsql VOLATILE
+ COST 100;
+ALTER FUNCTION PUBLIC.TBL_LOCK_DELETE_TRG()
+ OWNER TO PLGM_SERVICE;
+
+DROP TRIGGER IF EXISTS TBL_LOCK_DELETE_TRG ON PUBLIC.TBL_LOCK;
+
+CREATE TRIGGER TBL_LOCK_DELETE_TRG
+ BEFORE DELETE
+ ON PUBLIC.TBL_LOCK
+ FOR EACH ROW
+ EXECUTE PROCEDURE PUBLIC.TBL_LOCK_DELETE_TRG();
+
+
+
+
+-- PUBLIC.TBL_USER_SETTINGS INSERT TRIGGER --
+-- <GENERATED CODE!>
+CREATE OR REPLACE FUNCTION PUBLIC.TBL_USER_SETTINGS_INSERT_TRG()
+ RETURNS trigger AS
+$BODY$
+ BEGIN
+ INSERT INTO HTBL_USER_SETTINGS (
+ ID,USERNAME,SETTING_TYPE,VALUE,CREATE_USER,CREATE_DATE,MOD_USER,MOD_DATE,
+
+ HACTION,
+ HDATE,
+ HUSER
+ )
+ VALUES (
+
+ NEW.ID,NEW.USERNAME,NEW.SETTING_TYPE,NEW.VALUE,NEW.CREATE_USER,NEW.CREATE_DATE,NEW.MOD_USER,NEW.MOD_DATE,
+
+ 1,
+ current_timestamp,
+ NEW.CREATE_USER );
+
+ RETURN NEW;
+ END;
+$BODY$
+ LANGUAGE plpgsql VOLATILE
+ COST 100;
+ALTER FUNCTION PUBLIC.TBL_USER_SETTINGS_INSERT_TRG()
+ OWNER TO PLGM_SERVICE;
+
+
+DROP TRIGGER IF EXISTS TBL_USER_SETTINGS_INSERT_TRG ON PUBLIC.TBL_USER_SETTINGS;
+
+CREATE TRIGGER TBL_USER_SETTINGS_INSERT_TRG
+ BEFORE INSERT
+ ON PUBLIC.TBL_USER_SETTINGS
+ FOR EACH ROW
+ EXECUTE PROCEDURE PUBLIC.TBL_USER_SETTINGS_INSERT_TRG();
+
+
+
+-- PUBLIC.TBL_USER_SETTINGS UPDATE TRIGGER --
+-- <GENERATED CODE!>
+
+CREATE OR REPLACE FUNCTION PUBLIC.TBL_USER_SETTINGS_UPDATE_TRG()
+ RETURNS trigger AS
+$BODY$
+ BEGIN
+ INSERT INTO HTBL_USER_SETTINGS (
+ ID,USERNAME,SETTING_TYPE,VALUE,CREATE_USER,CREATE_DATE,MOD_USER,MOD_DATE,
+
+ HACTION,
+ HDATE,
+ HUSER
+ )
+ VALUES (
+ NEW.ID,NEW.USERNAME,NEW.SETTING_TYPE,NEW.VALUE,NEW.CREATE_USER,NEW.CREATE_DATE,NEW.MOD_USER,NEW.MOD_DATE,
+ 2,
+ current_timestamp,
+ NEW.MOD_USER
+ );
+
+ RETURN NEW;
+ END;
+$BODY$
+ LANGUAGE plpgsql VOLATILE
+ COST 100;
+ALTER FUNCTION PUBLIC.TBL_USER_SETTINGS_UPDATE_TRG()
+ OWNER TO PLGM_SERVICE;
+
+DROP TRIGGER IF EXISTS TBL_USER_SETTINGS_UPDATE_TRG ON PUBLIC.TBL_USER_SETTINGS;
+
+CREATE TRIGGER TBL_USER_SETTINGS_UPDATE_TRG
+ BEFORE UPDATE
+ ON PUBLIC.TBL_USER_SETTINGS
+ FOR EACH ROW
+ EXECUTE PROCEDURE PUBLIC.TBL_USER_SETTINGS_UPDATE_TRG();
+
+
+
+-- PUBLIC.TBL_USER_SETTINGS DELETE TRIGGER --
+-- <GENERATED CODE!>
+
+CREATE OR REPLACE FUNCTION PUBLIC.TBL_USER_SETTINGS_DELETE_TRG()
+ RETURNS trigger AS
+$BODY$
+ BEGIN
+ IF TG_OP = 'DELETE' THEN
+ INSERT INTO HTBL_USER_SETTINGS (
+
+ ID,USERNAME,SETTING_TYPE,VALUE,CREATE_USER,CREATE_DATE,MOD_USER,MOD_DATE,
+
+ HACTION,
+ HDATE,
+ HUSER
+ )
+ VALUES (
+ OLD.ID,OLD.USERNAME,OLD.SETTING_TYPE,OLD.VALUE,OLD.CREATE_USER,OLD.CREATE_DATE,OLD.MOD_USER,OLD.MOD_DATE,
+
+ 3,
+ current_timestamp,
+ OLD.MOD_USER );
+ END IF;
+
+ RETURN OLD;
+ END;
+$BODY$
+ LANGUAGE plpgsql VOLATILE
+ COST 100;
+ALTER FUNCTION PUBLIC.TBL_USER_SETTINGS_DELETE_TRG()
+ OWNER TO PLGM_SERVICE;
+
+DROP TRIGGER IF EXISTS TBL_USER_SETTINGS_DELETE_TRG ON PUBLIC.TBL_USER_SETTINGS;
+
+CREATE TRIGGER TBL_USER_SETTINGS_DELETE_TRG
+ BEFORE DELETE
+ ON PUBLIC.TBL_USER_SETTINGS
+ FOR EACH ROW
+ EXECUTE PROCEDURE PUBLIC.TBL_USER_SETTINGS_DELETE_TRG();
+
+
+-- PUBLIC.HREF_COST_CENTER INSERT TRIGGER --
+-- <GENERATED CODE!>
+CREATE OR REPLACE FUNCTION PUBLIC.HREF_COST_CENTER_INSERT_TRG()
+ RETURNS trigger AS
+$BODY$
+ BEGIN
+ INSERT INTO HHREF_COST_CENTER (
+ HID,HACTION,HDATE,HUSER,ID,NAME,DESCRIPTION,CREATE_USER,CREATE_DATE,MOD_USER,MOD_DATE,
+
+ HACTION,
+ HDATE,
+ HUSER
+ )
+ VALUES (
+
+ NEW.HID,NEW.HACTION,NEW.HDATE,NEW.HUSER,NEW.ID,NEW.NAME,NEW.DESCRIPTION,NEW.CREATE_USER,NEW.CREATE_DATE,NEW.MOD_USER,NEW.MOD_DATE,
+
+ 1,
+ current_timestamp,
+ NEW.CREATE_USER );
+
+ RETURN NEW;
+ END;
+$BODY$
+ LANGUAGE plpgsql VOLATILE
+ COST 100;
+ALTER FUNCTION PUBLIC.HREF_COST_CENTER_INSERT_TRG()
+ OWNER TO PLGM_SERVICE;
+
+
+DROP TRIGGER IF EXISTS HREF_COST_CENTER_INSERT_TRG ON PUBLIC.HREF_COST_CENTER;
+
+CREATE TRIGGER HREF_COST_CENTER_INSERT_TRG
+ BEFORE INSERT
+ ON PUBLIC.HREF_COST_CENTER
+ FOR EACH ROW
+ EXECUTE PROCEDURE PUBLIC.HREF_COST_CENTER_INSERT_TRG();
+
+
+
+-- PUBLIC.HREF_COST_CENTER UPDATE TRIGGER --
+-- <GENERATED CODE!>
+
+CREATE OR REPLACE FUNCTION PUBLIC.HREF_COST_CENTER_UPDATE_TRG()
+ RETURNS trigger AS
+$BODY$
+ BEGIN
+ INSERT INTO HHREF_COST_CENTER (
+ HID,HACTION,HDATE,HUSER,ID,NAME,DESCRIPTION,CREATE_USER,CREATE_DATE,MOD_USER,MOD_DATE,
+
+ HACTION,
+ HDATE,
+ HUSER
+ )
+ VALUES (
+ NEW.HID,NEW.HACTION,NEW.HDATE,NEW.HUSER,NEW.ID,NEW.NAME,NEW.DESCRIPTION,NEW.CREATE_USER,NEW.CREATE_DATE,NEW.MOD_USER,NEW.MOD_DATE,
+ 2,
+ current_timestamp,
+ NEW.MOD_USER
+ );
+
+ RETURN NEW;
+ END;
+$BODY$
+ LANGUAGE plpgsql VOLATILE
+ COST 100;
+ALTER FUNCTION PUBLIC.HREF_COST_CENTER_UPDATE_TRG()
+ OWNER TO PLGM_SERVICE;
+
+DROP TRIGGER IF EXISTS HREF_COST_CENTER_UPDATE_TRG ON PUBLIC.HREF_COST_CENTER;
+
+CREATE TRIGGER HREF_COST_CENTER_UPDATE_TRG
+ BEFORE UPDATE
+ ON PUBLIC.HREF_COST_CENTER
+ FOR EACH ROW
+ EXECUTE PROCEDURE PUBLIC.HREF_COST_CENTER_UPDATE_TRG();
+
+
+
+-- PUBLIC.HREF_COST_CENTER DELETE TRIGGER --
+-- <GENERATED CODE!>
+
+CREATE OR REPLACE FUNCTION PUBLIC.HREF_COST_CENTER_DELETE_TRG()
+ RETURNS trigger AS
+$BODY$
+ BEGIN
+ IF TG_OP = 'DELETE' THEN
+ INSERT INTO HHREF_COST_CENTER (
+
+ HID,HACTION,HDATE,HUSER,ID,NAME,DESCRIPTION,CREATE_USER,CREATE_DATE,MOD_USER,MOD_DATE,
+
+ HACTION,
+ HDATE,
+ HUSER
+ )
+ VALUES (
+ OLD.HID,OLD.HACTION,OLD.HDATE,OLD.HUSER,OLD.ID,OLD.NAME,OLD.DESCRIPTION,OLD.CREATE_USER,OLD.CREATE_DATE,OLD.MOD_USER,OLD.MOD_DATE,
+
+ 3,
+ current_timestamp,
+ OLD.MOD_USER );
+ END IF;
+
+ RETURN OLD;
+ END;
+$BODY$
+ LANGUAGE plpgsql VOLATILE
+ COST 100;
+ALTER FUNCTION PUBLIC.HREF_COST_CENTER_DELETE_TRG()
+ OWNER TO PLGM_SERVICE;
+
+DROP TRIGGER IF EXISTS HREF_COST_CENTER_DELETE_TRG ON PUBLIC.HREF_COST_CENTER;
+
+CREATE TRIGGER HREF_COST_CENTER_DELETE_TRG
+ BEFORE DELETE
+ ON PUBLIC.HREF_COST_CENTER
+ FOR EACH ROW
+ EXECUTE PROCEDURE PUBLIC.HREF_COST_CENTER_DELETE_TRG();
+
+
+
+-- PUBLIC.REF_BRANCH INSERT TRIGGER --
+-- <GENERATED CODE!>
+CREATE OR REPLACE FUNCTION PUBLIC.REF_BRANCH_INSERT_TRG()
+ RETURNS trigger AS
+$BODY$
+ BEGIN
+ INSERT INTO HREF_BRANCH (
+
+ ID,NAME,DESCRIPTION,COLOR_CODE,CREATE_USER,CREATE_DATE,MOD_USER,MOD_DATE,
+
+ HACTION,
+ HDATE,
+ HUSER
+ )
+ VALUES (
+
+ NEW.ID,NEW.NAME,NEW.DESCRIPTION,NEW.COLOR_CODE,NEW.CREATE_USER,NEW.CREATE_DATE,NEW.MOD_USER,NEW.MOD_DATE,
+ 1,
+ current_timestamp,
+ NEW.CREATE_USER );
+
+ RETURN NEW;
+ END;
+$BODY$
+ LANGUAGE plpgsql VOLATILE
+ COST 100;
+ALTER FUNCTION PUBLIC.REF_BRANCH_INSERT_TRG()
+ OWNER TO PLGM_SERVICE;
+
+
+DROP TRIGGER IF EXISTS REF_BRANCH_INSERT_TRG ON PUBLIC.REF_BRANCH;
+
+CREATE TRIGGER REF_BRANCH_INSERT_TRG
+ BEFORE INSERT
+ ON PUBLIC.REF_BRANCH
+ FOR EACH ROW
+ EXECUTE PROCEDURE PUBLIC.REF_BRANCH_INSERT_TRG();
+
+
+
+-- PUBLIC.REF_BRANCH UPDATE TRIGGER --
+-- <GENERATED CODE!>
+
+CREATE OR REPLACE FUNCTION PUBLIC.REF_BRANCH_UPDATE_TRG()
+ RETURNS trigger AS
+$BODY$
+ BEGIN
+ INSERT INTO HREF_BRANCH (
+ ID,NAME,DESCRIPTION,COLOR_CODE,CREATE_USER,CREATE_DATE,MOD_USER,MOD_DATE,
+
+ HACTION,
+ HDATE,
+ HUSER
+ )
+ VALUES (
+ NEW.ID,NEW.NAME,NEW.DESCRIPTION,NEW.COLOR_CODE,NEW.CREATE_USER,NEW.CREATE_DATE,NEW.MOD_USER,NEW.MOD_DATE,
+ 2,
+ current_timestamp,
+ NEW.MOD_USER
+ );
+
+ RETURN NEW;
+ END;
+$BODY$
+ LANGUAGE plpgsql VOLATILE
+ COST 100;
+ALTER FUNCTION PUBLIC.REF_BRANCH_UPDATE_TRG()
+ OWNER TO PLGM_SERVICE;
+
+DROP TRIGGER IF EXISTS REF_BRANCH_UPDATE_TRG ON PUBLIC.REF_BRANCH;
+
+CREATE TRIGGER REF_BRANCH_UPDATE_TRG
+ BEFORE UPDATE
+ ON PUBLIC.REF_BRANCH
+ FOR EACH ROW
+ EXECUTE PROCEDURE PUBLIC.REF_BRANCH_UPDATE_TRG();
+
+
+
+-- PUBLIC.REF_BRANCH DELETE TRIGGER --
+-- <GENERATED CODE!>
+
+CREATE OR REPLACE FUNCTION PUBLIC.REF_BRANCH_DELETE_TRG()
+ RETURNS trigger AS
+$BODY$
+ BEGIN
+ IF TG_OP = 'DELETE' THEN
+ INSERT INTO HREF_BRANCH (
+ ID,NAME,DESCRIPTION,COLOR_CODE,CREATE_USER,CREATE_DATE,MOD_USER,MOD_DATE,
+ HACTION,
+ HDATE,
+ HUSER
+ )
+ VALUES (
+ OLD.ID,OLD.NAME,OLD.DESCRIPTION,OLD.COLOR_CODE,OLD.CREATE_USER,OLD.CREATE_DATE,OLD.MOD_USER,OLD.MOD_DATE,
+ 3,
+ current_timestamp,
+ OLD.MOD_USER );
+ END IF;
+
+ RETURN OLD;
+ END;
+$BODY$
+ LANGUAGE plpgsql VOLATILE
+ COST 100;
+ALTER FUNCTION PUBLIC.REF_BRANCH_DELETE_TRG()
+ OWNER TO PLGM_SERVICE;
+
+DROP TRIGGER IF EXISTS REF_BRANCH_DELETE_TRG ON PUBLIC.REF_BRANCH;
+
+CREATE TRIGGER REF_BRANCH_DELETE_TRG
+ BEFORE DELETE
+ ON PUBLIC.REF_BRANCH
+ FOR EACH ROW
+ EXECUTE PROCEDURE PUBLIC.REF_BRANCH_DELETE_TRG();
+
+
+
+-- PUBLIC.REF_BRANCH_LEVEL INSERT TRIGGER --
+-- <GENERATED CODE!>
+CREATE OR REPLACE FUNCTION PUBLIC.REF_BRANCH_LEVEL_INSERT_TRG()
+ RETURNS trigger AS
+$BODY$
+ BEGIN
+ INSERT INTO HREF_BRANCH_LEVEL (
+ ID,NAME,DESCRIPTION,FK_REF_BRANCH,CREATE_USER,CREATE_DATE,MOD_USER,MOD_DATE,
+
+ HACTION,
+ HDATE,
+ HUSER
+ )
+ VALUES (
+
+ NEW.ID,NEW.NAME,NEW.DESCRIPTION,NEW.FK_REF_BRANCH,NEW.CREATE_USER,NEW.CREATE_DATE,NEW.MOD_USER,NEW.MOD_DATE,
+
+ 1,
+ current_timestamp,
+ NEW.CREATE_USER );
+
+ RETURN NEW;
+ END;
+$BODY$
+ LANGUAGE plpgsql VOLATILE
+ COST 100;
+ALTER FUNCTION PUBLIC.REF_BRANCH_LEVEL_INSERT_TRG()
+ OWNER TO PLGM_SERVICE;
+
+
+DROP TRIGGER IF EXISTS REF_BRANCH_LEVEL_INSERT_TRG ON PUBLIC.REF_BRANCH_LEVEL;
+
+CREATE TRIGGER REF_BRANCH_LEVEL_INSERT_TRG
+ BEFORE INSERT
+ ON PUBLIC.REF_BRANCH_LEVEL
+ FOR EACH ROW
+ EXECUTE PROCEDURE PUBLIC.REF_BRANCH_LEVEL_INSERT_TRG();
+
+
+
+-- PUBLIC.REF_BRANCH_LEVEL UPDATE TRIGGER --
+-- <GENERATED CODE!>
+
+CREATE OR REPLACE FUNCTION PUBLIC.REF_BRANCH_LEVEL_UPDATE_TRG()
+ RETURNS trigger AS
+$BODY$
+ BEGIN
+ INSERT INTO HREF_BRANCH_LEVEL (
+ ID,NAME,DESCRIPTION,FK_REF_BRANCH,CREATE_USER,CREATE_DATE,MOD_USER,MOD_DATE,
+
+ HACTION,
+ HDATE,
+ HUSER
+ )
+ VALUES (
+ NEW.ID,NEW.NAME,NEW.DESCRIPTION,NEW.FK_REF_BRANCH,NEW.CREATE_USER,NEW.CREATE_DATE,NEW.MOD_USER,NEW.MOD_DATE,
+ 2,
+ current_timestamp,
+ NEW.MOD_USER
+ );
+
+ RETURN NEW;
+ END;
+$BODY$
+ LANGUAGE plpgsql VOLATILE
+ COST 100;
+ALTER FUNCTION PUBLIC.REF_BRANCH_LEVEL_UPDATE_TRG()
+ OWNER TO PLGM_SERVICE;
+
+DROP TRIGGER IF EXISTS REF_BRANCH_LEVEL_UPDATE_TRG ON PUBLIC.REF_BRANCH_LEVEL;
+
+CREATE TRIGGER REF_BRANCH_LEVEL_UPDATE_TRG
+ BEFORE UPDATE
+ ON PUBLIC.REF_BRANCH_LEVEL
+ FOR EACH ROW
+ EXECUTE PROCEDURE PUBLIC.REF_BRANCH_LEVEL_UPDATE_TRG();
+
+
+
+-- PUBLIC.REF_BRANCH_LEVEL DELETE TRIGGER --
+-- <GENERATED CODE!>
+
+CREATE OR REPLACE FUNCTION PUBLIC.REF_BRANCH_LEVEL_DELETE_TRG()
+ RETURNS trigger AS
+$BODY$
+ BEGIN
+ IF TG_OP = 'DELETE' THEN
+ INSERT INTO HREF_BRANCH_LEVEL (
+
+ ID,NAME,DESCRIPTION,FK_REF_BRANCH,CREATE_USER,CREATE_DATE,MOD_USER,MOD_DATE,
+
+ HACTION,
+ HDATE,
+ HUSER
+ )
+ VALUES (
+ OLD.ID,OLD.NAME,OLD.DESCRIPTION,OLD.FK_REF_BRANCH,OLD.CREATE_USER,OLD.CREATE_DATE,OLD.MOD_USER,OLD.MOD_DATE,
+
+ 3,
+ current_timestamp,
+ OLD.MOD_USER );
+ END IF;
+
+ RETURN OLD;
+ END;
+$BODY$
+ LANGUAGE plpgsql VOLATILE
+ COST 100;
+ALTER FUNCTION PUBLIC.REF_BRANCH_LEVEL_DELETE_TRG()
+ OWNER TO PLGM_SERVICE;
+
+DROP TRIGGER IF EXISTS REF_BRANCH_LEVEL_DELETE_TRG ON PUBLIC.REF_BRANCH_LEVEL;
+
+CREATE TRIGGER REF_BRANCH_LEVEL_DELETE_TRG
+ BEFORE DELETE
+ ON PUBLIC.REF_BRANCH_LEVEL
+ FOR EACH ROW
+ EXECUTE PROCEDURE PUBLIC.REF_BRANCH_LEVEL_DELETE_TRG();
+
+
+
+
+
+-- PUBLIC.REF_GM_STATUS INSERT TRIGGER --
+-- <GENERATED CODE!>
+CREATE OR REPLACE FUNCTION PUBLIC.REF_GM_STATUS_INSERT_TRG()
+ RETURNS trigger AS
+$BODY$
+ BEGIN
+ INSERT INTO HREF_GM_STATUS (
+ ID,NAME,COLOR_CODE,CREATE_USER,CREATE_DATE,MOD_USER,MOD_DATE,
+
+ HACTION,
+ HDATE,
+ HUSER
+ )
+ VALUES (
+
+ NEW.ID,NEW.NAME,NEW.COLOR_CODE,NEW.CREATE_USER,NEW.CREATE_DATE,NEW.MOD_USER,NEW.MOD_DATE,
+
+ 1,
+ current_timestamp,
+ NEW.CREATE_USER );
+
+ RETURN NEW;
+ END;
+$BODY$
+ LANGUAGE plpgsql VOLATILE
+ COST 100;
+ALTER FUNCTION PUBLIC.REF_GM_STATUS_INSERT_TRG()
+ OWNER TO PLGM_SERVICE;
+
+
+DROP TRIGGER IF EXISTS REF_GM_STATUS_INSERT_TRG ON PUBLIC.REF_GM_STATUS;
+
+CREATE TRIGGER REF_GM_STATUS_INSERT_TRG
+ BEFORE INSERT
+ ON PUBLIC.REF_GM_STATUS
+ FOR EACH ROW
+ EXECUTE PROCEDURE PUBLIC.REF_GM_STATUS_INSERT_TRG();
+
+
+
+-- PUBLIC.REF_GM_STATUS UPDATE TRIGGER --
+-- <GENERATED CODE!>
+
+CREATE OR REPLACE FUNCTION PUBLIC.REF_GM_STATUS_UPDATE_TRG()
+ RETURNS trigger AS
+$BODY$
+ BEGIN
+ INSERT INTO HREF_GM_STATUS (
+ ID,NAME,COLOR_CODE,CREATE_USER,CREATE_DATE,MOD_USER,MOD_DATE,
+
+ HACTION,
+ HDATE,
+ HUSER
+ )
+ VALUES (
+ NEW.ID,NEW.NAME,NEW.COLOR_CODE,NEW.CREATE_USER,NEW.CREATE_DATE,NEW.MOD_USER,NEW.MOD_DATE,
+ 2,
+ current_timestamp,
+ NEW.MOD_USER
+ );
+
+ RETURN NEW;
+ END;
+$BODY$
+ LANGUAGE plpgsql VOLATILE
+ COST 100;
+ALTER FUNCTION PUBLIC.REF_GM_STATUS_UPDATE_TRG()
+ OWNER TO PLGM_SERVICE;
+
+DROP TRIGGER IF EXISTS REF_GM_STATUS_UPDATE_TRG ON PUBLIC.REF_GM_STATUS;
+
+CREATE TRIGGER REF_GM_STATUS_UPDATE_TRG
+ BEFORE UPDATE
+ ON PUBLIC.REF_GM_STATUS
+ FOR EACH ROW
+ EXECUTE PROCEDURE PUBLIC.REF_GM_STATUS_UPDATE_TRG();
+
+
+
+-- PUBLIC.REF_GM_STATUS DELETE TRIGGER --
+-- <GENERATED CODE!>
+
+CREATE OR REPLACE FUNCTION PUBLIC.REF_GM_STATUS_DELETE_TRG()
+ RETURNS trigger AS
+$BODY$
+ BEGIN
+ IF TG_OP = 'DELETE' THEN
+ INSERT INTO HREF_GM_STATUS (
+
+ ID,NAME,COLOR_CODE,CREATE_USER,CREATE_DATE,MOD_USER,MOD_DATE,
+
+ HACTION,
+ HDATE,
+ HUSER
+ )
+ VALUES (
+ OLD.ID,OLD.NAME,OLD.COLOR_CODE,OLD.CREATE_USER,OLD.CREATE_DATE,OLD.MOD_USER,OLD.MOD_DATE,
+
+ 3,
+ current_timestamp,
+ OLD.MOD_USER );
+ END IF;
+
+ RETURN OLD;
+ END;
+$BODY$
+ LANGUAGE plpgsql VOLATILE
+ COST 100;
+ALTER FUNCTION PUBLIC.REF_GM_STATUS_DELETE_TRG()
+ OWNER TO PLGM_SERVICE;
+
+DROP TRIGGER IF EXISTS REF_GM_STATUS_DELETE_TRG ON PUBLIC.REF_GM_STATUS;
+
+CREATE TRIGGER REF_GM_STATUS_DELETE_TRG
+ BEFORE DELETE
+ ON PUBLIC.REF_GM_STATUS
+ FOR EACH ROW
+ EXECUTE PROCEDURE PUBLIC.REF_GM_STATUS_DELETE_TRG();
+
+
+
+-- PUBLIC.TBL_GRIDMEASURE INSERT TRIGGER --
+-- <GENERATED CODE!>
+CREATE OR REPLACE FUNCTION PUBLIC.TBL_GRIDMEASURE_INSERT_TRG()
+ RETURNS trigger AS
+$BODY$
+ BEGIN
+ INSERT INTO HTBL_GRIDMEASURE (
+ ID,ID_DESCRIPTIVE,TITLE,AFFECTED_RESOURCE,REMARK,EMAIL_ADDRESSES,FK_REF_GM_STATUS,SWITCHING_OBJECT,COST_CENTER,APPROVAL_BY,AREA_OF_SWITCHING,APPOINTMENT_REPETITION,APPOINTMENT_STARTDATE,APPOINTMENT_NUMBEROF,PLANNED_STARTTIME_FIRST_SINGLEMEASURE,ENDTIME_GRIDMEASURE,TIME_OF_REALLOCATION,DESCRIPTION,FK_REF_BRANCH,FK_REF_BRANCH_LEVEL,CREATE_USER,CREATE_USER_DEPARTMENT,CREATE_DATE,MOD_USER,MOD_USER_DEPARTMENT,MOD_DATE,
+
+ HACTION,
+ HDATE,
+ HUSER
+ )
+ VALUES (
+
+ NEW.ID,NEW.ID_DESCRIPTIVE,NEW.TITLE,NEW.AFFECTED_RESOURCE,NEW.REMARK,NEW.EMAIL_ADDRESSES,NEW.FK_REF_GM_STATUS,NEW.SWITCHING_OBJECT,NEW.COST_CENTER,NEW.APPROVAL_BY,NEW.AREA_OF_SWITCHING,NEW.APPOINTMENT_REPETITION,NEW.APPOINTMENT_STARTDATE,NEW.APPOINTMENT_NUMBEROF,NEW.PLANNED_STARTTIME_FIRST_SINGLEMEASURE,NEW.ENDTIME_GRIDMEASURE,NEW.TIME_OF_REALLOCATION,NEW.DESCRIPTION,NEW.FK_REF_BRANCH,NEW.FK_REF_BRANCH_LEVEL,NEW.CREATE_USER,NEW.CREATE_USER_DEPARTMENT,NEW.CREATE_DATE,NEW.MOD_USER,NEW.MOD_USER_DEPARTMENT,NEW.MOD_DATE,
+
+ 1,
+ current_timestamp,
+ NEW.CREATE_USER );
+
+ RETURN NEW;
+ END;
+$BODY$
+ LANGUAGE plpgsql VOLATILE
+ COST 100;
+ALTER FUNCTION PUBLIC.TBL_GRIDMEASURE_INSERT_TRG()
+ OWNER TO PLGM_SERVICE;
+
+
+DROP TRIGGER IF EXISTS TBL_GRIDMEASURE_INSERT_TRG ON PUBLIC.TBL_GRIDMEASURE;
+
+CREATE TRIGGER TBL_GRIDMEASURE_INSERT_TRG
+ BEFORE INSERT
+ ON PUBLIC.TBL_GRIDMEASURE
+ FOR EACH ROW
+ EXECUTE PROCEDURE PUBLIC.TBL_GRIDMEASURE_INSERT_TRG();
+
+
+
+-- PUBLIC.TBL_GRIDMEASURE UPDATE TRIGGER --
+-- <GENERATED CODE!>
+
+CREATE OR REPLACE FUNCTION PUBLIC.TBL_GRIDMEASURE_UPDATE_TRG()
+ RETURNS trigger AS
+$BODY$
+ BEGIN
+ INSERT INTO HTBL_GRIDMEASURE (
+ ID,ID_DESCRIPTIVE,TITLE,AFFECTED_RESOURCE,REMARK,EMAIL_ADDRESSES,FK_REF_GM_STATUS,SWITCHING_OBJECT,COST_CENTER,APPROVAL_BY,AREA_OF_SWITCHING,APPOINTMENT_REPETITION,APPOINTMENT_STARTDATE,APPOINTMENT_NUMBEROF,PLANNED_STARTTIME_FIRST_SINGLEMEASURE,ENDTIME_GRIDMEASURE,TIME_OF_REALLOCATION,DESCRIPTION,FK_REF_BRANCH,FK_REF_BRANCH_LEVEL,CREATE_USER,CREATE_USER_DEPARTMENT,CREATE_DATE,MOD_USER,MOD_USER_DEPARTMENT,MOD_DATE,
+
+ HACTION,
+ HDATE,
+ HUSER
+ )
+ VALUES (
+ NEW.ID,NEW.ID_DESCRIPTIVE,NEW.TITLE,NEW.AFFECTED_RESOURCE,NEW.REMARK,NEW.EMAIL_ADDRESSES,NEW.FK_REF_GM_STATUS,NEW.SWITCHING_OBJECT,NEW.COST_CENTER,NEW.APPROVAL_BY,NEW.AREA_OF_SWITCHING,NEW.APPOINTMENT_REPETITION,NEW.APPOINTMENT_STARTDATE,NEW.APPOINTMENT_NUMBEROF,NEW.PLANNED_STARTTIME_FIRST_SINGLEMEASURE,NEW.ENDTIME_GRIDMEASURE,NEW.TIME_OF_REALLOCATION,NEW.DESCRIPTION,NEW.FK_REF_BRANCH,NEW.FK_REF_BRANCH_LEVEL,NEW.CREATE_USER,NEW.CREATE_USER_DEPARTMENT,NEW.CREATE_DATE,NEW.MOD_USER,NEW.MOD_USER_DEPARTMENT,NEW.MOD_DATE,
+ 2,
+ current_timestamp,
+ NEW.MOD_USER
+ );
+
+ RETURN NEW;
+ END;
+$BODY$
+ LANGUAGE plpgsql VOLATILE
+ COST 100;
+ALTER FUNCTION PUBLIC.TBL_GRIDMEASURE_UPDATE_TRG()
+ OWNER TO PLGM_SERVICE;
+
+DROP TRIGGER IF EXISTS TBL_GRIDMEASURE_UPDATE_TRG ON PUBLIC.TBL_GRIDMEASURE;
+
+CREATE TRIGGER TBL_GRIDMEASURE_UPDATE_TRG
+ BEFORE UPDATE
+ ON PUBLIC.TBL_GRIDMEASURE
+ FOR EACH ROW
+ EXECUTE PROCEDURE PUBLIC.TBL_GRIDMEASURE_UPDATE_TRG();
+
+
+
+-- PUBLIC.TBL_GRIDMEASURE DELETE TRIGGER --
+-- <GENERATED CODE!>
+
+CREATE OR REPLACE FUNCTION PUBLIC.TBL_GRIDMEASURE_DELETE_TRG()
+ RETURNS trigger AS
+$BODY$
+ BEGIN
+ IF TG_OP = 'DELETE' THEN
+ INSERT INTO HTBL_GRIDMEASURE (
+
+ ID,ID_DESCRIPTIVE,TITLE,AFFECTED_RESOURCE,REMARK,EMAIL_ADDRESSES,FK_REF_GM_STATUS,SWITCHING_OBJECT,COST_CENTER,APPROVAL_BY,AREA_OF_SWITCHING,APPOINTMENT_REPETITION,APPOINTMENT_STARTDATE,APPOINTMENT_NUMBEROF,PLANNED_STARTTIME_FIRST_SINGLEMEASURE,ENDTIME_GRIDMEASURE,TIME_OF_REALLOCATION,DESCRIPTION,FK_REF_BRANCH,FK_REF_BRANCH_LEVEL,CREATE_USER,CREATE_USER_DEPARTMENT,CREATE_DATE,MOD_USER,MOD_USER_DEPARTMENT,MOD_DATE,
+
+ HACTION,
+ HDATE,
+ HUSER
+ )
+ VALUES (
+ OLD.ID,OLD.ID_DESCRIPTIVE,OLD.TITLE,OLD.AFFECTED_RESOURCE,OLD.REMARK,OLD.EMAIL_ADDRESSES,OLD.FK_REF_GM_STATUS,OLD.SWITCHING_OBJECT,OLD.COST_CENTER,OLD.APPROVAL_BY,OLD.AREA_OF_SWITCHING,OLD.APPOINTMENT_REPETITION,OLD.APPOINTMENT_STARTDATE,OLD.APPOINTMENT_NUMBEROF,OLD.PLANNED_STARTTIME_FIRST_SINGLEMEASURE,OLD.ENDTIME_GRIDMEASURE,OLD.TIME_OF_REALLOCATION,OLD.DESCRIPTION,OLD.FK_REF_BRANCH,OLD.FK_REF_BRANCH_LEVEL,OLD.CREATE_USER,OLD.CREATE_USER_DEPARTMENT,OLD.CREATE_DATE,OLD.MOD_USER,OLD.MOD_USER_DEPARTMENT,OLD.MOD_DATE,
+
+ 3,
+ current_timestamp,
+ OLD.MOD_USER );
+ END IF;
+
+ RETURN OLD;
+ END;
+$BODY$
+ LANGUAGE plpgsql VOLATILE
+ COST 100;
+ALTER FUNCTION PUBLIC.TBL_GRIDMEASURE_DELETE_TRG()
+ OWNER TO PLGM_SERVICE;
+
+DROP TRIGGER IF EXISTS TBL_GRIDMEASURE_DELETE_TRG ON PUBLIC.TBL_GRIDMEASURE;
+
+CREATE TRIGGER TBL_GRIDMEASURE_DELETE_TRG
+ BEFORE DELETE
+ ON PUBLIC.TBL_GRIDMEASURE
+ FOR EACH ROW
+ EXECUTE PROCEDURE PUBLIC.TBL_GRIDMEASURE_DELETE_TRG();
+
+
+-- PUBLIC.TBL_DOCUMENTS INSERT TRIGGER --
+-- <GENERATED CODE!>
+CREATE OR REPLACE FUNCTION PUBLIC.TBL_DOCUMENTS_INSERT_TRG()
+ RETURNS trigger AS
+$BODY$
+ BEGIN
+ INSERT INTO HTBL_DOCUMENTS (
+ ID,DOCUMENT_NAME,CREATE_USER,CREATE_DATE,MOD_USER,MOD_DATE,
+
+ HACTION,
+ HDATE,
+ HUSER
+ )
+ VALUES (
+
+ NEW.ID,NEW.DOCUMENT_NAME,NEW.CREATE_USER,NEW.CREATE_DATE,NEW.MOD_USER,NEW.MOD_DATE,
+
+ 1,
+ current_timestamp,
+ NEW.CREATE_USER );
+
+ RETURN NEW;
+ END;
+$BODY$
+ LANGUAGE plpgsql VOLATILE
+ COST 100;
+ALTER FUNCTION PUBLIC.TBL_DOCUMENTS_INSERT_TRG()
+ OWNER TO PLGM_SERVICE;
+
+
+DROP TRIGGER IF EXISTS TBL_DOCUMENTS_INSERT_TRG ON PUBLIC.TBL_DOCUMENTS;
+
+CREATE TRIGGER TBL_DOCUMENTS_INSERT_TRG
+ BEFORE INSERT
+ ON PUBLIC.TBL_DOCUMENTS
+ FOR EACH ROW
+ EXECUTE PROCEDURE PUBLIC.TBL_DOCUMENTS_INSERT_TRG();
+
+
+
+-- PUBLIC.TBL_DOCUMENTS UPDATE TRIGGER --
+-- <GENERATED CODE!>
+
+CREATE OR REPLACE FUNCTION PUBLIC.TBL_DOCUMENTS_UPDATE_TRG()
+ RETURNS trigger AS
+$BODY$
+ BEGIN
+ INSERT INTO HTBL_DOCUMENTS (
+ ID,DOCUMENT_NAME,CREATE_USER,CREATE_DATE,MOD_USER,MOD_DATE,
+
+ HACTION,
+ HDATE,
+ HUSER
+ )
+ VALUES (
+ NEW.ID,NEW.DOCUMENT_NAME,NEW.CREATE_USER,NEW.CREATE_DATE,NEW.MOD_USER,NEW.MOD_DATE,
+ 2,
+ current_timestamp,
+ NEW.MOD_USER
+ );
+
+ RETURN NEW;
+ END;
+$BODY$
+ LANGUAGE plpgsql VOLATILE
+ COST 100;
+ALTER FUNCTION PUBLIC.TBL_DOCUMENTS_UPDATE_TRG()
+ OWNER TO PLGM_SERVICE;
+
+DROP TRIGGER IF EXISTS TBL_DOCUMENTS_UPDATE_TRG ON PUBLIC.TBL_DOCUMENTS;
+
+CREATE TRIGGER TBL_DOCUMENTS_UPDATE_TRG
+ BEFORE UPDATE
+ ON PUBLIC.TBL_DOCUMENTS
+ FOR EACH ROW
+ EXECUTE PROCEDURE PUBLIC.TBL_DOCUMENTS_UPDATE_TRG();
+
+
+
+-- PUBLIC.TBL_DOCUMENTS DELETE TRIGGER --
+-- <GENERATED CODE!>
+
+CREATE OR REPLACE FUNCTION PUBLIC.TBL_DOCUMENTS_DELETE_TRG()
+ RETURNS trigger AS
+$BODY$
+ BEGIN
+ IF TG_OP = 'DELETE' THEN
+ INSERT INTO HTBL_DOCUMENTS (
+
+ ID,DOCUMENT_NAME,CREATE_USER,CREATE_DATE,MOD_USER,MOD_DATE,
+
+ HACTION,
+ HDATE,
+ HUSER
+ )
+ VALUES (
+ OLD.ID,OLD.DOCUMENT_NAME,OLD.CREATE_USER,OLD.CREATE_DATE,OLD.MOD_USER,OLD.MOD_DATE,
+
+ 3,
+ current_timestamp,
+ OLD.MOD_USER );
+ END IF;
+
+ RETURN OLD;
+ END;
+$BODY$
+ LANGUAGE plpgsql VOLATILE
+ COST 100;
+ALTER FUNCTION PUBLIC.TBL_DOCUMENTS_DELETE_TRG()
+ OWNER TO PLGM_SERVICE;
+
+DROP TRIGGER IF EXISTS TBL_DOCUMENTS_DELETE_TRG ON PUBLIC.TBL_DOCUMENTS;
+
+CREATE TRIGGER TBL_DOCUMENTS_DELETE_TRG
+ BEFORE DELETE
+ ON PUBLIC.TBL_DOCUMENTS
+ FOR EACH ROW
+ EXECUTE PROCEDURE PUBLIC.TBL_DOCUMENTS_DELETE_TRG();
+
+
+
+
+
+
+-- PUBLIC.TBL_MEASURE_DOCUMENTS INSERT TRIGGER --
+-- <GENERATED CODE!>
+CREATE OR REPLACE FUNCTION PUBLIC.TBL_MEASURE_DOCUMENTS_INSERT_TRG()
+ RETURNS trigger AS
+$BODY$
+ BEGIN
+ INSERT INTO HTBL_MEASURE_DOCUMENTS (
+ ID,FK_TBL_MEASURE,FK_TBL_DOCUMENTS,CREATE_USER,CREATE_DATE,MOD_USER,MOD_DATE,
+
+ HACTION,
+ HDATE,
+ HUSER
+ )
+ VALUES (
+
+ NEW.ID,NEW.FK_TBL_MEASURE,NEW.FK_TBL_DOCUMENTS,NEW.CREATE_USER,NEW.CREATE_DATE,NEW.MOD_USER,NEW.MOD_DATE,
+
+ 1,
+ current_timestamp,
+ NEW.CREATE_USER );
+
+ RETURN NEW;
+ END;
+$BODY$
+ LANGUAGE plpgsql VOLATILE
+ COST 100;
+ALTER FUNCTION PUBLIC.TBL_MEASURE_DOCUMENTS_INSERT_TRG()
+ OWNER TO PLGM_SERVICE;
+
+
+DROP TRIGGER IF EXISTS TBL_MEASURE_DOCUMENTS_INSERT_TRG ON PUBLIC.TBL_MEASURE_DOCUMENTS;
+
+CREATE TRIGGER TBL_MEASURE_DOCUMENTS_INSERT_TRG
+ BEFORE INSERT
+ ON PUBLIC.TBL_MEASURE_DOCUMENTS
+ FOR EACH ROW
+ EXECUTE PROCEDURE PUBLIC.TBL_MEASURE_DOCUMENTS_INSERT_TRG();
+
+
+
+-- PUBLIC.TBL_MEASURE_DOCUMENTS UPDATE TRIGGER --
+-- <GENERATED CODE!>
+
+CREATE OR REPLACE FUNCTION PUBLIC.TBL_MEASURE_DOCUMENTS_UPDATE_TRG()
+ RETURNS trigger AS
+$BODY$
+ BEGIN
+ INSERT INTO HTBL_MEASURE_DOCUMENTS (
+ ID,FK_TBL_MEASURE,FK_TBL_DOCUMENTS,CREATE_USER,CREATE_DATE,MOD_USER,MOD_DATE,
+
+ HACTION,
+ HDATE,
+ HUSER
+ )
+ VALUES (
+ NEW.ID,NEW.FK_TBL_MEASURE,NEW.FK_TBL_DOCUMENTS,NEW.CREATE_USER,NEW.CREATE_DATE,NEW.MOD_USER,NEW.MOD_DATE,
+ 2,
+ current_timestamp,
+ NEW.MOD_USER
+ );
+
+ RETURN NEW;
+ END;
+$BODY$
+ LANGUAGE plpgsql VOLATILE
+ COST 100;
+ALTER FUNCTION PUBLIC.TBL_MEASURE_DOCUMENTS_UPDATE_TRG()
+ OWNER TO PLGM_SERVICE;
+
+DROP TRIGGER IF EXISTS TBL_MEASURE_DOCUMENTS_UPDATE_TRG ON PUBLIC.TBL_MEASURE_DOCUMENTS;
+
+CREATE TRIGGER TBL_MEASURE_DOCUMENTS_UPDATE_TRG
+ BEFORE UPDATE
+ ON PUBLIC.TBL_MEASURE_DOCUMENTS
+ FOR EACH ROW
+ EXECUTE PROCEDURE PUBLIC.TBL_MEASURE_DOCUMENTS_UPDATE_TRG();
+
+
+
+-- PUBLIC.TBL_MEASURE_DOCUMENTS DELETE TRIGGER --
+-- <GENERATED CODE!>
+
+CREATE OR REPLACE FUNCTION PUBLIC.TBL_MEASURE_DOCUMENTS_DELETE_TRG()
+ RETURNS trigger AS
+$BODY$
+ BEGIN
+ IF TG_OP = 'DELETE' THEN
+ INSERT INTO HTBL_MEASURE_DOCUMENTS (
+
+ ID,FK_TBL_MEASURE,FK_TBL_DOCUMENTS,CREATE_USER,CREATE_DATE,MOD_USER,MOD_DATE,
+
+ HACTION,
+ HDATE,
+ HUSER
+ )
+ VALUES (
+ OLD.ID,OLD.FK_TBL_MEASURE,OLD.FK_TBL_DOCUMENTS,OLD.CREATE_USER,OLD.CREATE_DATE,OLD.MOD_USER,OLD.MOD_DATE,
+
+ 3,
+ current_timestamp,
+ OLD.MOD_USER );
+ END IF;
+
+ RETURN OLD;
+ END;
+$BODY$
+ LANGUAGE plpgsql VOLATILE
+ COST 100;
+ALTER FUNCTION PUBLIC.TBL_MEASURE_DOCUMENTS_DELETE_TRG()
+ OWNER TO PLGM_SERVICE;
+
+DROP TRIGGER IF EXISTS TBL_MEASURE_DOCUMENTS_DELETE_TRG ON PUBLIC.TBL_MEASURE_DOCUMENTS;
+
+CREATE TRIGGER TBL_MEASURE_DOCUMENTS_DELETE_TRG
+ BEFORE DELETE
+ ON PUBLIC.TBL_MEASURE_DOCUMENTS
+ FOR EACH ROW
+ EXECUTE PROCEDURE PUBLIC.TBL_MEASURE_DOCUMENTS_DELETE_TRG();
diff --git a/db/migrations/V0_47__CREATE_PLGM_DB.sql b/db/migrations/V0_47__CREATE_PLGM_DB.sql
new file mode 100644
index 0000000..c044460
--- /dev/null
+++ b/db/migrations/V0_47__CREATE_PLGM_DB.sql
@@ -0,0 +1,2909 @@
+-----------------------------------------------------------------------------------
+-- *******************************************************************************
+-- * Copyright (c) 2018 Contributors to the Eclipse Foundation
+-- *
+-- * See the NOTICE file(s) distributed with this work for additional
+-- * information regarding copyright ownership.
+-- *
+-- * This program and the accompanying materials are made available under the
+-- * terms of the Eclipse Public License v. 2.0 which is available at
+-- * http://www.eclipse.org/legal/epl-2.0.
+-- *
+-- * SPDX-License-Identifier: EPL-2.0
+-- *******************************************************************************
+-----------------------------------------------------------------------------------
+--
+--Field Inserts of Gridmeasuredata (into tables TBL_GRIDMEASURE, HTBL_GRIDMEASURE, TBL_SINGLE_GRIDMEASURE, HTBL_SINGLE_GRIDMEASURE) deleted
+
+-- ---------------------------------------------
+-- DROPS
+-- ---------------------------------------------
+DROP TABLE IF EXISTS public.TBL_STEPS;
+DROP SEQUENCE IF EXISTS public.TBL_STEPS_ID_SEQ;
+
+DROP TABLE IF EXISTS public.TBL_SINGLE_GRIDMEASURE;
+DROP SEQUENCE IF EXISTS public.TBL_SINGLE_GRIDMEASURE_ID_SEQ;
+
+DROP TABLE IF EXISTS public.TBL_LOCK CASCADE;
+DROP SEQUENCE IF EXISTS public.TBL_LOCK_ID_SEQ;
+
+DROP TABLE IF EXISTS public.REF_USER_SETTINGS CASCADE;
+DROP SEQUENCE IF EXISTS public.REF_USER_SETTINGS_ID_SEQ;
+
+DROP TABLE IF EXISTS public.TBL_USER_SETTINGS CASCADE;
+DROP SEQUENCE IF EXISTS public.TBL_USER_SETTINGS_ID_SEQ;
+
+DROP TABLE IF EXISTS public.REF_COST_CENTER CASCADE;
+DROP SEQUENCE IF EXISTS public.REF_COST_CENTER_ID_SEQ;
+
+DROP TABLE IF EXISTS public.TBL_GRIDMEASURE CASCADE;
+DROP SEQUENCE IF EXISTS public.TBL_GRIDMEASURE_ID_SEQ;
+
+DROP TABLE IF EXISTS public.REF_BRANCH CASCADE;
+DROP SEQUENCE IF EXISTS public.REF_BRANCH_ID_SEQ;
+
+DROP TABLE IF EXISTS public.REF_BRANCH_LEVEL CASCADE;
+DROP SEQUENCE IF EXISTS public.REF_BRANCH_LEVEL_ID_SEQ;
+
+DROP TABLE IF EXISTS public.REF_GM_STATUS CASCADE;
+DROP SEQUENCE IF EXISTS public.REF_GM_STATUS_ID_SEQ;
+
+DROP TABLE IF EXISTS public.tbl_documents CASCADE;
+DROP SEQUENCE IF EXISTS public.tbl_documents_id_seq;
+
+DROP TABLE IF EXISTS public.tbl_measure_documents CASCADE;
+DROP SEQUENCE IF EXISTS public.tbl_measure_documents_id_seq;
+
+DROP TABLE IF EXISTS public.tbl_id_counter CASCADE;
+DROP SEQUENCE IF EXISTS public.tbl_id_counter_id_seq;
+
+DROP TABLE IF EXISTS public.REF_TERRITORY CASCADE;
+DROP SEQUENCE IF EXISTS public.REF_TERRITORY_ID_SEQ;
+
+DROP TABLE IF EXISTS public.REF_VERSION;
+
+DROP TABLE IF EXISTS PUBLIC.HREF_TERRITORY;
+DROP SEQUENCE IF EXISTS PUBLIC.HREF_TERRITORY_ID_SEQ;
+
+DROP TABLE IF EXISTS PUBLIC.HTBL_LOCK;
+DROP SEQUENCE IF EXISTS PUBLIC.HTBL_LOCK_ID_SEQ;
+
+DROP TABLE IF EXISTS PUBLIC.HTBL_USER_SETTINGS;
+DROP SEQUENCE IF EXISTS PUBLIC.HTBL_USER_SETTINGS_ID_SEQ;
+
+DROP TABLE IF EXISTS PUBLIC.HREF_COST_CENTER;
+DROP SEQUENCE IF EXISTS PUBLIC.HREF_COST_CENTER_ID_SEQ;
+
+DROP TABLE IF EXISTS PUBLIC.HREF_BRANCH;
+DROP SEQUENCE IF EXISTS PUBLIC.HREF_BRANCH_ID_SEQ;
+
+DROP TABLE IF EXISTS PUBLIC.HREF_BRANCH_LEVEL;
+DROP SEQUENCE IF EXISTS PUBLIC.HREF_BRANCH_LEVEL_ID_SEQ;
+
+DROP TABLE IF EXISTS PUBLIC.HREF_GM_STATUS;
+DROP SEQUENCE IF EXISTS PUBLIC.HREF_GM_STATUS_ID_SEQ;
+
+DROP TABLE IF EXISTS PUBLIC.HTBL_GRIDMEASURE;
+DROP SEQUENCE IF EXISTS PUBLIC.HTBL_GRIDMEASURE_ID_SEQ;
+
+DROP TABLE IF EXISTS PUBLIC.HTBL_ID_COUNTER;
+DROP SEQUENCE IF EXISTS PUBLIC.HTBL_ID_COUNTER_ID_SEQ;
+
+DROP TABLE IF EXISTS PUBLIC.HTBL_SINGLE_GRIDMEASURE;
+DROP SEQUENCE IF EXISTS PUBLIC.HTBL_SINGLE_GRIDMEASURE_ID_SEQ;
+
+DROP TABLE IF EXISTS PUBLIC.HTBL_STEPS;
+DROP SEQUENCE IF EXISTS PUBLIC.HTBL_STEPS_ID_SEQ;
+
+DROP TABLE IF EXISTS PUBLIC.HTBL_DOCUMENTS;
+DROP SEQUENCE IF EXISTS PUBLIC.HTBL_DOCUMENTS_ID_SEQ;
+
+DROP TABLE IF EXISTS PUBLIC.HTBL_MEASURE_DOCUMENTS;
+DROP SEQUENCE IF EXISTS PUBLIC.HTBL_MEASURE_DOCUMENTS_ID_SEQ;
+
+
+DROP INDEX IF EXISTS public.huser_index;
+
+-- ---------------------------------------------
+-- TABLE REF_TERRITORY
+-- ---------------------------------------------
+
+CREATE SEQUENCE public.REF_TERRITORY_ID_SEQ
+ INCREMENT 1
+ MINVALUE 1
+ MAXVALUE 9223372036854775807
+ START 1
+ CACHE 1;
+ALTER TABLE public.REF_TERRITORY_ID_SEQ
+ OWNER TO plgm_service;
+
+
+CREATE TABLE public.REF_TERRITORY
+(
+ id integer NOT NULL DEFAULT nextval('REF_TERRITORY_ID_SEQ'::regclass),
+ name character varying(50) NOT NULL,
+ description character varying(255),
+ create_user character varying(100) NOT NULL,
+ create_date timestamp without time zone NOT NULL,
+ mod_user character varying(100),
+ mod_date timestamp without time zone,
+ CONSTRAINT REF_TERRITORY_pkey PRIMARY KEY (id)
+)
+WITH (
+ OIDS=FALSE
+);
+ALTER TABLE public.REF_TERRITORY
+ OWNER TO plgm_service;
+GRANT ALL ON TABLE public.REF_TERRITORY TO plgm_service;
+
+
+-- ---------------------------------------------
+-- TABLE TBL_LOCK
+-- ---------------------------------------------
+
+CREATE SEQUENCE public.TBL_LOCK_ID_SEQ
+ INCREMENT 1
+ MINVALUE 1
+ MAXVALUE 9223372036854775807
+ START 1
+ CACHE 1;
+ALTER TABLE public.TBL_LOCK_ID_SEQ
+ OWNER TO plgm_service;
+
+CREATE TABLE public.tbl_lock
+(
+ id integer NOT NULL DEFAULT nextval('TBL_LOCK_ID_SEQ'::regclass),
+ key integer NOT NULL, -- Id from tbl_gridmeasure
+ username character varying(50) NOT NULL,
+ info character varying(256),
+ create_user character varying(100) NOT NULL,
+ create_date timestamp without time zone NOT NULL,
+ mod_user character varying(100),
+ mod_date timestamp without time zone,
+ CONSTRAINT tbl_lock_pkey PRIMARY KEY (id)
+)
+WITH (
+ OIDS=FALSE
+);
+ALTER TABLE public.tbl_lock
+ OWNER TO plgm_service;
+GRANT ALL ON TABLE public.tbl_lock TO plgm_service;
+
+CREATE UNIQUE INDEX tbl_lock_unique_key ON public.tbl_lock (key ASC, info ASC );
+
+
+-- ---------------------------------------------
+-- TABLE TBL_USER_SETTINGS
+-- ---------------------------------------------
+
+CREATE SEQUENCE public.tbl_user_settings_id_seq
+ INCREMENT 1
+ MINVALUE 1
+ MAXVALUE 9223372036854775807
+ START 1
+ CACHE 1;
+ALTER TABLE public.tbl_user_settings_id_seq
+ OWNER TO plgm_service;
+
+CREATE TABLE public.tbl_user_settings
+(
+ id integer NOT NULL DEFAULT nextval('tbl_user_settings_id_seq'::regclass),
+ username character varying(50) NOT NULL,
+ setting_type character varying(50),
+ value character varying(4096),
+ create_user character varying(100) NOT NULL,
+ create_date timestamp without time zone NOT NULL,
+ mod_user character varying(100),
+ mod_date timestamp without time zone,
+ CONSTRAINT tbl_user_settings_pkey PRIMARY KEY (id)
+)
+WITH (
+ OIDS=FALSE
+);
+ALTER TABLE public.tbl_user_settings
+ OWNER TO plgm_service;
+GRANT ALL ON TABLE public.tbl_user_settings TO plgm_service;
+
+CREATE UNIQUE INDEX tbl_user_set_unique_key ON public.tbl_user_settings (username ASC, setting_type ASC );
+
+
+-- ---------------------------------------------
+-- TABLE TBL_ID_COUNTER
+-- ---------------------------------------------
+
+CREATE SEQUENCE public.tbl_id_counter_id_seq
+ INCREMENT 1
+ MINVALUE 1
+ MAXVALUE 9223372036854775807
+ START 1
+ CACHE 1;
+ALTER TABLE public.tbl_id_counter_id_seq
+ OWNER TO plgm_service;
+
+CREATE TABLE public.tbl_id_counter
+(
+ id integer NOT NULL DEFAULT nextval('tbl_id_counter_id_seq'::regclass),
+ counter integer NOT NULL,
+ counter_type character varying(256),
+ info character varying(256),
+ create_user character varying(100) NOT NULL,
+ create_date timestamp without time zone NOT NULL,
+ mod_user character varying(100),
+ mod_date timestamp without time zone,
+ CONSTRAINT tbl_id_counter_pkey PRIMARY KEY (id)
+)
+WITH (
+ OIDS=FALSE
+);
+ALTER TABLE public.tbl_id_counter
+ OWNER TO plgm_service;
+GRANT ALL ON TABLE public.tbl_id_counter TO plgm_service;
+
+
+-- ---------------------------------------------
+-- TABLE REF_COST_CENTER
+-- ---------------------------------------------
+
+CREATE SEQUENCE public.REF_COST_CENTER_ID_SEQ
+ INCREMENT 1
+ MINVALUE 1
+ MAXVALUE 9223372036854775807
+ START 1
+ CACHE 1;
+ALTER TABLE public.REF_COST_CENTER_ID_SEQ
+ OWNER TO plgm_service;
+
+
+CREATE TABLE public.REF_COST_CENTER
+(
+ id integer NOT NULL DEFAULT nextval('REF_COST_CENTER_id_seq'::regclass),
+ name character varying(50) NOT NULL,
+ description character varying(255),
+ create_user character varying(100) NOT NULL,
+ create_date timestamp without time zone NOT NULL,
+ mod_user character varying(100),
+ mod_date timestamp without time zone,
+ CONSTRAINT REF_COST_CENTER_pkey PRIMARY KEY (id)
+)
+WITH (
+ OIDS=FALSE
+);
+ALTER TABLE public.REF_COST_CENTER
+ OWNER TO plgm_service;
+GRANT ALL ON TABLE public.REF_COST_CENTER TO plgm_service;
+
+
+-- ---------------------------------------------
+-- TABLE REF_BRANCH
+-- ---------------------------------------------
+CREATE SEQUENCE public.REF_BRANCH_ID_SEQ
+ INCREMENT 1
+ MINVALUE 1
+ MAXVALUE 9223372036854775807
+ START 1
+ CACHE 1;
+
+ALTER TABLE public.REF_BRANCH_ID_SEQ
+ OWNER TO PLGM_SERVICE;
+
+CREATE TABLE public.REF_BRANCH
+(
+ ID integer NOT NULL DEFAULT nextval('REF_BRANCH_ID_SEQ'::regclass),
+ NAME character varying(50) NOT NULL,
+ DESCRIPTION character varying(255),
+ COLOR_CODE character varying(20),
+ CREATE_USER character varying(100) NOT NULL,
+ CREATE_DATE timestamp without time zone NOT NULL,
+ MOD_USER character varying(100),
+ MOD_DATE timestamp without time zone,
+ CONSTRAINT REF_BRANCH_PKEY PRIMARY KEY (id)
+)
+WITH (
+ OIDS=FALSE
+);
+
+ALTER TABLE public.REF_BRANCH
+ OWNER TO PLGM_SERVICE;
+GRANT ALL ON TABLE public.REF_BRANCH TO PLGM_SERVICE;
+
+
+-- ---------------------------------------------
+-- TABLE REF_BRANCH_LEVEL
+-- ---------------------------------------------
+CREATE SEQUENCE public.ref_branch_level_id_seq
+ INCREMENT 1
+ MINVALUE 1
+ MAXVALUE 9223372036854775807
+ START 1
+ CACHE 1;
+ALTER TABLE public.ref_branch_level_id_seq
+ OWNER TO plgm_service;
+
+CREATE TABLE public.ref_branch_level
+(
+ id integer NOT NULL DEFAULT nextval('ref_branch_level_id_seq'::regclass),
+ name character varying(50) NOT NULL,
+ description character varying(255),
+ fk_ref_branch integer NULL,
+ create_user character varying(100) NOT NULL,
+ create_date timestamp without time zone NOT NULL,
+ mod_user character varying(100),
+ mod_date timestamp without time zone,
+ CONSTRAINT ref_branch_level_pkey PRIMARY KEY (id),
+ CONSTRAINT FK_REF_BRANCH_LEVEL__REF_BRANCH FOREIGN KEY (FK_REF_BRANCH)
+ REFERENCES public.REF_BRANCH (ID) MATCH SIMPLE
+ ON UPDATE NO ACTION ON DELETE NO ACTION
+)
+WITH (
+ OIDS=FALSE
+);
+ALTER TABLE public.ref_branch_level
+ OWNER TO plgm_service;
+GRANT ALL ON TABLE public.ref_branch_level TO plgm_service;
+
+
+-- ---------------------------------------------
+-- TABLE REF_GM_STATUS
+-- ---------------------------------------------
+CREATE SEQUENCE public.REF_GM_STATUS_ID_SEQ
+ INCREMENT 1
+ MINVALUE 1
+ MAXVALUE 9223372036854775807
+ START 1
+ CACHE 1;
+
+ALTER TABLE public.REF_GM_STATUS_ID_SEQ
+ OWNER TO PLGM_SERVICE;
+
+CREATE TABLE public.REF_GM_STATUS
+(
+ ID integer NOT NULL DEFAULT nextval('REF_GM_STATUS_ID_SEQ'::regclass),
+ NAME character varying(50) NOT NULL,
+ COLOR_CODE character varying(20),
+ CREATE_USER character varying(100) NOT NULL,
+ CREATE_DATE timestamp without time zone NOT NULL,
+ MOD_USER character varying(100),
+ MOD_DATE timestamp without time zone,
+ CONSTRAINT REF_GM_STATUS_PKEY PRIMARY KEY (id)
+)
+WITH (
+ OIDS=FALSE
+);
+
+ALTER TABLE public.REF_GM_STATUS
+ OWNER TO PLGM_SERVICE;
+GRANT ALL ON TABLE public.REF_GM_STATUS TO PLGM_SERVICE;
+
+
+-- ---------------------------------------------
+-- TABLE TBL_GRIDMEASURE
+-- ---------------------------------------------
+-- REQUESTER_NAME COLUMN DELETED--
+CREATE SEQUENCE public.TBL_GRIDMEASURE_ID_SEQ
+ INCREMENT 1
+ MINVALUE 1
+ MAXVALUE 9223372036854775807
+ START 1
+ CACHE 1;
+
+ALTER TABLE public.TBL_GRIDMEASURE_ID_SEQ
+ OWNER TO PLGM_SERVICE;
+
+CREATE TABLE public.tbl_gridmeasure
+(
+ id integer NOT NULL DEFAULT nextval('tbl_gridmeasure_id_seq'::regclass),
+ id_descriptive character varying(50),
+ title character varying(256),
+ affected_resource character varying(256),
+ remark character varying(1024),
+ email_addresses character varying(1024),
+ fk_ref_gm_status integer,
+ switching_object character varying(256),
+ cost_center character varying(50),
+ approval_by character varying(256),
+ area_of_switching character varying(256),
+ appointment_repetition character varying(100),
+ appointment_startdate timestamp without time zone,
+ appointment_numberof integer,
+ planned_starttime_first_singlemeasure timestamp without time zone,
+ endtime_gridmeasure timestamp without time zone,
+ time_of_reallocation character varying(100),
+ description character varying(1024),
+ fk_ref_branch integer,
+ fk_ref_branch_level integer,
+ create_user character varying(100) NOT NULL,
+ create_user_department character varying(100),
+ create_date timestamp without time zone NOT NULL,
+ mod_user character varying(100),
+ mod_user_department character varying(100),
+ mod_date timestamp without time zone,
+ CONSTRAINT tbl_gridmeasure_pkey PRIMARY KEY (id),
+ CONSTRAINT fk_gridmeasure__gm_status FOREIGN KEY (fk_ref_gm_status)
+ REFERENCES public.ref_gm_status (id) MATCH SIMPLE
+ ON UPDATE NO ACTION ON DELETE NO ACTION,
+ CONSTRAINT fk_gridmeasure__branch FOREIGN KEY (fk_ref_branch)
+ REFERENCES public.ref_branch (id) MATCH SIMPLE
+ ON UPDATE NO ACTION ON DELETE NO ACTION,
+ CONSTRAINT fk_gridmeasure__branch_level FOREIGN KEY (fk_ref_branch_level)
+ REFERENCES public.ref_branch_level (id) MATCH SIMPLE
+ ON UPDATE NO ACTION ON DELETE NO ACTION
+)
+WITH (
+ OIDS=FALSE
+);
+ALTER TABLE public.tbl_gridmeasure
+ OWNER TO plgm_service;
+GRANT ALL ON TABLE public.tbl_gridmeasure TO plgm_service;
+
+
+
+-- ---------------------------------------------
+-- TABLE TBL_SINGLE_GRIDMEASURE
+-- ---------------------------------------------
+
+CREATE SEQUENCE public.tbl_single_gridmeasure_id_seq
+ INCREMENT 1
+ MINVALUE 1
+ MAXVALUE 9223372036854775807
+ START 1
+ CACHE 1;
+ALTER TABLE public.tbl_single_gridmeasure_id_seq
+ OWNER TO plgm_service;
+
+CREATE TABLE public.tbl_single_gridmeasure
+(
+ id integer NOT NULL DEFAULT nextval('tbl_single_gridmeasure_id_seq'::regclass),
+ sortorder integer NOT NULL,
+ title character varying(256),
+ switching_object character varying(256),
+ cim_id character varying(256),
+ cim_name character varying(256),
+ cim_description character varying(1024),
+ planned_starttime_singlemeasure timestamp without time zone,
+ planned_endtime_singlemeasure timestamp without time zone,
+ description character varying(1024),
+ responsible_onsite_name character varying(256),
+ responsible_onsite_department character varying(256),
+ network_control character varying(256),
+ fk_tbl_gridmeasure integer NOT NULL,
+ create_user character varying(100) NOT NULL,
+ create_date timestamp without time zone NOT NULL,
+ mod_user character varying(100),
+ mod_date timestamp without time zone,
+ CONSTRAINT tbl_single_gridmeasure_pkey PRIMARY KEY (id),
+ CONSTRAINT fk_single_gridmeasure__gridmeasure FOREIGN KEY (fk_tbl_gridmeasure)
+ REFERENCES public.tbl_gridmeasure (id) MATCH SIMPLE
+ ON UPDATE NO ACTION ON DELETE NO ACTION
+)
+WITH (
+ OIDS=FALSE
+);
+ALTER TABLE public.tbl_single_gridmeasure
+ OWNER TO plgm_service;
+GRANT ALL ON TABLE public.tbl_single_gridmeasure TO plgm_service;
+
+
+
+-- ---------------------------------------------
+-- TABLE TBL_STEPS
+-- ---------------------------------------------
+
+CREATE SEQUENCE public.tbl_steps_id_seq
+ INCREMENT 1
+ MINVALUE 1
+ MAXVALUE 9223372036854775807
+ START 1
+ CACHE 1;
+ALTER TABLE public.tbl_steps_id_seq
+ OWNER TO plgm_service;
+
+CREATE TABLE public.tbl_steps
+(
+ id integer NOT NULL DEFAULT nextval('tbl_steps_id_seq'::regclass),
+ sortorder integer NOT NULL,
+ switching_object character varying(256),
+ type character varying(256),
+ present_time character varying(256),
+ present_state character varying(256),
+ target_state character varying(256),
+ operator character varying(256),
+ fk_tbl_single_gridmeasure integer NOT NULL,
+ create_user character varying(100) NOT NULL,
+ create_date timestamp without time zone NOT NULL,
+ mod_user character varying(100),
+ mod_date timestamp without time zone,
+ CONSTRAINT tbl_steps_pkey PRIMARY KEY (id),
+ CONSTRAINT fk_steps__single_gridmeasure FOREIGN KEY (fk_tbl_single_gridmeasure)
+ REFERENCES public.tbl_single_gridmeasure (id) MATCH SIMPLE
+ ON UPDATE NO ACTION ON DELETE NO ACTION
+)
+WITH (
+ OIDS=FALSE
+);
+ALTER TABLE public.tbl_steps
+ OWNER TO plgm_service;
+GRANT ALL ON TABLE public.tbl_steps TO plgm_service;
+
+
+-- ---------------------------------------------
+-- TABLE REF_VERSION
+-- ---------------------------------------------
+
+CREATE TABLE public.REF_VERSION
+(
+ id integer NOT NULL,
+ version character varying(100) NOT NULL,
+ CONSTRAINT ref_version_pkey PRIMARY KEY (id)
+)
+WITH (
+ OIDS=FALSE
+);
+ALTER TABLE public.REF_VERSION
+ OWNER TO PLGM_SERVICE;
+GRANT ALL ON TABLE public.REF_VERSION TO PLGM_SERVICE;
+
+
+
+-- ---------------------------------------------
+-- TABLE TBL_DOCUMENTS
+-- ---------------------------------------------
+
+CREATE SEQUENCE public.tbl_documents_id_seq
+ INCREMENT 1
+ MINVALUE 1
+ MAXVALUE 9223372036854775807
+ START 1
+ CACHE 1;
+ALTER TABLE public.tbl_documents_id_seq
+ OWNER TO plgm_service;
+
+CREATE TABLE public.tbl_documents
+(
+ id integer NOT NULL DEFAULT nextval('tbl_documents_id_seq'::regclass),
+ document_name character varying(260),
+ document bytea,
+ create_user character varying(100) NOT NULL,
+ create_date timestamp without time zone NOT NULL,
+ mod_user character varying(100),
+ mod_date timestamp without time zone,
+ CONSTRAINT tbl_documents_pkey PRIMARY KEY (id)
+)
+WITH (
+ OIDS=FALSE
+);
+ALTER TABLE public.tbl_documents
+ OWNER TO plgm_service;
+GRANT ALL ON TABLE public.tbl_documents TO plgm_service;
+
+
+-- ---------------------------------------------
+-- TABLE TBL_MEASURE_DOCUMENTS
+-- ---------------------------------------------
+
+CREATE SEQUENCE public.tbl_measure_documents_id_seq
+ INCREMENT 1
+ MINVALUE 1
+ MAXVALUE 9223372036854775807
+ START 1
+ CACHE 1;
+ALTER TABLE public.tbl_measure_documents_id_seq
+ OWNER TO plgm_service;
+
+CREATE TABLE public.tbl_measure_documents
+(
+ id integer NOT NULL DEFAULT nextval('tbl_measure_documents_id_seq'::regclass),
+ fk_tbl_measure integer,
+ fk_tbl_documents integer,
+ create_user character varying(100) NOT NULL,
+ create_date timestamp without time zone NOT NULL,
+ mod_user character varying(100),
+ mod_date timestamp without time zone,
+ CONSTRAINT tbl_measure_documents_pkey PRIMARY KEY (id),
+ CONSTRAINT fk_tbl_measure_documents_measure FOREIGN KEY (fk_tbl_measure)
+ REFERENCES public.tbl_gridmeasure (id) MATCH SIMPLE
+ ON UPDATE NO ACTION ON DELETE CASCADE,
+ CONSTRAINT fk_tbl_measure_documents_documents FOREIGN KEY (fk_tbl_documents)
+ REFERENCES public.tbl_documents (id) MATCH SIMPLE
+ ON UPDATE NO ACTION ON DELETE NO ACTION
+)
+WITH (
+ OIDS=FALSE
+);
+ALTER TABLE public.tbl_measure_documents
+ OWNER TO plgm_service;
+GRANT ALL ON TABLE public.tbl_measure_documents TO plgm_service;
+
+
+
+-- ----------------------------------------------------------------------------
+-- ----------------------------------------------------------------------------
+-- HISTORY-TABLES
+-- ----------------------------------------------------------------------------
+-- ----------------------------------------------------------------------------
+
+-- PUBLIC.HREF_TERRITORY Automatic generanted History Table DDL --
+-- <GENERATED CODE!>
+
+
+CREATE SEQUENCE PUBLIC.HREF_TERRITORY_ID_SEQ
+ INCREMENT 1
+ MINVALUE 1
+ MAXVALUE 9223372036854775807
+ START 1
+ CACHE 1;
+
+ALTER TABLE PUBLIC.HREF_TERRITORY_ID_SEQ
+ OWNER TO PLGM_SERVICE;
+
+CREATE TABLE PUBLIC.HREF_TERRITORY
+(
+ HID integer NOT NULL DEFAULT nextval('HREF_TERRITORY_ID_SEQ'::regclass),
+ HACTION integer NOT NULL,
+ HDATE timestamp without time zone NOT NULL,
+ HUSER character varying(100),
+
+ ID integer,
+ NAME character varying (50),
+ DESCRIPTION character varying (255),
+
+ CREATE_USER character varying(100),
+ CREATE_DATE timestamp without time zone,
+ MOD_USER character varying(100),
+ MOD_DATE timestamp without time zone,
+ CONSTRAINT HREF_TERRITORY_PKEY PRIMARY KEY (HID)
+)
+WITH (
+ OIDS=FALSE
+);
+
+ALTER TABLE PUBLIC.HREF_TERRITORY
+ OWNER TO PLGM_SERVICE;
+GRANT ALL ON TABLE PUBLIC.HREF_TERRITORY TO PLGM_SERVICE;
+
+
+
+-- PUBLIC.HTBL_LOCK Automatic generanted History Table DDL --
+-- <GENERATED CODE!>
+
+
+CREATE SEQUENCE PUBLIC.HTBL_LOCK_ID_SEQ
+ INCREMENT 1
+ MINVALUE 1
+ MAXVALUE 9223372036854775807
+ START 1
+ CACHE 1;
+
+ALTER TABLE PUBLIC.HTBL_LOCK_ID_SEQ
+ OWNER TO PLGM_SERVICE;
+
+CREATE TABLE PUBLIC.HTBL_LOCK
+(
+ HID integer NOT NULL DEFAULT nextval('HTBL_LOCK_ID_SEQ'::regclass),
+ HACTION integer NOT NULL,
+ HDATE timestamp without time zone NOT NULL,
+ HUSER character varying(100),
+
+ ID integer,
+ KEY integer,
+ USERNAME character varying (50),
+ INFO character varying (256),
+
+ CREATE_USER character varying(100),
+ CREATE_DATE timestamp without time zone,
+ MOD_USER character varying(100),
+ MOD_DATE timestamp without time zone,
+ CONSTRAINT HTBL_LOCK_PKEY PRIMARY KEY (HID)
+)
+WITH (
+ OIDS=FALSE
+);
+
+ALTER TABLE PUBLIC.HTBL_LOCK
+ OWNER TO PLGM_SERVICE;
+GRANT ALL ON TABLE PUBLIC.HTBL_LOCK TO PLGM_SERVICE;
+
+
+
+
+-- PUBLIC.HTBL_USER_SETTINGS Automatic generanted History Table DDL --
+-- <GENERATED CODE!>
+
+CREATE SEQUENCE PUBLIC.HTBL_USER_SETTINGS_ID_SEQ
+ INCREMENT 1
+ MINVALUE 1
+ MAXVALUE 9223372036854775807
+ START 1
+ CACHE 1;
+
+ALTER TABLE PUBLIC.HTBL_USER_SETTINGS_ID_SEQ
+ OWNER TO PLGM_SERVICE;
+
+CREATE TABLE PUBLIC.HTBL_USER_SETTINGS
+(
+ HID integer NOT NULL DEFAULT nextval('HTBL_USER_SETTINGS_ID_SEQ'::regclass),
+ HACTION integer NOT NULL,
+ HDATE timestamp without time zone NOT NULL,
+ HUSER character varying(100),
+
+ ID integer,
+ USERNAME character varying (50),
+ SETTING_TYPE character varying (50),
+ VALUE character varying(4096),
+
+ CREATE_USER character varying(100),
+ CREATE_DATE timestamp without time zone,
+ MOD_USER character varying(100),
+ MOD_DATE timestamp without time zone,
+ CONSTRAINT HTBL_USER_SETTINGS_PKEY PRIMARY KEY (HID)
+)
+WITH (
+ OIDS=FALSE
+);
+
+ALTER TABLE PUBLIC.HTBL_USER_SETTINGS
+ OWNER TO PLGM_SERVICE;
+GRANT ALL ON TABLE PUBLIC.HTBL_USER_SETTINGS TO PLGM_SERVICE;
+
+
+-- PUBLIC.HREF_COST_CENTER Automatic generanted History Table DDL --
+-- <GENERATED CODE!>
+
+CREATE SEQUENCE PUBLIC.HREF_COST_CENTER_ID_SEQ
+ INCREMENT 1
+ MINVALUE 1
+ MAXVALUE 9223372036854775807
+ START 1
+ CACHE 1;
+
+ALTER TABLE PUBLIC.HREF_COST_CENTER_ID_SEQ
+ OWNER TO PLGM_SERVICE;
+
+CREATE TABLE PUBLIC.HREF_COST_CENTER
+(
+ HID integer NOT NULL DEFAULT nextval('HREF_COST_CENTER_ID_SEQ'::regclass),
+ HACTION integer NOT NULL,
+ HDATE timestamp without time zone NOT NULL,
+ HUSER character varying(100),
+
+ ID integer,
+ NAME character varying (50),
+ DESCRIPTION character varying (255),
+
+ CREATE_USER character varying(100),
+ CREATE_DATE timestamp without time zone,
+ MOD_USER character varying(100),
+ MOD_DATE timestamp without time zone,
+ CONSTRAINT HREF_COST_CENTER_PKEY PRIMARY KEY (HID)
+)
+WITH (
+ OIDS=FALSE
+);
+
+ALTER TABLE PUBLIC.HREF_COST_CENTER
+ OWNER TO PLGM_SERVICE;
+GRANT ALL ON TABLE PUBLIC.HREF_COST_CENTER TO PLGM_SERVICE;
+
+-- PUBLIC.HREF_BRANCH Automatic generanted History Table DDL --
+-- <GENERATED CODE!>
+
+CREATE SEQUENCE PUBLIC.HREF_BRANCH_ID_SEQ
+ INCREMENT 1
+ MINVALUE 1
+ MAXVALUE 9223372036854775807
+ START 1
+ CACHE 1;
+
+ALTER TABLE PUBLIC.HREF_BRANCH_ID_SEQ
+ OWNER TO PLGM_SERVICE;
+
+CREATE TABLE PUBLIC.HREF_BRANCH
+(
+ HID integer NOT NULL DEFAULT nextval('HREF_BRANCH_ID_SEQ'::regclass),
+ HACTION integer NOT NULL,
+ HDATE timestamp without time zone NOT NULL,
+ HUSER character varying(100),
+
+ ID integer,
+ NAME character varying (50),
+ DESCRIPTION character varying (255),
+ COLOR_CODE character varying (20),
+ CREATE_USER character varying(100),
+ CREATE_DATE timestamp without time zone,
+ MOD_USER character varying(100),
+ MOD_DATE timestamp without time zone,
+ CONSTRAINT HREF_BRANCH_PKEY PRIMARY KEY (HID)
+)
+WITH (
+ OIDS=FALSE
+);
+
+ALTER TABLE PUBLIC.HREF_BRANCH
+ OWNER TO PLGM_SERVICE;
+GRANT ALL ON TABLE PUBLIC.HREF_BRANCH TO PLGM_SERVICE;
+
+-- PUBLIC.HREF_BRANCH_LEVEL Automatic generanted History Table DDL --
+-- <GENERATED CODE!>
+
+
+CREATE SEQUENCE PUBLIC.HREF_BRANCH_LEVEL_ID_SEQ
+ INCREMENT 1
+ MINVALUE 1
+ MAXVALUE 9223372036854775807
+ START 1
+ CACHE 1;
+
+ALTER TABLE PUBLIC.HREF_BRANCH_LEVEL_ID_SEQ
+ OWNER TO PLGM_SERVICE;
+
+CREATE TABLE PUBLIC.HREF_BRANCH_LEVEL
+(
+ HID integer NOT NULL DEFAULT nextval('HREF_BRANCH_LEVEL_ID_SEQ'::regclass),
+ HACTION integer NOT NULL,
+ HDATE timestamp without time zone NOT NULL,
+ HUSER character varying(100),
+
+ ID integer,
+ NAME character varying (50),
+ DESCRIPTION character varying (255),
+ FK_REF_BRANCH integer,
+
+ CREATE_USER character varying(100),
+ CREATE_DATE timestamp without time zone,
+ MOD_USER character varying(100),
+ MOD_DATE timestamp without time zone,
+ CONSTRAINT HREF_BRANCH_LEVEL_PKEY PRIMARY KEY (HID)
+)
+WITH (
+ OIDS=FALSE
+);
+
+ALTER TABLE PUBLIC.HREF_BRANCH_LEVEL
+ OWNER TO PLGM_SERVICE;
+GRANT ALL ON TABLE PUBLIC.HREF_BRANCH_LEVEL TO PLGM_SERVICE;
+
+
+-- PUBLIC.HREF_GM_STATUS Automatic generanted History Table DDL --
+-- <GENERATED CODE!>
+
+
+CREATE SEQUENCE PUBLIC.HREF_GM_STATUS_ID_SEQ
+ INCREMENT 1
+ MINVALUE 1
+ MAXVALUE 9223372036854775807
+ START 1
+ CACHE 1;
+
+ALTER TABLE PUBLIC.HREF_GM_STATUS_ID_SEQ
+ OWNER TO PLGM_SERVICE;
+
+CREATE TABLE PUBLIC.HREF_GM_STATUS
+(
+ HID integer NOT NULL DEFAULT nextval('HREF_GM_STATUS_ID_SEQ'::regclass),
+ HACTION integer NOT NULL,
+ HDATE timestamp without time zone NOT NULL,
+ HUSER character varying(100),
+
+ ID integer,
+ NAME character varying(50),
+ COLOR_CODE character varying(20),
+
+ CREATE_USER character varying(100),
+ CREATE_DATE timestamp without time zone,
+ MOD_USER character varying(100),
+ MOD_DATE timestamp without time zone,
+ CONSTRAINT HREF_GM_STATUS_PKEY PRIMARY KEY (HID)
+)
+WITH (
+ OIDS=FALSE
+);
+
+ALTER TABLE PUBLIC.HREF_GM_STATUS
+ OWNER TO PLGM_SERVICE;
+GRANT ALL ON TABLE PUBLIC.HREF_GM_STATUS TO PLGM_SERVICE;
+
+
+-- PUBLIC.HTBL_GRIDMEASURE Automatic generanted History Table DDL --
+-- <GENERATED CODE!>
+
+-- REQUESTER_NAME COLUMN DELETED--
+
+
+CREATE SEQUENCE PUBLIC.HTBL_GRIDMEASURE_ID_SEQ
+ INCREMENT 1
+ MINVALUE 1
+ MAXVALUE 9223372036854775807
+ START 1
+ CACHE 1;
+
+ALTER TABLE PUBLIC.HTBL_GRIDMEASURE_ID_SEQ
+ OWNER TO PLGM_SERVICE;
+
+CREATE TABLE PUBLIC.HTBL_GRIDMEASURE
+(
+ HID integer NOT NULL DEFAULT nextval('HTBL_GRIDMEASURE_ID_SEQ'::regclass),
+ HACTION integer NOT NULL,
+ HDATE timestamp without time zone NOT NULL,
+ HUSER character varying(100),
+
+ ID integer,
+ ID_DESCRIPTIVE character varying (50),
+ TITLE character varying (256),
+ AFFECTED_RESOURCE character varying (256),
+ REMARK character varying (1024),
+ EMAIL_ADDRESSES character varying(1024),
+ FK_REF_GM_STATUS integer,
+ SWITCHING_OBJECT character varying (256),
+ COST_CENTER character varying (50),
+ APPROVAL_BY character varying (256),
+ AREA_OF_SWITCHING character varying (256),
+ APPOINTMENT_REPETITION character varying (100),
+ APPOINTMENT_STARTDATE timestamp without time zone,
+ APPOINTMENT_NUMBEROF integer,
+ PLANNED_STARTTIME_FIRST_SINGLEMEASURE timestamp without time zone,
+ ENDTIME_GRIDMEASURE timestamp without time zone,
+ TIME_OF_REALLOCATION character varying (100),
+ DESCRIPTION character varying (1024),
+ FK_REF_BRANCH integer,
+ FK_REF_BRANCH_LEVEL integer,
+ CREATE_USER_DEPARTMENT character varying (100),
+ MOD_USER_DEPARTMENT character varying (100),
+
+ CREATE_USER character varying(100),
+ CREATE_DATE timestamp without time zone,
+ MOD_USER character varying(100),
+ MOD_DATE timestamp without time zone,
+ CONSTRAINT HTBL_GRIDMEASURE_PKEY PRIMARY KEY (HID)
+)
+WITH (
+ OIDS=FALSE
+);
+
+ALTER TABLE PUBLIC.HTBL_GRIDMEASURE
+ OWNER TO PLGM_SERVICE;
+GRANT ALL ON TABLE PUBLIC.HTBL_GRIDMEASURE TO PLGM_SERVICE;
+
+CREATE INDEX HUSER_INDEX ON PUBLIC.HTBL_GRIDMEASURE (HUSER);
+
+
+
+-- PUBLIC.HTBL_ID_COUNTER Automatic generanted History Table DDL --
+-- <GENERATED CODE!>
+
+
+CREATE SEQUENCE PUBLIC.HTBL_ID_COUNTER_ID_SEQ
+ INCREMENT 1
+ MINVALUE 1
+ MAXVALUE 9223372036854775807
+ START 1
+ CACHE 1;
+
+ALTER TABLE PUBLIC.HTBL_ID_COUNTER_ID_SEQ
+ OWNER TO PLGM_SERVICE;
+
+CREATE TABLE PUBLIC.HTBL_ID_COUNTER
+(
+ HID integer NOT NULL DEFAULT nextval('HTBL_ID_COUNTER_ID_SEQ'::regclass),
+ HACTION integer NOT NULL,
+ HDATE timestamp without time zone NOT NULL,
+ HUSER character varying(100),
+
+ ID integer,
+ COUNTER integer,
+ COUNTER_TYPE character varying (256),
+ INFO character varying (256),
+
+ CREATE_USER character varying(100),
+ CREATE_DATE timestamp without time zone,
+ MOD_USER character varying(100),
+ MOD_DATE timestamp without time zone,
+ CONSTRAINT HTBL_ID_COUNTER_PKEY PRIMARY KEY (HID)
+)
+WITH (
+ OIDS=FALSE
+);
+
+ALTER TABLE PUBLIC.HTBL_ID_COUNTER
+ OWNER TO PLGM_SERVICE;
+GRANT ALL ON TABLE PUBLIC.HTBL_ID_COUNTER TO PLGM_SERVICE;
+
+
+
+-- PUBLIC.HTBL_SINGLE_GRIDMEASURE Automatic generanted History Table DDL --
+-- <GENERATED CODE!>
+
+
+CREATE SEQUENCE PUBLIC.HTBL_SINGLE_GRIDMEASURE_ID_SEQ
+ INCREMENT 1
+ MINVALUE 1
+ MAXVALUE 9223372036854775807
+ START 1
+ CACHE 1;
+
+ALTER TABLE PUBLIC.HTBL_SINGLE_GRIDMEASURE_ID_SEQ
+ OWNER TO PLGM_SERVICE;
+
+
+
+CREATE TABLE PUBLIC.HTBL_SINGLE_GRIDMEASURE
+(
+ HID integer NOT NULL DEFAULT nextval('HTBL_SINGLE_GRIDMEASURE_ID_SEQ'::regclass),
+ HACTION integer NOT NULL,
+ HDATE timestamp without time zone NOT NULL,
+ HUSER character varying(100),
+
+ ID integer,
+ SORTORDER integer,
+ TITLE character varying (256),
+ SWITCHING_OBJECT character varying (256),
+ CIM_ID character varying (256),
+ CIM_NAME character varying (256),
+ CIM_DESCRIPTION character varying (1024),
+ RESPONSIBLE_ONSITE_NAME character varying(256),
+ RESPONSIBLE_ONSITE_DEPARTMENT character varying(256),
+ NETWORK_CONTROL character varying (256),
+ PLANNED_STARTTIME_SINGLEMEASURE timestamp without time zone,
+ PLANNED_ENDTIME_SINGLEMEASURE timestamp without time zone,
+ DESCRIPTION character varying (1024),
+ FK_TBL_GRIDMEASURE integer,
+
+ CREATE_USER character varying(100),
+ CREATE_DATE timestamp without time zone,
+ MOD_USER character varying(100),
+ MOD_DATE timestamp without time zone,
+ CONSTRAINT HTBL_SINGLE_GRIDMEASURE_PKEY PRIMARY KEY (HID)
+)
+WITH (
+ OIDS=FALSE
+);
+
+ALTER TABLE PUBLIC.HTBL_SINGLE_GRIDMEASURE
+ OWNER TO PLGM_SERVICE;
+GRANT ALL ON TABLE PUBLIC.HTBL_SINGLE_GRIDMEASURE TO PLGM_SERVICE;
+
+
+
+
+-- PUBLIC.HTBL_STEPS Automatic generanted History Table DDL --
+-- <GENERATED CODE!>
+
+
+CREATE SEQUENCE PUBLIC.HTBL_STEPS_ID_SEQ
+ INCREMENT 1
+ MINVALUE 1
+ MAXVALUE 9223372036854775807
+ START 1
+ CACHE 1;
+
+ALTER TABLE PUBLIC.HTBL_STEPS_ID_SEQ
+ OWNER TO PLGM_SERVICE;
+
+CREATE TABLE PUBLIC.HTBL_STEPS
+(
+ HID integer NOT NULL DEFAULT nextval('HTBL_STEPS_ID_SEQ'::regclass),
+ HACTION integer NOT NULL,
+ HDATE timestamp without time zone NOT NULL,
+ HUSER character varying(100),
+
+ ID integer,
+ SORTORDER integer,
+ SWITCHING_OBJECT character varying (256),
+ TYPE character varying(256),
+ PRESENT_TIME character varying(256),
+ PRESENT_STATE character varying(256),
+ TARGET_STATE character varying (256),
+ OPERATOR character varying(256),
+ FK_TBL_SINGLE_GRIDMEASURE integer,
+ CREATE_USER character varying (100),
+ CREATE_DATE timestamp without time zone,
+ MOD_USER character varying (100),
+ MOD_DATE timestamp without time zone,
+
+ CONSTRAINT HTBL_STEPS_PKEY PRIMARY KEY (HID)
+)
+WITH (
+ OIDS=FALSE
+);
+
+ALTER TABLE PUBLIC.HTBL_STEPS
+ OWNER TO PLGM_SERVICE;
+GRANT ALL ON TABLE PUBLIC.HTBL_STEPS TO PLGM_SERVICE;
+
+
+-- PUBLIC.HTBL_DOCUMENTS Automatic generanted History Table DDL --
+-- <GENERATED CODE!>
+
+
+CREATE SEQUENCE PUBLIC.HTBL_DOCUMENTS_ID_SEQ
+ INCREMENT 1
+ MINVALUE 1
+ MAXVALUE 9223372036854775807
+ START 1
+ CACHE 1;
+
+ALTER TABLE PUBLIC.HTBL_DOCUMENTS_ID_SEQ
+ OWNER TO PLGM_SERVICE;
+
+CREATE TABLE PUBLIC.HTBL_DOCUMENTS
+(
+ HID integer NOT NULL DEFAULT nextval('HTBL_DOCUMENTS_ID_SEQ'::regclass),
+ HACTION integer NOT NULL,
+ HDATE timestamp without time zone NOT NULL,
+ HUSER character varying(100),
+
+ ID integer,
+ DOCUMENT_NAME character varying (260),
+ DOCUMENT bytea,
+
+ CREATE_USER character varying(100),
+ CREATE_DATE timestamp without time zone,
+ MOD_USER character varying(100),
+ MOD_DATE timestamp without time zone,
+ CONSTRAINT HTBL_DOCUMENTS_PKEY PRIMARY KEY (HID)
+)
+WITH (
+ OIDS=FALSE
+);
+
+ALTER TABLE PUBLIC.HTBL_DOCUMENTS
+ OWNER TO PLGM_SERVICE;
+GRANT ALL ON TABLE PUBLIC.HTBL_DOCUMENTS TO PLGM_SERVICE;
+
+-- PUBLIC.HTBL_MEASURE_DOCUMENTS Automatic generanted History Table DDL --
+-- <GENERATED CODE!>
+
+
+CREATE SEQUENCE PUBLIC.HTBL_MEASURE_DOCUMENTS_ID_SEQ
+ INCREMENT 1
+ MINVALUE 1
+ MAXVALUE 9223372036854775807
+ START 1
+ CACHE 1;
+
+ALTER TABLE PUBLIC.HTBL_MEASURE_DOCUMENTS_ID_SEQ
+ OWNER TO PLGM_SERVICE;
+
+CREATE TABLE PUBLIC.HTBL_MEASURE_DOCUMENTS
+(
+ HID integer NOT NULL DEFAULT nextval('HTBL_MEASURE_DOCUMENTS_ID_SEQ'::regclass),
+ HACTION integer NOT NULL,
+ HDATE timestamp without time zone NOT NULL,
+ HUSER character varying(100),
+
+ ID integer,
+ FK_TBL_MEASURE integer,
+ FK_TBL_DOCUMENTS integer,
+
+ CREATE_USER character varying(100),
+ CREATE_DATE timestamp without time zone,
+ MOD_USER character varying(100),
+ MOD_DATE timestamp without time zone,
+ CONSTRAINT HTBL_MEASURE_DOCUMENTS_PKEY PRIMARY KEY (HID)
+)
+WITH (
+ OIDS=FALSE
+);
+
+ALTER TABLE PUBLIC.HTBL_MEASURE_DOCUMENTS
+ OWNER TO PLGM_SERVICE;
+GRANT ALL ON TABLE PUBLIC.HTBL_MEASURE_DOCUMENTS TO PLGM_SERVICE;
+
+-- ----------------------------------------------------------------------------
+-- ----------------------------------------------------------------------------
+-- TRIGGER
+-- ----------------------------------------------------------------------------
+-- ----------------------------------------------------------------------------
+
+-- ---------------------------------------------
+-- TRIGGER REF_TERRITORY
+-- ---------------------------------------------
+
+
+-- PUBLIC.REF_TERRITORY INSERT TRIGGER --
+-- <GENERATED CODE!>
+CREATE OR REPLACE FUNCTION PUBLIC.REF_TERRITORY_INSERT_TRG()
+ RETURNS trigger AS
+$BODY$
+ BEGIN
+ INSERT INTO HREF_TERRITORY (
+ ID,NAME,DESCRIPTION,CREATE_USER,CREATE_DATE,MOD_USER,MOD_DATE,
+
+ HACTION,
+ HDATE,
+ HUSER
+ )
+ VALUES (
+
+ NEW.ID,NEW.NAME,NEW.DESCRIPTION,NEW.CREATE_USER,NEW.CREATE_DATE,NEW.MOD_USER,NEW.MOD_DATE,
+
+ 1,
+ current_timestamp,
+ NEW.CREATE_USER );
+
+ RETURN NEW;
+ END;
+$BODY$
+ LANGUAGE plpgsql VOLATILE
+ COST 100;
+ALTER FUNCTION PUBLIC.REF_TERRITORY_INSERT_TRG()
+ OWNER TO PLGM_SERVICE;
+
+
+DROP TRIGGER IF EXISTS REF_TERRITORY_INSERT_TRG ON PUBLIC.REF_TERRITORY;
+
+CREATE TRIGGER REF_TERRITORY_INSERT_TRG
+ BEFORE INSERT
+ ON PUBLIC.REF_TERRITORY
+ FOR EACH ROW
+ EXECUTE PROCEDURE PUBLIC.REF_TERRITORY_INSERT_TRG();
+
+
+
+-- PUBLIC.REF_TERRITORY UPDATE TRIGGER --
+-- <GENERATED CODE!>
+
+CREATE OR REPLACE FUNCTION PUBLIC.REF_TERRITORY_UPDATE_TRG()
+ RETURNS trigger AS
+$BODY$
+ BEGIN
+ INSERT INTO HREF_TERRITORY (
+ ID,NAME,DESCRIPTION,CREATE_USER,CREATE_DATE,MOD_USER,MOD_DATE,
+
+ HACTION,
+ HDATE,
+ HUSER
+ )
+ VALUES (
+ NEW.ID,NEW.NAME,NEW.DESCRIPTION,NEW.CREATE_USER,NEW.CREATE_DATE,NEW.MOD_USER,NEW.MOD_DATE,
+ 2,
+ current_timestamp,
+ NEW.MOD_USER
+ );
+
+ RETURN NEW;
+ END;
+$BODY$
+ LANGUAGE plpgsql VOLATILE
+ COST 100;
+ALTER FUNCTION PUBLIC.REF_TERRITORY_UPDATE_TRG()
+ OWNER TO PLGM_SERVICE;
+
+DROP TRIGGER IF EXISTS REF_TERRITORY_UPDATE_TRG ON PUBLIC.REF_TERRITORY;
+
+CREATE TRIGGER REF_TERRITORY_UPDATE_TRG
+ BEFORE UPDATE
+ ON PUBLIC.REF_TERRITORY
+ FOR EACH ROW
+ EXECUTE PROCEDURE PUBLIC.REF_TERRITORY_UPDATE_TRG();
+
+
+
+-- PUBLIC.REF_TERRITORY DELETE TRIGGER --
+-- <GENERATED CODE!>
+
+CREATE OR REPLACE FUNCTION PUBLIC.REF_TERRITORY_DELETE_TRG()
+ RETURNS trigger AS
+$BODY$
+ BEGIN
+ IF TG_OP = 'DELETE' THEN
+ INSERT INTO HREF_TERRITORY (
+
+ ID,NAME,DESCRIPTION,CREATE_USER,CREATE_DATE,MOD_USER,MOD_DATE,
+
+ HACTION,
+ HDATE,
+ HUSER
+ )
+ VALUES (
+ OLD.ID,OLD.NAME,OLD.DESCRIPTION,OLD.CREATE_USER,OLD.CREATE_DATE,OLD.MOD_USER,OLD.MOD_DATE,
+
+ 3,
+ current_timestamp,
+ OLD.MOD_USER );
+ END IF;
+
+ RETURN OLD;
+ END;
+$BODY$
+ LANGUAGE plpgsql VOLATILE
+ COST 100;
+ALTER FUNCTION PUBLIC.REF_TERRITORY_DELETE_TRG()
+ OWNER TO PLGM_SERVICE;
+
+DROP TRIGGER IF EXISTS REF_TERRITORY_DELETE_TRG ON PUBLIC.REF_TERRITORY;
+
+CREATE TRIGGER REF_TERRITORY_DELETE_TRG
+ BEFORE DELETE
+ ON PUBLIC.REF_TERRITORY
+ FOR EACH ROW
+ EXECUTE PROCEDURE PUBLIC.REF_TERRITORY_DELETE_TRG();
+
+
+
+-- PUBLIC.TBL_ID_COUNTER INSERT TRIGGER --
+-- <GENERATED CODE!>
+CREATE OR REPLACE FUNCTION PUBLIC.TBL_ID_COUNTER_INSERT_TRG()
+ RETURNS trigger AS
+$BODY$
+ BEGIN
+ INSERT INTO HTBL_ID_COUNTER (
+ ID,COUNTER,COUNTER_TYPE,INFO,CREATE_USER,CREATE_DATE,MOD_USER,MOD_DATE,
+
+ HACTION,
+ HDATE,
+ HUSER
+ )
+ VALUES (
+
+ NEW.ID,NEW.COUNTER,NEW.COUNTER_TYPE,NEW.INFO,NEW.CREATE_USER,NEW.CREATE_DATE,NEW.MOD_USER,NEW.MOD_DATE,
+
+ 1,
+ current_timestamp,
+ NEW.CREATE_USER );
+
+ RETURN NEW;
+ END;
+$BODY$
+ LANGUAGE plpgsql VOLATILE
+ COST 100;
+ALTER FUNCTION PUBLIC.TBL_ID_COUNTER_INSERT_TRG()
+ OWNER TO PLGM_SERVICE;
+
+
+DROP TRIGGER IF EXISTS TBL_ID_COUNTER_INSERT_TRG ON PUBLIC.TBL_ID_COUNTER;
+
+CREATE TRIGGER TBL_ID_COUNTER_INSERT_TRG
+ BEFORE INSERT
+ ON PUBLIC.TBL_ID_COUNTER
+ FOR EACH ROW
+ EXECUTE PROCEDURE PUBLIC.TBL_ID_COUNTER_INSERT_TRG();
+
+
+
+-- PUBLIC.TBL_ID_COUNTER UPDATE TRIGGER --
+-- <GENERATED CODE!>
+
+CREATE OR REPLACE FUNCTION PUBLIC.TBL_ID_COUNTER_UPDATE_TRG()
+ RETURNS trigger AS
+$BODY$
+ BEGIN
+ INSERT INTO HTBL_ID_COUNTER (
+ ID,COUNTER,COUNTER_TYPE,INFO,CREATE_USER,CREATE_DATE,MOD_USER,MOD_DATE,
+
+ HACTION,
+ HDATE,
+ HUSER
+ )
+ VALUES (
+ NEW.ID,NEW.COUNTER,NEW.COUNTER_TYPE,NEW.INFO,NEW.CREATE_USER,NEW.CREATE_DATE,NEW.MOD_USER,NEW.MOD_DATE,
+ 2,
+ current_timestamp,
+ NEW.MOD_USER
+ );
+
+ RETURN NEW;
+ END;
+$BODY$
+ LANGUAGE plpgsql VOLATILE
+ COST 100;
+ALTER FUNCTION PUBLIC.TBL_ID_COUNTER_UPDATE_TRG()
+ OWNER TO PLGM_SERVICE;
+
+DROP TRIGGER IF EXISTS TBL_ID_COUNTER_UPDATE_TRG ON PUBLIC.TBL_ID_COUNTER;
+
+CREATE TRIGGER TBL_ID_COUNTER_UPDATE_TRG
+ BEFORE UPDATE
+ ON PUBLIC.TBL_ID_COUNTER
+ FOR EACH ROW
+ EXECUTE PROCEDURE PUBLIC.TBL_ID_COUNTER_UPDATE_TRG();
+
+
+
+-- PUBLIC.TBL_ID_COUNTER DELETE TRIGGER --
+-- <GENERATED CODE!>
+
+CREATE OR REPLACE FUNCTION PUBLIC.TBL_ID_COUNTER_DELETE_TRG()
+ RETURNS trigger AS
+$BODY$
+ BEGIN
+ IF TG_OP = 'DELETE' THEN
+ INSERT INTO HTBL_ID_COUNTER (
+
+ ID,COUNTER,COUNTER_TYPE,INFO,CREATE_USER,CREATE_DATE,MOD_USER,MOD_DATE,
+
+ HACTION,
+ HDATE,
+ HUSER
+ )
+ VALUES (
+ OLD.ID,OLD.COUNTER,OLD.COUNTER_TYPE,OLD.INFO,OLD.CREATE_USER,OLD.CREATE_DATE,OLD.MOD_USER,OLD.MOD_DATE,
+
+ 3,
+ current_timestamp,
+ OLD.MOD_USER );
+ END IF;
+
+ RETURN OLD;
+ END;
+$BODY$
+ LANGUAGE plpgsql VOLATILE
+ COST 100;
+ALTER FUNCTION PUBLIC.TBL_ID_COUNTER_DELETE_TRG()
+ OWNER TO PLGM_SERVICE;
+
+DROP TRIGGER IF EXISTS TBL_ID_COUNTER_DELETE_TRG ON PUBLIC.TBL_ID_COUNTER;
+
+CREATE TRIGGER TBL_ID_COUNTER_DELETE_TRG
+ BEFORE DELETE
+ ON PUBLIC.TBL_ID_COUNTER
+ FOR EACH ROW
+ EXECUTE PROCEDURE PUBLIC.TBL_ID_COUNTER_DELETE_TRG();
+
+
+
+-- PUBLIC.TBL_SINGLE_GRIDMEASURE INSERT TRIGGER --
+-- <GENERATED CODE!>
+CREATE OR REPLACE FUNCTION PUBLIC.TBL_SINGLE_GRIDMEASURE_INSERT_TRG()
+ RETURNS trigger AS
+$BODY$
+ BEGIN
+ INSERT INTO HTBL_SINGLE_GRIDMEASURE (
+ ID,SORTORDER,TITLE,SWITCHING_OBJECT,CIM_ID,CIM_NAME,CIM_DESCRIPTION,PLANNED_STARTTIME_SINGLEMEASURE,PLANNED_ENDTIME_SINGLEMEASURE,DESCRIPTION, RESPONSIBLE_ONSITE_NAME, RESPONSIBLE_ONSITE_DEPARTMENT,NETWORK_CONTROL,FK_TBL_GRIDMEASURE,CREATE_USER,CREATE_DATE,MOD_USER,MOD_DATE,
+
+ HACTION,
+ HDATE,
+ HUSER
+ )
+ VALUES (
+
+ NEW.ID,NEW.SORTORDER,NEW.TITLE,NEW.SWITCHING_OBJECT,NEW.CIM_ID,NEW.CIM_NAME,NEW.CIM_DESCRIPTION,NEW.PLANNED_STARTTIME_SINGLEMEASURE,NEW.PLANNED_ENDTIME_SINGLEMEASURE,NEW.DESCRIPTION, NEW.RESPONSIBLE_ONSITE_NAME, NEW.RESPONSIBLE_ONSITE_DEPARTMENT,NEW.NETWORK_CONTROL,NEW.FK_TBL_GRIDMEASURE,NEW.CREATE_USER,NEW.CREATE_DATE,NEW.MOD_USER,NEW.MOD_DATE,
+
+ 1,
+ current_timestamp,
+ NEW.CREATE_USER );
+
+ RETURN NEW;
+ END;
+$BODY$
+ LANGUAGE plpgsql VOLATILE
+ COST 100;
+ALTER FUNCTION PUBLIC.TBL_SINGLE_GRIDMEASURE_INSERT_TRG()
+ OWNER TO PLGM_SERVICE;
+
+
+DROP TRIGGER IF EXISTS TBL_SINGLE_GRIDMEASURE_INSERT_TRG ON PUBLIC.TBL_SINGLE_GRIDMEASURE;
+
+CREATE TRIGGER TBL_SINGLE_GRIDMEASURE_INSERT_TRG
+ BEFORE INSERT
+ ON PUBLIC.TBL_SINGLE_GRIDMEASURE
+ FOR EACH ROW
+ EXECUTE PROCEDURE PUBLIC.TBL_SINGLE_GRIDMEASURE_INSERT_TRG();
+
+
+
+-- PUBLIC.TBL_SINGLE_GRIDMEASURE UPDATE TRIGGER --
+-- <GENERATED CODE!>
+
+CREATE OR REPLACE FUNCTION PUBLIC.TBL_SINGLE_GRIDMEASURE_UPDATE_TRG()
+ RETURNS trigger AS
+$BODY$
+ BEGIN
+ INSERT INTO HTBL_SINGLE_GRIDMEASURE (
+ ID,SORTORDER,TITLE,SWITCHING_OBJECT,CIM_ID,CIM_NAME,CIM_DESCRIPTION,PLANNED_STARTTIME_SINGLEMEASURE,PLANNED_ENDTIME_SINGLEMEASURE,DESCRIPTION,RESPONSIBLE_ONSITE_NAME, RESPONSIBLE_ONSITE_DEPARTMENT,NETWORK_CONTROL,FK_TBL_GRIDMEASURE,CREATE_USER,CREATE_DATE,MOD_USER,MOD_DATE,
+
+ HACTION,
+ HDATE,
+ HUSER
+ )
+ VALUES (
+ NEW.ID,NEW.SORTORDER,NEW.TITLE,NEW.SWITCHING_OBJECT,NEW.CIM_ID,NEW.CIM_NAME,NEW.CIM_DESCRIPTION,NEW.PLANNED_STARTTIME_SINGLEMEASURE,NEW.PLANNED_ENDTIME_SINGLEMEASURE,NEW.DESCRIPTION,NEW.RESPONSIBLE_ONSITE_NAME, NEW.RESPONSIBLE_ONSITE_DEPARTMENT,NEW.NETWORK_CONTROL,NEW.FK_TBL_GRIDMEASURE,NEW.CREATE_USER,NEW.CREATE_DATE,NEW.MOD_USER,NEW.MOD_DATE,
+ 2,
+ current_timestamp,
+ NEW.MOD_USER
+ );
+
+ RETURN NEW;
+ END;
+$BODY$
+ LANGUAGE plpgsql VOLATILE
+ COST 100;
+ALTER FUNCTION PUBLIC.TBL_SINGLE_GRIDMEASURE_UPDATE_TRG()
+ OWNER TO PLGM_SERVICE;
+
+DROP TRIGGER IF EXISTS TBL_SINGLE_GRIDMEASURE_UPDATE_TRG ON PUBLIC.TBL_SINGLE_GRIDMEASURE;
+
+CREATE TRIGGER TBL_SINGLE_GRIDMEASURE_UPDATE_TRG
+ BEFORE UPDATE
+ ON PUBLIC.TBL_SINGLE_GRIDMEASURE
+ FOR EACH ROW
+ EXECUTE PROCEDURE PUBLIC.TBL_SINGLE_GRIDMEASURE_UPDATE_TRG();
+
+
+
+-- PUBLIC.TBL_SINGLE_GRIDMEASURE DELETE TRIGGER --
+-- <GENERATED CODE!>
+
+CREATE OR REPLACE FUNCTION PUBLIC.TBL_SINGLE_GRIDMEASURE_DELETE_TRG()
+ RETURNS trigger AS
+$BODY$
+ BEGIN
+ IF TG_OP = 'DELETE' THEN
+ INSERT INTO HTBL_SINGLE_GRIDMEASURE (
+
+ ID,SORTORDER,TITLE,SWITCHING_OBJECT,CIM_ID,CIM_NAME,CIM_DESCRIPTION,PLANNED_STARTTIME_SINGLEMEASURE,PLANNED_ENDTIME_SINGLEMEASURE,DESCRIPTION,RESPONSIBLE_ONSITE_NAME, RESPONSIBLE_ONSITE_DEPARTMENT, NETWORK_CONTROL,FK_TBL_GRIDMEASURE,CREATE_USER,CREATE_DATE,MOD_USER,MOD_DATE,
+
+ HACTION,
+ HDATE,
+ HUSER
+ )
+ VALUES (
+ OLD.ID,OLD.SORTORDER,OLD.TITLE,OLD.SWITCHING_OBJECT,OLD.CIM_ID,OLD.CIM_NAME,OLD.CIM_DESCRIPTION,OLD.PLANNED_STARTTIME_SINGLEMEASURE,OLD.PLANNED_ENDTIME_SINGLEMEASURE,OLD.DESCRIPTION,OLD.RESPONSIBLE_ONSITE_NAME, OLD.RESPONSIBLE_ONSITE_DEPARTMENT,OLD.NETWORK_CONTROL,OLD.FK_TBL_GRIDMEASURE,OLD.CREATE_USER,OLD.CREATE_DATE,OLD.MOD_USER,OLD.MOD_DATE,
+
+ 3,
+ current_timestamp,
+ OLD.MOD_USER );
+ END IF;
+
+ RETURN OLD;
+ END;
+$BODY$
+ LANGUAGE plpgsql VOLATILE
+ COST 100;
+ALTER FUNCTION PUBLIC.TBL_SINGLE_GRIDMEASURE_DELETE_TRG()
+ OWNER TO PLGM_SERVICE;
+
+DROP TRIGGER IF EXISTS TBL_SINGLE_GRIDMEASURE_DELETE_TRG ON PUBLIC.TBL_SINGLE_GRIDMEASURE;
+
+CREATE TRIGGER TBL_SINGLE_GRIDMEASURE_DELETE_TRG
+ BEFORE DELETE
+ ON PUBLIC.TBL_SINGLE_GRIDMEASURE
+ FOR EACH ROW
+ EXECUTE PROCEDURE PUBLIC.TBL_SINGLE_GRIDMEASURE_DELETE_TRG();
+
+
+
+
+
+-- PUBLIC.TBL_STEPS INSERT TRIGGER --
+-- <GENERATED CODE!>
+CREATE OR REPLACE FUNCTION PUBLIC.TBL_STEPS_INSERT_TRG()
+ RETURNS trigger AS
+$BODY$
+ BEGIN
+ INSERT INTO HTBL_STEPS (
+ ID,SORTORDER,SWITCHING_OBJECT,TYPE,PRESENT_TIME, PRESENT_STATE, TARGET_STATE, OPERATOR, FK_TBL_SINGLE_GRIDMEASURE,CREATE_USER,CREATE_DATE,MOD_USER,MOD_DATE,
+
+ HACTION,
+ HDATE,
+ HUSER
+ )
+ VALUES (
+
+ NEW.ID,NEW.SORTORDER,NEW.SWITCHING_OBJECT,NEW.TYPE, NEW.PRESENT_TIME, NEW.PRESENT_STATE, NEW.TARGET_STATE, NEW.OPERATOR, NEW.FK_TBL_SINGLE_GRIDMEASURE,NEW.CREATE_USER,NEW.CREATE_DATE,NEW.MOD_USER,NEW.MOD_DATE,
+
+ 1,
+ current_timestamp,
+ NEW.CREATE_USER );
+
+ RETURN NEW;
+ END;
+$BODY$
+ LANGUAGE plpgsql VOLATILE
+ COST 100;
+ALTER FUNCTION PUBLIC.TBL_STEPS_INSERT_TRG()
+ OWNER TO PLGM_SERVICE;
+
+DROP TRIGGER IF EXISTS TBL_STEPS_INSERT_TRG ON PUBLIC.TBL_STEPS;
+
+CREATE TRIGGER TBL_STEPS_INSERT_TRG
+ BEFORE INSERT
+ ON PUBLIC.TBL_STEPS
+ FOR EACH ROW
+ EXECUTE PROCEDURE PUBLIC.TBL_STEPS_INSERT_TRG();
+
+
+
+-- PUBLIC.TBL_STEPS UPDATE TRIGGER --
+-- <GENERATED CODE!>
+
+CREATE OR REPLACE FUNCTION PUBLIC.TBL_STEPS_UPDATE_TRG()
+ RETURNS trigger AS
+$BODY$
+ BEGIN
+ INSERT INTO HTBL_STEPS (
+ ID,SORTORDER,SWITCHING_OBJECT,TYPE,PRESENT_TIME, PRESENT_STATE, TARGET_STATE, OPERATOR,FK_TBL_SINGLE_GRIDMEASURE,CREATE_USER,CREATE_DATE,MOD_USER,MOD_DATE,
+
+ HACTION,
+ HDATE,
+ HUSER
+ )
+ VALUES (
+ NEW.ID,NEW.SORTORDER,NEW.SWITCHING_OBJECT,NEW.TYPE,NEW.PRESENT_TIME, NEW.PRESENT_STATE, NEW.TARGET_STATE, NEW.OPERATOR,NEW.FK_TBL_SINGLE_GRIDMEASURE,NEW.CREATE_USER,NEW.CREATE_DATE,NEW.MOD_USER,NEW.MOD_DATE,
+ 2,
+ current_timestamp,
+ NEW.MOD_USER
+ );
+
+ RETURN NEW;
+ END;
+$BODY$
+ LANGUAGE plpgsql VOLATILE
+ COST 100;
+ALTER FUNCTION PUBLIC.TBL_STEPS_UPDATE_TRG()
+ OWNER TO PLGM_SERVICE;
+
+DROP TRIGGER IF EXISTS TBL_STEPS_UPDATE_TRG ON PUBLIC.TBL_STEPS;
+
+CREATE TRIGGER TBL_STEPS_UPDATE_TRG
+ BEFORE UPDATE
+ ON PUBLIC.TBL_STEPS
+ FOR EACH ROW
+ EXECUTE PROCEDURE PUBLIC.TBL_STEPS_UPDATE_TRG();
+
+
+
+-- PUBLIC.TBL_STEPS DELETE TRIGGER --
+-- <GENERATED CODE!>
+
+CREATE OR REPLACE FUNCTION PUBLIC.TBL_STEPS_DELETE_TRG()
+ RETURNS trigger AS
+$BODY$
+ BEGIN
+ IF TG_OP = 'DELETE' THEN
+ INSERT INTO HTBL_STEPS (
+
+ ID,SORTORDER,SWITCHING_OBJECT,TYPE,PRESENT_TIME, PRESENT_STATE, TARGET_STATE, OPERATOR,FK_TBL_SINGLE_GRIDMEASURE,CREATE_USER,CREATE_DATE,MOD_USER,MOD_DATE,
+
+ HACTION,
+ HDATE,
+ HUSER
+ )
+ VALUES (
+ OLD.ID,OLD.SORTORDER,OLD.SWITCHING_OBJECT,OLD.TYPE,OLD.PRESENT_TIME, OLD.PRESENT_STATE, OLD.TARGET_STATE, OLD.OPERATOR,OLD.FK_TBL_SINGLE_GRIDMEASURE,OLD.CREATE_USER,OLD.CREATE_DATE,OLD.MOD_USER,OLD.MOD_DATE,
+
+ 3,
+ current_timestamp,
+ OLD.MOD_USER );
+ END IF;
+
+ RETURN OLD;
+ END;
+$BODY$
+ LANGUAGE plpgsql VOLATILE
+ COST 100;
+ALTER FUNCTION PUBLIC.TBL_STEPS_DELETE_TRG()
+ OWNER TO PLGM_SERVICE;
+
+DROP TRIGGER IF EXISTS TBL_STEPS_DELETE_TRG ON PUBLIC.TBL_STEPS;
+
+CREATE TRIGGER TBL_STEPS_DELETE_TRG
+ BEFORE DELETE
+ ON PUBLIC.TBL_STEPS
+ FOR EACH ROW
+ EXECUTE PROCEDURE PUBLIC.TBL_STEPS_DELETE_TRG();
+
+
+-- PUBLIC.TBL_LOCK INSERT TRIGGER --
+-- <GENERATED CODE!>
+CREATE OR REPLACE FUNCTION PUBLIC.TBL_LOCK_INSERT_TRG()
+ RETURNS trigger AS
+$BODY$
+ BEGIN
+ INSERT INTO HTBL_LOCK (
+ ID,KEY,USERNAME,INFO,CREATE_USER,CREATE_DATE,MOD_USER,MOD_DATE,
+
+ HACTION,
+ HDATE,
+ HUSER
+ )
+ VALUES (
+
+ NEW.ID,NEW.KEY,NEW.USERNAME,NEW.INFO,NEW.CREATE_USER,NEW.CREATE_DATE,NEW.MOD_USER,NEW.MOD_DATE,
+
+ 1,
+ current_timestamp,
+ NEW.CREATE_USER );
+
+ RETURN NEW;
+ END;
+$BODY$
+ LANGUAGE plpgsql VOLATILE
+ COST 100;
+ALTER FUNCTION PUBLIC.TBL_LOCK_INSERT_TRG()
+ OWNER TO PLGM_SERVICE;
+
+
+DROP TRIGGER IF EXISTS TBL_LOCK_INSERT_TRG ON PUBLIC.TBL_LOCK;
+
+CREATE TRIGGER TBL_LOCK_INSERT_TRG
+ BEFORE INSERT
+ ON PUBLIC.TBL_LOCK
+ FOR EACH ROW
+ EXECUTE PROCEDURE PUBLIC.TBL_LOCK_INSERT_TRG();
+
+
+
+-- PUBLIC.TBL_LOCK UPDATE TRIGGER --
+-- <GENERATED CODE!>
+
+CREATE OR REPLACE FUNCTION PUBLIC.TBL_LOCK_UPDATE_TRG()
+ RETURNS trigger AS
+$BODY$
+ BEGIN
+ INSERT INTO HTBL_LOCK (
+ ID,KEY,USERNAME,INFO,CREATE_USER,CREATE_DATE,MOD_USER,MOD_DATE,
+
+ HACTION,
+ HDATE,
+ HUSER
+ )
+ VALUES (
+ NEW.ID,NEW.KEY,NEW.USERNAME,NEW.INFO,NEW.CREATE_USER,NEW.CREATE_DATE,NEW.MOD_USER,NEW.MOD_DATE,
+ 2,
+ current_timestamp,
+ NEW.MOD_USER
+ );
+
+ RETURN NEW;
+ END;
+$BODY$
+ LANGUAGE plpgsql VOLATILE
+ COST 100;
+ALTER FUNCTION PUBLIC.TBL_LOCK_UPDATE_TRG()
+ OWNER TO PLGM_SERVICE;
+
+DROP TRIGGER IF EXISTS TBL_LOCK_UPDATE_TRG ON PUBLIC.TBL_LOCK;
+
+CREATE TRIGGER TBL_LOCK_UPDATE_TRG
+ BEFORE UPDATE
+ ON PUBLIC.TBL_LOCK
+ FOR EACH ROW
+ EXECUTE PROCEDURE PUBLIC.TBL_LOCK_UPDATE_TRG();
+
+
+
+-- PUBLIC.TBL_LOCK DELETE TRIGGER --
+-- <GENERATED CODE!>
+
+CREATE OR REPLACE FUNCTION PUBLIC.TBL_LOCK_DELETE_TRG()
+ RETURNS trigger AS
+$BODY$
+ BEGIN
+ IF TG_OP = 'DELETE' THEN
+ INSERT INTO HTBL_LOCK (
+
+ ID,KEY,USERNAME,INFO,CREATE_USER,CREATE_DATE,MOD_USER,MOD_DATE,
+
+ HACTION,
+ HDATE,
+ HUSER
+ )
+ VALUES (
+ OLD.ID,OLD.KEY,OLD.USERNAME,OLD.INFO,OLD.CREATE_USER,OLD.CREATE_DATE,OLD.MOD_USER,OLD.MOD_DATE,
+
+ 3,
+ current_timestamp,
+ OLD.MOD_USER );
+ END IF;
+
+ RETURN OLD;
+ END;
+$BODY$
+ LANGUAGE plpgsql VOLATILE
+ COST 100;
+ALTER FUNCTION PUBLIC.TBL_LOCK_DELETE_TRG()
+ OWNER TO PLGM_SERVICE;
+
+DROP TRIGGER IF EXISTS TBL_LOCK_DELETE_TRG ON PUBLIC.TBL_LOCK;
+
+CREATE TRIGGER TBL_LOCK_DELETE_TRG
+ BEFORE DELETE
+ ON PUBLIC.TBL_LOCK
+ FOR EACH ROW
+ EXECUTE PROCEDURE PUBLIC.TBL_LOCK_DELETE_TRG();
+
+
+
+
+-- PUBLIC.TBL_USER_SETTINGS INSERT TRIGGER --
+-- <GENERATED CODE!>
+CREATE OR REPLACE FUNCTION PUBLIC.TBL_USER_SETTINGS_INSERT_TRG()
+ RETURNS trigger AS
+$BODY$
+ BEGIN
+ INSERT INTO HTBL_USER_SETTINGS (
+ ID,USERNAME,SETTING_TYPE,VALUE,CREATE_USER,CREATE_DATE,MOD_USER,MOD_DATE,
+
+ HACTION,
+ HDATE,
+ HUSER
+ )
+ VALUES (
+
+ NEW.ID,NEW.USERNAME,NEW.SETTING_TYPE,NEW.VALUE,NEW.CREATE_USER,NEW.CREATE_DATE,NEW.MOD_USER,NEW.MOD_DATE,
+
+ 1,
+ current_timestamp,
+ NEW.CREATE_USER );
+
+ RETURN NEW;
+ END;
+$BODY$
+ LANGUAGE plpgsql VOLATILE
+ COST 100;
+ALTER FUNCTION PUBLIC.TBL_USER_SETTINGS_INSERT_TRG()
+ OWNER TO PLGM_SERVICE;
+
+
+DROP TRIGGER IF EXISTS TBL_USER_SETTINGS_INSERT_TRG ON PUBLIC.TBL_USER_SETTINGS;
+
+CREATE TRIGGER TBL_USER_SETTINGS_INSERT_TRG
+ BEFORE INSERT
+ ON PUBLIC.TBL_USER_SETTINGS
+ FOR EACH ROW
+ EXECUTE PROCEDURE PUBLIC.TBL_USER_SETTINGS_INSERT_TRG();
+
+
+
+-- PUBLIC.TBL_USER_SETTINGS UPDATE TRIGGER --
+-- <GENERATED CODE!>
+
+CREATE OR REPLACE FUNCTION PUBLIC.TBL_USER_SETTINGS_UPDATE_TRG()
+ RETURNS trigger AS
+$BODY$
+ BEGIN
+ INSERT INTO HTBL_USER_SETTINGS (
+ ID,USERNAME,SETTING_TYPE,VALUE,CREATE_USER,CREATE_DATE,MOD_USER,MOD_DATE,
+
+ HACTION,
+ HDATE,
+ HUSER
+ )
+ VALUES (
+ NEW.ID,NEW.USERNAME,NEW.SETTING_TYPE,NEW.VALUE,NEW.CREATE_USER,NEW.CREATE_DATE,NEW.MOD_USER,NEW.MOD_DATE,
+ 2,
+ current_timestamp,
+ NEW.MOD_USER
+ );
+
+ RETURN NEW;
+ END;
+$BODY$
+ LANGUAGE plpgsql VOLATILE
+ COST 100;
+ALTER FUNCTION PUBLIC.TBL_USER_SETTINGS_UPDATE_TRG()
+ OWNER TO PLGM_SERVICE;
+
+DROP TRIGGER IF EXISTS TBL_USER_SETTINGS_UPDATE_TRG ON PUBLIC.TBL_USER_SETTINGS;
+
+CREATE TRIGGER TBL_USER_SETTINGS_UPDATE_TRG
+ BEFORE UPDATE
+ ON PUBLIC.TBL_USER_SETTINGS
+ FOR EACH ROW
+ EXECUTE PROCEDURE PUBLIC.TBL_USER_SETTINGS_UPDATE_TRG();
+
+
+
+-- PUBLIC.TBL_USER_SETTINGS DELETE TRIGGER --
+-- <GENERATED CODE!>
+
+CREATE OR REPLACE FUNCTION PUBLIC.TBL_USER_SETTINGS_DELETE_TRG()
+ RETURNS trigger AS
+$BODY$
+ BEGIN
+ IF TG_OP = 'DELETE' THEN
+ INSERT INTO HTBL_USER_SETTINGS (
+
+ ID,USERNAME,SETTING_TYPE,VALUE,CREATE_USER,CREATE_DATE,MOD_USER,MOD_DATE,
+
+ HACTION,
+ HDATE,
+ HUSER
+ )
+ VALUES (
+ OLD.ID,OLD.USERNAME,OLD.SETTING_TYPE,OLD.VALUE,OLD.CREATE_USER,OLD.CREATE_DATE,OLD.MOD_USER,OLD.MOD_DATE,
+
+ 3,
+ current_timestamp,
+ OLD.MOD_USER );
+ END IF;
+
+ RETURN OLD;
+ END;
+$BODY$
+ LANGUAGE plpgsql VOLATILE
+ COST 100;
+ALTER FUNCTION PUBLIC.TBL_USER_SETTINGS_DELETE_TRG()
+ OWNER TO PLGM_SERVICE;
+
+DROP TRIGGER IF EXISTS TBL_USER_SETTINGS_DELETE_TRG ON PUBLIC.TBL_USER_SETTINGS;
+
+CREATE TRIGGER TBL_USER_SETTINGS_DELETE_TRG
+ BEFORE DELETE
+ ON PUBLIC.TBL_USER_SETTINGS
+ FOR EACH ROW
+ EXECUTE PROCEDURE PUBLIC.TBL_USER_SETTINGS_DELETE_TRG();
+
+
+-- PUBLIC.HREF_COST_CENTER INSERT TRIGGER --
+-- <GENERATED CODE!>
+CREATE OR REPLACE FUNCTION PUBLIC.HREF_COST_CENTER_INSERT_TRG()
+ RETURNS trigger AS
+$BODY$
+ BEGIN
+ INSERT INTO HHREF_COST_CENTER (
+ HID,HACTION,HDATE,HUSER,ID,NAME,DESCRIPTION,CREATE_USER,CREATE_DATE,MOD_USER,MOD_DATE,
+
+ HACTION,
+ HDATE,
+ HUSER
+ )
+ VALUES (
+
+ NEW.HID,NEW.HACTION,NEW.HDATE,NEW.HUSER,NEW.ID,NEW.NAME,NEW.DESCRIPTION,NEW.CREATE_USER,NEW.CREATE_DATE,NEW.MOD_USER,NEW.MOD_DATE,
+
+ 1,
+ current_timestamp,
+ NEW.CREATE_USER );
+
+ RETURN NEW;
+ END;
+$BODY$
+ LANGUAGE plpgsql VOLATILE
+ COST 100;
+ALTER FUNCTION PUBLIC.HREF_COST_CENTER_INSERT_TRG()
+ OWNER TO PLGM_SERVICE;
+
+
+DROP TRIGGER IF EXISTS HREF_COST_CENTER_INSERT_TRG ON PUBLIC.HREF_COST_CENTER;
+
+CREATE TRIGGER HREF_COST_CENTER_INSERT_TRG
+ BEFORE INSERT
+ ON PUBLIC.HREF_COST_CENTER
+ FOR EACH ROW
+ EXECUTE PROCEDURE PUBLIC.HREF_COST_CENTER_INSERT_TRG();
+
+
+
+-- PUBLIC.HREF_COST_CENTER UPDATE TRIGGER --
+-- <GENERATED CODE!>
+
+CREATE OR REPLACE FUNCTION PUBLIC.HREF_COST_CENTER_UPDATE_TRG()
+ RETURNS trigger AS
+$BODY$
+ BEGIN
+ INSERT INTO HHREF_COST_CENTER (
+ HID,HACTION,HDATE,HUSER,ID,NAME,DESCRIPTION,CREATE_USER,CREATE_DATE,MOD_USER,MOD_DATE,
+
+ HACTION,
+ HDATE,
+ HUSER
+ )
+ VALUES (
+ NEW.HID,NEW.HACTION,NEW.HDATE,NEW.HUSER,NEW.ID,NEW.NAME,NEW.DESCRIPTION,NEW.CREATE_USER,NEW.CREATE_DATE,NEW.MOD_USER,NEW.MOD_DATE,
+ 2,
+ current_timestamp,
+ NEW.MOD_USER
+ );
+
+ RETURN NEW;
+ END;
+$BODY$
+ LANGUAGE plpgsql VOLATILE
+ COST 100;
+ALTER FUNCTION PUBLIC.HREF_COST_CENTER_UPDATE_TRG()
+ OWNER TO PLGM_SERVICE;
+
+DROP TRIGGER IF EXISTS HREF_COST_CENTER_UPDATE_TRG ON PUBLIC.HREF_COST_CENTER;
+
+CREATE TRIGGER HREF_COST_CENTER_UPDATE_TRG
+ BEFORE UPDATE
+ ON PUBLIC.HREF_COST_CENTER
+ FOR EACH ROW
+ EXECUTE PROCEDURE PUBLIC.HREF_COST_CENTER_UPDATE_TRG();
+
+
+
+-- PUBLIC.HREF_COST_CENTER DELETE TRIGGER --
+-- <GENERATED CODE!>
+
+CREATE OR REPLACE FUNCTION PUBLIC.HREF_COST_CENTER_DELETE_TRG()
+ RETURNS trigger AS
+$BODY$
+ BEGIN
+ IF TG_OP = 'DELETE' THEN
+ INSERT INTO HHREF_COST_CENTER (
+
+ HID,HACTION,HDATE,HUSER,ID,NAME,DESCRIPTION,CREATE_USER,CREATE_DATE,MOD_USER,MOD_DATE,
+
+ HACTION,
+ HDATE,
+ HUSER
+ )
+ VALUES (
+ OLD.HID,OLD.HACTION,OLD.HDATE,OLD.HUSER,OLD.ID,OLD.NAME,OLD.DESCRIPTION,OLD.CREATE_USER,OLD.CREATE_DATE,OLD.MOD_USER,OLD.MOD_DATE,
+
+ 3,
+ current_timestamp,
+ OLD.MOD_USER );
+ END IF;
+
+ RETURN OLD;
+ END;
+$BODY$
+ LANGUAGE plpgsql VOLATILE
+ COST 100;
+ALTER FUNCTION PUBLIC.HREF_COST_CENTER_DELETE_TRG()
+ OWNER TO PLGM_SERVICE;
+
+DROP TRIGGER IF EXISTS HREF_COST_CENTER_DELETE_TRG ON PUBLIC.HREF_COST_CENTER;
+
+CREATE TRIGGER HREF_COST_CENTER_DELETE_TRG
+ BEFORE DELETE
+ ON PUBLIC.HREF_COST_CENTER
+ FOR EACH ROW
+ EXECUTE PROCEDURE PUBLIC.HREF_COST_CENTER_DELETE_TRG();
+
+
+
+-- PUBLIC.REF_BRANCH INSERT TRIGGER --
+-- <GENERATED CODE!>
+CREATE OR REPLACE FUNCTION PUBLIC.REF_BRANCH_INSERT_TRG()
+ RETURNS trigger AS
+$BODY$
+ BEGIN
+ INSERT INTO HREF_BRANCH (
+
+ ID,NAME,DESCRIPTION,COLOR_CODE,CREATE_USER,CREATE_DATE,MOD_USER,MOD_DATE,
+
+ HACTION,
+ HDATE,
+ HUSER
+ )
+ VALUES (
+
+ NEW.ID,NEW.NAME,NEW.DESCRIPTION,NEW.COLOR_CODE,NEW.CREATE_USER,NEW.CREATE_DATE,NEW.MOD_USER,NEW.MOD_DATE,
+ 1,
+ current_timestamp,
+ NEW.CREATE_USER );
+
+ RETURN NEW;
+ END;
+$BODY$
+ LANGUAGE plpgsql VOLATILE
+ COST 100;
+ALTER FUNCTION PUBLIC.REF_BRANCH_INSERT_TRG()
+ OWNER TO PLGM_SERVICE;
+
+
+DROP TRIGGER IF EXISTS REF_BRANCH_INSERT_TRG ON PUBLIC.REF_BRANCH;
+
+CREATE TRIGGER REF_BRANCH_INSERT_TRG
+ BEFORE INSERT
+ ON PUBLIC.REF_BRANCH
+ FOR EACH ROW
+ EXECUTE PROCEDURE PUBLIC.REF_BRANCH_INSERT_TRG();
+
+
+
+-- PUBLIC.REF_BRANCH UPDATE TRIGGER --
+-- <GENERATED CODE!>
+
+CREATE OR REPLACE FUNCTION PUBLIC.REF_BRANCH_UPDATE_TRG()
+ RETURNS trigger AS
+$BODY$
+ BEGIN
+ INSERT INTO HREF_BRANCH (
+ ID,NAME,DESCRIPTION,COLOR_CODE,CREATE_USER,CREATE_DATE,MOD_USER,MOD_DATE,
+
+ HACTION,
+ HDATE,
+ HUSER
+ )
+ VALUES (
+ NEW.ID,NEW.NAME,NEW.DESCRIPTION,NEW.COLOR_CODE,NEW.CREATE_USER,NEW.CREATE_DATE,NEW.MOD_USER,NEW.MOD_DATE,
+ 2,
+ current_timestamp,
+ NEW.MOD_USER
+ );
+
+ RETURN NEW;
+ END;
+$BODY$
+ LANGUAGE plpgsql VOLATILE
+ COST 100;
+ALTER FUNCTION PUBLIC.REF_BRANCH_UPDATE_TRG()
+ OWNER TO PLGM_SERVICE;
+
+DROP TRIGGER IF EXISTS REF_BRANCH_UPDATE_TRG ON PUBLIC.REF_BRANCH;
+
+CREATE TRIGGER REF_BRANCH_UPDATE_TRG
+ BEFORE UPDATE
+ ON PUBLIC.REF_BRANCH
+ FOR EACH ROW
+ EXECUTE PROCEDURE PUBLIC.REF_BRANCH_UPDATE_TRG();
+
+
+
+-- PUBLIC.REF_BRANCH DELETE TRIGGER --
+-- <GENERATED CODE!>
+
+CREATE OR REPLACE FUNCTION PUBLIC.REF_BRANCH_DELETE_TRG()
+ RETURNS trigger AS
+$BODY$
+ BEGIN
+ IF TG_OP = 'DELETE' THEN
+ INSERT INTO HREF_BRANCH (
+ ID,NAME,DESCRIPTION,COLOR_CODE,CREATE_USER,CREATE_DATE,MOD_USER,MOD_DATE,
+ HACTION,
+ HDATE,
+ HUSER
+ )
+ VALUES (
+ OLD.ID,OLD.NAME,OLD.DESCRIPTION,OLD.COLOR_CODE,OLD.CREATE_USER,OLD.CREATE_DATE,OLD.MOD_USER,OLD.MOD_DATE,
+ 3,
+ current_timestamp,
+ OLD.MOD_USER );
+ END IF;
+
+ RETURN OLD;
+ END;
+$BODY$
+ LANGUAGE plpgsql VOLATILE
+ COST 100;
+ALTER FUNCTION PUBLIC.REF_BRANCH_DELETE_TRG()
+ OWNER TO PLGM_SERVICE;
+
+DROP TRIGGER IF EXISTS REF_BRANCH_DELETE_TRG ON PUBLIC.REF_BRANCH;
+
+CREATE TRIGGER REF_BRANCH_DELETE_TRG
+ BEFORE DELETE
+ ON PUBLIC.REF_BRANCH
+ FOR EACH ROW
+ EXECUTE PROCEDURE PUBLIC.REF_BRANCH_DELETE_TRG();
+
+
+
+-- PUBLIC.REF_BRANCH_LEVEL INSERT TRIGGER --
+-- <GENERATED CODE!>
+CREATE OR REPLACE FUNCTION PUBLIC.REF_BRANCH_LEVEL_INSERT_TRG()
+ RETURNS trigger AS
+$BODY$
+ BEGIN
+ INSERT INTO HREF_BRANCH_LEVEL (
+ ID,NAME,DESCRIPTION,FK_REF_BRANCH,CREATE_USER,CREATE_DATE,MOD_USER,MOD_DATE,
+
+ HACTION,
+ HDATE,
+ HUSER
+ )
+ VALUES (
+
+ NEW.ID,NEW.NAME,NEW.DESCRIPTION,NEW.FK_REF_BRANCH,NEW.CREATE_USER,NEW.CREATE_DATE,NEW.MOD_USER,NEW.MOD_DATE,
+
+ 1,
+ current_timestamp,
+ NEW.CREATE_USER );
+
+ RETURN NEW;
+ END;
+$BODY$
+ LANGUAGE plpgsql VOLATILE
+ COST 100;
+ALTER FUNCTION PUBLIC.REF_BRANCH_LEVEL_INSERT_TRG()
+ OWNER TO PLGM_SERVICE;
+
+
+DROP TRIGGER IF EXISTS REF_BRANCH_LEVEL_INSERT_TRG ON PUBLIC.REF_BRANCH_LEVEL;
+
+CREATE TRIGGER REF_BRANCH_LEVEL_INSERT_TRG
+ BEFORE INSERT
+ ON PUBLIC.REF_BRANCH_LEVEL
+ FOR EACH ROW
+ EXECUTE PROCEDURE PUBLIC.REF_BRANCH_LEVEL_INSERT_TRG();
+
+
+
+-- PUBLIC.REF_BRANCH_LEVEL UPDATE TRIGGER --
+-- <GENERATED CODE!>
+
+CREATE OR REPLACE FUNCTION PUBLIC.REF_BRANCH_LEVEL_UPDATE_TRG()
+ RETURNS trigger AS
+$BODY$
+ BEGIN
+ INSERT INTO HREF_BRANCH_LEVEL (
+ ID,NAME,DESCRIPTION,FK_REF_BRANCH,CREATE_USER,CREATE_DATE,MOD_USER,MOD_DATE,
+
+ HACTION,
+ HDATE,
+ HUSER
+ )
+ VALUES (
+ NEW.ID,NEW.NAME,NEW.DESCRIPTION,NEW.FK_REF_BRANCH,NEW.CREATE_USER,NEW.CREATE_DATE,NEW.MOD_USER,NEW.MOD_DATE,
+ 2,
+ current_timestamp,
+ NEW.MOD_USER
+ );
+
+ RETURN NEW;
+ END;
+$BODY$
+ LANGUAGE plpgsql VOLATILE
+ COST 100;
+ALTER FUNCTION PUBLIC.REF_BRANCH_LEVEL_UPDATE_TRG()
+ OWNER TO PLGM_SERVICE;
+
+DROP TRIGGER IF EXISTS REF_BRANCH_LEVEL_UPDATE_TRG ON PUBLIC.REF_BRANCH_LEVEL;
+
+CREATE TRIGGER REF_BRANCH_LEVEL_UPDATE_TRG
+ BEFORE UPDATE
+ ON PUBLIC.REF_BRANCH_LEVEL
+ FOR EACH ROW
+ EXECUTE PROCEDURE PUBLIC.REF_BRANCH_LEVEL_UPDATE_TRG();
+
+
+
+-- PUBLIC.REF_BRANCH_LEVEL DELETE TRIGGER --
+-- <GENERATED CODE!>
+
+CREATE OR REPLACE FUNCTION PUBLIC.REF_BRANCH_LEVEL_DELETE_TRG()
+ RETURNS trigger AS
+$BODY$
+ BEGIN
+ IF TG_OP = 'DELETE' THEN
+ INSERT INTO HREF_BRANCH_LEVEL (
+
+ ID,NAME,DESCRIPTION,FK_REF_BRANCH,CREATE_USER,CREATE_DATE,MOD_USER,MOD_DATE,
+
+ HACTION,
+ HDATE,
+ HUSER
+ )
+ VALUES (
+ OLD.ID,OLD.NAME,OLD.DESCRIPTION,OLD.FK_REF_BRANCH,OLD.CREATE_USER,OLD.CREATE_DATE,OLD.MOD_USER,OLD.MOD_DATE,
+
+ 3,
+ current_timestamp,
+ OLD.MOD_USER );
+ END IF;
+
+ RETURN OLD;
+ END;
+$BODY$
+ LANGUAGE plpgsql VOLATILE
+ COST 100;
+ALTER FUNCTION PUBLIC.REF_BRANCH_LEVEL_DELETE_TRG()
+ OWNER TO PLGM_SERVICE;
+
+DROP TRIGGER IF EXISTS REF_BRANCH_LEVEL_DELETE_TRG ON PUBLIC.REF_BRANCH_LEVEL;
+
+CREATE TRIGGER REF_BRANCH_LEVEL_DELETE_TRG
+ BEFORE DELETE
+ ON PUBLIC.REF_BRANCH_LEVEL
+ FOR EACH ROW
+ EXECUTE PROCEDURE PUBLIC.REF_BRANCH_LEVEL_DELETE_TRG();
+
+
+
+
+
+-- PUBLIC.REF_GM_STATUS INSERT TRIGGER --
+-- <GENERATED CODE!>
+CREATE OR REPLACE FUNCTION PUBLIC.REF_GM_STATUS_INSERT_TRG()
+ RETURNS trigger AS
+$BODY$
+ BEGIN
+ INSERT INTO HREF_GM_STATUS (
+ ID,NAME,COLOR_CODE,CREATE_USER,CREATE_DATE,MOD_USER,MOD_DATE,
+
+ HACTION,
+ HDATE,
+ HUSER
+ )
+ VALUES (
+
+ NEW.ID,NEW.NAME,NEW.COLOR_CODE,NEW.CREATE_USER,NEW.CREATE_DATE,NEW.MOD_USER,NEW.MOD_DATE,
+
+ 1,
+ current_timestamp,
+ NEW.CREATE_USER );
+
+ RETURN NEW;
+ END;
+$BODY$
+ LANGUAGE plpgsql VOLATILE
+ COST 100;
+ALTER FUNCTION PUBLIC.REF_GM_STATUS_INSERT_TRG()
+ OWNER TO PLGM_SERVICE;
+
+
+DROP TRIGGER IF EXISTS REF_GM_STATUS_INSERT_TRG ON PUBLIC.REF_GM_STATUS;
+
+CREATE TRIGGER REF_GM_STATUS_INSERT_TRG
+ BEFORE INSERT
+ ON PUBLIC.REF_GM_STATUS
+ FOR EACH ROW
+ EXECUTE PROCEDURE PUBLIC.REF_GM_STATUS_INSERT_TRG();
+
+
+
+-- PUBLIC.REF_GM_STATUS UPDATE TRIGGER --
+-- <GENERATED CODE!>
+
+CREATE OR REPLACE FUNCTION PUBLIC.REF_GM_STATUS_UPDATE_TRG()
+ RETURNS trigger AS
+$BODY$
+ BEGIN
+ INSERT INTO HREF_GM_STATUS (
+ ID,NAME,COLOR_CODE,CREATE_USER,CREATE_DATE,MOD_USER,MOD_DATE,
+
+ HACTION,
+ HDATE,
+ HUSER
+ )
+ VALUES (
+ NEW.ID,NEW.NAME,NEW.COLOR_CODE,NEW.CREATE_USER,NEW.CREATE_DATE,NEW.MOD_USER,NEW.MOD_DATE,
+ 2,
+ current_timestamp,
+ NEW.MOD_USER
+ );
+
+ RETURN NEW;
+ END;
+$BODY$
+ LANGUAGE plpgsql VOLATILE
+ COST 100;
+ALTER FUNCTION PUBLIC.REF_GM_STATUS_UPDATE_TRG()
+ OWNER TO PLGM_SERVICE;
+
+DROP TRIGGER IF EXISTS REF_GM_STATUS_UPDATE_TRG ON PUBLIC.REF_GM_STATUS;
+
+CREATE TRIGGER REF_GM_STATUS_UPDATE_TRG
+ BEFORE UPDATE
+ ON PUBLIC.REF_GM_STATUS
+ FOR EACH ROW
+ EXECUTE PROCEDURE PUBLIC.REF_GM_STATUS_UPDATE_TRG();
+
+
+
+-- PUBLIC.REF_GM_STATUS DELETE TRIGGER --
+-- <GENERATED CODE!>
+
+CREATE OR REPLACE FUNCTION PUBLIC.REF_GM_STATUS_DELETE_TRG()
+ RETURNS trigger AS
+$BODY$
+ BEGIN
+ IF TG_OP = 'DELETE' THEN
+ INSERT INTO HREF_GM_STATUS (
+
+ ID,NAME,COLOR_CODE,CREATE_USER,CREATE_DATE,MOD_USER,MOD_DATE,
+
+ HACTION,
+ HDATE,
+ HUSER
+ )
+ VALUES (
+ OLD.ID,OLD.NAME,OLD.COLOR_CODE,OLD.CREATE_USER,OLD.CREATE_DATE,OLD.MOD_USER,OLD.MOD_DATE,
+
+ 3,
+ current_timestamp,
+ OLD.MOD_USER );
+ END IF;
+
+ RETURN OLD;
+ END;
+$BODY$
+ LANGUAGE plpgsql VOLATILE
+ COST 100;
+ALTER FUNCTION PUBLIC.REF_GM_STATUS_DELETE_TRG()
+ OWNER TO PLGM_SERVICE;
+
+DROP TRIGGER IF EXISTS REF_GM_STATUS_DELETE_TRG ON PUBLIC.REF_GM_STATUS;
+
+CREATE TRIGGER REF_GM_STATUS_DELETE_TRG
+ BEFORE DELETE
+ ON PUBLIC.REF_GM_STATUS
+ FOR EACH ROW
+ EXECUTE PROCEDURE PUBLIC.REF_GM_STATUS_DELETE_TRG();
+
+
+
+-- PUBLIC.TBL_GRIDMEASURE INSERT TRIGGER --
+-- <GENERATED CODE!>
+CREATE OR REPLACE FUNCTION PUBLIC.TBL_GRIDMEASURE_INSERT_TRG()
+ RETURNS trigger AS
+$BODY$
+ BEGIN
+ INSERT INTO HTBL_GRIDMEASURE (
+ ID,ID_DESCRIPTIVE,TITLE,AFFECTED_RESOURCE,REMARK,EMAIL_ADDRESSES,FK_REF_GM_STATUS,SWITCHING_OBJECT,COST_CENTER,APPROVAL_BY,AREA_OF_SWITCHING,APPOINTMENT_REPETITION,APPOINTMENT_STARTDATE,APPOINTMENT_NUMBEROF,PLANNED_STARTTIME_FIRST_SINGLEMEASURE,ENDTIME_GRIDMEASURE,TIME_OF_REALLOCATION,DESCRIPTION,FK_REF_BRANCH,FK_REF_BRANCH_LEVEL,CREATE_USER,CREATE_USER_DEPARTMENT,CREATE_DATE,MOD_USER,MOD_USER_DEPARTMENT,MOD_DATE,
+
+ HACTION,
+ HDATE,
+ HUSER
+ )
+ VALUES (
+
+ NEW.ID,NEW.ID_DESCRIPTIVE,NEW.TITLE,NEW.AFFECTED_RESOURCE,NEW.REMARK,NEW.EMAIL_ADDRESSES,NEW.FK_REF_GM_STATUS,NEW.SWITCHING_OBJECT,NEW.COST_CENTER,NEW.APPROVAL_BY,NEW.AREA_OF_SWITCHING,NEW.APPOINTMENT_REPETITION,NEW.APPOINTMENT_STARTDATE,NEW.APPOINTMENT_NUMBEROF,NEW.PLANNED_STARTTIME_FIRST_SINGLEMEASURE,NEW.ENDTIME_GRIDMEASURE,NEW.TIME_OF_REALLOCATION,NEW.DESCRIPTION,NEW.FK_REF_BRANCH,NEW.FK_REF_BRANCH_LEVEL,NEW.CREATE_USER,NEW.CREATE_USER_DEPARTMENT,NEW.CREATE_DATE,NEW.MOD_USER,NEW.MOD_USER_DEPARTMENT,NEW.MOD_DATE,
+
+ 1,
+ current_timestamp,
+ NEW.CREATE_USER );
+
+ RETURN NEW;
+ END;
+$BODY$
+ LANGUAGE plpgsql VOLATILE
+ COST 100;
+ALTER FUNCTION PUBLIC.TBL_GRIDMEASURE_INSERT_TRG()
+ OWNER TO PLGM_SERVICE;
+
+
+DROP TRIGGER IF EXISTS TBL_GRIDMEASURE_INSERT_TRG ON PUBLIC.TBL_GRIDMEASURE;
+
+CREATE TRIGGER TBL_GRIDMEASURE_INSERT_TRG
+ BEFORE INSERT
+ ON PUBLIC.TBL_GRIDMEASURE
+ FOR EACH ROW
+ EXECUTE PROCEDURE PUBLIC.TBL_GRIDMEASURE_INSERT_TRG();
+
+
+
+-- PUBLIC.TBL_GRIDMEASURE UPDATE TRIGGER --
+-- <GENERATED CODE!>
+
+CREATE OR REPLACE FUNCTION PUBLIC.TBL_GRIDMEASURE_UPDATE_TRG()
+ RETURNS trigger AS
+$BODY$
+ BEGIN
+ INSERT INTO HTBL_GRIDMEASURE (
+ ID,ID_DESCRIPTIVE,TITLE,AFFECTED_RESOURCE,REMARK,EMAIL_ADDRESSES,FK_REF_GM_STATUS,SWITCHING_OBJECT,COST_CENTER,APPROVAL_BY,AREA_OF_SWITCHING,APPOINTMENT_REPETITION,APPOINTMENT_STARTDATE,APPOINTMENT_NUMBEROF,PLANNED_STARTTIME_FIRST_SINGLEMEASURE,ENDTIME_GRIDMEASURE,TIME_OF_REALLOCATION,DESCRIPTION,FK_REF_BRANCH,FK_REF_BRANCH_LEVEL,CREATE_USER,CREATE_USER_DEPARTMENT,CREATE_DATE,MOD_USER,MOD_USER_DEPARTMENT,MOD_DATE,
+
+ HACTION,
+ HDATE,
+ HUSER
+ )
+ VALUES (
+ NEW.ID,NEW.ID_DESCRIPTIVE,NEW.TITLE,NEW.AFFECTED_RESOURCE,NEW.REMARK,NEW.EMAIL_ADDRESSES,NEW.FK_REF_GM_STATUS,NEW.SWITCHING_OBJECT,NEW.COST_CENTER,NEW.APPROVAL_BY,NEW.AREA_OF_SWITCHING,NEW.APPOINTMENT_REPETITION,NEW.APPOINTMENT_STARTDATE,NEW.APPOINTMENT_NUMBEROF,NEW.PLANNED_STARTTIME_FIRST_SINGLEMEASURE,NEW.ENDTIME_GRIDMEASURE,NEW.TIME_OF_REALLOCATION,NEW.DESCRIPTION,NEW.FK_REF_BRANCH,NEW.FK_REF_BRANCH_LEVEL,NEW.CREATE_USER,NEW.CREATE_USER_DEPARTMENT,NEW.CREATE_DATE,NEW.MOD_USER,NEW.MOD_USER_DEPARTMENT,NEW.MOD_DATE,
+ 2,
+ current_timestamp,
+ NEW.MOD_USER
+ );
+
+ RETURN NEW;
+ END;
+$BODY$
+ LANGUAGE plpgsql VOLATILE
+ COST 100;
+ALTER FUNCTION PUBLIC.TBL_GRIDMEASURE_UPDATE_TRG()
+ OWNER TO PLGM_SERVICE;
+
+DROP TRIGGER IF EXISTS TBL_GRIDMEASURE_UPDATE_TRG ON PUBLIC.TBL_GRIDMEASURE;
+
+CREATE TRIGGER TBL_GRIDMEASURE_UPDATE_TRG
+ BEFORE UPDATE
+ ON PUBLIC.TBL_GRIDMEASURE
+ FOR EACH ROW
+ EXECUTE PROCEDURE PUBLIC.TBL_GRIDMEASURE_UPDATE_TRG();
+
+
+
+-- PUBLIC.TBL_GRIDMEASURE DELETE TRIGGER --
+-- <GENERATED CODE!>
+
+CREATE OR REPLACE FUNCTION PUBLIC.TBL_GRIDMEASURE_DELETE_TRG()
+ RETURNS trigger AS
+$BODY$
+ BEGIN
+ IF TG_OP = 'DELETE' THEN
+ INSERT INTO HTBL_GRIDMEASURE (
+
+ ID,ID_DESCRIPTIVE,TITLE,AFFECTED_RESOURCE,REMARK,EMAIL_ADDRESSES,FK_REF_GM_STATUS,SWITCHING_OBJECT,COST_CENTER,APPROVAL_BY,AREA_OF_SWITCHING,APPOINTMENT_REPETITION,APPOINTMENT_STARTDATE,APPOINTMENT_NUMBEROF,PLANNED_STARTTIME_FIRST_SINGLEMEASURE,ENDTIME_GRIDMEASURE,TIME_OF_REALLOCATION,DESCRIPTION,FK_REF_BRANCH,FK_REF_BRANCH_LEVEL,CREATE_USER,CREATE_USER_DEPARTMENT,CREATE_DATE,MOD_USER,MOD_USER_DEPARTMENT,MOD_DATE,
+
+ HACTION,
+ HDATE,
+ HUSER
+ )
+ VALUES (
+ OLD.ID,OLD.ID_DESCRIPTIVE,OLD.TITLE,OLD.AFFECTED_RESOURCE,OLD.REMARK,OLD.EMAIL_ADDRESSES,OLD.FK_REF_GM_STATUS,OLD.SWITCHING_OBJECT,OLD.COST_CENTER,OLD.APPROVAL_BY,OLD.AREA_OF_SWITCHING,OLD.APPOINTMENT_REPETITION,OLD.APPOINTMENT_STARTDATE,OLD.APPOINTMENT_NUMBEROF,OLD.PLANNED_STARTTIME_FIRST_SINGLEMEASURE,OLD.ENDTIME_GRIDMEASURE,OLD.TIME_OF_REALLOCATION,OLD.DESCRIPTION,OLD.FK_REF_BRANCH,OLD.FK_REF_BRANCH_LEVEL,OLD.CREATE_USER,OLD.CREATE_USER_DEPARTMENT,OLD.CREATE_DATE,OLD.MOD_USER,OLD.MOD_USER_DEPARTMENT,OLD.MOD_DATE,
+
+ 3,
+ current_timestamp,
+ OLD.MOD_USER );
+ END IF;
+
+ RETURN OLD;
+ END;
+$BODY$
+ LANGUAGE plpgsql VOLATILE
+ COST 100;
+ALTER FUNCTION PUBLIC.TBL_GRIDMEASURE_DELETE_TRG()
+ OWNER TO PLGM_SERVICE;
+
+DROP TRIGGER IF EXISTS TBL_GRIDMEASURE_DELETE_TRG ON PUBLIC.TBL_GRIDMEASURE;
+
+CREATE TRIGGER TBL_GRIDMEASURE_DELETE_TRG
+ BEFORE DELETE
+ ON PUBLIC.TBL_GRIDMEASURE
+ FOR EACH ROW
+ EXECUTE PROCEDURE PUBLIC.TBL_GRIDMEASURE_DELETE_TRG();
+
+
+-- PUBLIC.TBL_DOCUMENTS INSERT TRIGGER --
+-- <GENERATED CODE!>
+CREATE OR REPLACE FUNCTION PUBLIC.TBL_DOCUMENTS_INSERT_TRG()
+ RETURNS trigger AS
+$BODY$
+ BEGIN
+ INSERT INTO HTBL_DOCUMENTS (
+ ID,DOCUMENT_NAME,CREATE_USER,CREATE_DATE,MOD_USER,MOD_DATE,
+
+ HACTION,
+ HDATE,
+ HUSER
+ )
+ VALUES (
+
+ NEW.ID,NEW.DOCUMENT_NAME,NEW.CREATE_USER,NEW.CREATE_DATE,NEW.MOD_USER,NEW.MOD_DATE,
+
+ 1,
+ current_timestamp,
+ NEW.CREATE_USER );
+
+ RETURN NEW;
+ END;
+$BODY$
+ LANGUAGE plpgsql VOLATILE
+ COST 100;
+ALTER FUNCTION PUBLIC.TBL_DOCUMENTS_INSERT_TRG()
+ OWNER TO PLGM_SERVICE;
+
+
+DROP TRIGGER IF EXISTS TBL_DOCUMENTS_INSERT_TRG ON PUBLIC.TBL_DOCUMENTS;
+
+CREATE TRIGGER TBL_DOCUMENTS_INSERT_TRG
+ BEFORE INSERT
+ ON PUBLIC.TBL_DOCUMENTS
+ FOR EACH ROW
+ EXECUTE PROCEDURE PUBLIC.TBL_DOCUMENTS_INSERT_TRG();
+
+
+
+-- PUBLIC.TBL_DOCUMENTS UPDATE TRIGGER --
+-- <GENERATED CODE!>
+
+CREATE OR REPLACE FUNCTION PUBLIC.TBL_DOCUMENTS_UPDATE_TRG()
+ RETURNS trigger AS
+$BODY$
+ BEGIN
+ INSERT INTO HTBL_DOCUMENTS (
+ ID,DOCUMENT_NAME,CREATE_USER,CREATE_DATE,MOD_USER,MOD_DATE,
+
+ HACTION,
+ HDATE,
+ HUSER
+ )
+ VALUES (
+ NEW.ID,NEW.DOCUMENT_NAME,NEW.CREATE_USER,NEW.CREATE_DATE,NEW.MOD_USER,NEW.MOD_DATE,
+ 2,
+ current_timestamp,
+ NEW.MOD_USER
+ );
+
+ RETURN NEW;
+ END;
+$BODY$
+ LANGUAGE plpgsql VOLATILE
+ COST 100;
+ALTER FUNCTION PUBLIC.TBL_DOCUMENTS_UPDATE_TRG()
+ OWNER TO PLGM_SERVICE;
+
+DROP TRIGGER IF EXISTS TBL_DOCUMENTS_UPDATE_TRG ON PUBLIC.TBL_DOCUMENTS;
+
+CREATE TRIGGER TBL_DOCUMENTS_UPDATE_TRG
+ BEFORE UPDATE
+ ON PUBLIC.TBL_DOCUMENTS
+ FOR EACH ROW
+ EXECUTE PROCEDURE PUBLIC.TBL_DOCUMENTS_UPDATE_TRG();
+
+
+
+-- PUBLIC.TBL_DOCUMENTS DELETE TRIGGER --
+-- <GENERATED CODE!>
+
+CREATE OR REPLACE FUNCTION PUBLIC.TBL_DOCUMENTS_DELETE_TRG()
+ RETURNS trigger AS
+$BODY$
+ BEGIN
+ IF TG_OP = 'DELETE' THEN
+ INSERT INTO HTBL_DOCUMENTS (
+
+ ID,DOCUMENT_NAME,CREATE_USER,CREATE_DATE,MOD_USER,MOD_DATE,
+
+ HACTION,
+ HDATE,
+ HUSER
+ )
+ VALUES (
+ OLD.ID,OLD.DOCUMENT_NAME,OLD.CREATE_USER,OLD.CREATE_DATE,OLD.MOD_USER,OLD.MOD_DATE,
+
+ 3,
+ current_timestamp,
+ OLD.MOD_USER );
+ END IF;
+
+ RETURN OLD;
+ END;
+$BODY$
+ LANGUAGE plpgsql VOLATILE
+ COST 100;
+ALTER FUNCTION PUBLIC.TBL_DOCUMENTS_DELETE_TRG()
+ OWNER TO PLGM_SERVICE;
+
+DROP TRIGGER IF EXISTS TBL_DOCUMENTS_DELETE_TRG ON PUBLIC.TBL_DOCUMENTS;
+
+CREATE TRIGGER TBL_DOCUMENTS_DELETE_TRG
+ BEFORE DELETE
+ ON PUBLIC.TBL_DOCUMENTS
+ FOR EACH ROW
+ EXECUTE PROCEDURE PUBLIC.TBL_DOCUMENTS_DELETE_TRG();
+
+
+
+
+
+
+-- PUBLIC.TBL_MEASURE_DOCUMENTS INSERT TRIGGER --
+-- <GENERATED CODE!>
+CREATE OR REPLACE FUNCTION PUBLIC.TBL_MEASURE_DOCUMENTS_INSERT_TRG()
+ RETURNS trigger AS
+$BODY$
+ BEGIN
+ INSERT INTO HTBL_MEASURE_DOCUMENTS (
+ ID,FK_TBL_MEASURE,FK_TBL_DOCUMENTS,CREATE_USER,CREATE_DATE,MOD_USER,MOD_DATE,
+
+ HACTION,
+ HDATE,
+ HUSER
+ )
+ VALUES (
+
+ NEW.ID,NEW.FK_TBL_MEASURE,NEW.FK_TBL_DOCUMENTS,NEW.CREATE_USER,NEW.CREATE_DATE,NEW.MOD_USER,NEW.MOD_DATE,
+
+ 1,
+ current_timestamp,
+ NEW.CREATE_USER );
+
+ RETURN NEW;
+ END;
+$BODY$
+ LANGUAGE plpgsql VOLATILE
+ COST 100;
+ALTER FUNCTION PUBLIC.TBL_MEASURE_DOCUMENTS_INSERT_TRG()
+ OWNER TO PLGM_SERVICE;
+
+
+DROP TRIGGER IF EXISTS TBL_MEASURE_DOCUMENTS_INSERT_TRG ON PUBLIC.TBL_MEASURE_DOCUMENTS;
+
+CREATE TRIGGER TBL_MEASURE_DOCUMENTS_INSERT_TRG
+ BEFORE INSERT
+ ON PUBLIC.TBL_MEASURE_DOCUMENTS
+ FOR EACH ROW
+ EXECUTE PROCEDURE PUBLIC.TBL_MEASURE_DOCUMENTS_INSERT_TRG();
+
+
+
+-- PUBLIC.TBL_MEASURE_DOCUMENTS UPDATE TRIGGER --
+-- <GENERATED CODE!>
+
+CREATE OR REPLACE FUNCTION PUBLIC.TBL_MEASURE_DOCUMENTS_UPDATE_TRG()
+ RETURNS trigger AS
+$BODY$
+ BEGIN
+ INSERT INTO HTBL_MEASURE_DOCUMENTS (
+ ID,FK_TBL_MEASURE,FK_TBL_DOCUMENTS,CREATE_USER,CREATE_DATE,MOD_USER,MOD_DATE,
+
+ HACTION,
+ HDATE,
+ HUSER
+ )
+ VALUES (
+ NEW.ID,NEW.FK_TBL_MEASURE,NEW.FK_TBL_DOCUMENTS,NEW.CREATE_USER,NEW.CREATE_DATE,NEW.MOD_USER,NEW.MOD_DATE,
+ 2,
+ current_timestamp,
+ NEW.MOD_USER
+ );
+
+ RETURN NEW;
+ END;
+$BODY$
+ LANGUAGE plpgsql VOLATILE
+ COST 100;
+ALTER FUNCTION PUBLIC.TBL_MEASURE_DOCUMENTS_UPDATE_TRG()
+ OWNER TO PLGM_SERVICE;
+
+DROP TRIGGER IF EXISTS TBL_MEASURE_DOCUMENTS_UPDATE_TRG ON PUBLIC.TBL_MEASURE_DOCUMENTS;
+
+CREATE TRIGGER TBL_MEASURE_DOCUMENTS_UPDATE_TRG
+ BEFORE UPDATE
+ ON PUBLIC.TBL_MEASURE_DOCUMENTS
+ FOR EACH ROW
+ EXECUTE PROCEDURE PUBLIC.TBL_MEASURE_DOCUMENTS_UPDATE_TRG();
+
+
+
+-- PUBLIC.TBL_MEASURE_DOCUMENTS DELETE TRIGGER --
+-- <GENERATED CODE!>
+
+CREATE OR REPLACE FUNCTION PUBLIC.TBL_MEASURE_DOCUMENTS_DELETE_TRG()
+ RETURNS trigger AS
+$BODY$
+ BEGIN
+ IF TG_OP = 'DELETE' THEN
+ INSERT INTO HTBL_MEASURE_DOCUMENTS (
+
+ ID,FK_TBL_MEASURE,FK_TBL_DOCUMENTS,CREATE_USER,CREATE_DATE,MOD_USER,MOD_DATE,
+
+ HACTION,
+ HDATE,
+ HUSER
+ )
+ VALUES (
+ OLD.ID,OLD.FK_TBL_MEASURE,OLD.FK_TBL_DOCUMENTS,OLD.CREATE_USER,OLD.CREATE_DATE,OLD.MOD_USER,OLD.MOD_DATE,
+
+ 3,
+ current_timestamp,
+ OLD.MOD_USER );
+ END IF;
+
+ RETURN OLD;
+ END;
+$BODY$
+ LANGUAGE plpgsql VOLATILE
+ COST 100;
+ALTER FUNCTION PUBLIC.TBL_MEASURE_DOCUMENTS_DELETE_TRG()
+ OWNER TO PLGM_SERVICE;
+
+DROP TRIGGER IF EXISTS TBL_MEASURE_DOCUMENTS_DELETE_TRG ON PUBLIC.TBL_MEASURE_DOCUMENTS;
+
+CREATE TRIGGER TBL_MEASURE_DOCUMENTS_DELETE_TRG
+ BEFORE DELETE
+ ON PUBLIC.TBL_MEASURE_DOCUMENTS
+ FOR EACH ROW
+ EXECUTE PROCEDURE PUBLIC.TBL_MEASURE_DOCUMENTS_DELETE_TRG();
+
+
+
+-- ----------------------------------------------------------------------------
+-- ----------------------------------------------------------------------------
+-- INSERTS
+-- ----------------------------------------------------------------------------
+-- ----------------------------------------------------------------------------
+
+
+-- ----------------------------------------------------------------------------
+-- INSERTS REF_TERRITORY
+-- ----------------------------------------------------------------------------
+
+INSERT INTO public.REF_TERRITORY(
+ name, description, create_user, create_date, mod_user, mod_date)
+ VALUES ('Nord', 'Region Nord', 'testuser','12.04.2018','testuser','12.04.2018');
+INSERT INTO public.REF_TERRITORY(
+ name, description, create_user, create_date, mod_user, mod_date)
+ VALUES ('Ost', 'Region Ost', 'testuser','12.04.2018','testuser','12.04.2018');
+INSERT INTO public.REF_TERRITORY(
+ name, description, create_user, create_date, mod_user, mod_date)
+ VALUES ('SUED', 'Region SUED', 'testuser','12.04.2018','testuser','12.04.2018');
+
+
+-- ----------------------------------------------------------------------------
+-- INSERTS REF_COST_CENTER
+-- ----------------------------------------------------------------------------
+
+INSERT INTO public.ref_cost_center(
+ name, description, create_user, create_date, mod_user, mod_date)
+ VALUES ('K-155', 'Kostenstelle der Abteilung abc', 'testuser','12.04.2018','testuser','12.04.2018');
+INSERT INTO public.ref_cost_center(
+ name, description, create_user, create_date, mod_user, mod_date)
+ VALUES ('K-004', 'Kostenstelle der Abteilung xyz', 'testuser','12.04.2018','testuser','12.04.2018');
+INSERT INTO public.ref_cost_center(
+ name, description, create_user, create_date, mod_user, mod_date)
+ VALUES ('K-222', 'Kostenstelle der Abteilung hij', 'testuser','12.04.2018','testuser','12.04.2018');
+
+
+-- ----------------------------------------------------------------------------
+-- INSERTS REF_BRANCH
+-- ----------------------------------------------------------------------------
+
+INSERT INTO public.ref_branch(name, description, color_code, create_user, create_date, mod_user, mod_date)
+ VALUES ('S', 'Strom', '#fc6042','testuser', '12.04.2018', 'testuser', '12.04.2018');
+INSERT INTO public.ref_branch(name, description, color_code, create_user, create_date, mod_user, mod_date)
+ VALUES ('G', 'Gas', '#fdea64', 'testuser', '12.04.2018', 'testuser', '12.04.2018');
+INSERT INTO public.ref_branch(name, description, color_code, create_user, create_date, mod_user, mod_date)
+ VALUES ('F', 'Fernwärme', '#2cc990', 'testuser', '12.04.2018', 'testuser', '12.04.2018');
+INSERT INTO public.ref_branch(name, description, color_code, create_user, create_date, mod_user, mod_date)
+ VALUES ('W', 'Wasser', '#2c82c9', 'testuser', '12.04.2018', 'testuser', '12.04.2018');
+
+
+-- ----------------------------------------------------------------------------
+-- INSERTS REF_BRANCH_LEVEL
+-- ----------------------------------------------------------------------------
+
+INSERT INTO public.REF_BRANCH_LEVEL(
+ name, description, fk_ref_branch, create_user, create_date, mod_user, mod_date)
+ VALUES ('Strom Level1', 'eine Beschreibung', 1, 'testuser', '12.04.2018', 'testuser', '12.04.2018');
+INSERT INTO public.REF_BRANCH_LEVEL(
+ name, description, fk_ref_branch, create_user, create_date, mod_user, mod_date)
+ VALUES ('Strom Level2', 'eine Beschreibung', 1, 'testuser', '12.04.2018', 'testuser', '12.04.2018');
+INSERT INTO public.REF_BRANCH_LEVEL(
+ name, description, fk_ref_branch, create_user, create_date, mod_user, mod_date)
+ VALUES ('Strom Level3', 'eine Beschreibung', 1, 'testuser', '12.04.2018', 'testuser', '12.04.2018');
+INSERT INTO public.REF_BRANCH_LEVEL(
+ name, description, fk_ref_branch, create_user, create_date, mod_user, mod_date)
+ VALUES ('Gas Level1', 'eine Beschreibung', 2, 'testuser', '12.04.2018', 'testuser', '12.04.2018');
+INSERT INTO public.REF_BRANCH_LEVEL(
+ name, description, fk_ref_branch, create_user, create_date, mod_user, mod_date)
+ VALUES ('Gas Level2', 'noch eine Beschreibung', 2, 'testuser', '12.04.2018', 'testuser', '12.04.2018');
+INSERT INTO public.REF_BRANCH_LEVEL(
+ name, description, fk_ref_branch, create_user, create_date, mod_user, mod_date)
+ VALUES ('Fernwärme Level3', 'und noch eine Beschreibung', 3, 'testuser', '12.04.2018', 'testuser', '12.04.2018');
+
+
+-- ----------------------------------------------------------------------------
+-- INSERTS REF_GM_STATUS
+-- ----------------------------------------------------------------------------
+
+INSERT INTO
+ public.REF_GM_STATUS(id, name, create_user, color_code, create_date, mod_user, mod_date)
+VALUES
+ (0,'Neu','system', 'rgba(121,182,28,1)', '09.04.2018','system','09.04.2018');
+INSERT INTO
+ public.REF_GM_STATUS(id, name, create_user, color_code, create_date, mod_user, mod_date)
+VALUES
+ (1,'Beantragt','system', 'rgba(109,177,45,1)', '09.04.2018','system','09.04.2018');
+INSERT INTO
+ public.REF_GM_STATUS(id, name, create_user, color_code, create_date, mod_user, mod_date)
+VALUES
+ (2,'Storniert','system', 'rgba(153,0,0,1)', '09.04.2018','system','09.04.2018');
+INSERT INTO
+ public.REF_GM_STATUS(id, name, create_user, color_code, create_date, mod_user, mod_date)
+VALUES
+ (3,'Zur Genehmigung','system', 'rgba(96,171,63,1)', '09.04.2018','system','09.04.2018');
+INSERT INTO
+ public.REF_GM_STATUS(id, name, create_user, color_code, create_date, mod_user, mod_date)
+VALUES
+ (4,'Genehmigt','system', 'rgba(84,166,80,1)', '09.04.2018','system','09.04.2018');
+INSERT INTO
+ public.REF_GM_STATUS(id, name, create_user, color_code, create_date, mod_user, mod_date)
+VALUES
+ (5,'Angefordert','system', 'rgba(69,159,101,1)', '09.04.2018','system','09.04.2018');
+INSERT INTO
+ public.REF_GM_STATUS(id, name, create_user, color_code, create_date, mod_user, mod_date)
+VALUES
+ (6,'Freigegeben','system', 'rgba(55,153,121,1)', '09.04.2018','system','09.04.2018');
+INSERT INTO
+ public.REF_GM_STATUS(id, name, create_user, color_code, create_date, mod_user, mod_date)
+VALUES
+ (7,'Schalten aktiv','system', 'rgba(41,146,141,1)', '09.04.2018','system','09.04.2018');
+INSERT INTO
+ public.REF_GM_STATUS(id, name, create_user, color_code, create_date, mod_user, mod_date)
+VALUES
+ (8,'In Arbeit','system', 'rgba(28,141,159,1)', '09.04.2018','system','09.04.2018');
+INSERT INTO
+ public.REF_GM_STATUS(id, name, create_user, color_code, create_date, mod_user, mod_date)
+VALUES
+ (9,'Arbeit beendet','system', 'rgba(12,133,182,1)', '09.04.2018','system','09.04.2018');
+INSERT INTO
+ public.REF_GM_STATUS(id, name, create_user, color_code, create_date, mod_user, mod_date)
+VALUES
+ (10,'Maßnahme beendet','system', 'rgba(2,129,196,1)', '09.04.2018','system','09.04.2018');
+INSERT INTO
+ public.REF_GM_STATUS(id, name, create_user, color_code, create_date, mod_user, mod_date)
+VALUES
+ (11,'Geschlossen','system', 'rgba(2,129,196,1)', '09.04.2018','system','09.04.2018');
+INSERT INTO
+ public.REF_GM_STATUS(id, name, create_user, color_code, create_date, mod_user, mod_date)
+VALUES
+ (12,'Abgelehnt','system', 'rgba(153,0,0,1)', '17.06.2018','system','17.06.2018');
+
+
+
+INSERT INTO REF_VERSION VALUES (1, '0.0.1_PG');
diff --git a/db/migrations/V0_4__CREATE_PLGM_DB.sql b/db/migrations/V0_4__CREATE_PLGM_DB.sql
index 9e0e6ce..abf1478 100644
--- a/db/migrations/V0_4__CREATE_PLGM_DB.sql
+++ b/db/migrations/V0_4__CREATE_PLGM_DB.sql
@@ -1,14 +1,17 @@
-/*
-******************************************************************************
-* Copyright © 2018 PTA GmbH.
-* All rights reserved. This program and the accompanying materials
-* are made available under the terms of the Eclipse Public License v1.0
-* which accompanies this distribution, and is available at
-*
-* http://www.eclipse.org/legal/epl-v10.html
-*
-******************************************************************************
-*/
+-----------------------------------------------------------------------------------
+-- *******************************************************************************
+-- * Copyright (c) 2018 Contributors to the Eclipse Foundation
+-- *
+-- * See the NOTICE file(s) distributed with this work for additional
+-- * information regarding copyright ownership.
+-- *
+-- * This program and the accompanying materials are made available under the
+-- * terms of the Eclipse Public License v. 2.0 which is available at
+-- * http://www.eclipse.org/legal/epl-2.0.
+-- *
+-- * SPDX-License-Identifier: EPL-2.0
+-- *******************************************************************************
+-----------------------------------------------------------------------------------
--CREATE ROLE PLGM_SERVICE LOGIN
--NOSUPERUSER INHERIT NOCREATEDB NOCREATEROLE NOREPLICATION;
--ALTER ROLE PLGM_SERVICE with password 'plgm_service';
diff --git a/db/migrations/V0_5__CREATE_PLGM_DB.sql b/db/migrations/V0_5__CREATE_PLGM_DB.sql
index 3a828f7..9cdf064 100644
--- a/db/migrations/V0_5__CREATE_PLGM_DB.sql
+++ b/db/migrations/V0_5__CREATE_PLGM_DB.sql
@@ -1,14 +1,17 @@
-/*
-******************************************************************************
-* Copyright © 2018 PTA GmbH.
-* All rights reserved. This program and the accompanying materials
-* are made available under the terms of the Eclipse Public License v1.0
-* which accompanies this distribution, and is available at
-*
-* http://www.eclipse.org/legal/epl-v10.html
-*
-******************************************************************************
-*/
+-----------------------------------------------------------------------------------
+-- *******************************************************************************
+-- * Copyright (c) 2018 Contributors to the Eclipse Foundation
+-- *
+-- * See the NOTICE file(s) distributed with this work for additional
+-- * information regarding copyright ownership.
+-- *
+-- * This program and the accompanying materials are made available under the
+-- * terms of the Eclipse Public License v. 2.0 which is available at
+-- * http://www.eclipse.org/legal/epl-2.0.
+-- *
+-- * SPDX-License-Identifier: EPL-2.0
+-- *******************************************************************************
+-----------------------------------------------------------------------------------
--ADD DATA TO TABLE TBL_GRIDMEASURE;
--ADD DATA TO TABLE REF_GM_STATUS;
diff --git a/db/migrations/V0_6__CREATE_PLGM_DB.sql b/db/migrations/V0_6__CREATE_PLGM_DB.sql
index 96bb8c0..729e485 100644
--- a/db/migrations/V0_6__CREATE_PLGM_DB.sql
+++ b/db/migrations/V0_6__CREATE_PLGM_DB.sql
@@ -1,14 +1,17 @@
-/*
-******************************************************************************
-* Copyright © 2018 PTA GmbH.
-* All rights reserved. This program and the accompanying materials
-* are made available under the terms of the Eclipse Public License v1.0
-* which accompanies this distribution, and is available at
-*
-* http://www.eclipse.org/legal/epl-v10.html
-*
-******************************************************************************
-*/
+-----------------------------------------------------------------------------------
+-- *******************************************************************************
+-- * Copyright (c) 2018 Contributors to the Eclipse Foundation
+-- *
+-- * See the NOTICE file(s) distributed with this work for additional
+-- * information regarding copyright ownership.
+-- *
+-- * This program and the accompanying materials are made available under the
+-- * terms of the Eclipse Public License v. 2.0 which is available at
+-- * http://www.eclipse.org/legal/epl-2.0.
+-- *
+-- * SPDX-License-Identifier: EPL-2.0
+-- *******************************************************************************
+-----------------------------------------------------------------------------------
--ADD DATA TO TABLE TBL_GRIDMEASURE;
--ADD DATA TO TABLE REF_GM_STATUS;
diff --git a/db/migrations/V0_7__CREATE_PLGM_DB.sql b/db/migrations/V0_7__CREATE_PLGM_DB.sql
index f30d01a..b1059af 100644
--- a/db/migrations/V0_7__CREATE_PLGM_DB.sql
+++ b/db/migrations/V0_7__CREATE_PLGM_DB.sql
@@ -1,14 +1,17 @@
-/*
-******************************************************************************
-* Copyright © 2018 PTA GmbH.
-* All rights reserved. This program and the accompanying materials
-* are made available under the terms of the Eclipse Public License v1.0
-* which accompanies this distribution, and is available at
-*
-* http://www.eclipse.org/legal/epl-v10.html
-*
-******************************************************************************
-*/
+-----------------------------------------------------------------------------------
+-- *******************************************************************************
+-- * Copyright (c) 2018 Contributors to the Eclipse Foundation
+-- *
+-- * See the NOTICE file(s) distributed with this work for additional
+-- * information regarding copyright ownership.
+-- *
+-- * This program and the accompanying materials are made available under the
+-- * terms of the Eclipse Public License v. 2.0 which is available at
+-- * http://www.eclipse.org/legal/epl-2.0.
+-- *
+-- * SPDX-License-Identifier: EPL-2.0
+-- *******************************************************************************
+-----------------------------------------------------------------------------------
--ADD DATA TO TABLE TBL_GRIDMEASURE;
--ADD DATA TO TABLE REF_GM_STATUS;
diff --git a/db/migrations/V0_8__CREATE_PLGM_DB.sql b/db/migrations/V0_8__CREATE_PLGM_DB.sql
index db4dd0a..ec7e407 100644
--- a/db/migrations/V0_8__CREATE_PLGM_DB.sql
+++ b/db/migrations/V0_8__CREATE_PLGM_DB.sql
@@ -1,14 +1,17 @@
-/*
-******************************************************************************
-* Copyright © 2018 PTA GmbH.
-* All rights reserved. This program and the accompanying materials
-* are made available under the terms of the Eclipse Public License v1.0
-* which accompanies this distribution, and is available at
-*
-* http://www.eclipse.org/legal/epl-v10.html
-*
-******************************************************************************
-*/
+-----------------------------------------------------------------------------------
+-- *******************************************************************************
+-- * Copyright (c) 2018 Contributors to the Eclipse Foundation
+-- *
+-- * See the NOTICE file(s) distributed with this work for additional
+-- * information regarding copyright ownership.
+-- *
+-- * This program and the accompanying materials are made available under the
+-- * terms of the Eclipse Public License v. 2.0 which is available at
+-- * http://www.eclipse.org/legal/epl-2.0.
+-- *
+-- * SPDX-License-Identifier: EPL-2.0
+-- *******************************************************************************
+-----------------------------------------------------------------------------------
--Update Data Inserts into Table REF_GM_STATUS;
-- ---------------------------------------------
diff --git a/db/migrations/V0_9__CREATE_PLGM_DB.sql b/db/migrations/V0_9__CREATE_PLGM_DB.sql
index b9da2c1..c6fae59 100644
--- a/db/migrations/V0_9__CREATE_PLGM_DB.sql
+++ b/db/migrations/V0_9__CREATE_PLGM_DB.sql
@@ -1,14 +1,17 @@
-/*
-******************************************************************************
-* Copyright © 2018 PTA GmbH.
-* All rights reserved. This program and the accompanying materials
-* are made available under the terms of the Eclipse Public License v1.0
-* which accompanies this distribution, and is available at
-*
-* http://www.eclipse.org/legal/epl-v10.html
-*
-******************************************************************************
-*/
+-----------------------------------------------------------------------------------
+-- *******************************************************************************
+-- * Copyright (c) 2018 Contributors to the Eclipse Foundation
+-- *
+-- * See the NOTICE file(s) distributed with this work for additional
+-- * information regarding copyright ownership.
+-- *
+-- * This program and the accompanying materials are made available under the
+-- * terms of the Eclipse Public License v. 2.0 which is available at
+-- * http://www.eclipse.org/legal/epl-2.0.
+-- *
+-- * SPDX-License-Identifier: EPL-2.0
+-- *******************************************************************************
+-----------------------------------------------------------------------------------
--Add Table REF_BRANCH_LEVEL with UPDATE- INSERT- and DELETE-Triggers and INSERT Values;
--Add Table HREF_BRANCH_LEVEL;
--INSERT Values for Table REF_BRANCH
diff --git a/devlocal.yml b/devlocal.yml
index 2d04435..a554921 100644
--- a/devlocal.yml
+++ b/devlocal.yml
@@ -9,7 +9,9 @@
user: admin
password: admin
exchangeName: openk-pgm-exchange
- autoSetup: true
+ queueNames : pgm-applied-queue, pgm-forapproval-queue, pgm-canceled-queue, pgm-approved-queue, pgm-rejected-queue, pgm-requested-queue, pgm-released-queue, pgm-finished-queue, pgm-closed-queue
+ unroutedMessagesExchangeName: openk-pgm-unrouted-exchange
+ unroutedMessagesQueueName: pgm-unrouted-queue
dbConn:
driver: org.postgresql.Driver
diff --git a/devserver.yml b/devserver.yml
index 8646ad5..694b509 100644
--- a/devserver.yml
+++ b/devserver.yml
@@ -4,12 +4,14 @@
whiteListDocumenttypes: application/pdf,application/vnd.ms-excel,application/vnd.openxmlformats-officedocument.spreadsheetml.sheet,application/vnd.ms-excel.sheet.macroEnabled.12,application/msword,application/vnd.openxmlformats-officedocument.wordprocessingml.document,application/vnd.ms-word.document.macroEnabled.12,image/png,image/jpeg
rabbitmqConfiguration:
- host: localhost
+ host: 172.18.22.160
port: 5672
user: admin
password: admin
exchangeName: openk-pgm-exchange
- autoSetup: true
+ queueNames : pgm-applied-queue, pgm-forapproval-queue, pgm-canceled-queue, pgm-approved-queue, pgm-rejected-queue, pgm-requested-queue, pgm-released-queue, pgm-finished-queue, pgm-closed-queue
+ unroutedMessagesExchangeName: openk-pgm-unrouted-exchange
+ unroutedMessagesQueueName: pgm-unrouted-queue
dbConn:
driver: org.postgresql.Driver
diff --git a/emailConfiguration/emailTemplates/activeEmailTemplate.txt b/emailConfiguration/emailTemplates/activeEmailTemplate.txt
index 8fd4686..6eeaf36 100644
--- a/emailConfiguration/emailTemplates/activeEmailTemplate.txt
+++ b/emailConfiguration/emailTemplates/activeEmailTemplate.txt
@@ -1,6 +1,6 @@
To: active1Recipient@test.de, active2Recipient@test.de
CC: test1CCRecipient@test.de, test2CCRecipient@test.de
-Subject: Die Maßnahme "$gridMeasureTitle$" mit Beginn: "$plannedStarttimeFirstSinglemeasure$" und Ende: $plannedEndtimeLastSinglemeasure$ wurde in den Status Schalten aktiv geändert.
+Subject: Die Maßnahme "$gridMeasureTitle$" mit Beginn: "$plannedStarttimeFirstSinglemeasure$" und Ende: $endtimeGridmeasure$ wurde in den Status Schalten aktiv geändert.
Body:
Sehr geehrte Damen und Herren,
diff --git a/emailConfiguration/emailTemplates/appliedEmailTemplate.txt b/emailConfiguration/emailTemplates/appliedEmailTemplate.txt
index b69fb77..e98a321 100644
--- a/emailConfiguration/emailTemplates/appliedEmailTemplate.txt
+++ b/emailConfiguration/emailTemplates/appliedEmailTemplate.txt
@@ -1,6 +1,6 @@
To: applied1Recipient@test.de, applied2Recipient@test.de
CC: test1CCRecipient@test.de, test2CCRecipient@test.de
-Subject: Die Maßnahme "$gridMeasureTitle$" mit Beginn: "$plannedStarttimeFirstSinglemeasure$" und Ende: $plannedEndtimeLastSinglemeasure$ wurde in den Status Beantragt geändert.
+Subject: Die Maßnahme "$gridMeasureTitle$" mit Beginn: "$plannedStarttimeFirstSinglemeasure$" und Ende: $endtimeGridmeasure$ wurde in den Status Beantragt geändert.
Body:
Sehr geehrte Damen und Herren,
diff --git a/emailConfiguration/emailTemplates/approvedEmailTemplate.txt b/emailConfiguration/emailTemplates/approvedEmailTemplate.txt
index 27c72b1..41837cd 100644
--- a/emailConfiguration/emailTemplates/approvedEmailTemplate.txt
+++ b/emailConfiguration/emailTemplates/approvedEmailTemplate.txt
@@ -1,6 +1,6 @@
To: approved1Recipient@test.de, approved2Recipient@test.de
CC: test1CCRecipient@test.de, test2CCRecipient@test.de
-Subject: Die Maßnahme "$gridMeasureTitle$" mit Beginn: "$plannedStarttimeFirstSinglemeasure$" und Ende: $plannedEndtimeLastSinglemeasure$ wurde in den Status Genehmigt geändert.
+Subject: Die Maßnahme "$gridMeasureTitle$" mit Beginn: "$plannedStarttimeFirstSinglemeasure$" und Ende: $endtimeGridmeasure$ wurde in den Status Genehmigt geändert.
Body:
Sehr geehrte Damen und Herren,
diff --git a/emailConfiguration/emailTemplates/canceledEmailTemplate.txt b/emailConfiguration/emailTemplates/canceledEmailTemplate.txt
index 00d0257..744debd 100644
--- a/emailConfiguration/emailTemplates/canceledEmailTemplate.txt
+++ b/emailConfiguration/emailTemplates/canceledEmailTemplate.txt
@@ -1,6 +1,6 @@
To: canceled1Recipient@test.de, canceled2Recipient@test.de, approved1Recipient@test.de
CC: test1CCRecipient@test.de, test2CCRecipient@test.de
-Subject: Die Maßnahme "$gridMeasureTitle$" mit Beginn: "$plannedStarttimeFirstSinglemeasure$" und Ende: $plannedEndtimeLastSinglemeasure$ wurde in den Status Storniert geändert.
+Subject: Die Maßnahme "$gridMeasureTitle$" mit Beginn: "$plannedStarttimeFirstSinglemeasure$" und Ende: $endtimeGridmeasure$ wurde in den Status Storniert geändert.
Body:
Sehr geehrte Damen und Herren,
diff --git a/emailConfiguration/emailTemplates/closedEmailTemplate.txt b/emailConfiguration/emailTemplates/closedEmailTemplate.txt
index fbd09af..b6e7b55 100644
--- a/emailConfiguration/emailTemplates/closedEmailTemplate.txt
+++ b/emailConfiguration/emailTemplates/closedEmailTemplate.txt
@@ -1,6 +1,6 @@
To: closed1Recipient@test.de, closed2Recipient@test.de
CC: test1CCRecipient@test.de, test2CCRecipient@test.de
-Subject: Die Maßnahme "$gridMeasureTitle$" mit Beginn: "$plannedStarttimeFirstSinglemeasure$" und Ende: $plannedEndtimeLastSinglemeasure$ wurde in den Status Geschlossen geändert.
+Subject: Die Maßnahme "$gridMeasureTitle$" mit Beginn: "$plannedStarttimeFirstSinglemeasure$" und Ende: $endtimeGridmeasure$ wurde in den Status Geschlossen geändert.
Body:
Sehr geehrte Damen und Herren,
diff --git a/emailConfiguration/emailTemplates/finishedEmailTemplate.txt b/emailConfiguration/emailTemplates/finishedEmailTemplate.txt
index f08d661..d286fb2 100644
--- a/emailConfiguration/emailTemplates/finishedEmailTemplate.txt
+++ b/emailConfiguration/emailTemplates/finishedEmailTemplate.txt
@@ -1,6 +1,6 @@
To: finished1Recipient@test.de, finished2Recipient@test.de
CC: test1CCRecipient@test.de, test2CCRecipient@test.de
-Subject: Die Maßnahme "$gridMeasureTitle$" mit Beginn: "$plannedStarttimeFirstSinglemeasure$" und Ende: $plannedEndtimeLastSinglemeasure$ wurde in den Status Maßnahme beendet geändert.
+Subject: Die Maßnahme "$gridMeasureTitle$" mit Beginn: "$plannedStarttimeFirstSinglemeasure$" und Ende: $endtimeGridmeasure$ wurde in den Status Maßnahme beendet geändert.
Body:
Sehr geehrte Damen und Herren,
diff --git a/emailConfiguration/emailTemplates/forapprovalEmailTemplate.txt b/emailConfiguration/emailTemplates/forapprovalEmailTemplate.txt
index e5d2b50..a461da5 100644
--- a/emailConfiguration/emailTemplates/forapprovalEmailTemplate.txt
+++ b/emailConfiguration/emailTemplates/forapprovalEmailTemplate.txt
@@ -1,6 +1,6 @@
To: forapproval1Recipient@test.de, forapproval2Recipient@test.de
CC: test1CCRecipient@test.de, test2CCRecipient@test.de
-Subject: Die Maßnahme "$gridMeasureTitle$" mit Beginn: "$plannedStarttimeFirstSinglemeasure$" und Ende: $plannedEndtimeLastSinglemeasure$ wurde in den Status Zur Genehmigung geändert.
+Subject: Die Maßnahme "$gridMeasureTitle$" mit Beginn: "$plannedStarttimeFirstSinglemeasure$" und Ende: $endtimeGridmeasure$ wurde in den Status Zur Genehmigung geändert.
Body:
Sehr geehrte Damen und Herren,
diff --git a/emailConfiguration/emailTemplates/inworkEmailTemplate.txt b/emailConfiguration/emailTemplates/inworkEmailTemplate.txt
index 060080b..4340b1f 100644
--- a/emailConfiguration/emailTemplates/inworkEmailTemplate.txt
+++ b/emailConfiguration/emailTemplates/inworkEmailTemplate.txt
@@ -1,6 +1,6 @@
To: inwork1Recipient@test.de, inwork2Recipient@test.de
CC: test1CCRecipient@test.de, test2CCRecipient@test.de
-Subject: Die Maßnahme "$gridMeasureTitle$" mit Beginn: "$plannedStarttimeFirstSinglemeasure$" und Ende: $plannedEndtimeLastSinglemeasure$ wurde in den Status In Arbeit geändert.
+Subject: Die Maßnahme "$gridMeasureTitle$" mit Beginn: "$plannedStarttimeFirstSinglemeasure$" und Ende: $endtimeGridmeasure$ wurde in den Status In Arbeit geändert.
Body:
Sehr geehrte Damen und Herren,
diff --git a/emailConfiguration/emailTemplates/rejectedEmailTemplate.txt b/emailConfiguration/emailTemplates/rejectedEmailTemplate.txt
index 397488d..e616be2 100644
--- a/emailConfiguration/emailTemplates/rejectedEmailTemplate.txt
+++ b/emailConfiguration/emailTemplates/rejectedEmailTemplate.txt
@@ -1,6 +1,6 @@
To: rejected1Recipient@test.de, rejected2Recipient@test.de
CC: test1CCRecipient@test.de, test2CCRecipient@test.de
-Subject: Die Maßnahme "$gridMeasureTitle$" mit Beginn: "$plannedStarttimeFirstSinglemeasure$" und Ende: $plannedEndtimeLastSinglemeasure$ wurde zurückgewiesen.
+Subject: Die Maßnahme "$gridMeasureTitle$" mit Beginn: "$plannedStarttimeFirstSinglemeasure$" und Ende: $endtimeGridmeasure$ wurde zurückgewiesen.
Body:
Sehr geehrte Damen und Herren,
diff --git a/emailConfiguration/emailTemplates/releasedEmailTemplate.txt b/emailConfiguration/emailTemplates/releasedEmailTemplate.txt
index 338c5a4..623c812 100644
--- a/emailConfiguration/emailTemplates/releasedEmailTemplate.txt
+++ b/emailConfiguration/emailTemplates/releasedEmailTemplate.txt
@@ -1,6 +1,6 @@
To: released1Recipient@test.de, released2Recipient@test.de
CC: test1CCRecipient@test.de, test2CCRecipient@test.de
-Subject: Die Maßnahme "$gridMeasureTitle$" mit Beginn: "$plannedStarttimeFirstSinglemeasure$" und Ende: $plannedEndtimeLastSinglemeasure$ wurde in den Status Freigegeben geändert.
+Subject: Die Maßnahme "$gridMeasureTitle$" mit Beginn: "$plannedStarttimeFirstSinglemeasure$" und Ende: $endtimeGridmeasure$ wurde in den Status Freigegeben geändert.
Body:
Sehr geehrte Damen und Herren,
diff --git a/emailConfiguration/emailTemplates/requestedEmailTemplate.txt b/emailConfiguration/emailTemplates/requestedEmailTemplate.txt
index c26687b..22dbc21 100644
--- a/emailConfiguration/emailTemplates/requestedEmailTemplate.txt
+++ b/emailConfiguration/emailTemplates/requestedEmailTemplate.txt
@@ -1,6 +1,6 @@
To: requested1Recipient@test.de, requested2Recipient@test.de
CC: test1CCRecipient@test.de, test2CCRecipient@test.de
-Subject: Die Maßnahme "$gridMeasureTitle$" mit Beginn: "$plannedStarttimeFirstSinglemeasure$" und Ende: $plannedEndtimeLastSinglemeasure$ wurde in den Status Angefordert geändert.
+Subject: Die Maßnahme "$gridMeasureTitle$" mit Beginn: "$plannedStarttimeFirstSinglemeasure$" und Ende: $endtimeGridmeasure$ wurde in den Status Angefordert geändert.
Body:
Sehr geehrte Damen und Herren,
diff --git a/emailConfiguration/emailTemplates/workfinishedEmailTemplate.txt b/emailConfiguration/emailTemplates/workfinishedEmailTemplate.txt
index 83e42c0..d832979 100644
--- a/emailConfiguration/emailTemplates/workfinishedEmailTemplate.txt
+++ b/emailConfiguration/emailTemplates/workfinishedEmailTemplate.txt
@@ -1,6 +1,6 @@
To: workfinished1Recipient@test.de, workfinished2Recipient@test.de
CC: test1CCRecipient@test.de, test2CCRecipient@test.de
-Subject: Die Maßnahme "$gridMeasureTitle$" mit Beginn: "$plannedStarttimeFirstSinglemeasure$" und Ende: $plannedEndtimeLastSinglemeasure$ wurde in den Status Arbeit beendet geändert.
+Subject: Die Maßnahme "$gridMeasureTitle$" mit Beginn: "$plannedStarttimeFirstSinglemeasure$" und Ende: $endtimeGridmeasure$ wurde in den Status Arbeit beendet geändert.
Body:
Sehr geehrte Damen und Herren,
diff --git a/emailConfigurationTest/emailTemplates/finishedEmailTemplateTest.txt b/emailConfigurationTest/emailTemplates/finishedEmailTemplateTest.txt
index d7bc375..b31ebec 100644
--- a/emailConfigurationTest/emailTemplates/finishedEmailTemplateTest.txt
+++ b/emailConfigurationTest/emailTemplates/finishedEmailTemplateTest.txt
@@ -1,6 +1,6 @@
To: test1Recipient@test.de, test2Recipient@test.de
CC: testCCRecipient@test.de, test2CCRecipient@test.de
-Subject: Die Maßnahme "$gridMeasureTitle$" mit Beginn: "$plannedStarttimeFirstSinglemeasure$" und Ende: $plannedEndtimeLastSinglemeasure$ wurde in den Status Maßnahme beendet geändert.
+Subject: Die Maßnahme "$gridMeasureTitle$" mit Beginn: "$plannedStarttimeFirstSinglemeasure$" und Ende: $endtimeGridmeasure$ wurde in den Status Maßnahme beendet geändert.
Body:
TEST
diff --git a/emailConfigurationTest/emailTemplates/rejectedEmailTemplateTest.txt b/emailConfigurationTest/emailTemplates/rejectedEmailTemplateTest.txt
index d6e7309..dfe9ec6 100644
--- a/emailConfigurationTest/emailTemplates/rejectedEmailTemplateTest.txt
+++ b/emailConfigurationTest/emailTemplates/rejectedEmailTemplateTest.txt
@@ -1,6 +1,6 @@
To: test1Recipient@test.de, test2Recipient@test.de
CC: testCCRecipient@test.de, test2CCRecipient@test.de
-Subject: Die Maßnahme "$gridMeasureTitle$" mit Beginn: "$plannedStarttimeFirstSinglemeasure$" und Ende: $plannedEndtimeLastSinglemeasure$ wurde zurückgewiesen.
+Subject: Die Maßnahme "$gridMeasureTitle$" mit Beginn: "$plannedStarttimeFirstSinglemeasure$" und Ende: $endtimeGridmeasure$ wurde zurückgewiesen.
Body:
TEST
diff --git a/pom.xml b/pom.xml
index 2164324..cdc20cb 100644
--- a/pom.xml
+++ b/pom.xml
@@ -328,17 +328,17 @@
<version>${asciidoctor-maven-plugin-version}</version>
<dependencies>
<dependency>
- <groupId>org.asciidoctor</groupId>
- <artifactId>asciidoctorj-pdf</artifactId>
- <version>${asciidoctorj-pdf-version}</version>
- </dependency>
- <dependency>
<groupId>org.jruby</groupId>
<artifactId>jruby-complete</artifactId>
<version>${jruby-complete-version}</version>
</dependency>
<dependency>
<groupId>org.asciidoctor</groupId>
+ <artifactId>asciidoctorj-pdf</artifactId>
+ <version>${asciidoctorj-pdf-version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.asciidoctor</groupId>
<artifactId>asciidoctorj</artifactId>
<version>${asciidoctorj-version}</version>
</dependency>
@@ -348,7 +348,7 @@
<version>${asciidoctorj-diagram-versions}</version>
</dependency>
</dependencies>
- <configuration>
+ <configuration>
<sourceDirectory>src/main/asciidoc</sourceDirectory>
<requires>
<require>asciidoctor-diagram</require>
@@ -359,8 +359,7 @@
</attributes>
</configuration>
<executions>
-
- <execution>
+ <execution>
<id>output-html</id>
<phase>generate-resources</phase>
<goals>
@@ -375,10 +374,9 @@
<sourceHighlighter>coderay</sourceHighlighter>
<backend>html</backend>
<doctype>book</doctype>
- <imagesDir>./images</imagesDir>
</configuration>
</execution>
- <!--execution>
+ <execution>
<id>output-pdf</id>
<phase>generate-resources</phase>
<goals>
@@ -393,7 +391,6 @@
<sourceHighlighter>coderay</sourceHighlighter>
<backend>pdf</backend>
<doctype>book</doctype>
- <imagesDir>./images</imagesDir>
<attributes>
<icons>font</icons>
<pagenums />
@@ -402,7 +399,7 @@
<idseparator>-</idseparator>
</attributes>
</configuration>
- </execution-->
+ </execution>
</executions>
</plugin>
<plugin>
diff --git a/prodserver.yml b/prodserver.yml
index aade14a..f8d23ef 100644
--- a/prodserver.yml
+++ b/prodserver.yml
@@ -9,7 +9,9 @@
user: admin
password: admin
exchangeName: openk-pgm-exchange
- autoSetup: true
+ queueNames : pgm-applied-queue, pgm-forapproval-queue, pgm-canceled-queue, pgm-approved-queue, pgm-rejected-queue, pgm-requested-queue, pgm-released-queue, pgm-finished-queue, pgm-closed-queue
+ unroutedMessagesExchangeName: openk-pgm-unrouted-exchange
+ unroutedMessagesQueueName: pgm-unrouted-queue
dbConn:
driver: org.postgresql.Driver
diff --git a/qserver.yml b/qserver.yml
index 5c72bf1..f8b4872 100644
--- a/qserver.yml
+++ b/qserver.yml
@@ -4,12 +4,19 @@
whiteListDocumenttypes: application/pdf,application/vnd.ms-excel,application/vnd.openxmlformats-officedocument.spreadsheetml.sheet,application/vnd.ms-excel.sheet.macroEnabled.12,application/msword,application/vnd.openxmlformats-officedocument.wordprocessingml.document,application/vnd.ms-word.document.macroEnabled.12,image/png,image/jpeg
rabbitmqConfiguration:
+<<<<<<< HEAD
+ host: 169.50.13.154
+ port: 15672
+=======
host: localhost
port: 5672
- user: admin
- password: admin
+>>>>>>> c431b2a4b5e906355a64dd0dc69b5e31ad63f85c
+ user: openk
+ password: openk
exchangeName: openk-pgm-exchange
- autoSetup: true
+ queueNames : pgm-applied-queue, pgm-forapproval-queue, pgm-canceled-queue, pgm-approved-queue, pgm-rejected-queue, pgm-requested-queue, pgm-released-queue, pgm-finished-queue, pgm-closed-queue
+ unroutedMessagesExchangeName: openk-pgm-unrouted-exchange
+ unroutedMessagesQueueName: pgm-unrouted-queue
dbConn:
driver: org.postgresql.Driver
diff --git a/src/main/asciidoc/architectureDocumentation/architectureDocumentation.adoc b/src/main/asciidoc/architectureDocumentation/architectureDocumentation.adoc
index 96167dc..4a53a17 100644
--- a/src/main/asciidoc/architectureDocumentation/architectureDocumentation.adoc
+++ b/src/main/asciidoc/architectureDocumentation/architectureDocumentation.adoc
@@ -1,13 +1,16 @@
////
-******************************************************************************
-* Copyright © 2018 PTA GmbH.
-* All rights reserved. This program and the accompanying materials
-* are made available under the terms of the Eclipse Public License v1.0
-* which accompanies this distribution, and is available at
-*
-* http://www.eclipse.org/legal/epl-v10.html
-*
-******************************************************************************
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
+ *
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
////
openKonsequenz - Architecture of the module 'Planned Grid Measures'
===================================================================
@@ -2016,7 +2019,9 @@
user: admin
password: admin
exchangeName: openk-pgm-exchange
- autoSetup: true
+ queueNames : pgm-applied-queue, pgm-forapproval-queue, pgm-canceled-queue, pgm-approved-queue, pgm-rejected-queue, pgm-requested-queue, pgm-released-queue, pgm-finished-queue, pgm-closed-queue
+ unroutedMessagesExchangeName: openk-pgm-unrouted-exchange
+ unroutedMessagesQueueName: pgm-unrouted-queue
...
}
@@ -2025,12 +2030,15 @@
- 'user' : Username you create in Step 1 (Prerequisites)
- 'password' : Password belonging to user you create in step 1 (Prerequisites)
- 'exchangeName' : The name of the 'Exchange' (https://www.rabbitmq.com/tutorials/tutorial-three-python.html)
-- 'autoSetup' : If set to 'true' the Autosetup will fire once on application start.
+- 'queueNames': Comma separated names of the Queues
-Autosetup means the Planned Grid Measure Microservice will create the Exchange according to the name defined one line
-above. All needed Queues will be created and bind to the Exchange.
+All Queues will be created and bind to the Exchange defined by 'exchangeName' automatically.
-The automatically created queues and their belonging routing keys are:
+CAUTION: You must define 8 Queuenames with the following pattern: 'someword-ROUTINGKEY-words' where 'ROUTINGKEY' is one of the 8
+planned grid measure status
+(Example for status 'applied': pgm-applied-queue)
+
+Complete list of example Queuenames and their Routing keys:
[source]
Queuename: pgm-applied-queue | Routing key: applied
@@ -2042,10 +2050,9 @@
Queuename: pgm-finished-queue | Routing key: finished
Queuename: pgm-closed-queue | Routing key: closed
-If 'autosetup' is set to 'false' you have to create the exchange, queues and bindings manually.
-CAUTION: You still have to use the same routing keys above If 'autosetup' is set to 'false'
-(Example: 'applied' for the Applied-Queue).
+- 'unroutedMessagesExchangeName' : Name of the Exchange which catches all failed messages.
+- 'unroutedMessagesQueueName' : Name of the Queue which catches all failed messages.
== Runtime view
diff --git a/src/main/asciidoc/howto/howtoBuild.adoc b/src/main/asciidoc/howto/howtoBuild.adoc
index bdf60a7..93afdec 100644
--- a/src/main/asciidoc/howto/howtoBuild.adoc
+++ b/src/main/asciidoc/howto/howtoBuild.adoc
@@ -1,13 +1,16 @@
////
-******************************************************************************
-* Copyright © 2018 PTA GmbH.
-* All rights reserved. This program and the accompanying materials
-* are made available under the terms of the Eclipse Public License v1.0
-* which accompanies this distribution, and is available at
-*
-* http://www.eclipse.org/legal/epl-v10.html
-*
-******************************************************************************
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
+ *
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
////
= openKonsequenz - How to build the module "plannedGridMeasures@openK"
:Date: 2017-11-17
diff --git a/src/main/asciidoc/howto/howtoRun.adoc b/src/main/asciidoc/howto/howtoRun.adoc
index ca98764..79f7d3d 100644
--- a/src/main/asciidoc/howto/howtoRun.adoc
+++ b/src/main/asciidoc/howto/howtoRun.adoc
@@ -1,13 +1,16 @@
////
-******************************************************************************
-* Copyright © 2018 PTA GmbH.
-* All rights reserved. This program and the accompanying materials
-* are made available under the terms of the Eclipse Public License v1.0
-* which accompanies this distribution, and is available at
-*
-* http://www.eclipse.org/legal/epl-v10.html
-*
-******************************************************************************
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
+ *
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
////
= openKonsequenz - How to run the module "Plannedgridmeasures"
:Date: 2018-06-25
diff --git a/src/main/asciidoc/images/abbrechen.png b/src/main/asciidoc/images/abbrechen.png
new file mode 100644
index 0000000..cf98a3a
--- /dev/null
+++ b/src/main/asciidoc/images/abbrechen.png
Binary files differ
diff --git a/src/main/asciidoc/images/abmelden.png b/src/main/asciidoc/images/abmelden.png
new file mode 100644
index 0000000..1a8799f
--- /dev/null
+++ b/src/main/asciidoc/images/abmelden.png
Binary files differ
diff --git a/src/main/asciidoc/images/auge-symbol.png b/src/main/asciidoc/images/auge-symbol.png
new file mode 100644
index 0000000..6bb5e6f
--- /dev/null
+++ b/src/main/asciidoc/images/auge-symbol.png
Binary files differ
diff --git a/src/main/asciidoc/images/beantragen.png b/src/main/asciidoc/images/beantragen.png
new file mode 100644
index 0000000..88044aa
--- /dev/null
+++ b/src/main/asciidoc/images/beantragen.png
Binary files differ
diff --git a/src/main/asciidoc/images/button_tabelle_kalender.jpg b/src/main/asciidoc/images/button_tabelle_kalender.jpg
new file mode 100644
index 0000000..92a33ce
--- /dev/null
+++ b/src/main/asciidoc/images/button_tabelle_kalender.jpg
Binary files differ
diff --git a/src/main/asciidoc/images/dateien_hochladen.png b/src/main/asciidoc/images/dateien_hochladen.png
new file mode 100644
index 0000000..c07d4be
--- /dev/null
+++ b/src/main/asciidoc/images/dateien_hochladen.png
Binary files differ
diff --git a/src/main/asciidoc/images/einzelmassnahme-loeschen.png b/src/main/asciidoc/images/einzelmassnahme-loeschen.png
new file mode 100644
index 0000000..f74a18c
--- /dev/null
+++ b/src/main/asciidoc/images/einzelmassnahme-loeschen.png
Binary files differ
diff --git a/src/main/asciidoc/images/email-verteiler.png b/src/main/asciidoc/images/email-verteiler.png
new file mode 100644
index 0000000..52966ce
--- /dev/null
+++ b/src/main/asciidoc/images/email-verteiler.png
Binary files differ
diff --git a/src/main/asciidoc/images/erinnerung_datum_grau.png b/src/main/asciidoc/images/erinnerung_datum_grau.png
new file mode 100644
index 0000000..069c12f
--- /dev/null
+++ b/src/main/asciidoc/images/erinnerung_datum_grau.png
Binary files differ
diff --git a/src/main/asciidoc/images/erinnerung_datum_orange.png b/src/main/asciidoc/images/erinnerung_datum_orange.png
new file mode 100644
index 0000000..f59a47b
--- /dev/null
+++ b/src/main/asciidoc/images/erinnerung_datum_orange.png
Binary files differ
diff --git a/src/main/asciidoc/images/erinnerung_datum_rot.jpg b/src/main/asciidoc/images/erinnerung_datum_rot.jpg
new file mode 100644
index 0000000..d5b4a64
--- /dev/null
+++ b/src/main/asciidoc/images/erinnerung_datum_rot.jpg
Binary files differ
diff --git a/src/main/asciidoc/images/erinnerung_glocke_grau.png b/src/main/asciidoc/images/erinnerung_glocke_grau.png
new file mode 100644
index 0000000..d4ea274
--- /dev/null
+++ b/src/main/asciidoc/images/erinnerung_glocke_grau.png
Binary files differ
diff --git a/src/main/asciidoc/images/erinnerung_glocke_orange.png b/src/main/asciidoc/images/erinnerung_glocke_orange.png
new file mode 100644
index 0000000..918723f
--- /dev/null
+++ b/src/main/asciidoc/images/erinnerung_glocke_orange.png
Binary files differ
diff --git a/src/main/asciidoc/images/erinnerung_glocke_rot.jpg b/src/main/asciidoc/images/erinnerung_glocke_rot.jpg
new file mode 100644
index 0000000..1ce63ec
--- /dev/null
+++ b/src/main/asciidoc/images/erinnerung_glocke_rot.jpg
Binary files differ
diff --git a/src/main/asciidoc/images/filter_speichern.png b/src/main/asciidoc/images/filter_speichern.png
new file mode 100644
index 0000000..5a7d08a
--- /dev/null
+++ b/src/main/asciidoc/images/filter_speichern.png
Binary files differ
diff --git a/src/main/asciidoc/images/gnm-erstellen.png b/src/main/asciidoc/images/gnm-erstellen.png
new file mode 100644
index 0000000..88a9eb9
--- /dev/null
+++ b/src/main/asciidoc/images/gnm-erstellen.png
Binary files differ
diff --git a/src/main/asciidoc/images/gnm_detail.png b/src/main/asciidoc/images/gnm_detail.png
new file mode 100644
index 0000000..b154645
--- /dev/null
+++ b/src/main/asciidoc/images/gnm_detail.png
Binary files differ
diff --git a/src/main/asciidoc/images/gnm_einzelmassnahme.png b/src/main/asciidoc/images/gnm_einzelmassnahme.png
new file mode 100644
index 0000000..9a59e79
--- /dev/null
+++ b/src/main/asciidoc/images/gnm_einzelmassnahme.png
Binary files differ
diff --git a/src/main/asciidoc/images/gnm_gesamt.png b/src/main/asciidoc/images/gnm_gesamt.png
new file mode 100644
index 0000000..9e618c5
--- /dev/null
+++ b/src/main/asciidoc/images/gnm_gesamt.png
Binary files differ
diff --git a/src/main/asciidoc/images/gnm_header.png b/src/main/asciidoc/images/gnm_header.png
new file mode 100644
index 0000000..51a256a
--- /dev/null
+++ b/src/main/asciidoc/images/gnm_header.png
Binary files differ
diff --git a/src/main/asciidoc/images/gnm_kalenderuebersicht.png b/src/main/asciidoc/images/gnm_kalenderuebersicht.png
new file mode 100644
index 0000000..fc7d4d9
--- /dev/null
+++ b/src/main/asciidoc/images/gnm_kalenderuebersicht.png
Binary files differ
diff --git a/src/main/asciidoc/images/gnm_schrittsequenz.png b/src/main/asciidoc/images/gnm_schrittsequenz.png
new file mode 100644
index 0000000..3e11ee6
--- /dev/null
+++ b/src/main/asciidoc/images/gnm_schrittsequenz.png
Binary files differ
diff --git a/src/main/asciidoc/images/gnm_schrittsequenz_tabelle.png b/src/main/asciidoc/images/gnm_schrittsequenz_tabelle.png
new file mode 100644
index 0000000..8ea36e3
--- /dev/null
+++ b/src/main/asciidoc/images/gnm_schrittsequenz_tabelle.png
Binary files differ
diff --git a/src/main/asciidoc/images/gnm_uebersichtstabelle.png b/src/main/asciidoc/images/gnm_uebersichtstabelle.png
new file mode 100644
index 0000000..abd0f3a
--- /dev/null
+++ b/src/main/asciidoc/images/gnm_uebersichtstabelle.png
Binary files differ
diff --git a/src/main/asciidoc/images/kalender_tag.png b/src/main/asciidoc/images/kalender_tag.png
new file mode 100644
index 0000000..dfb4aad
--- /dev/null
+++ b/src/main/asciidoc/images/kalender_tag.png
Binary files differ
diff --git a/src/main/asciidoc/images/kalender_woche.png b/src/main/asciidoc/images/kalender_woche.png
new file mode 100644
index 0000000..11b59a1
--- /dev/null
+++ b/src/main/asciidoc/images/kalender_woche.png
Binary files differ
diff --git a/src/main/asciidoc/images/meldung_erfolgreich.png b/src/main/asciidoc/images/meldung_erfolgreich.png
new file mode 100644
index 0000000..06fac8f
--- /dev/null
+++ b/src/main/asciidoc/images/meldung_erfolgreich.png
Binary files differ
diff --git a/src/main/asciidoc/images/meldung_fehler.png b/src/main/asciidoc/images/meldung_fehler.png
new file mode 100644
index 0000000..6413db7
--- /dev/null
+++ b/src/main/asciidoc/images/meldung_fehler.png
Binary files differ
diff --git a/src/main/asciidoc/images/meldung_hinweis.png b/src/main/asciidoc/images/meldung_hinweis.png
new file mode 100644
index 0000000..e64fc27
--- /dev/null
+++ b/src/main/asciidoc/images/meldung_hinweis.png
Binary files differ
diff --git a/src/main/asciidoc/images/netzmassnahme_duplizieren.png b/src/main/asciidoc/images/netzmassnahme_duplizieren.png
new file mode 100644
index 0000000..dbef084
--- /dev/null
+++ b/src/main/asciidoc/images/netzmassnahme_duplizieren.png
Binary files differ
diff --git a/src/main/asciidoc/images/oeffnen-modul.png b/src/main/asciidoc/images/oeffnen-modul.png
new file mode 100644
index 0000000..c6ef04c
--- /dev/null
+++ b/src/main/asciidoc/images/oeffnen-modul.png
Binary files differ
diff --git a/src/main/asciidoc/images/rueckschaltung-planen.png b/src/main/asciidoc/images/rueckschaltung-planen.png
new file mode 100644
index 0000000..11a2080
--- /dev/null
+++ b/src/main/asciidoc/images/rueckschaltung-planen.png
Binary files differ
diff --git a/src/main/asciidoc/images/speichern.png b/src/main/asciidoc/images/speichern.png
new file mode 100644
index 0000000..d24aeb4
--- /dev/null
+++ b/src/main/asciidoc/images/speichern.png
Binary files differ
diff --git a/src/main/asciidoc/images/sperrung_aufheben.png b/src/main/asciidoc/images/sperrung_aufheben.png
new file mode 100644
index 0000000..a6b960f
--- /dev/null
+++ b/src/main/asciidoc/images/sperrung_aufheben.png
Binary files differ
diff --git a/src/main/asciidoc/images/statuswechsel-uebersicht.png b/src/main/asciidoc/images/statuswechsel-uebersicht.png
new file mode 100644
index 0000000..daf23e2
--- /dev/null
+++ b/src/main/asciidoc/images/statuswechsel-uebersicht.png
Binary files differ
diff --git a/src/main/asciidoc/images/stift-symbol.png b/src/main/asciidoc/images/stift-symbol.png
new file mode 100644
index 0000000..c892d04
--- /dev/null
+++ b/src/main/asciidoc/images/stift-symbol.png
Binary files differ
diff --git a/src/main/asciidoc/images/stornieren-deaktiviert.png b/src/main/asciidoc/images/stornieren-deaktiviert.png
new file mode 100644
index 0000000..353e592
--- /dev/null
+++ b/src/main/asciidoc/images/stornieren-deaktiviert.png
Binary files differ
diff --git a/src/main/asciidoc/images/stornieren.png b/src/main/asciidoc/images/stornieren.png
new file mode 100644
index 0000000..66caec6
--- /dev/null
+++ b/src/main/asciidoc/images/stornieren.png
Binary files differ
diff --git a/src/main/asciidoc/images/stornieren_kommentar.png b/src/main/asciidoc/images/stornieren_kommentar.png
new file mode 100644
index 0000000..58c7e17
--- /dev/null
+++ b/src/main/asciidoc/images/stornieren_kommentar.png
Binary files differ
diff --git a/src/main/asciidoc/images/tabellen-filter.png b/src/main/asciidoc/images/tabellen-filter.png
new file mode 100644
index 0000000..d1aa03e
--- /dev/null
+++ b/src/main/asciidoc/images/tabellen-filter.png
Binary files differ
diff --git a/src/main/asciidoc/images/vordefinierte_filter.png b/src/main/asciidoc/images/vordefinierte_filter.png
new file mode 100644
index 0000000..1f2ac0b
--- /dev/null
+++ b/src/main/asciidoc/images/vordefinierte_filter.png
Binary files differ
diff --git a/src/main/asciidoc/userDocumentation/userDocumentation.adoc b/src/main/asciidoc/userDocumentation/userDocumentation.adoc
new file mode 100644
index 0000000..1094889
--- /dev/null
+++ b/src/main/asciidoc/userDocumentation/userDocumentation.adoc
@@ -0,0 +1,1072 @@
+////
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
+ *
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
+////
+
+= Benutzerhandbuch: Geplante Netzmaßnahmen
+
+<<<
+
+
+* Version: 0.2
+* Datum: 14.09.2018
+* Status: zur Prüfung
+
+<<<
+
+:Author: Dr. Michel Alessandrini
+:Email: michel.alessandrini@pta.de
+
+:Date: 2018-09-14
+:Revision: 0.2
+
+:icons:
+
+:source-highlighter: highlightjs
+:highlightjs-theme: solarized_dark
+
+:lang: de
+:encoding: utf-8
+
+:imagesdir: ../images
+:iconsdir: ../images/icons
+
+:toc:
+:toclevels: 4
+:toc-title: Inhaltsverzeichnis
+:toc-placement!:
+:sectanchors:
+:numbered:
+
+toc::[]
+
+<<<
+
+== Sinn und Zweck des Moduls Geplante Netzmaßnahmen
+
+Das Modul Geplante Netzmaßnahme ist ein User-Modul der openKONSEQUENZ.
+
+Mit diesem Modul hat ein Netzbetreiber jederzeit alle geplanten
+Netzmaßnahmen inklusive der aktuellen Status im Überblick.
+
+Dabei wird jede geplante Netzmaßnahme durch einen
+vordefinierten Prozess von der Planung über die Genehmigung und die
+Durchführung bis zum Abschluss der Maßnahme gesteuert. Die einzelnen
+Prozesschritte sind entsprechend der Verantwortungsbereiche eines
+Unternehmens an Benutzerrollen gebunden.
+
+Zur Planung von Einzelmaßnahmen und deren Schrittsequenzen können aktuelle
+Netzzustände angezeigt werden.
+
+<<<
+
+== Übersicht
+
+[[uebersicht-benutzerrollen]]
+=== Benutzerrollen und Aufgaben
+Zur Bearbeitung von geplanten Netzmaßnahnmen sind folgende Benutzerrollen
+definiert.
+
+==== Maßnahmen-Antragsteller
+* <<uebersicht-aller-gnm,Darf alle Geplanten Netzmaßnahmen sehen>>
+* <<gnm-erstellen,Darf neue Geplante Netzmaßnahmen anlegen>>
+* <<ansicht-bearbeitung-gnm,Darf Geplante Netzmaßnahmen im Status "Neu" bearbeiten>>
+* <<statuswechsel-allgemein,Darf den Statuswechsel von "Neu" nach "Beantragt" durchführen>>
+* <<statuswechsel-stornieren,Darf Geplante Netzmaßnahmen in den Status "Neu", "Beantragt", "Zur Genehmigung", "Genehmigt" stornieren>>
+
+==== Maßnahmen-Planer
+* <<uebersicht-aller-gnm,Darf alle Geplanten Netzmaßnahmen sehen>>
+* <<ansicht-bearbeitung-gnm,Darf Geplante Netzmaßnahmen im Status "Beantragt" bearbeiten>>
+* <<statuswechsel-allgemein,Darf den Statuswechsel von "Beantragt" nach "Zur Genehmigung" durchführen>>
+* <<statuswechsel-stornieren,Darf Geplante Netzmaßnahmen in den Status "Neu", "Beantragt", "Zur Genehmigung", "Genehmigt" stornieren>>
+
+==== Maßnahmen-Genehmiger
+* <<uebersicht-aller-gnm,Darf alle Geplanten Netzmaßnahmen sehen>>
+* <<statuswechsel-allgemein,Darf den Statuswechsel von "Zur Genehmigung" nach "Genehmigt" durchführen>>
+* <<gnm-zurueckweisen,Darf Geplante Netzmaßnahmen im Status "Zur Genehmigung" zurückweisen und damit den Status wieder auf den Status "Beantragt" zurücksetzen>>
+* <<statuswechsel-stornieren,Darf Geplante Netzmaßnahmen in den Status "Neu", "Beantragt", "Zur Genehmigung", "Genehmigt" stornieren>>
+
+==== Maßnahmen-Anforderer
+* <<uebersicht-aller-gnm,Darf alle Geplanten Netzmaßnahmen sehen>>
+* <<statuswechsel-allgemein,Darf den Statuswechsel von "Genehmigt" nach "Angefordert" durchführen>>
+* <<statuswechsel-stornieren,Darf Geplante Netzmaßnahmen in den Status "Neu", "Beantragt", "Zur Genehmigung", "Genehmigt" stornieren>>
+
+==== Maßnahmen-Freigeber
+* <<uebersicht-aller-gnm,Darf alle Geplanten Netzmaßnahmen sehen>>
+* <<statuswechsel-allgemein,Darf den Statuswechsel von "Angefordert" nach "Freigegeben" durchführen>>
+* <<gnm-zurueckweisen,Darf Geplante Netzmaßnahmen im Status "Angefordert" zurückweisen und damit den Status wieder auf den Status "Beantragt" zurücksetzen>>
+* <<statuswechsel-stornieren,Darf Geplante Netzmaßnahmen in den Status "Neu", "Beantragt", "Zur Genehmigung", "Genehmigt" stornieren>>
+
+==== Maßnahmen-Ausführer
+* <<uebersicht-aller-gnm,Darf alle Geplanten Netzmaßnahmen sehen>>
+* <<statuswechsel-allgemein,Darf den Statuswechsel von "Freigegeben" nach "Schalten aktiv" durchführen>>
+* <<statuswechsel-allgemein,Darf den Statuswechsel von "Schalten aktiv" nach "In Arbeit" durchführen>>
+* <<statuswechsel-allgemein,Darf den Statuswechsel von "In Arbeit" nach "Arbeit beendet" durchführen>>
+
+==== Maßnahmen-Fertigsteller
+* <<uebersicht-aller-gnm,Darf alle Geplanten Netzmaßnahmen sehen>>
+* <<statuswechsel-allgemein,Darf den Statuswechsel von "Arbeit beendet" nach "Maßnahme beendet" durchführen>>
+* <<statuswechsel-allgemein,Darf den Statuswechsel von "Maßnahme beendet" nach "Geschlossen" durchführen>>
+
+==== Administrator
+* Darf alles
+* Darf zusätzlich Konfigurationen vornehmen (Details sind in technischer Dokumentation beschrieben)
+** Optionale Status im Prozess
+** Mailvorlagen für Benachrichtigungen (bei Ziel-Status "Genehmigt", "Storniert", "Zurückgewiesen")
+** Basis eMail-Verteilerlisten
+** Unterstützte Dateiformate
+** Zeitfenster für Erinnerungen
+
+[[uebersicht-statuszustaende]]
+=== Statuszustände
+Zur Bearbeitung von geplanten Netzmaßnahnmen sind folgende Status
+definiert.
+
+.Hinweis zu den optionalen Status:
+* Je nach Konfiguration des Systems sind keine, einzelne oder alle optionalen
+ Status in der Anwendung aktiv.
+* Diese Einstellung kann nur der Administrator anpassen.
+
+[[gnm-zurueckweisen]]
+.Hinweis zum Zurückweisen von Geplanten Netzmaßnahmen
+* Die Geplante Netzmaßnahme wurde von einer definierten Stelle geprüft und zurückgewiesen. Die
+ Geplante Netzmaßnahme kann nach Korrektur voraussichtlich durchgeführt
+ werden.
+* Beim Zurückweisen von Geplanten Netzmaßnahmen wird der Status wieder auf
+ "Beantragt" zurückgesetzt
+
+==== Neu
+* Die Geplante Netzmaßnahme ist angelegt.
+* Ggf. sind betroffene Betriebsmittel, Zeitpunkte und die Dauer der
+ Geplanten Netzmaßnahme erfasst.
+
+==== Beantragt
+* Der Titel der Geplanten Netzmaßnahme ist fix.
+* Ggf. sind betroffene Betriebsmittel, Zeitpunkte und die Dauer der
+ Geplanten Netzmaßnahme erfasst.
+
+==== Zur Genehmigung _(optional)_
+* Die Geplante Netzmaßnahme ist vollständig geplant und kann zur Genehnmigung
+ vorgelegt werden.
+* Betroffene Betriebsmittel, Zeitpunkte und die Dauer der
+ Geplanten Netzmaßnahme sind erfasst.
+* Einzelmaßnahmen und Schrittsequenzen sind mit konkreten Werten geplant.
+* Die erfassten Daten können nicht mehr geändert werden.
+* Hinweise können über das Feld "Bemerkungen" eingetragen werden.
+
+.Optional
+* Dieser Status kann durch den Administrator deaktiviert werden.
+* Wenn dieser Status deaktiviert ist, wird er einfach übersprungen.
+
+==== Genehmigt _(optional als Endstatus)_
+* Die Geplante Netzmaßnahme wurde von einer definierten Stelle geprüft und
+ genehmigt.
+* Die erfassten Daten können nicht mehr geändert werden.
+* Genehmigungsvermerke können über das Feld "Bemerkungen" erfasst werden.
+
+.Optional als Endstatus
+* Dieser Status kann durch den Administrator als Endstatus gesetzt werden.
+* Wenn dieser Status als Endstatus gesetzt ist, werden die folgenden Status
+ übersprungen, so dass der nächste Status "Maßnahme beendet" ist.
+
+==== Angefordert _(optional)_
+* Die Geplante Netzmaßnahme wird am Tag der Ausführung angefordert.
+* Die ausführende Instanz (z.B. Schaltmeister) ist identifiziert und bereit
+ die Geplante Netzmaßnahme durchzuführen.
+* Die erfassten Daten können nicht mehr geändert werden.
+* Bearbeitungsvermerke können über das Feld "Bemerkungen" erfasst werden.
+
+.Optional
+* Dieser Status kann durch den Administrator deaktiviert werden.
+* Wenn dieser Status deaktiviert ist, wird er einfach übersprungen.
+
+==== Freigegeben _(optional als Endstatus)_
+* Der Netzzustand erlaubt die Durchführung der Schaltung.
+* Die erfassten Daten können nicht mehr geändert werden.
+* Hinweise können über das Feld "Bemerkungen" erfasst werden.
+
+.Optional als Endstatus
+* Dieser Status kann durch den Administrator als Endstatus gesetzt werden.
+* Wenn dieser Status als Endstatus gesetzt ist, werden die folgenden Status
+ übersprungen, so dass der nächste Status "Maßnahme beendet" ist.
+
+==== Schalten aktiv
+* Die Schaltung hat begonnen (mindestens der erste Schritt einer Schrittsequenz
+ ist ausgeführt).
+* Die Schrittsequenz wird in der festgelegten Reihenfolge ausgeführt.
+* Die erfassten Daten können nicht mehr geändert werden.
+* Hinweise können über das Feld "Bemerkungen" erfasst werden.
+
+==== In Arbeit _(optional)_
+* Der angeforderte Schaltzustand ist hergestellt worden.
+* Für diesen Status kann auch die vorherige Vergabe von entsprechenden
+ Erlaubnissen (Verfügungserlaubnis usw.) erforderlich sein, die manuell
+ gesetzt werden können.
+* Die erfassten Daten können nicht mehr geändert werden.
+* Hinweise können über das Feld "Bemerkungen" erfasst werden.
+
+.Optional
+* Dieser Status kann durch den Administrator deaktiviert werden.
+* Wenn dieser Status deaktiviert ist, wird er einfach übersprungen.
+
+==== Arbeit beendet
+* Die Arbeiten sind beendet.
+* Die erteilten Erlaubnisse etc. sind zurückgegeben worden.
+* Die erfassten Daten können nicht mehr geändert werden.
+* Hinweise können über das Feld "Bemerkungen" erfasst werden.
+
+==== Maßnahme beendet
+* Der für den Abschluss des Vorgangs definierte Schaltzustand (in der Regel
+ der ursprüngliche Schaltzustand) ist hergestellt.
+* Die erfassten Daten können nicht mehr geändert werden.
+* Hinweise können über das Feld "Bemerkungen" erfasst werden.
+
+==== Geschlossen
+* Alle notwendigen Dokumentationen sind vorgenommen worden.
+* Die erfassten Daten können nicht mehr geändert werden.
+
+==== Storniert
+* Die Geplante Netzmaßnahme kann oder soll nicht weiterbearbeitet werden.
+* Geplante Netzmaßnahmen dürfen nur aus den Status "Neu", "Beantragt",
+ "Zur Genehmigung", "Genehmigt" storniert werden.
+* Der Stornogrund ist im Feld "Bemerkungen" erfasst.
+* Die erfassten Daten können nicht mehr geändert werden.
+
+
+=== Gesamtprozess
+Der gesamte Prozessablauf über den Lebenszyklus einer Geplanten Netzmaßnahme
+ist im folgenden Prozessdiagramm dargestellt. Aufgrund besserer Lesbarkeit
+ist der Prozess in drei zusammenhängenen Prozessabschnitten aufgeteilt.
+
+.Prozessübersicht (Abschnitt 1: "Neu" bis "Genehmigt")
+[options="header,footer"]
+image::massnahme_planen_und_genehmigen_1.png[]
+
+.Prozessübersicht (Abschnitt 2: "Angefordert" bis "Freigegeben")
+[options="header,footer"]
+image::massnahme_durchfuehren_u_abschliessen_1.png[]
+
+.Prozessübersicht (Abschnitt 3: "Schalten aktiv" bis "Geschlossen")
+[options="header,footer"]
+image::massnahme_durchfuehren_u_abschliessen_2.png[]
+
+<<<
+
+== Benutzerdialoge
+
+=== Allgemeine Hinweise
+Die Anwendung ist für folgende Endgeräte optimiert:
+
+* Desktop-PC
+* Tablet
+
+Es sind folgende Browser unterstützt:
+
+* Microsoft Internet Explorer
+* Google Chrome
+* Firefox Quantum
+
+Die Bildschirmauflösung bzw. die Fenstergröße des Browsers sollte folgende Werte nicht unterschreiten:
+
+* 1.024 x 768 Pixel
+
+
+[[uebersicht-aller-gnm]]
+=== Übersicht aller Geplanten Netzmaßnahmen
+Die Übersichtsseite stellt standardmäßig alle Geplanten Netzmaßnahmen
+in einer Tabelle dar. Bei Bedarf können die Geplanten Netzmaßnahmen aber auch in
+einer Kalender-Ansicht angezeigt werden.
+
+.Umschalten zwischen Tabellen- und Kalender-Ansicht
+[options="header,footer"]
+image::button_tabelle_kalender.jpg[]
+
+==== Tabellen-Ansicht
+Das Modul Geplante Netzmaßnahme startet immer in der Tabellen-Ansicht.
+
+.Übersicht der Geplanten Netzmaßnahmen in der Tabellen-Ansicht
+[options="header,footer"]
+image::gnm_uebersichtstabelle.png[]
+
+Die Übersichtstabelle zeigt zu jeder Geplanten Netzmaßnahme folgende Informationen an:
+
+.Felder in der Tabellenübersicht
+[options="header,footer"]
+|=========================================================
+|Feld|Erläuterung
+|Beginnt am
+a|
+ * Entspricht dem Wert aus "Beginn der ersten geplanten Einzelmaßnahme"
+
+|Nummer (ID)
+a|
+
+* Automatisch generierte eindeutige Nummer der Geplanten Netzmaßnahme
+
+|Sparte
+a|
+
+* S: Strom (Hintergrundfarbe: rot)
+* G: Gas (gelb)
+* W: Wasser (blau)
+* F: Fernwärme (grün)
+
+|Titel der Maßnahme
+a|
+
+* Bezeichnung der Geplanten Netzmaßnahme
+
+|Name des Erstellers
+a|
+
+* Name des Maßnahmen-Antragstellers
+
+|Betroffenes Objekt / Betriebsmittel
+a|
+
+* Das in der Geplanten Netzmaßnahme betroffene Betriebsmittel
+
+|Status
+a|
+
+* siehe Abschnitt <<uebersicht-statuszustaende>>
+
+|=========================================================
+
+Jede Geplante Netzmaßnahme kann je nach Benutzerrolle und Status der Maßnahme
+direkt aus der Tabelle angezeigt, bearbeitet oder storniert werden.
+
+.Auge-Symbol zum Anzeigen einer Geplanten Netzmaßnahme
+[options="header,footer"]
+image::auge-symbol.png[]
+
+.Stift-Symbol zum Bearbeiten einer Geplanten Netzmaßnahme
+[options="header,footer"]
+image::stift-symbol.png[]
+
+.Stornieren-Symbol zum Stornieren einer Geplanten Netzmaßnahme
+[options="header,footer"]
+image::stornieren.png[]
+
+.Deaktiviertes Stornieren-Symbol
+[options="header,footer"]
+image::stornieren-deaktiviert.png[]
+
+Mit den vordefinierten Filtern "Meine Vorgänge", "Geschlossene" und "Stornierte",
+sowie über die Filter der Tabelle selbst, können beliebige individuelle
+Filterkombinationen erstellt und gespeichert werden. Details dazu sind im Abschnitt
+<<allg-funktionen-uebersicht-aller-gnm>> beschrieben.
+
+[[gnm-erstellen]]
+Ist ein Benutzer mit der Benutzerrolle "Maßnahmen-Antragsteller" angemeldet,
+so besteht die Möglichkeit über die Schaltfläche "Netzmaßnahme erstellen" eine neue
+Geplante Netzmaßnahme anzulegen.
+
+.Schaltfläche zum Erstellen von Geplanten Netzmaßnahmen
+[options="header,footer"]
+image::gnm-erstellen.png[]
+
+Alternativ kann über die Funktion "Netzmaßnahme duplizieren" eine neue Geplante
+Netzmaßnahme angelegt werden, siehe Abschnitt <<gnm-duplizieren>>.
+
+==== Kalender-Ansicht
+Der Kalender stellt drei Ansichten zur Verfügungen, um die Einzelmaßnahmen der
+Geplanten Netzmaßnahmenkalendarisch anzuzeigen. Die Auswahl erfolgt über die
+entsprechenden Schaltflächen
+auf der rechten Seite.
+
+. Monatsansicht
+. Wochenansicht
+. Tagesansicht
+
+Innerhalb der jeweiligen Ansichten besteht die Möglichkeit zum Nächsten, zum
+Vorherigen oder zum Aktuellen Darstellungszeitraum zu wechseln. Dies erfolgt
+über die entsprechenden Schaltflächen auf der linken Seite.
+
+Der im Kalender dargestellte Zeitraum einer Einzelmaßnahme basiert auf folgenden
+Werten:
+
+* Beginn der geplanten Einzelmaßnahme
+* Ende der geplanten Einzelmaßnahme
+
+Mit einem Klick auf die dargestellt Einzelmaßnahme kann die zugehörige Geplante
+Netzmaßnahme direkt aus dem Kalender zum Anzeigen (Auge-Symbol)
+oder zum Bearbeiten (Stift-Symbol) - je nach Berechtigung des Benutzers - geöffnet
+werden.
+
+Ist ein Benutzer mit der Benutzerrolle "Maßnahmen-Antragsteller" angemeldet,
+so besteht die Möglichkeit über die Schaltfläche "Netzmaßnahme erstellen" eine neue
+Geplante Netzmaßnahme anzulegen, siehe Absatz <<gnm-erstellen>>.
+
+===== Monatsansicht
+In der Monatsansicht ist jede Einzelmaßnahme mit einen roten Punkt dargestellt
+und zwar für jeden Tag innerhalb des Zeitraums der Einzelmaßnahme. Die rot
+umkreiste Zahl zeigt die Anzahl der Einzelmaßnahmen für den jeweiligen
+Kalendertag an.
+
+.Monatsansicht im Kalender
+[options="header,footer"]
+image::gnm_kalenderuebersicht.png[]
+
+Um zu erkennen, welche Einzelmaßnahmen sich hinter den roten Punkten verbergen,
+reicht ein Klick auf den entsprechenden Kalendertag aus. Anschließend öffnet
+sich ein Bereich unterhalb des ausgewählten Kalendertags und zeigt die Titel der
+Einzelmaßnahmen an. Mit einem Klick auf die Einzelmaßnahme lässt sich die
+zugehörige Geplante Netzmaßnahme direkt zur Ansicht oder zum Bearbeiten öffnen.
+
+===== Wochenansicht
+In der Wochenansicht sind alle, im jeweils angezeigten Zeitraum, Einzelmaßnahmen
+dargestellt.
+
+.Wochenansicht im Kalender
+[options="header,footer"]
+image::kalender_woche.png[]
+
+Mit einem Klick auf die Einzelmaßnahme lässt sich die zugehörige Geplante
+Netzmaßnahme direkt zur Ansicht oder zum Bearbeiten öffnen.
+
+===== Tagesansicht
+In der Tagesansicht sind die Einzelmaßnahmen minutengenau angezeigt.
+Wenn eine Netzmaßnahme über mehrere Tage geplant ist, so werden alle Tage, die
+nicht dem Start- oder Endtag entsprechen, jeweils von 0:00 bis 24:00 Uhr
+dargestellt.
+
+.Tagesansicht im Kalender
+[options="header,footer"]
+image::kalender_tag.png[]
+
+Mit einem Klick auf die Geplante Netzmaßnahme lässt sich diese direkt zur Ansicht
+oder zum Bearbeiten öffnen.
+
+[[ansicht-bearbeitung-gnm]]
+=== Ansicht und Bearbeitung einer Geplanten Netzmaßnahme
+Die Ansicht einer Geplanten Netzmaßnahme teilt sich in mehrere Bereiche auf:
+
+. Netzmaßnahme (Basis-Informationen)
+. Details der Netzmaßnahme
+.. Maßnahme
+.. Einzelmaßnahmen und Schrittsequenzen
+. E-Mail Verteiler für Status Genehmigt, Storniert und Zurückgewiesen
+. Statuswechsel (Änderungshistorie)
+
+.Ansicht einer Geplanten Netzmaßnahme
+[options="header,footer"]
+image::gnm_gesamt.png[]
+
+Durch einen Klick auf die Bezeichnung ("Netzmaßnahme", "Details der Netzmaßnahmen",
+"E-Mail Verteiler für Status Genehmigt, Storniert und Zurückgewiesen, Statuswechsel")
+können die einzelnen Bereiche auf- und zugeklappt werden.
+
+Um Änderungen an den Geplanten Netzmaßnahmen, Einzelmaßnahmen oder Schrittsequenzen
+zu sichern, ist die Schaltfläche "Speichern" zu klicken. Der Benutzerdialog der
+Geplanten Netzmaßnahmen schließt sich und anschließend erscheint die Tabellen-Ansicht.
+Zudem wird das erfolgreiche Speichern über eine Meldung bestätigt,
+siehe Abschnitt <<meldungen-hinweise>>.
+
+.Schaltfläche zum Speichern der Änderungen
+[options="header,footer"]
+image::speichern.png[]
+
+Um Änderungen nicht zu speichern ist die Schaltfläche "Abbrechen" zu klicken. Damit
+werden alle Anpassungen verworfen und zur Tabellen-Ansicht zurückgekehrt.
+
+.Schaltfläche zum Abbrechen der Bearbeitung ohne Speichern
+[options="header,footer"]
+image::abbrechen.png[]
+
+CAUTION: Die Funktion "Datei hochladen" speichert Dateien immer direkt nach dem Upload,
+unabhängig davon ob die Schaltfläche "Speichern" oder "Abbrechen" geklickt wurde.
+
+Statuswechsel werden über die entsprechenden Schaltflächen angeboten. Die Anzeige
+ist dabei abhängig vom Status der Geplanten Netzmaßnahme sowie der Konfiguration
+des Prozesses. Als Beispiel ist im Folgenden die Schaltfläche für den
+Statuswechsel nach "Beantragt" dargestellt. Die weiteren Status sind im Abschnitt
+<<uebersicht-statuszustaende>> ersichtlich.
+
+.Schaltfläche zum Statuswechsel (Beispiel: Beantragen)
+[options="header,footer"]
+image::beantragen.png[]
+
+Details zum Duplizieren von Geplanten Netzmaßnahmen befinden sich im Abschnitt
+<<gnm-duplizieren>>.
+
+==== Netzmaßnahme (Basis-Informationen)
+Die Basisinformationen einer Geplanten Netzmaßnahme befinden sich im oberen
+Teil des Benutzerdialogs. Dieser Teil ist feststehend, um die grundlegenden
+Daten einer Maßnahme immer im Blick zu behalten.
+
+Pflichtfelder sind farblich markiert. Zunächst sind diese rot. Erst wenn die
+Inhalte entsprechend eingetragen sind, ändert sich die Markierung auf grün.
+
+.Basis-Informationen einer Geplanten Netzmaßnahme
+[options="header,footer"]
+image::gnm_header.png[]
+
+Eine Geplante Netzmaßnahme (Teil: Basisinformationen) besitzt folgende Attibute:
+
+.Attribute einer Geplanten Netzmaßnahme (Teil: Basisinformationen)
+[options="header,footer"]
+|=========================================================
+|Attribut |Pflichtfeld(*) |Inhaltsart |Bearbeitbar im Status |Beschreibung
+|Nummer (ID) |- |Generiert |- |Eindeutige Nummer im Format: JJMMTT_<Lfd-Nr.>
+|Sparte |nein |Auswahlfeld |Neu, Beantragt |Strom, Gas, Wasser, Fernwärme
+|Ebene |nein |Auswahlfeld |Neu, Beantragt |In Abhängigkeit zur Auswahl "Sparte" weitere Eigenschaften
+|Gebiet (Region) der Maßnahme |ja |Textfeld |Neu, Beantragt |Freie Eingabe oder Auswahl eines vorherigen Eintrags möglich
+|Status |- |Automatisch |- |Status im Prozessablauf
+|Titel der Maßnahme |ja |Textfeld |Neu |Sprechende Bezeichnung der Geplanten Netzmaßnahme
+|Antragsteller |- |Automatisch |- |Angemeldeter Maßnahmen-Antragsteller beim Anlegen der Maßnahme
+|Abteilung Antragsteller |ja |Textfeld |Neu |Freie Eingabe oder Auswahl eines vorherigen Eintrags möglich
+|Kostenstelle |ja |Textfeld |Neu, Beantragt |Freie Eingabe oder Auswahl eines vorherigen Eintrags möglich
+|=========================================================
+
+(*) Pflichtfeld um einen Statuswechsel nach "Beantragt" durchführen zu können.
+
+==== Details einer Netzmaßnahme
+Die Detailinformationen einer Geplanten Netzmaßnahme befinden sich im mittleren
+Teil des Benutzerdialogs. Dieser Teil ist scrollbar, um alle Details erfassen
+und sehen zu können.
+
+.Details-Informationen einer Geplanten Netzmaßnahme
+[options="header,footer"]
+image::gnm_detail.png[]
+
+Dieser Bereich ist nochmals durch Reiter unterteilt in:
+
+* Maßnahme
+* Einzelmaßnahme 1
+* Optional: Einzelmaßnahme 2 (bis 10)
+
+Die Details einer Geplanten Netzmaßnahme befinden sich im Reiter "Maßnahme"
+und bestehen aus folgenden Attributen:
+
+.Attribute einer Geplanten Netzmaßnahme (Teil: Detailinformationen)
+[options="header,footer"]
+|=========================================================
+|Attribut |Pflichtfeld(*) |Bearbeitbar im Status |Inhaltsart |Beschreibung
+|Beginn der ersten geplanten Einzelmaßnahme |- |- |Automatisch |Wird übernommen aus Feld "Beginn der geplanten Einzelmaßnahme" vom Reiter "Einzelmaßnahme 1"
+|Ende der Netzmaßnahme |- |- |Automatisch |Wird übernommen aus Feld "Ende der geplanten Einzelmaßnahme" vom Reiter mit der höchsten Nummer "Einzelmaßnahme 1 (ggf. bis 10)"
+|Betroffenes Objekt/Betriebsmittel |ja |Neu, Beantragt |Textfeld |Freie Eingabe oder Auswahl eines vorherigen Eintrags möglich
+|Häufigkeit |ja |Neu, Beantragt |Zahl |Anzahl der Wiederholungen
+|Wiederholung |ja |Neu, Beantragt |Auswahl-Liste |täglich, wöchentlich, monatlich, jährlich
+|Wiederbereitstellungszeit |ja |Neu, Beantragt |Textfeld |Freie Eingabe oder Auswahl eines vorherigen Eintrags möglich
+|Beschreibung der Maßnahme |ja |Neu, Beantragt |Textfeld |Beschreibende Erläuterung als Freitext
+|Bemerkungen |nein |alle ausser Geschlossen|Textfeld |Bemerkungen, z.B. für Statuswechsel oder Genehmigungsvermerke
+|Anhang |nein |Neu, Beantragt |Dateiablage |Erforderliche Dateien zur Ergänzung der Geplanten Netzmaßnahme
+|Letzter Bearbeiter |- |- |Automatisch |Aktuell angemeldeter Benutzer
+|Abteilung letzter Bearbeiter |ja |Neu |Textfeld |Freie Eingabe oder Auswahl eines vorherigen Eintrags möglich
+|=========================================================
+
+(*) Pflichtfeld um einen Statuswechsel nach "Beantragt" durchführen zu können.
+
+In den Reitern "Einzelmaßnahme 1 (bis 10)" befinden sich die Details zu
+Einzelmaßnahmen und Schrittsequenzen. Die Erläuterungen dazu sind im folgenden
+Abschnitt dargestellt.
+
+[[einzelmassnahme-schrittsequenz]]
+==== Ansicht Einzelmaßnahme und Schrittsequenzen
+Eine Geplante Netzmaßnahme besteht aus mindestens einer und maximal
+zehn Einzelmaßnahmen. Initial ist immer eine Einzelmaßnahme angelegt.
+
+Eine zweite Einzelmaßnahme macht zum Beispiel Sinn, um Rückschaltungen zu planen. Dazu
+wird die ausgewählte Einzelmaßnahme mitsamt ihren Inhalten kopiert und die dort
+erfassten Schrittsequenzen in umgekehrter Reihenfolge geplant. Anschließend sind
+nur noch kleine manuelle Anpassungen notwendig, um die Rückschaltungsplanung zu finalisieren.
+Als Hilfsmittel existiert die Schaltfläche "Rückschaltung planen", die eine
+neue Einzelmaßnahme mit der Bezeichnung "Rückschaltung von <Titel der Einzelmaßnahme>"
+anlegt.
+
+.Schaltfläche zur Erstellung einer Rückschaltung
+[options="header,footer"]
+image::rueckschaltung-planen.png[]
+
+Wenn mehr als eine Einzelmaßnahme existiert, also mehr als ein Reiter mit der
+Bezeichnung "Einzelmaßnahme" vorhanden ist, sortiert das System die Einzelmaßnahmen
+automatisch (Nach Klick auf die Schaltfläche "Speichern" oder bei einem Statuswechsel).
+In der "Einzelmaßnahme 1" befindet sich somit zeitlich immer die erste Einzelmaßnahme.
+D.h. der "Beginn der geplanten Einzelmaßnahme" ist im Vergleich zu den anderen
+Einzelmaßnahmen am ehesten. In der Einzelmaßnahme mit der höchsten Nummer ist
+folglich immer die letzte beginnende Einzelmaßnahme enthalten.
+
+Wenn mehr als eine Einzelmaßnahme existiert, ist das Löschen von Einzelmaßnahmen
+möglich. Dazu ist die zu löschende Einzelmaßnahe auszuwählen und anschließend
+die Schaltfläche "Einzelmaßnahme löschen" zu klicken. Die Einzelmaßnahme wird
+anschließend ohne Rückmeldung entfernt.
+
+.Schaltfläche zum Löschen einer Einzelmaßnahme
+[options="header,footer"]
+image::einzelmassnahme-loeschen.png[]
+
+===== Einzelmaßnahme
+Im Reiter "Einzelmaßnahme 1 (bis 10)" sind im oberen Bereich die Basisinformation
+einer Einzelmaßnahme dargestellt.
+
+.Informationen einer Einzelmaßnahme
+[options="header,footer"]
+image::gnm_einzelmassnahme.png[]
+
+Eine Einzelmaßnahme besitzt folgende Attibute:
+
+.Attribute einer Einzelmaßnahme
+[options="header,footer"]
+|=========================================================
+|Attribut |Pflichtfeld(*) |Inhaltsart |Bearbeitbar im Status |Beschreibung
+|Titel der Einzelmaßnahme |ja |Textfeld |Neu, Beantragt |Sprechende Bezeichnung der Einzelmaßnahme
+|Beginn der geplanten Einzelmaßnahme |ja |Datum-Zeit |Neu, Beantragt |Geplanter Startzeitpunkt der Einzelmaßnahme
+|Ende der geplanten Einzelmaßnahme |ja |Datum-Zeit |Neu, Beantragt |Geplanter Endzeitpunkt der Einzelmaßnahme
+|Betroffenes Objekt/Betriebsmittel |- |Automatisch |- |Wird übernommen aus "Betroffenes Objekt/Betriebsmittel" der Netzmaßnahme
+|Verantwortlicher Vor-Ort |ja |Textfeld |Neu, Beantragt |Freie Eingabe oder Auswahl eines vorherigen Eintrags möglich
+|Abteilung Verantwortlicher Vor-Ort |nein |Textfeld |Neu, Beantragt |Freie Eingabe oder Auswahl eines vorherigen Eintrags möglich
+|Netzführung/Netzservice/Genehmiger |nein |Textfeld |Neu, Beantragt |Freie Eingabe oder Auswahl eines vorherigen Eintrags möglich
+|Beschreibung |ja |Textfeld |Neu, Beantragt |Beschreibende Erläuterung als Freitext
+|=========================================================
+
+(*) Pflichtfeld um einen Statuswechsel nach "Beantragt" durchführen zu können.
+
+===== Schrittsequenz
+Im unteren Bereich befinden sich die Schrittsequenzen einer Einzelmaßnahme. Auf
+linken Seite können Schrittsequenzen erfasst werden.
+
+.Informationen einer Schrittsequenz
+[options="header,footer"]
+image::gnm_schrittsequenz.png[]
+
+Eine Schrittsequenz (als Teil einer Einzelmaßnahme) besitzt folgende Attibute:
+
+.Attribute einer Schrittsequenz
+[options="header,footer"]
+|=========================================================
+|Attribut |Pflichtfeld(*) |Inhaltsart |Bearbeitbar im Status |Beschreibung
+|Betriebsmittel-Gruppe |nein |Auswahl-Liste |Neu, Beantragt |Informationen werden aus dem Leitsystem geladen.
+ Nach Auswahl wird Wert in Feld "Betriebsmittel" übernommen.
+|Betriebsmittel |nein |Auswahl-Baum |Neu, Beantragt |Wird übernommen aus "Betriebsmittel-Gruppe".
+ Über Baumstruktur das betroffene Betriebsmittel auswählen.
+ Ausgewähltes Betriebsmittel wird in Feld "Objekt der Schaltung" übernommen.
+|Objekt der Schaltung |ja |Textfeld |Neu, Beantragt |Wird übernommen aus "Betriebsmittel-Gruppe".
+ Alternativ: Eingabe als Freitext.
+|Ist-Zustand |nein |Textfeld |Neu, Beantragt |Freie Eingabe oder Auswahl eines vorherigen Eintrags möglich
+|Soll-Zustand |nein |Textfeld |Neu, Beantragt |Freie Eingabe oder Auswahl eines vorherigen Eintrags möglich
+|Ist-Zeit |nein |Textfeld |Neu, Beantragt |Freie Eingabe oder Auswahl eines vorherigen Eintrags möglich
+|Typ |nein |Textfeld |Neu, Beantragt |Freie Eingabe oder Auswahl eines vorherigen Eintrags möglich
+|Ausführender |nein |Textfeld |Neu, Beantragt |Freie Eingabe oder Auswahl eines vorherigen Eintrags möglich
+|=========================================================
+
+(*) Pflichtfeld um eine Schrittsequenz über die Schaltfläche "Schritt hinzufügen" anlegen zu können.
+
+Auf der rechten Seite befinden sich alle erfassten Schrittsequenzen in der korrekten
+Reihenfolge für die spätere Umsetzung. Bei Bedarf kann die Reihenfolge der Einzelschritte
+durch einfaches Verschieben angepasst werden. Eine Anpassung der Werte ist
+ebenfalls direkt in der Tabelle möglich, indem das entsprechende Feld angeklickt
+und bearbeitet wird.
+
+.Übersicht aller Schrittsequenzen einer Einzelmaßnahme
+[options="header,footer"]
+image::gnm_schrittsequenz_tabelle.png[]
+
+
+==== eMail-Verteiler
+Details zum E-Mail Verteiler, siehe Abschnitt <<email-benachrichtigung-statuswechsel>>
+
+==== Änderungshistorie der Statuswechsel
+Alle Statuswechsel werden dokumentiert und können innerhalb einer Geplanten Netzmaßnahme
+im Bereich "Statuswechsel" durch Klicken auf die gleichnamige Bezeichnung
+"Statuswechsel" angezeigt werden.
+
+.Übersicht der Statuswechsel einer Geplanten Netzmaßnahme
+[options="header,footer"]
+image::statuswechsel-uebersicht.png[]
+
+Dort sind Datum und Uhrzeit, die Statuswechsel-Zustände sowie der jeweilige
+Bearbeiter der Geplanten Maßnahme ersichtlich.
+
+<<<
+
+== Benachrichtigungen und Erinnerungen
+
+[[email-benachrichtigung-statuswechsel]]
+=== eMail-Benachrichtigung bei Statuswechsel
+Es wird eine automatische eMail-Benachrichtigung versendet, wenn folgende
+Ziel-Status erreicht werden:
+
+* Genehmigt
+* Storniert
+* Zurückgewiesen
+
+Die Adresssaten sind über die E-Mail Verteilerliste für Status Genehmigt,
+Storniert und Zurückgewiesen definiert.
+
+Die individuelle Anpassung der Verteilerliste ist im Abschnitt
+<<email-verteiler-anpassen>>
+beschrieben.
+
+=== Erinnerungsfunktion für anstehende und fällige Netzmaßnahmen
+Damit anstehende und fällige Geplante Netzmaßnahmen leicht erkannt werden können,
+setzt das Modul zwei optische Hilfsmittel um:
+
+. Farbliches Glocken-Symbol in der Kopfzeile
+. Farbliche Darstellung des Datums "Beginn am" in der Übersichtstabelle "Aktuelle Netzmaßnahmen"
+
+Die Entscheidung, ob eine Erinnerung notwendig ist, basiert auf folgenden Kriterien:
+
+* Es werden nur Geplante Netzmaßnahmen in den Status "Neu", "Beantragt" und
+ "Zur Genehmigung" berücksichtigt.
+* Der "Beginn der ersten geplanten Einzelmaßnahme" wird in Bezug zum jeweils
+ aktuellen Zeitpunkt gesetzt. Anhand dessen erfolgt die Erinnerung gemäß der
+ folgenden Tabelle.
+
+.Erinnerungen
+[options="header,footer"]
+|=========================================================
+|Symbol|Beginnt am|Erinnerung
+
+a|
+image::erinnerung_glocke_grau.png[]
+
+a|
+image::erinnerung_datum_grau.png[]
+|Keine Geplante Netzmaßnahme ist fällig oder startet in den nächsten 48 Stunden.
+
+a|
+image::erinnerung_glocke_orange.png[]
+
+a|
+image::erinnerung_datum_orange.png[]
+|Mindestens eine Geplante Netzmaßnahme sollte in den nächsten 48 Stunden beginnen.
+
+a|
+image::erinnerung_glocke_rot.jpg[]
+
+a|
+image::erinnerung_datum_rot.jpg[]
+|Mindestens eine Geplante Netzmaßnahme sollte bereits gestartet sein.
+
+|=========================================================
+
+[[meldungen-hinweise]]
+=== Hinweise und Meldungen nach Benutzeraktionen
+Nach Benutzeraktionen erscheinen in bestimmten Fällen Meldungen des Systems,
+um den Benutzer:
+
+. über den Erfolg der Aktion zu informieren,
+. Handlungsanweisungen zu geben,
+. über Fehler des Systems zu informieren.
+
+==== Erfolg einer Aktion
+Positive Meldungen sind grün hinterlegt und werden u.a. in folgenden Fällen angezeigt:
+
+* Neu-Anlage von Geplanten Netzmaßnahmen
+* Statuswechseln
+* Duplizieren von Geplanten Netzmaßnahmen
+
+.Meldung nach erfolgreichem Anlegen einer Geplanten Netzmaßnahme
+[options="header,footer"]
+image::meldung_erfolgreich.png[]
+
+Diese Meldungen bleiben für zehn Sekunden sichtbar und verschwinden dann wieder
+automatisch.
+
+==== Handlungsanweisung
+In einigen Situationen muss der Benutzer weitere Aktionen ausführen, damit die
+Handlung erfolgreich abgeschlossen werden kann. Diese gelb hinterlegten Hinweise
+erscheinen im folgenden Fall:
+
+* Fehlenden Informationen (Pflichtfelder füllen)
+
+.Hinweis Pflichtfelder
+[options="header,footer"]
+image::meldung_hinweis.png[]
+
+Diese Meldungen bleiben solange sichtbar bis sie durch den Benutzer über das
+kleine x geschlossen werden.
+
+==== Fehlermeldungen
+Wenn Aktionen aufgrund technischer Gegebenheiten nicht erfolgreich durchgeführt
+werden können, erscheinen rot hinterlegte Fehlermeldungen. Das kann u.a. in
+folgenden Situationen passieren:
+
+* Speichern fehlgeschlagen
+* Web Services nicht verfügbar
+
+.Fehlermeldung
+[options="header,footer"]
+image::meldung_fehler.png[]
+
+Diese Meldungen bleiben solange sichtbar bis sie durch den Benutzer über das
+kleine x geschlossen werden. In diesen Fällen ist der Administrator zu
+informieren.
+
+<<<
+
+== Allgemeine Funktionen
+
+[[allg-funktionen-uebersicht-aller-gnm]]
+=== In der Übersicht aller Geplanten Netzmaßnahmen
+
+[[vordefinierte-filter]]
+==== Vordefinierte Filter
+In der Tabellen-Ansicht sind drei Filer vordefiniert, die über eine
+Schalterleiste im Tabellenkopf ein- und ausgestellt werden können:
+
+.Vordefinierte Filter
+[options="header,footer"]
+image::vordefinierte_filter.png[]
+
+Bei Betätigung eines Filters erfolgt unmittelbar eine Aktualisierung der angezeigten
+Geplanten Netzmaßnahmen in der Tabelle.
+
+. Meine Vorgänge
+** In der Tabelle werden nur Geplante Netzmaßnahmen angezeigt, bei denen der
+ aktuelle Benutzer zu irgendeiner Zeit involviert war.
+** Eine Kombination mit den Filtern "Geschlossene" und "Stornierte" ist nicht möglich.
+ Diese Filter sind deaktiviert bzw. werden automatisch deaktiviert.
+. Geschlossene
+** In der Tabelle werden zusätzlich alle geschlossenen Geplanten Netzßmaßnahmen
+ angezeigt.
+** Eine Kombination mit dem Filter "Meine Vorgänge" ist nicht möglich. Sollte der
+ Filter "Meine Vorgänge" ausgewählt sein, so muss dieser zunächst deaktiviert werden.
+ Anschließend kann der Filter "Geschlossene" aktiviert werden.
+** Eine Kombination mit dem Filter "Storniert" ist möglich.
+. Stornierte
+** In der Tabelle werden zusätzlich alle stornierten Geplanten Netzßmaßnahmen
+ angezeigt.
+** Eine Kombination mit dem Filter "Meine Vorgänge" ist nicht möglich. Sollte der
+ Filter "Meine Vorgänge" ausgewählt sein, so muss dieser zunächst deaktiviert werden.
+ Anschließend kann der Filter "Geschlossene" aktiviert werden.
+** Eine Kombination mit dem Filter "Geschlossene" ist möglich.
+
+
+==== Filtern und Sortieren von Tabellenspalten
+Mit den Filtern in der Übersichtstabelle werden nicht relevante Inhalte ausgeblendet.
+Es kann in einer Spalte gefiltert werden, wie in der Abbildung dargestellt.
+Es können aber auch Filter in mehrern Spalten gleichzeitig definiert werden,
+um noch gezieltere Suchen durchzuführen.
+
+.Filter in der Übersichtstabelle
+[options="header,footer"]
+image::tabellen-filter.png[]
+
+Um den Filter zu entfernen, müssen lediglich die zuvor erfassten Filterkriterien
+entfernt werden.
+
+==== Filtereinstellungen speichern
+Jeder Benutzer hat die Möglichkeit seinen individuellen Filter zu speichern. Dies erfolgt
+über die Schaltfläche "Filter Speichern" im Tabellenkopf.
+
+.Schaltfläche zum Speichern des aktuellen Filters
+[options="header,footer"]
+image::filter_speichern.png[]
+
+Die Schaltfläche "Filter Speichern" ist solange deaktiviert, bis eine Änderung an
+den Filtereinstellung vornommen wird. Soll der aktuelle Filter dauerhaft gespeichert werden,
+so ist ein Klick auf die Schaltfläche "Filter Speichern" notwendig. Damit ist
+der neue Filter als Standardeinstellung für den aktuellen Benutzer gesetzt.
+
+Folgende Filter-Einstellungen werden gespeichert:
+
+* Vordefinierte Filter
+* Reihenfolge der Tabellenspalten
+* Filter innerhalb der Tabelle
+
+
+=== Bei der Bearbeitung von Geplanten Netzmaßnahmen
+
+==== Dateien hochladen, anzeigen und entfernen
+Zu jeder Geplanten Netzmaßnahme können bis zu 10 Dateien (mit jeweils maximal
+20 MB Größe) hochgeladen und gespeichert werden.
+
+Dazu existiert in jeder Geplanten Netzmaßnahme im Bereich "Details der Netzmaßnahme"
+folgender Bereich zum Verwalten von Dateien:
+
+.Dateien hochladen und ansehen
+[options="header,footer"]
+image::dateien_hochladen.png[]
+
+===== Datei hochladen
+Dateien können nur in den Status "Neu" und "Beantragt" hochgeladen werden.
+
+Die Schaltfläche "Datei auswählen" öffent einen Dialog zur Auswahl einer Datei
+im Dateisystem. Alternativ kann eine Datei per Drag and Drop in den Bereich
+"Datei ziehen und hier ablegen" gezogen werden. Anschließend ist der Dateiname
+im grauen Feld unter "Anhang" sichtbar und die Schaltfläche "Datei hochladen"
+aktiviert. Mit einem Klick auf "Datei hochladen" erfolgt der Upload. Anschließend
+erscheint die erfolgreich hochgeladene Datei in der Liste.
+
+CAUTION: Sollte der Dateiname bereits in der Liste hochgeladener Dateien enthalten
+sein, so wird die vorhandene Datei ohne Rückfrage mit der neu hochzuladenden Datei
+überschrieben.
+
+CAUTION: Das Hinzufügen der Datei erfolgt unabhängig vom Klick auf "Speichern".
+
+Folgende Dateiformate können hochgeladen werden:
+
+.Unterstützte Dateiformate(*)
+[options="footer"]
+|=========================================================
+| pdf | xls | doc
+| png | xlsx | docx
+| jpg | xlsm | docm
+|=========================================================
+
+(*) Sollte eine Unterstützung weiterer Dateiformate notwendig sein, so kann dies
+der Administrator in der Konfiguration anpassen.
+
+===== Datei anzeigen
+Hochgeladene Dateien können in jedem Status angezeigt werden.
+
+Mit einem Klick auf den Dateinamen öffnet sich die Datei in einem externen
+Programm, das für den entsprechenden Dateitypen definiert ist. Ggf. erscheint
+zusätzlich eine Meldung vom Browser.
+
+===== Datei entfernen
+Hochgeladene Dateien können nur im Status "Neu" entfernt werden.
+
+Mit einem Klick auf das rote Kreuz hinter dem entsprechenden Dateinamen wird
+die Datei ohne Rückfrage entfernt.
+
+CAUTION: Das Entfernen der Datei erfolgt unabhängig vom Klick auf "Speichern".
+
+[[email-verteiler-anpassen]]
+==== eMail-Verteiler für Status Genehmigt, Storniert und Zurückgewiesen anpassen
+Die Adressaten der eMail-Benachrichtigung werden auf zwei Ebenen definiert:
+
+. Der Administrator konfiguriert die Adressaten in der System-Konfiguration.
+ Die Benutzer können diese Daten nicht ändern.
+. Die Benutzer mit den Rollen "Maßnahmen-Antragsteller" und "Maßnahmen-Planer" können
+ in der Geplanten Netzmaßnahme unter
+ E-Mail Verteiler für Status Genehmigt, Storniert und Zurückgewiesen
+ selbst eMail-Adressen hinzufügen oder entfernen. Dazu muss lediglich eine
+ gültige eMail-Adresse eingetragen und per Klick auf "E-Mail-Adresse hinzufügen"
+ übernommen werden.
+
+CAUTION: Der angepasste eMail-Verteiler gilt jeweils nur für die eine
+Geplante Netzmaßnahme.
+
+.Individueller eMail-Verteiler für eine Geplante Netzmaßnahme
+[options="header,footer"]
+image::email-verteiler.png[]
+
+
+==== Statuswechsel durchführen
+
+[[statuswechsel-allgemein]]
+===== Allgemeine Statuswechsel
+Statuswechsel erfolgen grundsätzlich über die entsprechende Schaltfläche innerhalb
+einer Geplanten Netzmaßnahme. Je nach Status der Geplanten Netzmaßnahme und
+der Benutzerrolle des angemeldeten Benutzers wird die jeweils gültige
+Schaltfläche für den Statuswechsel angezeigt, wie z.B. beim Wechsel des Status
+zu "Beantragt".
+
+.Schaltfläche für Wechsel zum Status "Beantragen"
+[options="header,footer"]
+image::beantragen.png[]
+
+[[statuswechsel-stornieren]]
+===== Stornieren von Geplanten Netzmaßnahmen
+Die einzige Ausnahme bildet das Stornieren von Geplanten Netzmaßnahmen. Hier erfolgt
+der Statuswechsel in der Tabellen-Ansicht. Dort wird in der Liste bei der entsprechenden
+Geplanten Netzmaßnahme die Stornieren-Schaltfläche geklickt, die im Folgenden
+dargestellt ist.
+
+.Schaltfläche zum Stornieren einer Geplanten Netzmaßnahme
+[options="header,footer"]
+image::stornieren.png[]
+
+Anschließend muss eine Begründung für das Stornieren der Geplanten Netzmaßnahme
+eingetragen und mit einem Klick auf "Bestätigen" finalisert werden.
+
+.Begründung für das Stornieren einer Geplanten Netzmaßnahme erfassen
+[options="header,footer"]
+image::stornieren_kommentar.png[]
+
+===== Weitere Details
+Eine Übersicht welche Statuswechsel welche Benutzerrolle durchführen darf,
+befindet sich im Abschnitt <<uebersicht-benutzerrollen>>.
+
+
+[[gnm-duplizieren]]
+=== Geplante Netzmaßnahme duplizieren
+Jede Geplante Netzmaßnahme (unabhängig vom Status) kann dupliziert
+werden, um die Neuanlage einer Geplanten Netzmaßnahme zu vereinfachen.
+Dazu ist die als Grundlage dienende Geplante Netzmaßnahme,
+entweder über das Auge- oder das Stift-Symbol, zu öffnen. Innerhalb der Geplanten
+Netzmaßnahme befindet sich die Schaltfläche "Netzmaßnahme duplizieren".
+
+.Schaltfläche zum Duplizieren einer Geplanten Netzmaßnahme
+[options="header,footer"]
+image::netzmassnahme_duplizieren.png[]
+
+Mit Klick auf die Schaltfläche "Netzmaßnahme duplizieren" öffnet sich eine
+neue Geplante Netzmaßnahme, die bereits mit den Inhalten der zuvor ausgewählten
+Netzmaßnahme gespeichert wurde.
+
+Grundsätzlich sind die Inhalte identisch. Lediglich bei folgenden Felder existieren
+Unterschiede:
+
+.Feld-Anpassungen beim Duplizieren von Geplanten Netzmaßnahmen
+[options="header,footer"]
+|=========================================================
+| Feld |Anpassung
+| Titel der Maßnahme | Geändert in "Kopie von <Titel der Maßnahme>""
+| Nummer (ID) | Neu generiert
+| Status | Geändert auf "Neu"
+| Angehängte Dateien | Entfernt
+| E-Mail Verteiler für Status Genehmigt, Storniert und Zurückgewiesen| Geändert auf Standard-Verteiler
+| Statuswechsel-Hisotrie | Entfernt
+|=========================================================
+
+
+=== Weitere Funktionen
+
+==== Modul "Geplante Netzmaßnahme" aus Portal starten
+Nach erfolgreicher Anmeldung am openKONSEQUENZ-Portal und mit entsprechender
+Berechtigung für das Modul "Geplante Netzmaßnahme" ist die Kachel für das Modul
+sichtbar. Mit einem Klick auf die Kachel startet das Modul "Geplante Netzmaßnahme"
+in einem neuen Fenster.
+
+.Kachel zum Starten des Moduls "Geplante Netzmaßnahme"
+[options="header,footer"]
+image::oeffnen-modul.png[]
+
+==== Benutzersperre aufheben
+Sobald ein Benutzer eine Geplante Netzmaßnahme zum Bearbeiten (über das Stift-Symbol)
+öffnet, ist diese Geplante Netznaßnahme für andere Benutzer im Zeitraum der Bearbeitung
+gesperrt. Wenn ein anderer Benutzer nun in diesem Zeitraum die gleiche Geplante
+Netzmaßnahme zum Bearbeiten öffnet, erscheint ein Hinweis. Dieser enthält neben
+dem Namen des anderen Bearbeiters auch die Möglichkeit die Sperre gleich aufzuheben.
+
+.Sperrung durch einen anderen Benutzer aufheben
+[options="header,footer"]
+image::sperrung_aufheben.png[]
+
+Beim Klick auf die Schaltfläche "Sperrung aufheben" wird die Bearbeitung für diese
+Geplante Netzmaßnahme freigeschalten und der Benutzer kann seine Änderungen an der
+geplanten Netzmaßnahme durchführen und speichern.
+
+CAUTION: Der andere Bearbeiter erhält keinen Hinweis, dass die Sperrung aufgehoben wurde.
+D.h. es muss organisatorisch sichergestellt werden, dass der andere Bearbeiter
+die Geplante Netzmaßnahme nicht im gleichen Zeitraum weiter bearbeitet.
+
+
+==== Abmelden
+Die Schaltfläche zum Abmelden befindet sich hinter dem Benutzernamen.
+
+.Abmelden vom openKONSEQUENZ-System
+[options="header,footer"]
+image::abmelden.png[]
+
+CAUTION: Beim Klick auf "Abmelden" erfolgt nicht nur die Abmeldung vom Modul Geplante
+Netznahme, sondern die Abmeldung vom Portal. D.h. alle parallel geöffneten
+openKONSEQUENZ-Module (wie z.B. Betriebstagebuch, Bereitschaftsplanung) werden
+automatisch mit abgemeldet.
+
+Um die parallel geöffneten openKONSEQUENZ-Module nicht mit abzumelden, ist
+lediglich das Browserfenster mit dem Modul Geplante Netzmaßnahnme zu schließen.
diff --git a/src/main/java/org/eclipse/openk/PlannedGridMeasuresApplication.java b/src/main/java/org/eclipse/openk/PlannedGridMeasuresApplication.java
index 30c0f8b..6762e11 100644
--- a/src/main/java/org/eclipse/openk/PlannedGridMeasuresApplication.java
+++ b/src/main/java/org/eclipse/openk/PlannedGridMeasuresApplication.java
@@ -1,14 +1,18 @@
-/**
-******************************************************************************
-* Copyright © 2018 PTA GmbH.
-* All rights reserved. This program and the accompanying materials
-* are made available under the terms of the Eclipse Public License v1.0
-* which accompanies this distribution, and is available at
-*
-* http://www.eclipse.org/legal/epl-v10.html
-*
-******************************************************************************
+/*
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
+ *
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
*/
+
package org.eclipse.openk;
import io.dropwizard.Application;
diff --git a/src/main/java/org/eclipse/openk/PlannedGridMeasuresConfiguration.java b/src/main/java/org/eclipse/openk/PlannedGridMeasuresConfiguration.java
index 2532742..f3e3ccb 100644
--- a/src/main/java/org/eclipse/openk/PlannedGridMeasuresConfiguration.java
+++ b/src/main/java/org/eclipse/openk/PlannedGridMeasuresConfiguration.java
@@ -1,20 +1,26 @@
-/**
-******************************************************************************
-* Copyright © 2018 PTA GmbH.
-* All rights reserved. This program and the accompanying materials
-* are made available under the terms of the Eclipse Public License v1.0
-* which accompanies this distribution, and is available at
-*
-* http://www.eclipse.org/legal/epl-v10.html
-*
-******************************************************************************
+/*
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
+ *
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
*/
+
package org.eclipse.openk;
import com.fasterxml.jackson.annotation.JsonProperty;
import io.dropwizard.Configuration;
import org.hibernate.validator.constraints.NotEmpty;
+import java.util.*;
+
public class PlannedGridMeasuresConfiguration extends Configuration {
public static class RabbitmqConfiguration {
@@ -35,7 +41,14 @@
private String exchangeName;
@JsonProperty
- private boolean autoSetup;
+ private String queueNames;
+
+ @JsonProperty
+ private String unroutedMessagesExchangeName;
+
+ @JsonProperty
+ private String unroutedMessagesQueueName;
+
public String getHost() {
return host;
@@ -77,12 +90,43 @@
this.exchangeName = exchangeName;
}
- public boolean isAutoSetup() {
- return autoSetup;
+ public String getQueueNames() { return queueNames; }
+
+ public void setQueueNames(String queueNames) { this.queueNames = queueNames; }
+
+ public String getUnroutedMessagesExchangeName() {
+ return unroutedMessagesExchangeName;
}
- public void setAutoSetup(boolean autoSetup) {
- this.autoSetup = autoSetup;
+ public void setUnroutedMessagesExchangeName(String unroutedMessagesExchangeName) {
+ this.unroutedMessagesExchangeName = unroutedMessagesExchangeName;
+ }
+
+ public String getUnroutedMessagesQueueName() {
+ return unroutedMessagesQueueName;
+ }
+
+ public void setUnroutedMessagesQueueName(String unroutedMessagesQueueName) {
+ this.unroutedMessagesQueueName = unroutedMessagesQueueName;
+ }
+
+ public List<String> getQueueNamesAsList() {
+
+ List<String> singleQueueNameList = new ArrayList<>();
+ Set<String> singleQueueNameUniqueSet = new HashSet<>();
+ List<String> singleQueueNameUniqueList;
+
+ String queueNamesString = getQueueNames();
+ queueNamesString = queueNamesString.replace(";", ",");
+ String[] singleQueueNames = queueNamesString.split(",");
+
+ singleQueueNameList.addAll(Arrays.asList(singleQueueNames));
+ singleQueueNameList.replaceAll(String::trim);
+
+ singleQueueNameUniqueSet.addAll(singleQueueNameList);
+
+ singleQueueNameUniqueList = new ArrayList<>(singleQueueNameUniqueSet);
+ return singleQueueNameUniqueList;
}
}
diff --git a/src/main/java/org/eclipse/openk/api/BackendSettings.java b/src/main/java/org/eclipse/openk/api/BackendSettings.java
index 5a87a32..7bda29a 100644
--- a/src/main/java/org/eclipse/openk/api/BackendSettings.java
+++ b/src/main/java/org/eclipse/openk/api/BackendSettings.java
@@ -1,14 +1,18 @@
/*
- * *****************************************************************************
- * Copyright © 2018 PTA GmbH.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
*
- * http://www.eclipse.org/legal/epl-v10.html
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
*
- * *****************************************************************************
- */
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
+*/
+
package org.eclipse.openk.api;
import com.fasterxml.jackson.annotation.JsonProperty;
diff --git a/src/main/java/org/eclipse/openk/api/Branch.java b/src/main/java/org/eclipse/openk/api/Branch.java
index 802332b..2784962 100644
--- a/src/main/java/org/eclipse/openk/api/Branch.java
+++ b/src/main/java/org/eclipse/openk/api/Branch.java
@@ -1,11 +1,17 @@
/*
- * Copyright © 2018 PTA GmbH.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
*
- * http://www.eclipse.org/legal/epl-v10.html
- */
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
+*/
package org.eclipse.openk.api;
diff --git a/src/main/java/org/eclipse/openk/api/BranchLevel.java b/src/main/java/org/eclipse/openk/api/BranchLevel.java
index 0d31ee6..207eb97 100644
--- a/src/main/java/org/eclipse/openk/api/BranchLevel.java
+++ b/src/main/java/org/eclipse/openk/api/BranchLevel.java
@@ -1,14 +1,18 @@
-/**
- ******************************************************************************
- * Copyright © 2018 PTA GmbH.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
+/*
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
*
- * http://www.eclipse.org/legal/epl-v10.html
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
*
- ******************************************************************************
- */
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
+*/
+
package org.eclipse.openk.api;
import com.fasterxml.jackson.annotation.JsonProperty;
diff --git a/src/main/java/org/eclipse/openk/api/Calender.java b/src/main/java/org/eclipse/openk/api/Calender.java
new file mode 100644
index 0000000..9de4d45
--- /dev/null
+++ b/src/main/java/org/eclipse/openk/api/Calender.java
@@ -0,0 +1,72 @@
+/*
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
+ *
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
+*/
+
+package org.eclipse.openk.api;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+import java.util.Date;
+
+public class Calender {
+
+ @JsonProperty
+ private Integer gridMeasureId;
+
+ @JsonProperty
+ private String gridMeasureTitle;
+
+ @JsonProperty
+ private Integer gridMeasureStatusId;
+
+ @JsonProperty
+ private Integer singleGridMeasureId;
+
+ @JsonProperty
+ private String singleGridMeasureTitle;
+
+ @JsonProperty
+ private Date plannedStarttimSinglemeasure;
+
+ @JsonProperty
+ private Date plannedEndtimeSinglemeasure;
+
+
+ public Integer getGridMeasureId() { return gridMeasureId; }
+
+ public void setGridMeasureId(Integer gridMeasureId) { this.gridMeasureId = gridMeasureId; }
+
+ public Integer getSingleGridMeasureId() { return singleGridMeasureId; }
+
+ public void setSingleGridMeasureId(Integer singleGridMeasureId) { this.singleGridMeasureId = singleGridMeasureId; }
+
+ public String getGridMeasureTitle() { return gridMeasureTitle; }
+
+ public void setGridMeasureTitle(String gridMeasureTitle) { this.gridMeasureTitle = gridMeasureTitle; }
+
+ public Integer getGridMeasureStatusId() { return gridMeasureStatusId; }
+
+ public void setGridMeasureStatusId(Integer gridMeasureStatusId) { this.gridMeasureStatusId = gridMeasureStatusId; }
+
+ public String getSingleGridMeasureTitle() { return singleGridMeasureTitle; }
+
+ public void setSingleGridMeasureTitle(String singleGridMeasureTitle) { this.singleGridMeasureTitle = singleGridMeasureTitle; }
+
+ public Date getPlannedStarttimSinglemeasure() { return plannedStarttimSinglemeasure; }
+
+ public void setPlannedStarttimSinglemeasure(Date plannedStarttimSinglemeasure) { this.plannedStarttimSinglemeasure = plannedStarttimSinglemeasure; }
+
+ public Date getPlannedEndtimeSinglemeasure() { return plannedEndtimeSinglemeasure; }
+
+ public void setPlannedEndtimeSinglemeasure(Date plannedEndtimeSinglemeasure) { this.plannedEndtimeSinglemeasure = plannedEndtimeSinglemeasure; }
+}
diff --git a/src/main/java/org/eclipse/openk/api/CostCenter.java b/src/main/java/org/eclipse/openk/api/CostCenter.java
index 39130d8..cc3958a 100644
--- a/src/main/java/org/eclipse/openk/api/CostCenter.java
+++ b/src/main/java/org/eclipse/openk/api/CostCenter.java
@@ -1,14 +1,18 @@
-/**
- ******************************************************************************
- * Copyright © 2018 PTA GmbH.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
+/*
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
*
- * http://www.eclipse.org/legal/epl-v10.html
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
*
- ******************************************************************************
- */
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
+*/
+
package org.eclipse.openk.api;
import com.fasterxml.jackson.annotation.JsonProperty;
@@ -43,4 +47,4 @@
public void setDescription(String description) { this.description = description; }
-}
\ No newline at end of file
+}
diff --git a/src/main/java/org/eclipse/openk/api/Document.java b/src/main/java/org/eclipse/openk/api/Document.java
index 98d0e77..c4f14b1 100644
--- a/src/main/java/org/eclipse/openk/api/Document.java
+++ b/src/main/java/org/eclipse/openk/api/Document.java
@@ -1,14 +1,18 @@
-/**
- ******************************************************************************
- * Copyright © 2018 PTA GmbH.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
+/*
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
*
- * http://www.eclipse.org/legal/epl-v10.html
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
*
- ******************************************************************************
- */
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
+*/
+
package org.eclipse.openk.api;
import com.fasterxml.jackson.annotation.JsonProperty;
diff --git a/src/main/java/org/eclipse/openk/api/FilterObject.java b/src/main/java/org/eclipse/openk/api/FilterObject.java
index d864173..7332f74 100644
--- a/src/main/java/org/eclipse/openk/api/FilterObject.java
+++ b/src/main/java/org/eclipse/openk/api/FilterObject.java
@@ -1,14 +1,18 @@
/*
- * ***************************************************************************
- * Copyright © 2018 PTA GmbH.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
*
- * http://www.eclipse.org/legal/epl-v10.html
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
*
- * ***************************************************************************
- */
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
+*/
+
package org.eclipse.openk.api;
public class FilterObject {
diff --git a/src/main/java/org/eclipse/openk/api/GmStatus.java b/src/main/java/org/eclipse/openk/api/GmStatus.java
index 7565dff..80a9808 100644
--- a/src/main/java/org/eclipse/openk/api/GmStatus.java
+++ b/src/main/java/org/eclipse/openk/api/GmStatus.java
@@ -1,14 +1,18 @@
-/**
- ******************************************************************************
- * Copyright © 2018 PTA GmbH.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
+/*
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
*
- * http://www.eclipse.org/legal/epl-v10.html
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
*
- ******************************************************************************
- */
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
+*/
+
package org.eclipse.openk.api;
import com.fasterxml.jackson.annotation.JsonProperty;
@@ -27,6 +31,10 @@
@MapDbModelField
private String name;
+ @JsonProperty
+ @MapDbModelField
+ private String colorCode;
+
public Integer getId() { return id; }
@@ -35,4 +43,8 @@
public String getName() { return name; }
public void setName(String name) { this.name = name; }
+
+ public String getColorCode() { return colorCode; }
+
+ public void setColorCode(String colorCode) { this.colorCode = colorCode; }
}
diff --git a/src/main/java/org/eclipse/openk/api/GridMeasure.java b/src/main/java/org/eclipse/openk/api/GridMeasure.java
index 98c5801..65b3832 100644
--- a/src/main/java/org/eclipse/openk/api/GridMeasure.java
+++ b/src/main/java/org/eclipse/openk/api/GridMeasure.java
@@ -1,14 +1,18 @@
-/**
- ******************************************************************************
- * Copyright © 2018 PTA GmbH.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
+/*
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
*
- * http://www.eclipse.org/legal/epl-v10.html
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
*
- ******************************************************************************
- */
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
+*/
+
package org.eclipse.openk.api;
import com.fasterxml.jackson.annotation.JsonProperty;
@@ -104,34 +108,10 @@
@JsonProperty
@MapDbModelField
- private Date plannedStarttimeFirstSequence;
-
- @JsonProperty
- @MapDbModelField
private Date plannedStarttimeFirstSinglemeasure;
@JsonProperty
@MapDbModelField
- private Date plannedEndtimeLastSinglemeasure;
-
- @JsonProperty
- @MapDbModelField
- private Date plannedEndtimeGridmeasure;
-
- @JsonProperty
- @MapDbModelField
- private Date starttimeFirstSequence;
-
- @JsonProperty
- @MapDbModelField
- private Date starttimeFirstSinglemeasure;
-
- @JsonProperty
- @MapDbModelField
- private Date endtimeLastSinglemeasure;
-
- @JsonProperty
- @MapDbModelField
private Date endtimeGridmeasure;
@JsonProperty
@@ -220,34 +200,10 @@
public void setAppointmentNumberOf(Integer appointmentNumberOf) { this.appointmentNumberOf = appointmentNumberOf; }
- public Date getPlannedStarttimeFirstSequence() { return plannedStarttimeFirstSequence; }
-
- public void setPlannedStarttimeFirstSequence(Date plannedStarttimeFirstSequence) { this.plannedStarttimeFirstSequence = plannedStarttimeFirstSequence; }
-
public Date getPlannedStarttimeFirstSinglemeasure() { return plannedStarttimeFirstSinglemeasure; }
public void setPlannedStarttimeFirstSinglemeasure(Date plannedStarttimeFirstSinglemeasure) { this.plannedStarttimeFirstSinglemeasure = plannedStarttimeFirstSinglemeasure; }
- public Date getPlannedEndtimeLastSinglemeasure() { return plannedEndtimeLastSinglemeasure; }
-
- public void setPlannedEndtimeLastSinglemeasure(Date plannedEndtimeFirstSinglemeasure) { this.plannedEndtimeLastSinglemeasure = plannedEndtimeFirstSinglemeasure; }
-
- public Date getPlannedEndtimeGridmeasure() { return plannedEndtimeGridmeasure; }
-
- public void setPlannedEndtimeGridmeasure(Date plannedEndtimeGridmeasure) { this.plannedEndtimeGridmeasure = plannedEndtimeGridmeasure; }
-
- public Date getStarttimeFirstSequence() { return starttimeFirstSequence; }
-
- public void setStarttimeFirstSequence(Date starttimeFirstSequence) { this.starttimeFirstSequence = starttimeFirstSequence; }
-
- public Date getStarttimeFirstSinglemeasure() { return starttimeFirstSinglemeasure; }
-
- public void setStarttimeFirstSinglemeasure(Date starttimeFirstSinglemeasure) { this.starttimeFirstSinglemeasure = starttimeFirstSinglemeasure; }
-
- public Date getEndtimeLastSinglemeasure() { return endtimeLastSinglemeasure; }
-
- public void setEndtimeLastSinglemeasure(Date endtimeFirstSinglemeasure) { this.endtimeLastSinglemeasure = endtimeFirstSinglemeasure; }
-
public Date getEndtimeGridmeasure() { return endtimeGridmeasure; }
public void setEndtimeGridmeasure(Date endtimeGridmeasure) { this.endtimeGridmeasure = endtimeGridmeasure; }
diff --git a/src/main/java/org/eclipse/openk/api/HGridMeasure.java b/src/main/java/org/eclipse/openk/api/HGridMeasure.java
index 0636fb5..d38b5bf 100644
--- a/src/main/java/org/eclipse/openk/api/HGridMeasure.java
+++ b/src/main/java/org/eclipse/openk/api/HGridMeasure.java
@@ -1,14 +1,18 @@
/*
- * ***************************************************************************
- * Copyright © 2018 PTA GmbH.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
*
- * http://www.eclipse.org/legal/epl-v10.html
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
*
- * ***************************************************************************
- */
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
+*/
+
package org.eclipse.openk.api;
import com.fasterxml.jackson.annotation.JsonProperty;
@@ -116,31 +120,8 @@
@JsonProperty
@MapDbModelField
- private Date plannedStarttimeFirstSequence;
-
- @JsonProperty
- @MapDbModelField
private Date plannedStarttimeFirstSinglemeasure;
- @JsonProperty
- @MapDbModelField
- private Date plannedEndtimeLastSinglemeasure;
-
- @JsonProperty
- @MapDbModelField
- private Date plannedEndtimeGridmeasure;
-
- @JsonProperty
- @MapDbModelField
- private Date starttimeFirstSequence;
-
- @JsonProperty
- @MapDbModelField
- private Date starttimeFirstSinglemeasure;
-
- @JsonProperty
- @MapDbModelField
- private Date endtimeLastSinglemeasure;
@JsonProperty
@MapDbModelField
@@ -260,34 +241,10 @@
public void setAppointmentNumberOf(Integer appointmentNumberOf) { this.appointmentNumberOf = appointmentNumberOf; }
- public Date getPlannedStarttimeFirstSequence() { return plannedStarttimeFirstSequence; }
-
- public void setPlannedStarttimeFirstSequence(Date plannedStarttimeFirstSequence) { this.plannedStarttimeFirstSequence = plannedStarttimeFirstSequence; }
-
public Date getPlannedStarttimeFirstSinglemeasure() { return plannedStarttimeFirstSinglemeasure; }
public void setPlannedStarttimeFirstSinglemeasure(Date plannedStarttimeFirstSinglemeasure) { this.plannedStarttimeFirstSinglemeasure = plannedStarttimeFirstSinglemeasure; }
- public Date getPlannedEndtimeLastSinglemeasure() { return plannedEndtimeLastSinglemeasure; }
-
- public void setPlannedEndtimeLastSinglemeasure(Date plannedEndtimeFirstSinglemeasure) { this.plannedEndtimeLastSinglemeasure = plannedEndtimeFirstSinglemeasure; }
-
- public Date getPlannedEndtimeGridmeasure() { return plannedEndtimeGridmeasure; }
-
- public void setPlannedEndtimeGridmeasure(Date plannedEndtimeGridmeasure) { this.plannedEndtimeGridmeasure = plannedEndtimeGridmeasure; }
-
- public Date getStarttimeFirstSequence() { return starttimeFirstSequence; }
-
- public void setStarttimeFirstSequence(Date starttimeFirstSequence) { this.starttimeFirstSequence = starttimeFirstSequence; }
-
- public Date getStarttimeFirstSinglemeasure() { return starttimeFirstSinglemeasure; }
-
- public void setStarttimeFirstSinglemeasure(Date starttimeFirstSinglemeasure) { this.starttimeFirstSinglemeasure = starttimeFirstSinglemeasure; }
-
- public Date getEndtimeLastSinglemeasure() { return endtimeLastSinglemeasure; }
-
- public void setEndtimeLastSinglemeasure(Date endtimeFirstSinglemeasure) { this.endtimeLastSinglemeasure = endtimeFirstSinglemeasure; }
-
public Date getEndtimeGridmeasure() { return endtimeGridmeasure; }
public void setEndtimeGridmeasure(Date endtimeGridmeasure) { this.endtimeGridmeasure = endtimeGridmeasure; }
diff --git a/src/main/java/org/eclipse/openk/api/Lock.java b/src/main/java/org/eclipse/openk/api/Lock.java
index 7aac61e..b0144b1 100644
--- a/src/main/java/org/eclipse/openk/api/Lock.java
+++ b/src/main/java/org/eclipse/openk/api/Lock.java
@@ -1,14 +1,18 @@
-/**
- ******************************************************************************
- * Copyright © 2018 PTA GmbH.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
+/*
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
*
- * http://www.eclipse.org/legal/epl-v10.html
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
*
- ******************************************************************************
- */
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
+*/
+
package org.eclipse.openk.api;
import com.fasterxml.jackson.annotation.JsonProperty;
diff --git a/src/main/java/org/eclipse/openk/api/PowerSystemResource.java b/src/main/java/org/eclipse/openk/api/PowerSystemResource.java
index 2ced803..1b1fd3b 100644
--- a/src/main/java/org/eclipse/openk/api/PowerSystemResource.java
+++ b/src/main/java/org/eclipse/openk/api/PowerSystemResource.java
@@ -1,14 +1,18 @@
/*
- * ***************************************************************************
- * Copyright © 2018 PTA GmbH.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
*
- * http://www.eclipse.org/legal/epl-v10.html
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
*
- * ***************************************************************************
- */
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
+*/
+
package org.eclipse.openk.api;
diff --git a/src/main/java/org/eclipse/openk/api/RoleAccessDefinitionApi.java b/src/main/java/org/eclipse/openk/api/RoleAccessDefinitionApi.java
index 8180d19..c77fa6f 100644
--- a/src/main/java/org/eclipse/openk/api/RoleAccessDefinitionApi.java
+++ b/src/main/java/org/eclipse/openk/api/RoleAccessDefinitionApi.java
@@ -1,14 +1,18 @@
/*
- * ***************************************************************************
- * Copyright © 2018 PTA GmbH.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
*
- * http://www.eclipse.org/legal/epl-v10.html
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
*
- * ***************************************************************************
- */
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
+*/
+
package org.eclipse.openk.api;
public class RoleAccessDefinitionApi {
diff --git a/src/main/java/org/eclipse/openk/api/SingleGridmeasure.java b/src/main/java/org/eclipse/openk/api/SingleGridmeasure.java
index 654546e..155c442 100644
--- a/src/main/java/org/eclipse/openk/api/SingleGridmeasure.java
+++ b/src/main/java/org/eclipse/openk/api/SingleGridmeasure.java
@@ -1,14 +1,18 @@
/*
- * ***************************************************************************
- * Copyright © 2018 PTA GmbH.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
*
- * http://www.eclipse.org/legal/epl-v10.html
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
*
- * ***************************************************************************
- */
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
+*/
+
package org.eclipse.openk.api;
import com.fasterxml.jackson.annotation.JsonProperty;
diff --git a/src/main/java/org/eclipse/openk/api/Steps.java b/src/main/java/org/eclipse/openk/api/Steps.java
index 26f71dc..f249c34 100644
--- a/src/main/java/org/eclipse/openk/api/Steps.java
+++ b/src/main/java/org/eclipse/openk/api/Steps.java
@@ -1,14 +1,18 @@
/*
- * ***************************************************************************
- * Copyright © 2018 PTA GmbH.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
*
- * http://www.eclipse.org/legal/epl-v10.html
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
*
- * ***************************************************************************
- */
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
+*/
+
package org.eclipse.openk.api;
import com.fasterxml.jackson.annotation.JsonProperty;
@@ -16,8 +20,6 @@
import org.eclipse.openk.common.mapper.generic.annotations.MapDbModelField;
import org.eclipse.openk.db.model.TblSteps;
-import java.util.Date;
-
@MapDbModelClass(classType = TblSteps.class)
public class Steps {
diff --git a/src/main/java/org/eclipse/openk/api/Territory.java b/src/main/java/org/eclipse/openk/api/Territory.java
index 6c96785..790df1b 100644
--- a/src/main/java/org/eclipse/openk/api/Territory.java
+++ b/src/main/java/org/eclipse/openk/api/Territory.java
@@ -1,14 +1,18 @@
-/**
- ******************************************************************************
- * Copyright © 2018 PTA GmbH.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
+/*
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
*
- * http://www.eclipse.org/legal/epl-v10.html
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
*
- ******************************************************************************
- */
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
+*/
+
package org.eclipse.openk.api;
import com.fasterxml.jackson.annotation.JsonProperty;
diff --git a/src/main/java/org/eclipse/openk/api/UserDepartment.java b/src/main/java/org/eclipse/openk/api/UserDepartment.java
deleted file mode 100644
index 1e9d21b..0000000
--- a/src/main/java/org/eclipse/openk/api/UserDepartment.java
+++ /dev/null
@@ -1,38 +0,0 @@
-/**
- ******************************************************************************
- * Copyright © 2018 PTA GmbH.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- *
- * http://www.eclipse.org/legal/epl-v10.html
- *
- ******************************************************************************
- */
-package org.eclipse.openk.api;
-
-import com.fasterxml.jackson.annotation.JsonProperty;
-import org.eclipse.openk.common.mapper.generic.annotations.MapDbModelClass;
-import org.eclipse.openk.common.mapper.generic.annotations.MapDbModelField;
-import org.eclipse.openk.db.model.RefUserDepartment;
-
-@MapDbModelClass(classType = RefUserDepartment.class)
-public class UserDepartment {
-
- @JsonProperty
- @MapDbModelField
- private Integer id;
-
- @JsonProperty
- @MapDbModelField
- private String name;
-
- public Integer getId() { return id; }
-
- public void setId(Integer id) { this.id = id; }
-
- public String getName() { return name; }
-
- public void setName(String name) { this.name = name; }
-
-}
\ No newline at end of file
diff --git a/src/main/java/org/eclipse/openk/api/UserSettings.java b/src/main/java/org/eclipse/openk/api/UserSettings.java
index b9add87..bdb2918 100644
--- a/src/main/java/org/eclipse/openk/api/UserSettings.java
+++ b/src/main/java/org/eclipse/openk/api/UserSettings.java
@@ -1,14 +1,18 @@
-/**
- ******************************************************************************
- * Copyright © 2018 PTA GmbH.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
+/*
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
*
- * http://www.eclipse.org/legal/epl-v10.html
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
*
- ******************************************************************************
- */
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
+*/
+
package org.eclipse.openk.api;
import com.fasterxml.jackson.annotation.JsonProperty;
import org.eclipse.openk.common.mapper.generic.annotations.MapDbModelClass;
diff --git a/src/main/java/org/eclipse/openk/api/VersionInfo.java b/src/main/java/org/eclipse/openk/api/VersionInfo.java
index 955eeec..a179116 100644
--- a/src/main/java/org/eclipse/openk/api/VersionInfo.java
+++ b/src/main/java/org/eclipse/openk/api/VersionInfo.java
@@ -1,14 +1,18 @@
-/**
-******************************************************************************
-* Copyright © 2018 PTA GmbH.
-* All rights reserved. This program and the accompanying materials
-* are made available under the terms of the Eclipse Public License v1.0
-* which accompanies this distribution, and is available at
-*
-* http://www.eclipse.org/legal/epl-v10.html
-*
-******************************************************************************
+/*
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
+ *
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
*/
+
package org.eclipse.openk.api;
import com.fasterxml.jackson.annotation.JsonProperty;
diff --git a/src/main/java/org/eclipse/openk/api/mail/Email.java b/src/main/java/org/eclipse/openk/api/mail/Email.java
index 34b7aa9..7f92331 100644
--- a/src/main/java/org/eclipse/openk/api/mail/Email.java
+++ b/src/main/java/org/eclipse/openk/api/mail/Email.java
@@ -1,14 +1,18 @@
/*
- * *****************************************************************************
- * Copyright © 2018 PTA GmbH.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
*
- * http://www.eclipse.org/legal/epl-v10.html
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
*
- * *****************************************************************************
- */
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
+*/
+
package org.eclipse.openk.api.mail;
diff --git a/src/main/java/org/eclipse/openk/api/mail/EmailTemplatePaths.java b/src/main/java/org/eclipse/openk/api/mail/EmailTemplatePaths.java
index 2bdebd2..aa48d04 100644
--- a/src/main/java/org/eclipse/openk/api/mail/EmailTemplatePaths.java
+++ b/src/main/java/org/eclipse/openk/api/mail/EmailTemplatePaths.java
@@ -1,14 +1,18 @@
/*
- * ***************************************************************************
- * Copyright © 2018 PTA GmbH.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
*
- * http://www.eclipse.org/legal/epl-v10.html
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
*
- * ***************************************************************************
- */
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
+*/
+
package org.eclipse.openk.api.mail;
diff --git a/src/main/java/org/eclipse/openk/auth2/model/JwtAccount.java b/src/main/java/org/eclipse/openk/auth2/model/JwtAccount.java
index c726922..23b00d9 100644
--- a/src/main/java/org/eclipse/openk/auth2/model/JwtAccount.java
+++ b/src/main/java/org/eclipse/openk/auth2/model/JwtAccount.java
@@ -1,14 +1,18 @@
/*
-******************************************************************************
-* Copyright © 2018 PTA GmbH.
-* All rights reserved. This program and the accompanying materials
-* are made available under the terms of the Eclipse Public License v1.0
-* which accompanies this distribution, and is available at
-*
-* http://www.eclipse.org/legal/epl-v10.html
-*
-******************************************************************************
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
+ *
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
*/
+
package org.eclipse.openk.auth2.model;
import java.util.List;
diff --git a/src/main/java/org/eclipse/openk/auth2/model/JwtHeader.java b/src/main/java/org/eclipse/openk/auth2/model/JwtHeader.java
index 92ffc9c..9a74001 100644
--- a/src/main/java/org/eclipse/openk/auth2/model/JwtHeader.java
+++ b/src/main/java/org/eclipse/openk/auth2/model/JwtHeader.java
@@ -1,14 +1,18 @@
/*
-******************************************************************************
-* Copyright © 2018 PTA GmbH.
-* All rights reserved. This program and the accompanying materials
-* are made available under the terms of the Eclipse Public License v1.0
-* which accompanies this distribution, and is available at
-*
-* http://www.eclipse.org/legal/epl-v10.html
-*
-******************************************************************************
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
+ *
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
*/
+
package org.eclipse.openk.auth2.model;
public class JwtHeader {
diff --git a/src/main/java/org/eclipse/openk/auth2/model/JwtPayload.java b/src/main/java/org/eclipse/openk/auth2/model/JwtPayload.java
index 8ac07b4..f275da1 100644
--- a/src/main/java/org/eclipse/openk/auth2/model/JwtPayload.java
+++ b/src/main/java/org/eclipse/openk/auth2/model/JwtPayload.java
@@ -1,14 +1,18 @@
/*
-******************************************************************************
-* Copyright © 2018 PTA GmbH.
-* All rights reserved. This program and the accompanying materials
-* are made available under the terms of the Eclipse Public License v1.0
-* which accompanies this distribution, and is available at
-*
-* http://www.eclipse.org/legal/epl-v10.html
-*
-******************************************************************************
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
+ *
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
*/
+
package org.eclipse.openk.auth2.model;
import com.fasterxml.jackson.annotation.JsonProperty;
diff --git a/src/main/java/org/eclipse/openk/auth2/model/JwtRealmAccess.java b/src/main/java/org/eclipse/openk/auth2/model/JwtRealmAccess.java
index 11fd349..e50ae56 100644
--- a/src/main/java/org/eclipse/openk/auth2/model/JwtRealmAccess.java
+++ b/src/main/java/org/eclipse/openk/auth2/model/JwtRealmAccess.java
@@ -1,14 +1,18 @@
/*
-******************************************************************************
-* Copyright © 2018 PTA GmbH.
-* All rights reserved. This program and the accompanying materials
-* are made available under the terms of the Eclipse Public License v1.0
-* which accompanies this distribution, and is available at
-*
-* http://www.eclipse.org/legal/epl-v10.html
-*
-******************************************************************************
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
+ *
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
*/
+
package org.eclipse.openk.auth2.model;
import java.util.List;
diff --git a/src/main/java/org/eclipse/openk/auth2/model/JwtResourceAccess.java b/src/main/java/org/eclipse/openk/auth2/model/JwtResourceAccess.java
index 9aa4710..43d9fb3 100644
--- a/src/main/java/org/eclipse/openk/auth2/model/JwtResourceAccess.java
+++ b/src/main/java/org/eclipse/openk/auth2/model/JwtResourceAccess.java
@@ -1,14 +1,18 @@
/*
-******************************************************************************
-* Copyright © 2018 PTA GmbH.
-* All rights reserved. This program and the accompanying materials
-* are made available under the terms of the Eclipse Public License v1.0
-* which accompanies this distribution, and is available at
-*
-* http://www.eclipse.org/legal/epl-v10.html
-*
-******************************************************************************
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
+ *
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
*/
+
package org.eclipse.openk.auth2.model;
public class JwtResourceAccess {
diff --git a/src/main/java/org/eclipse/openk/auth2/model/JwtToken.java b/src/main/java/org/eclipse/openk/auth2/model/JwtToken.java
index b67e47a..7d1c318 100644
--- a/src/main/java/org/eclipse/openk/auth2/model/JwtToken.java
+++ b/src/main/java/org/eclipse/openk/auth2/model/JwtToken.java
@@ -1,14 +1,18 @@
/*
-******************************************************************************
-* Copyright © 2018 PTA GmbH.
-* All rights reserved. This program and the accompanying materials
-* are made available under the terms of the Eclipse Public License v1.0
-* which accompanies this distribution, and is available at
-*
-* http://www.eclipse.org/legal/epl-v10.html
-*
-******************************************************************************
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
+ *
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
*/
+
package org.eclipse.openk.auth2.model;
import com.fasterxml.jackson.annotation.JsonProperty;
@@ -40,4 +44,4 @@
public void setRefreshExpiresIn(Integer refresh_expires_in) { this.refresh_expires_in = refresh_expires_in; } //NOSONAR
public Integer getNotBeforePolicy() { return not_before_policy; }
public void setNotBeforePolicy(Integer not_before_policy) { this.not_before_policy = not_before_policy; } //NOSONAR
-}
\ No newline at end of file
+}
diff --git a/src/main/java/org/eclipse/openk/auth2/model/KeyCloakUser.java b/src/main/java/org/eclipse/openk/auth2/model/KeyCloakUser.java
index 6d842d7..d0486c3 100644
--- a/src/main/java/org/eclipse/openk/auth2/model/KeyCloakUser.java
+++ b/src/main/java/org/eclipse/openk/auth2/model/KeyCloakUser.java
@@ -1,14 +1,18 @@
/*
-******************************************************************************
-* Copyright © 2018 PTA GmbH.
-* All rights reserved. This program and the accompanying materials
-* are made available under the terms of the Eclipse Public License v1.0
-* which accompanies this distribution, and is available at
-*
-* http://www.eclipse.org/legal/epl-v10.html
-*
-******************************************************************************
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
+ *
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
*/
+
package org.eclipse.openk.auth2.model;
import java.util.List;
diff --git a/src/main/java/org/eclipse/openk/auth2/model/KeyCloakUserAccess.java b/src/main/java/org/eclipse/openk/auth2/model/KeyCloakUserAccess.java
index 1231352..4140c48 100644
--- a/src/main/java/org/eclipse/openk/auth2/model/KeyCloakUserAccess.java
+++ b/src/main/java/org/eclipse/openk/auth2/model/KeyCloakUserAccess.java
@@ -1,14 +1,18 @@
/*
-******************************************************************************
-* Copyright © 2018 PTA GmbH.
-* All rights reserved. This program and the accompanying materials
-* are made available under the terms of the Eclipse Public License v1.0
-* which accompanies this distribution, and is available at
-*
-* http://www.eclipse.org/legal/epl-v10.html
-*
-******************************************************************************
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
+ *
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
*/
+
package org.eclipse.openk.auth2.model;
public class KeyCloakUserAccess {
diff --git a/src/main/java/org/eclipse/openk/auth2/util/JwtHelper.java b/src/main/java/org/eclipse/openk/auth2/util/JwtHelper.java
index aa99a8d..2a9d872 100644
--- a/src/main/java/org/eclipse/openk/auth2/util/JwtHelper.java
+++ b/src/main/java/org/eclipse/openk/auth2/util/JwtHelper.java
@@ -1,14 +1,18 @@
/*
-******************************************************************************
-* Copyright © 2018 PTA GmbH.
-* All rights reserved. This program and the accompanying materials
-* are made available under the terms of the Eclipse Public License v1.0
-* which accompanies this distribution, and is available at
-*
-* http://www.eclipse.org/legal/epl-v10.html
-*
-******************************************************************************
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
+ *
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
*/
+
package org.eclipse.openk.auth2.util;
import com.google.gson.JsonSyntaxException;
diff --git a/src/main/java/org/eclipse/openk/common/Globals.java b/src/main/java/org/eclipse/openk/common/Globals.java
index 84aeb40..ec00305 100644
--- a/src/main/java/org/eclipse/openk/common/Globals.java
+++ b/src/main/java/org/eclipse/openk/common/Globals.java
@@ -1,18 +1,19 @@
/*
-******************************************************************************
-* Copyright © 2018 PTA GmbH.
-* All rights reserved. This program and the accompanying materials
-* are made available under the terms of the Eclipse Public License v1.0
-* which accompanies this distribution, and is available at
-*
-* http://www.eclipse.org/legal/epl-v10.html
-*
-******************************************************************************
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
+ *
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
*/
-package org.eclipse.openk.common;
-import java.util.Arrays;
-import java.util.List;
+package org.eclipse.openk.common;
public final class Globals {
@@ -27,10 +28,5 @@
public static final String DATE_ZONE_ID_EUROPE = "Europe/Berlin";
- //Sonar complaining about RABBIT_MQ_QUEUE_NAME_LIST beeing muteable althoug Arrays.asList returns a immutable List = False positve
- public static final List<String> RABBIT_MQ_QUEUE_NAME_LIST = Arrays.asList("pgm-applied-queue","pgm-forapproval-queue", "pgm-canceled-queue", //NOSONAR
- "pgm-approved-queue", "pgm-rejected-queue", "pgm-requested-queue", "pgm-released-queue",
- "pgm-finished-queue", "pgm-closed-queue");
-
private Globals() {}
}
diff --git a/src/main/java/org/eclipse/openk/common/GsonUTCDateAdapter.java b/src/main/java/org/eclipse/openk/common/GsonUTCDateAdapter.java
index f5da945..9d378d8 100644
--- a/src/main/java/org/eclipse/openk/common/GsonUTCDateAdapter.java
+++ b/src/main/java/org/eclipse/openk/common/GsonUTCDateAdapter.java
@@ -1,14 +1,18 @@
/*
-******************************************************************************
-* Copyright © 2018 PTA GmbH.
-* All rights reserved. This program and the accompanying materials
-* are made available under the terms of the Eclipse Public License v1.0
-* which accompanies this distribution, and is available at
-*
-* http://www.eclipse.org/legal/epl-v10.html
-*
-******************************************************************************
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
+ *
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
*/
+
package org.eclipse.openk.common;
import com.google.gson.*;
@@ -55,4 +59,4 @@
throw new JsonParseException(e);
}
}
-}
\ No newline at end of file
+}
diff --git a/src/main/java/org/eclipse/openk/common/JsonGeneratorBase.java b/src/main/java/org/eclipse/openk/common/JsonGeneratorBase.java
index 042c5fe..851577d 100644
--- a/src/main/java/org/eclipse/openk/common/JsonGeneratorBase.java
+++ b/src/main/java/org/eclipse/openk/common/JsonGeneratorBase.java
@@ -1,14 +1,18 @@
/*
-******************************************************************************
-* Copyright © 2018 PTA GmbH.
-* All rights reserved. This program and the accompanying materials
-* are made available under the terms of the Eclipse Public License v1.0
-* which accompanies this distribution, and is available at
-*
-* http://www.eclipse.org/legal/epl-v10.html
-*
-******************************************************************************
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
+ *
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
*/
+
package org.eclipse.openk.common;
import com.google.gson.Gson;
diff --git a/src/main/java/org/eclipse/openk/common/mapper/GridMeasureMapper.java b/src/main/java/org/eclipse/openk/common/mapper/GridMeasureMapper.java
index 9571354..69aa8cb 100644
--- a/src/main/java/org/eclipse/openk/common/mapper/GridMeasureMapper.java
+++ b/src/main/java/org/eclipse/openk/common/mapper/GridMeasureMapper.java
@@ -1,14 +1,18 @@
/*
- * ***************************************************************************
- * Copyright © 2018 PTA GmbH.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
*
- * http://www.eclipse.org/legal/epl-v10.html
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
*
- * ***************************************************************************
- */
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
+*/
+
package org.eclipse.openk.common.mapper;
import org.eclipse.openk.api.GridMeasure;
diff --git a/src/main/java/org/eclipse/openk/common/mapper/generic/GenericApiToDbMapper.java b/src/main/java/org/eclipse/openk/common/mapper/generic/GenericApiToDbMapper.java
index 5e533c7..a0b1c20 100644
--- a/src/main/java/org/eclipse/openk/common/mapper/generic/GenericApiToDbMapper.java
+++ b/src/main/java/org/eclipse/openk/common/mapper/generic/GenericApiToDbMapper.java
@@ -1,14 +1,18 @@
/*
- ******************************************************************************
- * Copyright © 2018 PTA GmbH.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
*
- * http://www.eclipse.org/legal/epl-v10.html
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
*
- ******************************************************************************
- */
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
+*/
+
package org.eclipse.openk.common.mapper.generic;
import com.google.common.collect.Lists;
diff --git a/src/main/java/org/eclipse/openk/common/mapper/generic/annotations/MapDbModelClass.java b/src/main/java/org/eclipse/openk/common/mapper/generic/annotations/MapDbModelClass.java
index 6447b86..29942bb 100644
--- a/src/main/java/org/eclipse/openk/common/mapper/generic/annotations/MapDbModelClass.java
+++ b/src/main/java/org/eclipse/openk/common/mapper/generic/annotations/MapDbModelClass.java
@@ -1,14 +1,18 @@
/*
- ******************************************************************************
- * Copyright © 2018 PTA GmbH.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
*
- * http://www.eclipse.org/legal/epl-v10.html
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
*
- ******************************************************************************
- */
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
+*/
+
package org.eclipse.openk.common.mapper.generic.annotations;
import java.lang.annotation.ElementType;
diff --git a/src/main/java/org/eclipse/openk/common/mapper/generic/annotations/MapDbModelField.java b/src/main/java/org/eclipse/openk/common/mapper/generic/annotations/MapDbModelField.java
index 329a7ba..81ec878 100644
--- a/src/main/java/org/eclipse/openk/common/mapper/generic/annotations/MapDbModelField.java
+++ b/src/main/java/org/eclipse/openk/common/mapper/generic/annotations/MapDbModelField.java
@@ -1,14 +1,18 @@
/*
- ******************************************************************************
- * Copyright © 2018 PTA GmbH.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
*
- * http://www.eclipse.org/legal/epl-v10.html
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
*
- ******************************************************************************
- */
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
+*/
+
package org.eclipse.openk.common.mapper.generic.annotations;
import java.lang.annotation.ElementType;
diff --git a/src/main/java/org/eclipse/openk/common/util/DateUtils.java b/src/main/java/org/eclipse/openk/common/util/DateUtils.java
index 91f1ecd..3bbe456 100644
--- a/src/main/java/org/eclipse/openk/common/util/DateUtils.java
+++ b/src/main/java/org/eclipse/openk/common/util/DateUtils.java
@@ -1,14 +1,18 @@
/*
- * *****************************************************************************
- * Copyright © 2018 PTA GmbH.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
*
- * http://www.eclipse.org/legal/epl-v10.html
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
*
- * *****************************************************************************
- */
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
+*/
+
package org.eclipse.openk.common.util;
@@ -29,7 +33,7 @@
private DateUtils(){
- };
+ }
public static final Logger LOGGER = Logger.getLogger(DateUtils.class.getName());
diff --git a/src/main/java/org/eclipse/openk/common/util/ResourceLoaderBase.java b/src/main/java/org/eclipse/openk/common/util/ResourceLoaderBase.java
index 65e6aa5..5413e23 100644
--- a/src/main/java/org/eclipse/openk/common/util/ResourceLoaderBase.java
+++ b/src/main/java/org/eclipse/openk/common/util/ResourceLoaderBase.java
@@ -1,14 +1,18 @@
/*
-******************************************************************************
-* Copyright © 2018 PTA GmbH.
-* All rights reserved. This program and the accompanying materials
-* are made available under the terms of the Eclipse Public License v1.0
-* which accompanies this distribution, and is available at
-*
-* http://www.eclipse.org/legal/epl-v10.html
-*
-******************************************************************************
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
+ *
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
*/
+
package org.eclipse.openk.common.util;
import java.io.IOException;
diff --git a/src/main/java/org/eclipse/openk/common/util/SmallReflectionHelper.java b/src/main/java/org/eclipse/openk/common/util/SmallReflectionHelper.java
index cafe674..079985b 100644
--- a/src/main/java/org/eclipse/openk/common/util/SmallReflectionHelper.java
+++ b/src/main/java/org/eclipse/openk/common/util/SmallReflectionHelper.java
@@ -1,14 +1,18 @@
/*
- * ***************************************************************************
- * Copyright © 2018 PTA GmbH.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
*
- * http://www.eclipse.org/legal/epl-v10.html
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
*
- * ***************************************************************************
- */
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
+*/
+
package org.eclipse.openk.common.util;
import java.lang.reflect.Field;
diff --git a/src/main/java/org/eclipse/openk/core/RabbitMqTester.java b/src/main/java/org/eclipse/openk/core/RabbitMqTester.java
new file mode 100644
index 0000000..f0fee55
--- /dev/null
+++ b/src/main/java/org/eclipse/openk/core/RabbitMqTester.java
@@ -0,0 +1,208 @@
+/*
+ * *****************************************************************************
+ * Copyright © 2018 PTA GmbH.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ *
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * *****************************************************************************
+ */
+
+package org.eclipse.openk.core;
+
+import com.rabbitmq.client.AMQP;
+import com.rabbitmq.client.AMQP.BasicProperties;
+import com.rabbitmq.client.AMQP.BasicProperties.Builder;
+import com.rabbitmq.client.AMQP.Queue.DeclareOk;
+import com.rabbitmq.client.BuiltinExchangeType;
+import com.rabbitmq.client.ConnectionFactory;
+import com.rabbitmq.client.Connection;
+import com.rabbitmq.client.Channel;
+import com.rabbitmq.client.Consumer;
+import com.rabbitmq.client.DefaultConsumer;
+import com.rabbitmq.client.Envelope;
+import com.rabbitmq.client.MessageProperties;
+import java.io.IOException;
+import java.util.Arrays;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.concurrent.TimeoutException;
+import org.eclipse.openk.PlannedGridMeasuresConfiguration;
+import org.eclipse.openk.PlannedGridMeasuresConfiguration.RabbitmqConfiguration;
+import org.eclipse.openk.api.BackendSettings;
+import org.eclipse.openk.api.GridMeasure;
+import org.eclipse.openk.common.JsonGeneratorBase;
+import org.eclipse.openk.core.controller.BackendConfig;
+import org.eclipse.openk.core.messagebroker.Producer;
+
+public class RabbitMqTester {
+
+ private final static String QUEUE_NAME = "pgm-applied-queue";
+ private final static String ROUTING_KEY = "applied";
+ private final static String EXCHANGE_NAME = "openk-pgm-exchange-test";
+
+ public static void main(String[] args) throws Exception {
+ prepareBackendSettings();
+ //prepareRabbitMq();
+ send2();
+
+
+
+ // consumeExchange();
+ //consume();
+
+
+
+ }
+
+ private static void prepareBackendSettings() {
+ RabbitmqConfiguration rabbitmqConfiguration = new RabbitmqConfiguration();
+ rabbitmqConfiguration.setUser("admin");
+ rabbitmqConfiguration.setPassword("admin");
+ rabbitmqConfiguration.setExchangeName("openk-pgm-exchange-test");
+ // rabbitmqConfiguration.setHost("172.18.22.160");
+ rabbitmqConfiguration.setHost("localhost");
+ rabbitmqConfiguration.setPort("5672");
+ rabbitmqConfiguration.setUnroutedMessagesExchangeName("unrouted-messages-test-ex");
+ rabbitmqConfiguration.setUnroutedMessagesQueueName("unrouted-messages-test-q");
+
+ rabbitmqConfiguration.setQueueNames("pgm-applie-queue");
+
+ BackendSettings backendSettings = new BackendSettings();
+ PlannedGridMeasuresConfiguration measuresConfiguration = new PlannedGridMeasuresConfiguration();
+ measuresConfiguration.setPortalBaseURL("portalBaseUrlMock");
+ measuresConfiguration.setRabbitmqConfiguration(rabbitmqConfiguration);
+ BackendConfig.configure(measuresConfiguration, backendSettings);
+ }
+
+ private static void send2() throws Exception {
+ GridMeasure gm = new GridMeasure();
+ gm.setTitle("Tester33");
+ try (Producer prod = new Producer()) {
+ prod.sendMessageAsJson(gm, "applied");
+ }
+
+ }
+
+ private static void prepareRabbitMq(){
+ ConnectionFactory factory = new ConnectionFactory();
+ // factory.setHost("172.18.22.160");
+ factory.setHost("localhost");
+ factory.setPassword("admin");
+ factory.setUsername("admin");
+ try (Connection connection = factory.newConnection();
+ Channel channel = connection.createChannel()) {
+
+ // durable = true
+ channel.exchangeDeclare(EXCHANGE_NAME, BuiltinExchangeType.DIRECT, true);
+
+ Map<String, Object> args = new HashMap<>();
+ args.put("x-queue-mode", "lazy");
+
+ List<String> queueNameList = Arrays.asList("pgm-canceled-queue", "pgm-applied-queue", "pgm-approved-queue");
+
+ for (String queueName : queueNameList) {
+ channel.queueDeclare(queueName, true, false, false, args);
+ String routingKey = queueName.split("-")[1];
+ channel.queueBind(queueName, EXCHANGE_NAME, routingKey);
+ }
+
+ } catch (TimeoutException e) {
+ e.printStackTrace();
+ } catch (IOException e) {
+ e.printStackTrace();
+ }
+ }
+
+ private static void send() {
+ ConnectionFactory factory = new ConnectionFactory();
+ factory.setHost("172.18.22.160");
+ factory.setPassword("admin");
+ factory.setUsername("admin");
+ try (Connection connection = factory.newConnection();
+ Channel channel = connection.createChannel()) {
+
+ Map<String, Object> args = new HashMap<String, Object>();
+ args.put("x-queue-mode", "lazy");
+
+ channel.queueDeclare(QUEUE_NAME, true, false, false, args);
+ String message = "Hello World!333233";
+ // channel.basicPublish(EXCHANGE_NAME, ROUTING_KEY, MessageProperties.PERSISTENT_TEXT_PLAIN, message.getBytes());
+ BasicProperties basicProperties = new Builder().contentType("text/plain").deliveryMode(2).priority(0).userId("bob").build();
+ // channel.basicPublish(EXCHANGE_NAME, ROUTING_KEY, MessageProperties.PERSISTENT_TEXT_PLAIN, message.getBytes());
+ channel.basicPublish(EXCHANGE_NAME, ROUTING_KEY, MessageProperties.PERSISTENT_TEXT_PLAIN, message.getBytes());
+ System.out.println(" [x] Sent '" + message + "'");
+
+ } catch (TimeoutException e) {
+ e.printStackTrace();
+ } catch (IOException e) {
+ e.printStackTrace();
+ }
+
+ }
+
+ private static void consumeExchange() {
+ ConnectionFactory factory = new ConnectionFactory();
+ factory.setHost("172.18.22.160");
+ factory.setPassword("admin");
+ factory.setUsername("admin");
+ try (Connection connection = factory.newConnection(); Channel channel = connection.createChannel()) {
+
+ // channel.queueDeclare(QUEUE_NAME, false, false, false, null);
+ System.out.println(" [*] Waiting for messages. To exit press CTRL+C");
+
+ Consumer consumer = new DefaultConsumer(channel) {
+ @Override
+ public void handleDelivery(String consumerTag, Envelope envelope, AMQP.BasicProperties properties, byte[] body) throws IOException {
+ String message = new String(body, "UTF-8");
+ System.out.println(" [x] Received '" + envelope.getRoutingKey() + "':'" + message + "'");
+ }
+ };
+ channel.basicConsume(QUEUE_NAME, true, consumer);
+
+ } catch (TimeoutException e) {
+ e.printStackTrace();
+ } catch (IOException e) {
+ e.printStackTrace();
+ }
+ }
+
+ private static void consumeDirect() {
+ ConnectionFactory factory = new ConnectionFactory();
+ factory.setHost("172.18.22.160");
+ factory.setPassword("admin");
+ factory.setUsername("admin");
+ try (Connection connection = factory.newConnection();
+ Channel channel = connection.createChannel()) {
+
+ // channel.queueDeclare(QUEUE_NAME, false, false, false, null);
+ System.out.println(" [*] Waiting for messages. To exit press CTRL+C");
+
+ Consumer consumer = new DefaultConsumer(channel) {
+ @Override
+ public void handleDelivery(String consumerTag, Envelope envelope, AMQP.BasicProperties properties, byte[] body)
+ throws IOException {
+ String message = new String(body, "UTF-8");
+ System.out.println(" [x] Received '" + message + "'");
+ }
+ };
+ channel.basicConsume(QUEUE_NAME, true, consumer);
+
+ } catch (TimeoutException e) {
+ e.printStackTrace();
+ } catch (IOException e) {
+ e.printStackTrace();
+ }
+
+
+
+
+ }
+
+
+
+
+}
diff --git a/src/main/java/org/eclipse/openk/core/Tester.java b/src/main/java/org/eclipse/openk/core/Tester.java
new file mode 100644
index 0000000..730f733
--- /dev/null
+++ b/src/main/java/org/eclipse/openk/core/Tester.java
@@ -0,0 +1,96 @@
+/*
+ * *****************************************************************************
+ * Copyright © 2018 PTA GmbH.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ *
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * *****************************************************************************
+ */
+
+package org.eclipse.openk.core;
+
+import java.text.DateFormat;
+import java.text.ParseException;
+import java.text.SimpleDateFormat;
+import java.time.ZoneId;
+import java.util.ArrayList;
+import java.util.Date;
+import java.util.List;
+import java.util.Locale;
+import java.util.Optional;
+import java.util.TimeZone;
+import java.util.stream.Collectors;
+import java.util.stream.Stream;
+import org.eclipse.openk.common.util.DateUtils;
+
+public class Tester {
+
+ private static final String DATEFORMAT = "yyyy-MM-dd'T'HH:mm:ss";
+ private static final String DATEFORMAT2 = "yyyy-MM-dd'T'HH:mm:ss.SSS'Z'";
+ private static final String DATEFORMAT3 = "yyMMdd";
+
+ public static void main(String[] args) throws Exception {
+ test3();
+ }
+
+ private static void test3() {
+ List<String> list = new ArrayList<>();
+ list.add("behold");
+ list.add("bend");
+ list.add("bet");
+ list.add("bear");
+ list.add("beat");
+ list.add("become");
+ list.add("begin");
+
+ String s = list.stream().filter(it -> it.contains("bea")).findFirst().orElse(null);
+ String s2 = list.stream().filter(it -> it.contains("bea")).findFirst().get();
+ //List<String> matches = list.stream().filter(it -> it.contains("bea")).collect(Collectors.toList());
+
+ System.out.println(s); // [bear, beat]
+
+ }
+
+ private static void test1() throws ParseException {
+ DateFormat dateFormat3 = new SimpleDateFormat("yyMMdd");
+ DateFormat dateFormat = new SimpleDateFormat(DATEFORMAT, Locale.GERMANY); //This is the format I need
+ // dateFormat.setTimeZone(TimeZone.getTimeZone("UTC"));
+ // dateFormat.setTimeZone(TimeZone.getTimeZone("ECT"));
+
+ Date date = new Date();
+ String format = dateFormat3.format(date);
+ System.out.println("format3: " + format);
+ // Date date2 = dateFormat.parse("");
+
+ Date date1 = DateUtils.parseStringToDate(null);
+ Date date2 = new Date();
+ Date date3 = org.apache.commons.lang3.time.DateUtils.addDays(date2, 3);
+ System.out.println(date3);
+
+ boolean sameDay = org.apache.commons.lang3.time.DateUtils.isSameDay(date, date3);
+ System.out.println(sameDay);
+
+ System.out.println(DateUtils.asLocalDate(date3));
+
+
+ }
+
+ private static void test2() {
+ int number = 123;
+ String numberAsString = String.format ("%05d", number);
+ System.out.println(numberAsString);
+
+ }
+
+ private static String createDescriptiveId(int counter, Date date){
+ DateFormat dateFormat = new SimpleDateFormat("yyMMdd");
+ String counterAsString = String.format ("%04d", counter);
+ return dateFormat.format(date)+ counterAsString;
+ }
+
+
+
+}
diff --git a/src/main/java/org/eclipse/openk/core/bpmn/base/ProcessException.java b/src/main/java/org/eclipse/openk/core/bpmn/base/ProcessException.java
index dc57591..0978a89 100644
--- a/src/main/java/org/eclipse/openk/core/bpmn/base/ProcessException.java
+++ b/src/main/java/org/eclipse/openk/core/bpmn/base/ProcessException.java
@@ -1,14 +1,18 @@
-/**
- ******************************************************************************
- * Copyright © 2018 PTA GmbH.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
+/*
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
*
- * http://www.eclipse.org/legal/epl-v10.html
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
*
- ******************************************************************************
- */
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
+*/
+
package org.eclipse.openk.core.bpmn.base;
public class ProcessException extends Exception {
diff --git a/src/main/java/org/eclipse/openk/core/bpmn/base/ProcessGrid.java b/src/main/java/org/eclipse/openk/core/bpmn/base/ProcessGrid.java
index c81c87f..540a7e6 100644
--- a/src/main/java/org/eclipse/openk/core/bpmn/base/ProcessGrid.java
+++ b/src/main/java/org/eclipse/openk/core/bpmn/base/ProcessGrid.java
@@ -1,14 +1,18 @@
-/**
- ******************************************************************************
- * Copyright © 2018 PTA GmbH.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
+/*
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
*
- * http://www.eclipse.org/legal/epl-v10.html
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
*
- ******************************************************************************
- */
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
+*/
+
package org.eclipse.openk.core.bpmn.base;
import java.util.HashMap;
diff --git a/src/main/java/org/eclipse/openk/core/bpmn/base/ProcessState.java b/src/main/java/org/eclipse/openk/core/bpmn/base/ProcessState.java
index df6da23..211631b 100644
--- a/src/main/java/org/eclipse/openk/core/bpmn/base/ProcessState.java
+++ b/src/main/java/org/eclipse/openk/core/bpmn/base/ProcessState.java
@@ -1,14 +1,18 @@
-/**
- ******************************************************************************
- * Copyright © 2018 PTA GmbH.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
+/*
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
*
- * http://www.eclipse.org/legal/epl-v10.html
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
*
- ******************************************************************************
- */
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
+*/
+
package org.eclipse.openk.core.bpmn.base;
public interface ProcessState {
diff --git a/src/main/java/org/eclipse/openk/core/bpmn/base/ProcessSubject.java b/src/main/java/org/eclipse/openk/core/bpmn/base/ProcessSubject.java
index 707590f..995113e 100644
--- a/src/main/java/org/eclipse/openk/core/bpmn/base/ProcessSubject.java
+++ b/src/main/java/org/eclipse/openk/core/bpmn/base/ProcessSubject.java
@@ -1,14 +1,18 @@
-/**
- ******************************************************************************
- * Copyright © 2018 PTA GmbH.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
+/*
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
*
- * http://www.eclipse.org/legal/epl-v10.html
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
*
- ******************************************************************************
- */
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
+*/
+
package org.eclipse.openk.core.bpmn.base;
public interface ProcessSubject {
diff --git a/src/main/java/org/eclipse/openk/core/bpmn/base/ProcessTask.java b/src/main/java/org/eclipse/openk/core/bpmn/base/ProcessTask.java
index f5ad09b..90aab54 100644
--- a/src/main/java/org/eclipse/openk/core/bpmn/base/ProcessTask.java
+++ b/src/main/java/org/eclipse/openk/core/bpmn/base/ProcessTask.java
@@ -1,14 +1,18 @@
-/**
- ******************************************************************************
- * Copyright © 2018 PTA GmbH.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
+/*
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
*
- * http://www.eclipse.org/legal/epl-v10.html
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
*
- ******************************************************************************
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
*/
+
package org.eclipse.openk.core.bpmn.base;
import org.eclipse.openk.core.exceptions.HttpStatusException;
diff --git a/src/main/java/org/eclipse/openk/core/bpmn/base/StateResolver.java b/src/main/java/org/eclipse/openk/core/bpmn/base/StateResolver.java
index 4751acc..8730338 100644
--- a/src/main/java/org/eclipse/openk/core/bpmn/base/StateResolver.java
+++ b/src/main/java/org/eclipse/openk/core/bpmn/base/StateResolver.java
@@ -1,14 +1,18 @@
-/**
- ******************************************************************************
- * Copyright © 2018 PTA GmbH.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
+/*
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
*
- * http://www.eclipse.org/legal/epl-v10.html
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
*
- ******************************************************************************
- */
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
+*/
+
package org.eclipse.openk.core.bpmn.base;
public interface StateResolver {
diff --git a/src/main/java/org/eclipse/openk/core/bpmn/base/tasks/BaseTask.java b/src/main/java/org/eclipse/openk/core/bpmn/base/tasks/BaseTask.java
index 7672dcc..43aa1b4 100644
--- a/src/main/java/org/eclipse/openk/core/bpmn/base/tasks/BaseTask.java
+++ b/src/main/java/org/eclipse/openk/core/bpmn/base/tasks/BaseTask.java
@@ -1,14 +1,18 @@
-/**
- ******************************************************************************
- * Copyright © 2018 PTA GmbH.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
+/*
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
*
- * http://www.eclipse.org/legal/epl-v10.html
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
*
- ******************************************************************************
- */
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
+*/
+
package org.eclipse.openk.core.bpmn.base.tasks;
diff --git a/src/main/java/org/eclipse/openk/core/bpmn/base/tasks/DecisionTask.java b/src/main/java/org/eclipse/openk/core/bpmn/base/tasks/DecisionTask.java
index c9aaff6..547715c 100644
--- a/src/main/java/org/eclipse/openk/core/bpmn/base/tasks/DecisionTask.java
+++ b/src/main/java/org/eclipse/openk/core/bpmn/base/tasks/DecisionTask.java
@@ -1,14 +1,18 @@
-/**
- ******************************************************************************
- * Copyright © 2018 PTA GmbH.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
+/*
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
*
- * http://www.eclipse.org/legal/epl-v10.html
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
*
- ******************************************************************************
- */
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
+*/
+
package org.eclipse.openk.core.bpmn.base.tasks;
import java.util.EnumMap;
diff --git a/src/main/java/org/eclipse/openk/core/bpmn/base/tasks/EndPointTask.java b/src/main/java/org/eclipse/openk/core/bpmn/base/tasks/EndPointTask.java
index d972b17..53530fa 100644
--- a/src/main/java/org/eclipse/openk/core/bpmn/base/tasks/EndPointTask.java
+++ b/src/main/java/org/eclipse/openk/core/bpmn/base/tasks/EndPointTask.java
@@ -1,14 +1,18 @@
-/**
- ******************************************************************************
- * Copyright © 2018 PTA GmbH.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
+/*
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
*
- * http://www.eclipse.org/legal/epl-v10.html
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
*
- ******************************************************************************
- */
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
+*/
+
package org.eclipse.openk.core.bpmn.base.tasks;
import org.apache.log4j.Logger;
diff --git a/src/main/java/org/eclipse/openk/core/bpmn/base/tasks/ServiceTask.java b/src/main/java/org/eclipse/openk/core/bpmn/base/tasks/ServiceTask.java
index e60ac37..c4191a4 100644
--- a/src/main/java/org/eclipse/openk/core/bpmn/base/tasks/ServiceTask.java
+++ b/src/main/java/org/eclipse/openk/core/bpmn/base/tasks/ServiceTask.java
@@ -1,23 +1,25 @@
/*
-******************************************************************************
-* Copyright © 2018 PTA GmbH.
-* All rights reserved. This program and the accompanying materials
-* are made available under the terms of the Eclipse Public License v1.0
-* which accompanies this distribution, and is available at
-*
-* http://www.eclipse.org/legal/epl-v10.html
-*
-******************************************************************************
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
+ *
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
*/
+
package org.eclipse.openk.core.bpmn.base.tasks;
-import com.rabbitmq.client.BuiltinExchangeType;
import com.rabbitmq.client.Channel;
import com.rabbitmq.client.Connection;
import com.rabbitmq.client.ConnectionFactory;
import org.apache.log4j.Logger;
import org.eclipse.openk.PlannedGridMeasuresConfiguration;
-import org.eclipse.openk.common.Globals;
import org.eclipse.openk.core.bpmn.base.ProcessException;
import org.eclipse.openk.core.bpmn.base.ProcessSubject;
import org.eclipse.openk.core.controller.BackendConfig;
@@ -55,7 +57,7 @@
return new Producer();
}
- public void createMessageQueue(String queueName) throws ProcessException {
+ public void createMessageQueue(String queueName) {
logger.debug("createMessageQueue called");
PlannedGridMeasuresConfiguration.RabbitmqConfiguration rabbitmqConfiguration = BackendConfig.getInstance().getRabbitmqConfiguration();
diff --git a/src/main/java/org/eclipse/openk/core/bpmn/base/tasks/UserInteractionTask.java b/src/main/java/org/eclipse/openk/core/bpmn/base/tasks/UserInteractionTask.java
index b3c0228..a2d7f0c 100644
--- a/src/main/java/org/eclipse/openk/core/bpmn/base/tasks/UserInteractionTask.java
+++ b/src/main/java/org/eclipse/openk/core/bpmn/base/tasks/UserInteractionTask.java
@@ -1,14 +1,18 @@
-/**
- ******************************************************************************
- * Copyright © 2018 PTA GmbH.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
+/*
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
*
- * http://www.eclipse.org/legal/epl-v10.html
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
*
- ******************************************************************************
- */
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
+*/
+
package org.eclipse.openk.core.bpmn.base.tasks;
import org.apache.log4j.Logger;
diff --git a/src/main/java/org/eclipse/openk/core/bpmn/gridmeasure/PlgmGrid.java b/src/main/java/org/eclipse/openk/core/bpmn/gridmeasure/PlgmGrid.java
index 0ace804..fed6f12 100644
--- a/src/main/java/org/eclipse/openk/core/bpmn/gridmeasure/PlgmGrid.java
+++ b/src/main/java/org/eclipse/openk/core/bpmn/gridmeasure/PlgmGrid.java
@@ -1,14 +1,18 @@
/*
-******************************************************************************
-* Copyright © 2018 PTA GmbH.
-* All rights reserved. This program and the accompanying materials
-* are made available under the terms of the Eclipse Public License v1.0
-* which accompanies this distribution, and is available at
-*
-* http://www.eclipse.org/legal/epl-v10.html
-*
-******************************************************************************
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
+ *
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
*/
+
package org.eclipse.openk.core.bpmn.gridmeasure;
import static org.eclipse.openk.api.BackendSettings.BpmnGridConfig.END_AFTER_APPROVED;
diff --git a/src/main/java/org/eclipse/openk/core/bpmn/gridmeasure/PlgmProcessState.java b/src/main/java/org/eclipse/openk/core/bpmn/gridmeasure/PlgmProcessState.java
index 45a8ee8..48ccd53 100644
--- a/src/main/java/org/eclipse/openk/core/bpmn/gridmeasure/PlgmProcessState.java
+++ b/src/main/java/org/eclipse/openk/core/bpmn/gridmeasure/PlgmProcessState.java
@@ -1,14 +1,18 @@
/*
- * ***************************************************************************
- * Copyright © 2018 PTA GmbH.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
*
- * http://www.eclipse.org/legal/epl-v10.html
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
*
- * ***************************************************************************
- */
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
+*/
+
package org.eclipse.openk.core.bpmn.gridmeasure;
import org.apache.log4j.Logger;
diff --git a/src/main/java/org/eclipse/openk/core/bpmn/gridmeasure/PlgmProcessSubject.java b/src/main/java/org/eclipse/openk/core/bpmn/gridmeasure/PlgmProcessSubject.java
index 96a8e68..a50a331 100644
--- a/src/main/java/org/eclipse/openk/core/bpmn/gridmeasure/PlgmProcessSubject.java
+++ b/src/main/java/org/eclipse/openk/core/bpmn/gridmeasure/PlgmProcessSubject.java
@@ -1,14 +1,18 @@
-/**
- ******************************************************************************
- * Copyright © 2018 PTA GmbH.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
+/*
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
*
- * http://www.eclipse.org/legal/epl-v10.html
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
*
- ******************************************************************************
- */
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
+*/
+
package org.eclipse.openk.core.bpmn.gridmeasure;
import org.apache.log4j.Logger;
diff --git a/src/main/java/org/eclipse/openk/core/bpmn/gridmeasure/tasks/ConfigDecisionTask.java b/src/main/java/org/eclipse/openk/core/bpmn/gridmeasure/tasks/ConfigDecisionTask.java
index 2852435..45c0e35 100644
--- a/src/main/java/org/eclipse/openk/core/bpmn/gridmeasure/tasks/ConfigDecisionTask.java
+++ b/src/main/java/org/eclipse/openk/core/bpmn/gridmeasure/tasks/ConfigDecisionTask.java
@@ -1,14 +1,18 @@
/*
- * ***************************************************************************
- * Copyright © 2018 PTA GmbH.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
*
- * http://www.eclipse.org/legal/epl-v10.html
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
*
- * ***************************************************************************
- */
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
+*/
+
package org.eclipse.openk.core.bpmn.gridmeasure.tasks;
import org.apache.log4j.Logger;
diff --git a/src/main/java/org/eclipse/openk/core/bpmn/gridmeasure/tasks/DecideAnotherSinglemeasure.java b/src/main/java/org/eclipse/openk/core/bpmn/gridmeasure/tasks/DecideAnotherSinglemeasure.java
index 97d03b8..c05dbfc 100644
--- a/src/main/java/org/eclipse/openk/core/bpmn/gridmeasure/tasks/DecideAnotherSinglemeasure.java
+++ b/src/main/java/org/eclipse/openk/core/bpmn/gridmeasure/tasks/DecideAnotherSinglemeasure.java
@@ -1,14 +1,18 @@
/*
- ******************************************************************************
- * Copyright © 2018 PTA GmbH.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
*
- * http://www.eclipse.org/legal/epl-v10.html
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
*
- ******************************************************************************
- */
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
+*/
+
package org.eclipse.openk.core.bpmn.gridmeasure.tasks;
import org.apache.log4j.Logger;
diff --git a/src/main/java/org/eclipse/openk/core/bpmn/gridmeasure/tasks/DecideMeasureApplied.java b/src/main/java/org/eclipse/openk/core/bpmn/gridmeasure/tasks/DecideMeasureApplied.java
index f4410ff..047504a 100644
--- a/src/main/java/org/eclipse/openk/core/bpmn/gridmeasure/tasks/DecideMeasureApplied.java
+++ b/src/main/java/org/eclipse/openk/core/bpmn/gridmeasure/tasks/DecideMeasureApplied.java
@@ -1,14 +1,18 @@
/*
-******************************************************************************
-* Copyright © 2018 PTA GmbH.
-* All rights reserved. This program and the accompanying materials
-* are made available under the terms of the Eclipse Public License v1.0
-* which accompanies this distribution, and is available at
-*
-* http://www.eclipse.org/legal/epl-v10.html
-*
-******************************************************************************
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
+ *
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
*/
+
package org.eclipse.openk.core.bpmn.gridmeasure.tasks;
import org.apache.log4j.Logger;
diff --git a/src/main/java/org/eclipse/openk/core/bpmn/gridmeasure/tasks/DecideMeasureApproved.java b/src/main/java/org/eclipse/openk/core/bpmn/gridmeasure/tasks/DecideMeasureApproved.java
index 418b9da..aa93ca1 100644
--- a/src/main/java/org/eclipse/openk/core/bpmn/gridmeasure/tasks/DecideMeasureApproved.java
+++ b/src/main/java/org/eclipse/openk/core/bpmn/gridmeasure/tasks/DecideMeasureApproved.java
@@ -1,14 +1,18 @@
/*
-******************************************************************************
-* Copyright © 2018 PTA GmbH.
-* All rights reserved. This program and the accompanying materials
-* are made available under the terms of the Eclipse Public License v1.0
-* which accompanies this distribution, and is available at
-*
-* http://www.eclipse.org/legal/epl-v10.html
-*
-******************************************************************************
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
+ *
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
*/
+
package org.eclipse.openk.core.bpmn.gridmeasure.tasks;
import org.apache.log4j.Logger;
diff --git a/src/main/java/org/eclipse/openk/core/bpmn/gridmeasure/tasks/DecideMeasureNotNeededOrRequested.java b/src/main/java/org/eclipse/openk/core/bpmn/gridmeasure/tasks/DecideMeasureNotNeededOrRequested.java
index 4bf88d4..f868760 100644
--- a/src/main/java/org/eclipse/openk/core/bpmn/gridmeasure/tasks/DecideMeasureNotNeededOrRequested.java
+++ b/src/main/java/org/eclipse/openk/core/bpmn/gridmeasure/tasks/DecideMeasureNotNeededOrRequested.java
@@ -1,14 +1,18 @@
/*
- * ***************************************************************************
- * Copyright © 2018 PTA GmbH.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
*
- * http://www.eclipse.org/legal/epl-v10.html
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
*
- * ***************************************************************************
- */
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
+*/
+
package org.eclipse.openk.core.bpmn.gridmeasure.tasks;
import org.apache.log4j.Logger;
diff --git a/src/main/java/org/eclipse/openk/core/bpmn/gridmeasure/tasks/DecideMeasurePossible.java b/src/main/java/org/eclipse/openk/core/bpmn/gridmeasure/tasks/DecideMeasurePossible.java
index 161bfee..7eb48d5 100644
--- a/src/main/java/org/eclipse/openk/core/bpmn/gridmeasure/tasks/DecideMeasurePossible.java
+++ b/src/main/java/org/eclipse/openk/core/bpmn/gridmeasure/tasks/DecideMeasurePossible.java
@@ -1,14 +1,18 @@
/*
- * ***************************************************************************
- * Copyright © 2018 PTA GmbH.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
*
- * http://www.eclipse.org/legal/epl-v10.html
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
*
- * ***************************************************************************
- */
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
+*/
+
package org.eclipse.openk.core.bpmn.gridmeasure.tasks;
import org.apache.log4j.Logger;
diff --git a/src/main/java/org/eclipse/openk/core/bpmn/gridmeasure/tasks/DecideMeasureReleased.java b/src/main/java/org/eclipse/openk/core/bpmn/gridmeasure/tasks/DecideMeasureReleased.java
index 40ab568..f33437a 100644
--- a/src/main/java/org/eclipse/openk/core/bpmn/gridmeasure/tasks/DecideMeasureReleased.java
+++ b/src/main/java/org/eclipse/openk/core/bpmn/gridmeasure/tasks/DecideMeasureReleased.java
@@ -1,14 +1,18 @@
/*
- * ***************************************************************************
- * Copyright © 2018 PTA GmbH.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
*
- * http://www.eclipse.org/legal/epl-v10.html
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
*
- * ***************************************************************************
- */
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
+*/
+
package org.eclipse.openk.core.bpmn.gridmeasure.tasks;
import org.apache.log4j.Logger;
diff --git a/src/main/java/org/eclipse/openk/core/bpmn/gridmeasure/tasks/DecideMeasureSaved.java b/src/main/java/org/eclipse/openk/core/bpmn/gridmeasure/tasks/DecideMeasureSaved.java
index a2eebd5..078272f 100644
--- a/src/main/java/org/eclipse/openk/core/bpmn/gridmeasure/tasks/DecideMeasureSaved.java
+++ b/src/main/java/org/eclipse/openk/core/bpmn/gridmeasure/tasks/DecideMeasureSaved.java
@@ -1,25 +1,19 @@
/*
-******************************************************************************
-* Copyright © 2018 PTA GmbH.
-* All rights reserved. This program and the accompanying materials
-* are made available under the terms of the Eclipse Public License v1.0
-* which accompanies this distribution, and is available at
-*
-* http://www.eclipse.org/legal/epl-v10.html
-*
-******************************************************************************
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
+ *
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
*/
-/*
- ******************************************************************************
- * Copyright © 2018 PTA GmbH.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- *
- * http://www.eclipse.org/legal/epl-v10.html
- *
- ******************************************************************************
- */
+
+
package org.eclipse.openk.core.bpmn.gridmeasure.tasks;
import org.apache.log4j.Logger;
diff --git a/src/main/java/org/eclipse/openk/core/bpmn/gridmeasure/tasks/MeasureForApproval.java b/src/main/java/org/eclipse/openk/core/bpmn/gridmeasure/tasks/MeasureForApproval.java
index c5716a1..f81b3c0 100644
--- a/src/main/java/org/eclipse/openk/core/bpmn/gridmeasure/tasks/MeasureForApproval.java
+++ b/src/main/java/org/eclipse/openk/core/bpmn/gridmeasure/tasks/MeasureForApproval.java
@@ -1,14 +1,18 @@
/*
-******************************************************************************
-* Copyright © 2018 PTA GmbH.
-* All rights reserved. This program and the accompanying materials
-* are made available under the terms of the Eclipse Public License v1.0
-* which accompanies this distribution, and is available at
-*
-* http://www.eclipse.org/legal/epl-v10.html
-*
-******************************************************************************
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
+ *
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
*/
+
package org.eclipse.openk.core.bpmn.gridmeasure.tasks;
import org.apache.log4j.Logger;
diff --git a/src/main/java/org/eclipse/openk/core/bpmn/gridmeasure/tasks/MeasureNew.java b/src/main/java/org/eclipse/openk/core/bpmn/gridmeasure/tasks/MeasureNew.java
index 5b94c08..5ff41a2 100644
--- a/src/main/java/org/eclipse/openk/core/bpmn/gridmeasure/tasks/MeasureNew.java
+++ b/src/main/java/org/eclipse/openk/core/bpmn/gridmeasure/tasks/MeasureNew.java
@@ -1,14 +1,18 @@
/*
-******************************************************************************
-* Copyright © 2018 PTA GmbH.
-* All rights reserved. This program and the accompanying materials
-* are made available under the terms of the Eclipse Public License v1.0
-* which accompanies this distribution, and is available at
-*
-* http://www.eclipse.org/legal/epl-v10.html
-*
-******************************************************************************
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
+ *
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
*/
+
package org.eclipse.openk.core.bpmn.gridmeasure.tasks;
import org.apache.log4j.Logger;
diff --git a/src/main/java/org/eclipse/openk/core/bpmn/gridmeasure/tasks/ServiceImportData.java b/src/main/java/org/eclipse/openk/core/bpmn/gridmeasure/tasks/ServiceImportData.java
index 8c792a4..c3560d3 100644
--- a/src/main/java/org/eclipse/openk/core/bpmn/gridmeasure/tasks/ServiceImportData.java
+++ b/src/main/java/org/eclipse/openk/core/bpmn/gridmeasure/tasks/ServiceImportData.java
@@ -1,14 +1,18 @@
/*
- ******************************************************************************
- * Copyright © 2018 PTA GmbH.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
*
- * http://www.eclipse.org/legal/epl-v10.html
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
*
- ******************************************************************************
- */
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
+*/
+
package org.eclipse.openk.core.bpmn.gridmeasure.tasks;
import org.apache.log4j.Logger;
diff --git a/src/main/java/org/eclipse/openk/core/bpmn/gridmeasure/tasks/ServiceMeasureApplied.java b/src/main/java/org/eclipse/openk/core/bpmn/gridmeasure/tasks/ServiceMeasureApplied.java
index fa34e38..66b3a3d 100644
--- a/src/main/java/org/eclipse/openk/core/bpmn/gridmeasure/tasks/ServiceMeasureApplied.java
+++ b/src/main/java/org/eclipse/openk/core/bpmn/gridmeasure/tasks/ServiceMeasureApplied.java
@@ -1,14 +1,18 @@
/*
-******************************************************************************
-* Copyright © 2018 PTA GmbH.
-* All rights reserved. This program and the accompanying materials
-* are made available under the terms of the Eclipse Public License v1.0
-* which accompanies this distribution, and is available at
-*
-* http://www.eclipse.org/legal/epl-v10.html
-*
-******************************************************************************
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
+ *
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
*/
+
package org.eclipse.openk.core.bpmn.gridmeasure.tasks;
import org.apache.log4j.Logger;
diff --git a/src/main/java/org/eclipse/openk/core/bpmn/gridmeasure/tasks/ServiceMeasureAppliedMessageQ.java b/src/main/java/org/eclipse/openk/core/bpmn/gridmeasure/tasks/ServiceMeasureAppliedMessageQ.java
index f823a6b..e3c17e2 100644
--- a/src/main/java/org/eclipse/openk/core/bpmn/gridmeasure/tasks/ServiceMeasureAppliedMessageQ.java
+++ b/src/main/java/org/eclipse/openk/core/bpmn/gridmeasure/tasks/ServiceMeasureAppliedMessageQ.java
@@ -1,14 +1,18 @@
/*
- * *****************************************************************************
- * Copyright © 2018 PTA GmbH.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
*
- * http://www.eclipse.org/legal/epl-v10.html
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
*
- * *****************************************************************************
- */
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
+*/
+
package org.eclipse.openk.core.bpmn.gridmeasure.tasks;
import javax.mail.MessagingException;
@@ -44,8 +48,6 @@
LOGGER.debug(">>execute: Send Mail on 'beantragt'");
- createMessageQueue("pgm-applied-queue");
-
try (Producer prod = createMessageQueueProducer()) {
prod.sendMessageAsJson(model.getGridMeasure(), "applied");
} catch (Exception e) {
diff --git a/src/main/java/org/eclipse/openk/core/bpmn/gridmeasure/tasks/ServiceMeasureApproved.java b/src/main/java/org/eclipse/openk/core/bpmn/gridmeasure/tasks/ServiceMeasureApproved.java
index c3c0d77..5af32d7 100644
--- a/src/main/java/org/eclipse/openk/core/bpmn/gridmeasure/tasks/ServiceMeasureApproved.java
+++ b/src/main/java/org/eclipse/openk/core/bpmn/gridmeasure/tasks/ServiceMeasureApproved.java
@@ -1,14 +1,18 @@
/*
-******************************************************************************
-* Copyright © 2018 PTA GmbH.
-* All rights reserved. This program and the accompanying materials
-* are made available under the terms of the Eclipse Public License v1.0
-* which accompanies this distribution, and is available at
-*
-* http://www.eclipse.org/legal/epl-v10.html
-*
-******************************************************************************
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
+ *
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
*/
+
package org.eclipse.openk.core.bpmn.gridmeasure.tasks;
import javax.mail.MessagingException;
@@ -44,8 +48,6 @@
}
LOGGER.debug(">>execute: Send Mail on 'genehmigt'");
- createMessageQueue("pgm-approved-queue");
-
try (Producer prod = createMessageQueueProducer()) {
prod.sendMessageAsJson(model.getGridMeasure(), "approved");
} catch (Exception e) {
diff --git a/src/main/java/org/eclipse/openk/core/bpmn/gridmeasure/tasks/ServiceMeasureCanceled.java b/src/main/java/org/eclipse/openk/core/bpmn/gridmeasure/tasks/ServiceMeasureCanceled.java
index c1fd4e7..f3f49f8 100644
--- a/src/main/java/org/eclipse/openk/core/bpmn/gridmeasure/tasks/ServiceMeasureCanceled.java
+++ b/src/main/java/org/eclipse/openk/core/bpmn/gridmeasure/tasks/ServiceMeasureCanceled.java
@@ -1,14 +1,18 @@
/*
- ******************************************************************************
- * Copyright © 2018 PTA GmbH.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
*
- * http://www.eclipse.org/legal/epl-v10.html
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
*
- ******************************************************************************
- */
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
+*/
+
package org.eclipse.openk.core.bpmn.gridmeasure.tasks;
import javax.mail.MessagingException;
@@ -44,8 +48,6 @@
}
LOGGER.debug(">>execute: Send Mail on 'storniert'");
- createMessageQueue("pgm-canceled-queue");
-
try (Producer prod = createMessageQueueProducer()) {
prod.sendMessageAsJson(model.getGridMeasure(), "canceled");
} catch (Exception e) {
diff --git a/src/main/java/org/eclipse/openk/core/bpmn/gridmeasure/tasks/ServiceMeasureClosed.java b/src/main/java/org/eclipse/openk/core/bpmn/gridmeasure/tasks/ServiceMeasureClosed.java
index 0aef8f3..d153465 100644
--- a/src/main/java/org/eclipse/openk/core/bpmn/gridmeasure/tasks/ServiceMeasureClosed.java
+++ b/src/main/java/org/eclipse/openk/core/bpmn/gridmeasure/tasks/ServiceMeasureClosed.java
@@ -1,14 +1,18 @@
/*
- * ***************************************************************************
- * Copyright © 2018 PTA GmbH.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
*
- * http://www.eclipse.org/legal/epl-v10.html
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
*
- * ***************************************************************************
- */
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
+*/
+
package org.eclipse.openk.core.bpmn.gridmeasure.tasks;
import javax.mail.MessagingException;
@@ -41,8 +45,6 @@
}
LOGGER.debug(">>execute: Send Mail on 'closed'");
- createMessageQueue("pgm-closed-queue");
-
try (Producer prod = createMessageQueueProducer()) {
prod.sendMessageAsJson(model.getGridMeasure(), "closed");
} catch (Exception e) {
diff --git a/src/main/java/org/eclipse/openk/core/bpmn/gridmeasure/tasks/ServiceMeasureFinished.java b/src/main/java/org/eclipse/openk/core/bpmn/gridmeasure/tasks/ServiceMeasureFinished.java
index 46b6d89..2b3cdc8 100644
--- a/src/main/java/org/eclipse/openk/core/bpmn/gridmeasure/tasks/ServiceMeasureFinished.java
+++ b/src/main/java/org/eclipse/openk/core/bpmn/gridmeasure/tasks/ServiceMeasureFinished.java
@@ -1,14 +1,18 @@
/*
- ******************************************************************************
- * Copyright © 2018 PTA GmbH.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
*
- * http://www.eclipse.org/legal/epl-v10.html
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
*
- ******************************************************************************
- */
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
+*/
+
package org.eclipse.openk.core.bpmn.gridmeasure.tasks;
import javax.mail.MessagingException;
@@ -38,8 +42,6 @@
}
LOGGER.debug(">>execute: Send Mail on 'Beendet'");
- createMessageQueue("pgm-finished-queue");
-
try (Producer prod = createMessageQueueProducer()) {
prod.sendMessageAsJson(model.getGridMeasure(), "finished");
} catch (Exception e) {
diff --git a/src/main/java/org/eclipse/openk/core/bpmn/gridmeasure/tasks/ServiceMeasureForApproval.java b/src/main/java/org/eclipse/openk/core/bpmn/gridmeasure/tasks/ServiceMeasureForApproval.java
index 17600ac..8829014 100644
--- a/src/main/java/org/eclipse/openk/core/bpmn/gridmeasure/tasks/ServiceMeasureForApproval.java
+++ b/src/main/java/org/eclipse/openk/core/bpmn/gridmeasure/tasks/ServiceMeasureForApproval.java
@@ -1,14 +1,18 @@
/*
-******************************************************************************
-* Copyright © 2018 PTA GmbH.
-* All rights reserved. This program and the accompanying materials
-* are made available under the terms of the Eclipse Public License v1.0
-* which accompanies this distribution, and is available at
-*
-* http://www.eclipse.org/legal/epl-v10.html
-*
-******************************************************************************
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
+ *
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
*/
+
package org.eclipse.openk.core.bpmn.gridmeasure.tasks;
import org.apache.log4j.Logger;
@@ -27,8 +31,6 @@
@Override
protected void onLeaveStep(PlgmProcessSubject model) throws ProcessException {
- createMessageQueue("pgm-forapproval-queue");
-
try (Producer prod = createMessageQueueProducer()) {
prod.sendMessageAsJson(model.getGridMeasure(), "forapproval");
} catch (Exception e) {
diff --git a/src/main/java/org/eclipse/openk/core/bpmn/gridmeasure/tasks/ServiceMeasureRejected.java b/src/main/java/org/eclipse/openk/core/bpmn/gridmeasure/tasks/ServiceMeasureRejected.java
index a0c0b05..dd9c449 100644
--- a/src/main/java/org/eclipse/openk/core/bpmn/gridmeasure/tasks/ServiceMeasureRejected.java
+++ b/src/main/java/org/eclipse/openk/core/bpmn/gridmeasure/tasks/ServiceMeasureRejected.java
@@ -1,14 +1,18 @@
/*
-******************************************************************************
-* Copyright © 2018 PTA GmbH.
-* All rights reserved. This program and the accompanying materials
-* are made available under the terms of the Eclipse Public License v1.0
-* which accompanies this distribution, and is available at
-*
-* http://www.eclipse.org/legal/epl-v10.html
-*
-******************************************************************************
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
+ *
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
*/
+
package org.eclipse.openk.core.bpmn.gridmeasure.tasks;
import javax.mail.MessagingException;
@@ -43,8 +47,6 @@
}
LOGGER.debug(">>execute: Send Mail on 'zurückgewiesen'");
- createMessageQueue("pgm-rejected-queue");
-
try (Producer prod = createMessageQueueProducer()) {
prod.sendMessageAsJson(model.getGridMeasure(), "rejected");
} catch (Exception e) {
diff --git a/src/main/java/org/eclipse/openk/core/bpmn/gridmeasure/tasks/ServiceMeasureReleased.java b/src/main/java/org/eclipse/openk/core/bpmn/gridmeasure/tasks/ServiceMeasureReleased.java
index 6dffcd0..69ba1f8 100644
--- a/src/main/java/org/eclipse/openk/core/bpmn/gridmeasure/tasks/ServiceMeasureReleased.java
+++ b/src/main/java/org/eclipse/openk/core/bpmn/gridmeasure/tasks/ServiceMeasureReleased.java
@@ -1,14 +1,18 @@
/*
- ******************************************************************************
- * Copyright © 2018 PTA GmbH.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
*
- * http://www.eclipse.org/legal/epl-v10.html
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
*
- ******************************************************************************
- */
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
+*/
+
package org.eclipse.openk.core.bpmn.gridmeasure.tasks;
import javax.mail.MessagingException;
@@ -41,8 +45,6 @@
}
LOGGER.debug(">>execute: Send Mail on 'freigegeben'");
- createMessageQueue("pgm-released-queue");
-
try (Producer prod = createMessageQueueProducer()) {
prod.sendMessageAsJson(model.getGridMeasure(), "released");
} catch (Exception e) {
diff --git a/src/main/java/org/eclipse/openk/core/bpmn/gridmeasure/tasks/ServiceMeasureRequested.java b/src/main/java/org/eclipse/openk/core/bpmn/gridmeasure/tasks/ServiceMeasureRequested.java
index b2a15cd..b0fe3c1 100644
--- a/src/main/java/org/eclipse/openk/core/bpmn/gridmeasure/tasks/ServiceMeasureRequested.java
+++ b/src/main/java/org/eclipse/openk/core/bpmn/gridmeasure/tasks/ServiceMeasureRequested.java
@@ -1,14 +1,18 @@
/*
- ******************************************************************************
- * Copyright © 2018 PTA GmbH.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
*
- * http://www.eclipse.org/legal/epl-v10.html
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
*
- ******************************************************************************
- */
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
+*/
+
package org.eclipse.openk.core.bpmn.gridmeasure.tasks;
import javax.mail.MessagingException;
@@ -40,8 +44,6 @@
}
LOGGER.debug(">>execute: Send Mail on 'Angefordert'");
- createMessageQueue("pgm-requested-queue");
-
try (Producer prod = createMessageQueueProducer()) {
prod.sendMessageAsJson(model.getGridMeasure(), "requested");
} catch (Exception e) {
diff --git a/src/main/java/org/eclipse/openk/core/bpmn/gridmeasure/tasks/StoreStatusServiceTask.java b/src/main/java/org/eclipse/openk/core/bpmn/gridmeasure/tasks/StoreStatusServiceTask.java
index ff52524..9c0313d 100644
--- a/src/main/java/org/eclipse/openk/core/bpmn/gridmeasure/tasks/StoreStatusServiceTask.java
+++ b/src/main/java/org/eclipse/openk/core/bpmn/gridmeasure/tasks/StoreStatusServiceTask.java
@@ -1,14 +1,18 @@
/*
-******************************************************************************
-* Copyright © 2018 PTA GmbH.
-* All rights reserved. This program and the accompanying materials
-* are made available under the terms of the Eclipse Public License v1.0
-* which accompanies this distribution, and is available at
-*
-* http://www.eclipse.org/legal/epl-v10.html
-*
-******************************************************************************
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
+ *
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
*/
+
package org.eclipse.openk.core.bpmn.gridmeasure.tasks;
import org.apache.log4j.Logger;
diff --git a/src/main/java/org/eclipse/openk/core/bpmn/gridmeasure/tasks/UIStoreMeasureTask.java b/src/main/java/org/eclipse/openk/core/bpmn/gridmeasure/tasks/UIStoreMeasureTask.java
index 054288f..208d91c 100644
--- a/src/main/java/org/eclipse/openk/core/bpmn/gridmeasure/tasks/UIStoreMeasureTask.java
+++ b/src/main/java/org/eclipse/openk/core/bpmn/gridmeasure/tasks/UIStoreMeasureTask.java
@@ -1,14 +1,18 @@
/*
-******************************************************************************
-* Copyright © 2018 PTA GmbH.
-* All rights reserved. This program and the accompanying materials
-* are made available under the terms of the Eclipse Public License v1.0
-* which accompanies this distribution, and is available at
-*
-* http://www.eclipse.org/legal/epl-v10.html
-*
-******************************************************************************
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
+ *
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
*/
+
package org.eclipse.openk.core.bpmn.gridmeasure.tasks;
import org.apache.log4j.Logger;
diff --git a/src/main/java/org/eclipse/openk/core/bpmn/gridmeasure/tasks/util/GridMeasureStorageHelper.java b/src/main/java/org/eclipse/openk/core/bpmn/gridmeasure/tasks/util/GridMeasureStorageHelper.java
index 5482fcb..9156a8a 100644
--- a/src/main/java/org/eclipse/openk/core/bpmn/gridmeasure/tasks/util/GridMeasureStorageHelper.java
+++ b/src/main/java/org/eclipse/openk/core/bpmn/gridmeasure/tasks/util/GridMeasureStorageHelper.java
@@ -1,14 +1,18 @@
/*
- * ***************************************************************************
- * Copyright © 2018 PTA GmbH.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
*
- * http://www.eclipse.org/legal/epl-v10.html
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
*
- * ***************************************************************************
- */
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
+*/
+
package org.eclipse.openk.core.bpmn.gridmeasure.tasks.util;
import java.text.DateFormat;
@@ -252,7 +256,6 @@
tblGm.setIdDescriptive(getNextDescriptiveId(em, tblGm));
tblGm.setCreateDate(Date.from(Instant.now()));
tblGm.setCreateUser(tblGm.getModUser());
- tblGm.setCreateUserDepartment(tblGm.getModUserDepartment());
return updateMeasureInDb(tblGm, gmDao);
}
diff --git a/src/main/java/org/eclipse/openk/core/communication/RestServiceWrapper.java b/src/main/java/org/eclipse/openk/core/communication/RestServiceWrapper.java
index c9a8de6..6a63946 100644
--- a/src/main/java/org/eclipse/openk/core/communication/RestServiceWrapper.java
+++ b/src/main/java/org/eclipse/openk/core/communication/RestServiceWrapper.java
@@ -1,14 +1,18 @@
/*
-******************************************************************************
-* Copyright © 2018 PTA GmbH.
-* All rights reserved. This program and the accompanying materials
-* are made available under the terms of the Eclipse Public License v1.0
-* which accompanies this distribution, and is available at
-*
-* http://www.eclipse.org/legal/epl-v10.html
-*
-******************************************************************************
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
+ *
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
*/
+
package org.eclipse.openk.core.communication;
import java.io.IOException;
diff --git a/src/main/java/org/eclipse/openk/core/controller/BackendConfig.java b/src/main/java/org/eclipse/openk/core/controller/BackendConfig.java
index 0ca2693..0ba7714 100644
--- a/src/main/java/org/eclipse/openk/core/controller/BackendConfig.java
+++ b/src/main/java/org/eclipse/openk/core/controller/BackendConfig.java
@@ -1,14 +1,18 @@
/*
- * ***************************************************************************
- * Copyright © 2018 PTA GmbH.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
*
- * http://www.eclipse.org/legal/epl-v10.html
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
*
- * ***************************************************************************
- */
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
+*/
+
package org.eclipse.openk.core.controller;
import static org.eclipse.openk.common.JsonGeneratorBase.getGson;
diff --git a/src/main/java/org/eclipse/openk/core/controller/BaseWebService.java b/src/main/java/org/eclipse/openk/core/controller/BaseWebService.java
index cda16a0..620d2e6 100644
--- a/src/main/java/org/eclipse/openk/core/controller/BaseWebService.java
+++ b/src/main/java/org/eclipse/openk/core/controller/BaseWebService.java
@@ -1,14 +1,18 @@
/*
-******************************************************************************
-* Copyright © 2018 PTA GmbH.
-* All rights reserved. This program and the accompanying materials
-* are made available under the terms of the Eclipse Public License v1.0
-* which accompanies this distribution, and is available at
-*
-* http://www.eclipse.org/legal/epl-v10.html
-*
-******************************************************************************
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
+ *
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
*/
+
package org.eclipse.openk.core.controller;
import java.io.IOException;
diff --git a/src/main/java/org/eclipse/openk/core/controller/EmailManager.java b/src/main/java/org/eclipse/openk/core/controller/EmailManager.java
index 58e4f0c..08d79c7 100644
--- a/src/main/java/org/eclipse/openk/core/controller/EmailManager.java
+++ b/src/main/java/org/eclipse/openk/core/controller/EmailManager.java
@@ -1,14 +1,18 @@
/*
- * *****************************************************************************
- * Copyright © 2018 PTA GmbH.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
*
- * http://www.eclipse.org/legal/epl-v10.html
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
*
- * *****************************************************************************
- */
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
+*/
+
package org.eclipse.openk.core.controller;
diff --git a/src/main/java/org/eclipse/openk/core/controller/GridConfigButtonManipulator.java b/src/main/java/org/eclipse/openk/core/controller/GridConfigButtonManipulator.java
index 479e46f..3b9d6b3 100644
--- a/src/main/java/org/eclipse/openk/core/controller/GridConfigButtonManipulator.java
+++ b/src/main/java/org/eclipse/openk/core/controller/GridConfigButtonManipulator.java
@@ -1,14 +1,18 @@
/*
- * ***************************************************************************
- * Copyright © 2018 PTA GmbH.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
*
- * http://www.eclipse.org/legal/epl-v10.html
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
*
- * ***************************************************************************
- */
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
+*/
+
package org.eclipse.openk.core.controller;
import org.apache.log4j.Logger;
diff --git a/src/main/java/org/eclipse/openk/core/controller/GridMeasureBackendController.java b/src/main/java/org/eclipse/openk/core/controller/GridMeasureBackendController.java
index db422f9..70de9ca 100644
--- a/src/main/java/org/eclipse/openk/core/controller/GridMeasureBackendController.java
+++ b/src/main/java/org/eclipse/openk/core/controller/GridMeasureBackendController.java
@@ -1,27 +1,24 @@
/*
- * ***************************************************************************
- * Copyright © 2018 PTA GmbH.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
*
- * http://www.eclipse.org/legal/epl-v10.html
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
*
- * ***************************************************************************
- */
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
+*/
+
package org.eclipse.openk.core.controller;
import org.apache.commons.codec.binary.Base64;
import org.apache.log4j.Logger;
import org.eclipse.jetty.http.HttpStatus;
-import org.eclipse.openk.api.BackendSettings;
-import org.eclipse.openk.api.Document;
-import org.eclipse.openk.api.FilterObject;
-import org.eclipse.openk.api.GridMeasure;
-import org.eclipse.openk.api.HGridMeasure;
-import org.eclipse.openk.api.Lock;
-import org.eclipse.openk.api.RoleAccessDefinitionApi;
-import org.eclipse.openk.api.VersionInfo;
+import org.eclipse.openk.api.*;
import org.eclipse.openk.common.mapper.GridMeasureMapper;
import org.eclipse.openk.common.mapper.generic.GenericApiToDbMapper;
import org.eclipse.openk.common.util.DateUtils;
@@ -41,13 +38,7 @@
import org.eclipse.openk.db.dao.TblMeasureDocumentsDao;
import org.eclipse.openk.db.dao.TblSingleGridmeasureDao;
import org.eclipse.openk.db.dao.TblStepsDao;
-import org.eclipse.openk.db.model.HTblGridMeasure;
-import org.eclipse.openk.db.model.RefVersion;
-import org.eclipse.openk.db.model.TblDocuments;
-import org.eclipse.openk.db.model.TblGridMeasure;
-import org.eclipse.openk.db.model.TblLock;
-import org.eclipse.openk.db.model.TblMeasureDocuments;
-import org.eclipse.openk.db.model.TblSingleGridmeasure;
+import org.eclipse.openk.db.model.*;
import javax.persistence.EntityManager;
import java.time.Instant;
@@ -765,7 +756,6 @@
}
public List<String> getResponsiblesOnSiteFromSingleGridmeasures(){
-
List<String> responsiblesOnSiteList = new ArrayList<>();
Set<String> responsiblesOnSiteUniqueSet = new HashSet<>();
@@ -779,6 +769,36 @@
return new ArrayList<>(responsiblesOnSiteUniqueSet);
}
+ public List<String> getUserDepartmentsCreated() {
+ List<String> userDepartmentsList = new ArrayList<>();
+ Set<String> userDepartmentsUniqueSet = new HashSet<>();
+
+ try (AutoCloseEntityManager em = createEm()) {
+ TblGridMeasureDao gmDao = createTblGridMeasureDao(em);
+ userDepartmentsList = gmDao.getUserDepartmentsCreated();
+ }
+
+ userDepartmentsUniqueSet.addAll(userDepartmentsList);
+ userDepartmentsUniqueSet.remove(null);
+ return new ArrayList<>(userDepartmentsUniqueSet);
+ }
+
+
+ public List<String> getUserDepartmentsModified() {
+ List<String> userDepartmentsList = new ArrayList<>();
+ Set<String> userDepartmentsUniqueSet = new HashSet<>();
+
+ try (AutoCloseEntityManager em = createEm()) {
+ TblGridMeasureDao gmDao = createTblGridMeasureDao(em);
+ userDepartmentsList = gmDao.getUserDepartmentsModified();
+ }
+
+ userDepartmentsUniqueSet.addAll(userDepartmentsList);
+ userDepartmentsUniqueSet.remove(null);
+ return new ArrayList<>(userDepartmentsUniqueSet);
+ }
+
+
public List<String> getNetworkControlsFromSingleGridmeasures(){
List<String> networkControlsList = new ArrayList<>();
Set<String> networkControlsUniqueSet = new HashSet<>();
@@ -793,6 +813,56 @@
return new ArrayList<>(networkControlsUniqueSet);
}
+ public List<Calender> getCalender() {
+
+ List<TblGridMeasure> mList;
+ List<TblSingleGridmeasure> sgmList;
+ List<Calender> calenderList = new ArrayList<>();
+
+ try (AutoCloseEntityManager em = createEm()) {
+ TblGridMeasureDao gmDao = createTblGridMeasureDao(em);
+ TblSingleGridmeasureDao sgmDao = createTblSingleGridmeasureDao(em);
+ mList = gmDao.getGridMeasuresExcludingStatusInTx(PlgmProcessState.CLOSED.getStatusValue(), PlgmProcessState.CANCELED.getStatusValue());
+
+ for (TblGridMeasure m : mList) {
+ sgmList = sgmDao.getSingleGridmeasuresByGmIdInTx(m.getId());
+
+ for (TblSingleGridmeasure sgm : sgmList) {
+
+ Calender calenderItem = new Calender();
+
+ calenderItem.setGridMeasureId(m.getId());
+ calenderItem.setGridMeasureTitle(m.getTitle());
+ calenderItem.setGridMeasureStatusId(m.getFkRefGmStatus());
+ calenderItem.setSingleGridMeasureId(sgm.getId());
+ calenderItem.setSingleGridMeasureTitle(sgm.getTitle());
+ calenderItem.setPlannedStarttimSinglemeasure(sgm.getPlannedStarttimeSinglemeasure());
+ calenderItem.setPlannedEndtimeSinglemeasure(sgm.getPlannedEndtimeSinglemeasure());
+
+ calenderList.add(calenderItem);
+ }
+ }
+ }
+ return calenderList;
+ }
+
+ public List<String> getUserDepartmentsResponsibleOnSite() {
+ List<String> userDepartmentsList = new ArrayList<>();
+ Set<String> userDepartmentsUniqueSet = new HashSet<>();
+
+
+ try (AutoCloseEntityManager em = createEm()) {
+ TblSingleGridmeasureDao sgmDao = createTblSingleGridmeasureDao(em);
+ userDepartmentsList = sgmDao.getUserDepartmentsResponsibleOnSite();
+ }
+
+ userDepartmentsUniqueSet.addAll(userDepartmentsList);
+ userDepartmentsUniqueSet.remove(null);
+ return new ArrayList<>(userDepartmentsUniqueSet);
+ }
+
+
+
protected TblSingleGridmeasureDao createTblSingleGridmeasureDao(EntityManager em) { return new TblSingleGridmeasureDao(em); }
protected TblGridMeasureDao createTblGridMeasureDao(EntityManager em) { return new TblGridMeasureDao(em); }
diff --git a/src/main/java/org/eclipse/openk/core/controller/InitMailAddressCacheJob.java b/src/main/java/org/eclipse/openk/core/controller/InitMailAddressCacheJob.java
index d5e6034..5cdcddc 100644
--- a/src/main/java/org/eclipse/openk/core/controller/InitMailAddressCacheJob.java
+++ b/src/main/java/org/eclipse/openk/core/controller/InitMailAddressCacheJob.java
@@ -1,14 +1,18 @@
/*
- * *****************************************************************************
- * Copyright © 2018 PTA GmbH.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
*
- * http://www.eclipse.org/legal/epl-v10.html
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
*
- * *****************************************************************************
- */
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
+*/
+
package org.eclipse.openk.core.controller;
diff --git a/src/main/java/org/eclipse/openk/core/controller/InitRabbitMqSetup.java b/src/main/java/org/eclipse/openk/core/controller/InitRabbitMqSetup.java
index 617ed31..0570d9b 100644
--- a/src/main/java/org/eclipse/openk/core/controller/InitRabbitMqSetup.java
+++ b/src/main/java/org/eclipse/openk/core/controller/InitRabbitMqSetup.java
@@ -1,14 +1,18 @@
/*
- * *****************************************************************************
- * Copyright © 2018 PTA GmbH.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
*
- * http://www.eclipse.org/legal/epl-v10.html
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
*
- * *****************************************************************************
- */
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
+*/
+
package org.eclipse.openk.core.controller;
@@ -17,48 +21,55 @@
import com.rabbitmq.client.Connection;
import com.rabbitmq.client.ConnectionFactory;
import java.io.IOException;
-import java.util.Arrays;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
-import java.util.Timer;
-import java.util.TimerTask;
import java.util.concurrent.TimeoutException;
import org.apache.log4j.Logger;
import org.eclipse.openk.PlannedGridMeasuresConfiguration.RabbitmqConfiguration;
-import org.eclipse.openk.common.Globals;
public class InitRabbitMqSetup {
private static final Logger LOGGER = Logger.getLogger(GridMeasureBackendController.class);
public void init() {
- LOGGER.debug("InitRabbitMqSetup called");
+ LOGGER.debug("InitRabbitMqSetup started");
RabbitmqConfiguration rabbitmqConfiguration = BackendConfig.getInstance().getRabbitmqConfiguration();
if (rabbitmqConfiguration == null) {
LOGGER.warn("InitRabbitMqSetup: No RabbitmqConfiguration found!");
return;
}
- if (!rabbitmqConfiguration.isAutoSetup()) {
- LOGGER.debug("InitRabbitMqSetup canceled > Autosetup is off");
- return;
- }
+
ConnectionFactory factory = createRabbitFactory(rabbitmqConfiguration);
try (Connection connection = factory.newConnection();
Channel channel = connection.createChannel()) {
+ String unroutedMessagesExchangeName = BackendConfig.getInstance().getRabbitmqConfiguration().getUnroutedMessagesExchangeName();
+ Map<String, Object> exchangeArgs = new HashMap<String, Object>();
+ exchangeArgs.put("alternate-exchange", unroutedMessagesExchangeName);
+ channel
+ .exchangeDeclare(BackendConfig.getInstance().getRabbitmqConfiguration().getExchangeName(),
+ BuiltinExchangeType.DIRECT, true, false, exchangeArgs);
+
+ String unroutedMessagesQueueName = BackendConfig.getInstance().getRabbitmqConfiguration().getUnroutedMessagesQueueName();
+
// durable = true
- channel.exchangeDeclare(rabbitmqConfiguration.getExchangeName(), BuiltinExchangeType.DIRECT, true);
+ channel.exchangeDeclare(unroutedMessagesExchangeName, BuiltinExchangeType.FANOUT, true);
+ channel.queueDeclare(unroutedMessagesQueueName, true, false, false, null);
+ channel.queueBind(unroutedMessagesQueueName, unroutedMessagesExchangeName, "");
Map<String, Object> args = new HashMap<>();
args.put("x-queue-mode", "lazy");
- for (String queueName : Globals.RABBIT_MQ_QUEUE_NAME_LIST) {
+ List<String> queueNames = rabbitmqConfiguration.getQueueNamesAsList();
+
+ for (String queueName : queueNames) {
channel.queueDeclare(queueName, true, false, false, args);
String routingKey = queueName.split("-")[1];
channel.queueBind(queueName, rabbitmqConfiguration.getExchangeName(), routingKey);
}
+ LOGGER.debug("InitRabbitMqSetup finished");
} catch (TimeoutException | IOException e) {
LOGGER.error("Error in InitRabbitMqSetup", e);
}
diff --git a/src/main/java/org/eclipse/openk/core/controller/MailAddressCache.java b/src/main/java/org/eclipse/openk/core/controller/MailAddressCache.java
index f9a0c95..b7cebc5 100644
--- a/src/main/java/org/eclipse/openk/core/controller/MailAddressCache.java
+++ b/src/main/java/org/eclipse/openk/core/controller/MailAddressCache.java
@@ -1,14 +1,18 @@
/*
- * *****************************************************************************
- * Copyright © 2018 PTA GmbH.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
*
- * http://www.eclipse.org/legal/epl-v10.html
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
*
- * *****************************************************************************
- */
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
+*/
+
package org.eclipse.openk.core.controller;
import java.util.ArrayList;
diff --git a/src/main/java/org/eclipse/openk/core/controller/MailAddressCacheTimerTask.java b/src/main/java/org/eclipse/openk/core/controller/MailAddressCacheTimerTask.java
index 394b8b5..e4ce2ee 100644
--- a/src/main/java/org/eclipse/openk/core/controller/MailAddressCacheTimerTask.java
+++ b/src/main/java/org/eclipse/openk/core/controller/MailAddressCacheTimerTask.java
@@ -1,14 +1,18 @@
/*
- * *****************************************************************************
- * Copyright © 2018 PTA GmbH.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
*
- * http://www.eclipse.org/legal/epl-v10.html
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
*
- * *****************************************************************************
- */
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
+*/
+
package org.eclipse.openk.core.controller;
@@ -70,4 +74,4 @@
protected TblGridMeasureDao createTblGridMeasureDao(EntityManager em) { return new TblGridMeasureDao(em); }
-}
\ No newline at end of file
+}
diff --git a/src/main/java/org/eclipse/openk/core/controller/MasterDataBackendController.java b/src/main/java/org/eclipse/openk/core/controller/MasterDataBackendController.java
index 9c53707..5eedc3e 100644
--- a/src/main/java/org/eclipse/openk/core/controller/MasterDataBackendController.java
+++ b/src/main/java/org/eclipse/openk/core/controller/MasterDataBackendController.java
@@ -1,14 +1,18 @@
/*
- ******************************************************************************
- * Copyright © 2018 PTA GmbH.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
*
- * http://www.eclipse.org/legal/epl-v10.html
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
*
- ******************************************************************************
- */
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
+*/
+
package org.eclipse.openk.core.controller;
import org.apache.log4j.Logger;
@@ -151,18 +155,7 @@
return vmList;
}
- public List<UserDepartment> getUserDepartments() {
- List<UserDepartment> vmList = new java.util.ArrayList<>();
- try (AutoCloseEntityManager em = createEm()) {
- RefUserDepartmentDao userDepartmentDao = createRefUserDepartmentDao(em);
-
- List<RefUserDepartment>mList = userDepartmentDao.getUserDepartmentsInTx();
- GenericApiToDbMapper mapper = new GenericApiToDbMapper();
- mList.forEach(m -> vmList.add(mapper.mapToViewModel(UserDepartment.class, m)));
- }
- return vmList;
- }
public List<Territory> getTerritories() {
List<Territory> vmList = new java.util.ArrayList<>();
@@ -248,8 +241,6 @@
return new RefCostCenterDao(em);
}
- protected RefUserDepartmentDao createRefUserDepartmentDao(EntityManager em) { return new RefUserDepartmentDao(em); }
-
protected RefTerritoryDao createRefTerritoryDao(EntityManager em) { return new RefTerritoryDao(em); }
protected TblUserSettingsDao createRefUserSettingsDao(EntityManager em) { return new TblUserSettingsDao(em); }
diff --git a/src/main/java/org/eclipse/openk/core/controller/PgmEmail.java b/src/main/java/org/eclipse/openk/core/controller/PgmEmail.java
index 7005ffc..c113100 100644
--- a/src/main/java/org/eclipse/openk/core/controller/PgmEmail.java
+++ b/src/main/java/org/eclipse/openk/core/controller/PgmEmail.java
@@ -1,14 +1,18 @@
/*
- * *****************************************************************************
- * Copyright © 2018 PTA GmbH.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
*
- * http://www.eclipse.org/legal/epl-v10.html
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
*
- * *****************************************************************************
- */
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
+*/
+
package org.eclipse.openk.core.controller;
@@ -72,11 +76,11 @@
contentReplaceMap.put("$plannedStarttimeFirstSinglemeasure$", formattedDate);
}
- Date plannedEndtimeLastSinglemeasure = currentGridMeasure.getPlannedEndtimeLastSinglemeasure();
- if(plannedEndtimeLastSinglemeasure != null) {
+ Date endtimeGridmeasure = currentGridMeasure.getEndtimeGridmeasure();
+ if(endtimeGridmeasure != null) {
DateFormat dfmt = new SimpleDateFormat(SUBJECT_DATE_PATTERN_APPLIED);
- String formattedDate = dfmt.format(plannedEndtimeLastSinglemeasure);
- contentReplaceMap.put("$plannedEndtimeLastSinglemeasure$", formattedDate);
+ String formattedDate = dfmt.format(endtimeGridmeasure);
+ contentReplaceMap.put("$endtimeGridmeasure$", formattedDate);
}
String remark = currentGridMeasure.getRemark();
diff --git a/src/main/java/org/eclipse/openk/core/controller/ResponseBuilderWrapper.java b/src/main/java/org/eclipse/openk/core/controller/ResponseBuilderWrapper.java
index 259b7ab..a885818 100644
--- a/src/main/java/org/eclipse/openk/core/controller/ResponseBuilderWrapper.java
+++ b/src/main/java/org/eclipse/openk/core/controller/ResponseBuilderWrapper.java
@@ -1,14 +1,18 @@
/*
-******************************************************************************
-* Copyright © 2018 PTA GmbH.
-* All rights reserved. This program and the accompanying materials
-* are made available under the terms of the Eclipse Public License v1.0
-* which accompanies this distribution, and is available at
-*
-* http://www.eclipse.org/legal/epl-v10.html
-*
-******************************************************************************
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
+ *
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
*/
+
package org.eclipse.openk.core.controller;
import java.io.UnsupportedEncodingException;
diff --git a/src/main/java/org/eclipse/openk/core/controller/RoleAccessDefinitions.java b/src/main/java/org/eclipse/openk/core/controller/RoleAccessDefinitions.java
index f64a556..c585dcf 100644
--- a/src/main/java/org/eclipse/openk/core/controller/RoleAccessDefinitions.java
+++ b/src/main/java/org/eclipse/openk/core/controller/RoleAccessDefinitions.java
@@ -1,14 +1,18 @@
/*
- * ***************************************************************************
- * Copyright © 2018 PTA GmbH.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
*
- * http://www.eclipse.org/legal/epl-v10.html
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
*
- * ***************************************************************************
- */
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
+*/
+
package org.eclipse.openk.core.controller;
import org.eclipse.openk.api.RoleAccessDefinitionApi;
diff --git a/src/main/java/org/eclipse/openk/core/controller/TokenManager.java b/src/main/java/org/eclipse/openk/core/controller/TokenManager.java
index a8dc950..f795c99 100644
--- a/src/main/java/org/eclipse/openk/core/controller/TokenManager.java
+++ b/src/main/java/org/eclipse/openk/core/controller/TokenManager.java
@@ -1,14 +1,18 @@
/*
-******************************************************************************
-* Copyright © 2018 PTA GmbH.
-* All rights reserved. This program and the accompanying materials
-* are made available under the terms of the Eclipse Public License v1.0
-* which accompanies this distribution, and is available at
-*
-* http://www.eclipse.org/legal/epl-v10.html
-*
-******************************************************************************
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
+ *
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
*/
+
package org.eclipse.openk.core.controller;
diff --git a/src/main/java/org/eclipse/openk/core/exceptions/HttpStatusException.java b/src/main/java/org/eclipse/openk/core/exceptions/HttpStatusException.java
index 0ecdf6c..3d449e5 100644
--- a/src/main/java/org/eclipse/openk/core/exceptions/HttpStatusException.java
+++ b/src/main/java/org/eclipse/openk/core/exceptions/HttpStatusException.java
@@ -1,14 +1,18 @@
-/**
-******************************************************************************
-* Copyright © 2018 PTA GmbH.
-* All rights reserved. This program and the accompanying materials
-* are made available under the terms of the Eclipse Public License v1.0
-* which accompanies this distribution, and is available at
-*
-* http://www.eclipse.org/legal/epl-v10.html
-*
-******************************************************************************
+/*
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
+ *
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
*/
+
package org.eclipse.openk.core.exceptions;
public class HttpStatusException extends Exception {
diff --git a/src/main/java/org/eclipse/openk/core/exceptions/PgmExceptionMapper.java b/src/main/java/org/eclipse/openk/core/exceptions/PgmExceptionMapper.java
index 8e73092..043f44c 100644
--- a/src/main/java/org/eclipse/openk/core/exceptions/PgmExceptionMapper.java
+++ b/src/main/java/org/eclipse/openk/core/exceptions/PgmExceptionMapper.java
@@ -1,14 +1,18 @@
/*
-******************************************************************************
-* Copyright © 2018 PTA GmbH.
-* All rights reserved. This program and the accompanying materials
-* are made available under the terms of the Eclipse Public License v1.0
-* which accompanies this distribution, and is available at
-*
-* http://www.eclipse.org/legal/epl-v10.html
-*
-******************************************************************************
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
+ *
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
*/
+
package org.eclipse.openk.core.exceptions;
import org.apache.http.HttpStatus;
diff --git a/src/main/java/org/eclipse/openk/core/exceptions/PgmNestedException.java b/src/main/java/org/eclipse/openk/core/exceptions/PgmNestedException.java
index 00ad0cd..7aab13f 100644
--- a/src/main/java/org/eclipse/openk/core/exceptions/PgmNestedException.java
+++ b/src/main/java/org/eclipse/openk/core/exceptions/PgmNestedException.java
@@ -1,14 +1,18 @@
/*
-******************************************************************************
-* Copyright © 2018 PTA GmbH.
-* All rights reserved. This program and the accompanying materials
-* are made available under the terms of the Eclipse Public License v1.0
-* which accompanies this distribution, and is available at
-*
-* http://www.eclipse.org/legal/epl-v10.html
-*
-******************************************************************************
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
+ *
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
*/
+
package org.eclipse.openk.core.exceptions;
import org.eclipse.openk.core.viewmodel.ErrorReturn;
diff --git a/src/main/java/org/eclipse/openk/core/messagebroker/MessageBroker.java b/src/main/java/org/eclipse/openk/core/messagebroker/MessageBroker.java
index 64c3f44..a1c6d0b 100644
--- a/src/main/java/org/eclipse/openk/core/messagebroker/MessageBroker.java
+++ b/src/main/java/org/eclipse/openk/core/messagebroker/MessageBroker.java
@@ -1,14 +1,18 @@
/*
- * *****************************************************************************
- * Copyright © 2018 PTA GmbH.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
*
- * http://www.eclipse.org/legal/epl-v10.html
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
*
- * *****************************************************************************
- */
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
+*/
+
package org.eclipse.openk.core.messagebroker;
diff --git a/src/main/java/org/eclipse/openk/core/messagebroker/Producer.java b/src/main/java/org/eclipse/openk/core/messagebroker/Producer.java
index 173ba58..5f0a045 100644
--- a/src/main/java/org/eclipse/openk/core/messagebroker/Producer.java
+++ b/src/main/java/org/eclipse/openk/core/messagebroker/Producer.java
@@ -1,20 +1,29 @@
/*
- * *****************************************************************************
- * Copyright © 2018 PTA GmbH.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
*
- * http://www.eclipse.org/legal/epl-v10.html
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
*
- * *****************************************************************************
- */
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
+*/
+
package org.eclipse.openk.core.messagebroker;
import com.rabbitmq.client.AMQP.BasicProperties;
import com.rabbitmq.client.AMQP.BasicProperties.Builder;
+import com.rabbitmq.client.BuiltinExchangeType;
import java.io.IOException;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.Optional;
import org.apache.log4j.Logger;
import org.eclipse.openk.api.GridMeasure;
import org.eclipse.openk.common.JsonGeneratorBase;
@@ -28,20 +37,50 @@
private final String exchangeName;
public Producer() throws ProcessException {
- this.exchangeName = BackendConfig.getInstance().getRabbitmqConfiguration().getExchangeName();
+ this.exchangeName = BackendConfig.getInstance().getRabbitmqConfiguration().getExchangeName();
}
public void sendMessageAsJson(GridMeasure gridMeasure, String routingKey) throws ProcessException {
BasicProperties basicProperties = new Builder().contentType("application/json").deliveryMode(2).priority(0).build();
String jsonString = JsonGeneratorBase.getGson().toJson(createPayload(gridMeasure));
try {
- channel.basicPublish(exchangeName,routingKey, basicProperties, jsonString.getBytes("UTF-8"));
+
+ createExchangeIfNotExists();
+ createQueueIfNotExists(routingKey);
+ channel.basicPublish(exchangeName, routingKey, basicProperties, jsonString.getBytes("UTF-8"));
} catch (IOException e) {
LOGGER.error("Error in sendMessageAsJson (RabbitMQ)", e);
throw new ProcessException("Error in sendMessageAsJson (RabbitMQ)");
}
}
+ private void createExchangeIfNotExists() throws IOException {
+ String unroutedMessagesExchangeName = BackendConfig.getInstance().getRabbitmqConfiguration().getUnroutedMessagesExchangeName();
+ Map<String, Object> exchangeArgs = new HashMap<String, Object>();
+ exchangeArgs.put("alternate-exchange", unroutedMessagesExchangeName);
+ channel
+ .exchangeDeclare(BackendConfig.getInstance().getRabbitmqConfiguration().getExchangeName(),
+ BuiltinExchangeType.DIRECT, true, false, exchangeArgs);
+
+ String unroutedMessagesQueueName = BackendConfig.getInstance().getRabbitmqConfiguration().getUnroutedMessagesQueueName();
+ // durable = true
+ channel.exchangeDeclare(unroutedMessagesExchangeName, BuiltinExchangeType.FANOUT, true);
+ channel.queueDeclare(unroutedMessagesQueueName, true, false, false, null);
+ channel.queueBind(unroutedMessagesQueueName, unroutedMessagesExchangeName, "");
+ }
+
+ private void createQueueIfNotExists(String routingKey) throws IOException {
+ List<String> queueNamesAsList = BackendConfig.getInstance().getRabbitmqConfiguration().getQueueNamesAsList();
+ Optional<String> optionalQueuename = queueNamesAsList.stream().filter(it -> it.contains("-" + routingKey)).findFirst();
+ if (optionalQueuename.isPresent()) {
+ String queueName = optionalQueuename.get();
+ Map<String, Object> args = new HashMap<>();
+ args.put("x-queue-mode", "lazy");
+ channel.queueDeclare(queueName, true, false, false, args);
+ channel.queueBind(queueName, exchangeName, routingKey);
+ }
+ }
+
public void sendMessageAsString(String message, String routingKey) throws ProcessException {
BasicProperties basicProperties = new Builder().contentType("text/plain").deliveryMode(2).priority(0).build();
try {
@@ -57,7 +96,6 @@
payload.setTitle(originalGm.getTitle());
payload.setId(originalGm.getId());
payload.setPlannedStarttimeFirstSinglemeasure(originalGm.getPlannedStarttimeFirstSinglemeasure());
- payload.setPlannedEndtimeLastSinglemeasure(originalGm.getPlannedEndtimeLastSinglemeasure());
payload.setSwitchingObject(originalGm.getSwitchingObject());
payload.setAffectedResource(originalGm.getAffectedResource());
return payload;
diff --git a/src/main/java/org/eclipse/openk/core/viewmodel/ErrorReturn.java b/src/main/java/org/eclipse/openk/core/viewmodel/ErrorReturn.java
index 021407b..7e71745 100644
--- a/src/main/java/org/eclipse/openk/core/viewmodel/ErrorReturn.java
+++ b/src/main/java/org/eclipse/openk/core/viewmodel/ErrorReturn.java
@@ -1,14 +1,18 @@
/*
-******************************************************************************
-* Copyright © 2018 PTA GmbH.
-* All rights reserved. This program and the accompanying materials
-* are made available under the terms of the Eclipse Public License v1.0
-* which accompanies this distribution, and is available at
-*
-* http://www.eclipse.org/legal/epl-v10.html
-*
-******************************************************************************
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
+ *
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
*/
+
package org.eclipse.openk.core.viewmodel;
import java.io.Serializable;
diff --git a/src/main/java/org/eclipse/openk/core/viewmodel/GeneralReturnItem.java b/src/main/java/org/eclipse/openk/core/viewmodel/GeneralReturnItem.java
index c3480a7..f12f253 100644
--- a/src/main/java/org/eclipse/openk/core/viewmodel/GeneralReturnItem.java
+++ b/src/main/java/org/eclipse/openk/core/viewmodel/GeneralReturnItem.java
@@ -1,14 +1,18 @@
/*
-******************************************************************************
-* Copyright © 2018 PTA GmbH.
-* All rights reserved. This program and the accompanying materials
-* are made available under the terms of the Eclipse Public License v1.0
-* which accompanies this distribution, and is available at
-*
-* http://www.eclipse.org/legal/epl-v10.html
-*
-******************************************************************************
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
+ *
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
*/
+
package org.eclipse.openk.core.viewmodel;
diff --git a/src/main/java/org/eclipse/openk/db/dao/AutoCloseEntityManager.java b/src/main/java/org/eclipse/openk/db/dao/AutoCloseEntityManager.java
index ee158a9..0af674d 100644
--- a/src/main/java/org/eclipse/openk/db/dao/AutoCloseEntityManager.java
+++ b/src/main/java/org/eclipse/openk/db/dao/AutoCloseEntityManager.java
@@ -1,14 +1,18 @@
-/**
-******************************************************************************
-* Copyright © 2018 PTA GmbH.
-* All rights reserved. This program and the accompanying materials
-* are made available under the terms of the Eclipse Public License v1.0
-* which accompanies this distribution, and is available at
-*
-* http://www.eclipse.org/legal/epl-v10.html
-*
-******************************************************************************
+/*
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
+ *
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
*/
+
package org.eclipse.openk.db.dao;
import java.util.List;
diff --git a/src/main/java/org/eclipse/openk/db/dao/EntityHelper.java b/src/main/java/org/eclipse/openk/db/dao/EntityHelper.java
index 7771061..0ae5546 100644
--- a/src/main/java/org/eclipse/openk/db/dao/EntityHelper.java
+++ b/src/main/java/org/eclipse/openk/db/dao/EntityHelper.java
@@ -1,14 +1,18 @@
-/**
-******************************************************************************
-* Copyright © 2018 PTA GmbH.
-* All rights reserved. This program and the accompanying materials
-* are made available under the terms of the Eclipse Public License v1.0
-* which accompanies this distribution, and is available at
-*
-* http://www.eclipse.org/legal/epl-v10.html
-*
-******************************************************************************
+/*
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
+ *
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
*/
+
package org.eclipse.openk.db.dao;
import java.util.Map;
diff --git a/src/main/java/org/eclipse/openk/db/dao/GenericDaoJpa.java b/src/main/java/org/eclipse/openk/db/dao/GenericDaoJpa.java
index 81d01b6..9fe1353 100644
--- a/src/main/java/org/eclipse/openk/db/dao/GenericDaoJpa.java
+++ b/src/main/java/org/eclipse/openk/db/dao/GenericDaoJpa.java
@@ -1,16 +1,18 @@
/*
-******************************************************************************
-* Copyright © 2018 PTA GmbH.
-* All rights reserved. This program and the accompanying materials
-* are made available under the terms of the Eclipse Public License v1.0
-* which accompanies this distribution, and is available at
-*
-* http://www.eclipse.org/legal/epl-v10.html
-*
-******************************************************************************
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
+ *
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
*/
-
package org.eclipse.openk.db.dao;
import java.io.Serializable;
diff --git a/src/main/java/org/eclipse/openk/db/dao/HTblGridMeasureDao.java b/src/main/java/org/eclipse/openk/db/dao/HTblGridMeasureDao.java
index 19ac929..842b5e8 100644
--- a/src/main/java/org/eclipse/openk/db/dao/HTblGridMeasureDao.java
+++ b/src/main/java/org/eclipse/openk/db/dao/HTblGridMeasureDao.java
@@ -1,14 +1,18 @@
/*
- * ***************************************************************************
- * Copyright © 2018 PTA GmbH.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
*
- * http://www.eclipse.org/legal/epl-v10.html
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
*
- * ***************************************************************************
- */
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
+*/
+
package org.eclipse.openk.db.dao;
import org.eclipse.openk.db.model.HTblGridMeasure;
@@ -39,4 +43,4 @@
}
}
-}
\ No newline at end of file
+}
diff --git a/src/main/java/org/eclipse/openk/db/dao/RefBranchDao.java b/src/main/java/org/eclipse/openk/db/dao/RefBranchDao.java
index c198058..969beb3 100644
--- a/src/main/java/org/eclipse/openk/db/dao/RefBranchDao.java
+++ b/src/main/java/org/eclipse/openk/db/dao/RefBranchDao.java
@@ -1,14 +1,18 @@
-/**
- ******************************************************************************
- * Copyright © 2018 PTA GmbH.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
+/*
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
*
- * http://www.eclipse.org/legal/epl-v10.html
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
*
- ******************************************************************************
- */
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
+*/
+
package org.eclipse.openk.db.dao;
import org.eclipse.openk.db.model.RefBranch;
diff --git a/src/main/java/org/eclipse/openk/db/dao/RefBranchLevelDao.java b/src/main/java/org/eclipse/openk/db/dao/RefBranchLevelDao.java
index bb53751..1903ba0 100644
--- a/src/main/java/org/eclipse/openk/db/dao/RefBranchLevelDao.java
+++ b/src/main/java/org/eclipse/openk/db/dao/RefBranchLevelDao.java
@@ -1,14 +1,18 @@
-/**
- ******************************************************************************
- * Copyright © 2018 PTA GmbH.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
+/*
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
*
- * http://www.eclipse.org/legal/epl-v10.html
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
*
- ******************************************************************************
- */
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
+*/
+
package org.eclipse.openk.db.dao;
import org.eclipse.openk.db.model.RefBranchLevel;
@@ -48,4 +52,4 @@
return null; // NOSONAR We decide to use null logic
}
}
-}
\ No newline at end of file
+}
diff --git a/src/main/java/org/eclipse/openk/db/dao/RefCostCenterDao.java b/src/main/java/org/eclipse/openk/db/dao/RefCostCenterDao.java
index 6d37abe..f6fe72d 100644
--- a/src/main/java/org/eclipse/openk/db/dao/RefCostCenterDao.java
+++ b/src/main/java/org/eclipse/openk/db/dao/RefCostCenterDao.java
@@ -1,14 +1,18 @@
-/**
- ******************************************************************************
- * Copyright © 2018 PTA GmbH.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
+/*
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
*
- * http://www.eclipse.org/legal/epl-v10.html
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
*
- ******************************************************************************
- */
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
+*/
+
package org.eclipse.openk.db.dao;
import org.eclipse.openk.db.model.RefCostCenter;
diff --git a/src/main/java/org/eclipse/openk/db/dao/RefGmStatusDao.java b/src/main/java/org/eclipse/openk/db/dao/RefGmStatusDao.java
index a3da06e..b43e93b 100644
--- a/src/main/java/org/eclipse/openk/db/dao/RefGmStatusDao.java
+++ b/src/main/java/org/eclipse/openk/db/dao/RefGmStatusDao.java
@@ -1,14 +1,18 @@
-/**
- ******************************************************************************
- * Copyright © 2018 PTA GmbH.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
+/*
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
*
- * http://www.eclipse.org/legal/epl-v10.html
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
*
- ******************************************************************************
- */
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
+*/
+
package org.eclipse.openk.db.dao;
import org.eclipse.openk.db.model.RefGmStatus;
@@ -36,4 +40,4 @@
return null; // NOSONAR We decide to use null logic
}
}
-}
\ No newline at end of file
+}
diff --git a/src/main/java/org/eclipse/openk/db/dao/RefTerritoryDao.java b/src/main/java/org/eclipse/openk/db/dao/RefTerritoryDao.java
index 71c3b0d..5fc726f 100644
--- a/src/main/java/org/eclipse/openk/db/dao/RefTerritoryDao.java
+++ b/src/main/java/org/eclipse/openk/db/dao/RefTerritoryDao.java
@@ -1,14 +1,18 @@
-/**
- ******************************************************************************
- * Copyright © 2018 PTA GmbH.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
+/*
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
*
- * http://www.eclipse.org/legal/epl-v10.html
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
*
- ******************************************************************************
- */
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
+*/
+
package org.eclipse.openk.db.dao;
import org.eclipse.openk.db.model.RefTerritory;
diff --git a/src/main/java/org/eclipse/openk/db/dao/RefUserDepartmentDao.java b/src/main/java/org/eclipse/openk/db/dao/RefUserDepartmentDao.java
deleted file mode 100644
index 697e1b9..0000000
--- a/src/main/java/org/eclipse/openk/db/dao/RefUserDepartmentDao.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/**
- ******************************************************************************
- * Copyright © 2018 PTA GmbH.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- *
- * http://www.eclipse.org/legal/epl-v10.html
- *
- ******************************************************************************
- */
-package org.eclipse.openk.db.dao;
-
-import org.eclipse.openk.db.model.RefUserDepartment;
-
-import javax.persistence.EntityManager;
-import javax.persistence.Query;
-import java.util.List;
-
-public class RefUserDepartmentDao extends GenericDaoJpa<RefUserDepartmentDao, Integer>{
- public RefUserDepartmentDao() {
- super();
- }
-
- public RefUserDepartmentDao(EntityManager em) {
- super(em);
- }
-
- public List<RefUserDepartment> getUserDepartmentsInTx() {
- try {
- String selectString = "from RefUserDepartment t";
- Query q = getEM().createQuery(selectString);
- return (List<RefUserDepartment>) q.getResultList();
- } catch (Exception t) {
- LOGGER.error(t.getMessage());
- return null; // NOSONAR We decide to use null logic
- }
- }
-}
diff --git a/src/main/java/org/eclipse/openk/db/dao/RefVersionDao.java b/src/main/java/org/eclipse/openk/db/dao/RefVersionDao.java
index 564ad9b..1e83e83 100644
--- a/src/main/java/org/eclipse/openk/db/dao/RefVersionDao.java
+++ b/src/main/java/org/eclipse/openk/db/dao/RefVersionDao.java
@@ -1,14 +1,18 @@
-/**
-******************************************************************************
-* Copyright © 2018 PTA GmbH.
-* All rights reserved. This program and the accompanying materials
-* are made available under the terms of the Eclipse Public License v1.0
-* which accompanies this distribution, and is available at
-*
-* http://www.eclipse.org/legal/epl-v10.html
-*
-******************************************************************************
+/*
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
+ *
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
*/
+
package org.eclipse.openk.db.dao;
import javax.persistence.EntityManager;
diff --git a/src/main/java/org/eclipse/openk/db/dao/TblDocumentsDao.java b/src/main/java/org/eclipse/openk/db/dao/TblDocumentsDao.java
index d746b4b..cc247f3 100644
--- a/src/main/java/org/eclipse/openk/db/dao/TblDocumentsDao.java
+++ b/src/main/java/org/eclipse/openk/db/dao/TblDocumentsDao.java
@@ -1,14 +1,18 @@
-/**
- ******************************************************************************
- * Copyright © 2018 PTA GmbH.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
+/*
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
*
- * http://www.eclipse.org/legal/epl-v10.html
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
*
- ******************************************************************************
- */
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
+*/
+
package org.eclipse.openk.db.dao;
import javax.persistence.EntityManager;
diff --git a/src/main/java/org/eclipse/openk/db/dao/TblGridMeasureDao.java b/src/main/java/org/eclipse/openk/db/dao/TblGridMeasureDao.java
index e01adcd..dd0d831 100644
--- a/src/main/java/org/eclipse/openk/db/dao/TblGridMeasureDao.java
+++ b/src/main/java/org/eclipse/openk/db/dao/TblGridMeasureDao.java
@@ -1,14 +1,18 @@
/*
- * ***************************************************************************
- * Copyright © 2018 PTA GmbH.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
*
- * http://www.eclipse.org/legal/epl-v10.html
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
*
- * ***************************************************************************
- */
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
+*/
+
package org.eclipse.openk.db.dao;
import org.eclipse.openk.core.bpmn.gridmeasure.PlgmProcessState;
@@ -22,8 +26,6 @@
public class TblGridMeasureDao extends GenericDaoJpa<TblGridMeasure, Integer>{
public static final String FK_REF_GM_STATUS = "fkRefGmStatus";
- //public static final String MODIFIER_NAME = "modUser";
- //public static final String CREATOR_NAME = "createUser";
public TblGridMeasureDao() {
super();
@@ -144,7 +146,6 @@
public List<TblGridMeasure> getGridMeasuresByUserNameExcludingStatus(String username, Integer statusId1, Integer statusId2) {
try {
- //String selectString = "from TblGridMeasure t WHERE t.fkRefGmStatus NOT IN (:fkRefGmStatus1, :fkRefGmStatus2)";
String selectString = "from TblGridMeasure t where t.id IN (select distinct t.id from TblGridMeasure t INNER JOIN HTblGridMeasure h ON t.id = h.id WHERE h.hUser = :UserName) AND t.fkRefGmStatus NOT IN (:fkRefGmStatus1, :fkRefGmStatus2)";
Query q = getEM().createQuery(selectString);
q.setParameter("UserName", username);
@@ -158,6 +159,36 @@
}
}
+ public List<String> getUserDepartmentsCreated() {
+ List<String> retList = new ArrayList<>();
+ try {
+ String selectString = "select t.createUserDepartment from TblGridMeasure t";
+ Query q = getEM().createQuery(selectString);
+
+ return (List<String>)q.getResultList();
+
+ } catch (Exception t) {
+ LOGGER.error(t.getMessage());
+ }
+ return retList;
+ }
+
+ public List<String> getUserDepartmentsModified() {
+ List<String> retList = new ArrayList<>();
+ try {
+ String selectString = "select t.modUserDepartment from TblGridMeasure t";
+ Query q = getEM().createQuery(selectString);
+
+ return (List<String>)q.getResultList();
+
+ } catch (Exception t) {
+ LOGGER.error(t.getMessage());
+ }
+ return retList;
+ }
-}
\ No newline at end of file
+
+
+
+}
diff --git a/src/main/java/org/eclipse/openk/db/dao/TblIdCounterDao.java b/src/main/java/org/eclipse/openk/db/dao/TblIdCounterDao.java
index 49e0d66..8a7d6ff 100644
--- a/src/main/java/org/eclipse/openk/db/dao/TblIdCounterDao.java
+++ b/src/main/java/org/eclipse/openk/db/dao/TblIdCounterDao.java
@@ -1,14 +1,18 @@
/*
- * *****************************************************************************
- * Copyright © 2018 PTA GmbH.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
*
- * http://www.eclipse.org/legal/epl-v10.html
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
*
- * *****************************************************************************
- */
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
+*/
+
package org.eclipse.openk.db.dao;
import java.util.List;
diff --git a/src/main/java/org/eclipse/openk/db/dao/TblLockDao.java b/src/main/java/org/eclipse/openk/db/dao/TblLockDao.java
index 7214bbe..9fcc569 100644
--- a/src/main/java/org/eclipse/openk/db/dao/TblLockDao.java
+++ b/src/main/java/org/eclipse/openk/db/dao/TblLockDao.java
@@ -1,14 +1,18 @@
-/**
- ******************************************************************************
- * Copyright © 2018 PTA GmbH.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
+/*
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
*
- * http://www.eclipse.org/legal/epl-v10.html
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
*
- ******************************************************************************
- */
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
+*/
+
package org.eclipse.openk.db.dao;
import org.eclipse.openk.db.model.TblLock;
diff --git a/src/main/java/org/eclipse/openk/db/dao/TblMeasureDocumentsDao.java b/src/main/java/org/eclipse/openk/db/dao/TblMeasureDocumentsDao.java
index deeb2f4..6e47f62 100644
--- a/src/main/java/org/eclipse/openk/db/dao/TblMeasureDocumentsDao.java
+++ b/src/main/java/org/eclipse/openk/db/dao/TblMeasureDocumentsDao.java
@@ -1,14 +1,18 @@
/*
- ******************************************************************************
- * Copyright © 2018 PTA GmbH.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
*
- * http://www.eclipse.org/legal/epl-v10.html
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
*
- ******************************************************************************
- */
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
+*/
+
package org.eclipse.openk.db.dao;
import org.apache.http.HttpStatus;
diff --git a/src/main/java/org/eclipse/openk/db/dao/TblSingleGridmeasureDao.java b/src/main/java/org/eclipse/openk/db/dao/TblSingleGridmeasureDao.java
index f5c6784..7c18d37 100644
--- a/src/main/java/org/eclipse/openk/db/dao/TblSingleGridmeasureDao.java
+++ b/src/main/java/org/eclipse/openk/db/dao/TblSingleGridmeasureDao.java
@@ -1,14 +1,18 @@
/*
- * ***************************************************************************
- * Copyright © 2018 PTA GmbH.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
*
- * http://www.eclipse.org/legal/epl-v10.html
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
*
- * ***************************************************************************
- */
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
+*/
+
package org.eclipse.openk.db.dao;
import org.eclipse.openk.db.model.TblSingleGridmeasure;
@@ -82,6 +86,19 @@
return retList;
}
+ public List<String> getUserDepartmentsResponsibleOnSite() {
+ List<String> retList = new ArrayList<>();
+ try {
+ String selectString = "select t.responsibleOnSiteDepartment from TblSingleGridmeasure t";
+ Query q = getEM().createQuery(selectString);
+
+ return (List<String>)q.getResultList();
+
+ } catch (Exception t) {
+ LOGGER.error(t.getMessage());
+ }
+ return retList;
+ }
}
diff --git a/src/main/java/org/eclipse/openk/db/dao/TblStepsDao.java b/src/main/java/org/eclipse/openk/db/dao/TblStepsDao.java
index 827da88..f6c86fa 100644
--- a/src/main/java/org/eclipse/openk/db/dao/TblStepsDao.java
+++ b/src/main/java/org/eclipse/openk/db/dao/TblStepsDao.java
@@ -1,14 +1,18 @@
/*
- * ***************************************************************************
- * Copyright © 2018 PTA GmbH.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
*
- * http://www.eclipse.org/legal/epl-v10.html
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
*
- * ***************************************************************************
- */
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
+*/
+
package org.eclipse.openk.db.dao;
import org.eclipse.openk.db.model.TblSteps;
diff --git a/src/main/java/org/eclipse/openk/db/dao/TblUserSettingsDao.java b/src/main/java/org/eclipse/openk/db/dao/TblUserSettingsDao.java
index 884e7f3..e4df0dc 100644
--- a/src/main/java/org/eclipse/openk/db/dao/TblUserSettingsDao.java
+++ b/src/main/java/org/eclipse/openk/db/dao/TblUserSettingsDao.java
@@ -1,14 +1,18 @@
/*
- ******************************************************************************
- * Copyright © 2018 PTA GmbH.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
*
- * http://www.eclipse.org/legal/epl-v10.html
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
*
- ******************************************************************************
- */
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
+*/
+
package org.eclipse.openk.db.dao;
import org.apache.http.HttpStatus;
diff --git a/src/main/java/org/eclipse/openk/db/dao/interfaces/IGenericDao.java b/src/main/java/org/eclipse/openk/db/dao/interfaces/IGenericDao.java
index 332f8d6..07900bc 100644
--- a/src/main/java/org/eclipse/openk/db/dao/interfaces/IGenericDao.java
+++ b/src/main/java/org/eclipse/openk/db/dao/interfaces/IGenericDao.java
@@ -1,14 +1,18 @@
-/**
-******************************************************************************
-* Copyright © 2018 PTA GmbH.
-* All rights reserved. This program and the accompanying materials
-* are made available under the terms of the Eclipse Public License v1.0
-* which accompanies this distribution, and is available at
-*
-* http://www.eclipse.org/legal/epl-v10.html
-*
-******************************************************************************
+/*
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
+ *
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
*/
+
package org.eclipse.openk.db.dao.interfaces;
import java.io.Serializable;
diff --git a/src/main/java/org/eclipse/openk/db/model/HTblGridMeasure.java b/src/main/java/org/eclipse/openk/db/model/HTblGridMeasure.java
index a47efdc..8318fd0 100644
--- a/src/main/java/org/eclipse/openk/db/model/HTblGridMeasure.java
+++ b/src/main/java/org/eclipse/openk/db/model/HTblGridMeasure.java
@@ -1,14 +1,18 @@
/*
- * ***************************************************************************
- * Copyright © 2018 PTA GmbH.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
*
- * http://www.eclipse.org/legal/epl-v10.html
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
*
- * ***************************************************************************
- */
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
+*/
+
package org.eclipse.openk.db.model;
import javax.persistence.Column;
@@ -86,27 +90,9 @@
@Column (name= "appointment_numberof")
private Integer appointmentNumberOf;
- @Column (name= "planned_starttime_first_sequence")
- private Date plannedStarttimeFirstSequence;
-
@Column (name= "planned_starttime_first_singlemeasure")
private Date plannedStarttimeFirstSinglemeasure;
- @Column (name= "planned_endtime_last_singlemeasure")
- private Date plannedEndtimeLastSinglemeasure;
-
- @Column (name= "planned_endtime_gridmeasure")
- private Date plannedEndtimeGridmeasure;
-
- @Column (name= "starttime_first_sequence")
- private Date starttimeFirstSequence;
-
- @Column (name= "starttime_first_singlemeasure")
- private Date starttimeFirstSinglemeasure;
-
- @Column (name= "endtime_last_singlemeasure")
- private Date endtimeLastSinglemeasure;
-
@Column (name= "endtime_gridmeasure")
private Date endtimeGridmeasure;
@@ -225,34 +211,10 @@
public void setAppointmentNumberOf(Integer appointmentNumberOf) { this.appointmentNumberOf = appointmentNumberOf; }
- public Date getPlannedStarttimeFirstSequence() { return plannedStarttimeFirstSequence; }
-
- public void setPlannedStarttimeFirstSequence(Date plannedStarttimeFirstSequence) { this.plannedStarttimeFirstSequence = plannedStarttimeFirstSequence; }
-
public Date getPlannedStarttimeFirstSinglemeasure() { return plannedStarttimeFirstSinglemeasure; }
public void setPlannedStarttimeFirstSinglemeasure(Date plannedStarttimeFirstSinglemeasure) { this.plannedStarttimeFirstSinglemeasure = plannedStarttimeFirstSinglemeasure; }
- public Date getPlannedEndtimeLastSinglemeasure() { return plannedEndtimeLastSinglemeasure; }
-
- public void setPlannedEndtimeLastSinglemeasure(Date plannedEndtimeLastSinglemeasure) { this.plannedEndtimeLastSinglemeasure = plannedEndtimeLastSinglemeasure; }
-
- public Date getPlannedEndtimeGridmeasure() { return plannedEndtimeGridmeasure; }
-
- public void setPlannedEndtimeGridmeasure(Date plannedEndtimeGridmeasure) { this.plannedEndtimeGridmeasure = plannedEndtimeGridmeasure; }
-
- public Date getStarttimeFirstSequence() { return starttimeFirstSequence; }
-
- public void setStarttimeFirstSequence(Date starttimeFirstSequence) { this.starttimeFirstSequence = starttimeFirstSequence; }
-
- public Date getStarttimeFirstSinglemeasure() { return starttimeFirstSinglemeasure; }
-
- public void setStarttimeFirstSinglemeasure(Date starttimeFirstSinglemeasure) { this.starttimeFirstSinglemeasure = starttimeFirstSinglemeasure; }
-
- public Date getEndtimeLastSinglemeasure() { return endtimeLastSinglemeasure; }
-
- public void setEndtimeLastSinglemeasure(Date endtimeLastSinglemeasure) { this.endtimeLastSinglemeasure = endtimeLastSinglemeasure; }
-
public Date getEndtimeGridmeasure() { return endtimeGridmeasure; }
public void setEndtimeGridmeasure(Date endtimeGridmeasure) { this.endtimeGridmeasure = endtimeGridmeasure; }
diff --git a/src/main/java/org/eclipse/openk/db/model/RefBranch.java b/src/main/java/org/eclipse/openk/db/model/RefBranch.java
index 7eb9d78..b5b87e9 100644
--- a/src/main/java/org/eclipse/openk/db/model/RefBranch.java
+++ b/src/main/java/org/eclipse/openk/db/model/RefBranch.java
@@ -1,14 +1,18 @@
-/**
- ******************************************************************************
- * Copyright © 2018 PTA GmbH.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
+/*
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
*
- * http://www.eclipse.org/legal/epl-v10.html
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
*
- ******************************************************************************
- */
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
+*/
+
package org.eclipse.openk.db.model;
import java.io.Serializable;
@@ -89,4 +93,4 @@
public Date getModDate() { return modDate; }
public void setModDate(Date modDate) { this.modDate = modDate; }
-}
\ No newline at end of file
+}
diff --git a/src/main/java/org/eclipse/openk/db/model/RefBranchLevel.java b/src/main/java/org/eclipse/openk/db/model/RefBranchLevel.java
index fe613d0..aa902a9 100644
--- a/src/main/java/org/eclipse/openk/db/model/RefBranchLevel.java
+++ b/src/main/java/org/eclipse/openk/db/model/RefBranchLevel.java
@@ -1,14 +1,18 @@
-/**
- ******************************************************************************
- * Copyright © 2018 PTA GmbH.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
+/*
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
*
- * http://www.eclipse.org/legal/epl-v10.html
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
*
- ******************************************************************************
- */
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
+*/
+
package org.eclipse.openk.db.model;
import java.io.Serializable;
diff --git a/src/main/java/org/eclipse/openk/db/model/RefCostCenter.java b/src/main/java/org/eclipse/openk/db/model/RefCostCenter.java
index 68fb572..7549fee 100644
--- a/src/main/java/org/eclipse/openk/db/model/RefCostCenter.java
+++ b/src/main/java/org/eclipse/openk/db/model/RefCostCenter.java
@@ -1,14 +1,18 @@
-/**
- ******************************************************************************
- * Copyright © 2018 PTA GmbH.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
+/*
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
*
- * http://www.eclipse.org/legal/epl-v10.html
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
*
- ******************************************************************************
- */
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
+*/
+
package org.eclipse.openk.db.model;
import java.io.Serializable;
diff --git a/src/main/java/org/eclipse/openk/db/model/RefGmStatus.java b/src/main/java/org/eclipse/openk/db/model/RefGmStatus.java
index e702d8b..b0fae81 100644
--- a/src/main/java/org/eclipse/openk/db/model/RefGmStatus.java
+++ b/src/main/java/org/eclipse/openk/db/model/RefGmStatus.java
@@ -1,14 +1,18 @@
-/**
- ******************************************************************************
- * Copyright © 2018 PTA GmbH.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
+/*
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
*
- * http://www.eclipse.org/legal/epl-v10.html
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
*
- ******************************************************************************
- */
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
+*/
+
package org.eclipse.openk.db.model;
import java.io.Serializable;
@@ -39,6 +43,9 @@
@Column(name = "name")
private String name;
+ @Column(name = "color_code")
+ private String colorCode;
+
@Column(name = "create_user")
private String createUser;
@@ -60,6 +67,10 @@
public void setName(String name) { this.name = name; }
+ public String getColorCode() { return colorCode; }
+
+ public void setColorCode(String colorCode) { this.colorCode = colorCode; }
+
public String getCreateUser() { return createUser; }
public void setCreateUser(String createUser) { this.createUser = createUser; }
@@ -75,4 +86,4 @@
public Date getModDate() { return modDate; }
public void setModDate(Date modDate) { this.modDate = modDate; }
-}
\ No newline at end of file
+}
diff --git a/src/main/java/org/eclipse/openk/db/model/RefTerritory.java b/src/main/java/org/eclipse/openk/db/model/RefTerritory.java
index c87b6da..2b6e0b9 100644
--- a/src/main/java/org/eclipse/openk/db/model/RefTerritory.java
+++ b/src/main/java/org/eclipse/openk/db/model/RefTerritory.java
@@ -1,14 +1,18 @@
-/**
- ******************************************************************************
- * Copyright © 2018 PTA GmbH.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
+/*
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
*
- * http://www.eclipse.org/legal/epl-v10.html
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
*
- ******************************************************************************
- */
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
+*/
+
package org.eclipse.openk.db.model;
import java.io.Serializable;
diff --git a/src/main/java/org/eclipse/openk/db/model/RefUserDepartment.java b/src/main/java/org/eclipse/openk/db/model/RefUserDepartment.java
deleted file mode 100644
index 87099c6..0000000
--- a/src/main/java/org/eclipse/openk/db/model/RefUserDepartment.java
+++ /dev/null
@@ -1,75 +0,0 @@
-/**
- ******************************************************************************
- * Copyright © 2018 PTA GmbH.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- *
- * http://www.eclipse.org/legal/epl-v10.html
- *
- ******************************************************************************
- */
-package org.eclipse.openk.db.model;
-
-import java.util.Date;
-import javax.persistence.Column;
-import javax.persistence.Entity;
-import javax.persistence.GeneratedValue;
-import javax.persistence.GenerationType;
-import javax.persistence.Id;
-import javax.persistence.NamedQuery;
-import javax.persistence.SequenceGenerator;
-import javax.persistence.Table;
-
-/**
- * The persistent class for the "REF_USER_DEPARTMENT database table.
- */
-@Entity
-@Table(name = "ref_user_department", schema = "public")
-@NamedQuery(name = "RefUserDepartment.findAll", query = "SELECT r FROM RefUserDepartment r")
-public class RefUserDepartment {
- @Id
- @GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "REF_USER_DEPARTMENT_ID_SEQ")
- @SequenceGenerator(name = "REF_USER_DEPARTMENT_ID_SEQ", sequenceName = "REF_USER_DEPARTMENT_ID_SEQ", allocationSize = 1)
- @Column(name = "id", updatable = false)
- private Integer id;
-
- @Column(name = "name")
- private String name;
-
- @Column(name = "create_user")
- private String createUser;
-
- @Column(name = "create_date")
- private Date createDate;
-
- @Column(name = "mod_user")
- private String modUser;
-
- @Column(name = "mod_date")
- private Date modDate;
-
- public Integer getId() { return id; }
-
- public void setId(Integer id) { this.id = id; }
-
- public String getName() { return name; }
-
- public void setName(String name) { this.name = name; }
-
- public String getCreateUser() { return createUser; }
-
- public void setCreateUser(String createUser) { this.createUser = createUser; }
-
- public Date getCreateDate() { return createDate; }
-
- public void setCreateDate(Date createDate) { this.createDate = createDate; }
-
- public String getModUser() { return modUser; }
-
- public void setModUser(String modUser) { this.modUser = modUser; }
-
- public Date getModDate() { return modDate; }
-
- public void setModDate(Date modDate) { this.modDate = modDate; }
-}
diff --git a/src/main/java/org/eclipse/openk/db/model/RefVersion.java b/src/main/java/org/eclipse/openk/db/model/RefVersion.java
index d58b13d..2d0b8c3 100644
--- a/src/main/java/org/eclipse/openk/db/model/RefVersion.java
+++ b/src/main/java/org/eclipse/openk/db/model/RefVersion.java
@@ -1,14 +1,18 @@
-/**
-******************************************************************************
-* Copyright © 2018 PTA GmbH.
-* All rights reserved. This program and the accompanying materials
-* are made available under the terms of the Eclipse Public License v1.0
-* which accompanies this distribution, and is available at
-*
-* http://www.eclipse.org/legal/epl-v10.html
-*
-******************************************************************************
+/*
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
+ *
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
*/
+
package org.eclipse.openk.db.model;
import java.io.Serializable;
@@ -54,4 +58,4 @@
this.version = version;
}
-}
\ No newline at end of file
+}
diff --git a/src/main/java/org/eclipse/openk/db/model/TblDocuments.java b/src/main/java/org/eclipse/openk/db/model/TblDocuments.java
index cbff55e..a9ce413 100644
--- a/src/main/java/org/eclipse/openk/db/model/TblDocuments.java
+++ b/src/main/java/org/eclipse/openk/db/model/TblDocuments.java
@@ -1,14 +1,18 @@
/*
- ******************************************************************************
- * Copyright © 2018 PTA GmbH.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
*
- * http://www.eclipse.org/legal/epl-v10.html
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
*
- ******************************************************************************
- */
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
+*/
+
package org.eclipse.openk.db.model;
import java.io.Serializable;
diff --git a/src/main/java/org/eclipse/openk/db/model/TblGridMeasure.java b/src/main/java/org/eclipse/openk/db/model/TblGridMeasure.java
index e2b21ae..9a95aa2 100644
--- a/src/main/java/org/eclipse/openk/db/model/TblGridMeasure.java
+++ b/src/main/java/org/eclipse/openk/db/model/TblGridMeasure.java
@@ -1,14 +1,18 @@
-/**
- ******************************************************************************
- * Copyright © 2018 PTA GmbH.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
+/*
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
*
- * http://www.eclipse.org/legal/epl-v10.html
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
*
- ******************************************************************************
- */
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
+*/
+
package org.eclipse.openk.db.model;
import java.io.Serializable;
@@ -70,27 +74,9 @@
@Column (name= "appointment_numberof")
private Integer appointmentNumberOf;
- @Column (name= "planned_starttime_first_sequence")
- private Date plannedStarttimeFirstSequence;
-
@Column (name= "planned_starttime_first_singlemeasure")
private Date plannedStarttimeFirstSinglemeasure;
- @Column (name= "planned_endtime_last_singlemeasure")
- private Date plannedEndtimeLastSinglemeasure;
-
- @Column (name= "planned_endtime_gridmeasure")
- private Date plannedEndtimeGridmeasure;
-
- @Column (name= "starttime_first_sequence")
- private Date starttimeFirstSequence;
-
- @Column (name= "starttime_first_singlemeasure")
- private Date starttimeFirstSinglemeasure;
-
- @Column (name= "endtime_last_singlemeasure")
- private Date endtimeLastSinglemeasure;
-
@Column (name= "endtime_gridmeasure")
private Date endtimeGridmeasure;
@@ -181,34 +167,10 @@
public void setAppointmentNumberOf(Integer appointmentNumberOf) { this.appointmentNumberOf = appointmentNumberOf; }
- public Date getPlannedStarttimeFirstSequence() { return plannedStarttimeFirstSequence; }
-
- public void setPlannedStarttimeFirstSequence(Date plannedStarttimeFirstSequence) { this.plannedStarttimeFirstSequence = plannedStarttimeFirstSequence; }
-
public Date getPlannedStarttimeFirstSinglemeasure() { return plannedStarttimeFirstSinglemeasure; }
public void setPlannedStarttimeFirstSinglemeasure(Date plannedStarttimeFirstSinglemeasure) { this.plannedStarttimeFirstSinglemeasure = plannedStarttimeFirstSinglemeasure; }
- public Date getPlannedEndtimeLastSinglemeasure() { return plannedEndtimeLastSinglemeasure; }
-
- public void setPlannedEndtimeLastSinglemeasure(Date plannedEndtimeLastSinglemeasure) { this.plannedEndtimeLastSinglemeasure = plannedEndtimeLastSinglemeasure; }
-
- public Date getPlannedEndtimeGridmeasure() { return plannedEndtimeGridmeasure; }
-
- public void setPlannedEndtimeGridmeasure(Date plannedEndtimeGridmeasure) { this.plannedEndtimeGridmeasure = plannedEndtimeGridmeasure; }
-
- public Date getStarttimeFirstSequence() { return starttimeFirstSequence; }
-
- public void setStarttimeFirstSequence(Date starttimeFirstSequence) { this.starttimeFirstSequence = starttimeFirstSequence; }
-
- public Date getStarttimeFirstSinglemeasure() { return starttimeFirstSinglemeasure; }
-
- public void setStarttimeFirstSinglemeasure(Date starttimeFirstSinglemeasure) { this.starttimeFirstSinglemeasure = starttimeFirstSinglemeasure; }
-
- public Date getEndtimeLastSinglemeasure() { return endtimeLastSinglemeasure; }
-
- public void setEndtimeLastSinglemeasure(Date endtimeLastSinglemeasure) { this.endtimeLastSinglemeasure = endtimeLastSinglemeasure; }
-
public Date getEndtimeGridmeasure() { return endtimeGridmeasure; }
public void setEndtimeGridmeasure(Date endtimeGridmeasure) { this.endtimeGridmeasure = endtimeGridmeasure; }
diff --git a/src/main/java/org/eclipse/openk/db/model/TblIdCounter.java b/src/main/java/org/eclipse/openk/db/model/TblIdCounter.java
index ec2858d..8561f72 100644
--- a/src/main/java/org/eclipse/openk/db/model/TblIdCounter.java
+++ b/src/main/java/org/eclipse/openk/db/model/TblIdCounter.java
@@ -1,14 +1,18 @@
/*
- * *****************************************************************************
- * Copyright © 2018 PTA GmbH.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
*
- * http://www.eclipse.org/legal/epl-v10.html
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
*
- * *****************************************************************************
- */
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
+*/
+
package org.eclipse.openk.db.model;
import java.io.Serializable;
diff --git a/src/main/java/org/eclipse/openk/db/model/TblLock.java b/src/main/java/org/eclipse/openk/db/model/TblLock.java
index bf13e73..048478f 100644
--- a/src/main/java/org/eclipse/openk/db/model/TblLock.java
+++ b/src/main/java/org/eclipse/openk/db/model/TblLock.java
@@ -1,14 +1,18 @@
-/**
- ******************************************************************************
- * Copyright © 2018 PTA GmbH.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
+/*
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
*
- * http://www.eclipse.org/legal/epl-v10.html
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
*
- ******************************************************************************
- */
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
+*/
+
package org.eclipse.openk.db.model;
import javax.persistence.*;
@@ -81,4 +85,4 @@
public Date getModDate() { return modDate; }
public void setModDate(Date modDate) { this.modDate = modDate; }
-}
\ No newline at end of file
+}
diff --git a/src/main/java/org/eclipse/openk/db/model/TblMeasureDocuments.java b/src/main/java/org/eclipse/openk/db/model/TblMeasureDocuments.java
index 931cb01..583fb37 100644
--- a/src/main/java/org/eclipse/openk/db/model/TblMeasureDocuments.java
+++ b/src/main/java/org/eclipse/openk/db/model/TblMeasureDocuments.java
@@ -1,14 +1,18 @@
/*
- ******************************************************************************
- * Copyright © 2018 PTA GmbH.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
*
- * http://www.eclipse.org/legal/epl-v10.html
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
*
- ******************************************************************************
- */
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
+*/
+
package org.eclipse.openk.db.model;
import java.io.Serializable;
diff --git a/src/main/java/org/eclipse/openk/db/model/TblSingleGridmeasure.java b/src/main/java/org/eclipse/openk/db/model/TblSingleGridmeasure.java
index 9d5a0a7..b1389ab 100644
--- a/src/main/java/org/eclipse/openk/db/model/TblSingleGridmeasure.java
+++ b/src/main/java/org/eclipse/openk/db/model/TblSingleGridmeasure.java
@@ -1,14 +1,18 @@
-/**
- ******************************************************************************
- * Copyright © 2018 PTA GmbH.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
+/*
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
*
- * http://www.eclipse.org/legal/epl-v10.html
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
*
- ******************************************************************************
- */
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
+*/
+
package org.eclipse.openk.db.model;
import java.io.Serializable;
diff --git a/src/main/java/org/eclipse/openk/db/model/TblSteps.java b/src/main/java/org/eclipse/openk/db/model/TblSteps.java
index 4a09f3d..a442f1c 100644
--- a/src/main/java/org/eclipse/openk/db/model/TblSteps.java
+++ b/src/main/java/org/eclipse/openk/db/model/TblSteps.java
@@ -1,14 +1,18 @@
/*
- * ***************************************************************************
- * Copyright © 2018 PTA GmbH.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
*
- * http://www.eclipse.org/legal/epl-v10.html
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
*
- * ***************************************************************************
- */
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
+*/
+
package org.eclipse.openk.db.model;
import javax.persistence.Column;
diff --git a/src/main/java/org/eclipse/openk/db/model/TblUserSettings.java b/src/main/java/org/eclipse/openk/db/model/TblUserSettings.java
index d4393cb..500fef6 100644
--- a/src/main/java/org/eclipse/openk/db/model/TblUserSettings.java
+++ b/src/main/java/org/eclipse/openk/db/model/TblUserSettings.java
@@ -1,14 +1,18 @@
-/**
- ******************************************************************************
- * Copyright © 2018 PTA GmbH.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
+/*
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
*
- * http://www.eclipse.org/legal/epl-v10.html
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
*
- ******************************************************************************
- */
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
+*/
+
package org.eclipse.openk.db.model;
import java.io.Serializable;
diff --git a/src/main/java/org/eclipse/openk/health/DBIsPresentHealthCheck.java b/src/main/java/org/eclipse/openk/health/DBIsPresentHealthCheck.java
index 12b5566..83b1cee 100644
--- a/src/main/java/org/eclipse/openk/health/DBIsPresentHealthCheck.java
+++ b/src/main/java/org/eclipse/openk/health/DBIsPresentHealthCheck.java
@@ -1,14 +1,18 @@
/*
-******************************************************************************
-* Copyright © 2018 PTA GmbH.
-* All rights reserved. This program and the accompanying materials
-* are made available under the terms of the Eclipse Public License v1.0
-* which accompanies this distribution, and is available at
-*
-* http://www.eclipse.org/legal/epl-v10.html
-*
-******************************************************************************
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
+ *
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
*/
+
package org.eclipse.openk.health;
import com.codahale.metrics.health.HealthCheck;
diff --git a/src/main/java/org/eclipse/openk/health/MailConfigurationHealthCheck.java b/src/main/java/org/eclipse/openk/health/MailConfigurationHealthCheck.java
index 0d5c3fc..868d6cf 100644
--- a/src/main/java/org/eclipse/openk/health/MailConfigurationHealthCheck.java
+++ b/src/main/java/org/eclipse/openk/health/MailConfigurationHealthCheck.java
@@ -1,14 +1,18 @@
/*
- * ***************************************************************************
- * Copyright © 2018 PTA GmbH.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
*
- * http://www.eclipse.org/legal/epl-v10.html
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
*
- * ***************************************************************************
- */
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
+*/
+
package org.eclipse.openk.health;
import com.codahale.metrics.health.HealthCheck;
diff --git a/src/main/java/org/eclipse/openk/health/MailServerPresentHealthCheck.java b/src/main/java/org/eclipse/openk/health/MailServerPresentHealthCheck.java
index 3c9a708..f549de9 100644
--- a/src/main/java/org/eclipse/openk/health/MailServerPresentHealthCheck.java
+++ b/src/main/java/org/eclipse/openk/health/MailServerPresentHealthCheck.java
@@ -1,14 +1,18 @@
/*
- ******************************************************************************
- * Copyright © 2018 PTA GmbH.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
*
- * http://www.eclipse.org/legal/epl-v10.html
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
*
- ******************************************************************************
- */
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
+*/
+
package org.eclipse.openk.health;
import com.codahale.metrics.health.HealthCheck;
import org.eclipse.openk.core.controller.BackendConfig;
diff --git a/src/main/java/org/eclipse/openk/resources/BaseResource.java b/src/main/java/org/eclipse/openk/resources/BaseResource.java
index ba493c7..08df277 100644
--- a/src/main/java/org/eclipse/openk/resources/BaseResource.java
+++ b/src/main/java/org/eclipse/openk/resources/BaseResource.java
@@ -1,14 +1,18 @@
-/**
- ******************************************************************************
- * Copyright © 2018 PTA GmbH.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
+/*
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
*
- * http://www.eclipse.org/legal/epl-v10.html
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
*
- ******************************************************************************
- */
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
+*/
+
package org.eclipse.openk.resources;
import org.apache.log4j.Logger;
diff --git a/src/main/java/org/eclipse/openk/resources/MasterDataResource.java b/src/main/java/org/eclipse/openk/resources/MasterDataResource.java
index 1f87abf..435cfed 100644
--- a/src/main/java/org/eclipse/openk/resources/MasterDataResource.java
+++ b/src/main/java/org/eclipse/openk/resources/MasterDataResource.java
@@ -1,14 +1,18 @@
/*
- ******************************************************************************
- * Copyright © 2018 PTA GmbH.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
*
- * http://www.eclipse.org/legal/epl-v10.html
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
*
- ******************************************************************************
- */
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
+*/
+
package org.eclipse.openk.resources;
import com.codahale.metrics.annotation.Timed;
@@ -98,16 +102,7 @@
.getCostCenters());
}
- @ApiOperation(value = "UserDepartment", notes = "This service gets all possible User-Departments from the Database")
- @ApiResponses( value ={ @ApiResponse(code = 200, message = "OK", response = UserDepartment.class,reference = "#/definitions/UserDepartment") } )
- @GET
- @Path("/getUserDepartments")
- @Produces(MediaType.APPLICATION_JSON)
- @Timed
- public Response getUserDepartments(@ApiParam(name ="Authorization", value ="JWT Token", required =true)@HeaderParam(Globals.KEYCLOAK_AUTH_TAG) String jwt) {
- return invokeRunnable(jwt, SecureType.NORMAL, modusr -> new MasterDataBackendController()
- .getUserDepartments());
- }
+
@ApiOperation(value = "Territory", notes = "This service retrieves all territories as Strings from the Database")
@ApiResponses( value ={ @ApiResponse(code = 200, message = "OK", response = Territory.class,reference = "#/definitions/Territory") } )
diff --git a/src/main/java/org/eclipse/openk/resources/PlannedGridMeasuresResource.java b/src/main/java/org/eclipse/openk/resources/PlannedGridMeasuresResource.java
index 4b12506..bc9eef7 100644
--- a/src/main/java/org/eclipse/openk/resources/PlannedGridMeasuresResource.java
+++ b/src/main/java/org/eclipse/openk/resources/PlannedGridMeasuresResource.java
@@ -1,14 +1,18 @@
/*
- * ***************************************************************************
- * Copyright © 2018 PTA GmbH.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
*
- * http://www.eclipse.org/legal/epl-v10.html
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
*
- * ***************************************************************************
- */
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
+*/
+
package org.eclipse.openk.resources;
@@ -24,6 +28,7 @@
import org.apache.http.HttpStatus;
import org.apache.log4j.Logger;
import org.eclipse.openk.api.BackendSettings;
+import org.eclipse.openk.api.Calender;
import org.eclipse.openk.api.Document;
import org.eclipse.openk.api.FilterObject;
import org.eclipse.openk.api.GridMeasure;
@@ -138,6 +143,19 @@
.getGridMeasureById(Integer.parseInt(id)));
}
+ @ApiOperation(value = "Get Calender", notes = "This service gets single gridmeasures for the calender view")
+ @ApiResponses( value ={ @ApiResponse(code = 200, message = "OK", response = Calender.class,reference = "#/definitions/Calender") } )
+ @GET
+ @Path("/getCalender")
+ @Consumes(MediaType.APPLICATION_JSON)
+ @Produces(MediaType.APPLICATION_JSON)
+ @Timed
+ public Response getCalender(@ApiParam(name ="Authorization", value ="JWT Token", required =true)
+ @HeaderParam(Globals.KEYCLOAK_AUTH_TAG) String jwt) {
+ return invokeRunnable(jwt, SecureType.NORMAL, modusr -> new GridMeasureBackendController()
+ .getCalender());
+ }
+
@ApiOperation(value = "Get Current Reminders", notes = "This service retrieves a list of Gridmeasure-Ids")
@ApiResponses( value ={ @ApiResponse(code = 200, message = "OK", response = GridMeasure.class,reference = "#/definitions/GridMeasure") } )
@@ -374,19 +392,19 @@
}
- @ApiOperation(value = "Gets all responsibles on-site from gridmeasures", notes = "This service retrieves all responsibles on-site from gridmeasures in the database")
+ @ApiOperation(value = "responsibles on-site", notes = "This service retrieves all responsibles on-site from single gridmeasures in the database")
@ApiResponses( value ={ @ApiResponse(code = 200, message = "OK", response = String.class,reference = "#/definitions/GridMeasure.responsibleOnSiteName") } )
@GET
- @Path("/getResponsiblesOnSiteFromGridmeasures")
+ @Path("/getResponsiblesOnSiteFromSingleGridmeasures")
@Produces(MediaType.APPLICATION_JSON)
@Timed
- public Response getResponsiblesOnSiteFromGridmeasures(@ApiParam(name ="Authorization", value ="JWT Token", required =true)@HeaderParam(Globals.KEYCLOAK_AUTH_TAG) String jwt) {
+ public Response getResponsiblesOnSiteFromSingleGridmeasures(@ApiParam(name ="Authorization", value ="JWT Token", required =true)@HeaderParam(Globals.KEYCLOAK_AUTH_TAG) String jwt) {
return invokeRunnable(jwt, SecureType.NORMAL, modusr -> new GridMeasureBackendController()
.getResponsiblesOnSiteFromSingleGridmeasures());
}
- @ApiOperation(value = "Gets all network controls from single-gridmeasures", notes = "This service retrieves all network controls from single-gridmeasures in the database")
+ @ApiOperation(value = "network controls", notes = "This service retrieves all network controls as Strings from the database")
@ApiResponses( value ={ @ApiResponse(code = 200, message = "OK", response = String.class,reference = "#/definitions/SingleGridmeasure.networkControl") } )
@GET
@Path("/getNetworkControlsFromSingleGridmeasures")
@@ -397,6 +415,39 @@
.getNetworkControlsFromSingleGridmeasures());
}
+ @ApiOperation(value = "user departments", notes = "This service gets all known User-Departments for the field responsible_onsite_department as Strings from the database")
+ @ApiResponses( value ={ @ApiResponse(code = 200, message = "OK", response = String.class) } )
+ @GET
+ @Path("/getUserDepartmentsResponsibleOnSite")
+ @Produces(MediaType.APPLICATION_JSON)
+ @Timed
+ public Response getUserDepartmentsResponsibleOnSite(@ApiParam(name ="Authorization", value ="JWT Token", required =true)@HeaderParam(Globals.KEYCLOAK_AUTH_TAG) String jwt) {
+ return invokeRunnable(jwt, SecureType.NORMAL, modusr -> new GridMeasureBackendController()
+ .getUserDepartmentsResponsibleOnSite());
+ }
+
+ @ApiOperation(value = "user departments", notes = "This service gets all known User-Departments for the field create_user_department as Strings from the database")
+ @ApiResponses( value ={ @ApiResponse(code = 200, message = "OK", response = String.class) } )
+ @GET
+ @Path("/getUserDepartmentsCreated")
+ @Produces(MediaType.APPLICATION_JSON)
+ @Timed
+ public Response getUserDepartmentsCreated(@ApiParam(name ="Authorization", value ="JWT Token", required =true)@HeaderParam(Globals.KEYCLOAK_AUTH_TAG) String jwt) {
+ return invokeRunnable(jwt, SecureType.NORMAL, modusr -> new GridMeasureBackendController()
+ .getUserDepartmentsCreated());
+ }
+
+ @ApiOperation(value = "user departments", notes = "This service gets all known User-Departments for the field mod_user_department as Strings from the database")
+ @ApiResponses( value ={ @ApiResponse(code = 200, message = "OK", response = String.class) } )
+ @GET
+ @Path("/getUserDepartmentsModified")
+ @Produces(MediaType.APPLICATION_JSON)
+ @Timed
+ public Response getUserDepartmentsModified(@ApiParam(name ="Authorization", value ="JWT Token", required =true)@HeaderParam(Globals.KEYCLOAK_AUTH_TAG) String jwt) {
+ return invokeRunnable(jwt, SecureType.NORMAL, modusr -> new GridMeasureBackendController()
+ .getUserDepartmentsModified());
+ }
+
private Response responseFromException(Exception e) {
int errcode;
diff --git a/src/test/java/org/eclipse/openk/PlannedGridMeasuresApplicationTest.java b/src/test/java/org/eclipse/openk/PlannedGridMeasuresApplicationTest.java
index d8100ce..6b88f2b 100644
--- a/src/test/java/org/eclipse/openk/PlannedGridMeasuresApplicationTest.java
+++ b/src/test/java/org/eclipse/openk/PlannedGridMeasuresApplicationTest.java
@@ -1,14 +1,18 @@
-/**
-******************************************************************************
-* Copyright © 2018 PTA GmbH.
-* All rights reserved. This program and the accompanying materials
-* are made available under the terms of the Eclipse Public License v1.0
-* which accompanies this distribution, and is available at
-*
-* http://www.eclipse.org/legal/epl-v10.html
-*
-******************************************************************************
+/*
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
+ *
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
*/
+
package org.eclipse.openk;
import static org.easymock.EasyMock.anyBoolean;
diff --git a/src/test/java/org/eclipse/openk/TestUtils/TestHelper.java b/src/test/java/org/eclipse/openk/TestUtils/TestHelper.java
index 6cec61f..7a985b0 100644
--- a/src/test/java/org/eclipse/openk/TestUtils/TestHelper.java
+++ b/src/test/java/org/eclipse/openk/TestUtils/TestHelper.java
@@ -1,14 +1,18 @@
/*
- * *****************************************************************************
- * Copyright © 2018 PTA GmbH.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
*
- * http://www.eclipse.org/legal/epl-v10.html
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
*
- * *****************************************************************************
- */
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
+*/
+
package org.eclipse.openk.TestUtils;
diff --git a/src/test/java/org/eclipse/openk/api/BackendSettingsTest.java b/src/test/java/org/eclipse/openk/api/BackendSettingsTest.java
index 31d71f5..e23956f 100644
--- a/src/test/java/org/eclipse/openk/api/BackendSettingsTest.java
+++ b/src/test/java/org/eclipse/openk/api/BackendSettingsTest.java
@@ -1,14 +1,18 @@
/*
- * ***************************************************************************
- * Copyright © 2018 PTA GmbH.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
*
- * http://www.eclipse.org/legal/epl-v10.html
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
*
- * ***************************************************************************
- */
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
+*/
+
package org.eclipse.openk.api;
diff --git a/src/test/java/org/eclipse/openk/api/BranchLevelTest.java b/src/test/java/org/eclipse/openk/api/BranchLevelTest.java
index 973ce7d..d9077b2 100644
--- a/src/test/java/org/eclipse/openk/api/BranchLevelTest.java
+++ b/src/test/java/org/eclipse/openk/api/BranchLevelTest.java
@@ -1,14 +1,18 @@
-/**
- ******************************************************************************
- * Copyright © 2018 PTA GmbH.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
+/*
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
*
- * http://www.eclipse.org/legal/epl-v10.html
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
*
- ******************************************************************************
- */
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
+*/
+
package org.eclipse.openk.api;
import static org.junit.Assert.assertEquals;
diff --git a/src/test/java/org/eclipse/openk/api/BranchTest.java b/src/test/java/org/eclipse/openk/api/BranchTest.java
index 2a3ab78..40143ca 100644
--- a/src/test/java/org/eclipse/openk/api/BranchTest.java
+++ b/src/test/java/org/eclipse/openk/api/BranchTest.java
@@ -1,14 +1,18 @@
-/**
- ******************************************************************************
- * Copyright © 2018 PTA GmbH.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
+/*
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
*
- * http://www.eclipse.org/legal/epl-v10.html
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
*
- ******************************************************************************
- */
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
+*/
+
package org.eclipse.openk.api;
import static org.junit.Assert.assertEquals;
diff --git a/src/test/java/org/eclipse/openk/api/CalenderTest.java b/src/test/java/org/eclipse/openk/api/CalenderTest.java
new file mode 100644
index 0000000..68f0cf5
--- /dev/null
+++ b/src/test/java/org/eclipse/openk/api/CalenderTest.java
@@ -0,0 +1,125 @@
+/*
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
+ *
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
+*/
+
+package org.eclipse.openk.api;
+
+import static org.junit.Assert.assertEquals;
+
+import com.fasterxml.jackson.databind.ObjectMapper;
+import java.io.IOException;
+import java.util.Date;
+
+import org.junit.Test;
+
+public class CalenderTest {
+
+ @Test
+ public void testGetGridMeasureId()throws IOException {
+ Calender calender = new Calender();
+ calender.setGridMeasureId(5);
+
+ ObjectMapper om = new ObjectMapper();
+ String jsonString = om.writeValueAsString(calender);
+
+ Calender calender2 = om.readValue(jsonString, Calender.class);
+
+ assertEquals(calender.getGridMeasureId(), calender2.getGridMeasureId());
+ }
+
+ @Test
+ public void testGetGridMeasureTitle()throws IOException {
+ Calender calender = new Calender();
+ calender.setGridMeasureTitle("Test 5");
+
+ ObjectMapper om = new ObjectMapper();
+ String jsonString = om.writeValueAsString(calender);
+
+ Calender calender2 = om.readValue(jsonString, Calender.class);
+
+ assertEquals(calender.getGridMeasureTitle(), calender2.getGridMeasureTitle());
+ }
+
+ @Test
+ public void testGetGridMeasureStatusId()throws IOException {
+ Calender calender = new Calender();
+ calender.setGridMeasureStatusId(3);
+
+ ObjectMapper om = new ObjectMapper();
+ String jsonString = om.writeValueAsString(calender);
+
+ Calender calender2 = om.readValue(jsonString, Calender.class);
+
+ assertEquals(calender.getGridMeasureStatusId(), calender2.getGridMeasureStatusId());
+ }
+
+ @Test
+ public void testGetSingleGridMeasureId()throws IOException {
+ Calender calender = new Calender();
+ calender.setSingleGridMeasureId(2);
+
+ ObjectMapper om = new ObjectMapper();
+ String jsonString = om.writeValueAsString(calender);
+
+ Calender calender2 = om.readValue(jsonString, Calender.class);
+
+ assertEquals(calender.getSingleGridMeasureId(), calender2.getSingleGridMeasureId());
+ }
+
+ @Test
+ public void testGetSingleGridMeasureTitle()throws IOException {
+ Calender calender = new Calender();
+ calender.setSingleGridMeasureTitle("Test Single 2");
+
+ ObjectMapper om = new ObjectMapper();
+ String jsonString = om.writeValueAsString(calender);
+
+ Calender calender2 = om.readValue(jsonString, Calender.class);
+
+ assertEquals(calender.getSingleGridMeasureTitle(), calender2.getSingleGridMeasureTitle());
+ }
+
+ @Test
+ public void testGetPlannedStarttimSinglemeasure()throws IOException {
+ Calender calender = new Calender();
+
+ java.util.Date plannedStarttimeSinglemeasure = new Date(System.currentTimeMillis());
+ calender.setPlannedStarttimSinglemeasure(plannedStarttimeSinglemeasure);
+
+ ObjectMapper om = new ObjectMapper();
+ String jsonString = om.writeValueAsString(calender);
+
+ Calender calender2 = om.readValue(jsonString, Calender.class);
+
+ assertEquals(calender.getPlannedStarttimSinglemeasure(), calender2.getPlannedStarttimSinglemeasure());
+ }
+
+ @Test
+ public void testGetPlannedEndtimeSinglemeasure()throws IOException {
+ Calender calender = new Calender();
+
+ java.util.Date plannedEndtimeSinglemeasure = new Date(System.currentTimeMillis());
+ calender.setPlannedEndtimeSinglemeasure(plannedEndtimeSinglemeasure);
+
+ ObjectMapper om = new ObjectMapper();
+ String jsonString = om.writeValueAsString(calender);
+
+ Calender calender2 = om.readValue(jsonString, Calender.class);
+
+ assertEquals(calender.getPlannedEndtimeSinglemeasure(), calender2.getPlannedEndtimeSinglemeasure());
+ }
+
+
+}
+
diff --git a/src/test/java/org/eclipse/openk/api/CostCenterTest.java b/src/test/java/org/eclipse/openk/api/CostCenterTest.java
index 8c60d92..d40b396 100644
--- a/src/test/java/org/eclipse/openk/api/CostCenterTest.java
+++ b/src/test/java/org/eclipse/openk/api/CostCenterTest.java
@@ -1,14 +1,18 @@
-/**
- ******************************************************************************
- * Copyright © 2018 PTA GmbH.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
+/*
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
*
- * http://www.eclipse.org/legal/epl-v10.html
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
*
- ******************************************************************************
- */
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
+*/
+
package org.eclipse.openk.api;
import static org.junit.Assert.assertEquals;
diff --git a/src/test/java/org/eclipse/openk/api/FilterObjectTest.java b/src/test/java/org/eclipse/openk/api/FilterObjectTest.java
index 3a3e64f..2585c83 100644
--- a/src/test/java/org/eclipse/openk/api/FilterObjectTest.java
+++ b/src/test/java/org/eclipse/openk/api/FilterObjectTest.java
@@ -1,14 +1,18 @@
/*
- * ***************************************************************************
- * Copyright © 2018 PTA GmbH.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
*
- * http://www.eclipse.org/legal/epl-v10.html
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
*
- * ***************************************************************************
- */
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
+*/
+
package org.eclipse.openk.api;
import com.fasterxml.jackson.databind.ObjectMapper;
diff --git a/src/test/java/org/eclipse/openk/api/GmStatusTest.java b/src/test/java/org/eclipse/openk/api/GmStatusTest.java
index fe2d75e..1f8d7ca 100644
--- a/src/test/java/org/eclipse/openk/api/GmStatusTest.java
+++ b/src/test/java/org/eclipse/openk/api/GmStatusTest.java
@@ -1,14 +1,18 @@
-/**
- ******************************************************************************
- * Copyright © 2018 PTA GmbH.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
+/*
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
*
- * http://www.eclipse.org/legal/epl-v10.html
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
*
- ******************************************************************************
- */
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
+*/
+
package org.eclipse.openk.api;
import static org.junit.Assert.assertEquals;
@@ -45,4 +49,17 @@
assertEquals(status.getName(), status2.getName());
}
-}
\ No newline at end of file
+ @Test
+ public void testGetColorCode()throws IOException {
+ GmStatus status = new GmStatus();
+ status.setColorCode("#222222");
+
+ ObjectMapper om = new ObjectMapper();
+ String jsonString = om.writeValueAsString(status);
+
+ GmStatus status2 = om.readValue(jsonString, GmStatus.class);
+
+ assertEquals(status.getColorCode(), status2.getColorCode());
+ }
+
+}
diff --git a/src/test/java/org/eclipse/openk/api/GridmeasureTest.java b/src/test/java/org/eclipse/openk/api/GridmeasureTest.java
index 8324d84..fb631bc 100644
--- a/src/test/java/org/eclipse/openk/api/GridmeasureTest.java
+++ b/src/test/java/org/eclipse/openk/api/GridmeasureTest.java
@@ -1,14 +1,18 @@
/*
- ******************************************************************************
- * Copyright © 2018 PTA GmbH.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
*
- * http://www.eclipse.org/legal/epl-v10.html
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
*
- ******************************************************************************
- */
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
+*/
+
package org.eclipse.openk.api;
import static org.junit.Assert.assertEquals;
@@ -193,21 +197,6 @@
}
@Test
- public void testGetPlannedStarttimeFirstSequence()throws IOException {
- GridMeasure gm = new GridMeasure();
-
- java.util.Date datePlannedStarttimeFirstSequence = new Date(System.currentTimeMillis());
- gm.setPlannedStarttimeFirstSequence(datePlannedStarttimeFirstSequence);
-
- ObjectMapper om = new ObjectMapper();
- String jsonString = om.writeValueAsString(gm);
-
- GridMeasure gm2 = om.readValue(jsonString, GridMeasure.class);
-
- assertEquals(gm.getPlannedStarttimeFirstSequence(), gm2.getPlannedStarttimeFirstSequence());
- }
-
- @Test
public void testGetPlannedStarttimeFirstSinglemeasure()throws IOException {
GridMeasure gm = new GridMeasure();
@@ -223,82 +212,6 @@
}
@Test
- public void testGetPlannedEndtimeLastSinglemeasure()throws IOException {
- GridMeasure gm = new GridMeasure();
-
- java.util.Date datePlannedEndtimeLastSinglemeasure = new Date(System.currentTimeMillis());
- gm.setPlannedEndtimeLastSinglemeasure(datePlannedEndtimeLastSinglemeasure);
-
- ObjectMapper om = new ObjectMapper();
- String jsonString = om.writeValueAsString(gm);
-
- GridMeasure gm2 = om.readValue(jsonString, GridMeasure.class);
-
- assertEquals(gm.getPlannedEndtimeLastSinglemeasure(), gm2.getPlannedEndtimeLastSinglemeasure());
- }
-
- @Test
- public void testGetPlannedEndtimeGridmeasure()throws IOException {
- GridMeasure gm = new GridMeasure();
-
- java.util.Date datePlannedEndtimeGridmeasure = new Date(System.currentTimeMillis());
- gm.setPlannedEndtimeGridmeasure(datePlannedEndtimeGridmeasure);
-
- ObjectMapper om = new ObjectMapper();
- String jsonString = om.writeValueAsString(gm);
-
- GridMeasure gm2 = om.readValue(jsonString, GridMeasure.class);
-
- assertEquals(gm.getPlannedEndtimeGridmeasure(), gm2.getPlannedEndtimeGridmeasure());
- }
-
- @Test
- public void testGetStarttimeFirstSequence()throws IOException {
- GridMeasure gm = new GridMeasure();
-
- java.util.Date dateStarttimeFirstSequence = new Date(System.currentTimeMillis());
- gm.setStarttimeFirstSequence(dateStarttimeFirstSequence);
-
- ObjectMapper om = new ObjectMapper();
- String jsonString = om.writeValueAsString(gm);
-
- GridMeasure gm2 = om.readValue(jsonString, GridMeasure.class);
-
- assertEquals(gm.getStarttimeFirstSequence(), gm2.getStarttimeFirstSequence());
- }
-
-
- @Test
- public void testGetStarttimeFirstSinglemeasure()throws IOException {
- GridMeasure gm = new GridMeasure();
-
- java.util.Date dateStarttimeFirstSinglemeasure = new Date(System.currentTimeMillis());
- gm.setStarttimeFirstSinglemeasure(dateStarttimeFirstSinglemeasure);
-
- ObjectMapper om = new ObjectMapper();
- String jsonString = om.writeValueAsString(gm);
-
- GridMeasure gm2 = om.readValue(jsonString, GridMeasure.class);
-
- assertEquals(gm.getStarttimeFirstSinglemeasure(), gm2.getStarttimeFirstSinglemeasure());
- }
-
- @Test
- public void testGetEndtimeLastSinglemeasure()throws IOException {
- GridMeasure gm = new GridMeasure();
-
- java.util.Date dateEndtimeLastSinglemeasure = new Date(System.currentTimeMillis());
- gm.setEndtimeLastSinglemeasure(dateEndtimeLastSinglemeasure);
-
- ObjectMapper om = new ObjectMapper();
- String jsonString = om.writeValueAsString(gm);
-
- GridMeasure gm2 = om.readValue(jsonString, GridMeasure.class);
-
- assertEquals(gm.getEndtimeLastSinglemeasure(), gm2.getEndtimeLastSinglemeasure());
- }
-
- @Test
public void testGetEndtimeGridmeasure()throws IOException {
GridMeasure gm = new GridMeasure();
diff --git a/src/test/java/org/eclipse/openk/api/HGridMeasureTest.java b/src/test/java/org/eclipse/openk/api/HGridMeasureTest.java
index 9254ab0..b001204 100644
--- a/src/test/java/org/eclipse/openk/api/HGridMeasureTest.java
+++ b/src/test/java/org/eclipse/openk/api/HGridMeasureTest.java
@@ -1,14 +1,18 @@
/*
- * ***************************************************************************
- * Copyright © 2018 PTA GmbH.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- *
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * ***************************************************************************
- */
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
+ *
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
+*/
+
package org.eclipse.openk.api;
import com.fasterxml.jackson.databind.ObjectMapper;
@@ -233,20 +237,7 @@
assertEquals(hgm.getAppointmentNumberOf(), hgm2.getAppointmentNumberOf());
}
- @Test
- public void testGetPlannedStarttimeFirstSequence()throws IOException {
- HGridMeasure hgm = new HGridMeasure();
- Date datePlannedStarttimeFirstSequence = new Date(System.currentTimeMillis());
- hgm.setPlannedStarttimeFirstSequence(datePlannedStarttimeFirstSequence);
-
- ObjectMapper om = new ObjectMapper();
- String jsonString = om.writeValueAsString(hgm);
-
- HGridMeasure hgm2 = om.readValue(jsonString, HGridMeasure.class);
-
- assertEquals(hgm.getPlannedStarttimeFirstSequence(), hgm2.getPlannedStarttimeFirstSequence());
- }
@Test
public void testGetPlannedStarttimeFirstSinglemeasure()throws IOException {
@@ -262,67 +253,6 @@
assertEquals(hgm.getPlannedStarttimeFirstSinglemeasure(), hgm2.getPlannedStarttimeFirstSinglemeasure());
}
-
- @Test
- public void testGetPlannedEndtimeLastSinglemeasure()throws IOException {
- HGridMeasure hgm = new HGridMeasure();
-
- Date datePlannedEndtimeLastSinglemeasure = new Date(System.currentTimeMillis());
- hgm.setPlannedEndtimeLastSinglemeasure(datePlannedEndtimeLastSinglemeasure);
-
- ObjectMapper om = new ObjectMapper();
- String jsonString = om.writeValueAsString(hgm);
-
- HGridMeasure hgm2 = om.readValue(jsonString, HGridMeasure.class);
-
- assertEquals(hgm.getPlannedEndtimeLastSinglemeasure(), hgm2.getPlannedEndtimeLastSinglemeasure());
- }
-
- @Test
- public void testGetStarttimeFirstSequence()throws IOException {
- HGridMeasure hgm = new HGridMeasure();
-
- Date dateStarttimeFirstSequence = new Date(System.currentTimeMillis());
- hgm.setStarttimeFirstSequence(dateStarttimeFirstSequence);
-
- ObjectMapper om = new ObjectMapper();
- String jsonString = om.writeValueAsString(hgm);
-
- HGridMeasure hgm2 = om.readValue(jsonString, HGridMeasure.class);
-
- assertEquals(hgm.getStarttimeFirstSequence(), hgm2.getStarttimeFirstSequence());
- }
-
-
- @Test
- public void testGetStarttimeFirstSinglemeasure()throws IOException {
- HGridMeasure hgm = new HGridMeasure();
-
- Date dateStarttimeFirstSinglemeasure = new Date(System.currentTimeMillis());
- hgm.setStarttimeFirstSinglemeasure(dateStarttimeFirstSinglemeasure);
-
- ObjectMapper om = new ObjectMapper();
- String jsonString = om.writeValueAsString(hgm);
-
- HGridMeasure hgm2 = om.readValue(jsonString, HGridMeasure.class);
-
- assertEquals(hgm.getStarttimeFirstSinglemeasure(), hgm2.getStarttimeFirstSinglemeasure());
- }
-
- @Test
- public void testGetEndtimeLastSinglemeasure()throws IOException {
- HGridMeasure hgm = new HGridMeasure();
-
- Date dateEndtimeLastSinglemeasure = new Date(System.currentTimeMillis());
- hgm.setEndtimeLastSinglemeasure(dateEndtimeLastSinglemeasure);
-
- ObjectMapper om = new ObjectMapper();
- String jsonString = om.writeValueAsString(hgm);
-
- HGridMeasure hgm2 = om.readValue(jsonString, HGridMeasure.class);
-
- assertEquals(hgm.getEndtimeLastSinglemeasure(), hgm2.getEndtimeLastSinglemeasure());
- }
@Test
diff --git a/src/test/java/org/eclipse/openk/api/LockTest.java b/src/test/java/org/eclipse/openk/api/LockTest.java
index 4ae6676..6ea8b2b 100644
--- a/src/test/java/org/eclipse/openk/api/LockTest.java
+++ b/src/test/java/org/eclipse/openk/api/LockTest.java
@@ -1,14 +1,18 @@
-/**
- ******************************************************************************
- * Copyright © 2018 PTA GmbH.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
+/*
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
*
- * http://www.eclipse.org/legal/epl-v10.html
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
*
- ******************************************************************************
- */
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
+*/
+
package org.eclipse.openk.api;
import static org.junit.Assert.assertEquals;
diff --git a/src/test/java/org/eclipse/openk/api/RoleAccessDefinitionApiTest.java b/src/test/java/org/eclipse/openk/api/RoleAccessDefinitionApiTest.java
index fe9f425..4a9b840 100644
--- a/src/test/java/org/eclipse/openk/api/RoleAccessDefinitionApiTest.java
+++ b/src/test/java/org/eclipse/openk/api/RoleAccessDefinitionApiTest.java
@@ -1,14 +1,18 @@
/*
- * ***************************************************************************
- * Copyright © 2018 PTA GmbH.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
*
- * http://www.eclipse.org/legal/epl-v10.html
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
*
- * ***************************************************************************
- */
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
+*/
+
package org.eclipse.openk.api;
import com.fasterxml.jackson.databind.ObjectMapper;
diff --git a/src/test/java/org/eclipse/openk/api/SingleGridmeasureTest.java b/src/test/java/org/eclipse/openk/api/SingleGridmeasureTest.java
index 70ef4bd..fdae3bc 100644
--- a/src/test/java/org/eclipse/openk/api/SingleGridmeasureTest.java
+++ b/src/test/java/org/eclipse/openk/api/SingleGridmeasureTest.java
@@ -1,14 +1,18 @@
/*
- ******************************************************************************
- * Copyright © 2018 PTA GmbH.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
*
- * http://www.eclipse.org/legal/epl-v10.html
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
*
- ******************************************************************************
- */
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
+*/
+
package org.eclipse.openk.api;
import static org.junit.Assert.assertEquals;
diff --git a/src/test/java/org/eclipse/openk/api/StepsTest.java b/src/test/java/org/eclipse/openk/api/StepsTest.java
index ab054f9..12f89e4 100644
--- a/src/test/java/org/eclipse/openk/api/StepsTest.java
+++ b/src/test/java/org/eclipse/openk/api/StepsTest.java
@@ -1,14 +1,18 @@
/*
- * ***************************************************************************
- * Copyright © 2018 PTA GmbH.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- *
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * ***************************************************************************
- */
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
+ *
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
+*/
+
package org.eclipse.openk.api;
import com.fasterxml.jackson.databind.ObjectMapper;
diff --git a/src/test/java/org/eclipse/openk/api/TerritoryTest.java b/src/test/java/org/eclipse/openk/api/TerritoryTest.java
index b478bd6..785780d 100644
--- a/src/test/java/org/eclipse/openk/api/TerritoryTest.java
+++ b/src/test/java/org/eclipse/openk/api/TerritoryTest.java
@@ -1,14 +1,18 @@
-/**
- ******************************************************************************
- * Copyright © 2018 PTA GmbH.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
+/*
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
*
- * http://www.eclipse.org/legal/epl-v10.html
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
*
- ******************************************************************************
- */
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
+*/
+
package org.eclipse.openk.api;
import static org.junit.Assert.assertEquals;
diff --git a/src/test/java/org/eclipse/openk/api/UserDepartmentTest.java b/src/test/java/org/eclipse/openk/api/UserDepartmentTest.java
deleted file mode 100644
index 902aaf7..0000000
--- a/src/test/java/org/eclipse/openk/api/UserDepartmentTest.java
+++ /dev/null
@@ -1,48 +0,0 @@
-/**
- ******************************************************************************
- * Copyright © 2018 PTA GmbH.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- *
- * http://www.eclipse.org/legal/epl-v10.html
- *
- ******************************************************************************
- */
-package org.eclipse.openk.api;
-
-import static org.junit.Assert.assertEquals;
-
-import com.fasterxml.jackson.databind.ObjectMapper;
-import java.io.IOException;
-import org.junit.Test;
-
-public class UserDepartmentTest {
-
- @Test
- public void testGetId()throws IOException {
- UserDepartment userDepartment = new UserDepartment();
- userDepartment.setId(78);
-
- ObjectMapper om = new ObjectMapper();
- String jsonString = om.writeValueAsString(userDepartment);
-
- UserDepartment userDepartment2 = om.readValue(jsonString, UserDepartment.class);
-
- assertEquals(userDepartment.getId(), userDepartment2.getId());
- }
-
- @Test
- public void testGetName()throws IOException {
- UserDepartment userDepartment = new UserDepartment();
- userDepartment.setName("UserDepartmentName");
-
- ObjectMapper om = new ObjectMapper();
- String jsonString = om.writeValueAsString(userDepartment);
-
- UserDepartment userDepartment2 = om.readValue(jsonString, UserDepartment.class);
-
- assertEquals(userDepartment.getName(), userDepartment2.getName());
- }
-
-}
\ No newline at end of file
diff --git a/src/test/java/org/eclipse/openk/api/UserSettingsTest.java b/src/test/java/org/eclipse/openk/api/UserSettingsTest.java
index 4984fd5..bced619 100644
--- a/src/test/java/org/eclipse/openk/api/UserSettingsTest.java
+++ b/src/test/java/org/eclipse/openk/api/UserSettingsTest.java
@@ -1,14 +1,18 @@
/*
- ******************************************************************************
- * Copyright © 2018 PTA GmbH.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
*
- * http://www.eclipse.org/legal/epl-v10.html
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
*
- ******************************************************************************
- */
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
+*/
+
package org.eclipse.openk.api;
import static org.junit.Assert.assertEquals;
diff --git a/src/test/java/org/eclipse/openk/api/VersionInfoTest.java b/src/test/java/org/eclipse/openk/api/VersionInfoTest.java
index 2971544..2524b96 100644
--- a/src/test/java/org/eclipse/openk/api/VersionInfoTest.java
+++ b/src/test/java/org/eclipse/openk/api/VersionInfoTest.java
@@ -1,14 +1,18 @@
-/**
-******************************************************************************
-* Copyright © 2018 PTA GmbH.
-* All rights reserved. This program and the accompanying materials
-* are made available under the terms of the Eclipse Public License v1.0
-* which accompanies this distribution, and is available at
-*
-* http://www.eclipse.org/legal/epl-v10.html
-*
-******************************************************************************
+/*
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
+ *
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
*/
+
package org.eclipse.openk.api;
import static org.junit.Assert.assertEquals;
diff --git a/src/test/java/org/eclipse/openk/api/mail/EmailTemplatePathsTest.java b/src/test/java/org/eclipse/openk/api/mail/EmailTemplatePathsTest.java
index f79485f..98580fb 100644
--- a/src/test/java/org/eclipse/openk/api/mail/EmailTemplatePathsTest.java
+++ b/src/test/java/org/eclipse/openk/api/mail/EmailTemplatePathsTest.java
@@ -1,14 +1,18 @@
/*
- * ***************************************************************************
- * Copyright © 2018 PTA GmbH.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
*
- * http://www.eclipse.org/legal/epl-v10.html
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
*
- * ***************************************************************************
- */
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
+*/
+
package org.eclipse.openk.api.mail;
diff --git a/src/test/java/org/eclipse/openk/auth2/model/JwtAccountTest.java b/src/test/java/org/eclipse/openk/auth2/model/JwtAccountTest.java
index d8630ba..7f8fcce 100644
--- a/src/test/java/org/eclipse/openk/auth2/model/JwtAccountTest.java
+++ b/src/test/java/org/eclipse/openk/auth2/model/JwtAccountTest.java
@@ -1,14 +1,18 @@
-/**
- ******************************************************************************
- * Copyright © 2018 PTA GmbH.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
+/*
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
*
- * http://www.eclipse.org/legal/epl-v10.html
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
*
- ******************************************************************************
- */
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
+*/
+
package org.eclipse.openk.auth2.model;
import static junit.framework.TestCase.assertEquals;
diff --git a/src/test/java/org/eclipse/openk/auth2/model/JwtHeaderTest.java b/src/test/java/org/eclipse/openk/auth2/model/JwtHeaderTest.java
index fe164b0..08b86c0 100644
--- a/src/test/java/org/eclipse/openk/auth2/model/JwtHeaderTest.java
+++ b/src/test/java/org/eclipse/openk/auth2/model/JwtHeaderTest.java
@@ -1,14 +1,18 @@
-/**
- ******************************************************************************
- * Copyright © 2018 PTA GmbH.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
+/*
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
*
- * http://www.eclipse.org/legal/epl-v10.html
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
*
- ******************************************************************************
- */
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
+*/
+
package org.eclipse.openk.auth2.model;
import static junit.framework.TestCase.assertEquals;
diff --git a/src/test/java/org/eclipse/openk/auth2/model/JwtPayloadTest.java b/src/test/java/org/eclipse/openk/auth2/model/JwtPayloadTest.java
index 6150a22..0f4daa8 100644
--- a/src/test/java/org/eclipse/openk/auth2/model/JwtPayloadTest.java
+++ b/src/test/java/org/eclipse/openk/auth2/model/JwtPayloadTest.java
@@ -1,14 +1,18 @@
-/**
- ******************************************************************************
- * Copyright © 2018 PTA GmbH.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
+/*
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
*
- * http://www.eclipse.org/legal/epl-v10.html
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
*
- ******************************************************************************
- */
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
+*/
+
package org.eclipse.openk.auth2.model;
import static org.junit.Assert.assertEquals;
diff --git a/src/test/java/org/eclipse/openk/auth2/model/JwtRealmAccessTest.java b/src/test/java/org/eclipse/openk/auth2/model/JwtRealmAccessTest.java
index 291fa2f..c30fc99 100644
--- a/src/test/java/org/eclipse/openk/auth2/model/JwtRealmAccessTest.java
+++ b/src/test/java/org/eclipse/openk/auth2/model/JwtRealmAccessTest.java
@@ -1,14 +1,18 @@
-/**
- ******************************************************************************
- * Copyright © 2018 PTA GmbH.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
+/*
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
*
- * http://www.eclipse.org/legal/epl-v10.html
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
*
- ******************************************************************************
- */
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
+*/
+
package org.eclipse.openk.auth2.model;
import static junit.framework.TestCase.assertEquals;
diff --git a/src/test/java/org/eclipse/openk/auth2/model/JwtResourceAccessTest.java b/src/test/java/org/eclipse/openk/auth2/model/JwtResourceAccessTest.java
index 4f59585..a60bfb5 100644
--- a/src/test/java/org/eclipse/openk/auth2/model/JwtResourceAccessTest.java
+++ b/src/test/java/org/eclipse/openk/auth2/model/JwtResourceAccessTest.java
@@ -1,14 +1,18 @@
-/**
- ******************************************************************************
- * Copyright © 2018 PTA GmbH.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
+/*
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
*
- * http://www.eclipse.org/legal/epl-v10.html
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
*
- ******************************************************************************
- */
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
+*/
+
package org.eclipse.openk.auth2.model;
import static junit.framework.TestCase.assertEquals;
diff --git a/src/test/java/org/eclipse/openk/auth2/model/JwtTokenTest.java b/src/test/java/org/eclipse/openk/auth2/model/JwtTokenTest.java
index ba9ef71..eb2e326 100644
--- a/src/test/java/org/eclipse/openk/auth2/model/JwtTokenTest.java
+++ b/src/test/java/org/eclipse/openk/auth2/model/JwtTokenTest.java
@@ -1,14 +1,18 @@
-/**
- ******************************************************************************
- * Copyright © 2018 PTA GmbH.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
+/*
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
*
- * http://www.eclipse.org/legal/epl-v10.html
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
*
- ******************************************************************************
- */
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
+*/
+
package org.eclipse.openk.auth2.model;
import static org.junit.Assert.assertEquals;
diff --git a/src/test/java/org/eclipse/openk/auth2/model/KeyCloakUserAccessTest.java b/src/test/java/org/eclipse/openk/auth2/model/KeyCloakUserAccessTest.java
index 9eade0b..c76f231 100644
--- a/src/test/java/org/eclipse/openk/auth2/model/KeyCloakUserAccessTest.java
+++ b/src/test/java/org/eclipse/openk/auth2/model/KeyCloakUserAccessTest.java
@@ -1,14 +1,18 @@
-/**
- ******************************************************************************
- * Copyright © 2018 PTA GmbH.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
+/*
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
*
- * http://www.eclipse.org/legal/epl-v10.html
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
*
- ******************************************************************************
- */
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
+*/
+
package org.eclipse.openk.auth2.model;
import static org.junit.Assert.assertEquals;
diff --git a/src/test/java/org/eclipse/openk/auth2/model/KeyCloakUserTest.java b/src/test/java/org/eclipse/openk/auth2/model/KeyCloakUserTest.java
index 3dee860..be74e3b 100644
--- a/src/test/java/org/eclipse/openk/auth2/model/KeyCloakUserTest.java
+++ b/src/test/java/org/eclipse/openk/auth2/model/KeyCloakUserTest.java
@@ -1,14 +1,18 @@
-/**
- ******************************************************************************
- * Copyright © 2018 PTA GmbH.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
+/*
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
*
- * http://www.eclipse.org/legal/epl-v10.html
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
*
- ******************************************************************************
- */
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
+*/
+
package org.eclipse.openk.auth2.model;
import static org.junit.Assert.assertEquals;
diff --git a/src/test/java/org/eclipse/openk/auth2/util/JwtHelperTest.java b/src/test/java/org/eclipse/openk/auth2/util/JwtHelperTest.java
index 15e0358..c6fd099 100644
--- a/src/test/java/org/eclipse/openk/auth2/util/JwtHelperTest.java
+++ b/src/test/java/org/eclipse/openk/auth2/util/JwtHelperTest.java
@@ -1,14 +1,18 @@
-/**
- ******************************************************************************
- * Copyright © 2018 PTA GmbH.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
+/*
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
*
- * http://www.eclipse.org/legal/epl-v10.html
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
*
- ******************************************************************************
- */
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
+*/
+
package org.eclipse.openk.auth2.util;
import static org.junit.Assert.assertNotNull;
diff --git a/src/test/java/org/eclipse/openk/common/GsonUTCDateAdapterTest.java b/src/test/java/org/eclipse/openk/common/GsonUTCDateAdapterTest.java
index 9dc9b72..bc4e835 100644
--- a/src/test/java/org/eclipse/openk/common/GsonUTCDateAdapterTest.java
+++ b/src/test/java/org/eclipse/openk/common/GsonUTCDateAdapterTest.java
@@ -1,14 +1,18 @@
-/**
- ******************************************************************************
- * Copyright © 2018 PTA GmbH.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
+/*
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
*
- * http://www.eclipse.org/legal/epl-v10.html
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
*
- ******************************************************************************
- */
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
+*/
+
package org.eclipse.openk.common;
import com.google.gson.JsonSerializationContext;
@@ -37,4 +41,4 @@
}
-}
\ No newline at end of file
+}
diff --git a/src/test/java/org/eclipse/openk/common/mapper/GridMeasureMapperTest.java b/src/test/java/org/eclipse/openk/common/mapper/GridMeasureMapperTest.java
index f6890d1..fb82859 100644
--- a/src/test/java/org/eclipse/openk/common/mapper/GridMeasureMapperTest.java
+++ b/src/test/java/org/eclipse/openk/common/mapper/GridMeasureMapperTest.java
@@ -1,14 +1,18 @@
-/**
- ******************************************************************************
- * Copyright © 2018 PTA GmbH.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
+/*
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
*
- * http://www.eclipse.org/legal/epl-v10.html
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
*
- ******************************************************************************
- */
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
+*/
+
package org.eclipse.openk.common.mapper;
import org.eclipse.openk.api.GridMeasure;
@@ -122,13 +126,7 @@
mGm.setAppointmentRepetition("monthly");
mGm.setAppointmentStartdate(tsAppointmenStartdate);
mGm.setAppointmentNumberOf(6);
- mGm.setPlannedStarttimeFirstSequence(tsPlannedStarttimeFirstSequence);
mGm.setPlannedStarttimeFirstSinglemeasure(tsPlannedStarttimeFirstSinglemeasure);
- mGm.setPlannedEndtimeLastSinglemeasure(tsPlannedEndtimeLastSinglemeasure);
- mGm.setPlannedEndtimeGridmeasure(tsPlannedEndtimeGridmeasure);
- mGm.setStarttimeFirstSequence(tsStarttimeFirstSequence);
- mGm.setStarttimeFirstSinglemeasure(tsStarttimeFirstSinglemeasure);
- mGm.setEndtimeLastSinglemeasure(tsEndtimeLastSinglemeasure);
mGm.setEndtimeGridmeasure(tsEndtimeGridmeasure);
mGm.setTimeOfReallocation(tsTimeOfReallocation);
mGm.setDescription("This is a description");
@@ -167,13 +165,7 @@
vmGm.setAppointmentRepetition("monthly");
vmGm.setAppointmentStartdate(tsAppointmenStartdate);
vmGm.setAppointmentNumberOf(6);
- vmGm.setPlannedStarttimeFirstSequence(tsPlannedStarttimeFirstSequence);
vmGm.setPlannedStarttimeFirstSinglemeasure(tsPlannedStarttimeFirstSinglemeasure);
- vmGm.setPlannedEndtimeLastSinglemeasure(tsPlannedEndtimeLastSinglemeasure);
- vmGm.setPlannedEndtimeGridmeasure(tsPlannedEndtimeGridmeasure);
- vmGm.setStarttimeFirstSequence(tsStarttimeFirstSequence);
- vmGm.setStarttimeFirstSinglemeasure(tsStarttimeFirstSinglemeasure);
- vmGm.setEndtimeLastSinglemeasure(tsEndtimeLastSinglemeasure);
vmGm.setEndtimeGridmeasure(tsEndtimeGridmeasure);
vmGm.setTimeOfReallocation(tsTimeOfReallocation);
vmGm.setDescription("This is a description");
@@ -215,13 +207,7 @@
assertEquals(mGm.getAppointmentRepetition(), testmodel.getAppointmentRepetition());
assertEquals(mGm.getAppointmentStartdate(), testmodel.getAppointmentStartdate());
assertEquals(mGm.getAppointmentNumberOf(), testmodel.getAppointmentNumberOf());
- assertEquals(mGm.getPlannedStarttimeFirstSequence(), testmodel.getPlannedStarttimeFirstSequence());
assertEquals(mGm.getPlannedStarttimeFirstSinglemeasure(), testmodel.getPlannedStarttimeFirstSinglemeasure());
- assertEquals(mGm.getPlannedEndtimeLastSinglemeasure(), testmodel.getPlannedEndtimeLastSinglemeasure());
- assertEquals(mGm.getPlannedEndtimeGridmeasure(), testmodel.getPlannedEndtimeGridmeasure());
- assertEquals(mGm.getStarttimeFirstSequence(), testmodel.getStarttimeFirstSequence());
- assertEquals(mGm.getStarttimeFirstSinglemeasure(), testmodel.getStarttimeFirstSinglemeasure());
- assertEquals(mGm.getEndtimeLastSinglemeasure(), testmodel.getEndtimeLastSinglemeasure());
assertEquals(mGm.getEndtimeGridmeasure(), testmodel.getEndtimeGridmeasure());
assertEquals(mGm.getTimeOfReallocation(), testmodel.getTimeOfReallocation());
assertEquals(mGm.getDescription(), testmodel.getDescription());
@@ -250,13 +236,7 @@
assertEquals(vmGm.getAppointmentRepetition(), testVmodel.getAppointmentRepetition());
assertEquals(vmGm.getAppointmentStartdate(), testVmodel.getAppointmentStartdate());
assertEquals(vmGm.getAppointmentNumberOf(), testVmodel.getAppointmentNumberOf());
- assertEquals(vmGm.getPlannedStarttimeFirstSequence(), testVmodel.getPlannedStarttimeFirstSequence());
assertEquals(vmGm.getPlannedStarttimeFirstSinglemeasure(), testVmodel.getPlannedStarttimeFirstSinglemeasure());
- assertEquals(vmGm.getPlannedEndtimeLastSinglemeasure(), testVmodel.getPlannedEndtimeLastSinglemeasure());
- assertEquals(vmGm.getPlannedEndtimeGridmeasure(), testVmodel.getPlannedEndtimeGridmeasure());
- assertEquals(vmGm.getStarttimeFirstSequence(), testVmodel.getStarttimeFirstSequence());
- assertEquals(vmGm.getStarttimeFirstSinglemeasure(), testVmodel.getStarttimeFirstSinglemeasure());
- assertEquals(vmGm.getEndtimeLastSinglemeasure(), testVmodel.getEndtimeLastSinglemeasure());
assertEquals(vmGm.getEndtimeGridmeasure(), testVmodel.getEndtimeGridmeasure());
assertEquals(vmGm.getTimeOfReallocation(), testVmodel.getTimeOfReallocation());
assertEquals(vmGm.getDescription(), testVmodel.getDescription());
diff --git a/src/test/java/org/eclipse/openk/common/mapper/generic/GenericApiToDBMapperTest.java b/src/test/java/org/eclipse/openk/common/mapper/generic/GenericApiToDBMapperTest.java
index 5e83ade..7937cd5 100644
--- a/src/test/java/org/eclipse/openk/common/mapper/generic/GenericApiToDBMapperTest.java
+++ b/src/test/java/org/eclipse/openk/common/mapper/generic/GenericApiToDBMapperTest.java
@@ -1,14 +1,18 @@
-/**
- ******************************************************************************
- * Copyright © 2018 PTA GmbH.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
+/*
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
*
- * http://www.eclipse.org/legal/epl-v10.html
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
*
- ******************************************************************************
- */
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
+*/
+
package org.eclipse.openk.common.mapper.generic;
import static junit.framework.TestCase.assertEquals;
diff --git a/src/test/java/org/eclipse/openk/common/util/ResourceLoaderBaseTest.java b/src/test/java/org/eclipse/openk/common/util/ResourceLoaderBaseTest.java
index da883f5..430f2d0 100644
--- a/src/test/java/org/eclipse/openk/common/util/ResourceLoaderBaseTest.java
+++ b/src/test/java/org/eclipse/openk/common/util/ResourceLoaderBaseTest.java
@@ -1,14 +1,18 @@
-/**
- ******************************************************************************
- * Copyright © 2018 PTA GmbH.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
+/*
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
*
- * http://www.eclipse.org/legal/epl-v10.html
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
*
- ******************************************************************************
- */
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
+*/
+
package org.eclipse.openk.common.util;
import static org.junit.Assert.assertNotNull;
diff --git a/src/test/java/org/eclipse/openk/core/bpmn/base/BaseTaskImpl.java b/src/test/java/org/eclipse/openk/core/bpmn/base/BaseTaskImpl.java
index 78c7838..88f497e 100644
--- a/src/test/java/org/eclipse/openk/core/bpmn/base/BaseTaskImpl.java
+++ b/src/test/java/org/eclipse/openk/core/bpmn/base/BaseTaskImpl.java
@@ -1,14 +1,18 @@
-/**
- ******************************************************************************
- * Copyright © 2018 PTA GmbH.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
+/*
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
*
- * http://www.eclipse.org/legal/epl-v10.html
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
*
- ******************************************************************************
- */
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
+*/
+
package org.eclipse.openk.core.bpmn.base;
diff --git a/src/test/java/org/eclipse/openk/core/bpmn/base/DecisionTaskImpl.java b/src/test/java/org/eclipse/openk/core/bpmn/base/DecisionTaskImpl.java
index bd62fd7..3743afc 100644
--- a/src/test/java/org/eclipse/openk/core/bpmn/base/DecisionTaskImpl.java
+++ b/src/test/java/org/eclipse/openk/core/bpmn/base/DecisionTaskImpl.java
@@ -1,14 +1,18 @@
-/**
- ******************************************************************************
- * Copyright © 2018 PTA GmbH.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
+/*
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
*
- * http://www.eclipse.org/legal/epl-v10.html
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
*
- ******************************************************************************
- */
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
+*/
+
package org.eclipse.openk.core.bpmn.base;
import org.eclipse.openk.core.bpmn.base.tasks.DecisionTask;
diff --git a/src/test/java/org/eclipse/openk/core/bpmn/base/ProcessExceptionTest.java b/src/test/java/org/eclipse/openk/core/bpmn/base/ProcessExceptionTest.java
index f1a98c3..8214ad6 100644
--- a/src/test/java/org/eclipse/openk/core/bpmn/base/ProcessExceptionTest.java
+++ b/src/test/java/org/eclipse/openk/core/bpmn/base/ProcessExceptionTest.java
@@ -1,14 +1,18 @@
-/**
- ******************************************************************************
- * Copyright © 2018 PTA GmbH.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
+/*
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
*
- * http://www.eclipse.org/legal/epl-v10.html
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
*
- ******************************************************************************
- */
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
+*/
+
package org.eclipse.openk.core.bpmn.base;
import static junit.framework.TestCase.assertEquals;
diff --git a/src/test/java/org/eclipse/openk/core/bpmn/base/ProcessGridImpl.java b/src/test/java/org/eclipse/openk/core/bpmn/base/ProcessGridImpl.java
index 9516bec..f7160a0 100644
--- a/src/test/java/org/eclipse/openk/core/bpmn/base/ProcessGridImpl.java
+++ b/src/test/java/org/eclipse/openk/core/bpmn/base/ProcessGridImpl.java
@@ -1,14 +1,18 @@
-/**
- ******************************************************************************
- * Copyright © 2018 PTA GmbH.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
+/*
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
*
- * http://www.eclipse.org/legal/epl-v10.html
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
*
- ******************************************************************************
- */
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
+*/
+
package org.eclipse.openk.core.bpmn.base;
import org.eclipse.openk.core.bpmn.base.tasks.EndPointTask;
diff --git a/src/test/java/org/eclipse/openk/core/bpmn/base/ProcessStateImpl.java b/src/test/java/org/eclipse/openk/core/bpmn/base/ProcessStateImpl.java
index e416ef6..f13f13d 100644
--- a/src/test/java/org/eclipse/openk/core/bpmn/base/ProcessStateImpl.java
+++ b/src/test/java/org/eclipse/openk/core/bpmn/base/ProcessStateImpl.java
@@ -1,14 +1,18 @@
-/**
- ******************************************************************************
- * Copyright © 2018 PTA GmbH.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
+/*
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
*
- * http://www.eclipse.org/legal/epl-v10.html
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
*
- ******************************************************************************
- */
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
+*/
+
package org.eclipse.openk.core.bpmn.base;
public enum ProcessStateImpl implements ProcessState {
diff --git a/src/test/java/org/eclipse/openk/core/bpmn/base/ServiceTaskImpl.java b/src/test/java/org/eclipse/openk/core/bpmn/base/ServiceTaskImpl.java
index d8551d7..af27fb2 100644
--- a/src/test/java/org/eclipse/openk/core/bpmn/base/ServiceTaskImpl.java
+++ b/src/test/java/org/eclipse/openk/core/bpmn/base/ServiceTaskImpl.java
@@ -1,14 +1,18 @@
-/**
- ******************************************************************************
- * Copyright © 2018 PTA GmbH.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
+/*
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
*
- * http://www.eclipse.org/legal/epl-v10.html
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
*
- ******************************************************************************
- */
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
+*/
+
package org.eclipse.openk.core.bpmn.base;
import org.eclipse.openk.core.bpmn.base.tasks.ServiceTask;
diff --git a/src/test/java/org/eclipse/openk/core/bpmn/base/TestProcessSubject.java b/src/test/java/org/eclipse/openk/core/bpmn/base/TestProcessSubject.java
index 4a5141c..ea01f8f 100644
--- a/src/test/java/org/eclipse/openk/core/bpmn/base/TestProcessSubject.java
+++ b/src/test/java/org/eclipse/openk/core/bpmn/base/TestProcessSubject.java
@@ -1,14 +1,18 @@
-/**
- ******************************************************************************
- * Copyright © 2018 PTA GmbH.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
+/*
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
*
- * http://www.eclipse.org/legal/epl-v10.html
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
*
- ******************************************************************************
- */
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
+*/
+
package org.eclipse.openk.core.bpmn.base;
public class TestProcessSubject implements ProcessSubject {
diff --git a/src/test/java/org/eclipse/openk/core/bpmn/base/UserInteractionTaskImpl.java b/src/test/java/org/eclipse/openk/core/bpmn/base/UserInteractionTaskImpl.java
index 3175d56..c9c17c5 100644
--- a/src/test/java/org/eclipse/openk/core/bpmn/base/UserInteractionTaskImpl.java
+++ b/src/test/java/org/eclipse/openk/core/bpmn/base/UserInteractionTaskImpl.java
@@ -1,14 +1,18 @@
-/**
- ******************************************************************************
- * Copyright © 2018 PTA GmbH.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
+/*
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
*
- * http://www.eclipse.org/legal/epl-v10.html
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
*
- ******************************************************************************
- */
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
+*/
+
package org.eclipse.openk.core.bpmn.base;
diff --git a/src/test/java/org/eclipse/openk/core/bpmn/base/tasks/BaseTaskTest.java b/src/test/java/org/eclipse/openk/core/bpmn/base/tasks/BaseTaskTest.java
index 4e65167..b2e1778 100644
--- a/src/test/java/org/eclipse/openk/core/bpmn/base/tasks/BaseTaskTest.java
+++ b/src/test/java/org/eclipse/openk/core/bpmn/base/tasks/BaseTaskTest.java
@@ -1,14 +1,18 @@
-/**
- ******************************************************************************
- * Copyright © 2018 PTA GmbH.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
+/*
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
*
- * http://www.eclipse.org/legal/epl-v10.html
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
*
- ******************************************************************************
- */
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
+*/
+
package org.eclipse.openk.core.bpmn.base.tasks;
import static org.junit.Assert.assertEquals;
diff --git a/src/test/java/org/eclipse/openk/core/bpmn/base/tasks/DecideAnotherSinglemeasureTest.java b/src/test/java/org/eclipse/openk/core/bpmn/base/tasks/DecideAnotherSinglemeasureTest.java
index 17937b2..524cbbe 100644
--- a/src/test/java/org/eclipse/openk/core/bpmn/base/tasks/DecideAnotherSinglemeasureTest.java
+++ b/src/test/java/org/eclipse/openk/core/bpmn/base/tasks/DecideAnotherSinglemeasureTest.java
@@ -1,14 +1,18 @@
/*
- ******************************************************************************
- * Copyright © 2018 PTA GmbH.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
*
- * http://www.eclipse.org/legal/epl-v10.html
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
*
- ******************************************************************************
- */
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
+*/
+
package org.eclipse.openk.core.bpmn.base.tasks;
import static junit.framework.TestCase.assertEquals;
diff --git a/src/test/java/org/eclipse/openk/core/bpmn/base/tasks/DecideMeasureAppliedTest.java b/src/test/java/org/eclipse/openk/core/bpmn/base/tasks/DecideMeasureAppliedTest.java
index cd3994f..3cb2df5 100644
--- a/src/test/java/org/eclipse/openk/core/bpmn/base/tasks/DecideMeasureAppliedTest.java
+++ b/src/test/java/org/eclipse/openk/core/bpmn/base/tasks/DecideMeasureAppliedTest.java
@@ -1,14 +1,18 @@
/*
- ******************************************************************************
- * Copyright © 2018 PTA GmbH.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
*
- * http://www.eclipse.org/legal/epl-v10.html
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
*
- ******************************************************************************
- */
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
+*/
+
package org.eclipse.openk.core.bpmn.base.tasks;
import org.eclipse.openk.api.GridMeasure;
diff --git a/src/test/java/org/eclipse/openk/core/bpmn/base/tasks/DecideMeasureApprovedTest.java b/src/test/java/org/eclipse/openk/core/bpmn/base/tasks/DecideMeasureApprovedTest.java
index 1d7e2c5..93a9f16 100644
--- a/src/test/java/org/eclipse/openk/core/bpmn/base/tasks/DecideMeasureApprovedTest.java
+++ b/src/test/java/org/eclipse/openk/core/bpmn/base/tasks/DecideMeasureApprovedTest.java
@@ -1,14 +1,18 @@
/*
- * ***************************************************************************
- * Copyright © 2018 PTA GmbH.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
*
- * http://www.eclipse.org/legal/epl-v10.html
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
*
- * ***************************************************************************
- */
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
+*/
+
package org.eclipse.openk.core.bpmn.base.tasks;
import org.eclipse.openk.api.GridMeasure;
diff --git a/src/test/java/org/eclipse/openk/core/bpmn/base/tasks/DecideMeasureNotNeededOrRequestedTest.java b/src/test/java/org/eclipse/openk/core/bpmn/base/tasks/DecideMeasureNotNeededOrRequestedTest.java
index 8e36278..564a649 100644
--- a/src/test/java/org/eclipse/openk/core/bpmn/base/tasks/DecideMeasureNotNeededOrRequestedTest.java
+++ b/src/test/java/org/eclipse/openk/core/bpmn/base/tasks/DecideMeasureNotNeededOrRequestedTest.java
@@ -1,14 +1,18 @@
/*
- * ***************************************************************************
- * Copyright © 2018 PTA GmbH.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
*
- * http://www.eclipse.org/legal/epl-v10.html
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
*
- * ***************************************************************************
- */
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
+*/
+
package org.eclipse.openk.core.bpmn.base.tasks;
import org.eclipse.openk.api.GridMeasure;
diff --git a/src/test/java/org/eclipse/openk/core/bpmn/base/tasks/DecideMeasurePossibleTest.java b/src/test/java/org/eclipse/openk/core/bpmn/base/tasks/DecideMeasurePossibleTest.java
index 42d8b93..7c4ec8a 100644
--- a/src/test/java/org/eclipse/openk/core/bpmn/base/tasks/DecideMeasurePossibleTest.java
+++ b/src/test/java/org/eclipse/openk/core/bpmn/base/tasks/DecideMeasurePossibleTest.java
@@ -1,14 +1,18 @@
/*
- * ***************************************************************************
- * Copyright © 2018 PTA GmbH.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
*
- * http://www.eclipse.org/legal/epl-v10.html
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
*
- * ***************************************************************************
- */
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
+*/
+
package org.eclipse.openk.core.bpmn.base.tasks;
import org.eclipse.openk.api.GridMeasure;
import org.eclipse.openk.core.bpmn.base.ProcessException;
diff --git a/src/test/java/org/eclipse/openk/core/bpmn/base/tasks/DecideMeasureReleasedTest.java b/src/test/java/org/eclipse/openk/core/bpmn/base/tasks/DecideMeasureReleasedTest.java
index 614d6f0..c7739f4 100644
--- a/src/test/java/org/eclipse/openk/core/bpmn/base/tasks/DecideMeasureReleasedTest.java
+++ b/src/test/java/org/eclipse/openk/core/bpmn/base/tasks/DecideMeasureReleasedTest.java
@@ -1,14 +1,18 @@
/*
- * ***************************************************************************
- * Copyright © 2018 PTA GmbH.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
*
- * http://www.eclipse.org/legal/epl-v10.html
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
*
- * ***************************************************************************
- */
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
+*/
+
package org.eclipse.openk.core.bpmn.base.tasks;
import org.eclipse.openk.api.GridMeasure;
diff --git a/src/test/java/org/eclipse/openk/core/bpmn/base/tasks/DecideMeasureSavedTest.java b/src/test/java/org/eclipse/openk/core/bpmn/base/tasks/DecideMeasureSavedTest.java
index a94e614..ffdd2aa 100644
--- a/src/test/java/org/eclipse/openk/core/bpmn/base/tasks/DecideMeasureSavedTest.java
+++ b/src/test/java/org/eclipse/openk/core/bpmn/base/tasks/DecideMeasureSavedTest.java
@@ -1,14 +1,18 @@
/*
- ******************************************************************************
- * Copyright © 2018 PTA GmbH.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
*
- * http://www.eclipse.org/legal/epl-v10.html
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
*
- ******************************************************************************
- */
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
+*/
+
package org.eclipse.openk.core.bpmn.base.tasks;
import static junit.framework.TestCase.assertEquals;
diff --git a/src/test/java/org/eclipse/openk/core/bpmn/base/tasks/DecisionTaskTest.java b/src/test/java/org/eclipse/openk/core/bpmn/base/tasks/DecisionTaskTest.java
index f19f8b7..c742b26 100644
--- a/src/test/java/org/eclipse/openk/core/bpmn/base/tasks/DecisionTaskTest.java
+++ b/src/test/java/org/eclipse/openk/core/bpmn/base/tasks/DecisionTaskTest.java
@@ -1,14 +1,18 @@
-/**
- ******************************************************************************
- * Copyright © 2018 PTA GmbH.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
+/*
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
*
- * http://www.eclipse.org/legal/epl-v10.html
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
*
- ******************************************************************************
- */
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
+*/
+
package org.eclipse.openk.core.bpmn.base.tasks;
import static org.eclipse.openk.core.bpmn.base.tasks.DecisionTask.OutputPort.NO;
diff --git a/src/test/java/org/eclipse/openk/core/bpmn/base/tasks/EndpointTaskTest.java b/src/test/java/org/eclipse/openk/core/bpmn/base/tasks/EndpointTaskTest.java
index c13cbab..bd9981c 100644
--- a/src/test/java/org/eclipse/openk/core/bpmn/base/tasks/EndpointTaskTest.java
+++ b/src/test/java/org/eclipse/openk/core/bpmn/base/tasks/EndpointTaskTest.java
@@ -1,14 +1,18 @@
-/**
- ******************************************************************************
- * Copyright © 2018 PTA GmbH.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
+/*
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
*
- * http://www.eclipse.org/legal/epl-v10.html
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
*
- ******************************************************************************
- */
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
+*/
+
package org.eclipse.openk.core.bpmn.base.tasks;
diff --git a/src/test/java/org/eclipse/openk/core/bpmn/base/tasks/ServiceTaskTest.java b/src/test/java/org/eclipse/openk/core/bpmn/base/tasks/ServiceTaskTest.java
index f3b4f4b..3175a2a 100644
--- a/src/test/java/org/eclipse/openk/core/bpmn/base/tasks/ServiceTaskTest.java
+++ b/src/test/java/org/eclipse/openk/core/bpmn/base/tasks/ServiceTaskTest.java
@@ -1,14 +1,18 @@
-/**
- ******************************************************************************
- * Copyright © 2018 PTA GmbH.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
+/*
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
*
- * http://www.eclipse.org/legal/epl-v10.html
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
*
- ******************************************************************************
- */
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
+*/
+
package org.eclipse.openk.core.bpmn.base.tasks;
import static org.junit.Assert.assertTrue;
diff --git a/src/test/java/org/eclipse/openk/core/bpmn/base/tasks/UserInteractionTaskTest.java b/src/test/java/org/eclipse/openk/core/bpmn/base/tasks/UserInteractionTaskTest.java
index a8f9c0a..15722dc 100644
--- a/src/test/java/org/eclipse/openk/core/bpmn/base/tasks/UserInteractionTaskTest.java
+++ b/src/test/java/org/eclipse/openk/core/bpmn/base/tasks/UserInteractionTaskTest.java
@@ -1,14 +1,18 @@
-/**
- ******************************************************************************
- * Copyright © 2018 PTA GmbH.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
+/*
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
*
- * http://www.eclipse.org/legal/epl-v10.html
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
*
- ******************************************************************************
- */
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
+*/
+
package org.eclipse.openk.core.bpmn.base.tasks;
import static org.junit.Assert.assertFalse;
diff --git a/src/test/java/org/eclipse/openk/core/bpmn/gridmeasure/PlgmProcessSubjectTest.java b/src/test/java/org/eclipse/openk/core/bpmn/gridmeasure/PlgmProcessSubjectTest.java
index cb6c61b..23ecb23 100644
--- a/src/test/java/org/eclipse/openk/core/bpmn/gridmeasure/PlgmProcessSubjectTest.java
+++ b/src/test/java/org/eclipse/openk/core/bpmn/gridmeasure/PlgmProcessSubjectTest.java
@@ -1,14 +1,18 @@
-/**
- ******************************************************************************
- * Copyright © 2018 PTA GmbH.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
+/*
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
*
- * http://www.eclipse.org/legal/epl-v10.html
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
*
- ******************************************************************************
- */
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
+*/
+
package org.eclipse.openk.core.bpmn.gridmeasure;
import static junit.framework.TestCase.assertEquals;
diff --git a/src/test/java/org/eclipse/openk/core/bpmn/gridmeasure/tasks/ConfigDecisionTaskTest.java b/src/test/java/org/eclipse/openk/core/bpmn/gridmeasure/tasks/ConfigDecisionTaskTest.java
index 023e5b5..68e1c98 100644
--- a/src/test/java/org/eclipse/openk/core/bpmn/gridmeasure/tasks/ConfigDecisionTaskTest.java
+++ b/src/test/java/org/eclipse/openk/core/bpmn/gridmeasure/tasks/ConfigDecisionTaskTest.java
@@ -1,14 +1,18 @@
/*
- * ***************************************************************************
- * Copyright © 2018 PTA GmbH.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
*
- * http://www.eclipse.org/legal/epl-v10.html
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
*
- * ***************************************************************************
- */
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
+*/
+
package org.eclipse.openk.core.bpmn.gridmeasure.tasks;
import org.eclipse.openk.TestUtils.TestHelper;
diff --git a/src/test/java/org/eclipse/openk/core/bpmn/gridmeasure/tasks/MeasureForApprovalTest.java b/src/test/java/org/eclipse/openk/core/bpmn/gridmeasure/tasks/MeasureForApprovalTest.java
index 5fc16c6..388226c 100644
--- a/src/test/java/org/eclipse/openk/core/bpmn/gridmeasure/tasks/MeasureForApprovalTest.java
+++ b/src/test/java/org/eclipse/openk/core/bpmn/gridmeasure/tasks/MeasureForApprovalTest.java
@@ -1,14 +1,18 @@
/*
- ******************************************************************************
- * Copyright © 2018 PTA GmbH.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
*
- * http://www.eclipse.org/legal/epl-v10.html
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
*
- ******************************************************************************
- */
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
+*/
+
package org.eclipse.openk.core.bpmn.gridmeasure.tasks;
diff --git a/src/test/java/org/eclipse/openk/core/bpmn/gridmeasure/tasks/MeasureNewTest.java b/src/test/java/org/eclipse/openk/core/bpmn/gridmeasure/tasks/MeasureNewTest.java
index 92f1ab1..26e65ec 100644
--- a/src/test/java/org/eclipse/openk/core/bpmn/gridmeasure/tasks/MeasureNewTest.java
+++ b/src/test/java/org/eclipse/openk/core/bpmn/gridmeasure/tasks/MeasureNewTest.java
@@ -1,14 +1,18 @@
/*
-******************************************************************************
-* Copyright © 2018 PTA GmbH.
-* All rights reserved. This program and the accompanying materials
-* are made available under the terms of the Eclipse Public License v1.0
-* which accompanies this distribution, and is available at
-*
-* http://www.eclipse.org/legal/epl-v10.html
-*
-******************************************************************************
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
+ *
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
*/
+
package org.eclipse.openk.core.bpmn.gridmeasure.tasks;
import static junit.framework.TestCase.assertNotNull;
diff --git a/src/test/java/org/eclipse/openk/core/bpmn/gridmeasure/tasks/ServiceMeasureAppliedMessageQTest.java b/src/test/java/org/eclipse/openk/core/bpmn/gridmeasure/tasks/ServiceMeasureAppliedMessageQTest.java
index 08fc82f..55d86e7 100644
--- a/src/test/java/org/eclipse/openk/core/bpmn/gridmeasure/tasks/ServiceMeasureAppliedMessageQTest.java
+++ b/src/test/java/org/eclipse/openk/core/bpmn/gridmeasure/tasks/ServiceMeasureAppliedMessageQTest.java
@@ -1,15 +1,19 @@
-
/*
- * ***************************************************************************
- * Copyright © 2018 PTA GmbH.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
*
- * http://www.eclipse.org/legal/epl-v10.html
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
*
- * ***************************************************************************
- */
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
+*/
+
+
package org.eclipse.openk.core.bpmn.gridmeasure.tasks;
diff --git a/src/test/java/org/eclipse/openk/core/bpmn/gridmeasure/tasks/ServiceMeasureAppliedTest.java b/src/test/java/org/eclipse/openk/core/bpmn/gridmeasure/tasks/ServiceMeasureAppliedTest.java
index a06020c..fd084c6 100644
--- a/src/test/java/org/eclipse/openk/core/bpmn/gridmeasure/tasks/ServiceMeasureAppliedTest.java
+++ b/src/test/java/org/eclipse/openk/core/bpmn/gridmeasure/tasks/ServiceMeasureAppliedTest.java
@@ -1,15 +1,19 @@
-
/*
- * ***************************************************************************
- * Copyright © 2018 PTA GmbH.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
*
- * http://www.eclipse.org/legal/epl-v10.html
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
*
- * ***************************************************************************
- */
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
+*/
+
+
package org.eclipse.openk.core.bpmn.gridmeasure.tasks;
diff --git a/src/test/java/org/eclipse/openk/core/bpmn/gridmeasure/tasks/ServiceMeasureApprovedTest.java b/src/test/java/org/eclipse/openk/core/bpmn/gridmeasure/tasks/ServiceMeasureApprovedTest.java
index 335cb51..e56bdce 100644
--- a/src/test/java/org/eclipse/openk/core/bpmn/gridmeasure/tasks/ServiceMeasureApprovedTest.java
+++ b/src/test/java/org/eclipse/openk/core/bpmn/gridmeasure/tasks/ServiceMeasureApprovedTest.java
@@ -1,15 +1,19 @@
-
/*
- * ***************************************************************************
- * Copyright © 2018 PTA GmbH.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
*
- * http://www.eclipse.org/legal/epl-v10.html
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
*
- * ***************************************************************************
- */
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
+*/
+
+
package org.eclipse.openk.core.bpmn.gridmeasure.tasks;
diff --git a/src/test/java/org/eclipse/openk/core/bpmn/gridmeasure/tasks/ServiceMeasureCanceledTest.java b/src/test/java/org/eclipse/openk/core/bpmn/gridmeasure/tasks/ServiceMeasureCanceledTest.java
index 2068561..616dfa9 100644
--- a/src/test/java/org/eclipse/openk/core/bpmn/gridmeasure/tasks/ServiceMeasureCanceledTest.java
+++ b/src/test/java/org/eclipse/openk/core/bpmn/gridmeasure/tasks/ServiceMeasureCanceledTest.java
@@ -1,15 +1,19 @@
-
/*
- * ***************************************************************************
- * Copyright © 2018 PTA GmbH.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
*
- * http://www.eclipse.org/legal/epl-v10.html
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
*
- * ***************************************************************************
- */
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
+*/
+
+
package org.eclipse.openk.core.bpmn.gridmeasure.tasks;
diff --git a/src/test/java/org/eclipse/openk/core/bpmn/gridmeasure/tasks/ServiceMeasureClosedTest.java b/src/test/java/org/eclipse/openk/core/bpmn/gridmeasure/tasks/ServiceMeasureClosedTest.java
index dc9dce6..d55f0ec 100644
--- a/src/test/java/org/eclipse/openk/core/bpmn/gridmeasure/tasks/ServiceMeasureClosedTest.java
+++ b/src/test/java/org/eclipse/openk/core/bpmn/gridmeasure/tasks/ServiceMeasureClosedTest.java
@@ -1,15 +1,19 @@
-
/*
- * ***************************************************************************
- * Copyright © 2018 PTA GmbH.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
*
- * http://www.eclipse.org/legal/epl-v10.html
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
*
- * ***************************************************************************
- */
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
+*/
+
+
package org.eclipse.openk.core.bpmn.gridmeasure.tasks;
diff --git a/src/test/java/org/eclipse/openk/core/bpmn/gridmeasure/tasks/ServiceMeasureFinishedTest.java b/src/test/java/org/eclipse/openk/core/bpmn/gridmeasure/tasks/ServiceMeasureFinishedTest.java
index 7e02232..8074979 100644
--- a/src/test/java/org/eclipse/openk/core/bpmn/gridmeasure/tasks/ServiceMeasureFinishedTest.java
+++ b/src/test/java/org/eclipse/openk/core/bpmn/gridmeasure/tasks/ServiceMeasureFinishedTest.java
@@ -1,15 +1,19 @@
-
/*
- * ***************************************************************************
- * Copyright © 2018 PTA GmbH.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
*
- * http://www.eclipse.org/legal/epl-v10.html
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
*
- * ***************************************************************************
- */
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
+*/
+
+
package org.eclipse.openk.core.bpmn.gridmeasure.tasks;
diff --git a/src/test/java/org/eclipse/openk/core/bpmn/gridmeasure/tasks/ServiceMeasureForApprovalTest.java b/src/test/java/org/eclipse/openk/core/bpmn/gridmeasure/tasks/ServiceMeasureForApprovalTest.java
index 4f6127d..8ad2de0 100644
--- a/src/test/java/org/eclipse/openk/core/bpmn/gridmeasure/tasks/ServiceMeasureForApprovalTest.java
+++ b/src/test/java/org/eclipse/openk/core/bpmn/gridmeasure/tasks/ServiceMeasureForApprovalTest.java
@@ -1,15 +1,19 @@
-
/*
- * ***************************************************************************
- * Copyright © 2018 PTA GmbH.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
*
- * http://www.eclipse.org/legal/epl-v10.html
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
*
- * ***************************************************************************
- */
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
+*/
+
+
package org.eclipse.openk.core.bpmn.gridmeasure.tasks;
diff --git a/src/test/java/org/eclipse/openk/core/bpmn/gridmeasure/tasks/ServiceMeasureRejectedTest.java b/src/test/java/org/eclipse/openk/core/bpmn/gridmeasure/tasks/ServiceMeasureRejectedTest.java
index 0087f6f..b9b0b6f 100644
--- a/src/test/java/org/eclipse/openk/core/bpmn/gridmeasure/tasks/ServiceMeasureRejectedTest.java
+++ b/src/test/java/org/eclipse/openk/core/bpmn/gridmeasure/tasks/ServiceMeasureRejectedTest.java
@@ -1,15 +1,19 @@
-
/*
- * ***************************************************************************
- * Copyright © 2018 PTA GmbH.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
*
- * http://www.eclipse.org/legal/epl-v10.html
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
*
- * ***************************************************************************
- */
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
+*/
+
+
package org.eclipse.openk.core.bpmn.gridmeasure.tasks;
diff --git a/src/test/java/org/eclipse/openk/core/bpmn/gridmeasure/tasks/ServiceMeasureReleasedTest.java b/src/test/java/org/eclipse/openk/core/bpmn/gridmeasure/tasks/ServiceMeasureReleasedTest.java
index 3eabd21..564996c 100644
--- a/src/test/java/org/eclipse/openk/core/bpmn/gridmeasure/tasks/ServiceMeasureReleasedTest.java
+++ b/src/test/java/org/eclipse/openk/core/bpmn/gridmeasure/tasks/ServiceMeasureReleasedTest.java
@@ -1,15 +1,19 @@
-
/*
- * ***************************************************************************
- * Copyright © 2018 PTA GmbH.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
*
- * http://www.eclipse.org/legal/epl-v10.html
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
*
- * ***************************************************************************
- */
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
+*/
+
+
package org.eclipse.openk.core.bpmn.gridmeasure.tasks;
diff --git a/src/test/java/org/eclipse/openk/core/bpmn/gridmeasure/tasks/ServiceMeasureRequestedTest.java b/src/test/java/org/eclipse/openk/core/bpmn/gridmeasure/tasks/ServiceMeasureRequestedTest.java
index a0c4ebf..c4bb40f 100644
--- a/src/test/java/org/eclipse/openk/core/bpmn/gridmeasure/tasks/ServiceMeasureRequestedTest.java
+++ b/src/test/java/org/eclipse/openk/core/bpmn/gridmeasure/tasks/ServiceMeasureRequestedTest.java
@@ -1,15 +1,19 @@
-
/*
- * ***************************************************************************
- * Copyright © 2018 PTA GmbH.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
*
- * http://www.eclipse.org/legal/epl-v10.html
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
*
- * ***************************************************************************
- */
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
+*/
+
+
package org.eclipse.openk.core.bpmn.gridmeasure.tasks;
diff --git a/src/test/java/org/eclipse/openk/core/bpmn/gridmeasure/tasks/StoreStatusServiceTaskTest.java b/src/test/java/org/eclipse/openk/core/bpmn/gridmeasure/tasks/StoreStatusServiceTaskTest.java
index f5abb06..15b8a85 100644
--- a/src/test/java/org/eclipse/openk/core/bpmn/gridmeasure/tasks/StoreStatusServiceTaskTest.java
+++ b/src/test/java/org/eclipse/openk/core/bpmn/gridmeasure/tasks/StoreStatusServiceTaskTest.java
@@ -1,15 +1,19 @@
-
/*
- * ***************************************************************************
- * Copyright © 2018 PTA GmbH.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
*
- * http://www.eclipse.org/legal/epl-v10.html
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
*
- * ***************************************************************************
- */
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
+*/
+
+
package org.eclipse.openk.core.bpmn.gridmeasure.tasks;
diff --git a/src/test/java/org/eclipse/openk/core/bpmn/gridmeasure/tasks/UIStoreMeasureTaskTest.java b/src/test/java/org/eclipse/openk/core/bpmn/gridmeasure/tasks/UIStoreMeasureTaskTest.java
index c759acc..cd40e7d 100644
--- a/src/test/java/org/eclipse/openk/core/bpmn/gridmeasure/tasks/UIStoreMeasureTaskTest.java
+++ b/src/test/java/org/eclipse/openk/core/bpmn/gridmeasure/tasks/UIStoreMeasureTaskTest.java
@@ -1,14 +1,18 @@
/*
- ******************************************************************************
- * Copyright © 2018 PTA GmbH.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
*
- * http://www.eclipse.org/legal/epl-v10.html
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
*
- ******************************************************************************
- */
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
+*/
+
package org.eclipse.openk.core.bpmn.gridmeasure.tasks;
import static org.easymock.EasyMock.anyObject;
diff --git a/src/test/java/org/eclipse/openk/core/bpmn/gridmeasure/tasks/util/GridMeasureStorageHelperTest.java b/src/test/java/org/eclipse/openk/core/bpmn/gridmeasure/tasks/util/GridMeasureStorageHelperTest.java
index 00909fd..c32a78e 100644
--- a/src/test/java/org/eclipse/openk/core/bpmn/gridmeasure/tasks/util/GridMeasureStorageHelperTest.java
+++ b/src/test/java/org/eclipse/openk/core/bpmn/gridmeasure/tasks/util/GridMeasureStorageHelperTest.java
@@ -1,14 +1,18 @@
/*
- * ***************************************************************************
- * Copyright © 2018 PTA GmbH.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
*
- * http://www.eclipse.org/legal/epl-v10.html
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
*
- * ***************************************************************************
- */
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
+*/
+
package org.eclipse.openk.core.bpmn.gridmeasure.tasks.util;
import org.easymock.EasyMock;
diff --git a/src/test/java/org/eclipse/openk/core/bpmn/plgm/PlgmProcessStateTest.java b/src/test/java/org/eclipse/openk/core/bpmn/plgm/PlgmProcessStateTest.java
index f32a4e4..476c262 100644
--- a/src/test/java/org/eclipse/openk/core/bpmn/plgm/PlgmProcessStateTest.java
+++ b/src/test/java/org/eclipse/openk/core/bpmn/plgm/PlgmProcessStateTest.java
@@ -1,14 +1,18 @@
/*
- * ***************************************************************************
- * Copyright © 2018 PTA GmbH.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
*
- * http://www.eclipse.org/legal/epl-v10.html
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
*
- * ***************************************************************************
- */
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
+*/
+
package org.eclipse.openk.core.bpmn.plgm;
import org.eclipse.openk.core.bpmn.gridmeasure.PlgmProcessState;
diff --git a/src/test/java/org/eclipse/openk/core/bpmn/plgm/PlgmProcessSubjectTest.java b/src/test/java/org/eclipse/openk/core/bpmn/plgm/PlgmProcessSubjectTest.java
index 1ed212d..a7858d5 100644
--- a/src/test/java/org/eclipse/openk/core/bpmn/plgm/PlgmProcessSubjectTest.java
+++ b/src/test/java/org/eclipse/openk/core/bpmn/plgm/PlgmProcessSubjectTest.java
@@ -1,14 +1,18 @@
/*
-******************************************************************************
-* Copyright © 2018 PTA GmbH.
-* All rights reserved. This program and the accompanying materials
-* are made available under the terms of the Eclipse Public License v1.0
-* which accompanies this distribution, and is available at
-*
-* http://www.eclipse.org/legal/epl-v10.html
-*
-******************************************************************************
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
+ *
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
*/
+
package org.eclipse.openk.core.bpmn.plgm;
import static junit.framework.TestCase.assertEquals;
diff --git a/src/test/java/org/eclipse/openk/core/bpmn/plgm/ProcessGridTest.java b/src/test/java/org/eclipse/openk/core/bpmn/plgm/ProcessGridTest.java
index 174e3f9..c41f085 100644
--- a/src/test/java/org/eclipse/openk/core/bpmn/plgm/ProcessGridTest.java
+++ b/src/test/java/org/eclipse/openk/core/bpmn/plgm/ProcessGridTest.java
@@ -1,14 +1,18 @@
-/**
- ******************************************************************************
- * Copyright © 2018 PTA GmbH.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
+/*
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
*
- * http://www.eclipse.org/legal/epl-v10.html
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
*
- ******************************************************************************
- */
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
+*/
+
package org.eclipse.openk.core.bpmn.plgm;
import static junit.framework.TestCase.assertTrue;
diff --git a/src/test/java/org/eclipse/openk/core/communication/RestServiceWrapperTest.java b/src/test/java/org/eclipse/openk/core/communication/RestServiceWrapperTest.java
index 61377e7..54802ca 100644
--- a/src/test/java/org/eclipse/openk/core/communication/RestServiceWrapperTest.java
+++ b/src/test/java/org/eclipse/openk/core/communication/RestServiceWrapperTest.java
@@ -1,14 +1,18 @@
-/**
-******************************************************************************
-* Copyright © 2017-2018 PTA GmbH.
-* All rights reserved. This program and the accompanying materials
-* are made available under the terms of the Eclipse Public License v1.0
-* which accompanies this distribution, and is available at
-*
-* http://www.eclipse.org/legal/epl-v10.html
-*
-******************************************************************************
+/*
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
+ *
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
*/
+
package org.eclipse.openk.core.communication;
import org.eclipse.openk.core.exceptions.HttpStatusException;
diff --git a/src/test/java/org/eclipse/openk/core/controller/BaseWebServiceTest.java b/src/test/java/org/eclipse/openk/core/controller/BaseWebServiceTest.java
index ab2a8fd..6479ac7 100644
--- a/src/test/java/org/eclipse/openk/core/controller/BaseWebServiceTest.java
+++ b/src/test/java/org/eclipse/openk/core/controller/BaseWebServiceTest.java
@@ -1,14 +1,18 @@
-/**
-******************************************************************************
-* Copyright © 2018 PTA GmbH.
-* All rights reserved. This program and the accompanying materials
-* are made available under the terms of the Eclipse Public License v1.0
-* which accompanies this distribution, and is available at
-*
-* http://www.eclipse.org/legal/epl-v10.html
-*
-******************************************************************************
+/*
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
+ *
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
*/
+
package org.eclipse.openk.core.controller;
import static org.junit.Assert.assertEquals;
diff --git a/src/test/java/org/eclipse/openk/core/controller/EmailmanagerTest.java b/src/test/java/org/eclipse/openk/core/controller/EmailmanagerTest.java
index 65a7e37..02fa73d 100644
--- a/src/test/java/org/eclipse/openk/core/controller/EmailmanagerTest.java
+++ b/src/test/java/org/eclipse/openk/core/controller/EmailmanagerTest.java
@@ -1,14 +1,18 @@
/*
- * ***************************************************************************
- * Copyright © 2018 PTA GmbH.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
*
- * http://www.eclipse.org/legal/epl-v10.html
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
*
- * ***************************************************************************
- */
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
+*/
+
package org.eclipse.openk.core.controller;
import com.icegreen.greenmail.util.GreenMail;
diff --git a/src/test/java/org/eclipse/openk/core/controller/GridConfigButtonManipulatorTest.java b/src/test/java/org/eclipse/openk/core/controller/GridConfigButtonManipulatorTest.java
index 55576a0..ca0166b 100644
--- a/src/test/java/org/eclipse/openk/core/controller/GridConfigButtonManipulatorTest.java
+++ b/src/test/java/org/eclipse/openk/core/controller/GridConfigButtonManipulatorTest.java
@@ -1,14 +1,18 @@
/*
- * ***************************************************************************
- * Copyright © 2018 PTA GmbH.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
*
- * http://www.eclipse.org/legal/epl-v10.html
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
*
- * ***************************************************************************
- */
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
+*/
+
package org.eclipse.openk.core.controller;
import org.eclipse.openk.TestUtils.TestHelper;
diff --git a/src/test/java/org/eclipse/openk/core/controller/GridMeasureBackendControllerTest.java b/src/test/java/org/eclipse/openk/core/controller/GridMeasureBackendControllerTest.java
index eb0337b..bc691a5 100644
--- a/src/test/java/org/eclipse/openk/core/controller/GridMeasureBackendControllerTest.java
+++ b/src/test/java/org/eclipse/openk/core/controller/GridMeasureBackendControllerTest.java
@@ -1,27 +1,26 @@
/*
- * ***************************************************************************
- * Copyright © 2018 PTA GmbH.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
*
- * http://www.eclipse.org/legal/epl-v10.html
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
*
- * ***************************************************************************
- */
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
+*/
+
package org.eclipse.openk.core.controller;
+import junit.framework.TestCase;
import org.apache.http.HttpStatus;
import org.easymock.EasyMock;
import org.eclipse.openk.PlannedGridMeasuresConfiguration.EmailConfiguration;
import org.eclipse.openk.TestUtils.TestHelper;
-import org.eclipse.openk.api.Document;
-import org.eclipse.openk.api.FilterObject;
-import org.eclipse.openk.api.GridMeasure;
-import org.eclipse.openk.api.HGridMeasure;
-import org.eclipse.openk.api.Lock;
-import org.eclipse.openk.api.SingleGridmeasure;
-import org.eclipse.openk.api.VersionInfo;
+import org.eclipse.openk.api.*;
import org.eclipse.openk.api.mail.EmailTemplatePaths;
import org.eclipse.openk.core.bpmn.base.ProcessException;
import org.eclipse.openk.core.bpmn.base.ProcessGrid;
@@ -30,23 +29,8 @@
import org.eclipse.openk.core.bpmn.gridmeasure.PlgmProcessState;
import org.eclipse.openk.core.bpmn.gridmeasure.PlgmProcessSubject;
import org.eclipse.openk.core.exceptions.HttpStatusException;
-import org.eclipse.openk.db.dao.AutoCloseEntityManager;
-import org.eclipse.openk.db.dao.HTblGridMeasureDao;
-import org.eclipse.openk.db.dao.RefVersionDao;
-import org.eclipse.openk.db.dao.TblDocumentsDao;
-import org.eclipse.openk.db.dao.TblGridMeasureDao;
-import org.eclipse.openk.db.dao.TblLockDao;
-import org.eclipse.openk.db.dao.TblMeasureDocumentsDao;
-import org.eclipse.openk.db.dao.TblSingleGridmeasureDao;
-import org.eclipse.openk.db.dao.TblStepsDao;
-import org.eclipse.openk.db.model.HTblGridMeasure;
-import org.eclipse.openk.db.model.RefVersion;
-import org.eclipse.openk.db.model.TblDocuments;
-import org.eclipse.openk.db.model.TblGridMeasure;
-import org.eclipse.openk.db.model.TblLock;
-import org.eclipse.openk.db.model.TblMeasureDocuments;
-import org.eclipse.openk.db.model.TblSingleGridmeasure;
-import org.eclipse.openk.db.model.TblSteps;
+import org.eclipse.openk.db.dao.*;
+import org.eclipse.openk.db.model.*;
import org.eclipse.openk.resources.PlannedGridMeasuresResource;
import org.junit.Before;
import org.junit.Ignore;
@@ -296,6 +280,16 @@
mailAddressesList.add("testuser2@test.com, testuser3@test.com");
mailAddressesList.add("testuser3@test.com, testuser4@test.com");
+ List<String> userDepartmentsCreatedList = new ArrayList<>();
+ userDepartmentsCreatedList.add("Department abc");
+ userDepartmentsCreatedList.add("Department def");
+ userDepartmentsCreatedList.add("Department ghi");
+
+ List<String> userDepartmentsModifiedList = new ArrayList<>();
+ userDepartmentsModifiedList.add("Department jkl");
+ userDepartmentsModifiedList.add("Department mno");
+ userDepartmentsModifiedList.add("Department pqr");
+
TblGridMeasureDao dao = EasyMock.createMock(TblGridMeasureDao.class);
expect( dao.findByIdInTx(anyObject(), anyInt())).andReturn(mList.get(0)).anyTimes();
@@ -311,6 +305,10 @@
expect(dao.getMailAddressesFromGridmeasures()).andReturn(mailAddressesList).anyTimes();
+ expect(dao.getUserDepartmentsCreated()).andReturn(userDepartmentsCreatedList).anyTimes();
+ expect(dao.getUserDepartmentsModified()).andReturn(userDepartmentsModifiedList).anyTimes();
+
+
replay( dao );
verify( dao );
return dao;
@@ -377,11 +375,24 @@
mSgm1.setCimId("2");
mList.add(mSgm1);
+ List<String> userDepartments = new ArrayList<String>();
+ userDepartments.add("Truppe1");
+ userDepartments.add("Truppe2");
+ userDepartments.add("Truppe3");
+
+ List<String> networkControls = new ArrayList<String>();
+ networkControls.add("Heinz XY");
+ networkControls.add("Manne ZZ");
+ networkControls.add("Heidi AB");
+
TblSingleGridmeasureDao dao = EasyMock.createMock(TblSingleGridmeasureDao.class);
expect( dao.findByIdInTx(anyObject(), anyInt())).andReturn(mList.get(0)).anyTimes();
expect( dao.findById(anyObject(), anyInt())).andReturn(mList.get(0)).anyTimes();
- expect( dao.getSingleGridmeasuresByGmIdInTx(1)).andReturn(mList).anyTimes();
+ expect( dao.getSingleGridmeasuresByGmIdInTx(anyInt())).andReturn(mList).anyTimes();
expect( dao.getSingleGridmeasuresInTx()).andReturn(mList).anyTimes();
+ expect( dao.getUserDepartmentsResponsibleOnSite()).andReturn(userDepartments).anyTimes();
+ expect( dao.getNetworkControls()).andReturn(userDepartments).anyTimes();
+
replay( dao );
verify( dao );
return dao;
@@ -1246,4 +1257,66 @@
be.tblSingleGridmeasureDao = daoMock;
assertEquals( be.getResponsiblesOnSiteFromSingleGridmeasures().size(), 3 );
}
+
+
+ @Test
+ public void testGetCalender() {
+
+ TestableGridMeasureBackendController be = new TestableGridMeasureBackendController();
+
+ TblGridMeasureDao mockedGmDao = createTblGridMeasureDao();
+ be.tblGridMeasureDao = mockedGmDao;
+
+ TblSingleGridmeasureDao mockedSgmDao = createTblSingleGridmeasureDao();
+ be.tblSingleGridmeasureDao = mockedSgmDao;
+
+ assertEquals( be.getCalender().size(),5);
+
+ }
+
+ @Test
+ public void testGetUserDepartmentsResponsibleOnSite() throws Exception {
+ TblSingleGridmeasureDao dao = createTblSingleGridmeasureDao();
+ GridMeasureBackendControllerTest.TestableGridMeasureBackendController tbc = new GridMeasureBackendControllerTest.TestableGridMeasureBackendController();
+ tbc.tblSingleGridmeasureDao = dao;
+
+ List<String> retList = tbc.getUserDepartmentsResponsibleOnSite();
+ List<String> orgList = dao.getUserDepartmentsResponsibleOnSite();
+ TestCase.assertEquals(orgList.size(), retList.size());
+ }
+
+ @Test
+ public void testGetUserDepartmentsCreated() throws Exception {
+ TblGridMeasureDao dao = createTblGridMeasureDao();
+ GridMeasureBackendControllerTest.TestableGridMeasureBackendController tbc = new GridMeasureBackendControllerTest.TestableGridMeasureBackendController();
+ tbc.tblGridMeasureDao = dao;
+
+ List<String> retList = tbc.getUserDepartmentsCreated();
+ List<String> orgList = dao.getUserDepartmentsCreated();
+ TestCase.assertEquals(orgList.size(), retList.size());
+ }
+
+ @Test
+ public void testGetUserDepartmentsModified() throws Exception {
+ TblGridMeasureDao dao = createTblGridMeasureDao();
+ GridMeasureBackendControllerTest.TestableGridMeasureBackendController tbc = new GridMeasureBackendControllerTest.TestableGridMeasureBackendController();
+ tbc.tblGridMeasureDao = dao;
+
+ List<String> retList = tbc.getUserDepartmentsModified();
+ List<String> orgList = dao.getUserDepartmentsModified();
+ TestCase.assertEquals(orgList.size(), retList.size());
+ }
+
+ @Test
+ public void testGetNetworkControlsFromSingleGridmeasures() throws Exception {
+ TblSingleGridmeasureDao dao = createTblSingleGridmeasureDao();
+ GridMeasureBackendControllerTest.TestableGridMeasureBackendController tbc = new GridMeasureBackendControllerTest.TestableGridMeasureBackendController();
+ tbc.tblSingleGridmeasureDao = dao;
+
+ List<String> retList = tbc.getNetworkControlsFromSingleGridmeasures();
+ List<String> orgList = dao.getNetworkControls();
+ TestCase.assertEquals(orgList.size(), retList.size());
+ }
+
+
}
diff --git a/src/test/java/org/eclipse/openk/core/controller/MailAddressCacheTimerTaskTest.java b/src/test/java/org/eclipse/openk/core/controller/MailAddressCacheTimerTaskTest.java
index 84f93e4..546a27a 100644
--- a/src/test/java/org/eclipse/openk/core/controller/MailAddressCacheTimerTaskTest.java
+++ b/src/test/java/org/eclipse/openk/core/controller/MailAddressCacheTimerTaskTest.java
@@ -1,14 +1,18 @@
/*
- * ***************************************************************************
- * Copyright © 2018 PTA GmbH.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
*
- * http://www.eclipse.org/legal/epl-v10.html
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
*
- * ***************************************************************************
- */
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
+*/
+
package org.eclipse.openk.core.controller;
import org.easymock.EasyMock;
diff --git a/src/test/java/org/eclipse/openk/core/controller/MasterDataBackendControllerTest.java b/src/test/java/org/eclipse/openk/core/controller/MasterDataBackendControllerTest.java
index 3f7c143..8b9636b 100644
--- a/src/test/java/org/eclipse/openk/core/controller/MasterDataBackendControllerTest.java
+++ b/src/test/java/org/eclipse/openk/core/controller/MasterDataBackendControllerTest.java
@@ -1,14 +1,18 @@
-/**
- ******************************************************************************
- * Copyright © 2018 PTA GmbH.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
+/*
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
*
- * http://www.eclipse.org/legal/epl-v10.html
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
*
- ******************************************************************************
- */
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
+*/
+
package org.eclipse.openk.core.controller;
import static junit.framework.TestCase.assertEquals;
@@ -70,7 +74,6 @@
public RefGmStatusDao statusDao;
public RefBranchDao branchDao;
public RefBranchLevelDao branchLevelDao;
- public RefUserDepartmentDao userDepartmentDao;
public RefTerritoryDao territoryDao;
public RefCostCenterDao costCenterDao;
public TblUserSettingsDao userSettingsDao;
@@ -133,16 +136,6 @@
}
}
- @Override
- protected RefUserDepartmentDao createRefUserDepartmentDao( EntityManager em ) {
- if( userDepartmentDao != null ) {
- return userDepartmentDao;
- }
- else {
- return super.createRefUserDepartmentDao(em);
- }
- }
-
@Override
protected RefCostCenterDao createRefCostCenterDao( EntityManager em ) {
@@ -296,31 +289,6 @@
return dao;
}
- private RefUserDepartmentDao createRefUserDepartmentDao() {
-
- java.util.List<RefUserDepartment> mList = new ArrayList<RefUserDepartment>();
-
- RefUserDepartment refUserDepartment1 = new RefUserDepartment();
- refUserDepartment1.setId(1);
- refUserDepartment1.setName("Testname1");
- mList.add(refUserDepartment1);
-
- RefUserDepartment refUserDepartment2 = new RefUserDepartment();
- refUserDepartment2.setId(2);
- refUserDepartment2.setName("Testname2");
- mList.add(refUserDepartment2);
-
- RefUserDepartment refUserDepartment3 = new RefUserDepartment();
- refUserDepartment3.setId(3);
- refUserDepartment3.setName("Testname3");
- mList.add(refUserDepartment3);
-
- RefUserDepartmentDao dao = EasyMock.createMock(RefUserDepartmentDao.class);
- expect( dao.getUserDepartmentsInTx() ).andReturn(mList).anyTimes();
- replay( dao );
- verify( dao );
- return dao;
- }
private RefTerritoryDao createRefTerritoryDao() {
@@ -451,18 +419,6 @@
assertEquals(orgList.get(1).getName(), retList.get(1).getName());
}
- @Test
- public void testGetUserDepartments() throws Exception {
- RefUserDepartmentDao dao = createRefUserDepartmentDao();
- MasterDataBackendControllerTest.TestableMasterDataBackendController tbc = new MasterDataBackendControllerTest.TestableMasterDataBackendController();
- tbc.userDepartmentDao = dao;
-
- List<UserDepartment> retList = tbc.getUserDepartments();
- List<RefUserDepartment> orgList = dao.getUserDepartmentsInTx();
- assertEquals(orgList.size(), retList.size());
- assertEquals(orgList.get(2).getId(), retList.get(2).getId());
- assertEquals(orgList.get(1).getName(), retList.get(1).getName());
- }
@Test
public void testGetTerritories() throws Exception {
diff --git a/src/test/java/org/eclipse/openk/core/controller/PgmEmailTest.java b/src/test/java/org/eclipse/openk/core/controller/PgmEmailTest.java
index 5f8f8fc..9bd3029 100644
--- a/src/test/java/org/eclipse/openk/core/controller/PgmEmailTest.java
+++ b/src/test/java/org/eclipse/openk/core/controller/PgmEmailTest.java
@@ -1,14 +1,18 @@
/*
- * ***************************************************************************
- * Copyright © 2018 PTA GmbH.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
*
- * http://www.eclipse.org/legal/epl-v10.html
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
*
- * ***************************************************************************
- */
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
+*/
+
package org.eclipse.openk.core.controller;
import org.easymock.EasyMock;
diff --git a/src/test/java/org/eclipse/openk/core/controller/ResponseBuilderWrapperTest.java b/src/test/java/org/eclipse/openk/core/controller/ResponseBuilderWrapperTest.java
index 5d03a80..387c299 100644
--- a/src/test/java/org/eclipse/openk/core/controller/ResponseBuilderWrapperTest.java
+++ b/src/test/java/org/eclipse/openk/core/controller/ResponseBuilderWrapperTest.java
@@ -1,14 +1,18 @@
/*
-******************************************************************************
-* Copyright © 2018 PTA GmbH.
-* All rights reserved. This program and the accompanying materials
-* are made available under the terms of the Eclipse Public License v1.0
-* which accompanies this distribution, and is available at
-*
-* http://www.eclipse.org/legal/epl-v10.html
-*
-******************************************************************************
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
+ *
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
*/
+
package org.eclipse.openk.core.controller;
import static org.junit.Assert.assertEquals;
diff --git a/src/test/java/org/eclipse/openk/core/controller/TokenManagerTest.java b/src/test/java/org/eclipse/openk/core/controller/TokenManagerTest.java
index 2ce8f54..e296b85 100644
--- a/src/test/java/org/eclipse/openk/core/controller/TokenManagerTest.java
+++ b/src/test/java/org/eclipse/openk/core/controller/TokenManagerTest.java
@@ -1,14 +1,18 @@
/*
-******************************************************************************
-* Copyright © 2018 PTA GmbH.
-* All rights reserved. This program and the accompanying materials
-* are made available under the terms of the Eclipse Public License v1.0
-* which accompanies this distribution, and is available at
-*
-* http://www.eclipse.org/legal/epl-v10.html
-*
-******************************************************************************
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
+ *
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
*/
+
package org.eclipse.openk.core.controller;
import org.eclipse.openk.TestUtils.TestHelper;
diff --git a/src/test/java/org/eclipse/openk/core/exceptions/HttpStatusExceptionTest.java b/src/test/java/org/eclipse/openk/core/exceptions/HttpStatusExceptionTest.java
index 541ef71..bdcce37 100644
--- a/src/test/java/org/eclipse/openk/core/exceptions/HttpStatusExceptionTest.java
+++ b/src/test/java/org/eclipse/openk/core/exceptions/HttpStatusExceptionTest.java
@@ -1,14 +1,18 @@
/*
-******************************************************************************
-* Copyright © 2018 PTA GmbH.
-* All rights reserved. This program and the accompanying materials
-* are made available under the terms of the Eclipse Public License v1.0
-* which accompanies this distribution, and is available at
-*
-* http://www.eclipse.org/legal/epl-v10.html
-*
-******************************************************************************
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
+ *
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
*/
+
package org.eclipse.openk.core.exceptions;
import static org.junit.Assert.assertEquals;
diff --git a/src/test/java/org/eclipse/openk/core/exceptions/PgmExceptionMapperTest.java b/src/test/java/org/eclipse/openk/core/exceptions/PgmExceptionMapperTest.java
index dfbad42..7884ce8 100644
--- a/src/test/java/org/eclipse/openk/core/exceptions/PgmExceptionMapperTest.java
+++ b/src/test/java/org/eclipse/openk/core/exceptions/PgmExceptionMapperTest.java
@@ -1,14 +1,18 @@
/*
-******************************************************************************
-* Copyright © 2018 PTA GmbH.
-* All rights reserved. This program and the accompanying materials
-* are made available under the terms of the Eclipse Public License v1.0
-* which accompanies this distribution, and is available at
-*
-* http://www.eclipse.org/legal/epl-v10.html
-*
-******************************************************************************
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
+ *
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
*/
+
package org.eclipse.openk.core.exceptions;
diff --git a/src/test/java/org/eclipse/openk/core/exceptions/PgmExceptionsTest.java b/src/test/java/org/eclipse/openk/core/exceptions/PgmExceptionsTest.java
index b4b1a66..5448582 100644
--- a/src/test/java/org/eclipse/openk/core/exceptions/PgmExceptionsTest.java
+++ b/src/test/java/org/eclipse/openk/core/exceptions/PgmExceptionsTest.java
@@ -1,14 +1,18 @@
/*
-******************************************************************************
-* Copyright © 2018 PTA GmbH.
-* All rights reserved. This program and the accompanying materials
-* are made available under the terms of the Eclipse Public License v1.0
-* which accompanies this distribution, and is available at
-*
-* http://www.eclipse.org/legal/epl-v10.html
-*
-******************************************************************************
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
+ *
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
*/
+
package org.eclipse.openk.core.exceptions;
import static org.junit.Assert.assertEquals;
diff --git a/src/test/java/org/eclipse/openk/db/model/HTblGridMeasureTest.java b/src/test/java/org/eclipse/openk/db/model/HTblGridMeasureTest.java
index 7c2cb1a..b9c4103 100644
--- a/src/test/java/org/eclipse/openk/db/model/HTblGridMeasureTest.java
+++ b/src/test/java/org/eclipse/openk/db/model/HTblGridMeasureTest.java
@@ -1,14 +1,18 @@
/*
- * ***************************************************************************
- * Copyright © 2018 PTA GmbH.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
*
- * http://www.eclipse.org/legal/epl-v10.html
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
*
- * ***************************************************************************
- */
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
+*/
+
package org.eclipse.openk.db.model;
import org.junit.Test;
@@ -79,41 +83,11 @@
hTblGridMeasure.setAppointmentNumberOf(5);
assertEquals((Integer)5, hTblGridMeasure.getAppointmentNumberOf());
- java.time.LocalDateTime ldtPlannedStarttimeFirstSequence = java.time.LocalDateTime.parse("2018-04-23T19:00:00");
- java.sql.Timestamp tsPlannedStarttimeFirstSequence = java.sql.Timestamp.valueOf(ldtPlannedStarttimeFirstSequence);
- hTblGridMeasure.setPlannedStarttimeFirstSequence(tsPlannedStarttimeFirstSequence);
- org.junit.Assert.assertEquals(tsPlannedStarttimeFirstSequence, hTblGridMeasure.getPlannedStarttimeFirstSequence());
-
java.time.LocalDateTime ldtPlannedStarttimeFirstSinglemeasure = java.time.LocalDateTime.parse("2018-04-24T20:00:00");
java.sql.Timestamp tsPlannedStarttimeFirstSinglemeasure = java.sql.Timestamp.valueOf(ldtPlannedStarttimeFirstSinglemeasure);
hTblGridMeasure.setPlannedStarttimeFirstSinglemeasure(tsPlannedStarttimeFirstSinglemeasure);
org.junit.Assert.assertEquals(tsPlannedStarttimeFirstSinglemeasure, hTblGridMeasure.getPlannedStarttimeFirstSinglemeasure());
- java.time.LocalDateTime ldtPlannedEndtimeLastSinglemeasure = java.time.LocalDateTime.parse("2018-04-25T21:00:00");
- java.sql.Timestamp tsPlannedEndtimeLastSinglemeasure = java.sql.Timestamp.valueOf(ldtPlannedEndtimeLastSinglemeasure);
- hTblGridMeasure.setPlannedEndtimeLastSinglemeasure(tsPlannedEndtimeLastSinglemeasure);
- org.junit.Assert.assertEquals(tsPlannedEndtimeLastSinglemeasure, hTblGridMeasure.getPlannedEndtimeLastSinglemeasure());
-
- java.time.LocalDateTime ldtPlannedEndtimeGridmeasure = java.time.LocalDateTime.parse("2018-04-26T22:00:00");
- java.sql.Timestamp tsPlannedEndtimeGridmeasure = java.sql.Timestamp.valueOf(ldtPlannedEndtimeGridmeasure);
- hTblGridMeasure.setPlannedEndtimeGridmeasure(tsPlannedEndtimeGridmeasure);
- org.junit.Assert.assertEquals(tsPlannedEndtimeGridmeasure, hTblGridMeasure.getPlannedEndtimeGridmeasure());
-
- java.time.LocalDateTime ldtStarttimeFirstSequence = java.time.LocalDateTime.parse("2018-04-27T23:00:00");
- java.sql.Timestamp tsStarttimeFirstSequence = java.sql.Timestamp.valueOf(ldtStarttimeFirstSequence);
- hTblGridMeasure.setStarttimeFirstSequence(tsStarttimeFirstSequence);
- org.junit.Assert.assertEquals(tsStarttimeFirstSequence, hTblGridMeasure.getStarttimeFirstSequence());
-
- java.time.LocalDateTime ldtStarttimeFirstSinglemeasure = java.time.LocalDateTime.parse("2018-04-28T01:00:00");
- java.sql.Timestamp tsStarttimeFirstSinglemeasure = java.sql.Timestamp.valueOf(ldtStarttimeFirstSinglemeasure);
- hTblGridMeasure.setStarttimeFirstSinglemeasure(tsStarttimeFirstSinglemeasure);
- org.junit.Assert.assertEquals(tsStarttimeFirstSinglemeasure, hTblGridMeasure.getStarttimeFirstSinglemeasure());
-
- java.time.LocalDateTime ldtEndtimeLastSinglemeasure = java.time.LocalDateTime.parse("2018-04-29T02:00:00");
- java.sql.Timestamp tsEndtimeLastSinglemeasure = java.sql.Timestamp.valueOf(ldtEndtimeLastSinglemeasure);
- hTblGridMeasure.setEndtimeLastSinglemeasure(tsEndtimeLastSinglemeasure);
- org.junit.Assert.assertEquals(tsEndtimeLastSinglemeasure, hTblGridMeasure.getEndtimeLastSinglemeasure());
-
java.time.LocalDateTime ldtEndtimeGridmeasure = java.time.LocalDateTime.parse("2018-04-30T03:00:00");
java.sql.Timestamp tsEndtimeGridmeasure = java.sql.Timestamp.valueOf(ldtEndtimeGridmeasure);
hTblGridMeasure.setEndtimeGridmeasure(tsEndtimeGridmeasure);
diff --git a/src/test/java/org/eclipse/openk/db/model/RefBranchLevelTest.java b/src/test/java/org/eclipse/openk/db/model/RefBranchLevelTest.java
index 63c53f1..0bec77c 100644
--- a/src/test/java/org/eclipse/openk/db/model/RefBranchLevelTest.java
+++ b/src/test/java/org/eclipse/openk/db/model/RefBranchLevelTest.java
@@ -1,14 +1,18 @@
/*
- ******************************************************************************
- * Copyright © 2018 PTA GmbH.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
*
- * http://www.eclipse.org/legal/epl-v10.html
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
*
- ******************************************************************************
- */
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
+*/
+
package org.eclipse.openk.db.model;
diff --git a/src/test/java/org/eclipse/openk/db/model/RefBranchTest.java b/src/test/java/org/eclipse/openk/db/model/RefBranchTest.java
index 21763ae..639a8cf 100644
--- a/src/test/java/org/eclipse/openk/db/model/RefBranchTest.java
+++ b/src/test/java/org/eclipse/openk/db/model/RefBranchTest.java
@@ -1,14 +1,18 @@
/*
- ******************************************************************************
- * Copyright © 2018 PTA GmbH.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
*
- * http://www.eclipse.org/legal/epl-v10.html
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
*
- ******************************************************************************
- */
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
+*/
+
package org.eclipse.openk.db.model;
diff --git a/src/test/java/org/eclipse/openk/db/model/RefCostCenterTest.java b/src/test/java/org/eclipse/openk/db/model/RefCostCenterTest.java
index 3f72091..b09c6b4 100644
--- a/src/test/java/org/eclipse/openk/db/model/RefCostCenterTest.java
+++ b/src/test/java/org/eclipse/openk/db/model/RefCostCenterTest.java
@@ -1,14 +1,18 @@
/*
- ******************************************************************************
- * Copyright © 2018 PTA GmbH.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
*
- * http://www.eclipse.org/legal/epl-v10.html
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
*
- ******************************************************************************
- */
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
+*/
+
package org.eclipse.openk.db.model;
@@ -50,4 +54,4 @@
assertEquals("Mirko Modifier", refCostCenter.getModUser());
}
-}
\ No newline at end of file
+}
diff --git a/src/test/java/org/eclipse/openk/db/model/RefGmStatusTest.java b/src/test/java/org/eclipse/openk/db/model/RefGmStatusTest.java
index ff41fa1..40a5c46 100644
--- a/src/test/java/org/eclipse/openk/db/model/RefGmStatusTest.java
+++ b/src/test/java/org/eclipse/openk/db/model/RefGmStatusTest.java
@@ -1,14 +1,18 @@
/*
- ******************************************************************************
- * Copyright © 2018 PTA GmbH.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
*
- * http://www.eclipse.org/legal/epl-v10.html
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
*
- ******************************************************************************
- */
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
+*/
+
package org.eclipse.openk.db.model;
@@ -30,6 +34,9 @@
refGmStatus.setName("Statusname");
assertEquals("Statusname", refGmStatus.getName());
+ refGmStatus.setColorCode("#111111");
+ assertEquals("#111111", refGmStatus.getColorCode());
+
java.time.LocalDateTime ldtCreated = java.time.LocalDateTime.parse("2018-03-20T15:00:00");
java.sql.Timestamp tsCreated = java.sql.Timestamp.valueOf(ldtCreated);
refGmStatus.setCreateDate(tsCreated);
diff --git a/src/test/java/org/eclipse/openk/db/model/RefTerritoryTest.java b/src/test/java/org/eclipse/openk/db/model/RefTerritoryTest.java
index 2c8c712..90e3744 100644
--- a/src/test/java/org/eclipse/openk/db/model/RefTerritoryTest.java
+++ b/src/test/java/org/eclipse/openk/db/model/RefTerritoryTest.java
@@ -1,14 +1,18 @@
/*
- * ***************************************************************************
- * Copyright © 2018 PTA GmbH.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
*
- * http://www.eclipse.org/legal/epl-v10.html
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
*
- * ***************************************************************************
- */
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
+*/
+
package org.eclipse.openk.db.model;
import org.junit.Test;
diff --git a/src/test/java/org/eclipse/openk/db/model/RefUserDepartmentTest.java b/src/test/java/org/eclipse/openk/db/model/RefUserDepartmentTest.java
deleted file mode 100644
index b8a3a20..0000000
--- a/src/test/java/org/eclipse/openk/db/model/RefUserDepartmentTest.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- ******************************************************************************
- * Copyright © 2018 PTA GmbH.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- *
- * http://www.eclipse.org/legal/epl-v10.html
- *
- ******************************************************************************
- */
-package org.eclipse.openk.db.model;
-
-
-import static org.junit.Assert.assertEquals;
-
-import org.junit.Test;
-
-
-public class RefUserDepartmentTest {
-
- @Test
- public void testGettersAndSetters() {
-
- RefUserDepartment refUserDepartment = new RefUserDepartment();
-
- refUserDepartment.setId(6);
- assertEquals((Integer)6, refUserDepartment.getId());
-
- refUserDepartment.setName("UserDepartmentName");
- assertEquals("UserDepartmentName", refUserDepartment.getName());
-
- java.time.LocalDateTime ldtCreated = java.time.LocalDateTime.parse("2018-04-16T13:00:00");
- java.sql.Timestamp tsCreated = java.sql.Timestamp.valueOf(ldtCreated);
- refUserDepartment.setCreateDate(tsCreated);
- org.junit.Assert.assertEquals(tsCreated, refUserDepartment.getCreateDate());
-
- refUserDepartment.setCreateUser("Cathie Creator");
- assertEquals("Cathie Creator", refUserDepartment.getCreateUser());
-
- java.time.LocalDateTime ldtModified = java.time.LocalDateTime.parse("2018-04-16T14:00:00");
- java.sql.Timestamp tsModified = java.sql.Timestamp.valueOf(ldtModified);
- refUserDepartment.setModDate(tsModified);
- org.junit.Assert.assertEquals(tsModified, refUserDepartment.getModDate());
-
- refUserDepartment.setModUser("Martin Modifier");
- assertEquals("Martin Modifier", refUserDepartment.getModUser());
-
- }
-}
diff --git a/src/test/java/org/eclipse/openk/db/model/RefUserSettingsTest.java b/src/test/java/org/eclipse/openk/db/model/RefUserSettingsTest.java
index e4d21b9..a5c8200 100644
--- a/src/test/java/org/eclipse/openk/db/model/RefUserSettingsTest.java
+++ b/src/test/java/org/eclipse/openk/db/model/RefUserSettingsTest.java
@@ -1,14 +1,18 @@
/*
- ******************************************************************************
- * Copyright © 2018 PTA GmbH.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
*
- * http://www.eclipse.org/legal/epl-v10.html
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
*
- ******************************************************************************
- */
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
+*/
+
package org.eclipse.openk.db.model;
import static org.junit.Assert.assertEquals;
diff --git a/src/test/java/org/eclipse/openk/db/model/RefVersionTest.java b/src/test/java/org/eclipse/openk/db/model/RefVersionTest.java
index 5d37e80..ec8346d 100644
--- a/src/test/java/org/eclipse/openk/db/model/RefVersionTest.java
+++ b/src/test/java/org/eclipse/openk/db/model/RefVersionTest.java
@@ -1,14 +1,18 @@
/*
-******************************************************************************
-* Copyright © 2018 PTA GmbH.
-* All rights reserved. This program and the accompanying materials
-* are made available under the terms of the Eclipse Public License v1.0
-* which accompanies this distribution, and is available at
-*
-* http://www.eclipse.org/legal/epl-v10.html
-*
-******************************************************************************
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
+ *
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
*/
+
package org.eclipse.openk.db.model;
import static org.junit.Assert.assertEquals;
@@ -30,4 +34,4 @@
assertEquals("version54", refVersion.getVersion());
}
-}
\ No newline at end of file
+}
diff --git a/src/test/java/org/eclipse/openk/db/model/TblDocumentsTest.java b/src/test/java/org/eclipse/openk/db/model/TblDocumentsTest.java
index ef9ae4f..73a1d6f 100644
--- a/src/test/java/org/eclipse/openk/db/model/TblDocumentsTest.java
+++ b/src/test/java/org/eclipse/openk/db/model/TblDocumentsTest.java
@@ -1,14 +1,18 @@
/*
- ******************************************************************************
- * Copyright © 2018 PTA GmbH.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
*
- * http://www.eclipse.org/legal/epl-v10.html
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
*
- ******************************************************************************
- */
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
+*/
+
package org.eclipse.openk.db.model;
diff --git a/src/test/java/org/eclipse/openk/db/model/TblGridMeasureTest.java b/src/test/java/org/eclipse/openk/db/model/TblGridMeasureTest.java
index 6e459cb..1727bfc 100644
--- a/src/test/java/org/eclipse/openk/db/model/TblGridMeasureTest.java
+++ b/src/test/java/org/eclipse/openk/db/model/TblGridMeasureTest.java
@@ -1,14 +1,18 @@
-/**
- ******************************************************************************
- * Copyright © 2018 PTA GmbH.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
+/*
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
*
- * http://www.eclipse.org/legal/epl-v10.html
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
*
- ******************************************************************************
- */
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
+*/
+
package org.eclipse.openk.db.model;
import static junit.framework.TestCase.assertEquals;
@@ -67,41 +71,11 @@
tblGridmeasure.setAppointmentNumberOf(5);
- java.time.LocalDateTime ldtPlannedStarttimeFirstSequence = java.time.LocalDateTime.parse("2018-04-23T19:00:00");
- java.sql.Timestamp tsPlannedStarttimeFirstSequence = java.sql.Timestamp.valueOf(ldtPlannedStarttimeFirstSequence);
- tblGridmeasure.setPlannedStarttimeFirstSequence(tsPlannedStarttimeFirstSequence);
- org.junit.Assert.assertEquals(tsPlannedStarttimeFirstSequence, tblGridmeasure.getPlannedStarttimeFirstSequence());
-
java.time.LocalDateTime ldtPlannedStarttimeFirstSinglemeasure = java.time.LocalDateTime.parse("2018-04-24T20:00:00");
java.sql.Timestamp tsPlannedStarttimeFirstSinglemeasure = java.sql.Timestamp.valueOf(ldtPlannedStarttimeFirstSinglemeasure);
tblGridmeasure.setPlannedStarttimeFirstSinglemeasure(tsPlannedStarttimeFirstSinglemeasure);
org.junit.Assert.assertEquals(tsPlannedStarttimeFirstSinglemeasure, tblGridmeasure.getPlannedStarttimeFirstSinglemeasure());
- java.time.LocalDateTime ldtPlannedEndtimeLastSinglemeasure = java.time.LocalDateTime.parse("2018-04-25T21:00:00");
- java.sql.Timestamp tsPlannedEndtimeLastSinglemeasure = java.sql.Timestamp.valueOf(ldtPlannedEndtimeLastSinglemeasure);
- tblGridmeasure.setPlannedEndtimeLastSinglemeasure(tsPlannedEndtimeLastSinglemeasure);
- org.junit.Assert.assertEquals(tsPlannedEndtimeLastSinglemeasure, tblGridmeasure.getPlannedEndtimeLastSinglemeasure());
-
- java.time.LocalDateTime ldtPlannedEndtimeGridmeasure = java.time.LocalDateTime.parse("2018-04-26T22:00:00");
- java.sql.Timestamp tsPlannedEndtimeGridmeasure = java.sql.Timestamp.valueOf(ldtPlannedEndtimeGridmeasure);
- tblGridmeasure.setPlannedEndtimeGridmeasure(tsPlannedEndtimeGridmeasure);
- org.junit.Assert.assertEquals(tsPlannedEndtimeGridmeasure, tblGridmeasure.getPlannedEndtimeGridmeasure());
-
- java.time.LocalDateTime ldtStarttimeFirstSequence = java.time.LocalDateTime.parse("2018-04-27T23:00:00");
- java.sql.Timestamp tsStarttimeFirstSequence = java.sql.Timestamp.valueOf(ldtStarttimeFirstSequence);
- tblGridmeasure.setStarttimeFirstSequence(tsStarttimeFirstSequence);
- org.junit.Assert.assertEquals(tsStarttimeFirstSequence, tblGridmeasure.getStarttimeFirstSequence());
-
- java.time.LocalDateTime ldtStarttimeFirstSinglemeasure = java.time.LocalDateTime.parse("2018-04-28T01:00:00");
- java.sql.Timestamp tsStarttimeFirstSinglemeasure = java.sql.Timestamp.valueOf(ldtStarttimeFirstSinglemeasure);
- tblGridmeasure.setStarttimeFirstSinglemeasure(tsStarttimeFirstSinglemeasure);
- org.junit.Assert.assertEquals(tsStarttimeFirstSinglemeasure, tblGridmeasure.getStarttimeFirstSinglemeasure());
-
- java.time.LocalDateTime ldtEndtimeLastSinglemeasure = java.time.LocalDateTime.parse("2018-04-29T02:00:00");
- java.sql.Timestamp tsEndtimeLastSinglemeasure = java.sql.Timestamp.valueOf(ldtEndtimeLastSinglemeasure);
- tblGridmeasure.setEndtimeLastSinglemeasure(tsEndtimeLastSinglemeasure);
- org.junit.Assert.assertEquals(tsEndtimeLastSinglemeasure, tblGridmeasure.getEndtimeLastSinglemeasure());
-
java.time.LocalDateTime ldtEndtimeGridmeasure = java.time.LocalDateTime.parse("2018-04-30T03:00:00");
java.sql.Timestamp tsEndtimeGridmeasure = java.sql.Timestamp.valueOf(ldtEndtimeGridmeasure);
tblGridmeasure.setEndtimeGridmeasure(tsEndtimeGridmeasure);
diff --git a/src/test/java/org/eclipse/openk/db/model/TblIdCounterTest.java b/src/test/java/org/eclipse/openk/db/model/TblIdCounterTest.java
index 2ca7744..2ca6ac7 100644
--- a/src/test/java/org/eclipse/openk/db/model/TblIdCounterTest.java
+++ b/src/test/java/org/eclipse/openk/db/model/TblIdCounterTest.java
@@ -1,14 +1,18 @@
/*
- ******************************************************************************
- * Copyright © 2018 PTA GmbH.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
*
- * http://www.eclipse.org/legal/epl-v10.html
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
*
- ******************************************************************************
- */
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
+*/
+
package org.eclipse.openk.db.model;
diff --git a/src/test/java/org/eclipse/openk/db/model/TblLockTest.java b/src/test/java/org/eclipse/openk/db/model/TblLockTest.java
index c1349dc..977efc2 100644
--- a/src/test/java/org/eclipse/openk/db/model/TblLockTest.java
+++ b/src/test/java/org/eclipse/openk/db/model/TblLockTest.java
@@ -1,14 +1,18 @@
/*
- ******************************************************************************
- * Copyright © 2018 PTA GmbH.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
*
- * http://www.eclipse.org/legal/epl-v10.html
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
*
- ******************************************************************************
- */
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
+*/
+
package org.eclipse.openk.db.model;
diff --git a/src/test/java/org/eclipse/openk/db/model/TblMeasureDocumentsTest.java b/src/test/java/org/eclipse/openk/db/model/TblMeasureDocumentsTest.java
index fa953f2..cc89a26 100644
--- a/src/test/java/org/eclipse/openk/db/model/TblMeasureDocumentsTest.java
+++ b/src/test/java/org/eclipse/openk/db/model/TblMeasureDocumentsTest.java
@@ -1,14 +1,18 @@
/*
- ******************************************************************************
- * Copyright © 2018 PTA GmbH.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
*
- * http://www.eclipse.org/legal/epl-v10.html
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
*
- ******************************************************************************
- */
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
+*/
+
package org.eclipse.openk.db.model;
diff --git a/src/test/java/org/eclipse/openk/db/model/TblSingleGridMeasureTest.java b/src/test/java/org/eclipse/openk/db/model/TblSingleGridMeasureTest.java
index f5f1b06..b2a82eb 100644
--- a/src/test/java/org/eclipse/openk/db/model/TblSingleGridMeasureTest.java
+++ b/src/test/java/org/eclipse/openk/db/model/TblSingleGridMeasureTest.java
@@ -1,14 +1,18 @@
/*
- * ***************************************************************************
- * Copyright © 2018 PTA GmbH.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
*
- * http://www.eclipse.org/legal/epl-v10.html
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
*
- * ***************************************************************************
- */
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
+*/
+
package org.eclipse.openk.db.model;
import org.junit.Test;
diff --git a/src/test/java/org/eclipse/openk/db/model/TblStepsTest.java b/src/test/java/org/eclipse/openk/db/model/TblStepsTest.java
index b9fc157..9993112 100644
--- a/src/test/java/org/eclipse/openk/db/model/TblStepsTest.java
+++ b/src/test/java/org/eclipse/openk/db/model/TblStepsTest.java
@@ -1,14 +1,18 @@
/*
- * ***************************************************************************
- * Copyright © 2018 PTA GmbH.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
*
- * http://www.eclipse.org/legal/epl-v10.html
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
*
- * ***************************************************************************
- */
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
+*/
+
package org.eclipse.openk.db.model;
import org.junit.Test;
diff --git a/src/test/java/org/eclipse/openk/health/DBIsPresentHealthCheckTest.java b/src/test/java/org/eclipse/openk/health/DBIsPresentHealthCheckTest.java
index 3a95378..c8fed57 100644
--- a/src/test/java/org/eclipse/openk/health/DBIsPresentHealthCheckTest.java
+++ b/src/test/java/org/eclipse/openk/health/DBIsPresentHealthCheckTest.java
@@ -1,14 +1,18 @@
-/**
-******************************************************************************
-* Copyright © 2018 PTA GmbH.
-* All rights reserved. This program and the accompanying materials
-* are made available under the terms of the Eclipse Public License v1.0
-* which accompanies this distribution, and is available at
-*
-* http://www.eclipse.org/legal/epl-v10.html
-*
-******************************************************************************
+/*
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
+ *
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
*/
+
package org.eclipse.openk.health;
import static junit.framework.TestCase.assertFalse;
diff --git a/src/test/java/org/eclipse/openk/health/MailConfigurationHealthCheckTest.java b/src/test/java/org/eclipse/openk/health/MailConfigurationHealthCheckTest.java
index 7f9fc49..eeb9444 100644
--- a/src/test/java/org/eclipse/openk/health/MailConfigurationHealthCheckTest.java
+++ b/src/test/java/org/eclipse/openk/health/MailConfigurationHealthCheckTest.java
@@ -1,14 +1,18 @@
/*
- * ***************************************************************************
- * Copyright © 2018 PTA GmbH.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
*
- * http://www.eclipse.org/legal/epl-v10.html
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
*
- * ***************************************************************************
- */
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
+*/
+
package org.eclipse.openk.health;
diff --git a/src/test/java/org/eclipse/openk/health/MailServerPresentHealthCheckTest.java b/src/test/java/org/eclipse/openk/health/MailServerPresentHealthCheckTest.java
index cb55b13..eaee992 100644
--- a/src/test/java/org/eclipse/openk/health/MailServerPresentHealthCheckTest.java
+++ b/src/test/java/org/eclipse/openk/health/MailServerPresentHealthCheckTest.java
@@ -1,14 +1,18 @@
/*
- * ***************************************************************************
- * Copyright © 2018 PTA GmbH.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
*
- * http://www.eclipse.org/legal/epl-v10.html
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
*
- * ***************************************************************************
- */
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
+*/
+
package org.eclipse.openk.health;
diff --git a/src/test/java/org/eclipse/openk/resources/MasterDataResourceTest.java b/src/test/java/org/eclipse/openk/resources/MasterDataResourceTest.java
index 053a32a..766ee05 100644
--- a/src/test/java/org/eclipse/openk/resources/MasterDataResourceTest.java
+++ b/src/test/java/org/eclipse/openk/resources/MasterDataResourceTest.java
@@ -1,14 +1,18 @@
/*
- ******************************************************************************
- * Copyright © 2018 PTA GmbH.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
*
- * http://www.eclipse.org/legal/epl-v10.html
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
*
- ******************************************************************************
- */
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
+*/
+
package org.eclipse.openk.resources;
import org.easymock.EasyMock;
@@ -50,11 +54,6 @@
}
@Test
- public void testGetUserDepartments() {
- Response r = new MasterDataResource().getUserDepartments("LET_ME_IN");
- assertNotNull( r );
- }
- @Test
public void testGetBranchLevels() {
Response r = new MasterDataResource().getBranchLevelsByBranch("LET_ME_IN", "1");
assertNotNull( r );
@@ -127,23 +126,5 @@
- /*@Test
- public void testUploadDocuments() {
- InputStream is = new InputStream() {
- @Override
- public int read() throws IOException {
- return 0;
- }
- };
- FormDataContentDisposition fdcd = null;
- java.time.LocalDateTime ldtCreated = java.time.LocalDateTime.parse("2018-04-20T16:00:00");
- try {
- fdcd = new FormDataContentDisposition("header", "name", "boom.txt", ldtCreated, ldtCreated, ldtCreated, 4);
- } catch (ParseException e) {
- e.printStackTrace();
- }
- Response r = new MasterDataResource().uploadGridMeasureAttachments("token", is, fdcd);
- assertNotNull( r );
- }*/
}
diff --git a/src/test/java/org/eclipse/openk/resources/PlannedGridMeasureConfigurationTest.java b/src/test/java/org/eclipse/openk/resources/PlannedGridMeasureConfigurationTest.java
index 7363d9e..acf0393 100644
--- a/src/test/java/org/eclipse/openk/resources/PlannedGridMeasureConfigurationTest.java
+++ b/src/test/java/org/eclipse/openk/resources/PlannedGridMeasureConfigurationTest.java
@@ -1,14 +1,18 @@
/*
- ******************************************************************************
- * Copyright © 2018 PTA GmbH.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
*
- * http://www.eclipse.org/legal/epl-v10.html
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
*
- ******************************************************************************
- */
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
+*/
+
package org.eclipse.openk.resources;
import static org.junit.Assert.assertEquals;
diff --git a/src/test/java/org/eclipse/openk/resources/PlannedGridMeasuresResourcesTest.java b/src/test/java/org/eclipse/openk/resources/PlannedGridMeasuresResourcesTest.java
index d7b1877..e9ab81b 100644
--- a/src/test/java/org/eclipse/openk/resources/PlannedGridMeasuresResourcesTest.java
+++ b/src/test/java/org/eclipse/openk/resources/PlannedGridMeasuresResourcesTest.java
@@ -1,14 +1,18 @@
/*
- * ***************************************************************************
- * Copyright © 2018 PTA GmbH.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
*
- * http://www.eclipse.org/legal/epl-v10.html
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
*
- * ***************************************************************************
- */
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
+*/
+
package org.eclipse.openk.resources;
import org.eclipse.openk.TestUtils.TestHelper;
@@ -22,6 +26,8 @@
import javax.ws.rs.core.Response;
+import java.util.List;
+
import static junit.framework.TestCase.assertNotNull;
import static org.junit.Assert.assertEquals;
@@ -173,7 +179,25 @@
@Test
public void testGetResponsiblesOnSiteFromGridmeasures() {
- Response r = new PlannedGridMeasuresResource().getResponsiblesOnSiteFromGridmeasures("LET_ME_IN");
+ Response r = new PlannedGridMeasuresResource().getResponsiblesOnSiteFromSingleGridmeasures("LET_ME_IN");
+ assertNotNull( r );
+ }
+
+ @Test
+ public void testGetUserDepartmentsResponsibleOnSite() {
+ Response r = new PlannedGridMeasuresResource().getUserDepartmentsResponsibleOnSite("LET_ME_IN");
+ assertNotNull( r );
+ }
+
+ @Test
+ public void testGetUserDepartmentsCreated() {
+ Response r = new PlannedGridMeasuresResource().getUserDepartmentsCreated("LET_ME_IN");
+ assertNotNull( r );
+ }
+
+ @Test
+ public void testGetUserDepartmentsModified() {
+ Response r = new PlannedGridMeasuresResource().getUserDepartmentsModified("LET_ME_IN");
assertNotNull( r );
}
@@ -183,4 +207,10 @@
assertNotNull( r );
}
+ @Test
+ public void testGetCalender() {
+ Response r = new PlannedGridMeasuresResource().getCalender("LET_ME_IN");
+ assertNotNull( r );
+ }
+
}
diff --git a/src/test/java/org/eclipse/openk/viewmodel/ErrorReturnTest.java b/src/test/java/org/eclipse/openk/viewmodel/ErrorReturnTest.java
index 864b211..9d83d0e 100644
--- a/src/test/java/org/eclipse/openk/viewmodel/ErrorReturnTest.java
+++ b/src/test/java/org/eclipse/openk/viewmodel/ErrorReturnTest.java
@@ -1,14 +1,18 @@
/*
-******************************************************************************
-* Copyright © 2018 PTA GmbH.
-* All rights reserved. This program and the accompanying materials
-* are made available under the terms of the Eclipse Public License v1.0
-* which accompanies this distribution, and is available at
-*
-* http://www.eclipse.org/legal/epl-v10.html
-*
-******************************************************************************
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
+ *
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
*/
+
package org.eclipse.openk.viewmodel;
import static org.eclipse.openk.common.JsonGeneratorBase.getGson;
diff --git a/src/test/java/org/eclipse/openk/viewmodel/GeneralReturnItemTest.java b/src/test/java/org/eclipse/openk/viewmodel/GeneralReturnItemTest.java
index b866a5a..d36d8e7 100644
--- a/src/test/java/org/eclipse/openk/viewmodel/GeneralReturnItemTest.java
+++ b/src/test/java/org/eclipse/openk/viewmodel/GeneralReturnItemTest.java
@@ -1,14 +1,18 @@
/*
-******************************************************************************
-* Copyright © 2018 PTA GmbH.
-* All rights reserved. This program and the accompanying materials
-* are made available under the terms of the Eclipse Public License v1.0
-* which accompanies this distribution, and is available at
-*
-* http://www.eclipse.org/legal/epl-v10.html
-*
-******************************************************************************
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
+ *
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
*/
+
package org.eclipse.openk.viewmodel;
import static org.junit.Assert.assertEquals;