Package oracle.spatial.network.lod
Class LODUserDataIOSDO
- java.lang.Object
-
- oracle.spatial.network.lod.LODUserDataIOSDO
-
- All Implemented Interfaces:
LODUserDataIO
public class LODUserDataIOSDO extends java.lang.Object implements LODUserDataIO
This implementation of LODUserDataIO reads all the user defined data from the node, link and path tables.- Since:
- 11gR1
-
-
Field Summary
Fields Modifier and Type Field Description protected static intBATCH_SIZEprotected static intFEATURE_TABLE_TYPEprotected static intLINK_TABLE_TYPEprotected static intNODE_TABLE_TYPEprotected static intPATH_TABLE_TYPEprotected static intSUBPATH_TABLE_TYPE
-
Constructor Summary
Constructors Constructor Description LODUserDataIOSDO()LODUserDataIOSDO(java.sql.Connection conn, NetworkMetadata metadata, int categoryId)LODUserDataIOSDO(oracle.spatial.network.ds.DbDataSource dataSource, NetworkMetadata metadata, int categoryId)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected static voidcloseConnection(java.sql.Connection conn)protected static voidcloseConnection(oracle.spatial.network.ds.DbConnection conn)protected voidcloseStmt(java.sql.Statement stmt)Close the statement.intgetCategoryId()oracle.spatial.network.ds.DbDataSourcegetDataSource()static intgetIntTableType(java.lang.String tableType)NetworkMetadatagetNetworkMetadata()intgetNumberOfCategories()voidinit(java.sql.Connection conn, NetworkMetadata metadata, int categoryId)voidinit(oracle.spatial.network.ds.DbDataSource dataSource, NetworkMetadata metadata, int categoryId)voidinit(NetworkMetadata metadata, int categoryId)voidinit(org.w3c.dom.Element parameter)static voidmain(java.lang.String[] args)UserData[]readUserData(java.lang.String tableType, long[] ids)Reads user defined data from the database.UserData[]readUserData(java.lang.String tableType, long[] ids, boolean allRecords)voidreadUserData(LogicalPartition partition)voidsetCategoryId(int categoryId)voidsetDataSource(oracle.spatial.network.ds.IDataSource ds)voidsetNetworkMetadata(NetworkMetadata metadata)booleanshareNetworkDataSource()voidwriteUserData(java.lang.String tableType, long[] ids, UserData[] userData)Since the user data are stored in the node/link/path tables, you can only update the entry in the table.voidwriteUserData(LogicalPartition partition)
-
-
-
Field Detail
-
NODE_TABLE_TYPE
protected static final int NODE_TABLE_TYPE
- See Also:
- Constant Field Values
-
LINK_TABLE_TYPE
protected static final int LINK_TABLE_TYPE
- See Also:
- Constant Field Values
-
PATH_TABLE_TYPE
protected static final int PATH_TABLE_TYPE
- See Also:
- Constant Field Values
-
SUBPATH_TABLE_TYPE
protected static final int SUBPATH_TABLE_TYPE
- See Also:
- Constant Field Values
-
FEATURE_TABLE_TYPE
protected static final int FEATURE_TABLE_TYPE
- See Also:
- Constant Field Values
-
BATCH_SIZE
protected static final int BATCH_SIZE
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
LODUserDataIOSDO
public LODUserDataIOSDO()
-
LODUserDataIOSDO
public LODUserDataIOSDO(oracle.spatial.network.ds.DbDataSource dataSource, NetworkMetadata metadata, int categoryId)
-
LODUserDataIOSDO
public LODUserDataIOSDO(java.sql.Connection conn, NetworkMetadata metadata, int categoryId)
-
-
Method Detail
-
init
public void init(oracle.spatial.network.ds.DbDataSource dataSource, NetworkMetadata metadata, int categoryId)
-
init
public void init(java.sql.Connection conn, NetworkMetadata metadata, int categoryId)
-
init
public void init(NetworkMetadata metadata, int categoryId)
-
init
public void init(org.w3c.dom.Element parameter)
-
getIntTableType
public static int getIntTableType(java.lang.String tableType)
-
readUserData
public UserData[] readUserData(java.lang.String tableType, long[] ids)
Description copied from interface:LODUserDataIOReads user defined data from the database.- Specified by:
readUserDatain interfaceLODUserDataIO- Parameters:
tableType- user data type, which can take the following values:
- UserDataMetadata.NODE_TABLE_TYPE
- UserDataMetadata.LINK_TABLE_TYPE
- UserDataMetadata.PATH_TABLE_TYPE
- Feature Layer Nameids- the IDs of the objects for which the user data are read- Returns:
- array of user data maps, each corresponding to an ID of the same index in the ID array.
-
readUserData
public UserData[] readUserData(java.lang.String tableType, long[] ids, boolean allRecords)
-
writeUserData
public void writeUserData(java.lang.String tableType, long[] ids, UserData[] userData)Since the user data are stored in the node/link/path tables, you can only update the entry in the table. The ids must already exist in the tables. Caller cannot update a subset of the userdata columns. All user data columns must be set, otherwise null value will be assigned for the unspecified column.- Specified by:
writeUserDatain interfaceLODUserDataIO- Parameters:
tableType- table type or feature layer nameids-userData-
-
closeStmt
protected void closeStmt(java.sql.Statement stmt)
Close the statement. The enclosing result set is automatically closed.- Parameters:
stmt-
-
readUserData
public void readUserData(LogicalPartition partition)
- Specified by:
readUserDatain interfaceLODUserDataIO
-
writeUserData
public void writeUserData(LogicalPartition partition)
- Specified by:
writeUserDatain interfaceLODUserDataIO
-
getNumberOfCategories
public int getNumberOfCategories()
-
main
public static void main(java.lang.String[] args) throws java.lang.Exception- Throws:
java.lang.Exception
-
shareNetworkDataSource
public boolean shareNetworkDataSource()
- Specified by:
shareNetworkDataSourcein interfaceLODUserDataIO
-
getDataSource
public oracle.spatial.network.ds.DbDataSource getDataSource()
- Specified by:
getDataSourcein interfaceLODUserDataIO
-
setDataSource
public void setDataSource(oracle.spatial.network.ds.IDataSource ds)
- Specified by:
setDataSourcein interfaceLODUserDataIO
-
closeConnection
protected static void closeConnection(oracle.spatial.network.ds.DbConnection conn)
-
closeConnection
protected static void closeConnection(java.sql.Connection conn)
-
getNetworkMetadata
public NetworkMetadata getNetworkMetadata()
- Specified by:
getNetworkMetadatain interfaceLODUserDataIO
-
setNetworkMetadata
public void setNetworkMetadata(NetworkMetadata metadata)
- Specified by:
setNetworkMetadatain interfaceLODUserDataIO
-
getCategoryId
public int getCategoryId()
- Specified by:
getCategoryIdin interfaceLODUserDataIO
-
setCategoryId
public void setCategoryId(int categoryId)
- Specified by:
setCategoryIdin interfaceLODUserDataIO
-
-