equal
deleted
inserted
replaced
1 /* |
1 /* |
2 * Copyright (c) 2003, Oracle and/or its affiliates. All rights reserved. |
2 * Copyright (c) 2003, 2012, Oracle and/or its affiliates. All rights reserved. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 * |
4 * |
5 * This code is free software; you can redistribute it and/or modify it |
5 * This code is free software; you can redistribute it and/or modify it |
6 * under the terms of the GNU General Public License version 2 only, as |
6 * under the terms of the GNU General Public License version 2 only, as |
7 * published by the Free Software Foundation. Oracle designates this |
7 * published by the Free Software Foundation. Oracle designates this |
25 |
25 |
26 package com.sun.rowset.internal; |
26 package com.sun.rowset.internal; |
27 |
27 |
28 import java.sql.*; |
28 import java.sql.*; |
29 import java.io.*; |
29 import java.io.*; |
|
30 import java.util.Arrays; |
30 |
31 |
31 /** |
32 /** |
32 * The abstract base class from which the classes <code>Row</code> |
33 * The abstract base class from which the classes <code>Row</code> |
33 * The class <code>BaseRow</code> stores |
34 * The class <code>BaseRow</code> stores |
34 * a row's original values as an array of <code>Object</code> |
35 * a row's original values as an array of <code>Object</code> |
63 * |
64 * |
64 * @return an array of <code>Object</code> values containing this row's |
65 * @return an array of <code>Object</code> values containing this row's |
65 * original values |
66 * original values |
66 */ |
67 */ |
67 public Object[] getOrigRow() { |
68 public Object[] getOrigRow() { |
68 return origVals; |
69 Object[] origRow = this.origVals; |
|
70 return (origRow == null) ? null: Arrays.copyOf(origRow, origRow.length); |
69 } |
71 } |
70 |
72 |
71 /** |
73 /** |
72 * Retrieves the array element at the given index, which is |
74 * Retrieves the array element at the given index, which is |
73 * the original value of column number <i>idx</i> in this row. |
75 * the original value of column number <i>idx</i> in this row. |