There is a type in NHibernate that does something similar to this called NHibernate.Type.YesNoType that maps a boolean value to a Y/N in the database. You could use this class (from the source) as a template to build your own. It looks like you just have to override a few properties on the CharBooleanType to accomplish what you need. This code might even work (I just modified YesNoType).
Code:
[Serializable]
public class YourNewABBooleanType: CharBooleanType
{
/// <summary></summary>
public YourNewABBooleanType() : base( new AnsiStringFixedLengthSqlType( 1 ) )
{
}
/// <summary></summary>
protected override sealed string TrueString
{
get { return "A"; }
}
/// <summary></summary>
protected override sealed string FalseString
{
get { return "B"; }
}
/// <summary></summary>
public override string Name
{
get { return "YourNewABBoolean"; }
}
}
Once you have your class built, just reference it from the mapping file.
Code:
<property name="Status" type="YourNamespace.YourNewABBooleanType, YourAssembly">
<column name="PRD_STATUS" length="1" sql-type="varchar" not-null="true" />
</property>
Good luck,
-jason