Revision 11867 branches/v10/libraries/libFMap/src/com/iver/cit/gvsig/fmap/drivers/DBLayerDefinition.java

View differences:

DBLayerDefinition.java
45 45

  
46 46
import java.awt.geom.Rectangle2D;
47 47
import java.sql.Connection;
48
import java.sql.Types;
49 48

  
50
import com.hardcode.gdbms.engine.instruction.Field;
51

  
52 49
public class DBLayerDefinition extends LayerDefinition {
53 50
	private Connection conn;
54 51
    private String catalogName;
52
    private String schema;
55 53
    private String tableName;
56 54
    // private String[] fieldNames; // GeometryField not included
57 55
    private String fieldID; // Estos 2 campos en PostGIS los sabremos 
......
130 128
        	fieldsDesc[i].setFieldName(fieldNames[i]);
131 129
        }
132 130
    }
131
    /**
132
     * @deprecated Better use getCompoundTableName to deal with schemas.
133
     * This method should be used only by drivers when it is necessary to distinguish between table and schema.
134
     * @return
135
     */
133 136
    public String getTableName() {
134
        return tableName;
137
   		return tableName;
135 138
    }
136 139
    public void setTableName(String tableName) {
137 140
        this.tableName = tableName;
......
232 235
	public void setDimension(int dim) {
233 236
		dimension = dim;
234 237
	}
238
	public void setSchema(String schema) {
239
		this.schema = schema; 	
240
	}
241
	public String getSchema() {
242
		return schema;
243
	}
244
	/**
245
	 * @return schema.tableName or only tableName if schema is not defined
246
	 */
247
	public String getComposedTableName() {
248
		String compoundTable = getSchema()!=null?(getSchema() + "." + getTableName()):getTableName();
249
		return compoundTable;
250
	}
235 251
	
236 252
}

Also available in: Unified diff