Home > Uncategorized > daily 07/28/2016

daily 07/28/2016

    • In one passage, it states that, “In certain instances … athletics and football personnel affirmatively chose not to report sexual violence and dating violence to an appropriate administrator outside of athletics. In those instances, football coaches or staff met directly with a complainant and/or a parent of a complainant and did not report the misconduct. As a result, no action was taken to support complainants, fairly and impartially evaluate the conduct under Title IX, address identified cultural concerns within the football program, or protect campus safety once aware of a potential pattern of sexual violence by multiple football players.”
    • All Java code must reside inside a file with the extension .java
    • Your Java program first declares the variables, then read data into them, execute operations on the variables, and then write the variables (or data based on the variables) somewhere again
    • The data type determines what kind of data the variable can contain, and what operations you can execute on it.
    • Operations in Java are the instructions you can use to process the data in variables.
    • other operations control the program flow.
    • Variable operations
    • Program flow
    • Method calls.
    • Here are a few examples of operations:
    • Classes group variables and operations together in coherent modules.
    • Objects are instances of classes.
    • When you create an object, that object is of a certain class.
    • When you create an object, you say “give me an object of this class”.
    • Java objects.
    • public class Car
    • A field is a variable that belongs to a class or an object.
    • this.brand = theBrand;
      • Yeah I sung get constructors
    • Methods
    • Methods are typically used when you need to group operations together,
    • In other programming languages methods may be called “procedures” or “functions”.
    • An interface describes what methods a certain object should have available on it
    • A package is a directory containing Java classes and interfaces
    • Apex Workbook

        

    • Force.com Cookbook

        

    • In This Book (Apex Developer’s Guide)

        

    • Each Salesforce record is represented as an sObject before it is inserted into Salesforce.  Likewise, when persisted records are retrieved from Salesforce, they’re stored in an sObject  variable.

        

    • If you’ve added custom objects in your organization, use the API names of the custom objects  in Apex. For example, a custom object called Merchandise corresponds to the Merchandise__c  sObject in Apex.

        

    • To create an sObject, you need to declare a variable and assign it to an sObject instance.  The data type of the variable is the sObject type.

        

      • For custom objects and custom fields, the API name always ends with the __c suffix. For  custom relationship fields, the API name ends with the __r suffix. For example:

          

           

    • The account referenced by the acct variable is empty because we haven’t  populated any of its fields yet. There are two ways to add fields: through the constructor  or by using dot notation.

        

    • Variables that are declared with the generic sObject data type can reference any Salesforce  record, whether it is a standard or custom object record.

        

       

    • In contrast, variables that are declared with the specific sObject data type can reference  only the Salesforce records of the same type.

        

       

    • Unlike specific sObjects types, generic sObjects can be created only through the  newSObject() method. Also, the fields of a generic sObject can be  accessed only through the put() and get() methods.

        

    • To save the sObject as a record, and  do other things with it, you’ll need to use DML. To retrieve a record, you’ll need to use  SOQL. Check out later units to learn about DML and SOQL.
    • Object oriented—Apex  supports classes, interfaces, and inheritance.
    • Strongly typed—Apex  validates references to objects at compile time.
    • Transactions and rollbacks
    • The global access modifier
    • namespaces and applications.
    • In addition, Apex is a  case-insensitive language.

        

        

    • You can also write Apex on a client by using the Force.com IDE plugin for Eclipse. See  Force.com IDE on the Salesforce Developer site.
      • dot notation syntaxcreate and edit classesno libraries needed – you can work onlineupsert is an easy way to manipulate recordsapex and visualforce work togetheruse open apis, get Flickr picturesmake a quick flickr view appsapex triggers!create a trigger class/where are the sales force analytics experts/chatter blacklist – intercept convo?/swap out things preemptively/good trigger exampleannotations – leverage preexisting stuffbatch ablescheduledemail things to actionREST Services 75 percent code coveragetest in sandbox, then migrateuse a cliuse an eclipse plugin/run tests and deploy from eclipse/variables, loops, classes, interfaces, collectionshey there now go code your first apex class
    • Apex supports various data types, including a data type specific to  Salesforce—the sObject data type.

        

       

    • An sObject, either as a generic sObject or as a specific sObject, such as an Account,  Contact, or MyCustomObject__c (you’ll learn more about sObjects in a later unit.)
    • A map from a primitive to a primitive, sObject, or collection
    • A typed list of values, also known as an enum
    • Lists in Apex are  synonymous with arrays and the two can be used interchangeably.

        

    • List<String> colors = new List<String>();

        

      • create an apex classit should return an array of formatted stringsthe length of the array is determined by an integer parameterpublic scopepublic static methodmust return an array of stringsvalue will be Test 0, Test 1, Test 2 the number of strings will be determined by the integer parameter
    • Generally, it’s easier to create a list rather than an array because lists don’t require you to  determine ahead of time how many elements you need to allocate.

        

    • You can add elements to a list when creating the list, or after creating the list by calling  the add() method. This first example shows you both ways  of adding elements to a list.
    • List elements can be read by specifying an index between square brackets, just like with array  elements. Also, you can use the get() method to read a  list element.
    • One of the benefits of Apex classes is code reuse.
    • Class methods can be called by triggers and other classes.
    • saving an example class in your organization, using this  class to send emails, and inspecting debug logs.

        

    • Let’s invoke the public method. We’ll use anonymous Apex execution to do so. Anonymous Apex  allows you to run lines of code on the fly and is a handy way to invoke Apex, especially to  test out functionality. Debug log results are generated, as with any other Apex  execution.
    • When Apex methods execute, the calls are  logged in the debug lo
    • The inspectResults() helper method, which is called by sendMail(), writes messages to the log by using the
    • Because the sendMail() method in our class doesn’t  access class member variables, it doesn’t need to be an instance method.
    • Static methods are easier to call than instance methods because they don’t need  to be called on an instance of the class but are called directly on the class name.
      • Create an Apex class that returns an array (or list) of formatted strings (‘Test 0’, ‘Test 1’, …). The length of the array is determined by an integer parameter. 

           

Posted from Diigo. The rest of my favorite links are here.

Advertisements
Categories: Uncategorized
  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: