/// <summary>
 /// Assigns a value to a field on this object.
 /// </summary>
 /// <param name="field">The field to set</param>
 /// <param name="newValue">The new value to assign to the field</param>
 /// <param name="fixLength">Determines if the length should be truncated if too long. When false, an error will be raised if data is too large to be assigned to the field.</param>
 public virtual void SetValue(Gravitybox.Datastore.EFDAL.Entity.LockValue.FieldNameConstants field, object newValue, bool fixLength)
 {
     if (field == Gravitybox.Datastore.EFDAL.Entity.LockValue.FieldNameConstants.Intention)
     {
         this.Intention = GlobalValues.SetValueHelperBoolNotNullableInternal(newValue, "Field 'Intention' does not allow null values!");
     }
     else if (field == Gravitybox.Datastore.EFDAL.Entity.LockValue.FieldNameConstants.IsRead)
     {
         this.IsRead = GlobalValues.SetValueHelperBoolNotNullableInternal(newValue, "Field 'IsRead' does not allow null values!");
     }
     else if (field == Gravitybox.Datastore.EFDAL.Entity.LockValue.FieldNameConstants.LockId)
     {
         throw new Exception("Field '" + field.ToString() + "' is a primary key and cannot be set!");
     }
     else if (field == Gravitybox.Datastore.EFDAL.Entity.LockValue.FieldNameConstants.LockTime)
     {
         this.LockTime = GlobalValues.SetValueHelperDateTimeNotNullableInternal(newValue, "Field 'LockTime' does not allow null values!");
     }
     else if (field == Gravitybox.Datastore.EFDAL.Entity.LockValue.FieldNameConstants.MachineId)
     {
         this.MachineId = GlobalValues.SetValueHelperIntNotNullableInternal(newValue, "Field 'MachineId' does not allow null values!");
     }
     else if (field == Gravitybox.Datastore.EFDAL.Entity.LockValue.FieldNameConstants.RepositoryId)
     {
         this.RepositoryId = GlobalValues.SetValueHelperIntNotNullableInternal(newValue, "Field 'RepositoryId' does not allow null values!");
     }
     else
     {
         throw new Exception("Field '" + field.ToString() + "' not found!");
     }
 }
 /// <summary>
 /// Gets the value of one of this object's properties.
 /// </summary>
 public virtual object GetValue(Gravitybox.Datastore.EFDAL.Entity.LockValue.FieldNameConstants field, object defaultValue)
 {
     if (field == Gravitybox.Datastore.EFDAL.Entity.LockValue.FieldNameConstants.Intention)
     {
         return(this.Intention);
     }
     if (field == Gravitybox.Datastore.EFDAL.Entity.LockValue.FieldNameConstants.IsRead)
     {
         return(this.IsRead);
     }
     if (field == Gravitybox.Datastore.EFDAL.Entity.LockValue.FieldNameConstants.LockId)
     {
         return(this.LockId);
     }
     if (field == Gravitybox.Datastore.EFDAL.Entity.LockValue.FieldNameConstants.LockTime)
     {
         return(this.LockTime);
     }
     if (field == Gravitybox.Datastore.EFDAL.Entity.LockValue.FieldNameConstants.MachineId)
     {
         return(this.MachineId);
     }
     if (field == Gravitybox.Datastore.EFDAL.Entity.LockValue.FieldNameConstants.RepositoryId)
     {
         return(this.RepositoryId);
     }
     throw new Exception("Field '" + field.ToString() + "' not found!");
 }
 /// <summary>
 /// Returns the actual database name of the specified field.
 /// </summary>
 internal static string GetDatabaseFieldName(Gravitybox.Datastore.EFDAL.Entity.LockValue.FieldNameConstants field)
 {
     return(GetDatabaseFieldName(field.ToString()));
 }