|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.ujoframework.extensions.AbstractUjo
org.ujoframework.implementation.quick.QuickUjo
org.ujoframework.orm.AbstractMetaModel
org.ujoframework.orm.metaModel.MetaRelation2Many
org.ujoframework.orm.metaModel.MetaColumn
public final class MetaColumn
Database column metadata
| Field Summary | |
|---|---|
static Property<MetaColumn,DbType> |
DB_TYPE
Database Type |
static Property<MetaColumn,java.lang.String> |
DEFAULT_VALUE
DB Default value |
static Property<MetaColumn,java.lang.String> |
INDEX
A name of the non-unique database index for the column, where the same index can contain more columns. |
static Property<MetaColumn,java.lang.Boolean> |
MANDATORY
Column NOT-NULL |
static Property<MetaColumn,java.lang.Integer> |
MAX_LENGTH
Column value length |
static Property<MetaColumn,java.lang.Integer> |
PRECISION
Column value precision |
static Property<MetaColumn,java.lang.Boolean> |
PRIMARY_KEY
DB primary key |
static Property<MetaColumn,java.lang.String> |
UNIQUE_INDEX
A name of the unique database index for the column, where the same index can contain more columns. |
| Fields inherited from class org.ujoframework.orm.metaModel.MetaRelation2Many |
|---|
ID, NAME, TABLE, TABLE_PROPERTY |
| Constructor Summary | |
|---|---|
MetaColumn()
|
|
MetaColumn(MetaTable table,
UjoProperty tableProperty,
MetaColumn param)
|
|
| Method Summary | |
|---|---|
java.lang.String |
getAliasName()
Returns an ALIAS of table and COLUMN name. |
java.lang.Class |
getDialectClass()
Returns a SQL dialect class from a related Database |
java.lang.String |
getForeignColumnName(int index)
Returns a name of foreign column by index |
java.util.List<MetaColumn> |
getForeignColumns()
Returns an original foreign columns in case a foreign column. |
MetaTable |
getForeignTable()
Returns an original foreign columns in case a foreign column. |
java.lang.String |
getFullName()
Returns a DB, TABLE and COLUMN name |
java.lang.Object |
getJdbcFriendlyDefaultValue()
Returns a default value in a JDBC friendly type. |
int |
getMaxLength()
Returns a maximal db column length in the database. |
int |
getPrecision()
Returns the db column precision. |
java.lang.Class |
getType()
Returns a Java Class of value |
char |
getTypeCode()
A TypeCode |
java.lang.Object |
getValue(OrmUjo bo)
Returns a property value from a table |
boolean |
hasDefaultValue()
Has the property a default value (not null) ? |
void |
initTypeCode(MetaParams params)
Initialize a type code - for an internal use only. |
boolean |
isColumn()
It is a DB column (either a value of a foreign key), not a relation to many. |
boolean |
isForeignKey()
Is it a Foreign Key ? |
boolean |
isMandatory()
Returns true if the related db column is NOT NULL. |
boolean |
isPrimaryKey()
Is it a Primary Key? |
boolean |
isVoid()
Is the related property type void? |
void |
printForeignColumnFullName(int index,
java.lang.Appendable out)
Print a full 'alias' name of foreign column by index |
void |
setValue(Ujo bo,
java.lang.Object value)
Returns a property value from a table |
java.lang.String |
toString()
Returns a TABLE and COLUMN names. |
| Methods inherited from class org.ujoframework.orm.metaModel.MetaRelation2Many |
|---|
getHandler, getProperty, getTable, getTableClass, getValue |
| Methods inherited from class org.ujoframework.orm.AbstractMetaModel |
|---|
get, changeDefault, checkReadOnly, isUsable, isUsable, readAuthorization, readOnly, setReadOnly, writeValue |
| Methods inherited from class org.ujoframework.implementation.quick.QuickUjo |
|---|
newListProperty, newListProperty, newProperty, newProperty, newProperty, newProperty, newProperty, newProperty, readValue |
| Methods inherited from class org.ujoframework.extensions.AbstractUjo |
|---|
clone, equals, init, init, readProperties, readUjoManager, readValueString, writeValueString |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final Property<MetaColumn,java.lang.Boolean> PRIMARY_KEY
public static final Property<MetaColumn,DbType> DB_TYPE
public static final Property<MetaColumn,java.lang.Boolean> MANDATORY
public static final Property<MetaColumn,java.lang.Integer> MAX_LENGTH
public static final Property<MetaColumn,java.lang.Integer> PRECISION
public static final Property<MetaColumn,java.lang.String> DEFAULT_VALUE
public static final Property<MetaColumn,java.lang.String> INDEX
public static final Property<MetaColumn,java.lang.String> UNIQUE_INDEX
| Constructor Detail |
|---|
public MetaColumn()
public MetaColumn(MetaTable table,
UjoProperty tableProperty,
MetaColumn param)
| Method Detail |
|---|
public boolean isColumn()
isColumn in class MetaRelation2Manypublic boolean isForeignKey()
isForeignKey in class MetaRelation2Manypublic boolean isPrimaryKey()
public int getMaxLength()
public int getPrecision()
public boolean isMandatory()
public MetaTable getForeignTable()
public java.util.List<MetaColumn> getForeignColumns()
public java.lang.String getForeignColumnName(int index)
public java.lang.Object getValue(OrmUjo bo)
public void setValue(Ujo bo,
java.lang.Object value)
public java.lang.Class getType()
public java.lang.String toString()
toString in class MetaRelation2Manypublic java.lang.String getFullName()
public java.lang.String getAliasName()
public void printForeignColumnFullName(int index,
java.lang.Appendable out)
throws java.io.IOException
java.io.IOExceptionpublic char getTypeCode()
TypeServicepublic boolean hasDefaultValue()
public java.lang.Object getJdbcFriendlyDefaultValue()
TypeServicepublic java.lang.Class getDialectClass()
public void initTypeCode(MetaParams params)
public boolean isVoid()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||