Package com.oopsclick.silk.storage
Class ObjectStructure
- java.lang.Object
-
- com.oopsclick.silk.storage.ObjectStructure
-
public class ObjectStructure extends java.lang.ObjectThe Class ObjectStructure stores the .orm file information to be processes by SILK operations. It is stored by ObjectStorage class.- Author:
- Italo Osorio
-
-
Constructor Summary
Constructors Constructor Description ObjectStructure()Instantiates a new object structure.ObjectStructure(java.lang.String objectPath)Instantiates a new object structure.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddColumn(ColumnProperty column)Adds the column list.voidaddSqlAuthorization(SqlCommand select)Adds items to SqlAuthorization.voidaddSqlOperationList(SqlCommand sqlCommand)Adds the SQL operation list.voidaddSqlSelectList(SqlCommand select)Adds the sql select list.booleancolumnExist(java.lang.String name)Column exists.java.lang.StringgetColumnFunctionInsert(java.lang.String name)Gets the column function insert.java.lang.StringgetColumnFunctionUpdate(java.lang.String name)Gets the column function update.java.lang.StringgetColumnInsertAuthorization(java.lang.String name)Gets the column insertAuthorization.java.util.List<ColumnProperty>getColumnList()Gets the column list.java.lang.StringgetColumnNullValue(java.lang.String name)Gets the column null value.intgetColumnSecure(java.lang.String name)Gets the column secure.intgetColumnTranslation(java.lang.String name)Gets the column translate.java.lang.Class<?>getColumnType(java.lang.String name)Gets the column type.java.lang.StringgetColumnUpdateAuthorization(java.lang.String name)Gets the column updateAuthorization.java.lang.StringgetColumnValidation(java.lang.String name)Gets the column validation.java.lang.StringgetDeleteAuthorization()Gets deleteAuthorizationjava.lang.StringgetInsertAuthorization()Gets insertAuthorizationjava.lang.LonggetLastModified()Gets the last modified date in milliseconds.java.lang.StringgetLevelTreeColumn()Gets the level tree column.java.lang.StringgetObjectPath()Gets the object path.java.lang.StringgetOrderColumn()Gets the order column.java.lang.StringgetParentTreeColumn()Gets the parent tree column.java.lang.StringgetPkColumn()Gets the Primary Key column.intgetPkMode()Gets the pk mode.SqlCommandgetPkSql()Gets the PK SQL.java.lang.StringgetQueryType()Gets the Query Type.java.lang.StringgetRemoteService()Gets the remote service.java.lang.StringgetRootTreeColumn()Gets the root tree column.SqlCommandgetSelectByName(java.lang.String name)Gets the select by name.SqlCommandgetSqlAuthorization(int i)Gets the SqlAuthorization.SqlCommandgetSqlAuthorization(java.lang.String name)Gets the SqlAuthorization based on the provided authorization value.java.util.List<SqlCommand>getSqlAuthorizationList()Gets the sql authorization list.SqlCommandgetSqlOperationAt(int index)Gets the SQL operation at index position.SqlCommandgetSqlOperationByName(java.lang.String name)Gets the SQL operation by name.int[]getSqlOperationByTrigger(java.lang.String action, java.lang.String when)Gets the SQL operation by trigger values.java.util.List<SqlCommand>getSqlOperationList()Gets the SQL operation list.java.util.List<SqlCommand>getSqlOperationListByName(java.lang.String name)Gets the SQL operation list by name.java.util.List<SqlCommand>getSqlSelectList()Gets the sql select list.java.lang.StringgetTableName()Gets the table name.java.lang.StringgetUpdateAuthorization()Gets updateAuthorizationvoidsetAuthorization(java.lang.String authorization)Sets the authorizationvoidsetColumnList(java.util.List<ColumnProperty> columnList)Column.voidsetDeleteAuthorization(java.lang.String authorization)Sets the deleteAuthorizationvoidsetInsertAuthorization(java.lang.String authorization)Sets the insertAuthorizationvoidsetLastModified(java.lang.Long lastModified)Sets the last modified date in millisecondsvoidsetLevelTreeColumn(java.lang.String levelTreeColumn)Sets the level tree column.voidsetObjectPath(java.lang.String objectPath)Sets the object path.voidsetOrderColumn(java.lang.String orderColumn)Sets the order column.voidsetParentTreeColumn(java.lang.String parentTreeColumn)Sets the parent tree column.voidsetPkColumn(java.lang.String pkColumn)Sets the Primary Key column.voidsetPkMode(java.lang.String pkMode)Sets the pk mode.voidsetPkSql(SqlCommand pkSql)Sets the PK SQL.voidsetQueryType(java.lang.String queryType)Sets the Query Type.voidsetRemoteService(java.lang.String remoteService)Sets the remote service.voidsetRootTreeColumn(java.lang.String rootTreeColumn)Sets the root tree column.voidsetSqlAuthorizationList(java.util.List<SqlCommand> sqlAuthorizationList)Sets Authorization List.voidsetSqlOperationList(SqlCommand sqlCommand)Set the SQL operation list.voidsetSqlOperationList(java.util.List<SqlCommand> sqlOperationList)SQL Operations.voidsetSqlSelectList(java.util.List<SqlCommand> sqlSelectList)Selects.voidsetTableName(java.lang.String tableName)Sets the table name.voidsetUpdateAuthorization(java.lang.String authorization)Sets the updateAuthorizationintsqlAuthorizationListSize()sqlAuthorization list length.java.lang.StringtoString()inttotalSqlOperationListSize()Total SQL operation list.
-
-
-
Method Detail
-
getObjectPath
public java.lang.String getObjectPath()
Gets the object path.- Returns:
- the object path
-
setObjectPath
public void setObjectPath(java.lang.String objectPath)
Sets the object path.- Parameters:
objectPath- the new object path
-
getQueryType
public java.lang.String getQueryType()
Gets the Query Type.- Returns:
- queryType
-
setQueryType
public void setQueryType(java.lang.String queryType)
Sets the Query Type.- Parameters:
queryType- the type for the query: sql, folder
-
getTableName
public java.lang.String getTableName() throws SilkExceptionGets the table name.- Returns:
- the table name
- Throws:
SilkException- the silk exception
-
setTableName
public void setTableName(java.lang.String tableName)
Sets the table name.- Parameters:
tableName- the new table name
-
getPkColumn
public java.lang.String getPkColumn() throws SilkExceptionGets the Primary Key column.- Returns:
- the Primary Key column
- Throws:
SilkException- the silk exception
-
setPkColumn
public void setPkColumn(java.lang.String pkColumn)
Sets the Primary Key column.- Parameters:
pkColumn- the new Primary Key column
-
getRootTreeColumn
public java.lang.String getRootTreeColumn() throws SilkExceptionGets the root tree column.- Returns:
- the root tree column
- Throws:
SilkException- the silk exception
-
setRootTreeColumn
public void setRootTreeColumn(java.lang.String rootTreeColumn)
Sets the root tree column.- Parameters:
rootTreeColumn- the new root tree column
-
getParentTreeColumn
public java.lang.String getParentTreeColumn() throws SilkExceptionGets the parent tree column.- Returns:
- the parent tree column
- Throws:
SilkException- the silk exception
-
setParentTreeColumn
public void setParentTreeColumn(java.lang.String parentTreeColumn)
Sets the parent tree column.- Parameters:
parentTreeColumn- the new parent tree column
-
getLevelTreeColumn
public java.lang.String getLevelTreeColumn() throws SilkExceptionGets the level tree column.- Returns:
- the level tree column
- Throws:
SilkException- the silk exception
-
setLevelTreeColumn
public void setLevelTreeColumn(java.lang.String levelTreeColumn)
Sets the level tree column.- Parameters:
levelTreeColumn- the new level tree column
-
getOrderColumn
public java.lang.String getOrderColumn() throws SilkExceptionGets the order column.- Returns:
- the order column
- Throws:
SilkException- the silk exception
-
setOrderColumn
public void setOrderColumn(java.lang.String orderColumn)
Sets the order column.- Parameters:
orderColumn- the new order column
-
getLastModified
public java.lang.Long getLastModified()
Gets the last modified date in milliseconds.- Returns:
- the last modified date
-
setLastModified
public void setLastModified(java.lang.Long lastModified)
Sets the last modified date in milliseconds- Parameters:
lastModified- the new last modified date
-
getPkMode
public int getPkMode()
Gets the pk mode.- Returns:
- the pk mode
-
setPkMode
public void setPkMode(java.lang.String pkMode)
Sets the pk mode. 1: Auto 2: SQL 3: Value 4: UUID- Parameters:
pkMode- the new pk mode
-
getPkSql
public SqlCommand getPkSql() throws SilkException
Gets the PK SQL.- Returns:
- SqlCommand.
- Throws:
SilkException- the silk exception
-
setPkSql
public void setPkSql(SqlCommand pkSql) throws SilkException
Sets the PK SQL.- Parameters:
pkSql- the sqlCommand- Throws:
SilkException- the silk exception
-
getRemoteService
public java.lang.String getRemoteService()
Gets the remote service.- Returns:
- the remote service
-
setRemoteService
public void setRemoteService(java.lang.String remoteService)
Sets the remote service.- Parameters:
remoteService- the new remote service
-
setColumnList
public void setColumnList(java.util.List<ColumnProperty> columnList)
Column.- Parameters:
columnList- the new column list
-
getColumnList
public java.util.List<ColumnProperty> getColumnList()
Gets the column list.- Returns:
- the column list
-
addColumn
public void addColumn(ColumnProperty column)
Adds the column list.- Parameters:
column- the column
-
getColumnType
public java.lang.Class<?> getColumnType(java.lang.String name) throws SilkExceptionGets the column type.- Parameters:
name- the name- Returns:
- the column type
- Throws:
SilkException- the silk exception
-
getColumnSecure
public int getColumnSecure(java.lang.String name)
Gets the column secure.- Parameters:
name- the name- Returns:
- the column secure
-
getColumnNullValue
public java.lang.String getColumnNullValue(java.lang.String name)
Gets the column null value.- Parameters:
name- the name- Returns:
- the column null value
-
getColumnTranslation
public int getColumnTranslation(java.lang.String name)
Gets the column translate.- Parameters:
name- the name- Returns:
- the column translate
-
getColumnFunctionInsert
public java.lang.String getColumnFunctionInsert(java.lang.String name)
Gets the column function insert.- Parameters:
name- the name- Returns:
- the column function insert
-
getColumnFunctionUpdate
public java.lang.String getColumnFunctionUpdate(java.lang.String name)
Gets the column function update.- Parameters:
name- the name- Returns:
- the column function update
-
getColumnValidation
public java.lang.String getColumnValidation(java.lang.String name)
Gets the column validation.- Parameters:
name- the name- Returns:
- the column validation
-
getColumnInsertAuthorization
public java.lang.String getColumnInsertAuthorization(java.lang.String name)
Gets the column insertAuthorization.- Parameters:
name- the name- Returns:
- the column validation
-
getColumnUpdateAuthorization
public java.lang.String getColumnUpdateAuthorization(java.lang.String name)
Gets the column updateAuthorization.- Parameters:
name- the name- Returns:
- the column validation
-
columnExist
public boolean columnExist(java.lang.String name)
Column exists.- Parameters:
name- the name- Returns:
- true, if successful
-
setSqlSelectList
public void setSqlSelectList(java.util.List<SqlCommand> sqlSelectList)
Selects.- Parameters:
sqlSelectList- the new SQL select list
-
getSqlSelectList
public java.util.List<SqlCommand> getSqlSelectList()
Gets the sql select list.- Returns:
- the sql select list
-
addSqlSelectList
public void addSqlSelectList(SqlCommand select)
Adds the sql select list.- Parameters:
select- the select
-
getSelectByName
public SqlCommand getSelectByName(java.lang.String name)
Gets the select by name.- Parameters:
name- the name- Returns:
- the select by name
-
setSqlOperationList
public void setSqlOperationList(java.util.List<SqlCommand> sqlOperationList)
SQL Operations.- Parameters:
sqlOperationList- the new SQL operation list
-
setSqlOperationList
public void setSqlOperationList(SqlCommand sqlCommand)
Set the SQL operation list.- Parameters:
sqlCommand- the SQL operation
-
getSqlOperationList
public java.util.List<SqlCommand> getSqlOperationList()
Gets the SQL operation list.- Returns:
- the SQL operation list
-
addSqlOperationList
public void addSqlOperationList(SqlCommand sqlCommand)
Adds the SQL operation list.- Parameters:
sqlCommand- the SQL operation
-
totalSqlOperationListSize
public int totalSqlOperationListSize()
Total SQL operation list.- Returns:
- integer
-
getSqlOperationAt
public SqlCommand getSqlOperationAt(int index)
Gets the SQL operation at index position.- Parameters:
index- the position- Returns:
- sqlCommand
-
getSqlOperationByName
public SqlCommand getSqlOperationByName(java.lang.String name)
Gets the SQL operation by name.- Parameters:
name- the name- Returns:
- sqlCommand
-
getSqlOperationListByName
public java.util.List<SqlCommand> getSqlOperationListByName(java.lang.String name)
Gets the SQL operation list by name.- Parameters:
name- the name- Returns:
- sqlCommand
-
getSqlOperationByTrigger
public int[] getSqlOperationByTrigger(java.lang.String action, java.lang.String when)Gets the SQL operation by trigger values.- Parameters:
action- the actionwhen- the when- Returns:
- int[]
-
getSqlAuthorizationList
public java.util.List<SqlCommand> getSqlAuthorizationList()
Gets the sql authorization list.- Returns:
- the sql authorization list
-
setSqlAuthorizationList
public void setSqlAuthorizationList(java.util.List<SqlCommand> sqlAuthorizationList)
Sets Authorization List.- Parameters:
sqlAuthorizationList- the new SQL authorization list
-
addSqlAuthorization
public void addSqlAuthorization(SqlCommand select)
Adds items to SqlAuthorization.- Parameters:
select- the select
-
sqlAuthorizationListSize
public int sqlAuthorizationListSize()
sqlAuthorization list length.- Returns:
- the int
-
getSqlAuthorization
public SqlCommand getSqlAuthorization(java.lang.String name)
Gets the SqlAuthorization based on the provided authorization value.- Parameters:
name- the name- Returns:
- the SqlAuthorization
-
getSqlAuthorization
public SqlCommand getSqlAuthorization(int i)
Gets the SqlAuthorization.- Parameters:
i- the i- Returns:
- the SqlAthorization
-
setAuthorization
public void setAuthorization(java.lang.String authorization) throws SilkExceptionSets the authorization- Parameters:
authorization- string- Throws:
SilkException- the exception
-
getInsertAuthorization
public java.lang.String getInsertAuthorization()
Gets insertAuthorization- Returns:
- the insertAthorization
-
setInsertAuthorization
public void setInsertAuthorization(java.lang.String authorization) throws SilkExceptionSets the insertAuthorization- Parameters:
authorization- string- Throws:
SilkException- the exception
-
getUpdateAuthorization
public java.lang.String getUpdateAuthorization()
Gets updateAuthorization- Returns:
- updateAuthorization
-
setUpdateAuthorization
public void setUpdateAuthorization(java.lang.String authorization) throws SilkExceptionSets the updateAuthorization- Parameters:
authorization- string- Throws:
SilkException- the exception
-
getDeleteAuthorization
public java.lang.String getDeleteAuthorization()
Gets deleteAuthorization- Returns:
- deleteAuthorization
-
setDeleteAuthorization
public void setDeleteAuthorization(java.lang.String authorization) throws SilkExceptionSets the deleteAuthorization- Parameters:
authorization- string- Throws:
SilkException- the exception
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-