writer.writeDouble(name, (Double) value);
writer.writeDouble(name, (Double) 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()); } }
@Override public void writeTo(ProtoStreamWriter writer, Account.Limits limits) throws IOException { writer.writeDouble("maxDailyLimit", limits.getMaxDailyLimit()); writer.writeDouble("maxTransactionLimit", limits.getMaxTransactionLimit()); writer.writeArray("payees", limits.getPayees(), String.class); } }
public DoubleProtofieldAccessor(int tag, String name, boolean nullable, String columnName) { super( tag, name, nullable, columnName, (ProtoStreamWriter outProtobuf, Double value) -> outProtobuf.writeDouble( name, value ), (ProtoStreamReader reader) -> reader.readDouble( name ) ); }