Skip to content

Commit

Permalink
HBX-2390: Create a JBoss Tools adaptation layer in Hibernate Tools
Browse files Browse the repository at this point in the history
  - Add new test case 'org.hibernate.tool.orm.jbt.wrp.PropertyWrapperFactoryTest#testIsInsertable()'
  - Add new default interface method 'org.hibernate.tool.orm.jbt.wrp.PropertyWrapperFactory.PropertyWrapperFactory.PropertyWrapper#isInsertable()'

Signed-off-by: Koen Aers <[email protected]>
  • Loading branch information
koentsje committed Jul 2, 2023
1 parent 30924a3 commit 8b9fd28
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,10 @@ default boolean isNaturalIdentifier() {
default boolean isOptimisticLocked() {
return getWrappedObject().isOptimisticLocked();
}

default boolean isInsertable() {
return getWrappedObject().isInsertable();
}

}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,19 @@ public void testIsSelectable() {
assertFalse(propertyWrapper.isSelectable());
}

@Test
public void testIsInsertable() {
BasicValue v = new BasicValue(DummyMetadataBuildingContext.INSTANCE);
v.setTable(new Table(""));
Column c = new Column();
v.addColumn(c);
wrappedProperty.setValue(v);
wrappedProperty.setInsertable(true);
assertTrue(propertyWrapper.isInsertable());
wrappedProperty.setInsertable(false);
assertFalse(propertyWrapper.isInsertable());
}

@Test
public void testIsUpdateable() {
BasicValue v = new BasicValue(DummyMetadataBuildingContext.INSTANCE);
Expand Down

0 comments on commit 8b9fd28

Please sign in to comment.