/** * Flush the primary key values. */ private void flushPrimaryKey(OpenJPAStateManager sm, ColumnIO io, boolean set) throws SQLException { ClassMapping mapping = (ClassMapping) sm.getMetaData(); while (mapping.getTable() != getTable()) mapping = mapping.getPCSuperclassMapping(); Column[] cols = mapping.getPrimaryKeyColumns(); flushJoinValues(sm, cols, cols, io, set); }
/** * Flush the primary key values. */ private void flushPrimaryKey(OpenJPAStateManager sm, ColumnIO io, boolean set) throws SQLException { ClassMapping mapping = (ClassMapping) sm.getMetaData(); while (mapping.getTable() != getTable()) mapping = mapping.getPCSuperclassMapping(); Column[] cols = mapping.getPrimaryKeyColumns(); Object oid = mapping.useIdClassFromParent() ? sm.getObjectId() : null; flushJoinValues(sm, oid, cols, cols, io, set); }
/** * Flush the primary key values. */ private void flushPrimaryKey(OpenJPAStateManager sm, ColumnIO io, boolean set) throws SQLException { ClassMapping mapping = (ClassMapping) sm.getMetaData(); while (mapping.getTable() != getTable()) mapping = mapping.getPCSuperclassMapping(); Column[] cols = mapping.getPrimaryKeyColumns(); Object oid = mapping.useIdClassFromParent() ? sm.getObjectId() : null; flushJoinValues(sm, oid, cols, cols, io, set); }
/** * Flush the primary key values. */ private void flushPrimaryKey(OpenJPAStateManager sm, ColumnIO io, boolean set) throws SQLException { ClassMapping mapping = (ClassMapping) sm.getMetaData(); while (mapping.getTable() != getTable()) mapping = mapping.getPCSuperclassMapping(); Column[] cols = mapping.getPrimaryKeyColumns(); Object oid = mapping.useIdClassFromParent() ? sm.getObjectId() : null; flushJoinValues(sm, oid, cols, cols, io, set); }
/** * Flush the primary key values. */ private void flushPrimaryKey(OpenJPAStateManager sm, ColumnIO io, boolean set) throws SQLException { ClassMapping mapping = (ClassMapping) sm.getMetaData(); while (mapping.getTable() != getTable()) mapping = mapping.getPCSuperclassMapping(); Column[] cols = mapping.getPrimaryKeyColumns(); Object oid = mapping.useIdClassFromParent() ? sm.getObjectId() : null; flushJoinValues(sm, oid, cols, cols, io, set); }
/** * Flush the foreign key values. */ private void flushForeignKey(ForeignKey fk, ColumnIO io, OpenJPAStateManager sm, boolean set) throws SQLException { flushJoinValues(sm, null, fk.getPrimaryKeyColumns(), fk.getColumns(), io, set); if (sm != null) { Column[] cols = fk.getConstantColumns(); int len = fk.getColumns().length; Object obj; int type; for (int i = 0; i < cols.length; i++) { obj = fk.getConstant(cols[i]); type = cols[i].getJavaType(); if (set && canSet(io, i + len, obj == null)) setObject(cols[i], obj, type, false); else if (!set) whereObject(cols[i], obj, type); } } }
/** * Flush the foreign key values. */ private void flushForeignKey(ForeignKey fk, ColumnIO io, OpenJPAStateManager sm, boolean set) throws SQLException { flushJoinValues(sm, null, fk.getPrimaryKeyColumns(), fk.getColumns(), io, set); if (sm != null) { Column[] cols = fk.getConstantColumns(); int len = fk.getColumns().length; Object obj; int type; for (int i = 0; i < cols.length; i++) { obj = fk.getConstant(cols[i]); type = cols[i].getJavaType(); if (set && canSet(io, i + len, obj == null)) setObject(cols[i], obj, type, false); else if (!set) whereObject(cols[i], obj, type); } } }
/** * Flush the foreign key values. */ private void flushForeignKey(ForeignKey fk, ColumnIO io, OpenJPAStateManager sm, boolean set) throws SQLException { flushJoinValues(sm, fk.getPrimaryKeyColumns(), fk.getColumns(), io, set); if (sm != null) { Column[] cols = fk.getConstantColumns(); int len = fk.getColumns().length; Object obj; int type; for (int i = 0; i < cols.length; i++) { obj = fk.getConstant(cols[i]); type = cols[i].getJavaType(); if (set && canSet(io, i + len, obj == null)) setObject(cols[i], obj, type, false); else if (!set) whereObject(cols[i], obj, type); } } }
/** * Flush the foreign key values. */ private void flushForeignKey(ForeignKey fk, ColumnIO io, OpenJPAStateManager sm, boolean set) throws SQLException { flushJoinValues(sm, null, fk.getPrimaryKeyColumns(), fk.getColumns(), io, set); if (sm != null) { Column[] cols = fk.getConstantColumns(); int len = fk.getColumns().length; Object obj; int type; for (int i = 0; i < cols.length; i++) { obj = fk.getConstant(cols[i]); type = cols[i].getJavaType(); if (set && canSet(io, i + len, obj == null)) setObject(cols[i], obj, type, false); else if (!set) whereObject(cols[i], obj, type); } } }
/** * Flush the foreign key values. */ private void flushForeignKey(ForeignKey fk, ColumnIO io, OpenJPAStateManager sm, boolean set) throws SQLException { flushJoinValues(sm, null, fk.getPrimaryKeyColumns(), fk.getColumns(), io, set); if (sm != null) { Column[] cols = fk.getConstantColumns(); int len = fk.getColumns().length; Object obj; int type; for (int i = 0; i < cols.length; i++) { obj = fk.getConstant(cols[i]); type = cols[i].getJavaType(); if (set && canSet(io, i + len, obj == null)) setObject(cols[i], obj, type, false); else if (!set) whereObject(cols[i], obj, type); } } }