Skip to content

Commit

Permalink
Merge pull request #893 from antoanetamh/fix-889
Browse files Browse the repository at this point in the history
add annotation support
  • Loading branch information
ThuF authored Jun 10, 2021
2 parents 4037969 + 4f93b66 commit 5a682ea
Show file tree
Hide file tree
Showing 16 changed files with 727 additions and 575 deletions.
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
/*
* Copyright (c) 2010-2020 SAP SE or an SAP affiliate company and Eclipse Dirigible contributors
* Copyright (c) 2010-2021 SAP SE or an SAP affiliate company and Eclipse Dirigible contributors
*
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v2.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v20.html
*
* SPDX-FileCopyrightText: 2010-2020 SAP SE or an SAP affiliate company and Eclipse Dirigible contributors
* SPDX-FileCopyrightText: 2010-2021 SAP SE or an SAP affiliate company and Eclipse Dirigible contributors
* SPDX-License-Identifier: EPL-2.0
*/
package org.eclipse.dirigible.database.persistence.model;
Expand All @@ -20,132 +20,137 @@
*/
public class PersistenceTableModel {

private String className;

private String tableName;

private String schemaName;

private List<PersistenceTableColumnModel> columns = new ArrayList<>();

private List<PersistenceTableRelationModel> relations = new ArrayList<>();

public PersistenceTableModel(String tableName, List<PersistenceTableColumnModel> columns, List<PersistenceTableRelationModel> relations) {
this.tableName = tableName;
this.columns = columns;
this.relations = relations;
}

public PersistenceTableModel() {
}

/**
* Gets the class name.
*
* @return the class name
*/
public String getClassName() {
return className;
}

/**
* Sets the class name.
*
* @param className
* the new class name
*/
public void setClassName(String className) {
this.className = className;
}

/**
* Gets the table name.
*
* @return the table name
*/
public String getTableName() {
return tableName;
}

/**
* Sets the table name.
*
* @param tableName
* the new table name
*/
public void setTableName(String tableName) {
this.tableName = tableName;
}

/**
* Gets the schema name.
*
* @return the schema name
*/
public String getSchemaName() {
return schemaName;
}

/**
* Sets the schema name.
*
* @param schemaName
* the new schema name
*/
public void setSchemaName(String schemaName) {
this.schemaName = schemaName;
}

/**
* Gets the columns.
*
* @return the columns
*/
public List<PersistenceTableColumnModel> getColumns() {
return columns;
}

/**
* Sets the columns.
*
* @param columns
* the new columns
*/
public void setColumns(List<PersistenceTableColumnModel> columns) {
this.columns = columns;
}

/**
* gets the relations.
*
* the new columns
*/
public List<PersistenceTableRelationModel> getRelations() {
return relations;
}

/**
* Sets the relations.
*
* @param relations
* the new columns
*/
public void setRelations(List<PersistenceTableRelationModel> relations) {
this.relations = relations;
}

@Override
public boolean equals(Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
PersistenceTableModel that = (PersistenceTableModel) o;
return Objects.equals(className, that.className) &&
tableName.equals(that.tableName) &&
Objects.equals(schemaName, that.schemaName);
}

@Override
public int hashCode() {
return Objects.hash(className, tableName, schemaName);
}
private String className;

private String tableName;

private String schemaName;

private String tableType;

private List<PersistenceTableColumnModel> columns = new ArrayList<>();

private List<PersistenceTableRelationModel> relations = new ArrayList<>();

public PersistenceTableModel(String tableName, List<PersistenceTableColumnModel> columns, List<PersistenceTableRelationModel> relations) {
this.tableName = tableName;
this.columns = columns;
this.relations = relations;
}

public PersistenceTableModel() {
}

public String getTableType() {
return tableType;
}

public void setTableType(String tableType) {
this.tableType = tableType;
}

/**
* Gets the class name.
*
* @return the class name
*/
public String getClassName() {
return className;
}

/**
* Sets the class name.
*
* @param className the new class name
*/
public void setClassName(String className) {
this.className = className;
}

/**
* Gets the table name.
*
* @return the table name
*/
public String getTableName() {
return tableName;
}

/**
* Sets the table name.
*
* @param tableName the new table name
*/
public void setTableName(String tableName) {
this.tableName = tableName;
}

/**
* Gets the schema name.
*
* @return the schema name
*/
public String getSchemaName() {
return schemaName;
}

/**
* Sets the schema name.
*
* @param schemaName the new schema name
*/
public void setSchemaName(String schemaName) {
this.schemaName = schemaName;
}

/**
* Gets the columns.
*
* @return the columns
*/
public List<PersistenceTableColumnModel> getColumns() {
return columns;
}

/**
* Sets the columns.
*
* @param columns the new columns
*/
public void setColumns(List<PersistenceTableColumnModel> columns) {
this.columns = columns;
}

/**
* gets the relations.
* <p>
* the new columns
*/
public List<PersistenceTableRelationModel> getRelations() {
return relations;
}

/**
* Sets the relations.
*
* @param relations the new columns
*/
public void setRelations(List<PersistenceTableRelationModel> relations) {
this.relations = relations;
}

@Override
public boolean equals(Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
PersistenceTableModel that = (PersistenceTableModel) o;
return Objects.equals(className, that.className) &&
tableName.equals(that.tableName) &&
Objects.equals(schemaName, that.schemaName);
}

@Override
public int hashCode() {
return Objects.hash(className, tableName, schemaName);
}
}
Loading

0 comments on commit 5a682ea

Please sign in to comment.