📄 tableinfo.java
字号:
/*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
/**
* Title: XELOPES Data Mining Library
* Description: The XELOPES library is an open platform-independent and data-source-independent library for Embedded Data Mining.
* Copyright: Copyright (c) 2002 Prudential Systems Software GmbH
* Company: ZSoft (www.zsoft.ru), Prudsys (www.prudsys.com)
* @author Valentine Stepanenko (valentine.stepanenko@zsoft.ru)
* @version 1.0
*/
package com.prudsys.pdm.Input.Relational;
/**
* Description of a table.
*/
public class TableInfo
{
public final static int UNKNOWN = 0;
public final static int TABLE = 1;
public final static int VIEW = 2;
public final static int SYSTEM_TABLE = 3;
private String catalog;
private String schema;
private String name;
private int type;
private String remarks;
private ColumnInfo[] columns;
/**
* Constructs table info from all of its variables.
*
* @param catalog table catalog
* @param schema table schema
* @param name table name
* @param type table type (table, view, system table, ...)
* @param remarks table remarks
* @param columns description of table columns
*/
TableInfo(String catalog, String schema, String name, int type, String remarks, ColumnInfo[] columns)
{
this.catalog = catalog;
this.schema = schema;
this.name = name;
this.type = type;
this.remarks = remarks;
this.columns = columns;
}
/**
* Returns catalog name of table.
*
* @return catalog name
*/
public String getCatalog() {
return catalog;
}
/**
* Returns schema name of table.
*
* @return schema name
*/
public String getSchema() {
return schema;
}
/**
* Returns table name.
*
* @return table name
*/
public String getName() {
return name;
}
/**
* Returns type of table.
*
* @return table type
*/
public int getType() {
return type;
}
/**
* Returns remarks on table.
*
* @return table remarks
*/
public String getRemarks() {
return remarks;
}
/**
* Returns column descriptions.
*
* @return column descriptions
*/
public ColumnInfo[] getColumns() {
return columns;
}
/**
* Returns number of columns.
*
* @return number of columns
*/
public int getColumnsNumber() {
return columns.length;
}
/**
* Returns column at given index.
*
* @param index index of column
* @return value at given column
*/
public ColumnInfo getColumn(int index) {
return columns[index];
}
/**
* Returns string representation of table (just the name).
*
* @return string representation of table
*/
public String toString() {
return name;
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -