'Generic field constructor
@param tablename: the table name
@param row: the s3_field Row
@return: the Field instance'

@staticmethod
def _generic_field(tablename, row):

    fieldname = row.name
    fieldtype = row.field_type
    if row.require_unique:
        from s3validators import IS_NOT_ONE_OF
        requires = IS_NOT_ONE_OF(current.db, ('%s.%s' % (tablename, fieldname)))
    else:
        requires = None
    if (fieldtype in ('string', 'text')):
        default = row.default_value
    else:
        default = None
    field = Field(fieldname, fieldtype, default=default, requires=requires)
    return field
