Revision 28967

View differences:

branches/v2_0_0_prep/libraries/libFMap_daldb/src/org/gvsig/fmap/dal/store/jdbc/JDBCHelper.java
95 95
	protected FromWKBGeometryOperationContext fromWKBContext = null;
96 96
	protected ToWKBOperationContext toWKBContext = new ToWKBOperationContext();
97 97

  
98
	private Boolean allowAutomaticValues;
98
	private Boolean allowAutomaticValues = null;
99
	private Boolean supportsUnions = null;
99 100

  
100 101
	protected JDBCHelper(JDBCHelperUser consumer,
101 102
			JDBCConnectionParameters params) throws InitializeException {
......
1004 1005
		}
1005 1006
		return allowAutomaticValues.booleanValue();
1006 1007
	}
1008

  
1009
	public boolean supportsUnion() {
1010
		if (supportsUnions == null) {
1011
			ConnectionAction action = new ConnectionAction() {
1012

  
1013
				public Object action(Connection conn) throws DataException {
1014

  
1015
					try {
1016
						DatabaseMetaData meta = conn.getMetaData();
1017
						return new Boolean(meta.supportsUnion());
1018
					} catch (SQLException e) {
1019
						throw new JDBCSQLException(e);
1020
					}
1021
				}
1022

  
1023
			};
1024

  
1025
			try {
1026
				supportsUnions = (Boolean) doConnectionAction(action);
1027
			} catch (Exception e) {
1028
				logger.error("Exception checking for unions support", e);
1029
				supportsUnions = Boolean.FALSE;
1030
			}
1031
		}
1032
		return supportsUnions.booleanValue();
1033
	}
1007 1034
}
branches/v2_0_0_prep/libraries/libFMap_daldb/src/org/gvsig/fmap/dal/store/postgresql/PostgreSQLHelper.java
796 796
		return Boolean.TRUE;
797 797
	}
798 798

  
799
	public boolean supportOffset() {
800
		return true;
801
	}
802

  
803
	public boolean supportsUnion() {
804
		return true;
805
	}
806

  
799 807
}
branches/v2_0_0_prep/libraries/libFMap_daldb/src/org/gvsig/fmap/dal/store/mysql/MySQLHelper.java
415 415
		return strb.toString();
416 416
	}
417 417

  
418
	public boolean supportOffset() {
419
		return true;
420
	}
418 421

  
422
	public boolean supportsUnion() {
423
		return true;
424
	}
425

  
426

  
419 427
}

Also available in: Unified diff