Package com.storedobject.tools
Class TableDefinition
java.lang.Object
com.storedobject.core.StoredObject
com.storedobject.tools.TableDefinition
- All Implemented Interfaces:
Displayable,StringFiller,HasId
-
Field Summary
Fields inherited from class com.storedobject.core.StoredObject
logger -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanbooleanstatic voidstatic voidcompareDefinitions(TransactionManager tm, InputStream data, StyledBuilder message) booleancompile()booleandeploy(TransactionManager tm, char[] securityPassword) booleandeploy(TransactionManager tm, char[] securityPassword, boolean checkOldLoaded) booleanbooleandeployLogic(TransactionManager tm, boolean checkOldLoaded) booleandeployTable(TransactionManager tm, char[] securityPassword) static String[]booleanvoidgenerateJavaCode(Writer writer) voidgenerateJavaCode(Writer writer, boolean close) voidgenerateJavaCode(Writer writer, boolean close, boolean withComment) static TableDefinitionbooleanintstatic StringgetFormStyleValue(int formStyle) static String[]getNotes()booleangetSmall()booleanGets the unique index condition of this object.booleanstatic voidbooleanbooleanisCoreType(String type) booleanbooleanbooleanstatic String[]links()static ObjectIterator<TableDefinition> static voidloadDefinitions(TransactionManager tm, InputStream data, StyledBuilder message) static String[]static String[]voidsetAbstractClass(boolean abstractClass) voidsetAnchorColumns(String anchorColumns) voidsetBrowseColumns(String browseColumns) voidsetClassName(String className) voidsetConstructorBlock(String constructorBlock) voidsetDisplayColumns(String displayColumns) voidsetExtraConstructors(String extraConstructors) voidsetExtraImports(String extraImports) voidsetExtraMethods(String extraMethods) voidsetFormStyle(int formStyle) voidsetFormTitle(String formTitle) voidsetInterfaces(String interfaces) voidvoidsetParentClassName(String parentClassName) voidsetProtectedColumns(String protectedColumns) voidsetSearchColumns(String searchColumns) voidsetSmall(boolean small) voidsetSmallList(boolean smallList) voidsetTabName(String tabName) voidsetValidateBlock(String validateBlock) voidsetVariablesBlock(String variablesBlock) toString()String representation of the instance.voidThe system will invoke this whenever the object is saved to the DB.Methods inherited from class com.storedobject.core.StoredObject
addLink, addLink, addLink, addLink, addLink, addLink, addLink, addLink, checkCurrency, checkCurrency, checkForDuplicate, checkForDuplicate, checkTimeZone, checkTransaction, clearObjectLinks, contemporary, copy, copy, count, count, count, count, count, count, countLinks, countLinks, countLinks, countLinks, countLinks, countLinks, countLinks, countLinks, countLinks, countLinks, countLinks, countLinks, countLinks, countLinks, countLinks, countLinks, countLinks, countLinks, countLinks, countLinks, countLinks, countLinks, countLinks, countLinks, countMasters, countMasters, countMasters, countMasters, countMasters, countMasters, countMasters, countMasters, countMasters, countMasters, countMasters, countMasters, countMasters, countMasters, countMasters, countMasters, countMasters, countMasters, countMasters, countMasters, countMasters, countMasters, countMasters, countMasters, create, created, delete, delete, delete, deleted, directUpdate, equals, exists, exists, exists, exists, exists, existsFileData, existsLink, existsLink, existsLink, existsLink, existsLink, existsLink, existsLink, existsLink, existsLinks, existsLinks, existsLinks, existsLinks, existsLinks, existsLinks, existsLinks, existsLinks, existsLinks, existsLinks, existsLinks, existsLinks, existsLinks, existsLinks, existsLinks, existsLinks, existsLinks, existsLinks, existsLinks, existsLinks, existsLinks, existsLinks, existsLinks, existsLinks, existsLinks, existsLinks, existsMaster, existsMaster, existsMasters, existsMasters, existsMasters, existsMasters, existsMasters, existsMasters, existsMasters, existsMasters, existsMasters, existsMasters, existsMasters, existsMasters, existsMasters, family, family, family, family, fill, get, get, get, get, get, get, get, get, get, get, get, get, get, get, get, get, get, get, getActor, getAttachment, getAttachmentId, getChildren, getContemporaryOf, getDeleted, getDeleted, getExistsCondition, getExistsCondition, getFileData, getFileData, getHistorical, getId, getKeyIndex, getMaster, getMaster, getMaster, getMaster, getMaster, getMaster, getMaster, getMaster, getMaster, getMaster, getMaster, getMaster, getMaster, getMaster, getMaster, getMaster, getMaster, getMaster, getMaster, getMaster, getMaster, getMaster, getMaster, getMaster, getNotExistsCondition, getNotExistsCondition, getParent, getParent, getParent, getParentId, getParentId, getParentId, getRelated, getRelated, getTransaction, getTransactionId, getTransactionIP, getUnique, hashCode, inserted, isModified, isVirtual, list, list, list, list, list, list, list, list, list, list, list, list, list, listDeletedIds, listFileData, listFileData, listHistory, listLinks, listLinks, listLinks, listLinks, listLinks, listLinks, listLinks, listLinks, listLinks, listLinks, listLinks, listLinks, listLinks, listLinks, listLinks, listLinks, listLinks, listLinks, listLinks, listLinks, listLinks, listLinks, listLinks, listLinks, listLinks, listLinks, listLinks, listLinks, listLinks, listLinks, listLinks, listLinks, listLinks, listLinks, listLinks, listLinks, listLinks, listLinks, listMasters, listMasters, listMasters, listMasters, listMasters, listMasters, listMasters, listMasters, listMasters, listMasters, listMasters, listMasters, listMasters, listMasters, listMasters, listMasters, listMasters, listMasters, listMasters, listMasters, listMasters, listMasters, listMasters, listMasters, listMasters, listMasters, listMasters, listMasters, listMasters, listMasters, listMasters, listMasters, listMasters, listMasters, listMasters, listMasters, listMasters, listMasters, listTree, listTree, listTree, listTree, listViaQuery, listViaQuery, load, load, load, load, loadAttributesFrom, loaded, loading, makeNew, makeVirtual, migrate, moduleName, nextVersion, objectLink, objectLink, objectLink, objectLinks, objectLinks, old, person, previousVersion, previousVersion, query, query, query, query, query, query, query, query, query, query, query, queryLinks, queryLinks, queryLinks, queryLinks, queryLinks, queryLinks, queryLinks, queryLinks, queryLinks, queryLinks, queryLinks, queryLinks, queryLinks, queryLinks, queryLinks, queryLinks, queryLinks, queryLinks, queryLinks, queryLinks, queryLinks, queryLinks, queryLinks, queryLinks, queryLinks, queryLinks, queryLinks, queryLinks, queryLinks, queryLinks, queryLinks, queryLinks, queryLinks, queryLinks, queryLinks, queryLinks, queryLinks, queryLinks, queryMasters, queryMasters, queryMasters, queryMasters, queryMasters, queryMasters, queryMasters, queryMasters, queryMasters, queryMasters, queryMasters, queryMasters, queryMasters, queryMasters, queryMasters, queryMasters, queryMasters, queryMasters, queryMasters, queryMasters, queryMasters, queryMasters, queryMasters, queryMasters, queryMasters, queryMasters, queryMasters, queryMasters, queryMasters, queryMasters, queryMasters, queryMasters, queryMasters, queryMasters, queryMasters, queryMasters, queryMasters, reload, reload, reloaded, removeAllLinks, removeAllLinks, removeAllLinks, removeAllLinks, removeAllLinks, removeAllLinks, removeAllLinks, removeAllLinks, removeAllLinks, removeAllLinks, removeAllLinks, removeAllLinks, removeLink, removeLink, removeLink, removeLink, removeLink, removeLink, removeLink, removeLink, removeLink, removeLink, removeLink, removeLink, removeReverseLinks, removeReverseLinks, save, save, save, save, save, save, save, save, save, save, save, save, save, save, save, saved, saving, setMaster, setRawValue, setTransaction, stringify, tableName, timestamp, toCode, toDisplay, transacting, undelete, undelete, undeleted, updated, user, userId, validate, validateChildAttach, validateChildDetach, validateChildUpdate, validateDelete, validateInsert, validateParentAttach, validateParentDetach, validateParentUpdate, validateUndelete, validateUpdate, valueEquals
-
Constructor Details
-
TableDefinition
public TableDefinition()
-
-
Method Details
-
columns
-
indices
-
getUniqueCondition
Description copied from class:StoredObjectGets the unique index condition of this object.- Overrides:
getUniqueConditionin classStoredObject- Returns:
- Unique index condition.
-
displayColumns
-
searchColumns
-
protectedColumns
-
links
-
toString
Description copied from class:StoredObjectString representation of the instance. Mostly used for logging purposes.- Overrides:
toStringin classStoredObject- Returns:
- String representation of the instance.
-
validateData
Description copied from class:StoredObjectThe system will invoke this whenever the object is saved to the DB. It will be invoked in all cases while creating new objects and updating/deleting/undeleting existing objects. If any exception is raised by this method, the process of saving to the DB will be abandoned.
Note: This method is mainly used to validate the data of all attributes of the object, and it may be used by others for validating the object. For example, front-end data-entry systems can use this method for validating the object.
- Overrides:
validateDatain classStoredObject- Parameters:
tm- Current transaction manager.- Throws:
Exception- If data is invalid.
-
isCorrectionNeeded
public boolean isCorrectionNeeded() -
generateInterfaceCode
public boolean generateInterfaceCode() -
hasDetailInterface
public boolean hasDetailInterface() -
isMasterObject
public boolean isMasterObject() -
setClassName
-
getClassName
-
setParentClassName
-
getParentClassName
-
setAbstractClass
public void setAbstractClass(boolean abstractClass) -
getAbstractClass
public boolean getAbstractClass() -
getParentTableName
-
getTableName
-
getSchemaName
-
setFormTitle
-
getFormTitle
-
setFormStyle
public void setFormStyle(int formStyle) -
getFormStyle
public int getFormStyle() -
getFormStyleValues
-
getFormStyleValue
-
getFormStyleValue
-
setTabName
-
getTabName
-
compile
public boolean compile() -
generateJavaCode
-
isCoreType
-
isAccountType
public boolean isAccountType() -
isNameType
public boolean isNameType() -
generateJavaCode
-
generateJavaCode
-
setExtraImports
-
getExtraImports
-
setExtraConstructors
-
getExtraConstructors
-
setExtraMethods
-
getExtraMethods
-
setConstructorBlock
-
getConstructorBlock
-
setValidateBlock
-
getValidateBlock
-
setInterfaces
-
getInterfaces
-
setVariablesBlock
-
getVariablesBlock
-
setDisplayColumns
-
getDisplayColumns
-
setSearchColumns
-
getSearchColumns
-
setBrowseColumns
-
getBrowseColumns
-
setProtectedColumns
-
getProtectedColumns
-
setAnchorColumns
-
getAnchorColumns
-
setSmall
public void setSmall(boolean small) -
getSmall
public boolean getSmall() -
setSmallList
public void setSmallList(boolean smallList) -
getSmallList
public boolean getSmallList() -
getNotes
-
setNotes
-
get
-
list
-
alterTable
- Throws:
Exception
-
classChanged
-
classChanged
-
deploy
- Throws:
Exception
-
deploy
public boolean deploy(TransactionManager tm, char[] securityPassword, boolean checkOldLoaded) throws Exception - Throws:
Exception
-
deployLogic
- Throws:
Exception
-
deployLogic
- Throws:
Exception
-
deployTable
- Throws:
Exception
-
loadDefinitions
public static void loadDefinitions(TransactionManager tm, InputStream data, StyledBuilder message) throws Exception - Throws:
Exception
-
compareDefinitions
public static void compareDefinitions(TransactionManager tm, InputStream data, StyledBuilder message) throws Exception - Throws:
Exception
-