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 int
BATCH_SIZE
protected static int
FEATURE_TABLE_TYPE
protected static int
LINK_TABLE_TYPE
protected static int
NODE_TABLE_TYPE
protected static int
PATH_TABLE_TYPE
protected static int
SUBPATH_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 void
closeConnection(java.sql.Connection conn)
protected static void
closeConnection(oracle.spatial.network.ds.DbConnection conn)
protected void
closeStmt(java.sql.Statement stmt)
Close the statement.int
getCategoryId()
oracle.spatial.network.ds.DbDataSource
getDataSource()
static int
getIntTableType(java.lang.String tableType)
NetworkMetadata
getNetworkMetadata()
int
getNumberOfCategories()
void
init(java.sql.Connection conn, NetworkMetadata metadata, int categoryId)
void
init(oracle.spatial.network.ds.DbDataSource dataSource, NetworkMetadata metadata, int categoryId)
void
init(NetworkMetadata metadata, int categoryId)
void
init(org.w3c.dom.Element parameter)
static void
main(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)
void
readUserData(LogicalPartition partition)
void
setCategoryId(int categoryId)
void
setDataSource(oracle.spatial.network.ds.IDataSource ds)
void
setNetworkMetadata(NetworkMetadata metadata)
boolean
shareNetworkDataSource()
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.void
writeUserData(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:LODUserDataIO
Reads user defined data from the database.- Specified by:
readUserData
in 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:
writeUserData
in 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:
readUserData
in interfaceLODUserDataIO
-
writeUserData
public void writeUserData(LogicalPartition partition)
- Specified by:
writeUserData
in 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:
shareNetworkDataSource
in interfaceLODUserDataIO
-
getDataSource
public oracle.spatial.network.ds.DbDataSource getDataSource()
- Specified by:
getDataSource
in interfaceLODUserDataIO
-
setDataSource
public void setDataSource(oracle.spatial.network.ds.IDataSource ds)
- Specified by:
setDataSource
in 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:
getNetworkMetadata
in interfaceLODUserDataIO
-
setNetworkMetadata
public void setNetworkMetadata(NetworkMetadata metadata)
- Specified by:
setNetworkMetadata
in interfaceLODUserDataIO
-
getCategoryId
public int getCategoryId()
- Specified by:
getCategoryId
in interfaceLODUserDataIO
-
setCategoryId
public void setCategoryId(int categoryId)
- Specified by:
setCategoryId
in interfaceLODUserDataIO
-
-