e4s.db.dict
Class E4DBView
java.lang.Object
e4s.util.E4Object
e4s.db.dict.E4DBGeneratedClass
e4s.db.dict.E4DBView
- All Implemented Interfaces:
- E4DBTable_Intf, java.lang.Comparable
public class E4DBView
- extends E4DBGeneratedClass
- implements E4DBTable_Intf, java.lang.Comparable
Part of the datadictionary: holds database view information.
- Since:
- JDK 1.4
- See Also:
E4DBColumn,
E4DBTable
|
Method Summary |
static java.lang.String |
_getSVNVersionString()
|
void |
addConditioned(E4DBTableName tName,
E4DBColumnName cName,
java.lang.String condition)
|
void |
addRelationshipNoChecks(E4DBTableName tFrom,
E4DBColumnName cFrom,
E4DBTableName tTo,
E4DBColumnName cTo,
int join)
Remove (if exists) or add (if not exists) a relationship. |
void |
addSelected(E4DBTableName tName,
E4DBColumnName cName,
E4DBColumnType cType,
int len,
java.lang.String renamed)
|
void |
addTable(E4DBTableName tName)
|
void |
addTable(E4DBTableName tName,
char alias)
|
void |
changeRelationship(E4DBTableName tFrom,
E4DBColumnName cFrom,
E4DBTableName tTo,
E4DBColumnName cTo)
Remove (if exists) or add (if not exists) a relationship. |
int |
compareTo(java.lang.Object obj)
|
java.lang.String |
createSQL(E4DBTableName viewName,
java.lang.String crlf)
|
java.lang.String |
createSQL(java.lang.String crlf)
|
boolean |
equals(E4DBTableName tName)
Compare the table's name. |
java.lang.String |
findAlias(E4DBTableName tName)
|
E4DBColumnInfo |
findColumnInfo(E4DBColumnName cName)
Look for a specific column. |
E4DBView.TableInvolved |
findInvolved(E4DBTable table)
|
E4DBView.TableInvolved |
findInvolved(E4DBTableName tName)
|
void |
generateClass_SQL(java.lang.String path)
|
void |
generateClass()
|
java.lang.String |
getAlias(E4DBTable_Intf table)
|
java.lang.String |
getAlias(E4DBTableName tName)
|
E4DBColumnInfo[] |
getColumnInfos(boolean sort)
Get all columns |
E4DBView.ColumnSelected[] |
getColumnsSelected()
|
boolean |
getGenerateBase()
Check, if Java source code will be generated for this table. |
int |
getJoin(E4DBTableName tFrom,
E4DBTableName tTo)
|
E4DBTableName |
getLastTable()
|
E4DBTableName |
getName()
Get the table's name. |
E4DBView.Relationship[] |
getRelationship(E4DBTableName t1,
E4DBTableName t2)
|
java.lang.String |
getRem()
Get the table's remark. |
E4DBTableName[] |
getTables()
|
boolean |
hasAnyColumnsSelected()
|
boolean |
hasAnyRelationshipBetween(E4DBTableName tNameFrom,
E4DBColumnName cNameFrom,
E4DBTableName tNameTo)
|
boolean |
hasAnyRelationshipFrom(E4DBTableName tName)
|
boolean |
hasAnyRelationshipTo(E4DBTableName tName)
|
boolean |
hasClientDistinction()
|
boolean |
hasColumn(E4DBColumnName columnname)
|
boolean |
hasRelationshipBetween(E4DBTableName tNameFrom,
E4DBColumnName cNameFrom,
E4DBTableName tNameTo,
E4DBColumnName cNameTo)
|
boolean |
hasTables()
|
E4DBView.ColumnConditioned |
isConditioned(E4DBTableName tName,
E4DBColumnName cName)
|
E4DBView.ColumnSelected |
isSelected(E4DBTableName tName,
E4DBColumnName cName)
|
boolean |
isSystemView()
|
int |
numberRelationships(E4DBTableName t1,
E4DBTableName t2)
|
boolean |
relationAB()
|
boolean |
relationAC()
|
boolean |
relationBC()
|
void |
removeClass()
|
void |
removeCondition(E4DBTableName tName)
|
void |
removeSelect(E4DBTableName tName)
|
void |
removeTable(E4DBTableName tName)
|
boolean |
renameColumn(E4DBTableName tablename,
E4DBColumnName oldname,
E4DBColumnName newname)
|
boolean |
renameTable(E4DBTableName from,
E4DBTableName to)
|
boolean |
renameType(E4DBColumnType oldname,
E4DBColumnType newname)
|
void |
setJoin(E4DBTableName t1,
E4DBTableName t2,
int join)
|
void |
setName(E4DBTableName name)
|
void |
setRem(java.lang.String rem)
|
void |
setSystemView(boolean mode)
|
void |
toXml(E4PrintStream pstr)
|
boolean |
usesTable(E4DBTableName check)
|
| Methods inherited from class e4s.db.dict.E4DBGeneratedClass |
getCreated, getDeprecated, getGenerationOutputPath, getGenerationOutputPath, getModified, getPackage, getPackagePath, getPlugins, hasChanged, isSystem, printGenerateHeader, resetChanged, setCreated, setDeprecated, setHasChanged, setModified, setPackage, setSystem, toXml_Package |
| Methods inherited from class e4s.util.E4Object |
Calendar, CName, CName, E4LabelApp, E4LabelApp, E4LabelApp, E4LabelApp, E4LabelApp, E4LabelApp, E4LabelNone, E4LabelNone, E4LabelNone, E4LabelNone, E4LabelSys, E4LabelSys, e4sCopyright, e4sVersion, encode, encode, encode, encodeHtml, encodeHtml, encodeHtml, encodeURL, encodeURL, encodeURL, finalize, getLINE, getTRACE, getTRACE, getTRACE, getTRACE, getTRACE, getTRACE, getTraceMemory, HtmlEncode, HtmlEncode, HtmlEncode, isdecimal, isdigit, isnotok, isnotok, isnumeric, isok, isok, isok, isok, lastCallingFunction, lastCallingFunction, lastCallingFunction, lastCallingFunction, lastCallingStack, mkdirs, null2nbsp, null2nbsp, null2nbsp, ok, ok, ok, ok, outPrintln, setLogFile4Trace, setTraceMemory, STACKTRACE, toDebug, toDouble, toFloat, toFloat, toString, TRACE_CALLS, TRACE, TRACE, TRACE, TRACE, TRACE, TRACE, TRACE, TRACE, TRACE, TRACE, TRACE, TRACE, wait |
| Methods inherited from class java.lang.Object |
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
JOIN_INNER
public static final int JOIN_INNER
- See Also:
- Constant Field Values
JOIN_LEFT
public static final int JOIN_LEFT
- See Also:
- Constant Field Values
JOIN_RIGHT
public static final int JOIN_RIGHT
- See Also:
- Constant Field Values
_XML_TAG_VIEW
public static final java.lang.String _XML_TAG_VIEW
- See Also:
- Constant Field Values
_XML_ATTR_VIEW_NAME
public static final java.lang.String _XML_ATTR_VIEW_NAME
- See Also:
- Constant Field Values
_XML_TAG_TI
public static final java.lang.String _XML_TAG_TI
- See Also:
- Constant Field Values
_XML_TAG_TI_ALIAS
public static final java.lang.String _XML_TAG_TI_ALIAS
- See Also:
- Constant Field Values
_XML_TAG_TI_NAME
public static final java.lang.String _XML_TAG_TI_NAME
- See Also:
- Constant Field Values
_XML_TAG_SELECTED
public static final java.lang.String _XML_TAG_SELECTED
- See Also:
- Constant Field Values
_XML_TAG_CS_NAME
public static final java.lang.String _XML_TAG_CS_NAME
- See Also:
- Constant Field Values
_XML_TAG_CS_DATATYPE
public static final java.lang.String _XML_TAG_CS_DATATYPE
- See Also:
- Constant Field Values
_XML_TAG_CS_LEN
public static final java.lang.String _XML_TAG_CS_LEN
- See Also:
- Constant Field Values
_XML_TAG_CS_RENAME
public static final java.lang.String _XML_TAG_CS_RENAME
- See Also:
- Constant Field Values
_XML_TAG_CONDITIONED
public static final java.lang.String _XML_TAG_CONDITIONED
- See Also:
- Constant Field Values
_XML_TAG_CC_NAME
public static final java.lang.String _XML_TAG_CC_NAME
- See Also:
- Constant Field Values
_XML_TAG_RELATION
public static final java.lang.String _XML_TAG_RELATION
- See Also:
- Constant Field Values
_XML_TAG_REL_JOIN
public static final java.lang.String _XML_TAG_REL_JOIN
- See Also:
- Constant Field Values
_XML_TAG_REL_TABLE
public static final java.lang.String _XML_TAG_REL_TABLE
- See Also:
- Constant Field Values
_XML_TAG_REL_FROM_COLUMN
public static final java.lang.String _XML_TAG_REL_FROM_COLUMN
- See Also:
- Constant Field Values
_XML_TAG_REL_TO_COLUMN
public static final java.lang.String _XML_TAG_REL_TO_COLUMN
- See Also:
- Constant Field Values
E4DBView
public E4DBView(E4DBDatabase db,
boolean is_system)
getGenerateBase
public boolean getGenerateBase()
- Check, if Java source code will be generated for this table.
- Specified by:
getGenerateBase in interface E4DBTable_Intf
- Returns:
- true, if generated or false otherwise
addTable
public void addTable(E4DBTableName tName)
addTable
public void addTable(E4DBTableName tName,
char alias)
getLastTable
public E4DBTableName getLastTable()
removeTable
public void removeTable(E4DBTableName tName)
getAlias
public java.lang.String getAlias(E4DBTable_Intf table)
getAlias
public java.lang.String getAlias(E4DBTableName tName)
removeSelect
public void removeSelect(E4DBTableName tName)
removeCondition
public void removeCondition(E4DBTableName tName)
findInvolved
public E4DBView.TableInvolved findInvolved(E4DBTable table)
findInvolved
public E4DBView.TableInvolved findInvolved(E4DBTableName tName)
addSelected
public void addSelected(E4DBTableName tName,
E4DBColumnName cName,
E4DBColumnType cType,
int len,
java.lang.String renamed)
addConditioned
public void addConditioned(E4DBTableName tName,
E4DBColumnName cName,
java.lang.String condition)
isSelected
public E4DBView.ColumnSelected isSelected(E4DBTableName tName,
E4DBColumnName cName)
isConditioned
public E4DBView.ColumnConditioned isConditioned(E4DBTableName tName,
E4DBColumnName cName)
getTables
public E4DBTableName[] getTables()
getColumnsSelected
public E4DBView.ColumnSelected[] getColumnsSelected()
hasTables
public boolean hasTables()
hasAnyColumnsSelected
public boolean hasAnyColumnsSelected()
getName
public E4DBTableName getName()
- Description copied from interface:
E4DBTable_Intf
- Get the table's name.
- Specified by:
getName in interface E4DBTable_Intf
- Returns:
- name of the table
- See Also:
E4DBTable_Intf.equals(e4s.db.E4DBTableName)
setName
public void setName(E4DBTableName name)
getRem
public java.lang.String getRem()
- Description copied from interface:
E4DBTable_Intf
- Get the table's remark.
- Specified by:
getRem in interface E4DBTable_Intf
- Returns:
- table remark, or null if not defined
- See Also:
#setRem(String)
setRem
public void setRem(java.lang.String rem)
getJoin
public int getJoin(E4DBTableName tFrom,
E4DBTableName tTo)
setJoin
public void setJoin(E4DBTableName t1,
E4DBTableName t2,
int join)
isSystemView
public boolean isSystemView()
setSystemView
public void setSystemView(boolean mode)
createSQL
public java.lang.String createSQL(java.lang.String crlf)
throws java.lang.Exception
- Throws:
java.lang.Exception
createSQL
public java.lang.String createSQL(E4DBTableName viewName,
java.lang.String crlf)
throws java.lang.Exception
- Throws:
java.lang.Exception
numberRelationships
public int numberRelationships(E4DBTableName t1,
E4DBTableName t2)
changeRelationship
public void changeRelationship(E4DBTableName tFrom,
E4DBColumnName cFrom,
E4DBTableName tTo,
E4DBColumnName cTo)
- Remove (if exists) or add (if not exists) a relationship.
- Parameters:
tFrom - table referenced fromcFrom - column referenced fromtTo - table referenced tocTo - column referenced to
addRelationshipNoChecks
public void addRelationshipNoChecks(E4DBTableName tFrom,
E4DBColumnName cFrom,
E4DBTableName tTo,
E4DBColumnName cTo,
int join)
- Remove (if exists) or add (if not exists) a relationship.
- Parameters:
tFrom - table referenced fromcFrom - column referenced fromtTo - table referenced tocTo - column referenced to
hasAnyRelationshipFrom
public boolean hasAnyRelationshipFrom(E4DBTableName tName)
hasAnyRelationshipTo
public boolean hasAnyRelationshipTo(E4DBTableName tName)
hasAnyRelationshipBetween
public boolean hasAnyRelationshipBetween(E4DBTableName tNameFrom,
E4DBColumnName cNameFrom,
E4DBTableName tNameTo)
hasRelationshipBetween
public boolean hasRelationshipBetween(E4DBTableName tNameFrom,
E4DBColumnName cNameFrom,
E4DBTableName tNameTo,
E4DBColumnName cNameTo)
getRelationship
public E4DBView.Relationship[] getRelationship(E4DBTableName t1,
E4DBTableName t2)
findAlias
public java.lang.String findAlias(E4DBTableName tName)
hasClientDistinction
public boolean hasClientDistinction()
- Specified by:
hasClientDistinction in interface E4DBTable_Intf
toXml
public void toXml(E4PrintStream pstr)
throws java.lang.Exception
- Throws:
java.lang.Exception
generateClass
public void generateClass()
throws E4DBException
- Throws:
E4DBException
removeClass
public void removeClass()
throws java.lang.Exception
- Throws:
java.lang.Exception
generateClass_SQL
public void generateClass_SQL(java.lang.String path)
throws E4DBException
- Throws:
E4DBException
equals
public boolean equals(E4DBTableName tName)
- Description copied from interface:
E4DBTable_Intf
- Compare the table's name.
- Specified by:
equals in interface E4DBTable_Intf
- Parameters:
tName - the tablename to be compared with the table name of this object
- Returns:
- true, if equal
- See Also:
e4s.db.E4DBTableName#equals(e4s.db.E4DBTableName),
#setTableName(e4s.db.E4DBTableName)
compareTo
public int compareTo(java.lang.Object obj)
- Specified by:
compareTo in interface java.lang.Comparable
findColumnInfo
public E4DBColumnInfo findColumnInfo(E4DBColumnName cName)
- Description copied from interface:
E4DBTable_Intf
- Look for a specific column.
- Specified by:
findColumnInfo in interface E4DBTable_Intf
- Parameters:
cName - the name of the column
- Returns:
- null if not found, the column if found
- See Also:
#addColumn(E4DBColumn),
#getColumns()
getColumnInfos
public E4DBColumnInfo[] getColumnInfos(boolean sort)
throws E4DBException
- Description copied from interface:
E4DBTable_Intf
- Get all columns
- Specified by:
getColumnInfos in interface E4DBTable_Intf
- Throws:
E4DBException
relationAB
public boolean relationAB()
relationBC
public boolean relationBC()
relationAC
public boolean relationAC()
usesTable
public boolean usesTable(E4DBTableName check)
renameTable
public boolean renameTable(E4DBTableName from,
E4DBTableName to)
renameType
public boolean renameType(E4DBColumnType oldname,
E4DBColumnType newname)
hasColumn
public boolean hasColumn(E4DBColumnName columnname)
- Specified by:
hasColumn in interface E4DBTable_Intf
renameColumn
public boolean renameColumn(E4DBTableName tablename,
E4DBColumnName oldname,
E4DBColumnName newname)
_getSVNVersionString
public static java.lang.String _getSVNVersionString()