Class ODFUtils


  • public class ODFUtils
    extends Object
    Utilities to assist in persistence to ODF spreadsheets.
    • Constructor Summary

      Constructors 
      Constructor Description
      ODFUtils()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static List getObjectsOfCandidateType​(org.datanucleus.ExecutionContext ec, org.datanucleus.store.connection.ManagedConnection mconn, Class candidateClass, boolean subclasses, boolean ignoreCache)
      Convenience method to get all objects of the candidate type (and optional subclasses) from the specified workbook connection.
      static org.odftoolkit.odfdom.doc.table.OdfTableRow getTableRowForObjectInSheet​(org.datanucleus.state.ObjectProvider op, org.odftoolkit.odfdom.doc.OdfSpreadsheetDocument spreadsheetDoc, boolean originalValue)
      Convenience method to find the row of an object in the provided sheet.
      static boolean isOfficeValueTypeConsistent​(org.odftoolkit.odfdom.doc.table.OdfTableCell cell, org.odftoolkit.odfdom.dom.attribute.office.OfficeValueTypeAttribute.Value type)  
    • Constructor Detail

      • ODFUtils

        public ODFUtils()
    • Method Detail

      • getTableRowForObjectInSheet

        public static org.odftoolkit.odfdom.doc.table.OdfTableRow getTableRowForObjectInSheet​(org.datanucleus.state.ObjectProvider op,
                                                                                              org.odftoolkit.odfdom.doc.OdfSpreadsheetDocument spreadsheetDoc,
                                                                                              boolean originalValue)
        Convenience method to find the row of an object in the provided sheet. For application-identity does a search for a row with the specified PK field values. For datastore-identity does a search for the row with the datastore column having the specified value
        Parameters:
        op - ObjectProvider for the object
        spreadsheetDoc - The spreadsheet document
        originalValue - Whether to use the original value (when available) when using non-durable id.
        Returns:
        The row (or null if not found)
      • getObjectsOfCandidateType

        public static List getObjectsOfCandidateType​(org.datanucleus.ExecutionContext ec,
                                                     org.datanucleus.store.connection.ManagedConnection mconn,
                                                     Class candidateClass,
                                                     boolean subclasses,
                                                     boolean ignoreCache)
        Convenience method to get all objects of the candidate type (and optional subclasses) from the specified workbook connection.
        Parameters:
        ec - execution context
        mconn - Managed Connection
        candidateClass - Candidate
        subclasses - Include subclasses?
        ignoreCache - Whether to ignore the cache
        Returns:
        List of objects of the candidate type
      • isOfficeValueTypeConsistent

        public static boolean isOfficeValueTypeConsistent​(org.odftoolkit.odfdom.doc.table.OdfTableCell cell,
                                                          org.odftoolkit.odfdom.dom.attribute.office.OfficeValueTypeAttribute.Value type)