public DTCellValue52(final Boolean value) { setBooleanValue(value); this.dataType = DataType.DataTypes.BOOLEAN; }
public void onChange(ChangeEvent event) { final String txtValue = lb.getValue(lb.getSelectedIndex()); Boolean boolValue = (txtValue.equals("") ? null : txtValue.equals("true")); value.setBooleanValue(boolValue); } });
public void onChange(ChangeEvent event) { final String txtValue = lb.getValue(lb.getSelectedIndex()); Boolean boolValue = (txtValue.equals("") ? null : txtValue.equals("true")); value.setBooleanValue(boolValue); } });
private static void assertBooleanDefaultValue(final DTCellValue52 dcv) { if (dcv.getBooleanValue() == null) { dcv.setBooleanValue(Boolean.valueOf(dcv.getStringValue())); } }
private static void assertBooleanDefaultValue(final DTCellValue52 dcv) { if (dcv.getBooleanValue() == null) { dcv.setBooleanValue(Boolean.valueOf(dcv.getStringValue())); } }
public void onClick(ClickEvent event) { DTCellValue52 editedDefaultValue = defaultValue.cloneDefaultValueCell(); editedDefaultValue.setBooleanValue(cb.getValue()); defaultValueChangedEventHandler.onDefaultValueChanged(new DefaultValueChangedEvent(defaultValue, editedDefaultValue)); } });
public void onClick(ClickEvent event) { DTCellValue52 editedDefaultValue = defaultValue.cloneDefaultValueCell(); editedDefaultValue.setBooleanValue(cb.getValue()); defaultValueChangedEventHandler.onDefaultValueChanged(new DefaultValueChangedEvent(defaultValue, editedDefaultValue)); } });
private void set(final int row, final int col, final Boolean value) throws UpdateException { final ArrayList<Coordinate> coordinates = new ArrayList<>(); final Coordinate coordinate = new Coordinate(row, col); coordinates.add(coordinate); table52.getData() .get(row) .get(col) .setBooleanValue( value); updateManager.update(table52, coordinates); } }
private void set(final int row, final int col, final Boolean value) throws UpdateException { final ArrayList<Coordinate> coordinates = new ArrayList<>(); final Coordinate coordinate = new Coordinate(row, col); coordinates.add(coordinate); table52.getData() .get(row) .get(col) .setBooleanValue( value); updateManager.update(table52, coordinates); } }
@Test public void testFillNullActionWithNull() throws Exception, UpdateException { ArrayList<Coordinate> coordinates = new ArrayList<Coordinate>(); Coordinate coordinate = new Coordinate(1, 3); coordinates.add(coordinate); table52.getData() .get(1) .get(3) .setBooleanValue(null); updateManager.update(table52, coordinates); verify(analyzer, never()).update(anySet()); }
@Test public void testSetBooleanActionToNewBoolean() throws Exception, UpdateException { final ArrayList<Coordinate> coordinates = new ArrayList<Coordinate>(); final Coordinate coordinate = new Coordinate(0, 3); coordinates.add(coordinate); table52.getData() .get(0) .get(3) .setBooleanValue(false); updateManager.update(table52, coordinates); verify(analyzer).update(anySet()); }
protected void setValue(final int rowIndex, final int columnIndex, final Boolean value) { table52.getData() .get(rowIndex) .get(columnIndex) .setBooleanValue(value); try { updateManager.update(table52, getUpdates(rowIndex, columnIndex)); } catch (UpdateException e) { e.printStackTrace(); } }
@Test public void testFillNullActionWithNull() throws Exception, UpdateException { ArrayList<Coordinate> coordinates = new ArrayList<Coordinate>(); Coordinate coordinate = new Coordinate(1, 3); coordinates.add(coordinate); table52.getData() .get(1) .get(3) .setBooleanValue(null); updateManager.update(table52, coordinates); verify(analyzer, never()).update(anySet()); }
protected void setValue(final int rowIndex, final int columnIndex, final Boolean value) { table52.getData() .get(rowIndex) .get(columnIndex) .setBooleanValue(value); try { updateManager.update(table52, getUpdates(rowIndex, columnIndex)); } catch (UpdateException e) { e.printStackTrace(); } }
@Test public void testSetActionToNull() throws Exception, UpdateException { ArrayList<Coordinate> coordinates = new ArrayList<Coordinate>(); Coordinate coordinate = new Coordinate(0, 3); coordinates.add(coordinate); table52.getData() .get(0) .get(3) .setBooleanValue(null); updateManager.update(table52, coordinates); verify(analyzer).update(anySet()); }
@Test public void testFillNullAction() throws Exception, UpdateException { ArrayList<Coordinate> coordinates = new ArrayList<Coordinate>(); Coordinate coordinate = new Coordinate(1, 3); coordinates.add(coordinate); table52.getData() .get(1) .get(3) .setBooleanValue(false); updateManager.update(table52, coordinates); verify(analyzer).update(anySet()); }
@Test public void testSetActionToNull() throws Exception, UpdateException { ArrayList<Coordinate> coordinates = new ArrayList<Coordinate>(); Coordinate coordinate = new Coordinate(0, 3); coordinates.add(coordinate); table52.getData() .get(0) .get(3) .setBooleanValue(null); updateManager.update(table52, coordinates); verify(analyzer).update(anySet()); }
@Test public void testFillNullAction() throws Exception, UpdateException { ArrayList<Coordinate> coordinates = new ArrayList<Coordinate>(); Coordinate coordinate = new Coordinate(1, 3); coordinates.add(coordinate); table52.getData() .get(1) .get(3) .setBooleanValue(false); updateManager.update(table52, coordinates); verify(analyzer).update(anySet()); }
@Test public void testSetBooleanActionToNewBoolean() throws Exception, UpdateException { final ArrayList<Coordinate> coordinates = new ArrayList<Coordinate>(); final Coordinate coordinate = new Coordinate(0, 3); coordinates.add(coordinate); table52.getData() .get(0) .get(3) .setBooleanValue(false); updateManager.update(table52, coordinates); verify(analyzer).update(anySet()); }
@Test public void testGetBooleanValue() throws Exception { dcv.setBooleanValue(true); fieldDate.set(dcv, now); fieldNumeric.set(dcv, 1L); fieldString.set(dcv, "woot"); assertEquals(DataType.DataTypes.BOOLEAN, dcv.getDataType()); assertTrue(dcv.getBooleanValue()); assertNull(dcv.getDateValue()); assertNull(dcv.getNumericValue()); assertNull(dcv.getStringValue()); }