mil.nga.geopackage.attributes.AttributesColumn Maven / Gradle / Ivy
package mil.nga.geopackage.attributes;
import mil.nga.geopackage.db.GeoPackageDataType;
import mil.nga.geopackage.user.UserColumn;
/**
* Attributes column
*
* @author osbornb
* @since 1.2.1
*/
public class AttributesColumn extends UserColumn {
/**
* Create a new primary key column
*
* @param index
* index
* @param name
* name
* @return attributes column
*/
public static AttributesColumn createPrimaryKeyColumn(int index, String name) {
return new AttributesColumn(index, name, GeoPackageDataType.INTEGER,
null, true, null, true);
}
/**
* Create a new column
*
* @param index
* index
* @param name
* name
* @param type
* data type
* @param notNull
* not null flag
* @param defaultValue
* default value
* @return attributes column
*/
public static AttributesColumn createColumn(int index, String name,
GeoPackageDataType type, boolean notNull, Object defaultValue) {
return createColumn(index, name, type, null, notNull, defaultValue);
}
/**
* Create a new column
*
* @param index
* index
* @param name
* name
* @param type
* data type
* @param max
* max value
* @param notNull
* not null flag
* @param defaultValue
* default value
* @return attributes column
*/
public static AttributesColumn createColumn(int index, String name,
GeoPackageDataType type, Long max, boolean notNull,
Object defaultValue) {
return new AttributesColumn(index, name, type, max, notNull,
defaultValue, false);
}
/**
* Constructor
*
* @param index
* index
* @param name
* name
* @param dataType
* data type
* @param max
* max value
* @param notNull
* not null flag
* @param defaultValue
* default value
* @param primaryKey
* primary key flag
*/
AttributesColumn(int index, String name, GeoPackageDataType dataType,
Long max, boolean notNull, Object defaultValue, boolean primaryKey) {
super(index, name, dataType, max, notNull, defaultValue, primaryKey);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy