Class RDBMSColumnInfo
java.lang.Object
org.datanucleus.store.rdbms.schema.RDBMSColumnInfo
- All Implemented Interfaces:
org.datanucleus.store.schema.ListStoreSchemaData, org.datanucleus.store.schema.StoreSchemaData
public class RDBMSColumnInfo
extends Object
implements org.datanucleus.store.schema.ListStoreSchemaData
Representation of column schema information in the datastore.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected intIndicates the maximum number of bytes in the column (for char types only).protected StringThe default value for the column; may be null.protected StringThe column name.protected intThe column size.protected shortIndicates the JDBC (SQL) data type fromTypes.protected intIndicates the number of fractional digits.private intHashcode.protected StringWhether the column definitely doesnt allow NULL values ("NO") or possibly does ("YES").protected intIndicates whether the column can be NULL.protected intIndicates the radix, which is typically either 10 or 2.protected intThe index of the column in its table; the first column is 1, the second column is 2.protected StringAn explanatory comment on the column; may be null.protected StringThe table catalog, which may be null.(package private) RDBMSTableInfoParent table schema info.protected StringThe table name.protected StringThe table schema, which may be null.protected StringThe local type name used by the data source. -
Constructor Summary
ConstructorsConstructorDescriptionConstructor to create a column info definition for the current row of the passed ResultSet. -
Method Summary
Modifier and TypeMethodDescriptionvoidaddChild(org.datanucleus.store.schema.StoreSchemaData child) voidaddProperty(String name, Object value) Method to add a property for the column.voidMethod to remove all children.final booleanIndicates whether some object is "equal to" this one.intorg.datanucleus.store.schema.StoreSchemaDatagetChild(int position) List<org.datanucleus.store.schema.StoreSchemaData> intshortintintintintintorg.datanucleus.store.schema.StoreSchemaDataAccessor for the parent Table schema component.getProperty(String name) Accessor for a property.final inthashCode()Returns a hash code value for this object.voidsetColumnDef(String def) voidsetColumnSize(int size) voidsetDataType(short type) voidsetDecimalDigits(int digits) voidsetParent(org.datanucleus.store.schema.StoreSchemaData parent) Mutator for the parent component.toString()Returns the string representation of this object.
-
Field Details
-
tableCat
The table catalog, which may be null. -
tableSchem
The table schema, which may be null. -
tableName
The table name. -
columnName
The column name. -
dataType
protected short dataTypeIndicates the JDBC (SQL) data type fromTypes. -
typeName
The local type name used by the data source. -
columnSize
protected int columnSizeThe column size. For char/date types, this is the maximum num of chars, otherwise precision. -
decimalDigits
protected int decimalDigitsIndicates the number of fractional digits. -
numPrecRadix
protected int numPrecRadixIndicates the radix, which is typically either 10 or 2. -
nullable
protected int nullableIndicates whether the column can be NULL. -
remarks
An explanatory comment on the column; may be null. -
columnDef
The default value for the column; may be null. -
charOctetLength
protected int charOctetLengthIndicates the maximum number of bytes in the column (for char types only). -
ordinalPosition
protected int ordinalPositionThe index of the column in its table; the first column is 1, the second column is 2. -
isNullable
Whether the column definitely doesnt allow NULL values ("NO") or possibly does ("YES"). -
hash
private int hashHashcode. Set on first use. -
tableInfo
RDBMSTableInfo tableInfoParent table schema info.
-
-
Constructor Details
-
RDBMSColumnInfo
Constructor to create a column info definition for the current row of the passed ResultSet.- Parameters:
rs- ResultSet (from DatabaseMetaData.getColumns() for example).- Throws:
org.datanucleus.exceptions.NucleusDataStoreException- Thrown if an error occurs getting the information
-
-
Method Details
-
setParent
public void setParent(org.datanucleus.store.schema.StoreSchemaData parent) Mutator for the parent component.- Specified by:
setParentin interfaceorg.datanucleus.store.schema.ListStoreSchemaData- Parameters:
parent- Parent component
-
getParent
public org.datanucleus.store.schema.StoreSchemaData getParent()Accessor for the parent Table schema component.- Specified by:
getParentin interfaceorg.datanucleus.store.schema.ListStoreSchemaData- Returns:
- Table schema
-
setDecimalDigits
public void setDecimalDigits(int digits) -
setDataType
public void setDataType(short type) -
setColumnSize
public void setColumnSize(int size) -
setColumnDef
-
getDecimalDigits
public int getDecimalDigits() -
getIsNullable
-
getNullable
public int getNullable() -
getColumnSize
public int getColumnSize() -
getDataType
public short getDataType() -
getNumPrecRadix
public int getNumPrecRadix() -
getCharOctetLength
public int getCharOctetLength() -
getOrdinalPosition
public int getOrdinalPosition() -
getColumnDef
-
getRemarks
-
getTypeName
-
getTableName
-
getColumnName
-
getTableCat
-
getTableSchem
-
addProperty
-
getProperty
-
addChild
public void addChild(org.datanucleus.store.schema.StoreSchemaData child) - Specified by:
addChildin interfaceorg.datanucleus.store.schema.ListStoreSchemaData
-
clearChildren
public void clearChildren()Method to remove all children.- Specified by:
clearChildrenin interfaceorg.datanucleus.store.schema.ListStoreSchemaData
-
getChild
public org.datanucleus.store.schema.StoreSchemaData getChild(int position) - Specified by:
getChildin interfaceorg.datanucleus.store.schema.ListStoreSchemaData
-
getChildren
- Specified by:
getChildrenin interfaceorg.datanucleus.store.schema.ListStoreSchemaData
-
getNumberOfChildren
public int getNumberOfChildren()- Specified by:
getNumberOfChildrenin interfaceorg.datanucleus.store.schema.ListStoreSchemaData
-
equals
Indicates whether some object is "equal to" this one. Two RDBMSColumnInfo are considered equal if their catalog, schema, table, and column name are all equal. -
hashCode
-
toString
-