Long A 64 bit number that doesnt include a decimal point Longs have a minimum

Long a 64 bit number that doesnt include a decimal

This preview shows page 3 - 6 out of 10 pages.

Long A 64-bit number that doesn’t include a decimal point. Longs have a minimum value of -263 and a maximum value of 263-1. Double A 64-bit number that includes a decimal point. Doubles have a minimum value of -263 and a maximum value of 263-1. Decimal A number that includes a decimal point. Decimal is an arbitrary precision number. Currency fields are automatically assigned the type Decimal. • Null variables: Variables that you don’t assign values to. If you declare a variable and don't initialize it with a value, it will be null. In essence, null means the absence of a value. You can also assign null to any variable declared with a primitive type. • Enum: An enumeration of contant values. Use enumerations (enums) to specify a set of constants. Define a new enumeration by using the enum keyword followed by the list of identifiers between curly braces. Each value in the enumeration corresponds to an Integer value, starting from zero and incrementing by one from left to right. Because each value corresponds to a constant, the identifiers are in upper case. For example, this example defines an enumeration called Season that contains the four seasons: public enum Season {WINTER, SPRING, SUMMER, FALL}
Image of page 3
5. Apex Workbook ( ) sObjects and the database What is a sObject - An sObject is any object that can be stored in the Force.com platform database. These are not objects in the sense of instances of Apex classes; rather, they are representations of data that has or will be persisted. Not that fancy people - sObject is a holder of a salesforce record. It could be externally visible user object or internal referenced in Salesforce.com sObject is a generic abstract type that corresponds to any persisted object type. The generic sObject can be cast into a specific sObject type, such as an account or the Invoice_Statement__c custom object. SOQL and SOSL Queries The same way database systems support a query language for data retrieval, the Force.com peristence layer also provides two query languages. • Salesforce Object Query Language (SOQL) is a query-only language. While similar to SQL in some ways, it's an object query language that uses relationships, not joins, for a more intuitive navigation of data. This is the main query language that is used for data retrieval of a single sOobject and its related sObjects. You'll see an example in a minute. • Salesforce Object Search Language (SOSL) is a simple language for searching across all multiple persisted objects simultaneously. SOSL is similar to Apache Lucene. You can write queries directly in Apex without much additional code since Apex is tightly integrated with the database. SOQL queries return a sObject or a list<sObject> SOSL queries always return a list<list<sObject>> sObject Relationships and Dot Notation sObjectTypeName parentObject = objectA.RelationshipName; //traversing from child to parent
Image of page 4
DataType s = objectA.RelationshipName.FieldName; //traversing to a field on the parent from the child record
Image of page 5
Image of page 6

You've reached the end of your free preview.

Want to read all 10 pages?

  • Spring '16
  • McDonald
  • Apex, Subroutine, Query language

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture