Class 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
    • 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​(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 interface LODUserDataIO
        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 Name
        ids - 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 interface LODUserDataIO
        Parameters:
        tableType - table type or feature layer name
        ids -
        userData -
      • closeStmt

        protected void closeStmt​(java.sql.Statement stmt)
        Close the statement. The enclosing result set is automatically closed.
        Parameters:
        stmt -
      • getNumberOfCategories

        public int getNumberOfCategories()
      • main

        public static void main​(java.lang.String[] args)
                         throws java.lang.Exception
        Throws:
        java.lang.Exception
      • getDataSource

        public oracle.spatial.network.ds.DbDataSource getDataSource()
        Specified by:
        getDataSource in interface LODUserDataIO
      • setDataSource

        public void setDataSource​(oracle.spatial.network.ds.IDataSource ds)
        Specified by:
        setDataSource in interface LODUserDataIO
      • closeConnection

        protected static void closeConnection​(oracle.spatial.network.ds.DbConnection conn)
      • closeConnection

        protected static void closeConnection​(java.sql.Connection conn)