public class Table extends Fields
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
TABLE_FIELD_AS_SEPERATOR
An sql query will return the table name with the field name.
|
static java.lang.String |
TABLE_FIELD_SEPERATOR
An sql query will include the table name with the field name.
|
CHILD, CONTENT| Constructor and Description |
|---|
Table() |
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
buildQuery(java.lang.String databaseName,
java.util.List<CommonStorageField> commonStorageFields,
java.lang.String leftJoin,
java.lang.String whereClause,
java.lang.String orderBy,
java.lang.String quote)
Build a query to return all rows for this table including any foreign tables
|
java.lang.String |
buildSqlFieldName(CommonStorageField field)
Builds a table and field name into the output for an sql, considering
that the table may have an alias.
|
java.lang.String |
buildSqlFieldName(java.lang.String tableFieldName)
Builds a table and field name into the output for an sql, considering
that the table may have an alias.
|
java.util.List<CommonStorageField> |
buildStorageFieldsList(java.util.List<SqlField> sqlFields)
Gets a list of storage fields that match the field names.
|
java.lang.String |
buildTableAndFieldName(java.lang.String fieldName)
Builds a table and field name by combining the tableName.fieldName
|
static java.lang.String |
buildTableAndFieldName(java.lang.String tableName,
java.lang.String fieldName)
Builds a table and field name by combining the tableName.fieldName
|
java.lang.String |
execute(IExecContext execContext)
Executes an action
|
java.lang.String |
getBean() |
CommonStorageField |
getField(java.lang.String fieldName)
Get a field that matches the field name.
|
CommonStorageField |
getFieldFromTableAndFieldName(java.lang.String tableAndFieldName)
Get a field that matches the table name and field name.
|
static java.lang.String |
getFieldName(java.lang.String tableAndFieldName)
This will get the field name from a table and field name string.
|
PK |
getPk()
Search through list of fields in table looking for the Primary Key.
|
CommonStorageField |
getStorageField(java.lang.String name) |
TablePath |
getTable_path() |
static java.lang.String |
getTableName(java.lang.String tableAndFieldName)
This will get the table name from a table and field name string.
|
java.util.List<TablePath> |
getTablePaths()
These are used to builds ManyToMany entries between tables using a lookup
table containing references between the tables.
|
java.lang.String |
getUpdate_field_version_num() |
boolean |
hasField(java.lang.String fieldName)
Check if a table has a field
|
static boolean |
isTableAndFieldName(java.lang.String name)
Checks if the name is a table and field name, by searching for a .
|
void |
setBean(java.lang.String bean) |
void |
setTable_path(TablePath tablePath) |
void |
setTablePaths(java.util.List<TablePath> tablePaths) |
void |
setUpdate_field_version_num(java.lang.String update_field_version_num) |
java.lang.String |
toString() |
java.lang.String |
toString(int offset) |
getField, getFields, setBinary, setDate, setDatetime, setField, setFk, setImage, setInt, setLink, setPassword, setPk, setSelect, setText, setTextarea, setTimeofday, setTimestamp, validateaddBackLinkedFk, getAlias, getBackLinkedFks, getDate_format, getFunction_ref, getLength, getName, getName, getPattern, getPlaceholder, getPresentation_height, getPresentation_name, getPresentation_name, getPresentation_width, getQuery_sql, getRefFk, getRegex, getTooltip, getTooltip, isEditable, isMandatory, isUnique, setAlias, setDate_format, setEditable, setFunction_ref, setLength, setMandatory, setName, setPattern, setPlaceholder, setPresentation_height, setPresentation_name, setPresentation_width, setQuery_sql, setRefFk, setRegex, setTooltip, setUniquebuildErrorStringaddChild, clearActions, doReplace, doReplace, getActions, getChild, getContent, getFirstValueFound, getParent, getReplacementContent, getReplacementMarker, isUsedForDisplay, processAction, setAction, setActions, setChild, setContent, setParent, setReplacementContent, setReplacementMarker, setUsedForDisplaypublic static final java.lang.String TABLE_FIELD_SEPERATOR
public static final java.lang.String TABLE_FIELD_AS_SEPERATOR
public java.lang.String execute(IExecContext execContext) throws java.lang.Exception
BaseActionexecute in class BaseActionexecContext - the application execution contextjava.lang.Exceptionpublic CommonStorageField getField(java.lang.String fieldName)
fieldName - is the field we want to findpublic CommonStorageField getFieldFromTableAndFieldName(java.lang.String tableAndFieldName) throws DBConfigException
tableAndFieldName - is the field we want to find which will have the table name at the beginning. i.e.
tb_tablename.fieldnameDBConfigExceptionpublic static java.lang.String getFieldName(java.lang.String tableAndFieldName)
tableAndFieldName - public static java.lang.String getTableName(java.lang.String tableAndFieldName)
tableAndFieldName - public java.lang.String buildTableAndFieldName(java.lang.String fieldName)
fieldName - public static java.lang.String buildTableAndFieldName(java.lang.String tableName,
java.lang.String fieldName)
tableName - fieldName - public boolean hasField(java.lang.String fieldName)
fieldName - is the field we want to findpublic java.lang.String buildQuery(java.lang.String databaseName,
java.util.List<CommonStorageField> commonStorageFields,
java.lang.String leftJoin,
java.lang.String whereClause,
java.lang.String orderBy,
java.lang.String quote)
databaseName - commonStorageFields - leftJoin - whereClause - orderBy - quote - this character quote's the field names we are returning. May be null or a ' or a
". i.e. tb_xxx.id as "tb_xxx.id"public java.lang.String toString(int offset)
toString in class BaseStorageFieldpublic java.util.List<CommonStorageField> buildStorageFieldsList(java.util.List<SqlField> sqlFields)
sqlFields - the list of field namespublic CommonStorageField getStorageField(java.lang.String name)
public static boolean isTableAndFieldName(java.lang.String name)
name - public PK getPk()
public void setTablePaths(java.util.List<TablePath> tablePaths)
public java.util.List<TablePath> getTablePaths()
public void setTable_path(TablePath tablePath)
public TablePath getTable_path()
public java.lang.String buildSqlFieldName(CommonStorageField field)
field - - this can be either the table.fieldname or the fieldnamepublic java.lang.String buildSqlFieldName(java.lang.String tableFieldName)
tableFieldName - - this can be either the table.fieldname or the fieldnamepublic java.lang.String toString()
toString in class java.lang.Objectpublic java.lang.String getUpdate_field_version_num()
public void setUpdate_field_version_num(java.lang.String update_field_version_num)
public java.lang.String getBean()
public void setBean(java.lang.String bean)