Class OracleClobColumnMapping

    • Method Detail

      • getString

        public String getString​(ResultSet rs,
                                int param)
        Description copied from interface: ColumnMapping
        Obtains a value from resultSet at position specified by exprIndex.
        Specified by:
        getString in interface ColumnMapping
        Overrides:
        getString in class ClobColumnMapping
        Parameters:
        rs - ResultSet
        param - the position of the value in the result
        Returns:
        the value
      • getObject

        public Object getObject​(ResultSet rs,
                                int param)
        Description copied from interface: ColumnMapping
        Obtains a value from resultSet at position specified by exprIndex.
        Specified by:
        getObject in interface ColumnMapping
        Overrides:
        getObject in class ClobColumnMapping
        Parameters:
        rs - ResultSet
        param - the position of the value in the result
        Returns:
        the value
      • insertPostProcessing

        public void insertPostProcessing​(org.datanucleus.state.ObjectProvider op,
                                         Object value)
        Description copied from interface: ColumnMappingPostInsert
        Perform any INSERT post processing on this column, using the provided value.
        Specified by:
        insertPostProcessing in interface ColumnMappingPostInsert
        Parameters:
        op - ObjectProvider for object being inserted
        value - The value to use on the insert
      • updatePostProcessing

        public void updatePostProcessing​(org.datanucleus.state.ObjectProvider op,
                                         Object value)
        Description copied from interface: ColumnMappingPostUpdate
        Perform any UPDATE post processing on this column, using the provided value.
        Specified by:
        updatePostProcessing in interface ColumnMappingPostUpdate
        Parameters:
        op - ObjectProvider for object being updated
        value - The value to use on the UPDATE
      • updateClobColumn

        public static void updateClobColumn​(org.datanucleus.state.ObjectProvider op,
                                            Table table,
                                            ColumnMapping mapping,
                                            String value)
        Convenience method to update the contents of a CLOB column. Oracle requires that a CLOB is initialised with EMPTY_CLOB() and then you retrieve the column and update its CLOB value. Performs a statement
         SELECT {clobColumn} FROM TABLE WHERE ID=? FOR UPDATE
         
        and then updates the Clob value returned.
        Parameters:
        op - ObjectProvider of the object
        table - Table storing the CLOB column
        mapping - Datastore mapping for the CLOB column
        value - The value to store in the CLOB
        Throws:
        org.datanucleus.exceptions.NucleusObjectNotFoundException - Thrown if an object is not found
        org.datanucleus.exceptions.NucleusDataStoreException - Thrown if an error occurs in datastore communication