Java Code Examples for mil.nga.geopackage.schema.TableColumnKey#getColumnName()

The following examples show how to use mil.nga.geopackage.schema.TableColumnKey#getColumnName() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: GeometryColumnsDao.java    From geopackage-core-java with MIT License 6 votes vote down vote up
/**
 * {@inheritDoc}
 */
@Override
public GeometryColumns queryForId(TableColumnKey key) throws SQLException {
	GeometryColumns geometryColumns = null;
	if (key != null) {
		Map<String, Object> fieldValues = new HashMap<String, Object>();
		fieldValues.put(GeometryColumns.COLUMN_TABLE_NAME,
				key.getTableName());
		fieldValues.put(GeometryColumns.COLUMN_COLUMN_NAME,
				key.getColumnName());
		List<GeometryColumns> results = queryForFieldValues(fieldValues);
		if (!results.isEmpty()) {
			if (results.size() > 1) {
				throw new SQLException("More than one "
						+ GeometryColumns.class.getSimpleName()
						+ " returned for key. Table Name: "
						+ key.getTableName() + ", Column Name: "
						+ key.getColumnName());
			}
			geometryColumns = results.get(0);
		}
	}
	return geometryColumns;
}
 
Example 2
Source File: GeometryColumnsSfSqlDao.java    From geopackage-core-java with MIT License 6 votes vote down vote up
/**
 * {@inheritDoc}
 */
@Override
public GeometryColumnsSfSql queryForId(TableColumnKey key)
		throws SQLException {
	GeometryColumnsSfSql geometryColumns = null;
	if (key != null) {
		Map<String, Object> fieldValues = new HashMap<String, Object>();
		fieldValues.put(GeometryColumnsSfSql.COLUMN_F_TABLE_NAME,
				key.getTableName());
		fieldValues.put(GeometryColumnsSfSql.COLUMN_F_GEOMETRY_COLUMN,
				key.getColumnName());
		List<GeometryColumnsSfSql> results = queryForFieldValues(fieldValues);
		if (!results.isEmpty()) {
			if (results.size() > 1) {
				throw new SQLException("More than one "
						+ GeometryColumnsSfSql.class.getSimpleName()
						+ " returned for key. Table Name: "
						+ key.getTableName() + ", Column Name: "
						+ key.getColumnName());
			}
			geometryColumns = results.get(0);
		}
	}
	return geometryColumns;
}
 
Example 3
Source File: GeometryColumnsSqlMmDao.java    From geopackage-core-java with MIT License 6 votes vote down vote up
/**
 * {@inheritDoc}
 */
@Override
public GeometryColumnsSqlMm queryForId(TableColumnKey key)
		throws SQLException {
	GeometryColumnsSqlMm geometryColumns = null;
	if (key != null) {
		Map<String, Object> fieldValues = new HashMap<String, Object>();
		fieldValues.put(GeometryColumnsSqlMm.COLUMN_TABLE_NAME,
				key.getTableName());
		fieldValues.put(GeometryColumnsSqlMm.COLUMN_COLUMN_NAME,
				key.getColumnName());
		List<GeometryColumnsSqlMm> results = queryForFieldValues(fieldValues);
		if (!results.isEmpty()) {
			if (results.size() > 1) {
				throw new SQLException("More than one "
						+ GeometryColumnsSqlMm.class.getSimpleName()
						+ " returned for key. Table Name: "
						+ key.getTableName() + ", Column Name: "
						+ key.getColumnName());
			}
			geometryColumns = results.get(0);
		}
	}
	return geometryColumns;
}
 
Example 4
Source File: DataColumnsDao.java    From geopackage-core-java with MIT License 6 votes vote down vote up
/**
 * {@inheritDoc}
 */
@Override
public DataColumns queryForId(TableColumnKey key) throws SQLException {
	DataColumns dataColumns = null;
	if (key != null) {
		Map<String, Object> fieldValues = new HashMap<String, Object>();
		fieldValues.put(DataColumns.COLUMN_TABLE_NAME, key.getTableName());
		fieldValues.put(DataColumns.COLUMN_COLUMN_NAME,
				key.getColumnName());
		List<DataColumns> results = queryForFieldValues(fieldValues);
		if (!results.isEmpty()) {
			if (results.size() > 1) {
				throw new SQLException(
						"More than one " + DataColumns.class.getSimpleName()
								+ " returned for key. Table Name: "
								+ key.getTableName() + ", Column Name: "
								+ key.getColumnName());
			}
			dataColumns = results.get(0);
		}
	}
	return dataColumns;
}
 
Example 5
Source File: GeometryColumns.java    From geopackage-core-java with MIT License 2 votes vote down vote up
/**
 * Set the id
 * 
 * @param id
 *            id
 */
public void setId(TableColumnKey id) {
	tableName = id.getTableName();
	columnName = id.getColumnName();
}
 
Example 6
Source File: GeometryColumnsSqlMm.java    From geopackage-core-java with MIT License 2 votes vote down vote up
/**
 * Set the id
 * 
 * @param id
 *            id
 */
public void setId(TableColumnKey id) {
	tableName = id.getTableName();
	columnName = id.getColumnName();
}
 
Example 7
Source File: GeometryColumnsSfSql.java    From geopackage-core-java with MIT License 2 votes vote down vote up
/**
 * Set the id
 * 
 * @param id
 *            id
 */
public void setId(TableColumnKey id) {
	fTableName = id.getTableName();
	fGeometryColumn = id.getColumnName();
}
 
Example 8
Source File: DataColumns.java    From geopackage-core-java with MIT License 2 votes vote down vote up
/**
 * Set the id
 * 
 * @param id
 *            id
 */
public void setId(TableColumnKey id) {
	tableName = id.getTableName();
	columnName = id.getColumnName();
}