Package com.oopsclick.silk.storage
Class ObjectStructure
- java.lang.Object
-
- com.oopsclick.silk.storage.ObjectStructure
-
public class ObjectStructure extends java.lang.Object
The 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 void
addColumn(ColumnProperty column)
Adds the column list.void
addSqlAuthorization(SqlCommand select)
Adds items to SqlAuthorization.void
addSqlOperationList(SqlCommand sqlCommand)
Adds the SQL operation list.void
addSqlSelectList(SqlCommand select)
Adds the sql select list.boolean
columnExist(java.lang.String name)
Column exists.java.lang.String
getColumnFunctionInsert(java.lang.String name)
Gets the column function insert.java.lang.String
getColumnFunctionUpdate(java.lang.String name)
Gets the column function update.java.lang.String
getColumnInsertAuthorization(java.lang.String name)
Gets the column insertAuthorization.java.util.List<ColumnProperty>
getColumnList()
Gets the column list.java.lang.String
getColumnNullValue(java.lang.String name)
Gets the column null value.int
getColumnSecure(java.lang.String name)
Gets the column secure.int
getColumnTranslation(java.lang.String name)
Gets the column translate.java.lang.Class<?>
getColumnType(java.lang.String name)
Gets the column type.java.lang.String
getColumnUpdateAuthorization(java.lang.String name)
Gets the column updateAuthorization.java.lang.String
getColumnValidation(java.lang.String name)
Gets the column validation.java.lang.String
getDeleteAuthorization()
Gets deleteAuthorizationjava.lang.String
getInsertAuthorization()
Gets insertAuthorizationjava.lang.Long
getLastModified()
Gets the last modified date in milliseconds.java.lang.String
getLevelTreeColumn()
Gets the level tree column.java.lang.String
getObjectPath()
Gets the object path.java.lang.String
getOrderColumn()
Gets the order column.java.lang.String
getParentTreeColumn()
Gets the parent tree column.java.lang.String
getPkColumn()
Gets the Primary Key column.int
getPkMode()
Gets the pk mode.SqlCommand
getPkSql()
Gets the PK SQL.java.lang.String
getQueryType()
Gets the Query Type.java.lang.String
getRemoteService()
Gets the remote service.java.lang.String
getRootTreeColumn()
Gets the root tree column.SqlCommand
getSelectByName(java.lang.String name)
Gets the select by name.SqlCommand
getSqlAuthorization(int i)
Gets the SqlAuthorization.SqlCommand
getSqlAuthorization(java.lang.String name)
Gets the SqlAuthorization based on the provided authorization value.java.util.List<SqlCommand>
getSqlAuthorizationList()
Gets the sql authorization list.SqlCommand
getSqlOperationAt(int index)
Gets the SQL operation at index position.SqlCommand
getSqlOperationByName(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.String
getTableName()
Gets the table name.java.lang.String
getUpdateAuthorization()
Gets updateAuthorizationvoid
setAuthorization(java.lang.String authorization)
Sets the authorizationvoid
setColumnList(java.util.List<ColumnProperty> columnList)
Column.void
setDeleteAuthorization(java.lang.String authorization)
Sets the deleteAuthorizationvoid
setInsertAuthorization(java.lang.String authorization)
Sets the insertAuthorizationvoid
setLastModified(java.lang.Long lastModified)
Sets the last modified date in millisecondsvoid
setLevelTreeColumn(java.lang.String levelTreeColumn)
Sets the level tree column.void
setObjectPath(java.lang.String objectPath)
Sets the object path.void
setOrderColumn(java.lang.String orderColumn)
Sets the order column.void
setParentTreeColumn(java.lang.String parentTreeColumn)
Sets the parent tree column.void
setPkColumn(java.lang.String pkColumn)
Sets the Primary Key column.void
setPkMode(java.lang.String pkMode)
Sets the pk mode.void
setPkSql(SqlCommand pkSql)
Sets the PK SQL.void
setQueryType(java.lang.String queryType)
Sets the Query Type.void
setRemoteService(java.lang.String remoteService)
Sets the remote service.void
setRootTreeColumn(java.lang.String rootTreeColumn)
Sets the root tree column.void
setSqlAuthorizationList(java.util.List<SqlCommand> sqlAuthorizationList)
Sets Authorization List.void
setSqlOperationList(SqlCommand sqlCommand)
Set the SQL operation list.void
setSqlOperationList(java.util.List<SqlCommand> sqlOperationList)
SQL Operations.void
setSqlSelectList(java.util.List<SqlCommand> sqlSelectList)
Selects.void
setTableName(java.lang.String tableName)
Sets the table name.void
setUpdateAuthorization(java.lang.String authorization)
Sets the updateAuthorizationint
sqlAuthorizationListSize()
sqlAuthorization list length.java.lang.String
toString()
int
totalSqlOperationListSize()
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 SilkException
Gets 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 SilkException
Gets 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 SilkException
Gets 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 SilkException
Gets 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 SilkException
Gets 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 SilkException
Gets 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 SilkException
Gets 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 SilkException
Sets 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 SilkException
Sets 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 SilkException
Sets 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 SilkException
Sets the deleteAuthorization- Parameters:
authorization
- string- Throws:
SilkException
- the exception
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-