Class: SObjectModel::Schema::Field
- Inherits:
-
Object
- Object
- SObjectModel::Schema::Field
- Defined in:
- lib/sobject_model/schema.rb
Constant Summary collapse
- PicklistValue =
Data.define(:active, :default_value, :label, :valid_for, :value)
Instance Method Summary collapse
- #aggregatable? ⇒ Boolean
- #ai_prediction_field? ⇒ Boolean
- #autoNumber? ⇒ Boolean
- #byteLength ⇒ Object
- #calculated? ⇒ Boolean
- #calculated_formula ⇒ Object
- #cascade_delete? ⇒ Boolean
- #case_sensitive ⇒ Object
- #compound_field_name ⇒ Object
- #controller_name ⇒ Object
- #createable? ⇒ Boolean
- #custom? ⇒ Boolean
- #default_value ⇒ Object
- #default_value_formula ⇒ Object
- #defaulted_on_create? ⇒ Boolean
- #dependent_picklist? ⇒ Boolean
- #deprecated_and_hidden? ⇒ Boolean
- #digits ⇒ Object
- #display_location_in_decimal? ⇒ Boolean
- #encrypted? ⇒ Boolean
- #external_id? ⇒ Boolean
- #extra_type_info ⇒ Object
- #filterable? ⇒ Boolean
- #filtered_lookup_info ⇒ Object
- #formula_treat_null_number_as_zero? ⇒ Boolean
- #groupable? ⇒ Boolean
- #high_scale_number? ⇒ Boolean
- #html_formatted? ⇒ Boolean
- #id_lookup? ⇒ Boolean
-
#initialize(field) ⇒ Field
constructor
A new instance of Field.
- #inline_help_text ⇒ Object
- #label ⇒ Object
- #length ⇒ Object
- #mask ⇒ Object
- #mask_type ⇒ Object
- #name ⇒ Object
- #name_field? ⇒ Boolean
- #name_pointing? ⇒ Boolean
- #nillable? ⇒ Boolean
- #permissionable? ⇒ Boolean
- #picklist_values ⇒ Object
- #polymorphic_foreign_key? ⇒ Boolean
- #precision ⇒ Object
- #query_by_distance? ⇒ Boolean
- #reference_target_field ⇒ Object
- #reference_to ⇒ Object
- #relationship_name ⇒ Object
- #relationship_order ⇒ Object
- #restricted_delete ⇒ Object
- #restricted_picklist? ⇒ Boolean
- #scale ⇒ Object
- #search_prefilterable? ⇒ Boolean
- #soapType ⇒ Object
- #sortable? ⇒ Boolean
- #to_h ⇒ Object
- #type ⇒ Object
- #unique? ⇒ Boolean
- #updateable? ⇒ Boolean
- #write_Requires_Master_Read? ⇒ Boolean
Constructor Details
#initialize(field) ⇒ Field
Returns a new instance of Field.
300 301 302 |
# File 'lib/sobject_model/schema.rb', line 300 def initialize(field) @field = field end |
Instance Method Details
#aggregatable? ⇒ Boolean
304 305 306 |
# File 'lib/sobject_model/schema.rb', line 304 def aggregatable? field["aggregatable"] end |
#ai_prediction_field? ⇒ Boolean
308 309 310 |
# File 'lib/sobject_model/schema.rb', line 308 def ai_prediction_field? field["aiPredictionField"] end |
#autoNumber? ⇒ Boolean
312 313 314 |
# File 'lib/sobject_model/schema.rb', line 312 def autoNumber? field["autoNumber"] end |
#byteLength ⇒ Object
316 317 318 |
# File 'lib/sobject_model/schema.rb', line 316 def byteLength field["byteLength"] end |
#calculated? ⇒ Boolean
320 321 322 |
# File 'lib/sobject_model/schema.rb', line 320 def calculated? field["calculated"] end |
#calculated_formula ⇒ Object
324 325 326 |
# File 'lib/sobject_model/schema.rb', line 324 def calculated_formula field["calculatedFormula"] end |
#cascade_delete? ⇒ Boolean
328 329 330 |
# File 'lib/sobject_model/schema.rb', line 328 def cascade_delete? field["cascadeDelete"] end |
#case_sensitive ⇒ Object
332 333 334 |
# File 'lib/sobject_model/schema.rb', line 332 def case_sensitive field["caseSensitive"] end |
#compound_field_name ⇒ Object
336 337 338 |
# File 'lib/sobject_model/schema.rb', line 336 def compound_field_name field["compoundFieldName"] end |
#controller_name ⇒ Object
340 341 342 |
# File 'lib/sobject_model/schema.rb', line 340 def controller_name field["controllerName"] end |
#createable? ⇒ Boolean
344 345 346 |
# File 'lib/sobject_model/schema.rb', line 344 def createable? field["createable"] end |
#custom? ⇒ Boolean
348 349 350 |
# File 'lib/sobject_model/schema.rb', line 348 def custom? field["custom"] end |
#default_value ⇒ Object
352 353 354 |
# File 'lib/sobject_model/schema.rb', line 352 def default_value field["defaultValue"] end |
#default_value_formula ⇒ Object
356 357 358 |
# File 'lib/sobject_model/schema.rb', line 356 def default_value_formula field["defaultValueFormula"] end |
#defaulted_on_create? ⇒ Boolean
360 361 362 |
# File 'lib/sobject_model/schema.rb', line 360 def defaulted_on_create? field["defaultedOnCreate"] end |
#dependent_picklist? ⇒ Boolean
364 365 366 |
# File 'lib/sobject_model/schema.rb', line 364 def dependent_picklist? field["dependentPicklist"] end |
#deprecated_and_hidden? ⇒ Boolean
368 369 370 |
# File 'lib/sobject_model/schema.rb', line 368 def deprecated_and_hidden? field["deprecatedAndHidden"] end |
#digits ⇒ Object
372 373 374 |
# File 'lib/sobject_model/schema.rb', line 372 def digits field["digits"] end |
#display_location_in_decimal? ⇒ Boolean
376 377 378 |
# File 'lib/sobject_model/schema.rb', line 376 def display_location_in_decimal? field["displayLocationInDecimal"] end |
#encrypted? ⇒ Boolean
380 381 382 |
# File 'lib/sobject_model/schema.rb', line 380 def encrypted? field["encrypted"] end |
#external_id? ⇒ Boolean
384 385 386 |
# File 'lib/sobject_model/schema.rb', line 384 def external_id? field["externalId"] end |
#extra_type_info ⇒ Object
388 389 390 |
# File 'lib/sobject_model/schema.rb', line 388 def extra_type_info field["extraTypeInfo"] end |
#filterable? ⇒ Boolean
392 393 394 |
# File 'lib/sobject_model/schema.rb', line 392 def filterable? field["filterable"] end |
#filtered_lookup_info ⇒ Object
396 397 398 |
# File 'lib/sobject_model/schema.rb', line 396 def filtered_lookup_info field["filteredLookupInfo"] end |
#formula_treat_null_number_as_zero? ⇒ Boolean
400 401 402 |
# File 'lib/sobject_model/schema.rb', line 400 def formula_treat_null_number_as_zero? field["formulaTreatNullNumberAsZero"] end |
#groupable? ⇒ Boolean
404 405 406 |
# File 'lib/sobject_model/schema.rb', line 404 def groupable? field["groupable"] end |
#high_scale_number? ⇒ Boolean
408 409 410 |
# File 'lib/sobject_model/schema.rb', line 408 def high_scale_number? field["highScaleNumber"] end |
#html_formatted? ⇒ Boolean
412 413 414 |
# File 'lib/sobject_model/schema.rb', line 412 def html_formatted? field["htmlFormatted"] end |
#id_lookup? ⇒ Boolean
416 417 418 |
# File 'lib/sobject_model/schema.rb', line 416 def id_lookup? field["idLookup"] end |
#inline_help_text ⇒ Object
420 421 422 |
# File 'lib/sobject_model/schema.rb', line 420 def inline_help_text field["inlineHelpText"] end |
#label ⇒ Object
424 425 426 |
# File 'lib/sobject_model/schema.rb', line 424 def label field["label"] end |
#length ⇒ Object
428 429 430 |
# File 'lib/sobject_model/schema.rb', line 428 def length field["length"] end |
#mask ⇒ Object
432 433 434 |
# File 'lib/sobject_model/schema.rb', line 432 def mask field["mask"] end |
#mask_type ⇒ Object
436 437 438 |
# File 'lib/sobject_model/schema.rb', line 436 def mask_type field["maskType"] end |
#name ⇒ Object
440 441 442 |
# File 'lib/sobject_model/schema.rb', line 440 def name field["name"] end |
#name_field? ⇒ Boolean
444 445 446 |
# File 'lib/sobject_model/schema.rb', line 444 def name_field? field["nameField"] end |
#name_pointing? ⇒ Boolean
448 449 450 |
# File 'lib/sobject_model/schema.rb', line 448 def name_pointing? field["namePointing"] end |
#nillable? ⇒ Boolean
452 453 454 |
# File 'lib/sobject_model/schema.rb', line 452 def nillable? field["nillable"] end |
#permissionable? ⇒ Boolean
456 457 458 |
# File 'lib/sobject_model/schema.rb', line 456 def field["permissionable"] end |
#picklist_values ⇒ Object
462 463 464 465 466 467 468 469 470 471 472 |
# File 'lib/sobject_model/schema.rb', line 462 def picklist_values field["picklistValues"].map do |value| PicklistValue.new( active: value['active'], default_value: value['defaultValue'], label: value['label'], valid_for: value['validFor'], value: value['value'], ) end end |
#polymorphic_foreign_key? ⇒ Boolean
474 475 476 |
# File 'lib/sobject_model/schema.rb', line 474 def polymorphic_foreign_key? field["polymorphicForeignKey"] end |
#precision ⇒ Object
478 479 480 |
# File 'lib/sobject_model/schema.rb', line 478 def precision field["precision"] end |
#query_by_distance? ⇒ Boolean
482 483 484 |
# File 'lib/sobject_model/schema.rb', line 482 def query_by_distance? field["queryByDistance"] end |
#reference_target_field ⇒ Object
486 487 488 |
# File 'lib/sobject_model/schema.rb', line 486 def reference_target_field field["referenceTargetField"] end |
#reference_to ⇒ Object
490 491 492 |
# File 'lib/sobject_model/schema.rb', line 490 def reference_to field["referenceTo"] end |
#relationship_name ⇒ Object
494 495 496 |
# File 'lib/sobject_model/schema.rb', line 494 def relationship_name field["relationshipName"] end |
#relationship_order ⇒ Object
498 499 500 |
# File 'lib/sobject_model/schema.rb', line 498 def relationship_order field["relationshipOrder"] end |
#restricted_delete ⇒ Object
502 503 504 |
# File 'lib/sobject_model/schema.rb', line 502 def restricted_delete field["restrictedDelete"] end |
#restricted_picklist? ⇒ Boolean
506 507 508 |
# File 'lib/sobject_model/schema.rb', line 506 def restricted_picklist? field["restrictedPicklist"] end |
#scale ⇒ Object
510 511 512 |
# File 'lib/sobject_model/schema.rb', line 510 def scale field["scale"] end |
#search_prefilterable? ⇒ Boolean
514 515 516 |
# File 'lib/sobject_model/schema.rb', line 514 def search_prefilterable? field["searchPrefilterable"] end |
#soapType ⇒ Object
518 519 520 |
# File 'lib/sobject_model/schema.rb', line 518 def soapType field["soapType"] end |
#sortable? ⇒ Boolean
522 523 524 |
# File 'lib/sobject_model/schema.rb', line 522 def sortable? field["sortable"] end |
#to_h ⇒ Object
542 543 544 |
# File 'lib/sobject_model/schema.rb', line 542 def to_h field end |
#type ⇒ Object
526 527 528 |
# File 'lib/sobject_model/schema.rb', line 526 def type field["type"] end |
#unique? ⇒ Boolean
530 531 532 |
# File 'lib/sobject_model/schema.rb', line 530 def unique? field["unique"] end |
#updateable? ⇒ Boolean
534 535 536 |
# File 'lib/sobject_model/schema.rb', line 534 def updateable? field["updateable"] end |
#write_Requires_Master_Read? ⇒ Boolean
538 539 540 |
# File 'lib/sobject_model/schema.rb', line 538 def write_Requires_Master_Read? field["writeRequiresMasterRead"] end |