package com.airlock.iam.base.infrastructure.db;

public final class DbBooleanConverter {
   public static final byte TRUE = 1;
   public static final byte FALSE = 0;

   private DbBooleanConverter() {
      throw new AssertionError();
   }

   public static byte booleanToByte(boolean bool) {
      return (byte)(bool ? 1 : 0);
   }

   public static boolean byteToBoolean(byte b) {
      return b == 1;
   }
}
