package org.seamframework.sql;

public class Table<X> {
	
	private final String schema;
	private final String name;
	
	public Table(String name) {
		this(null, name);
	}
	
	public Table(String schema, String name) {
		this.schema = schema;
		this.name = name;
	}

	@Override
	public String toString() {
		return "Table [" + getQualifiedName() + "]";
	}

	public String getSchema() {
		return schema;
	}

	public String getName() {
		return name;
	}
	
	public String getQualifiedName() {
		return schema==null ? name : schema + '.' + name;
	}
	
}
