public bool IsModified(EntityField field)
 {
     return IsModified(field.Ordinal);
 }
 public void SetValue(EntityField field, Object value, SetReason reason)
 {
     int ordinal = field.Ordinal;
     SetValue(ordinal, value, reason);
 }
 public bool IsLoaded(EntityField field)
 {
     return IsLoaded(field.Ordinal);
 }
 public bool GetBooleanValue(EntityField field)
 {
     Object value = GetValue(field);
     if (value == null)
         return false;
     else if (value is int)
     {
         int asInt = (int)value;
         if (asInt == 0)
             return false;
         else
             return true;
     }
     else
         throw new Exception(string.Format("Cannot handle '{0}'.", value.GetType()));
 }
 public int GetInt32Value(EntityField field)
 {
     Object value = GetValue(field);
     if (value == null)
         return 0;
     else if (value is Int32)
         return (int)value;
     else
         throw new Exception(string.Format("Cannot handle '%s'.", value.GetType()));
 }
 public String GetStringValue(EntityField field)
 {
     Object value = GetValue(field);
     if (value != null)
         return value.ToString();
     else
         return null;
 }
 public Object GetValue(EntityField field)
 {
     return GetValue(field.Ordinal);
 }
 internal SqlConstraint(EntityField field, object value)
 {
     this.Field = field;
     this.Value = value;
 }