Skip to content

Commit

Permalink
Sonar fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
hzosym committed Aug 12, 2024
1 parent 7cc02f1 commit 736fa5f
Show file tree
Hide file tree
Showing 8 changed files with 1,038 additions and 593 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,29 +4,31 @@
*/
package com.tibco.ebx.cs.commons.beans.generator.generated.bean;

import com.tibco.ebx.cs.commons.beans.generator.template.TableBean;
import com.tibco.ebx.cs.commons.beans.generator.generated.dao.RestServiceDAO;
import com.tibco.ebx.cs.commons.beans.generator.generated.dao.ModelTableDAO;
import com.tibco.ebx.cs.commons.beans.generator.generated.dao.FieldDAO;
import com.tibco.ebx.cs.commons.beans.generator.generated.dao.DataAccessObjectDAO;
import java.util.Objects;
import com.tibco.ebx.cs.commons.lib.exception.EBXCommonsException;
import java.util.List;
import com.tibco.ebx.cs.commons.beans.generator.generated.dao.DataModelDAO;
import java.util.Objects;
import java.util.Optional;

import com.tibco.ebx.cs.commons.beans.generator.generated.dao.DataAccessObjectDAO;
import com.tibco.ebx.cs.commons.beans.generator.generated.dao.DataModelDAO;
import com.tibco.ebx.cs.commons.beans.generator.generated.dao.FieldDAO;
import com.tibco.ebx.cs.commons.beans.generator.generated.dao.ModelTableDAO;
import com.tibco.ebx.cs.commons.beans.generator.generated.dao.RestServiceDAO;
import com.tibco.ebx.cs.commons.beans.generator.template.TableBean;
import com.tibco.ebx.cs.commons.lib.exception.EBXCommonsException;

/**
* Java Bean of type TableBean automatically generated by service 'Generate Java Accessers' of EBX Commons
* It represents node at path /root/DataModel in data model urn:ebx:module:ebx-cs-commons:/WEB-INF/ebx/schemas/DataModels.xsd.
*
* @author EBX Commons
*/
* Java Bean of type TableBean automatically generated by service 'Generate Java
* Accessers' of EBX Commons It represents node at path /root/DataModel in data
* model urn:ebx:module:ebx-cs-commons:/WEB-INF/ebx/schemas/DataModels.xsd.
*
* @author EBX Commons
*/
public class DataModel extends TableBean {

private Integer identifier;
private String moduleName;
private String schemaLocation;
private DataAccessObject dao;
private DataAccessObject daobject;
private String beansSourceFolder;
private String daoSourceFolder;
private String dtoSourceFolder;
Expand All @@ -41,164 +43,165 @@ public class DataModel extends TableBean {
private String rsPackage;

/**
* Default constructor
*/
public DataModel(){
* Default constructor
*/
public DataModel() {
}

public Integer getIdentifier(){
public Integer getIdentifier() {
return this.identifier;
}

public void setIdentifier(final Integer identifier){
public void setIdentifier(final Integer identifier) {
this.identifier = identifier;
}

public String getModuleName(){
public String getModuleName() {
return this.moduleName;
}

public void setModuleName(final String moduleName){
public void setModuleName(final String moduleName) {
this.moduleName = moduleName;
}

public String getSchemaLocation(){
public String getSchemaLocation() {
return this.schemaLocation;
}

public void setSchemaLocation(final String schemaLocation){
public void setSchemaLocation(final String schemaLocation) {
this.schemaLocation = schemaLocation;
}

public DataAccessObject getDao() throws EBXCommonsException {
if(this.dao == null && isBoundToEBX()){
this.dao = DataAccessObjectDAO.getInstance().read(this, DataModelDAO.path_to_field_dao).orElse(null);
public DataAccessObject getDaobject() throws EBXCommonsException {
if (this.daobject == null && isBoundToEBX()) {
this.daobject = DataAccessObjectDAO.getInstance().read(this, DataModelDAO.path_to_field_dao).orElse(null);
}
return this.dao;
return this.daobject;
}

public void setDao(final DataAccessObject dao){
this.dao = dao;
public void setDaobject(final DataAccessObject dao) {
this.daobject = dao;
}

public String getBeansSourceFolder(){
public String getBeansSourceFolder() {
return this.beansSourceFolder;
}

public void setBeansSourceFolder(final String beansSourceFolder){
public void setBeansSourceFolder(final String beansSourceFolder) {
this.beansSourceFolder = beansSourceFolder;
}

public String getDaoSourceFolder(){
public String getDaoSourceFolder() {
return this.daoSourceFolder;
}

public void setDaoSourceFolder(final String daoSourceFolder){
public void setDaoSourceFolder(final String daoSourceFolder) {
this.daoSourceFolder = daoSourceFolder;
}

public String getDtoSourceFolder(){
public String getDtoSourceFolder() {
return this.dtoSourceFolder;
}

public void setDtoSourceFolder(final String dtoSourceFolder){
public void setDtoSourceFolder(final String dtoSourceFolder) {
this.dtoSourceFolder = dtoSourceFolder;
}

public String getMappersSourceFolder(){
public String getMappersSourceFolder() {
return this.mappersSourceFolder;
}

public void setMappersSourceFolder(final String mappersSourceFolder){
public void setMappersSourceFolder(final String mappersSourceFolder) {
this.mappersSourceFolder = mappersSourceFolder;
}

public String getServicesSourceFolder(){
public String getServicesSourceFolder() {
return this.servicesSourceFolder;
}

public void setServicesSourceFolder(final String servicesSourceFolder){
public void setServicesSourceFolder(final String servicesSourceFolder) {
this.servicesSourceFolder = servicesSourceFolder;
}

public String getRsSourceFolder(){
public String getRsSourceFolder() {
return this.rsSourceFolder;
}

public void setRsSourceFolder(final String rsSourceFolder){
public void setRsSourceFolder(final String rsSourceFolder) {
this.rsSourceFolder = rsSourceFolder;
}

public String getBeansPackage(){
public String getBeansPackage() {
return this.beansPackage;
}

public void setBeansPackage(final String beansPackage){
public void setBeansPackage(final String beansPackage) {
this.beansPackage = beansPackage;
}

public String getDaoPackage(){
public String getDaoPackage() {
return this.daoPackage;
}

public void setDaoPackage(final String daoPackage){
public void setDaoPackage(final String daoPackage) {
this.daoPackage = daoPackage;
}

public String getDtoPackage(){
public String getDtoPackage() {
return this.dtoPackage;
}

public void setDtoPackage(final String dtoPackage){
public void setDtoPackage(final String dtoPackage) {
this.dtoPackage = dtoPackage;
}

public String getMappersPackage(){
public String getMappersPackage() {
return this.mappersPackage;
}

public void setMappersPackage(final String mappersPackage){
public void setMappersPackage(final String mappersPackage) {
this.mappersPackage = mappersPackage;
}

public String getServicesPackage(){
public String getServicesPackage() {
return this.servicesPackage;
}

public void setServicesPackage(final String servicesPackage){
public void setServicesPackage(final String servicesPackage) {
this.servicesPackage = servicesPackage;
}

public String getRsPackage(){
public String getRsPackage() {
return this.rsPackage;
}

public void setRsPackage(final String rsPackage){
public void setRsPackage(final String rsPackage) {
this.rsPackage = rsPackage;
}

public List<Table> getTables(){
public List<Table> getTables() {
return ModelTableDAO.getInstance().readAll(this, DataModelDAO.path_to_field_tables);
}

public List<Table> getTables(final String predicate) {
return ModelTableDAO.getInstance().readAll(this, DataModelDAO.path_to_field_tables, Optional.of(predicate));
}

public List<Field> getFields(){
public List<Field> getFields() {
return FieldDAO.getInstance().readAll(this, DataModelDAO.path_to_field_fields);
}

public List<Field> getFields(final String predicate) {
return FieldDAO.getInstance().readAll(this, DataModelDAO.path_to_field_fields, Optional.of(predicate));
}

public List<RestService> getRsServices(){
public List<RestService> getRsServices() {
return RestServiceDAO.getInstance().readAll(this, DataModelDAO.path_to_field_rsServices);
}

public List<RestService> getRsServices(final String predicate) {
return RestServiceDAO.getInstance().readAll(this, DataModelDAO.path_to_field_rsServices, Optional.of(predicate));
return RestServiceDAO.getInstance().readAll(this, DataModelDAO.path_to_field_rsServices,
Optional.of(predicate));
}

@Override
Expand All @@ -208,7 +211,9 @@ protected DataModelDAO getDAO() {

@Override
public int hashCode() {
return Objects.hash(identifier,moduleName,schemaLocation,dao,beansSourceFolder,daoSourceFolder,dtoSourceFolder,mappersSourceFolder,servicesSourceFolder,rsSourceFolder,beansPackage,daoPackage,dtoPackage,mappersPackage,servicesPackage,rsPackage);
return Objects.hash(identifier, moduleName, schemaLocation, daobject, beansSourceFolder, daoSourceFolder,
dtoSourceFolder, mappersSourceFolder, servicesSourceFolder, rsSourceFolder, beansPackage, daoPackage,
dtoPackage, mappersPackage, servicesPackage, rsPackage);
}

@Override
Expand All @@ -222,22 +227,17 @@ public boolean equals(final Object obj) {
if (!(obj instanceof DataModel)) {
return false;
}
DataModel other = ( DataModel) obj;
return Objects.equals(identifier, other.identifier)
&& Objects.equals(moduleName, other.moduleName)
&& Objects.equals(schemaLocation, other.schemaLocation)
&& Objects.equals(dao, other.dao)
&& Objects.equals(beansSourceFolder, other.beansSourceFolder)
&& Objects.equals(daoSourceFolder, other.daoSourceFolder)
&& Objects.equals(dtoSourceFolder, other.dtoSourceFolder)
&& Objects.equals(mappersSourceFolder, other.mappersSourceFolder)
&& Objects.equals(servicesSourceFolder, other.servicesSourceFolder)
&& Objects.equals(rsSourceFolder, other.rsSourceFolder)
&& Objects.equals(beansPackage, other.beansPackage)
&& Objects.equals(daoPackage, other.daoPackage)
&& Objects.equals(dtoPackage, other.dtoPackage)
&& Objects.equals(mappersPackage, other.mappersPackage)
&& Objects.equals(servicesPackage, other.servicesPackage)
&& Objects.equals(rsPackage, other.rsPackage);
DataModel other = (DataModel) obj;
return Objects.equals(identifier, other.identifier) && Objects.equals(moduleName, other.moduleName)
&& Objects.equals(schemaLocation, other.schemaLocation) && Objects.equals(daobject, other.daobject)
&& Objects.equals(beansSourceFolder, other.beansSourceFolder)
&& Objects.equals(daoSourceFolder, other.daoSourceFolder)
&& Objects.equals(dtoSourceFolder, other.dtoSourceFolder)
&& Objects.equals(mappersSourceFolder, other.mappersSourceFolder)
&& Objects.equals(servicesSourceFolder, other.servicesSourceFolder)
&& Objects.equals(rsSourceFolder, other.rsSourceFolder)
&& Objects.equals(beansPackage, other.beansPackage) && Objects.equals(daoPackage, other.daoPackage)
&& Objects.equals(dtoPackage, other.dtoPackage) && Objects.equals(mappersPackage, other.mappersPackage)
&& Objects.equals(servicesPackage, other.servicesPackage) && Objects.equals(rsPackage, other.rsPackage);
}
}
Loading

0 comments on commit 736fa5f

Please sign in to comment.