Skip to content
This repository was archived by the owner on Jul 1, 2025. It is now read-only.

Commit 4df10bc

Browse files
committed
Merge pull request #63 from jateeter/master
Made RetailCustomer Inherit from IdentifiedObject - DB Seed Changes
2 parents 865f3d3 + 31606d0 commit 4df10bc

File tree

6 files changed

+85
-20
lines changed

6 files changed

+85
-20
lines changed

etc/ThirdPartyMySQL.sql

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -568,6 +568,14 @@ DROP TABLE IF EXISTS `retail_customers`;
568568
/*!40101 SET character_set_client = utf8 */;
569569
CREATE TABLE `retail_customers` (
570570
`id` bigint(20) NOT NULL AUTO_INCREMENT,
571+
`description` varchar(255) DEFAULT NULL,
572+
`published` datetime DEFAULT NULL,
573+
`self_link_href` varchar(255) DEFAULT NULL,
574+
`self_link_rel` varchar(255) DEFAULT NULL,
575+
`up_link_href` varchar(255) DEFAULT NULL,
576+
`up_link_rel` varchar(255) DEFAULT NULL,
577+
`updated` datetime DEFAULT NULL,
578+
`uuid` varchar(255) NOT NULL,
571579
`enabled` tinyint(1) NOT NULL,
572580
`first_name` varchar(30) NOT NULL,
573581
`last_name` varchar(30) NOT NULL,

src/main/resources/db/ci-populateDB.sql

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,21 @@ INSERT INTO service_categories (kind) VALUES (8);
1212
INSERT INTO service_categories (kind) VALUES (9);
1313

1414
/* Add retail customers */
15-
INSERT INTO retail_customers (username, first_name, last_name, password, enabled, role) VALUES ('alan', 'Alan', 'Turing', 'koala', TRUE, 'ROLE_USER');
16-
INSERT INTO retail_customers (username, first_name, last_name, password, enabled, role) VALUES ('joe', 'Joe', 'Black', 'koala', TRUE, 'ROLE_USER');
17-
INSERT INTO retail_customers (username, first_name, last_name, password, enabled, role) VALUES ('sam', 'Sam', 'White', 'koala', TRUE, 'ROLE_USER');
18-
INSERT INTO retail_customers (username, first_name, last_name, password, enabled, role) VALUES ('grace', 'Grace', 'Hopper', 'koala', TRUE, 'ROLE_CUSTODIAN');
15+
INSERT INTO retail_customers (`id`,`description`,`published`,`self_link_href`,`self_link_rel`,`up_link_href`,`up_link_rel`,`updated`,`uuid`, enabled, username, first_name, last_name, password, role) VALUES (1, '', '2014-01-02 05:00:00', '/RetailCustomer/1','self','/RetailCustomer','up','2014-01-02 05:00:00','116E8B03-0299-467E-972A-A883ECDCC575', TRUE, 'alan', 'Alan', 'Turing', 'koala', 'ROLE_USER');
16+
INSERT INTO retail_customers (`id`,`description`,`published`,`self_link_href`,`self_link_rel`,`up_link_href`,`up_link_rel`,`updated`,`uuid`, enabled, username, first_name, last_name, password, role) VALUES (2, '', '2014-01-02 05:00:00', '/RetailCustomer/1','self','/RetailCustomer','up','2014-01-02 05:00:00','216E8B03-0299-467E-972A-A883ECDCC575', TRUE, 'donald', 'Donald', 'Knuth','koala', 'ROLE_USER');
17+
INSERT INTO retail_customers (`id`,`description`,`published`,`self_link_href`,`self_link_rel`,`up_link_href`,`up_link_rel`,`updated`,`uuid`, enabled, username, first_name, last_name, password, role) VALUES (3, '', '2014-01-02 05:00:00', '/RetailCustomer/1','self','/RetailCustomer','up','2014-01-02 05:00:00','316E8B03-0299-467E-972A-A883ECDCC575', TRUE, 'paul', 'Paul', 'Dirac', 'koala', 'ROLE_USER');
18+
INSERT INTO retail_customers (`id`,`description`,`published`,`self_link_href`,`self_link_rel`,`up_link_href`,`up_link_rel`,`updated`,`uuid`, enabled, username, first_name, last_name, password, role) VALUES (4, '', '2014-01-02 05:00:00', '/RetailCustomer/1','self','/RetailCustomer','up','2014-01-02 05:00:00','416E8B03-0299-467E-972A-A883ECDCC575', TRUE, 'alonzo', 'Alonzo', 'Church', 'koala', 'ROLE_USER');
19+
INSERT INTO retail_customers (`id`,`description`,`published`,`self_link_href`,`self_link_rel`,`up_link_href`,`up_link_rel`,`updated`,`uuid`, enabled, username, first_name, last_name, password, role) VALUES (5, '', '2014-01-02 05:00:00', '/RetailCustomer/1','self','/RetailCustomer','up','2014-01-02 05:00:00','516E8B03-0299-467E-972A-A883ECDCC575', TRUE, 'charles', 'Charles', 'Babbage', 'koala', 'ROLE_USER');
20+
INSERT INTO retail_customers (`id`,`description`,`published`,`self_link_href`,`self_link_rel`,`up_link_href`,`up_link_rel`,`updated`,`uuid`, enabled, username, first_name, last_name, password, role) VALUES (6, '', '2014-01-02 05:00:00', '/RetailCustomer/1','self','/RetailCustomer','up','2014-01-02 05:00:00','616E8B03-0299-467E-972A-A883ECDCC575', TRUE, 'john', 'John', 'von Neumann', 'koala', 'ROLE_USER');
21+
INSERT INTO retail_customers (`id`,`description`,`published`,`self_link_href`,`self_link_rel`,`up_link_href`,`up_link_rel`,`updated`,`uuid`, enabled, username, first_name, last_name, password, role) VALUES (7, '', '2014-01-02 05:00:00', '/RetailCustomer/1','self','/RetailCustomer','up','2014-01-02 05:00:00','716E8B03-0299-467E-972A-A883ECDCC575', TRUE, 'marian', 'Marian', 'Rejewski', 'koala', 'ROLE_USER');
22+
INSERT INTO retail_customers (`id`,`description`,`published`,`self_link_href`,`self_link_rel`,`up_link_href`,`up_link_rel`,`updated`,`uuid`, enabled, username, first_name, last_name, password, role) VALUES (8, '', '2014-01-02 05:00:00', '/RetailCustomer/1','self','/RetailCustomer','up','2014-01-02 05:00:00','816E8B03-0299-467E-972A-A883ECDCC575', TRUE, 'vinny', 'Vint', 'Koala', 'koala', 'ROLE_USER');
23+
INSERT INTO retail_customers (`id`,`description`,`published`,`self_link_href`,`self_link_rel`,`up_link_href`,`up_link_rel`,`updated`,`uuid`, enabled, username, first_name, last_name, password, role) VALUES (9, '', '2014-01-02 05:00:00', '/RetailCustomer/1','self','/RetailCustomer','up','2014-01-02 05:00:00','916E8B03-0299-467E-972A-A883ECDCC575', TRUE, 'johnny', 'Johnny', 'Koala', 'koala', 'ROLE_USER');
24+
INSERT INTO retail_customers (`id`,`description`,`published`,`self_link_href`,`self_link_rel`,`up_link_href`,`up_link_rel`,`updated`,`uuid`, enabled, username, first_name, last_name, password, role) VALUES (10, '', '2014-01-02 05:00:00', '/RetailCustomer/1','self','/RetailCustomer','up','2014-01-02 05:00:00','A16E8B03-0299-467E-972A-A883ECDCC575', TRUE, 'don', 'Don', 'Koala', 'koala', 'ROLE_USER');
25+
INSERT INTO retail_customers (`id`,`description`,`published`,`self_link_href`,`self_link_rel`,`up_link_href`,`up_link_rel`,`updated`,`uuid`, enabled, username, first_name, last_name, password, role) VALUES (11, '', '2014-01-02 05:00:00', '/RetailCustomer/1','self','/RetailCustomer','up','2014-01-02 05:00:00','B16E8B03-0299-467E-972A-A883ECDCC575', TRUE, 'marty', 'Marty', 'Koala', 'koala', 'ROLE_USER');
26+
INSERT INTO retail_customers (`id`,`description`,`published`,`self_link_href`,`self_link_rel`,`up_link_href`,`up_link_rel`,`updated`,`uuid`, enabled, username, first_name, last_name, password, role) VALUES (12, '', '2014-01-02 05:00:00', '/RetailCustomer/1','self','/RetailCustomer','up','2014-01-02 05:00:00','C16E8B03-0299-467E-972A-A883ECDCC575', TRUE, 'ron', 'Ron', 'Koala', 'koala', 'ROLE_USER');
27+
INSERT INTO retail_customers (`id`,`description`,`published`,`self_link_href`,`self_link_rel`,`up_link_href`,`up_link_rel`,`updated`,`uuid`, enabled, username, first_name, last_name, password, role) VALUES (13, '', '2014-01-02 05:00:00', '/RetailCustomer/1','self','/RetailCustomer','up','2014-01-02 05:00:00','D16E8B03-0299-467E-972A-A883ECDCC575', TRUE, 'dave', 'Dave', 'Koala', 'koala', 'ROLE_USER');
28+
INSERT INTO retail_customers (`id`,`description`,`published`,`self_link_href`,`self_link_rel`,`up_link_href`,`up_link_rel`,`updated`,`uuid`, enabled, username, first_name, last_name, password, role) VALUES (14, '', '2014-01-02 05:00:00', '/RetailCustomer/1','self','/RetailCustomer','up','2014-01-02 05:00:00','E16E8B03-0299-467E-972A-A883ECDCC575', TRUE, 'net0', 'net0', 'NIST', 'koala', 'ROLE_USER');
29+
INSERT INTO retail_customers (`id`,`description`,`published`,`self_link_href`,`self_link_rel`,`up_link_href`,`up_link_rel`,`updated`,`uuid`, enabled, username, first_name, last_name, password, role) VALUES (15, '', '2014-01-02 05:00:00', '/RetailCustomer/1','self','/RetailCustomer','up','2014-01-02 05:00:00','F16E8B03-0299-467E-972A-A883ECDCC575', TRUE, 'grace', 'Grace', 'Hopper', 'koala', 'ROLE_CUSTODIAN');
1930

2031

2132
/* Add application_information */

src/main/resources/db/dev-populateDB.sql

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,22 @@ INSERT INTO service_categories (kind) VALUES (8);
1212
INSERT INTO service_categories (kind) VALUES (9);
1313

1414
/* Add retail customers */
15-
INSERT INTO retail_customers (username, first_name, last_name, password, enabled, role) VALUES ('alan', 'Alan', 'Turing', 'koala', TRUE, 'ROLE_USER');
16-
INSERT INTO retail_customers (username, first_name, last_name, password, enabled, role) VALUES ('joe', 'Joe', 'Black', 'koala', TRUE, 'ROLE_USER');
17-
INSERT INTO retail_customers (username, first_name, last_name, password, enabled, role) VALUES ('sam', 'Sam', 'White', 'koala', TRUE, 'ROLE_USER');
18-
INSERT INTO retail_customers (username, first_name, last_name, password, enabled, role) VALUES ('grace', 'Grace', 'Hopper', 'koala', TRUE, 'ROLE_CUSTODIAN');
15+
INSERT INTO retail_customers (`id`,`description`,`published`,`self_link_href`,`self_link_rel`,`up_link_href`,`up_link_rel`,`updated`,`uuid`, enabled, username, first_name, last_name, password, role) VALUES (1, '', '2014-01-02 05:00:00', '/RetailCustomer/1','self','/RetailCustomer','up','2014-01-02 05:00:00','116E8B03-0299-467E-972A-A883ECDCC575', TRUE, 'alan', 'Alan', 'Turing', 'koala', 'ROLE_USER');
16+
INSERT INTO retail_customers (`id`,`description`,`published`,`self_link_href`,`self_link_rel`,`up_link_href`,`up_link_rel`,`updated`,`uuid`, enabled, username, first_name, last_name, password, role) VALUES (2, '', '2014-01-02 05:00:00', '/RetailCustomer/1','self','/RetailCustomer','up','2014-01-02 05:00:00','216E8B03-0299-467E-972A-A883ECDCC575', TRUE, 'donald', 'Donald', 'Knuth','koala', 'ROLE_USER');
17+
INSERT INTO retail_customers (`id`,`description`,`published`,`self_link_href`,`self_link_rel`,`up_link_href`,`up_link_rel`,`updated`,`uuid`, enabled, username, first_name, last_name, password, role) VALUES (3, '', '2014-01-02 05:00:00', '/RetailCustomer/1','self','/RetailCustomer','up','2014-01-02 05:00:00','316E8B03-0299-467E-972A-A883ECDCC575', TRUE, 'paul', 'Paul', 'Dirac', 'koala', 'ROLE_USER');
18+
INSERT INTO retail_customers (`id`,`description`,`published`,`self_link_href`,`self_link_rel`,`up_link_href`,`up_link_rel`,`updated`,`uuid`, enabled, username, first_name, last_name, password, role) VALUES (4, '', '2014-01-02 05:00:00', '/RetailCustomer/1','self','/RetailCustomer','up','2014-01-02 05:00:00','416E8B03-0299-467E-972A-A883ECDCC575', TRUE, 'alonzo', 'Alonzo', 'Church', 'koala', 'ROLE_USER');
19+
INSERT INTO retail_customers (`id`,`description`,`published`,`self_link_href`,`self_link_rel`,`up_link_href`,`up_link_rel`,`updated`,`uuid`, enabled, username, first_name, last_name, password, role) VALUES (5, '', '2014-01-02 05:00:00', '/RetailCustomer/1','self','/RetailCustomer','up','2014-01-02 05:00:00','516E8B03-0299-467E-972A-A883ECDCC575', TRUE, 'charles', 'Charles', 'Babbage', 'koala', 'ROLE_USER');
20+
INSERT INTO retail_customers (`id`,`description`,`published`,`self_link_href`,`self_link_rel`,`up_link_href`,`up_link_rel`,`updated`,`uuid`, enabled, username, first_name, last_name, password, role) VALUES (6, '', '2014-01-02 05:00:00', '/RetailCustomer/1','self','/RetailCustomer','up','2014-01-02 05:00:00','616E8B03-0299-467E-972A-A883ECDCC575', TRUE, 'john', 'John', 'von Neumann', 'koala', 'ROLE_USER');
21+
INSERT INTO retail_customers (`id`,`description`,`published`,`self_link_href`,`self_link_rel`,`up_link_href`,`up_link_rel`,`updated`,`uuid`, enabled, username, first_name, last_name, password, role) VALUES (7, '', '2014-01-02 05:00:00', '/RetailCustomer/1','self','/RetailCustomer','up','2014-01-02 05:00:00','716E8B03-0299-467E-972A-A883ECDCC575', TRUE, 'marian', 'Marian', 'Rejewski', 'koala', 'ROLE_USER');
22+
INSERT INTO retail_customers (`id`,`description`,`published`,`self_link_href`,`self_link_rel`,`up_link_href`,`up_link_rel`,`updated`,`uuid`, enabled, username, first_name, last_name, password, role) VALUES (8, '', '2014-01-02 05:00:00', '/RetailCustomer/1','self','/RetailCustomer','up','2014-01-02 05:00:00','816E8B03-0299-467E-972A-A883ECDCC575', TRUE, 'vinny', 'Vint', 'Koala', 'koala', 'ROLE_USER');
23+
INSERT INTO retail_customers (`id`,`description`,`published`,`self_link_href`,`self_link_rel`,`up_link_href`,`up_link_rel`,`updated`,`uuid`, enabled, username, first_name, last_name, password, role) VALUES (9, '', '2014-01-02 05:00:00', '/RetailCustomer/1','self','/RetailCustomer','up','2014-01-02 05:00:00','916E8B03-0299-467E-972A-A883ECDCC575', TRUE, 'johnny', 'Johnny', 'Koala', 'koala', 'ROLE_USER');
24+
INSERT INTO retail_customers (`id`,`description`,`published`,`self_link_href`,`self_link_rel`,`up_link_href`,`up_link_rel`,`updated`,`uuid`, enabled, username, first_name, last_name, password, role) VALUES (10, '', '2014-01-02 05:00:00', '/RetailCustomer/1','self','/RetailCustomer','up','2014-01-02 05:00:00','A16E8B03-0299-467E-972A-A883ECDCC575', TRUE, 'don', 'Don', 'Koala', 'koala', 'ROLE_USER');
25+
INSERT INTO retail_customers (`id`,`description`,`published`,`self_link_href`,`self_link_rel`,`up_link_href`,`up_link_rel`,`updated`,`uuid`, enabled, username, first_name, last_name, password, role) VALUES (11, '', '2014-01-02 05:00:00', '/RetailCustomer/1','self','/RetailCustomer','up','2014-01-02 05:00:00','B16E8B03-0299-467E-972A-A883ECDCC575', TRUE, 'marty', 'Marty', 'Koala', 'koala', 'ROLE_USER');
26+
INSERT INTO retail_customers (`id`,`description`,`published`,`self_link_href`,`self_link_rel`,`up_link_href`,`up_link_rel`,`updated`,`uuid`, enabled, username, first_name, last_name, password, role) VALUES (12, '', '2014-01-02 05:00:00', '/RetailCustomer/1','self','/RetailCustomer','up','2014-01-02 05:00:00','C16E8B03-0299-467E-972A-A883ECDCC575', TRUE, 'ron', 'Ron', 'Koala', 'koala', 'ROLE_USER');
27+
INSERT INTO retail_customers (`id`,`description`,`published`,`self_link_href`,`self_link_rel`,`up_link_href`,`up_link_rel`,`updated`,`uuid`, enabled, username, first_name, last_name, password, role) VALUES (13, '', '2014-01-02 05:00:00', '/RetailCustomer/1','self','/RetailCustomer','up','2014-01-02 05:00:00','D16E8B03-0299-467E-972A-A883ECDCC575', TRUE, 'dave', 'Dave', 'Koala', 'koala', 'ROLE_USER');
28+
INSERT INTO retail_customers (`id`,`description`,`published`,`self_link_href`,`self_link_rel`,`up_link_href`,`up_link_rel`,`updated`,`uuid`, enabled, username, first_name, last_name, password, role) VALUES (14, '', '2014-01-02 05:00:00', '/RetailCustomer/1','self','/RetailCustomer','up','2014-01-02 05:00:00','E16E8B03-0299-467E-972A-A883ECDCC575', TRUE, 'net0', 'net0', 'NIST', 'koala', 'ROLE_USER');
29+
INSERT INTO retail_customers (`id`,`description`,`published`,`self_link_href`,`self_link_rel`,`up_link_href`,`up_link_rel`,`updated`,`uuid`, enabled, username, first_name, last_name, password, role) VALUES (15, '', '2014-01-02 05:00:00', '/RetailCustomer/1','self','/RetailCustomer','up','2014-01-02 05:00:00','F16E8B03-0299-467E-972A-A883ECDCC575', TRUE, 'grace', 'Grace', 'Hopper', 'koala', 'ROLE_CUSTODIAN');
30+
1931

2032
/* Add application_information */
2133
INSERT INTO `application_information` (`id`,`description`,`published`,`self_link_href`,`self_link_rel`,`up_link_href`,`up_link_rel`,`updated`,`uuid`,`authorizationServerAuthorizationEndpoint`,`authorizationServerRegistrationEndpoint`,`authorizationServerTokenEndpoint`,`authorizationServerUri`,`clientId`,`clientIdIssuedAt`,`clientName`,`clientSecret`,`clientSecretExpiresAt`,`clientUri`,`contacts`,`dataCustodianApplicationStatus`,`dataCustodianBulkRequestURI`,`dataCustodianDefaultBatchResource`,`dataCustodianDefaultSubscriptionResource`,`dataCustodianId`,`dataCustodianResourceEndpoint`,`dataCustodianThirdPartySelectionScreenURI`,`grantTypes`,`logoUri`,`policyUri`,`redirectUri`,`registrationAccessToken`,`registrationClientUri`,`responseTypes`,`softwareId`,`softwareVersion`,`thirdPartyApplicationDescription`,`thirdPartyApplicationName`,`thirdPartyApplicationStatus`,`thirdPartyApplicationType`,`thirdPartyApplicationUse`,`thirdPartyDataCustodianSelectionScreenURI`,`thirdPartyLoginScreenURI`,`thirdPartyNotifyUri`,`thirdPartyPhone`,`thirdPartyScopeSelectionScreenURI`,`thirdPartyUserPortalScreenURI`,`tokenEndpointAuthMethod`,`tosUri`) VALUES (1,'GreenButtonData.org ThirdParty Application','2014-01-02 05:00:00','/espi/1_1/resource/ThirdParty/ApplicationInformation/1','self','/espi/1_1/resource/ThirdParty/ApplicationInformation','up','2014-01-02 05:00:00','B921A307-A7EC-429E-A34D-37B6370FEE0F','http://localhost:8080/DataCustodian/oauth/authorize',NULL,'http://localhost:8080/DataCustodian/oauth/token',NULL,'third_party',NULL,NULL,'secret',NULL,NULL,NULL,'','',NULL,NULL,'data_custodian','http://localhost:8080/DataCustodian/espi/1_1/resource',NULL,NULL,NULL,NULL,'http://localhost:8080/ThirdParty/espi/1_1/OAuthCallBack',NULL,NULL,NULL,NULL,NULL,NULL,'Third Party (localhost)',NULL,NULL,NULL,NULL,NULL,'http://localhost:8080/ThirdParty/espi/1_1/Notification',NULL,'http://localhost:8080/DataCustodian/RetailCustomer/ScopeSelectionList',NULL,NULL,NULL);

0 commit comments

Comments
 (0)