Package org.datanucleus.store.odf
Class ODFUtils
- java.lang.Object
-
- org.datanucleus.store.odf.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)
-
-
-
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 objectspreadsheetDoc
- The spreadsheet documentoriginalValue
- 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 contextmconn
- Managed ConnectioncandidateClass
- Candidatesubclasses
- 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)
-
-