Revision 20058 trunk/libraries/libDataSourceDBBaseDrivers/src/org/gvsig/data/datastores/vectorial/db/jdbc/JDBCFeature.java

View differences:

JDBCFeature.java
34 34
		return null;
35 35
	}
36 36

  
37
	public String getFilterForID() {
38
		return this.store.getFilterForID((DBFeatureType)this.featureType,this.featureKey);
39
	}
40

  
41
	protected String objectToSqlString(Object obj) {
42
		if (obj instanceof String){
43
			return "'"+ scapeString((String)obj) +"'";
44
		} else if (obj == null){
45
			return "null";
46
		}else{
47
			// OJO con otros tipos!!
48
			return obj.toString();
49
		}
50

  
51
	}
52

  
53
	protected String scapeString(String str) {
54
		return str.replace("'", "''");
55
	}
56

  
37 57
}

Also available in: Unified diff