writer.writeBoolean(name, (Boolean) value);
writer.writeBoolean(name, (Boolean) value);
@Override public void writeTo(ProtoStreamWriter writer, Transaction transaction) throws IOException { writer.writeInt("id", transaction.getId()); writer.writeString("description", transaction.getDescription()); writer.writeString("longDescription", transaction.getLongDescription()); writer.writeString("notes", transaction.getNotes()); writer.writeInt("accountId", transaction.getAccountId()); writer.writeLong("date", transaction.getDate().getTime()); writer.writeDouble("amount", transaction.getAmount()); writer.writeBoolean("isDebit", transaction.isDebit()); writer.writeBoolean("isValid", transaction.isValid()); } }
public BooleanProtofieldAccessor(int tag, String name, boolean nullable, String columnName) { super( tag, name, nullable, columnName, (ProtoStreamWriter outProtobuf, Boolean value) -> outProtobuf.writeBoolean( name, value ), (ProtoStreamReader reader) -> reader.readBoolean( name ) ); }
@Override public void writeTo(ProtoStreamWriter writer, Address address) throws IOException { writer.writeString("street", address.getStreet()); writer.writeString("postCode", address.getPostCode()); writer.writeInt("number", address.getNumber()); writer.writeBoolean("isCommercial", address.isCommercial()); } }