Class ColumnsSQL
java.lang.Object
io.github.josecarlosbran.JBSqlUtils.Utilities.ColumnsSQL
- Author:
- Jose Bran Clase que permite identificar las caracteristicas de la columnas que tiene la tabla que corresponde al modelo.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionint
int
int
int
int
int
int
short
Obtiene TABLE_SCHEM String → table schema (may be null)void
setCHAR_OCTET_LENGTH
(int CHAR_OCTET_LENGTH) Setea el Char Octet Lengthvoid
setCOLUMN_DEF
(String COLUMN_DEF) Setea el Valor por default que tiene la columna en BD'svoid
setCOLUMN_NAME
(String COLUMN_NAME) Setea el nombre de la columna en BD'svoid
setCOLUMN_SIZE
(int COLUMN_SIZE) Setea el tamaño de la columna en BD'svoid
setDATA_TYPE
(int DATA_TYPE) Setea el Data Type de la columna en SQLvoid
setDECIMAL_DIGITS
(int DECIMAL_DIGITS) Setea la cantidad de digitos decimales de la columnavoid
setIS_AUTOINCREMENT
(String IS_AUTOINCREMENT) Setea si la columna es auto incrementablevoid
setIS_GENERATEDCOLUMN
(String IS_GENERATEDCOLUMN) Setea el IS_GENERATEDCOLUMN String → Indicates whether this is a generated columnvoid
setIS_NULLABLE
(String IS_NULLABLE) Setea si la columna es nullablevoid
setNULLABLE
(int NULLABLE) Setea el entero que indica si la columna es nullablevoid
setNUM_PREC_RADIX
(int NUM_PREC_RADIX) Setea el Num Prec Radixvoid
setORDINAL_POSITION
(int ORDINAL_POSITION) Setea la posición ordinal de la columnavoid
setREMARKS
(String REMARKS) Setea el comentario que tiene la columna en BD'svoid
setSCOPE_CATALOG
(String SCOPE_CATALOG) Setea el Scope Catalogvoid
setSCOPE_SCHEMA
(String SCOPE_SCHEMA) Setea el SCOPE SCHEMAvoid
setSCOPE_TABLE
(String SCOPE_TABLE) Setea el Scope Tablevoid
setSOURCE_DATA_TYPE
(short SOURCE_DATA_TYPE) Setea el Source data type de la columnavoid
setTABLE_CAT
(String TABLE_CAT) Sete la categoría de la tablavoid
setTABLE_NAME
(String TABLE_NAME) Setea el nombre de la tabla a la cual pertenece la columnavoid
setTABLE_SCHEM
(String TABLE_SCHEM) Setea el Schem de la tablavoid
setTYPE_NAME
(String TYPE_NAME) Setea el nombre del tipo de dato de la columna
-
Constructor Details
-
ColumnsSQL
public ColumnsSQL()
-
-
Method Details
-
getTABLE_CAT
- Returns:
- TABLE_CAT String → table catalog (may be null)
-
setTABLE_CAT
Sete la categoría de la tabla- Parameters:
TABLE_CAT
- TABLE_CAT String → table catalog (may be null)
-
getTABLE_SCHEM
Obtiene TABLE_SCHEM String → table schema (may be null) -
setTABLE_SCHEM
Setea el Schem de la tabla- Parameters:
TABLE_SCHEM
- TABLE_SCHEM String → table schema (may be null)
-
getTABLE_NAME
- Returns:
- TABLE_NAME String → table name
-
setTABLE_NAME
Setea el nombre de la tabla a la cual pertenece la columna- Parameters:
TABLE_NAME
- TABLE_NAME String → table name
-
getCOLUMN_NAME
- Returns:
- COLUMN_NAME String → column name
-
setCOLUMN_NAME
Setea el nombre de la columna en BD's- Parameters:
COLUMN_NAME
- COLUMN_NAME String → column name
-
getDATA_TYPE
public int getDATA_TYPE()- Returns:
- DATA_TYPE int → SQL type from java.sql.Types
-
setDATA_TYPE
public void setDATA_TYPE(int DATA_TYPE) Setea el Data Type de la columna en SQL- Parameters:
DATA_TYPE
- DATA_TYPE int → SQL type from java.sql.Types
-
getTYPE_NAME
- Returns:
- TYPE_NAME String → Data source dependent type name, for a UDT the type name is fully qualified
-
setTYPE_NAME
Setea el nombre del tipo de dato de la columna- Parameters:
TYPE_NAME
- TYPE_NAME String → Data source dependent type name, for a UDT the type name is fully qualified
-
getCOLUMN_SIZE
public int getCOLUMN_SIZE()- Returns:
- COLUMN_SIZE int → column size.
-
setCOLUMN_SIZE
public void setCOLUMN_SIZE(int COLUMN_SIZE) Setea el tamaño de la columna en BD's- Parameters:
COLUMN_SIZE
- COLUMN_SIZE int → column size.
-
getDECIMAL_DIGITS
public int getDECIMAL_DIGITS()- Returns:
- DECIMAL_DIGITS int → the number of fractional digits. Null is returned for data types where DECIMAL_DIGITS is not applicable.
-
setDECIMAL_DIGITS
public void setDECIMAL_DIGITS(int DECIMAL_DIGITS) Setea la cantidad de digitos decimales de la columna- Parameters:
DECIMAL_DIGITS
- DECIMAL_DIGITS int → the number of fractional digits. Null is returned for data types where DECIMAL_DIGITS is not applicable.
-
getNUM_PREC_RADIX
public int getNUM_PREC_RADIX()- Returns:
- NUM_PREC_RADIX int → Radix (typically either 10 or 2)
-
setNUM_PREC_RADIX
public void setNUM_PREC_RADIX(int NUM_PREC_RADIX) Setea el Num Prec Radix- Parameters:
NUM_PREC_RADIX
- NUM_PREC_RADIX int → Radix (typically either 10 or 2)
-
getNULLABLE
public int getNULLABLE()- Returns:
- NULLABLE int → is NULL allowed. columnNoNulls - might not allow NULL values columnNullable - definitely allows NULL values columnNullableUnknown - nullability unknown
-
setNULLABLE
public void setNULLABLE(int NULLABLE) Setea el entero que indica si la columna es nullable- Parameters:
NULLABLE
- NULLABLE int → is NULL allowed. * columnNoNulls - might not allow NULL values * columnNullable - definitely allows NULL values * columnNullableUnknown - nullability unknown
-
getREMARKS
- Returns:
- REMARKS String → comment describing column (may be null)
-
setREMARKS
Setea el comentario que tiene la columna en BD's- Parameters:
REMARKS
- REMARKS String → comment describing column (may be null)
-
getCOLUMN_DEF
- Returns:
- COLUMN_DEF String → default value for the column, which should be interpreted as a string when the value is enclosed in single quotes (may be null)
-
setCOLUMN_DEF
Setea el Valor por default que tiene la columna en BD's- Parameters:
COLUMN_DEF
- COLUMN_DEF String → default value for the column, which should be interpreted as a string when the value is enclosed in single quotes (may be null)
-
getCHAR_OCTET_LENGTH
public int getCHAR_OCTET_LENGTH()- Returns:
- CHAR_OCTET_LENGTH int → for char types the maximum number of bytes in the column
-
setCHAR_OCTET_LENGTH
public void setCHAR_OCTET_LENGTH(int CHAR_OCTET_LENGTH) Setea el Char Octet Length- Parameters:
CHAR_OCTET_LENGTH
- CHAR_OCTET_LENGTH int → for char types the maximum number of bytes in the column
-
getORDINAL_POSITION
public int getORDINAL_POSITION()- Returns:
- ORDINAL_POSITION int → index of column in table (starting at 1)
-
setORDINAL_POSITION
public void setORDINAL_POSITION(int ORDINAL_POSITION) Setea la posición ordinal de la columna- Parameters:
ORDINAL_POSITION
- ORDINAL_POSITION int → index of column in table (starting at 1)
-
getIS_NULLABLE
- Returns:
- IS_NULLABLE String → ISO rules are used to determine the nullability for a column. YES --- if the column can include NULLs NO --- if the column cannot include NULLs empty string --- if the nullability for the column is unknown
-
setIS_NULLABLE
Setea si la columna es nullable- Parameters:
IS_NULLABLE
- IS_NULLABLE String → ISO rules are used to determine the nullability for a column. * YES --- if the column can include NULLs * NO --- if the column cannot include NULLs * empty string --- if the nullability for the column is unknown
-
getSCOPE_CATALOG
- Returns:
- SCOPE_CATALOG String → catalog of table that is the scope of a reference attribute (null if DATA_TYPE isn't REF)
-
setSCOPE_CATALOG
Setea el Scope Catalog- Parameters:
SCOPE_CATALOG
- SCOPE_CATALOG String → catalog of table that is the scope of a reference attribute (null if DATA_TYPE isn't REF)
-
getSCOPE_SCHEMA
- Returns:
- SCOPE_SCHEMA String → schema of table that is the scope of a reference attribute (null if the DATA_TYPE isn't REF)
-
setSCOPE_SCHEMA
Setea el SCOPE SCHEMA- Parameters:
SCOPE_SCHEMA
- SCOPE_SCHEMA String → schema of table that is the scope of a reference attribute (null if the DATA_TYPE isn't REF)
-
getSCOPE_TABLE
- Returns:
- SCOPE_TABLE String → table name that this the scope of a reference attribute (null if the DATA_TYPE isn't REF)
-
setSCOPE_TABLE
Setea el Scope Table- Parameters:
SCOPE_TABLE
- SCOPE_TABLE String → table name that this the scope of a reference attribute (null if the DATA_TYPE isn't REF)
-
getSOURCE_DATA_TYPE
public short getSOURCE_DATA_TYPE()- Returns:
- SOURCE_DATA_TYPE short → source type of a distinct type or user-generated Ref type, SQL type from java.sql.Types (null if DATA_TYPE isn't DISTINCT or user-generated REF)
-
setSOURCE_DATA_TYPE
public void setSOURCE_DATA_TYPE(short SOURCE_DATA_TYPE) Setea el Source data type de la columna- Parameters:
SOURCE_DATA_TYPE
- SOURCE_DATA_TYPE short → source type of a distinct type or user-generated Ref type, * SQL type from java.sql.Types (null if DATA_TYPE isn't DISTINCT or user-generated REF)
-
getIS_AUTOINCREMENT
- Returns:
- IS_AUTOINCREMENT String → Indicates whether this column is auto incremented YES --- if the column is auto incremented NO --- if the column is not auto incremented empty string --- if it cannot be determined whether the column is auto incremented
-
setIS_AUTOINCREMENT
Setea si la columna es auto incrementable- Parameters:
IS_AUTOINCREMENT
- IS_AUTOINCREMENT String → Indicates whether this column is auto incremented * YES --- if the column is auto incremented * NO --- if the column is not auto incremented * empty string --- if it cannot be determined whether the column is auto incremented
-
getIS_GENERATEDCOLUMN
- Returns:
- IS_GENERATEDCOLUMN String → Indicates whether this is a generated column YES --- if this a generated column NO --- if this not a generated column empty string --- if it cannot be determined whether this is a generated column
-
setIS_GENERATEDCOLUMN
Setea el IS_GENERATEDCOLUMN String → Indicates whether this is a generated column- Parameters:
IS_GENERATEDCOLUMN
- YES --- if this a generated column NO --- if this not a generated column empty string --- if it cannot be determined whether this is a generated column
-