/// <summary> /// Gets the value of one of this object's properties. /// </summary> public virtual object GetValue(Gravitybox.Datastore.EFDAL.Entity.RepositoryActionType.FieldNameConstants field, object defaultValue) { if (field == Gravitybox.Datastore.EFDAL.Entity.RepositoryActionType.FieldNameConstants.Name) { return(this.Name); } if (field == Gravitybox.Datastore.EFDAL.Entity.RepositoryActionType.FieldNameConstants.RepositoryActionTypeId) { return(this.RepositoryActionTypeId); } throw new Exception("Field '" + field.ToString() + "' not found!"); }
/// <summary> /// Gets the maximum size of the field value. /// </summary> public static int GetMaxLength(Gravitybox.Datastore.EFDAL.Entity.RepositoryActionType.FieldNameConstants field) { switch (field) { case Gravitybox.Datastore.EFDAL.Entity.RepositoryActionType.FieldNameConstants.Name: return(50); case Gravitybox.Datastore.EFDAL.Entity.RepositoryActionType.FieldNameConstants.RepositoryActionTypeId: return(0); } return(0); }
/// <summary> /// Gets the system type of a field on this object /// </summary> public static System.Type GetFieldType(Gravitybox.Datastore.EFDAL.Entity.RepositoryActionType.FieldNameConstants field) { if (field.GetType() != typeof(Gravitybox.Datastore.EFDAL.Entity.RepositoryActionType.FieldNameConstants)) { throw new Exception("The field parameter must be of type 'Gravitybox.Datastore.EFDAL.Entity.RepositoryActionType.FieldNameConstants'."); } switch ((Gravitybox.Datastore.EFDAL.Entity.RepositoryActionType.FieldNameConstants)field) { case Gravitybox.Datastore.EFDAL.Entity.RepositoryActionType.FieldNameConstants.Name: return(typeof(string)); case Gravitybox.Datastore.EFDAL.Entity.RepositoryActionType.FieldNameConstants.RepositoryActionTypeId: return(typeof(int)); } return(null); }
/// <summary> /// Returns the actual database name of the specified field. /// </summary> internal static string GetDatabaseFieldName(Gravitybox.Datastore.EFDAL.Entity.RepositoryActionType.FieldNameConstants field) { return(GetDatabaseFieldName(field.ToString())); }
/// <summary> /// Gets the value of one of this object's properties. /// </summary> public virtual object GetValue(Gravitybox.Datastore.EFDAL.Entity.RepositoryActionType.FieldNameConstants field) { return(GetValue(field, null)); }