/** * Recursive method to delete the given instance, base class last. */ protected void delete(OpenJPAStateManager sm, ClassMapping mapping, RowManager rowMgr, JDBCStore store, Collection customs) throws SQLException { Boolean custom = mapping.isCustomDelete(sm, store); if (!Boolean.FALSE.equals(custom)) mapping.customDelete(sm, store); if (Boolean.TRUE.equals(custom)) return; FieldMapping[] fields = mapping.getDefinedFieldMappings(); for (int i = 0; i < fields.length; i++) if (!bufferCustomDelete(fields[i], sm, store, customs)) fields[i].delete(sm, store, rowMgr); ClassMapping sup = mapping.getJoinablePCSuperclassMapping(); if (sup == null) { Version vers = mapping.getVersion(); if (!bufferCustomDelete(vers, sm, store, customs)) vers.delete(sm, store, rowMgr); Discriminator dsc = mapping.getDiscriminator(); if (!bufferCustomDelete(dsc, sm, store, customs)) dsc.delete(sm, store, rowMgr); } mapping.delete(sm, store, rowMgr); if (sup != null) delete(sm, sup, rowMgr, store, customs); }
/** * Recursive method to delete the given instance, base class last. */ protected void delete(OpenJPAStateManager sm, ClassMapping mapping, RowManager rowMgr, JDBCStore store, Collection customs) throws SQLException { Boolean custom = mapping.isCustomDelete(sm, store); if (!Boolean.FALSE.equals(custom)) mapping.customDelete(sm, store); if (Boolean.TRUE.equals(custom)) return; FieldMapping[] fields = mapping.getDefinedFieldMappings(); for (int i = 0; i < fields.length; i++) if (!bufferCustomDelete(fields[i], sm, store, customs)) fields[i].delete(sm, store, rowMgr); ClassMapping sup = mapping.getJoinablePCSuperclassMapping(); if (sup == null) { Version vers = mapping.getVersion(); if (!bufferCustomDelete(vers, sm, store, customs)) vers.delete(sm, store, rowMgr); Discriminator dsc = mapping.getDiscriminator(); if (!bufferCustomDelete(dsc, sm, store, customs)) dsc.delete(sm, store, rowMgr); } mapping.delete(sm, store, rowMgr); if (sup != null) delete(sm, sup, rowMgr, store, customs); }
/** * Recursive method to delete the given instance, base class last. */ protected void delete(OpenJPAStateManager sm, ClassMapping mapping, RowManager rowMgr, JDBCStore store, Collection customs) throws SQLException { Boolean custom = mapping.isCustomDelete(sm, store); if (!Boolean.FALSE.equals(custom)) mapping.customDelete(sm, store); if (Boolean.TRUE.equals(custom)) return; FieldMapping[] fields = mapping.getDefinedFieldMappings(); for (int i = 0; i < fields.length; i++) if (!bufferCustomDelete(fields[i], sm, store, customs)) fields[i].delete(sm, store, rowMgr); ClassMapping sup = mapping.getJoinablePCSuperclassMapping(); if (sup == null) { Version vers = mapping.getVersion(); if (!bufferCustomDelete(vers, sm, store, customs)) vers.delete(sm, store, rowMgr); Discriminator dsc = mapping.getDiscriminator(); if (!bufferCustomDelete(dsc, sm, store, customs)) dsc.delete(sm, store, rowMgr); } mapping.delete(sm, store, rowMgr); if (sup != null) delete(sm, sup, rowMgr, store, customs); }
/** * Recursive method to delete the given instance, base class last. */ protected void delete(OpenJPAStateManager sm, ClassMapping mapping, RowManager rowMgr, JDBCStore store, Collection customs) throws SQLException { Boolean custom = mapping.isCustomDelete(sm, store); if (!Boolean.FALSE.equals(custom)) mapping.customDelete(sm, store); if (Boolean.TRUE.equals(custom)) return; FieldMapping[] fields = mapping.getDefinedFieldMappings(); for (int i = 0; i < fields.length; i++) if (!bufferCustomDelete(fields[i], sm, store, customs)) fields[i].delete(sm, store, rowMgr); ClassMapping sup = mapping.getJoinablePCSuperclassMapping(); if (sup == null) { Version vers = mapping.getVersion(); if (!bufferCustomDelete(vers, sm, store, customs)) vers.delete(sm, store, rowMgr); Discriminator dsc = mapping.getDiscriminator(); if (!bufferCustomDelete(dsc, sm, store, customs)) dsc.delete(sm, store, rowMgr); } mapping.delete(sm, store, rowMgr); if (sup != null) delete(sm, sup, rowMgr, store, customs); }
/** * Recursive method to delete the given instance, base class last. */ protected void delete(OpenJPAStateManager sm, ClassMapping mapping, RowManager rowMgr, JDBCStore store, Collection customs) throws SQLException { Boolean custom = mapping.isCustomDelete(sm, store); if (!Boolean.FALSE.equals(custom)) mapping.customDelete(sm, store); if (Boolean.TRUE.equals(custom)) return; FieldMapping[] fields = mapping.getDefinedFieldMappings(); for (int i = 0; i < fields.length; i++) if (!bufferCustomDelete(fields[i], sm, store, customs)) fields[i].delete(sm, store, rowMgr); ClassMapping sup = mapping.getJoinablePCSuperclassMapping(); if (sup == null) { Version vers = mapping.getVersion(); if (!bufferCustomDelete(vers, sm, store, customs)) vers.delete(sm, store, rowMgr); Discriminator dsc = mapping.getDiscriminator(); if (!bufferCustomDelete(dsc, sm, store, customs)) dsc.delete(sm, store, rowMgr); } mapping.delete(sm, store, rowMgr); if (sup != null) delete(sm, sup, rowMgr, store, customs); }
} else if (sm.getPCState() == PCState.PNEWFLUSHEDDELETED || sm.getPCState() == PCState.PDELETED) { delete(sm, (ClassMapping) sm.getMetaData(), rowMgr, store, customs); } else if ((dirty = ImplHelper.getUpdateFields(sm)) != null) {
|| sm.getPCState() == PCState.PDELETED) { action = Row.ACTION_DELETE; delete(sm, (ClassMapping) sm.getMetaData(), rowMgr, store, customs); } else if ((dirty = ImplHelper.getUpdateFields(sm)) != null) {
|| sm.getPCState() == PCState.PDELETED) { action = Row.ACTION_DELETE; delete(sm, (ClassMapping) sm.getMetaData(), rowMgr, store, customs); } else if ((dirty = ImplHelper.getUpdateFields(sm)) != null) {
|| sm.getPCState() == PCState.PDELETED) { action = Row.ACTION_DELETE; delete(sm, (ClassMapping) sm.getMetaData(), rowMgr, store, customs); } else if ((dirty = ImplHelper.getUpdateFields(sm)) != null) {
|| sm.getPCState() == PCState.PDELETED) { action = Row.ACTION_DELETE; delete(sm, (ClassMapping) sm.getMetaData(), rowMgr, store, customs); } else if ((dirty = ImplHelper.getUpdateFields(sm)) != null) {