Release 3.0.0-RC1 - Improved method signature of Record.changed()

methods. Inversed arguments to make method feel more natural
This commit is contained in:
Lukas Eder 2013-02-16 16:09:24 +01:00
parent 2e226ae88e
commit 0455203f49
4 changed files with 14 additions and 14 deletions

View File

@ -1185,8 +1185,8 @@ public class OracleTest extends jOOQAbstractTest<
record.setD(later);
o.setD(later);
t.set(later, later, later);
record.changed(true, DATE_AS_TIMESTAMP_T_976.DATE_AS_TIMESTAMP_O);
record.changed(true, DATE_AS_TIMESTAMP_T_976.DATE_AS_TIMESTAMP_T);
record.changed(DATE_AS_TIMESTAMP_T_976.DATE_AS_TIMESTAMP_O, true);
record.changed(DATE_AS_TIMESTAMP_T_976.DATE_AS_TIMESTAMP_T, true);
record.store();
assertEquals(record, create().fetchOne(DATE_AS_TIMESTAMP_T_976, DATE_AS_TIMESTAMP_T_976.DATE_AS_TIMESTAMP_ID.equal(2)));

View File

@ -139,7 +139,7 @@ extends BaseTest<A, AP, B, S, B2S, BS, L, X, DATE, BOOL, D, T, U, UU, I, IPK, T7
assertEquals("abc", book.original(TBook_TITLE()));
book.changed(false);
book.changed(true, TBook_TITLE());
book.changed(TBook_TITLE(), true);
assertTrue(book.changed());
assertTrue(book.changed(TBook_TITLE()));
assertTrue(book.changed(TBook_TITLE().getName()));

View File

@ -533,9 +533,9 @@ public interface Record extends Attachable, Comparable<Record> {
* values as well
*
* @see #changed()
* @see #changed(boolean, Field)
* @see #changed(boolean, int)
* @see #changed(boolean, String)
* @see #changed(Field, boolean)
* @see #changed(int, boolean)
* @see #changed(String, boolean)
*/
void changed(boolean changed);
@ -550,7 +550,7 @@ public interface Record extends Attachable, Comparable<Record> {
* @see #changed()
* @see #changed(Field)
*/
void changed(boolean changed, Field<?> field);
void changed(Field<?> field, boolean changed);
/**
* Set this record's internal changed flag to the supplied value for a given
@ -563,7 +563,7 @@ public interface Record extends Attachable, Comparable<Record> {
* @see #changed()
* @see #changed(int)
*/
void changed(boolean changed, int fieldIndex);
void changed(int fieldIndex, boolean changed);
/**
* Set this record's internal changed flag to the supplied value for a given
@ -576,7 +576,7 @@ public interface Record extends Attachable, Comparable<Record> {
* @see #changed()
* @see #changed(String)
*/
void changed(boolean changed, String fieldName);
void changed(String fieldName, boolean changed);
/**
* Reset all values to their {@link #original()} values and all

View File

@ -383,18 +383,18 @@ abstract class AbstractRecord extends AbstractStore implements Record {
}
@Override
public final void changed(boolean changed, Field<?> field) {
changed(changed, fieldsRow().indexOf(field));
public final void changed(Field<?> field, boolean changed) {
changed(fieldsRow().indexOf(field), changed);
}
@Override
public final void changed(boolean changed, int fieldIndex) {
public final void changed(int fieldIndex, boolean changed) {
getValue0(fieldIndex).setChanged(changed);
}
@Override
public final void changed(boolean changed, String fieldName) {
changed(changed, fieldsRow().indexOf(fieldName));
public final void changed(String fieldName, boolean changed) {
changed(fieldsRow().indexOf(fieldName), changed);
}
@Override