+
{{ 'codbex-employees:codbex-employees-model.t.ADDRESS_CITY' | t }}
-
+
{
- EntityServiceProvider.baseUrl = '/services/ts/codbex-employees/gen/codbex-employees/api/Employees/ContactController.ts';
+ EntityServiceProvider.baseUrl = '/services/java/codbex-employees/gen/codbex_employees/api/employees/ContactController';
}])
.controller('PageController', ($scope, EntityService, Extensions, LocaleService, ButtonStates) => {
const Dialogs = new DialogHub();
diff --git a/codbex-employees/gen/codbex-employees/ui/Employees/Employee/Contact/dialog-window/controller.js b/codbex-employees/gen/codbex-employees/ui/Employees/Employee/Contact/dialog-window/controller.js
index ec6b1f2..85c884a 100644
--- a/codbex-employees/gen/codbex-employees/ui/Employees/Employee/Contact/dialog-window/controller.js
+++ b/codbex-employees/gen/codbex-employees/ui/Employees/Employee/Contact/dialog-window/controller.js
@@ -1,6 +1,6 @@
angular.module('page', ['blimpKit', 'platformView', 'platformLocale', 'EntityService'])
.config(['EntityServiceProvider', (EntityServiceProvider) => {
- EntityServiceProvider.baseUrl = '/services/ts/codbex-employees/gen/codbex-employees/api/Employees/ContactController.ts';
+ EntityServiceProvider.baseUrl = '/services/java/codbex-employees/gen/codbex_employees/api/employees/ContactController';
}])
.controller('PageController', ($scope, $http, ViewParameters, LocaleService, EntityService) => {
const Dialogs = new DialogHub();
diff --git a/codbex-employees/gen/codbex-employees/ui/Employees/Employee/controller.js b/codbex-employees/gen/codbex-employees/ui/Employees/Employee/controller.js
index 1a780fc..82fd1e3 100644
--- a/codbex-employees/gen/codbex-employees/ui/Employees/Employee/controller.js
+++ b/codbex-employees/gen/codbex-employees/ui/Employees/Employee/controller.js
@@ -1,6 +1,6 @@
angular.module('page', ['blimpKit', 'platformView', 'platformLocale', 'EntityService'])
.config(['EntityServiceProvider', (EntityServiceProvider) => {
- EntityServiceProvider.baseUrl = '/services/ts/codbex-employees/gen/codbex-employees/api/Employees/EmployeeController.ts';
+ EntityServiceProvider.baseUrl = '/services/java/codbex-employees/gen/codbex_employees/api/employees/EmployeeController';
}])
.controller('PageController', ($scope, $http, EntityService, Extensions, LocaleService, ButtonStates) => {
const Dialogs = new DialogHub();
@@ -105,7 +105,7 @@ angular.module('page', ['blimpKit', 'platformView', 'platformLocale', 'EntitySer
if (optionsNationalityHasMore) {
const optionsNationalitySearchValues = Array.from(new Set(response.data.map(e => e.Nationality)));
if (optionsNationalitySearchValues.length > 0) {
- $http.post('/services/ts/codbex-countries/gen/codbex-countries/api/Settings/CountryController.ts/search', {
+ $http.post('/services/java/codbex-countries/gen/codbex_countries/api/settings/CountryController/search', {
conditions: [
{ propertyName: 'Id', operator: 'IN', value: optionsNationalitySearchValues }
]
@@ -128,7 +128,7 @@ angular.module('page', ['blimpKit', 'platformView', 'platformLocale', 'EntitySer
if (optionsGenderHasMore) {
const optionsGenderSearchValues = Array.from(new Set(response.data.map(e => e.Gender)));
if (optionsGenderSearchValues.length > 0) {
- $http.post('/services/ts/codbex-employees/gen/codbex-employees/api/Settings/GenderController.ts/search', {
+ $http.post('/services/java/codbex-employees/gen/codbex_employees/api/settings/GenderController/search', {
conditions: [
{ propertyName: 'Id', operator: 'IN', value: optionsGenderSearchValues }
]
@@ -151,7 +151,7 @@ angular.module('page', ['blimpKit', 'platformView', 'platformLocale', 'EntitySer
if (optionsMartialStatusHasMore) {
const optionsMartialStatusSearchValues = Array.from(new Set(response.data.map(e => e.MartialStatus)));
if (optionsMartialStatusSearchValues.length > 0) {
- $http.post('/services/ts/codbex-employees/gen/codbex-employees/api/Settings/MartialStatusController.ts/search', {
+ $http.post('/services/java/codbex-employees/gen/codbex_employees/api/settings/MartialStatusController/search', {
conditions: [
{ propertyName: 'Id', operator: 'IN', value: optionsMartialStatusSearchValues }
]
@@ -291,9 +291,9 @@ angular.module('page', ['blimpKit', 'platformView', 'platformLocale', 'EntitySer
let optionsNationalityHasMore = true;
- $http.get('/services/ts/codbex-countries/gen/codbex-countries/api/Settings/CountryController.ts/count').then((response) => {
+ $http.get('/services/java/codbex-countries/gen/codbex_countries/api/settings/CountryController/count').then((response) => {
const optionsNationalityCount = response.data.count;
- $http.get('/services/ts/codbex-countries/gen/codbex-countries/api/Settings/CountryController.ts').then((response) => {
+ $http.get('/services/java/codbex-countries/gen/codbex_countries/api/settings/CountryController').then((response) => {
$scope.optionsNationality = response.data.map(e => ({
value: e.Id,
text: e.Name
@@ -319,9 +319,9 @@ angular.module('page', ['blimpKit', 'platformView', 'platformLocale', 'EntitySer
});
let optionsGenderHasMore = true;
- $http.get('/services/ts/codbex-employees/gen/codbex-employees/api/Settings/GenderController.ts/count').then((response) => {
+ $http.get('/services/java/codbex-employees/gen/codbex_employees/api/settings/GenderController/count').then((response) => {
const optionsGenderCount = response.data.count;
- $http.get('/services/ts/codbex-employees/gen/codbex-employees/api/Settings/GenderController.ts').then((response) => {
+ $http.get('/services/java/codbex-employees/gen/codbex_employees/api/settings/GenderController').then((response) => {
$scope.optionsGender = response.data.map(e => ({
value: e.Id,
text: e.Name
@@ -347,9 +347,9 @@ angular.module('page', ['blimpKit', 'platformView', 'platformLocale', 'EntitySer
});
let optionsMartialStatusHasMore = true;
- $http.get('/services/ts/codbex-employees/gen/codbex-employees/api/Settings/MartialStatusController.ts/count').then((response) => {
+ $http.get('/services/java/codbex-employees/gen/codbex_employees/api/settings/MartialStatusController/count').then((response) => {
const optionsMartialStatusCount = response.data.count;
- $http.get('/services/ts/codbex-employees/gen/codbex-employees/api/Settings/MartialStatusController.ts').then((response) => {
+ $http.get('/services/java/codbex-employees/gen/codbex_employees/api/settings/MartialStatusController').then((response) => {
$scope.optionsMartialStatus = response.data.map(e => ({
value: e.Id,
text: e.Name
diff --git a/codbex-employees/gen/codbex-employees/ui/Employees/Employee/dialog-filter/controller.js b/codbex-employees/gen/codbex-employees/ui/Employees/Employee/dialog-filter/controller.js
index bcc41c7..3addb39 100644
--- a/codbex-employees/gen/codbex-employees/ui/Employees/Employee/dialog-filter/controller.js
+++ b/codbex-employees/gen/codbex-employees/ui/Employees/Employee/dialog-filter/controller.js
@@ -165,7 +165,7 @@ angular.module('page', ['blimpKit', 'platformView', 'platformLocale']).controlle
$scope.loadMoreOptionsNationality = () => {
const limit = 20;
$scope.optionsNationalityLoading = true;
- $http.get(`/services/ts/codbex-countries/gen/codbex-countries/api/Settings/CountryController.ts?$limit=${limit}&$offset=${++loadMoreOptionsNationalityCounter * limit}`)
+ $http.get(`/services/java/codbex-countries/gen/codbex_countries/api/settings/CountryController?$limit=${limit}&$offset=${++loadMoreOptionsNationalityCounter * limit}`)
.then((response) => {
const optionValues = allValuesNationality.map(e => e.value);
const resultValues = response.data.map(e => ({
@@ -215,7 +215,7 @@ angular.module('page', ['blimpKit', 'platformView', 'platformLocale']).controlle
}
})
if (!cacheHit) {
- $http.post('/services/ts/codbex-countries/gen/codbex-countries/api/Settings/CountryController.ts/search', {
+ $http.post('/services/java/codbex-countries/gen/codbex_countries/api/settings/CountryController/search', {
conditions: [
{ propertyName: 'Name', operator: 'LIKE', value: `${event.originalEvent.target.value}%` }
]
@@ -254,7 +254,7 @@ angular.module('page', ['blimpKit', 'platformView', 'platformLocale']).controlle
$scope.loadMoreOptionsGender = () => {
const limit = 20;
$scope.optionsGenderLoading = true;
- $http.get(`/services/ts/codbex-employees/gen/codbex-employees/api/Settings/GenderController.ts?$limit=${limit}&$offset=${++loadMoreOptionsGenderCounter * limit}`)
+ $http.get(`/services/java/codbex-employees/gen/codbex_employees/api/settings/GenderController?$limit=${limit}&$offset=${++loadMoreOptionsGenderCounter * limit}`)
.then((response) => {
const optionValues = allValuesGender.map(e => e.value);
const resultValues = response.data.map(e => ({
@@ -304,7 +304,7 @@ angular.module('page', ['blimpKit', 'platformView', 'platformLocale']).controlle
}
})
if (!cacheHit) {
- $http.post('/services/ts/codbex-employees/gen/codbex-employees/api/Settings/GenderController.ts/search', {
+ $http.post('/services/java/codbex-employees/gen/codbex_employees/api/settings/GenderController/search', {
conditions: [
{ propertyName: 'Name', operator: 'LIKE', value: `${event.originalEvent.target.value}%` }
]
@@ -343,7 +343,7 @@ angular.module('page', ['blimpKit', 'platformView', 'platformLocale']).controlle
$scope.loadMoreOptionsMartialStatus = () => {
const limit = 20;
$scope.optionsMartialStatusLoading = true;
- $http.get(`/services/ts/codbex-employees/gen/codbex-employees/api/Settings/MartialStatusController.ts?$limit=${limit}&$offset=${++loadMoreOptionsMartialStatusCounter * limit}`)
+ $http.get(`/services/java/codbex-employees/gen/codbex_employees/api/settings/MartialStatusController?$limit=${limit}&$offset=${++loadMoreOptionsMartialStatusCounter * limit}`)
.then((response) => {
const optionValues = allValuesMartialStatus.map(e => e.value);
const resultValues = response.data.map(e => ({
@@ -393,7 +393,7 @@ angular.module('page', ['blimpKit', 'platformView', 'platformLocale']).controlle
}
})
if (!cacheHit) {
- $http.post('/services/ts/codbex-employees/gen/codbex-employees/api/Settings/MartialStatusController.ts/search', {
+ $http.post('/services/java/codbex-employees/gen/codbex_employees/api/settings/MartialStatusController/search', {
conditions: [
{ propertyName: 'Name', operator: 'LIKE', value: `${event.originalEvent.target.value}%` }
]
diff --git a/codbex-employees/gen/codbex-employees/ui/Employees/Employee/dialog-window/controller.js b/codbex-employees/gen/codbex-employees/ui/Employees/Employee/dialog-window/controller.js
index cfdf057..7228c8a 100644
--- a/codbex-employees/gen/codbex-employees/ui/Employees/Employee/dialog-window/controller.js
+++ b/codbex-employees/gen/codbex-employees/ui/Employees/Employee/dialog-window/controller.js
@@ -1,6 +1,6 @@
angular.module('page', ['blimpKit', 'platformView', 'platformLocale', 'EntityService'])
.config(['EntityServiceProvider', (EntityServiceProvider) => {
- EntityServiceProvider.baseUrl = '/services/ts/codbex-employees/gen/codbex-employees/api/Employees/EmployeeController.ts';
+ EntityServiceProvider.baseUrl = '/services/java/codbex-employees/gen/codbex_employees/api/employees/EmployeeController';
}])
.controller('PageController', ($scope, $http, ViewParameters, LocaleService, EntityService) => {
const Dialogs = new DialogHub();
@@ -95,11 +95,11 @@ angular.module('page', ['blimpKit', 'platformView', 'platformLocale', 'EntitySer
});
};
- $scope.serviceNationality = '/services/ts/codbex-countries/gen/codbex-countries/api/Settings/CountryController.ts';
+ $scope.serviceNationality = '/services/java/codbex-countries/gen/codbex_countries/api/settings/CountryController';
$scope.optionsNationality = [];
- $http.get('/services/ts/codbex-countries/gen/codbex-countries/api/Settings/CountryController.ts').then((response) => {
+ $http.get('/services/java/codbex-countries/gen/codbex_countries/api/settings/CountryController').then((response) => {
$scope.optionsNationality = response.data.map(e => ({
value: e.Id,
text: e.Name
@@ -123,7 +123,7 @@ angular.module('page', ['blimpKit', 'platformView', 'platformLocale', 'EntitySer
$scope.loadMoreOptionsNationality = () => {
const limit = 20;
$scope.optionsNationalityLoading = true;
- $http.get(`/services/ts/codbex-countries/gen/codbex-countries/api/Settings/CountryController.ts?$limit=${limit}&$offset=${++loadMoreOptionsNationalityCounter * limit}`)
+ $http.get(`/services/java/codbex-countries/gen/codbex_countries/api/settings/CountryController?$limit=${limit}&$offset=${++loadMoreOptionsNationalityCounter * limit}`)
.then((response) => {
const optionValues = allValuesNationality.map(e => e.value);
const resultValues = response.data.map(e => ({
@@ -173,7 +173,7 @@ angular.module('page', ['blimpKit', 'platformView', 'platformLocale', 'EntitySer
}
})
if (!cacheHit) {
- $http.post('/services/ts/codbex-countries/gen/codbex-countries/api/Settings/CountryController.ts/search', {
+ $http.post('/services/java/codbex-countries/gen/codbex_countries/api/settings/CountryController/search', {
conditions: [
{ propertyName: 'Name', operator: 'LIKE', value: `${event.originalEvent.target.value}%` }
]
@@ -202,11 +202,11 @@ angular.module('page', ['blimpKit', 'platformView', 'platformLocale', 'EntitySer
}
}
};
- $scope.serviceGender = '/services/ts/codbex-employees/gen/codbex-employees/api/Settings/GenderController.ts';
+ $scope.serviceGender = '/services/java/codbex-employees/gen/codbex_employees/api/settings/GenderController';
$scope.optionsGender = [];
- $http.get('/services/ts/codbex-employees/gen/codbex-employees/api/Settings/GenderController.ts').then((response) => {
+ $http.get('/services/java/codbex-employees/gen/codbex_employees/api/settings/GenderController').then((response) => {
$scope.optionsGender = response.data.map(e => ({
value: e.Id,
text: e.Name
@@ -230,7 +230,7 @@ angular.module('page', ['blimpKit', 'platformView', 'platformLocale', 'EntitySer
$scope.loadMoreOptionsGender = () => {
const limit = 20;
$scope.optionsGenderLoading = true;
- $http.get(`/services/ts/codbex-employees/gen/codbex-employees/api/Settings/GenderController.ts?$limit=${limit}&$offset=${++loadMoreOptionsGenderCounter * limit}`)
+ $http.get(`/services/java/codbex-employees/gen/codbex_employees/api/settings/GenderController?$limit=${limit}&$offset=${++loadMoreOptionsGenderCounter * limit}`)
.then((response) => {
const optionValues = allValuesGender.map(e => e.value);
const resultValues = response.data.map(e => ({
@@ -280,7 +280,7 @@ angular.module('page', ['blimpKit', 'platformView', 'platformLocale', 'EntitySer
}
})
if (!cacheHit) {
- $http.post('/services/ts/codbex-employees/gen/codbex-employees/api/Settings/GenderController.ts/search', {
+ $http.post('/services/java/codbex-employees/gen/codbex_employees/api/settings/GenderController/search', {
conditions: [
{ propertyName: 'Name', operator: 'LIKE', value: `${event.originalEvent.target.value}%` }
]
@@ -309,11 +309,11 @@ angular.module('page', ['blimpKit', 'platformView', 'platformLocale', 'EntitySer
}
}
};
- $scope.serviceMartialStatus = '/services/ts/codbex-employees/gen/codbex-employees/api/Settings/MartialStatusController.ts';
+ $scope.serviceMartialStatus = '/services/java/codbex-employees/gen/codbex_employees/api/settings/MartialStatusController';
$scope.optionsMartialStatus = [];
- $http.get('/services/ts/codbex-employees/gen/codbex-employees/api/Settings/MartialStatusController.ts').then((response) => {
+ $http.get('/services/java/codbex-employees/gen/codbex_employees/api/settings/MartialStatusController').then((response) => {
$scope.optionsMartialStatus = response.data.map(e => ({
value: e.Id,
text: e.Name
@@ -337,7 +337,7 @@ angular.module('page', ['blimpKit', 'platformView', 'platformLocale', 'EntitySer
$scope.loadMoreOptionsMartialStatus = () => {
const limit = 20;
$scope.optionsMartialStatusLoading = true;
- $http.get(`/services/ts/codbex-employees/gen/codbex-employees/api/Settings/MartialStatusController.ts?$limit=${limit}&$offset=${++loadMoreOptionsMartialStatusCounter * limit}`)
+ $http.get(`/services/java/codbex-employees/gen/codbex_employees/api/settings/MartialStatusController?$limit=${limit}&$offset=${++loadMoreOptionsMartialStatusCounter * limit}`)
.then((response) => {
const optionValues = allValuesMartialStatus.map(e => e.value);
const resultValues = response.data.map(e => ({
@@ -387,7 +387,7 @@ angular.module('page', ['blimpKit', 'platformView', 'platformLocale', 'EntitySer
}
})
if (!cacheHit) {
- $http.post('/services/ts/codbex-employees/gen/codbex-employees/api/Settings/MartialStatusController.ts/search', {
+ $http.post('/services/java/codbex-employees/gen/codbex_employees/api/settings/MartialStatusController/search', {
conditions: [
{ propertyName: 'Name', operator: 'LIKE', value: `${event.originalEvent.target.value}%` }
]
diff --git a/codbex-employees/gen/codbex-employees/ui/Employees/Employee/dialog-window/index.html b/codbex-employees/gen/codbex-employees/ui/Employees/Employee/dialog-window/index.html
index 1e33583..7f956ea 100644
--- a/codbex-employees/gen/codbex-employees/ui/Employees/Employee/dialog-window/index.html
+++ b/codbex-employees/gen/codbex-employees/ui/Employees/Employee/dialog-window/index.html
@@ -184,7 +184,7 @@
{{ 'codbex-employees:codbex-employees-model.t.EMPLOYEE_NATIONALITY' | t }}
-
+
{
- EntityServiceProvider.baseUrl = '/services/ts/codbex-employees/gen/codbex-employees/api/Employees/EmployeeController.ts';
+ EntityServiceProvider.baseUrl = '/services/java/codbex-employees/gen/codbex_employees/api/employees/EmployeeController';
}])
.controller('PageController', ($scope, $http, Extensions, LocaleService, EntityService) => {
const Dialogs = new DialogHub();
@@ -102,9 +102,9 @@ angular.module('page', ['blimpKit', 'platformView', 'platformLocale', 'EntitySer
});
}});
- $scope.serviceNationality = '/services/ts/codbex-countries/gen/codbex-countries/api/Settings/CountryController.ts';
- $scope.serviceGender = '/services/ts/codbex-employees/gen/codbex-employees/api/Settings/GenderController.ts';
- $scope.serviceMartialStatus = '/services/ts/codbex-employees/gen/codbex-employees/api/Settings/MartialStatusController.ts';
+ $scope.serviceNationality = '/services/java/codbex-countries/gen/codbex_countries/api/settings/CountryController';
+ $scope.serviceGender = '/services/java/codbex-employees/gen/codbex_employees/api/settings/GenderController';
+ $scope.serviceMartialStatus = '/services/java/codbex-employees/gen/codbex_employees/api/settings/MartialStatusController';
//-----------------Events-------------------//
@@ -208,7 +208,7 @@ angular.module('page', ['blimpKit', 'platformView', 'platformLocale', 'EntitySer
$scope.loadMoreOptionsNationality = () => {
const limit = 20;
$scope.optionsNationalityLoading = true;
- $http.get(`/services/ts/codbex-countries/gen/codbex-countries/api/Settings/CountryController.ts?$limit=${limit}&$offset=${++loadMoreOptionsNationalityCounter * limit}`)
+ $http.get(`/services/java/codbex-countries/gen/codbex_countries/api/settings/CountryController?$limit=${limit}&$offset=${++loadMoreOptionsNationalityCounter * limit}`)
.then((response) => {
const optionValues = allValuesNationality.map(e => e.value);
const resultValues = response.data.map(e => ({
@@ -258,7 +258,7 @@ angular.module('page', ['blimpKit', 'platformView', 'platformLocale', 'EntitySer
}
})
if (!cacheHit) {
- $http.post('/services/ts/codbex-countries/gen/codbex-countries/api/Settings/CountryController.ts/search', {
+ $http.post('/services/java/codbex-countries/gen/codbex_countries/api/settings/CountryController/search', {
conditions: [
{ propertyName: 'Name', operator: 'LIKE', value: `${event.originalEvent.target.value}%` }
]
@@ -290,7 +290,7 @@ angular.module('page', ['blimpKit', 'platformView', 'platformLocale', 'EntitySer
$scope.refreshNationality = () => {
$scope.optionsNationality = [];
- $http.get('/services/ts/codbex-countries/gen/codbex-countries/api/Settings/CountryController.ts').then((response) => {
+ $http.get('/services/java/codbex-countries/gen/codbex_countries/api/settings/CountryController').then((response) => {
$scope.optionsNationality = response.data.map(e => ({
value: e.Id,
text: e.Name
@@ -315,7 +315,7 @@ angular.module('page', ['blimpKit', 'platformView', 'platformLocale', 'EntitySer
$scope.loadMoreOptionsGender = () => {
const limit = 20;
$scope.optionsGenderLoading = true;
- $http.get(`/services/ts/codbex-employees/gen/codbex-employees/api/Settings/GenderController.ts?$limit=${limit}&$offset=${++loadMoreOptionsGenderCounter * limit}`)
+ $http.get(`/services/java/codbex-employees/gen/codbex_employees/api/settings/GenderController?$limit=${limit}&$offset=${++loadMoreOptionsGenderCounter * limit}`)
.then((response) => {
const optionValues = allValuesGender.map(e => e.value);
const resultValues = response.data.map(e => ({
@@ -365,7 +365,7 @@ angular.module('page', ['blimpKit', 'platformView', 'platformLocale', 'EntitySer
}
})
if (!cacheHit) {
- $http.post('/services/ts/codbex-employees/gen/codbex-employees/api/Settings/GenderController.ts/search', {
+ $http.post('/services/java/codbex-employees/gen/codbex_employees/api/settings/GenderController/search', {
conditions: [
{ propertyName: 'Name', operator: 'LIKE', value: `${event.originalEvent.target.value}%` }
]
@@ -397,7 +397,7 @@ angular.module('page', ['blimpKit', 'platformView', 'platformLocale', 'EntitySer
$scope.refreshGender = () => {
$scope.optionsGender = [];
- $http.get('/services/ts/codbex-employees/gen/codbex-employees/api/Settings/GenderController.ts').then((response) => {
+ $http.get('/services/java/codbex-employees/gen/codbex_employees/api/settings/GenderController').then((response) => {
$scope.optionsGender = response.data.map(e => ({
value: e.Id,
text: e.Name
@@ -422,7 +422,7 @@ angular.module('page', ['blimpKit', 'platformView', 'platformLocale', 'EntitySer
$scope.loadMoreOptionsMartialStatus = () => {
const limit = 20;
$scope.optionsMartialStatusLoading = true;
- $http.get(`/services/ts/codbex-employees/gen/codbex-employees/api/Settings/MartialStatusController.ts?$limit=${limit}&$offset=${++loadMoreOptionsMartialStatusCounter * limit}`)
+ $http.get(`/services/java/codbex-employees/gen/codbex_employees/api/settings/MartialStatusController?$limit=${limit}&$offset=${++loadMoreOptionsMartialStatusCounter * limit}`)
.then((response) => {
const optionValues = allValuesMartialStatus.map(e => e.value);
const resultValues = response.data.map(e => ({
@@ -472,7 +472,7 @@ angular.module('page', ['blimpKit', 'platformView', 'platformLocale', 'EntitySer
}
})
if (!cacheHit) {
- $http.post('/services/ts/codbex-employees/gen/codbex-employees/api/Settings/MartialStatusController.ts/search', {
+ $http.post('/services/java/codbex-employees/gen/codbex_employees/api/settings/MartialStatusController/search', {
conditions: [
{ propertyName: 'Name', operator: 'LIKE', value: `${event.originalEvent.target.value}%` }
]
@@ -504,7 +504,7 @@ angular.module('page', ['blimpKit', 'platformView', 'platformLocale', 'EntitySer
$scope.refreshMartialStatus = () => {
$scope.optionsMartialStatus = [];
- $http.get('/services/ts/codbex-employees/gen/codbex-employees/api/Settings/MartialStatusController.ts').then((response) => {
+ $http.get('/services/java/codbex-employees/gen/codbex_employees/api/settings/MartialStatusController').then((response) => {
$scope.optionsMartialStatus = response.data.map(e => ({
value: e.Id,
text: e.Name
diff --git a/codbex-employees/gen/codbex-employees/ui/Employees/Employee/main-details/index.html b/codbex-employees/gen/codbex-employees/ui/Employees/Employee/main-details/index.html
index b0be822..3521ed5 100644
--- a/codbex-employees/gen/codbex-employees/ui/Employees/Employee/main-details/index.html
+++ b/codbex-employees/gen/codbex-employees/ui/Employees/Employee/main-details/index.html
@@ -182,7 +182,7 @@
{{ 'codbex-employees:codbex-employees-model.t.EMPLOYEE_NATIONALITY' | t }}
-
+
{
- EntityServiceProvider.baseUrl = '/services/ts/codbex-employees/gen/codbex-employees/api/Settings/GenderController.ts';
+ EntityServiceProvider.baseUrl = '/services/java/codbex-employees/gen/codbex_employees/api/settings/GenderController';
}])
.controller('PageController', ($scope, EntityService, Extensions, LocaleService, ButtonStates) => {
const Dialogs = new DialogHub();
diff --git a/codbex-employees/gen/codbex-employees/ui/Settings/Gender/dialog-window/controller.js b/codbex-employees/gen/codbex-employees/ui/Settings/Gender/dialog-window/controller.js
index 4eac415..fd14ba2 100644
--- a/codbex-employees/gen/codbex-employees/ui/Settings/Gender/dialog-window/controller.js
+++ b/codbex-employees/gen/codbex-employees/ui/Settings/Gender/dialog-window/controller.js
@@ -1,6 +1,6 @@
angular.module('page', ['blimpKit', 'platformView', 'platformLocale', 'EntityService'])
.config(['EntityServiceProvider', (EntityServiceProvider) => {
- EntityServiceProvider.baseUrl = '/services/ts/codbex-employees/gen/codbex-employees/api/Settings/GenderController.ts';
+ EntityServiceProvider.baseUrl = '/services/java/codbex-employees/gen/codbex_employees/api/settings/GenderController';
}])
.controller('PageController', ($scope, $http, ViewParameters, LocaleService, EntityService) => {
const Dialogs = new DialogHub();
diff --git a/codbex-employees/gen/codbex-employees/ui/Settings/MartialStatus/controller.js b/codbex-employees/gen/codbex-employees/ui/Settings/MartialStatus/controller.js
index a775df2..d518b74 100644
--- a/codbex-employees/gen/codbex-employees/ui/Settings/MartialStatus/controller.js
+++ b/codbex-employees/gen/codbex-employees/ui/Settings/MartialStatus/controller.js
@@ -1,6 +1,6 @@
angular.module('page', ['blimpKit', 'platformView', 'platformLocale', 'EntityService'])
.config(['EntityServiceProvider', (EntityServiceProvider) => {
- EntityServiceProvider.baseUrl = '/services/ts/codbex-employees/gen/codbex-employees/api/Settings/MartialStatusController.ts';
+ EntityServiceProvider.baseUrl = '/services/java/codbex-employees/gen/codbex_employees/api/settings/MartialStatusController';
}])
.controller('PageController', ($scope, EntityService, Extensions, LocaleService, ButtonStates) => {
const Dialogs = new DialogHub();
diff --git a/codbex-employees/gen/codbex-employees/ui/Settings/MartialStatus/dialog-window/controller.js b/codbex-employees/gen/codbex-employees/ui/Settings/MartialStatus/dialog-window/controller.js
index bab7eca..dfd043b 100644
--- a/codbex-employees/gen/codbex-employees/ui/Settings/MartialStatus/dialog-window/controller.js
+++ b/codbex-employees/gen/codbex-employees/ui/Settings/MartialStatus/dialog-window/controller.js
@@ -1,6 +1,6 @@
angular.module('page', ['blimpKit', 'platformView', 'platformLocale', 'EntityService'])
.config(['EntityServiceProvider', (EntityServiceProvider) => {
- EntityServiceProvider.baseUrl = '/services/ts/codbex-employees/gen/codbex-employees/api/Settings/MartialStatusController.ts';
+ EntityServiceProvider.baseUrl = '/services/java/codbex-employees/gen/codbex_employees/api/settings/MartialStatusController';
}])
.controller('PageController', ($scope, $http, ViewParameters, LocaleService, EntityService) => {
const Dialogs = new DialogHub();
diff --git a/codbex-employees/gen/codbex_employees/api/employees/AddressController.java b/codbex-employees/gen/codbex_employees/api/employees/AddressController.java
new file mode 100644
index 0000000..8a04509
--- /dev/null
+++ b/codbex-employees/gen/codbex_employees/api/employees/AddressController.java
@@ -0,0 +1,179 @@
+package gen.codbex_employees.api.employees;
+
+import gen.codbex_employees.data.employees.AddressEntity;
+import gen.codbex_employees.data.employees.AddressRepository;
+
+import org.eclipse.dirigible.components.api.security.UserFacade;
+import org.eclipse.dirigible.engine.java.annotations.Documentation;
+import org.eclipse.dirigible.engine.java.annotations.Inject;
+import org.eclipse.dirigible.engine.java.annotations.http.Body;
+import org.eclipse.dirigible.engine.java.annotations.http.Controller;
+import org.eclipse.dirigible.engine.java.annotations.http.Delete;
+import org.eclipse.dirigible.engine.java.annotations.http.Get;
+import org.eclipse.dirigible.engine.java.annotations.http.PathParam;
+import org.eclipse.dirigible.engine.java.annotations.http.Post;
+import org.eclipse.dirigible.engine.java.annotations.http.Put;
+import org.eclipse.dirigible.engine.java.annotations.http.QueryParam;
+import org.springframework.http.HttpStatus;
+import org.springframework.web.server.ResponseStatusException;
+
+import java.util.Collection;
+import java.util.LinkedHashMap;
+import java.util.List;
+import java.util.Locale;
+import java.util.Map;
+import java.util.Set;
+
+@Controller
+@Documentation("codbex-employees - Address Controller")
+public class AddressController {
+
+ private static final Set FILTER_FIELDS = Set.of("Id", "Country", "City", "Address", "PostalCode", "Employee", "CreatedAt", "CreatedBy", "UpdatedAt", "UpdatedBy");
+
+ @Inject
+ private AddressRepository repository;
+
+ @Get
+ @Documentation("List Address")
+ public List getAll(@QueryParam("$limit") Integer limit,
+ @QueryParam("$offset") Integer offset,
+ @QueryParam("Employee") String Employee) {
+ int actualLimit = limit != null ? limit.intValue() : 20;
+ int actualOffset = offset != null ? offset.intValue() : 0;
+ List result;
+ if (Employee != null) {
+ Map params = new LinkedHashMap<>();
+ params.put("Employee", Employee);
+ result = repository.query("from AddressEntity e where e.Employee = :Employee", params);
+ } else {
+ result = repository.findAll(actualLimit, actualOffset);
+ }
+ return result;
+ }
+
+ @Get("/count")
+ @Documentation("Count Address")
+ public Map count() {
+ return Map.of("count", repository.count());
+ }
+
+ @Post("/count")
+ @Documentation("Count Address with filter")
+ public Map countWithFilter(@Body Map filter) {
+ return Map.of("count", (long) runFilter(filter).size());
+ }
+
+ @Post("/search")
+ @Documentation("Search Address")
+ public List search(@Body Map filter) {
+ List result = runFilter(filter);
+ return result;
+ }
+
+ @Get("/{id}")
+ @Documentation("Get Address by id")
+ public AddressEntity getById(@PathParam("id") Integer id) {
+ AddressEntity entity = repository.findOne(id)
+ .orElseThrow(() -> new ResponseStatusException(HttpStatus.NOT_FOUND, "Address not found"));
+ return entity;
+ }
+
+ @Post
+ @Documentation("Create Address")
+ public AddressEntity create(@Body AddressEntity entity) {
+ validate(entity);
+ return repository.save(entity);
+ }
+
+ @Put("/{id}")
+ @Documentation("Update Address by id")
+ public AddressEntity update(@PathParam("id") Integer id, @Body AddressEntity entity) {
+ entity.Id = id;
+ validate(entity);
+ return repository.update(entity);
+ }
+
+ @Delete("/{id}")
+ @Documentation("Delete Address by id")
+ public void deleteById(@PathParam("id") Integer id) {
+ if (repository.findOne(id).isEmpty()) {
+ throw new ResponseStatusException(HttpStatus.NOT_FOUND, "Address not found");
+ }
+ repository.deleteById(id);
+ }
+
+ private List runFilter(Map filter) {
+ StringBuilder hql = new StringBuilder("from AddressEntity e");
+ Map params = new LinkedHashMap<>();
+ boolean first = true;
+ if (filter != null && filter.get("equals") instanceof Map, ?> equals) {
+ for (Map.Entry, ?> entry : equals.entrySet()) {
+ String field = requireKnownField(String.valueOf(entry.getKey()));
+ String paramName = "p" + params.size();
+ hql.append(first ? " where e." : " and e.").append(field).append(" = :").append(paramName);
+ params.put(paramName, entry.getValue());
+ first = false;
+ }
+ }
+ if (filter != null && filter.get("conditions") instanceof List> conditions) {
+ for (Object raw : conditions) {
+ if (!(raw instanceof Map, ?> condition)) {
+ throw new ResponseStatusException(HttpStatus.BAD_REQUEST, "Invalid filter condition");
+ }
+ String field = requireKnownField(String.valueOf(condition.get("propertyName")));
+ String operator = String.valueOf(condition.get("operator")).toUpperCase(Locale.ROOT);
+ Object value = condition.get("value");
+ String paramName = "p" + params.size();
+ String clause = switch (operator) {
+ case "EQ" -> "e." + field + " = :" + paramName;
+ case "IN" -> {
+ if (!(value instanceof Collection>)) {
+ throw new ResponseStatusException(HttpStatus.BAD_REQUEST, "IN value must be a list for field: " + field);
+ }
+ yield "e." + field + " in (:" + paramName + ")";
+ }
+ case "LIKE" -> "e." + field + " like :" + paramName;
+ default -> throw new ResponseStatusException(HttpStatus.BAD_REQUEST, "Unsupported operator: " + operator);
+ };
+ hql.append(first ? " where " : " and ").append(clause);
+ params.put(paramName, value);
+ first = false;
+ }
+ }
+ return repository.query(hql.toString(), params);
+ }
+
+ private static String requireKnownField(String field) {
+ if (!FILTER_FIELDS.contains(field)) {
+ throw new ResponseStatusException(HttpStatus.BAD_REQUEST, "Unknown filter field: " + field);
+ }
+ return field;
+ }
+
+ private static void validate(AddressEntity entity) {
+ if (entity.Country == null) {
+ throw new ResponseStatusException(HttpStatus.BAD_REQUEST, "The 'Country' property is required");
+ }
+ if (entity.City == null) {
+ throw new ResponseStatusException(HttpStatus.BAD_REQUEST, "The 'City' property is required");
+ }
+ if (entity.Address == null) {
+ throw new ResponseStatusException(HttpStatus.BAD_REQUEST, "The 'Address' property is required");
+ }
+ if (entity.Address != null && entity.Address.length() > 255) {
+ throw new ResponseStatusException(HttpStatus.BAD_REQUEST, "The 'Address' exceeds the maximum length of 255");
+ }
+ if (entity.PostalCode == null) {
+ throw new ResponseStatusException(HttpStatus.BAD_REQUEST, "The 'PostalCode' property is required");
+ }
+ if (entity.PostalCode != null && entity.PostalCode.length() > 12) {
+ throw new ResponseStatusException(HttpStatus.BAD_REQUEST, "The 'PostalCode' exceeds the maximum length of 12");
+ }
+ if (entity.CreatedBy != null && entity.CreatedBy.length() > 20) {
+ throw new ResponseStatusException(HttpStatus.BAD_REQUEST, "The 'CreatedBy' exceeds the maximum length of 20");
+ }
+ if (entity.UpdatedBy != null && entity.UpdatedBy.length() > 20) {
+ throw new ResponseStatusException(HttpStatus.BAD_REQUEST, "The 'UpdatedBy' exceeds the maximum length of 20");
+ }
+ }
+}
diff --git a/codbex-employees/gen/codbex_employees/api/employees/ContactController.java b/codbex-employees/gen/codbex_employees/api/employees/ContactController.java
new file mode 100644
index 0000000..23ccca6
--- /dev/null
+++ b/codbex-employees/gen/codbex_employees/api/employees/ContactController.java
@@ -0,0 +1,190 @@
+package gen.codbex_employees.api.employees;
+
+import gen.codbex_employees.data.employees.ContactEntity;
+import gen.codbex_employees.data.employees.ContactRepository;
+
+import org.eclipse.dirigible.components.api.security.UserFacade;
+import org.eclipse.dirigible.engine.java.annotations.Documentation;
+import org.eclipse.dirigible.engine.java.annotations.Inject;
+import org.eclipse.dirigible.engine.java.annotations.http.Body;
+import org.eclipse.dirigible.engine.java.annotations.http.Controller;
+import org.eclipse.dirigible.engine.java.annotations.http.Delete;
+import org.eclipse.dirigible.engine.java.annotations.http.Get;
+import org.eclipse.dirigible.engine.java.annotations.http.PathParam;
+import org.eclipse.dirigible.engine.java.annotations.http.Post;
+import org.eclipse.dirigible.engine.java.annotations.http.Put;
+import org.eclipse.dirigible.engine.java.annotations.http.QueryParam;
+import org.springframework.http.HttpStatus;
+import org.springframework.web.server.ResponseStatusException;
+
+import java.util.Collection;
+import java.util.LinkedHashMap;
+import java.util.List;
+import java.util.Locale;
+import java.util.Map;
+import java.util.Set;
+
+@Controller
+@Documentation("codbex-employees - Contact Controller")
+public class ContactController {
+
+ private static final Set FILTER_FIELDS = Set.of("Id", "PhoneNumber", "Email", "Employee", "CreatedAt", "CreatedBy", "UpdatedAt", "UpdatedBy");
+
+ @Inject
+ private ContactRepository repository;
+
+ @Get
+ @Documentation("List Contact")
+ public List getAll(@QueryParam("$limit") Integer limit,
+ @QueryParam("$offset") Integer offset,
+ @QueryParam("Employee") String Employee) {
+ checkPermissions("read");
+ int actualLimit = limit != null ? limit.intValue() : 20;
+ int actualOffset = offset != null ? offset.intValue() : 0;
+ List result;
+ if (Employee != null) {
+ Map params = new LinkedHashMap<>();
+ params.put("Employee", Employee);
+ result = repository.query("from ContactEntity e where e.Employee = :Employee", params);
+ } else {
+ result = repository.findAll(actualLimit, actualOffset);
+ }
+ return result;
+ }
+
+ @Get("/count")
+ @Documentation("Count Contact")
+ public Map count() {
+ checkPermissions("read");
+ return Map.of("count", repository.count());
+ }
+
+ @Post("/count")
+ @Documentation("Count Contact with filter")
+ public Map countWithFilter(@Body Map filter) {
+ checkPermissions("read");
+ return Map.of("count", (long) runFilter(filter).size());
+ }
+
+ @Post("/search")
+ @Documentation("Search Contact")
+ public List search(@Body Map filter) {
+ checkPermissions("read");
+ List result = runFilter(filter);
+ return result;
+ }
+
+ @Get("/{id}")
+ @Documentation("Get Contact by id")
+ public ContactEntity getById(@PathParam("id") Integer id) {
+ checkPermissions("read");
+ ContactEntity entity = repository.findOne(id)
+ .orElseThrow(() -> new ResponseStatusException(HttpStatus.NOT_FOUND, "Contact not found"));
+ return entity;
+ }
+
+ @Post
+ @Documentation("Create Contact")
+ public ContactEntity create(@Body ContactEntity entity) {
+ checkPermissions("write");
+ validate(entity);
+ return repository.save(entity);
+ }
+
+ @Put("/{id}")
+ @Documentation("Update Contact by id")
+ public ContactEntity update(@PathParam("id") Integer id, @Body ContactEntity entity) {
+ checkPermissions("write");
+ entity.Id = id;
+ validate(entity);
+ return repository.update(entity);
+ }
+
+ @Delete("/{id}")
+ @Documentation("Delete Contact by id")
+ public void deleteById(@PathParam("id") Integer id) {
+ checkPermissions("write");
+ if (repository.findOne(id).isEmpty()) {
+ throw new ResponseStatusException(HttpStatus.NOT_FOUND, "Contact not found");
+ }
+ repository.deleteById(id);
+ }
+
+ private List runFilter(Map filter) {
+ StringBuilder hql = new StringBuilder("from ContactEntity e");
+ Map params = new LinkedHashMap<>();
+ boolean first = true;
+ if (filter != null && filter.get("equals") instanceof Map, ?> equals) {
+ for (Map.Entry, ?> entry : equals.entrySet()) {
+ String field = requireKnownField(String.valueOf(entry.getKey()));
+ String paramName = "p" + params.size();
+ hql.append(first ? " where e." : " and e.").append(field).append(" = :").append(paramName);
+ params.put(paramName, entry.getValue());
+ first = false;
+ }
+ }
+ if (filter != null && filter.get("conditions") instanceof List> conditions) {
+ for (Object raw : conditions) {
+ if (!(raw instanceof Map, ?> condition)) {
+ throw new ResponseStatusException(HttpStatus.BAD_REQUEST, "Invalid filter condition");
+ }
+ String field = requireKnownField(String.valueOf(condition.get("propertyName")));
+ String operator = String.valueOf(condition.get("operator")).toUpperCase(Locale.ROOT);
+ Object value = condition.get("value");
+ String paramName = "p" + params.size();
+ String clause = switch (operator) {
+ case "EQ" -> "e." + field + " = :" + paramName;
+ case "IN" -> {
+ if (!(value instanceof Collection>)) {
+ throw new ResponseStatusException(HttpStatus.BAD_REQUEST, "IN value must be a list for field: " + field);
+ }
+ yield "e." + field + " in (:" + paramName + ")";
+ }
+ case "LIKE" -> "e." + field + " like :" + paramName;
+ default -> throw new ResponseStatusException(HttpStatus.BAD_REQUEST, "Unsupported operator: " + operator);
+ };
+ hql.append(first ? " where " : " and ").append(clause);
+ params.put(paramName, value);
+ first = false;
+ }
+ }
+ return repository.query(hql.toString(), params);
+ }
+
+ private static String requireKnownField(String field) {
+ if (!FILTER_FIELDS.contains(field)) {
+ throw new ResponseStatusException(HttpStatus.BAD_REQUEST, "Unknown filter field: " + field);
+ }
+ return field;
+ }
+
+ private void checkPermissions(String op) {
+ if ("read".equals(op) && !(UserFacade.isInRole("codbex-employees.Employees.ContactReadOnly") || UserFacade.isInRole("codbex-employees.Employees.ContactFullAccess"))) {
+ throw new ResponseStatusException(HttpStatus.FORBIDDEN);
+ }
+ if ("write".equals(op) && !UserFacade.isInRole("codbex-employees.Employees.ContactFullAccess")) {
+ throw new ResponseStatusException(HttpStatus.FORBIDDEN);
+ }
+ }
+
+ private static void validate(ContactEntity entity) {
+ if (entity.PhoneNumber == null) {
+ throw new ResponseStatusException(HttpStatus.BAD_REQUEST, "The 'PhoneNumber' property is required");
+ }
+ if (entity.PhoneNumber != null && entity.PhoneNumber.length() > 20) {
+ throw new ResponseStatusException(HttpStatus.BAD_REQUEST, "The 'PhoneNumber' exceeds the maximum length of 20");
+ }
+ if (entity.Email == null) {
+ throw new ResponseStatusException(HttpStatus.BAD_REQUEST, "The 'Email' property is required");
+ }
+ if (entity.Email != null && entity.Email.length() > 255) {
+ throw new ResponseStatusException(HttpStatus.BAD_REQUEST, "The 'Email' exceeds the maximum length of 255");
+ }
+ if (entity.CreatedBy != null && entity.CreatedBy.length() > 20) {
+ throw new ResponseStatusException(HttpStatus.BAD_REQUEST, "The 'CreatedBy' exceeds the maximum length of 20");
+ }
+ if (entity.UpdatedBy != null && entity.UpdatedBy.length() > 20) {
+ throw new ResponseStatusException(HttpStatus.BAD_REQUEST, "The 'UpdatedBy' exceeds the maximum length of 20");
+ }
+ }
+}
diff --git a/codbex-employees/gen/codbex_employees/api/employees/EmployeeController.java b/codbex-employees/gen/codbex_employees/api/employees/EmployeeController.java
new file mode 100644
index 0000000..8cce30f
--- /dev/null
+++ b/codbex-employees/gen/codbex_employees/api/employees/EmployeeController.java
@@ -0,0 +1,227 @@
+package gen.codbex_employees.api.employees;
+
+import gen.codbex_employees.data.employees.EmployeeEntity;
+import gen.codbex_employees.data.employees.EmployeeRepository;
+
+import org.eclipse.dirigible.components.api.security.UserFacade;
+import org.eclipse.dirigible.engine.java.annotations.Documentation;
+import org.eclipse.dirigible.engine.java.annotations.Inject;
+import org.eclipse.dirigible.engine.java.annotations.http.Body;
+import org.eclipse.dirigible.engine.java.annotations.http.Controller;
+import org.eclipse.dirigible.engine.java.annotations.http.Delete;
+import org.eclipse.dirigible.engine.java.annotations.http.Get;
+import org.eclipse.dirigible.engine.java.annotations.http.PathParam;
+import org.eclipse.dirigible.engine.java.annotations.http.Post;
+import org.eclipse.dirigible.engine.java.annotations.http.Put;
+import org.eclipse.dirigible.engine.java.annotations.http.QueryParam;
+import org.springframework.http.HttpStatus;
+import org.springframework.web.server.ResponseStatusException;
+
+import java.util.Collection;
+import java.util.LinkedHashMap;
+import java.util.List;
+import java.util.Locale;
+import java.util.Map;
+import java.util.Set;
+
+@Controller
+@Documentation("codbex-employees - Employee Controller")
+public class EmployeeController {
+
+ private static final Set FILTER_FIELDS = Set.of("Id", "FirstName", "MiddleName", "LastName", "Name", "Email", "PhoneNumber", "BirthDate", "PersonalNumber", "Nationality", "Gender", "MartialStatus", "IBAN", "CreatedAt", "CreatedBy", "UpdatedAt", "UpdatedBy");
+
+ @Inject
+ private EmployeeRepository repository;
+
+ @Get
+ @Documentation("List Employee")
+ public List getAll(@QueryParam("$limit") Integer limit,
+ @QueryParam("$offset") Integer offset) {
+ checkPermissions("read");
+ int actualLimit = limit != null ? limit.intValue() : 20;
+ int actualOffset = offset != null ? offset.intValue() : 0;
+ List result = repository.findAll(actualLimit, actualOffset);
+ return result;
+ }
+
+ @Get("/count")
+ @Documentation("Count Employee")
+ public Map count() {
+ checkPermissions("read");
+ return Map.of("count", repository.count());
+ }
+
+ @Post("/count")
+ @Documentation("Count Employee with filter")
+ public Map countWithFilter(@Body Map filter) {
+ checkPermissions("read");
+ return Map.of("count", (long) runFilter(filter).size());
+ }
+
+ @Post("/search")
+ @Documentation("Search Employee")
+ public List search(@Body Map filter) {
+ checkPermissions("read");
+ List result = runFilter(filter);
+ return result;
+ }
+
+ @Get("/{id}")
+ @Documentation("Get Employee by id")
+ public EmployeeEntity getById(@PathParam("id") Integer id) {
+ checkPermissions("read");
+ EmployeeEntity entity = repository.findOne(id)
+ .orElseThrow(() -> new ResponseStatusException(HttpStatus.NOT_FOUND, "Employee not found"));
+ return entity;
+ }
+
+ @Post
+ @Documentation("Create Employee")
+ public EmployeeEntity create(@Body EmployeeEntity entity) {
+ checkPermissions("write");
+ validate(entity);
+ return repository.save(entity);
+ }
+
+ @Put("/{id}")
+ @Documentation("Update Employee by id")
+ public EmployeeEntity update(@PathParam("id") Integer id, @Body EmployeeEntity entity) {
+ checkPermissions("write");
+ entity.Id = id;
+ validate(entity);
+ return repository.update(entity);
+ }
+
+ @Delete("/{id}")
+ @Documentation("Delete Employee by id")
+ public void deleteById(@PathParam("id") Integer id) {
+ checkPermissions("write");
+ if (repository.findOne(id).isEmpty()) {
+ throw new ResponseStatusException(HttpStatus.NOT_FOUND, "Employee not found");
+ }
+ repository.deleteById(id);
+ }
+
+ private List runFilter(Map filter) {
+ StringBuilder hql = new StringBuilder("from EmployeeEntity e");
+ Map params = new LinkedHashMap<>();
+ boolean first = true;
+ if (filter != null && filter.get("equals") instanceof Map, ?> equals) {
+ for (Map.Entry, ?> entry : equals.entrySet()) {
+ String field = requireKnownField(String.valueOf(entry.getKey()));
+ String paramName = "p" + params.size();
+ hql.append(first ? " where e." : " and e.").append(field).append(" = :").append(paramName);
+ params.put(paramName, entry.getValue());
+ first = false;
+ }
+ }
+ if (filter != null && filter.get("conditions") instanceof List> conditions) {
+ for (Object raw : conditions) {
+ if (!(raw instanceof Map, ?> condition)) {
+ throw new ResponseStatusException(HttpStatus.BAD_REQUEST, "Invalid filter condition");
+ }
+ String field = requireKnownField(String.valueOf(condition.get("propertyName")));
+ String operator = String.valueOf(condition.get("operator")).toUpperCase(Locale.ROOT);
+ Object value = condition.get("value");
+ String paramName = "p" + params.size();
+ String clause = switch (operator) {
+ case "EQ" -> "e." + field + " = :" + paramName;
+ case "IN" -> {
+ if (!(value instanceof Collection>)) {
+ throw new ResponseStatusException(HttpStatus.BAD_REQUEST, "IN value must be a list for field: " + field);
+ }
+ yield "e." + field + " in (:" + paramName + ")";
+ }
+ case "LIKE" -> "e." + field + " like :" + paramName;
+ default -> throw new ResponseStatusException(HttpStatus.BAD_REQUEST, "Unsupported operator: " + operator);
+ };
+ hql.append(first ? " where " : " and ").append(clause);
+ params.put(paramName, value);
+ first = false;
+ }
+ }
+ return repository.query(hql.toString(), params);
+ }
+
+ private static String requireKnownField(String field) {
+ if (!FILTER_FIELDS.contains(field)) {
+ throw new ResponseStatusException(HttpStatus.BAD_REQUEST, "Unknown filter field: " + field);
+ }
+ return field;
+ }
+
+ private void checkPermissions(String op) {
+ if ("read".equals(op) && !(UserFacade.isInRole("codbex-employees.Employees.EmployeeReadOnly") || UserFacade.isInRole("codbex-employees.Employees.EmployeeFullAccess"))) {
+ throw new ResponseStatusException(HttpStatus.FORBIDDEN);
+ }
+ if ("write".equals(op) && !UserFacade.isInRole("codbex-employees.Employees.EmployeeFullAccess")) {
+ throw new ResponseStatusException(HttpStatus.FORBIDDEN);
+ }
+ }
+
+ private static void validate(EmployeeEntity entity) {
+ if (entity.FirstName == null) {
+ throw new ResponseStatusException(HttpStatus.BAD_REQUEST, "The 'FirstName' property is required");
+ }
+ if (entity.FirstName != null && entity.FirstName.length() > 50) {
+ throw new ResponseStatusException(HttpStatus.BAD_REQUEST, "The 'FirstName' exceeds the maximum length of 50");
+ }
+ if (entity.MiddleName != null && entity.MiddleName.length() > 50) {
+ throw new ResponseStatusException(HttpStatus.BAD_REQUEST, "The 'MiddleName' exceeds the maximum length of 50");
+ }
+ if (entity.LastName == null) {
+ throw new ResponseStatusException(HttpStatus.BAD_REQUEST, "The 'LastName' property is required");
+ }
+ if (entity.LastName != null && entity.LastName.length() > 50) {
+ throw new ResponseStatusException(HttpStatus.BAD_REQUEST, "The 'LastName' exceeds the maximum length of 50");
+ }
+ if (entity.Name != null && entity.Name.length() > 70) {
+ throw new ResponseStatusException(HttpStatus.BAD_REQUEST, "The 'Name' exceeds the maximum length of 70");
+ }
+ if (entity.Email == null) {
+ throw new ResponseStatusException(HttpStatus.BAD_REQUEST, "The 'Email' property is required");
+ }
+ if (entity.Email != null && entity.Email.length() > 40) {
+ throw new ResponseStatusException(HttpStatus.BAD_REQUEST, "The 'Email' exceeds the maximum length of 40");
+ }
+ if (entity.PhoneNumber == null) {
+ throw new ResponseStatusException(HttpStatus.BAD_REQUEST, "The 'PhoneNumber' property is required");
+ }
+ if (entity.PhoneNumber != null && entity.PhoneNumber.length() > 20) {
+ throw new ResponseStatusException(HttpStatus.BAD_REQUEST, "The 'PhoneNumber' exceeds the maximum length of 20");
+ }
+ if (entity.BirthDate == null) {
+ throw new ResponseStatusException(HttpStatus.BAD_REQUEST, "The 'BirthDate' property is required");
+ }
+ if (entity.PersonalNumber == null) {
+ throw new ResponseStatusException(HttpStatus.BAD_REQUEST, "The 'PersonalNumber' property is required");
+ }
+ if (entity.PersonalNumber != null && entity.PersonalNumber.length() > 10) {
+ throw new ResponseStatusException(HttpStatus.BAD_REQUEST, "The 'PersonalNumber' exceeds the maximum length of 10");
+ }
+ if (entity.Nationality == null) {
+ throw new ResponseStatusException(HttpStatus.BAD_REQUEST, "The 'Nationality' property is required");
+ }
+ if (entity.Gender == null) {
+ throw new ResponseStatusException(HttpStatus.BAD_REQUEST, "The 'Gender' property is required");
+ }
+ if (entity.MartialStatus == null) {
+ throw new ResponseStatusException(HttpStatus.BAD_REQUEST, "The 'MartialStatus' property is required");
+ }
+ if (entity.IBAN == null) {
+ throw new ResponseStatusException(HttpStatus.BAD_REQUEST, "The 'IBAN' property is required");
+ }
+ if (entity.IBAN != null && entity.IBAN.length() > 34) {
+ throw new ResponseStatusException(HttpStatus.BAD_REQUEST, "The 'IBAN' exceeds the maximum length of 34");
+ }
+ if (entity.IBAN != null && !entity.IBAN.toString().matches("^[A-Z]{2}[0-9]{2}[A-Z0-9]{11,30}$")) {
+ throw new ResponseStatusException(HttpStatus.BAD_REQUEST, "The value of 'IBAN' does not match the required pattern '^[A-Z]{2}[0-9]{2}[A-Z0-9]{11,30}$'");
+ }
+ if (entity.CreatedBy != null && entity.CreatedBy.length() > 20) {
+ throw new ResponseStatusException(HttpStatus.BAD_REQUEST, "The 'CreatedBy' exceeds the maximum length of 20");
+ }
+ if (entity.UpdatedBy != null && entity.UpdatedBy.length() > 20) {
+ throw new ResponseStatusException(HttpStatus.BAD_REQUEST, "The 'UpdatedBy' exceeds the maximum length of 20");
+ }
+ }
+}
diff --git a/codbex-employees/gen/codbex_employees/api/settings/GenderController.java b/codbex-employees/gen/codbex_employees/api/settings/GenderController.java
new file mode 100644
index 0000000..4e1d724
--- /dev/null
+++ b/codbex-employees/gen/codbex_employees/api/settings/GenderController.java
@@ -0,0 +1,170 @@
+package gen.codbex_employees.api.settings;
+
+import gen.codbex_employees.data.settings.GenderEntity;
+import gen.codbex_employees.data.settings.GenderRepository;
+
+import org.eclipse.dirigible.components.api.security.UserFacade;
+import org.eclipse.dirigible.engine.java.annotations.Documentation;
+import org.eclipse.dirigible.engine.java.annotations.Inject;
+import org.eclipse.dirigible.engine.java.annotations.http.Body;
+import org.eclipse.dirigible.engine.java.annotations.http.Controller;
+import org.eclipse.dirigible.engine.java.annotations.http.Delete;
+import org.eclipse.dirigible.engine.java.annotations.http.Get;
+import org.eclipse.dirigible.engine.java.annotations.http.PathParam;
+import org.eclipse.dirigible.engine.java.annotations.http.Post;
+import org.eclipse.dirigible.engine.java.annotations.http.Put;
+import org.eclipse.dirigible.engine.java.annotations.http.QueryParam;
+import org.springframework.http.HttpStatus;
+import org.springframework.web.server.ResponseStatusException;
+
+import java.util.Collection;
+import java.util.LinkedHashMap;
+import java.util.List;
+import java.util.Locale;
+import java.util.Map;
+import java.util.Set;
+
+@Controller
+@Documentation("codbex-employees - Gender Controller")
+public class GenderController {
+
+ private static final Set FILTER_FIELDS = Set.of("Id", "Name");
+
+ @Inject
+ private GenderRepository repository;
+
+ @Get
+ @Documentation("List Gender")
+ public List getAll(@QueryParam("$limit") Integer limit,
+ @QueryParam("$offset") Integer offset) {
+ checkPermissions("read");
+ int actualLimit = limit != null ? limit.intValue() : 20;
+ int actualOffset = offset != null ? offset.intValue() : 0;
+ List result = repository.findAll(actualLimit, actualOffset);
+ return result;
+ }
+
+ @Get("/count")
+ @Documentation("Count Gender")
+ public Map count() {
+ checkPermissions("read");
+ return Map.of("count", repository.count());
+ }
+
+ @Post("/count")
+ @Documentation("Count Gender with filter")
+ public Map countWithFilter(@Body Map filter) {
+ checkPermissions("read");
+ return Map.of("count", (long) runFilter(filter).size());
+ }
+
+ @Post("/search")
+ @Documentation("Search Gender")
+ public List search(@Body Map filter) {
+ checkPermissions("read");
+ List result = runFilter(filter);
+ return result;
+ }
+
+ @Get("/{id}")
+ @Documentation("Get Gender by id")
+ public GenderEntity getById(@PathParam("id") Integer id) {
+ checkPermissions("read");
+ GenderEntity entity = repository.findOne(id)
+ .orElseThrow(() -> new ResponseStatusException(HttpStatus.NOT_FOUND, "Gender not found"));
+ return entity;
+ }
+
+ @Post
+ @Documentation("Create Gender")
+ public GenderEntity create(@Body GenderEntity entity) {
+ checkPermissions("write");
+ validate(entity);
+ return repository.save(entity);
+ }
+
+ @Put("/{id}")
+ @Documentation("Update Gender by id")
+ public GenderEntity update(@PathParam("id") Integer id, @Body GenderEntity entity) {
+ checkPermissions("write");
+ entity.Id = id;
+ validate(entity);
+ return repository.update(entity);
+ }
+
+ @Delete("/{id}")
+ @Documentation("Delete Gender by id")
+ public void deleteById(@PathParam("id") Integer id) {
+ checkPermissions("write");
+ if (repository.findOne(id).isEmpty()) {
+ throw new ResponseStatusException(HttpStatus.NOT_FOUND, "Gender not found");
+ }
+ repository.deleteById(id);
+ }
+
+ private List runFilter(Map filter) {
+ StringBuilder hql = new StringBuilder("from GenderEntity e");
+ Map params = new LinkedHashMap<>();
+ boolean first = true;
+ if (filter != null && filter.get("equals") instanceof Map, ?> equals) {
+ for (Map.Entry, ?> entry : equals.entrySet()) {
+ String field = requireKnownField(String.valueOf(entry.getKey()));
+ String paramName = "p" + params.size();
+ hql.append(first ? " where e." : " and e.").append(field).append(" = :").append(paramName);
+ params.put(paramName, entry.getValue());
+ first = false;
+ }
+ }
+ if (filter != null && filter.get("conditions") instanceof List> conditions) {
+ for (Object raw : conditions) {
+ if (!(raw instanceof Map, ?> condition)) {
+ throw new ResponseStatusException(HttpStatus.BAD_REQUEST, "Invalid filter condition");
+ }
+ String field = requireKnownField(String.valueOf(condition.get("propertyName")));
+ String operator = String.valueOf(condition.get("operator")).toUpperCase(Locale.ROOT);
+ Object value = condition.get("value");
+ String paramName = "p" + params.size();
+ String clause = switch (operator) {
+ case "EQ" -> "e." + field + " = :" + paramName;
+ case "IN" -> {
+ if (!(value instanceof Collection>)) {
+ throw new ResponseStatusException(HttpStatus.BAD_REQUEST, "IN value must be a list for field: " + field);
+ }
+ yield "e." + field + " in (:" + paramName + ")";
+ }
+ case "LIKE" -> "e." + field + " like :" + paramName;
+ default -> throw new ResponseStatusException(HttpStatus.BAD_REQUEST, "Unsupported operator: " + operator);
+ };
+ hql.append(first ? " where " : " and ").append(clause);
+ params.put(paramName, value);
+ first = false;
+ }
+ }
+ return repository.query(hql.toString(), params);
+ }
+
+ private static String requireKnownField(String field) {
+ if (!FILTER_FIELDS.contains(field)) {
+ throw new ResponseStatusException(HttpStatus.BAD_REQUEST, "Unknown filter field: " + field);
+ }
+ return field;
+ }
+
+ private void checkPermissions(String op) {
+ if ("read".equals(op) && !(UserFacade.isInRole("codbex-employees.EmployeesSettings.GenderReadOnly") || UserFacade.isInRole("codbex-employees.EmployeesSettings.GenderFullAccess"))) {
+ throw new ResponseStatusException(HttpStatus.FORBIDDEN);
+ }
+ if ("write".equals(op) && !UserFacade.isInRole("codbex-employees.EmployeesSettings.GenderFullAccess")) {
+ throw new ResponseStatusException(HttpStatus.FORBIDDEN);
+ }
+ }
+
+ private static void validate(GenderEntity entity) {
+ if (entity.Name == null) {
+ throw new ResponseStatusException(HttpStatus.BAD_REQUEST, "The 'Name' property is required");
+ }
+ if (entity.Name != null && entity.Name.length() > 7) {
+ throw new ResponseStatusException(HttpStatus.BAD_REQUEST, "The 'Name' exceeds the maximum length of 7");
+ }
+ }
+}
diff --git a/codbex-employees/gen/codbex_employees/api/settings/MartialStatusController.java b/codbex-employees/gen/codbex_employees/api/settings/MartialStatusController.java
new file mode 100644
index 0000000..5a8868f
--- /dev/null
+++ b/codbex-employees/gen/codbex_employees/api/settings/MartialStatusController.java
@@ -0,0 +1,170 @@
+package gen.codbex_employees.api.settings;
+
+import gen.codbex_employees.data.settings.MartialStatusEntity;
+import gen.codbex_employees.data.settings.MartialStatusRepository;
+
+import org.eclipse.dirigible.components.api.security.UserFacade;
+import org.eclipse.dirigible.engine.java.annotations.Documentation;
+import org.eclipse.dirigible.engine.java.annotations.Inject;
+import org.eclipse.dirigible.engine.java.annotations.http.Body;
+import org.eclipse.dirigible.engine.java.annotations.http.Controller;
+import org.eclipse.dirigible.engine.java.annotations.http.Delete;
+import org.eclipse.dirigible.engine.java.annotations.http.Get;
+import org.eclipse.dirigible.engine.java.annotations.http.PathParam;
+import org.eclipse.dirigible.engine.java.annotations.http.Post;
+import org.eclipse.dirigible.engine.java.annotations.http.Put;
+import org.eclipse.dirigible.engine.java.annotations.http.QueryParam;
+import org.springframework.http.HttpStatus;
+import org.springframework.web.server.ResponseStatusException;
+
+import java.util.Collection;
+import java.util.LinkedHashMap;
+import java.util.List;
+import java.util.Locale;
+import java.util.Map;
+import java.util.Set;
+
+@Controller
+@Documentation("codbex-employees - MartialStatus Controller")
+public class MartialStatusController {
+
+ private static final Set FILTER_FIELDS = Set.of("Id", "Name");
+
+ @Inject
+ private MartialStatusRepository repository;
+
+ @Get
+ @Documentation("List MartialStatus")
+ public List getAll(@QueryParam("$limit") Integer limit,
+ @QueryParam("$offset") Integer offset) {
+ checkPermissions("read");
+ int actualLimit = limit != null ? limit.intValue() : 20;
+ int actualOffset = offset != null ? offset.intValue() : 0;
+ List result = repository.findAll(actualLimit, actualOffset);
+ return result;
+ }
+
+ @Get("/count")
+ @Documentation("Count MartialStatus")
+ public Map count() {
+ checkPermissions("read");
+ return Map.of("count", repository.count());
+ }
+
+ @Post("/count")
+ @Documentation("Count MartialStatus with filter")
+ public Map countWithFilter(@Body Map filter) {
+ checkPermissions("read");
+ return Map.of("count", (long) runFilter(filter).size());
+ }
+
+ @Post("/search")
+ @Documentation("Search MartialStatus")
+ public List search(@Body Map filter) {
+ checkPermissions("read");
+ List result = runFilter(filter);
+ return result;
+ }
+
+ @Get("/{id}")
+ @Documentation("Get MartialStatus by id")
+ public MartialStatusEntity getById(@PathParam("id") Integer id) {
+ checkPermissions("read");
+ MartialStatusEntity entity = repository.findOne(id)
+ .orElseThrow(() -> new ResponseStatusException(HttpStatus.NOT_FOUND, "MartialStatus not found"));
+ return entity;
+ }
+
+ @Post
+ @Documentation("Create MartialStatus")
+ public MartialStatusEntity create(@Body MartialStatusEntity entity) {
+ checkPermissions("write");
+ validate(entity);
+ return repository.save(entity);
+ }
+
+ @Put("/{id}")
+ @Documentation("Update MartialStatus by id")
+ public MartialStatusEntity update(@PathParam("id") Integer id, @Body MartialStatusEntity entity) {
+ checkPermissions("write");
+ entity.Id = id;
+ validate(entity);
+ return repository.update(entity);
+ }
+
+ @Delete("/{id}")
+ @Documentation("Delete MartialStatus by id")
+ public void deleteById(@PathParam("id") Integer id) {
+ checkPermissions("write");
+ if (repository.findOne(id).isEmpty()) {
+ throw new ResponseStatusException(HttpStatus.NOT_FOUND, "MartialStatus not found");
+ }
+ repository.deleteById(id);
+ }
+
+ private List runFilter(Map filter) {
+ StringBuilder hql = new StringBuilder("from MartialStatusEntity e");
+ Map params = new LinkedHashMap<>();
+ boolean first = true;
+ if (filter != null && filter.get("equals") instanceof Map, ?> equals) {
+ for (Map.Entry, ?> entry : equals.entrySet()) {
+ String field = requireKnownField(String.valueOf(entry.getKey()));
+ String paramName = "p" + params.size();
+ hql.append(first ? " where e." : " and e.").append(field).append(" = :").append(paramName);
+ params.put(paramName, entry.getValue());
+ first = false;
+ }
+ }
+ if (filter != null && filter.get("conditions") instanceof List> conditions) {
+ for (Object raw : conditions) {
+ if (!(raw instanceof Map, ?> condition)) {
+ throw new ResponseStatusException(HttpStatus.BAD_REQUEST, "Invalid filter condition");
+ }
+ String field = requireKnownField(String.valueOf(condition.get("propertyName")));
+ String operator = String.valueOf(condition.get("operator")).toUpperCase(Locale.ROOT);
+ Object value = condition.get("value");
+ String paramName = "p" + params.size();
+ String clause = switch (operator) {
+ case "EQ" -> "e." + field + " = :" + paramName;
+ case "IN" -> {
+ if (!(value instanceof Collection>)) {
+ throw new ResponseStatusException(HttpStatus.BAD_REQUEST, "IN value must be a list for field: " + field);
+ }
+ yield "e." + field + " in (:" + paramName + ")";
+ }
+ case "LIKE" -> "e." + field + " like :" + paramName;
+ default -> throw new ResponseStatusException(HttpStatus.BAD_REQUEST, "Unsupported operator: " + operator);
+ };
+ hql.append(first ? " where " : " and ").append(clause);
+ params.put(paramName, value);
+ first = false;
+ }
+ }
+ return repository.query(hql.toString(), params);
+ }
+
+ private static String requireKnownField(String field) {
+ if (!FILTER_FIELDS.contains(field)) {
+ throw new ResponseStatusException(HttpStatus.BAD_REQUEST, "Unknown filter field: " + field);
+ }
+ return field;
+ }
+
+ private void checkPermissions(String op) {
+ if ("read".equals(op) && !(UserFacade.isInRole("codbex-employees.EmployeesSettings.MartialStatusReadOnly") || UserFacade.isInRole("codbex-employees.EmployeesSettings.MartialStatusFullAccess"))) {
+ throw new ResponseStatusException(HttpStatus.FORBIDDEN);
+ }
+ if ("write".equals(op) && !UserFacade.isInRole("codbex-employees.EmployeesSettings.MartialStatusFullAccess")) {
+ throw new ResponseStatusException(HttpStatus.FORBIDDEN);
+ }
+ }
+
+ private static void validate(MartialStatusEntity entity) {
+ if (entity.Name == null) {
+ throw new ResponseStatusException(HttpStatus.BAD_REQUEST, "The 'Name' property is required");
+ }
+ if (entity.Name != null && entity.Name.length() > 20) {
+ throw new ResponseStatusException(HttpStatus.BAD_REQUEST, "The 'Name' exceeds the maximum length of 20");
+ }
+ }
+}
diff --git a/codbex-employees/gen/codbex-employees/data/Employees/Address.extensionpoint b/codbex-employees/gen/codbex_employees/data/employees/Address.extensionpoint
similarity index 98%
rename from codbex-employees/gen/codbex-employees/data/Employees/Address.extensionpoint
rename to codbex-employees/gen/codbex_employees/data/employees/Address.extensionpoint
index 886bf26..16b94f9 100644
--- a/codbex-employees/gen/codbex-employees/data/Employees/Address.extensionpoint
+++ b/codbex-employees/gen/codbex_employees/data/employees/Address.extensionpoint
@@ -1,4 +1,4 @@
{
"name": "codbex-employees-Employees-Address",
"description": "Extension Point for the codbex-employees-Employees-Address entity"
-}
\ No newline at end of file
+}
diff --git a/codbex-employees/gen/codbex_employees/data/employees/AddressEntity.java b/codbex-employees/gen/codbex_employees/data/employees/AddressEntity.java
new file mode 100644
index 0000000..1c21317
--- /dev/null
+++ b/codbex-employees/gen/codbex_employees/data/employees/AddressEntity.java
@@ -0,0 +1,66 @@
+package gen.codbex_employees.data.employees;
+
+import org.eclipse.dirigible.engine.java.annotations.Column;
+import org.eclipse.dirigible.engine.java.annotations.CreatedAt;
+import org.eclipse.dirigible.engine.java.annotations.CreatedBy;
+import org.eclipse.dirigible.engine.java.annotations.Documentation;
+import org.eclipse.dirigible.engine.java.annotations.Entity;
+import org.eclipse.dirigible.engine.java.annotations.GeneratedValue;
+import org.eclipse.dirigible.engine.java.annotations.GenerationType;
+import org.eclipse.dirigible.engine.java.annotations.Id;
+import org.eclipse.dirigible.engine.java.annotations.Table;
+import org.eclipse.dirigible.engine.java.annotations.UpdatedAt;
+import org.eclipse.dirigible.engine.java.annotations.UpdatedBy;
+
+@Entity
+@Table(name = "CODBEX_ADDRESS")
+@Documentation("Address entity mapping")
+public class AddressEntity {
+
+ @Id
+ @GeneratedValue(strategy = GenerationType.IDENTITY)
+ @Column(name = "ADDRESS_ID")
+ @Documentation("Id")
+ public Integer Id;
+
+ @Column(name = "ADDRESS_COUNTRY", nullable = false)
+ @Documentation("Country")
+ public Integer Country;
+
+ @Column(name = "ADDRESS_CITY", nullable = false)
+ @Documentation("City")
+ public Integer City;
+
+ @Column(name = "ADDRESS_ADDRESS", length = 255, nullable = false)
+ @Documentation("Address")
+ public String Address;
+
+ @Column(name = "ADDRESS_POSTALCODE", length = 12, nullable = false)
+ @Documentation("PostalCode")
+ public String PostalCode;
+
+ @Column(name = "ADDRESS_EMPLOYEE", nullable = true)
+ @Documentation("Employee")
+ public Integer Employee;
+
+ @CreatedAt
+ @Column(name = "ADDRESS_CREATEDAT", nullable = true)
+ @Documentation("CreatedAt")
+ public java.time.Instant CreatedAt;
+
+ @CreatedBy
+ @Column(name = "ADDRESS_CREATEDBY", length = 20, nullable = true)
+ @Documentation("CreatedBy")
+ public String CreatedBy;
+
+ @UpdatedAt
+ @Column(name = "ADDRESS_UPDATEDAT", nullable = true)
+ @Documentation("UpdatedAt")
+ public java.time.Instant UpdatedAt;
+
+ @UpdatedBy
+ @Column(name = "ADDRESS_UPDATEDBY", length = 20, nullable = true)
+ @Documentation("UpdatedBy")
+ public String UpdatedBy;
+
+}
diff --git a/codbex-employees/gen/codbex_employees/data/employees/AddressRepository.java b/codbex-employees/gen/codbex_employees/data/employees/AddressRepository.java
new file mode 100644
index 0000000..8cf5d74
--- /dev/null
+++ b/codbex-employees/gen/codbex_employees/data/employees/AddressRepository.java
@@ -0,0 +1,12 @@
+package gen.codbex_employees.data.employees;
+
+import org.eclipse.dirigible.components.data.store.java.repository.JavaRepository;
+import org.eclipse.dirigible.engine.java.annotations.Repository;
+
+@Repository
+public class AddressRepository extends JavaRepository {
+
+ public AddressRepository() {
+ super(AddressEntity.class);
+ }
+}
diff --git a/codbex-employees/gen/codbex-employees/data/Employees/Contact.extensionpoint b/codbex-employees/gen/codbex_employees/data/employees/Contact.extensionpoint
similarity index 98%
rename from codbex-employees/gen/codbex-employees/data/Employees/Contact.extensionpoint
rename to codbex-employees/gen/codbex_employees/data/employees/Contact.extensionpoint
index 3da3b3e..623d440 100644
--- a/codbex-employees/gen/codbex-employees/data/Employees/Contact.extensionpoint
+++ b/codbex-employees/gen/codbex_employees/data/employees/Contact.extensionpoint
@@ -1,4 +1,4 @@
{
"name": "codbex-employees-Employees-Contact",
"description": "Extension Point for the codbex-employees-Employees-Contact entity"
-}
\ No newline at end of file
+}
diff --git a/codbex-employees/gen/codbex_employees/data/employees/ContactEntity.java b/codbex-employees/gen/codbex_employees/data/employees/ContactEntity.java
new file mode 100644
index 0000000..61b4de9
--- /dev/null
+++ b/codbex-employees/gen/codbex_employees/data/employees/ContactEntity.java
@@ -0,0 +1,58 @@
+package gen.codbex_employees.data.employees;
+
+import org.eclipse.dirigible.engine.java.annotations.Column;
+import org.eclipse.dirigible.engine.java.annotations.CreatedAt;
+import org.eclipse.dirigible.engine.java.annotations.CreatedBy;
+import org.eclipse.dirigible.engine.java.annotations.Documentation;
+import org.eclipse.dirigible.engine.java.annotations.Entity;
+import org.eclipse.dirigible.engine.java.annotations.GeneratedValue;
+import org.eclipse.dirigible.engine.java.annotations.GenerationType;
+import org.eclipse.dirigible.engine.java.annotations.Id;
+import org.eclipse.dirigible.engine.java.annotations.Table;
+import org.eclipse.dirigible.engine.java.annotations.UpdatedAt;
+import org.eclipse.dirigible.engine.java.annotations.UpdatedBy;
+
+@Entity
+@Table(name = "CODBEX_CONTACT")
+@Documentation("Contact entity mapping")
+public class ContactEntity {
+
+ @Id
+ @GeneratedValue(strategy = GenerationType.IDENTITY)
+ @Column(name = "CONTACT_ID")
+ @Documentation("Id")
+ public Integer Id;
+
+ @Column(name = "CONTACT_PHONENUMBER", length = 20, nullable = false)
+ @Documentation("PhoneNumber")
+ public String PhoneNumber;
+
+ @Column(name = "CONTACT_EMAIL", length = 255, nullable = false, unique = true)
+ @Documentation("Email")
+ public String Email;
+
+ @Column(name = "CONTACT_EMPLOYEE", nullable = true)
+ @Documentation("Employee")
+ public Integer Employee;
+
+ @CreatedAt
+ @Column(name = "CONTACT_CREATEDAT", nullable = true)
+ @Documentation("CreatedAt")
+ public java.time.Instant CreatedAt;
+
+ @CreatedBy
+ @Column(name = "CONTACT_CREATEDBY", length = 20, nullable = true)
+ @Documentation("CreatedBy")
+ public String CreatedBy;
+
+ @UpdatedAt
+ @Column(name = "CONTACT_UPDATEDAT", nullable = true)
+ @Documentation("UpdatedAt")
+ public java.time.Instant UpdatedAt;
+
+ @UpdatedBy
+ @Column(name = "CONTACT_UPDATEDBY", length = 20, nullable = true)
+ @Documentation("UpdatedBy")
+ public String UpdatedBy;
+
+}
diff --git a/codbex-employees/gen/codbex_employees/data/employees/ContactRepository.java b/codbex-employees/gen/codbex_employees/data/employees/ContactRepository.java
new file mode 100644
index 0000000..b3e4d26
--- /dev/null
+++ b/codbex-employees/gen/codbex_employees/data/employees/ContactRepository.java
@@ -0,0 +1,12 @@
+package gen.codbex_employees.data.employees;
+
+import org.eclipse.dirigible.components.data.store.java.repository.JavaRepository;
+import org.eclipse.dirigible.engine.java.annotations.Repository;
+
+@Repository
+public class ContactRepository extends JavaRepository {
+
+ public ContactRepository() {
+ super(ContactEntity.class);
+ }
+}
diff --git a/codbex-employees/gen/codbex-employees/data/Employees/Employee.extensionpoint b/codbex-employees/gen/codbex_employees/data/employees/Employee.extensionpoint
similarity index 98%
rename from codbex-employees/gen/codbex-employees/data/Employees/Employee.extensionpoint
rename to codbex-employees/gen/codbex_employees/data/employees/Employee.extensionpoint
index 1fd032c..d482f67 100644
--- a/codbex-employees/gen/codbex-employees/data/Employees/Employee.extensionpoint
+++ b/codbex-employees/gen/codbex_employees/data/employees/Employee.extensionpoint
@@ -1,4 +1,4 @@
{
"name": "codbex-employees-Employees-Employee",
"description": "Extension Point for the codbex-employees-Employees-Employee entity"
-}
\ No newline at end of file
+}
diff --git a/codbex-employees/gen/codbex_employees/data/employees/EmployeeEntity.java b/codbex-employees/gen/codbex_employees/data/employees/EmployeeEntity.java
new file mode 100644
index 0000000..a6133da
--- /dev/null
+++ b/codbex-employees/gen/codbex_employees/data/employees/EmployeeEntity.java
@@ -0,0 +1,94 @@
+package gen.codbex_employees.data.employees;
+
+import org.eclipse.dirigible.engine.java.annotations.Column;
+import org.eclipse.dirigible.engine.java.annotations.CreatedAt;
+import org.eclipse.dirigible.engine.java.annotations.CreatedBy;
+import org.eclipse.dirigible.engine.java.annotations.Documentation;
+import org.eclipse.dirigible.engine.java.annotations.Entity;
+import org.eclipse.dirigible.engine.java.annotations.GeneratedValue;
+import org.eclipse.dirigible.engine.java.annotations.GenerationType;
+import org.eclipse.dirigible.engine.java.annotations.Id;
+import org.eclipse.dirigible.engine.java.annotations.Table;
+import org.eclipse.dirigible.engine.java.annotations.UpdatedAt;
+import org.eclipse.dirigible.engine.java.annotations.UpdatedBy;
+
+@Entity
+@Table(name = "CODBEX_EMPLOYEE")
+@Documentation("Employee entity mapping")
+public class EmployeeEntity {
+
+ @Id
+ @GeneratedValue(strategy = GenerationType.IDENTITY)
+ @Column(name = "EMPLOYEE_ID")
+ @Documentation("Id")
+ public Integer Id;
+
+ @Column(name = "EMPLOYEE_FIRSTNAME", length = 50, nullable = false)
+ @Documentation("FirstName")
+ public String FirstName;
+
+ @Column(name = "EMPLOYEE_MIDDLENAME", length = 50, nullable = true)
+ @Documentation("MiddleName")
+ public String MiddleName;
+
+ @Column(name = "EMPLOYEE_LASTNAME", length = 50, nullable = false)
+ @Documentation("LastName")
+ public String LastName;
+
+ @Column(name = "EMPLOYEE_NAME", length = 70, nullable = true)
+ @Documentation("Name")
+ public String Name;
+
+ @Column(name = "EMPLOYEE_EMAIL", length = 40, nullable = false, unique = true)
+ @Documentation("Email")
+ public String Email;
+
+ @Column(name = "EMPLOYEE_PHONENUMBER", length = 20, nullable = false, unique = true)
+ @Documentation("PhoneNumber")
+ public String PhoneNumber;
+
+ @Column(name = "EMPLOYEE_BIRTHDATE", nullable = false)
+ @Documentation("BirthDate")
+ public java.time.LocalDate BirthDate;
+
+ @Column(name = "EMPLOYEE_PERSONALNUMBER", length = 10, nullable = false, unique = true)
+ @Documentation("PersonalNumber")
+ public String PersonalNumber;
+
+ @Column(name = "EMPLOYEE_NATIONALITY", nullable = false)
+ @Documentation("Nationality")
+ public Integer Nationality;
+
+ @Column(name = "EMPLOYEE_GENDER", nullable = false)
+ @Documentation("Gender")
+ public Integer Gender;
+
+ @Column(name = "EMPLOYEE_MARTIALSTATUS", nullable = false)
+ @Documentation("MartialStatus")
+ public Integer MartialStatus;
+
+ @Column(name = "EMPLOYEE_IBAN", length = 34, nullable = false, unique = true)
+ @Documentation("IBAN")
+ public String IBAN;
+
+ @CreatedAt
+ @Column(name = "EMPLOYEE_CREATEDAT", nullable = true)
+ @Documentation("CreatedAt")
+ public java.time.Instant CreatedAt;
+
+ @CreatedBy
+ @Column(name = "EMPLOYEE_CREATEDBY", length = 20, nullable = true)
+ @Documentation("CreatedBy")
+ public String CreatedBy;
+
+ @UpdatedAt
+ @Column(name = "EMPLOYEE_UPDATEDAT", nullable = true)
+ @Documentation("UpdatedAt")
+ public java.time.Instant UpdatedAt;
+
+ @UpdatedBy
+ @Column(name = "EMPLOYEE_UPDATEDBY", length = 20, nullable = true)
+ @Documentation("UpdatedBy")
+ public String UpdatedBy;
+
+}
diff --git a/codbex-employees/gen/codbex_employees/data/employees/EmployeeRepository.java b/codbex-employees/gen/codbex_employees/data/employees/EmployeeRepository.java
new file mode 100644
index 0000000..b3777ce
--- /dev/null
+++ b/codbex-employees/gen/codbex_employees/data/employees/EmployeeRepository.java
@@ -0,0 +1,24 @@
+package gen.codbex_employees.data.employees;
+
+import org.eclipse.dirigible.components.data.store.java.repository.JavaRepository;
+import org.eclipse.dirigible.engine.java.annotations.Repository;
+
+@Repository
+public class EmployeeRepository extends JavaRepository {
+
+ public EmployeeRepository() {
+ super(EmployeeEntity.class);
+ }
+
+ @Override
+ public EmployeeEntity save(EmployeeEntity entity) {
+ entity.Name = entity.FirstName + " " + entity.LastName;
+ return super.save(entity);
+ }
+
+ @Override
+ public EmployeeEntity update(EmployeeEntity entity) {
+ entity.Name = entity.FirstName + " " + entity.LastName;;
+ return super.update(entity);
+ }
+}
diff --git a/codbex-employees/gen/codbex-employees/data/Settings/Gender.extensionpoint b/codbex-employees/gen/codbex_employees/data/settings/Gender.extensionpoint
similarity index 98%
rename from codbex-employees/gen/codbex-employees/data/Settings/Gender.extensionpoint
rename to codbex-employees/gen/codbex_employees/data/settings/Gender.extensionpoint
index 483921e..4855eb0 100644
--- a/codbex-employees/gen/codbex-employees/data/Settings/Gender.extensionpoint
+++ b/codbex-employees/gen/codbex_employees/data/settings/Gender.extensionpoint
@@ -1,4 +1,4 @@
{
"name": "codbex-employees-Settings-Gender",
"description": "Extension Point for the codbex-employees-Settings-Gender entity"
-}
\ No newline at end of file
+}
diff --git a/codbex-employees/gen/codbex_employees/data/settings/GenderEntity.java b/codbex-employees/gen/codbex_employees/data/settings/GenderEntity.java
new file mode 100644
index 0000000..f4b6279
--- /dev/null
+++ b/codbex-employees/gen/codbex_employees/data/settings/GenderEntity.java
@@ -0,0 +1,30 @@
+package gen.codbex_employees.data.settings;
+
+import org.eclipse.dirigible.engine.java.annotations.Column;
+import org.eclipse.dirigible.engine.java.annotations.CreatedAt;
+import org.eclipse.dirigible.engine.java.annotations.CreatedBy;
+import org.eclipse.dirigible.engine.java.annotations.Documentation;
+import org.eclipse.dirigible.engine.java.annotations.Entity;
+import org.eclipse.dirigible.engine.java.annotations.GeneratedValue;
+import org.eclipse.dirigible.engine.java.annotations.GenerationType;
+import org.eclipse.dirigible.engine.java.annotations.Id;
+import org.eclipse.dirigible.engine.java.annotations.Table;
+import org.eclipse.dirigible.engine.java.annotations.UpdatedAt;
+import org.eclipse.dirigible.engine.java.annotations.UpdatedBy;
+
+@Entity
+@Table(name = "CODBEX_GENDER")
+@Documentation("Gender entity mapping")
+public class GenderEntity {
+
+ @Id
+ @GeneratedValue(strategy = GenerationType.IDENTITY)
+ @Column(name = "GENDER_ID")
+ @Documentation("Id")
+ public Integer Id;
+
+ @Column(name = "GENDER_NAME", length = 7, nullable = true)
+ @Documentation("Name")
+ public String Name;
+
+}
diff --git a/codbex-employees/gen/codbex_employees/data/settings/GenderRepository.java b/codbex-employees/gen/codbex_employees/data/settings/GenderRepository.java
new file mode 100644
index 0000000..789189c
--- /dev/null
+++ b/codbex-employees/gen/codbex_employees/data/settings/GenderRepository.java
@@ -0,0 +1,12 @@
+package gen.codbex_employees.data.settings;
+
+import org.eclipse.dirigible.components.data.store.java.repository.JavaRepository;
+import org.eclipse.dirigible.engine.java.annotations.Repository;
+
+@Repository
+public class GenderRepository extends JavaRepository {
+
+ public GenderRepository() {
+ super(GenderEntity.class);
+ }
+}
diff --git a/codbex-employees/gen/codbex-employees/data/Settings/MartialStatus.extensionpoint b/codbex-employees/gen/codbex_employees/data/settings/MartialStatus.extensionpoint
similarity index 98%
rename from codbex-employees/gen/codbex-employees/data/Settings/MartialStatus.extensionpoint
rename to codbex-employees/gen/codbex_employees/data/settings/MartialStatus.extensionpoint
index 104bbf0..475aabd 100644
--- a/codbex-employees/gen/codbex-employees/data/Settings/MartialStatus.extensionpoint
+++ b/codbex-employees/gen/codbex_employees/data/settings/MartialStatus.extensionpoint
@@ -1,4 +1,4 @@
{
"name": "codbex-employees-Settings-MartialStatus",
"description": "Extension Point for the codbex-employees-Settings-MartialStatus entity"
-}
\ No newline at end of file
+}
diff --git a/codbex-employees/gen/codbex_employees/data/settings/MartialStatusEntity.java b/codbex-employees/gen/codbex_employees/data/settings/MartialStatusEntity.java
new file mode 100644
index 0000000..648fe86
--- /dev/null
+++ b/codbex-employees/gen/codbex_employees/data/settings/MartialStatusEntity.java
@@ -0,0 +1,30 @@
+package gen.codbex_employees.data.settings;
+
+import org.eclipse.dirigible.engine.java.annotations.Column;
+import org.eclipse.dirigible.engine.java.annotations.CreatedAt;
+import org.eclipse.dirigible.engine.java.annotations.CreatedBy;
+import org.eclipse.dirigible.engine.java.annotations.Documentation;
+import org.eclipse.dirigible.engine.java.annotations.Entity;
+import org.eclipse.dirigible.engine.java.annotations.GeneratedValue;
+import org.eclipse.dirigible.engine.java.annotations.GenerationType;
+import org.eclipse.dirigible.engine.java.annotations.Id;
+import org.eclipse.dirigible.engine.java.annotations.Table;
+import org.eclipse.dirigible.engine.java.annotations.UpdatedAt;
+import org.eclipse.dirigible.engine.java.annotations.UpdatedBy;
+
+@Entity
+@Table(name = "CODBEX_MARTIALSTATUS")
+@Documentation("MartialStatus entity mapping")
+public class MartialStatusEntity {
+
+ @Id
+ @GeneratedValue(strategy = GenerationType.IDENTITY)
+ @Column(name = "MARTIALSTATUS_ID")
+ @Documentation("Id")
+ public Integer Id;
+
+ @Column(name = "MARTIALSTATUS_NAME", length = 20, nullable = true)
+ @Documentation("Name")
+ public String Name;
+
+}
diff --git a/codbex-employees/gen/codbex_employees/data/settings/MartialStatusRepository.java b/codbex-employees/gen/codbex_employees/data/settings/MartialStatusRepository.java
new file mode 100644
index 0000000..b39bab9
--- /dev/null
+++ b/codbex-employees/gen/codbex_employees/data/settings/MartialStatusRepository.java
@@ -0,0 +1,12 @@
+package gen.codbex_employees.data.settings;
+
+import org.eclipse.dirigible.components.data.store.java.repository.JavaRepository;
+import org.eclipse.dirigible.engine.java.annotations.Repository;
+
+@Repository
+public class MartialStatusRepository extends JavaRepository {
+
+ public MartialStatusRepository() {
+ super(MartialStatusEntity.class);
+ }
+}
diff --git a/codbex-employees/gen/codbex-employees/roles/default-roles.roles b/codbex-employees/gen/codbex_employees/roles/default-roles.roles
similarity index 99%
rename from codbex-employees/gen/codbex-employees/roles/default-roles.roles
rename to codbex-employees/gen/codbex_employees/roles/default-roles.roles
index 10e6f8f..b71abe4 100644
--- a/codbex-employees/gen/codbex-employees/roles/default-roles.roles
+++ b/codbex-employees/gen/codbex_employees/roles/default-roles.roles
@@ -31,4 +31,4 @@
"name": "codbex-employees.Employees.ContactFullAccess",
"description": "A role that grants full access for Contact."
}
-]
\ No newline at end of file
+]
diff --git a/codbex-employees/translations/en-US/codbex-employees.model.json b/codbex-employees/translations/en-US/codbex-employees.model.json
index 6d9a513..3e6e2ad 100644
--- a/codbex-employees/translations/en-US/codbex-employees.model.json
+++ b/codbex-employees/translations/en-US/codbex-employees.model.json
@@ -84,16 +84,6 @@
"EMPLOYEE_CREATEDBY": "CreatedBy",
"EMPLOYEE_UPDATEDAT": "UpdatedAt",
"EMPLOYEE_UPDATEDBY": "UpdatedBy",
- "COUNTRY": "Country",
- "COUNTRY_ID": "Id",
- "COUNTRY_NAME": "Name",
- "COUNTRY_CODE2": "Code2",
- "COUNTRY_CODE3": "Code3",
- "COUNTRY_NUMERIC": "Numeric",
- "CITY": "City",
- "CITY_ID": "Id",
- "CITY_NAME": "Name",
- "CITY_COUNTRY": "Country",
"GENDER": "Gender",
"GENDER_ID": "Id",
"GENDER_NAME": "Name",
@@ -120,6 +110,16 @@
"ADDRESS_CREATEDBY": "CreatedBy",
"ADDRESS_UPDATEDAT": "UpdatedAt",
"ADDRESS_UPDATEDBY": "UpdatedBy",
+ "COUNTRY": "Country",
+ "COUNTRY_ID": "Id",
+ "COUNTRY_NAME": "Name",
+ "COUNTRY_CODE2": "Code2",
+ "COUNTRY_CODE3": "Code3",
+ "COUNTRY_NUMERIC": "Numeric",
+ "CITY": "City",
+ "CITY_ID": "Id",
+ "CITY_NAME": "Name",
+ "CITY_COUNTRY": "Country",
"JobAssignment": "JobAssignment",
"Teams": "Teams",
"Employees": "Employees"