package tableDefinition;

public class TableElement 
{
	private String databaseName;
	private String databaseEncoding;
	private String schemaName;
	private String tableName;
	private String tableType;		// This is a rubbish name.  What does it mean? I use it because it is in the DatabaseMetadata class (as TABLE_TYPE)
    private String remarks;			// This is a rubbish name.  What does it mean? I use it because it is in the DatabaseMetadata class (as REMARKS)
    private long rowCount;
    
    public TableElement(String databaseName, String databaseEncoding, String schemaName, String tableName, String tableType, String remarks)
    {
    	if (databaseName == null)
    		this.databaseName = new String("");
    	else
    		this.databaseName = new String(databaseName);
    	this.databaseEncoding = new String(databaseEncoding);
    	if (schemaName == null)
    		this.schemaName = new String("");
    	else
    		this.schemaName = new String(schemaName);
    	if (tableName == null)
    		this.tableName = new String("");
    	else
    		this.tableName = new String(tableName);
    	if (tableType == null)
    		this.tableType = new String("");
    	else
    		this.tableType = new String(tableType);
    	if (remarks == null)
    		this.remarks = new String("");
    	else
    		this.remarks = new String(remarks);
    	rowCount = 0;
    }
    
    public TableElement()
    {
    	databaseName = "";
    	schemaName = "";
    	tableName = "";
    	tableType = "";
    	remarks = "";
    	rowCount = 0;
    }

	public String getDatabaseName() 
	{
		return databaseName;
	}

	public void setDatabaseName(String databaseName) 
	{
		this.databaseName = databaseName;
	}

	public String getDatabaseEncoding() 
	{
		return databaseEncoding;
	}

	public void setDatabaseEncoding(String databaseEncoding) 
	{
		this.databaseEncoding = databaseEncoding;
	}

	public String getSchemaName() 
	{
		return schemaName;
	}

	public void setSchemaName(String schemaName) 
	{
		this.schemaName = schemaName;
	}

	public String getTableName() 
	{
		return tableName;
	}

	public void setTableName(String tableName) 
	{
		this.tableName = tableName;
	}

	public String getTableType() 
	{
		return tableType;
	}

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

	public String getRemarks() 
	{
		return remarks;
	}

	public void setRemarks(String remarks) 
	{
		this.remarks = remarks;
	}

	public long getRowCount() 
	{
		return rowCount;
	}

	public void setRowCount(long rowCount) 
	{
		this.rowCount = rowCount;
	}
}
