Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

What are the knowledge points related to Apex and Database

2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/01 Report--

This article mainly explains "what are the knowledge points related to Apex and Database". Interested friends may wish to have a look. The method introduced in this paper is simple, fast and practical. Next, let the editor take you to learn "what are the relevant knowledge points of Apex and Database"?

Salesforce.com is the first company in the world to propose a cloud computing platform. At the same time, it also introduces the world's first cloud computing programming language, Apex.

1. Get Started with Apex

Learning Objectives

Upon completing this module, you will be able to:

Describes the main functions of the Apex programming language.

Save an Apex class and call the method using Anonymous.Apex.

Use the developer console to check the debug log.

Characteristics of Apex:

Code hosting-saves, compiles, and executes Apex on the server Lightning Platform.

Apex is a case insensitive language

Apex naming convention (I am using the Java specification here)

The first letter of the class name is capitalized. If the class name consists of multiple words, the first letter of each word should be capitalized. Such as:

Public class MyFirstClass {}

The first letters of variable names and method names are lowercase. If the name consists of multiple words, the first letter of each word except the first word should be capitalized. Such as:

Int index=0;public void toString () {}

Constant names are all capitalized

Apex supports the following data types:

Primitive (Integer, Double, Long, Date, Datetime, String, ID, or Boolean) raw data type (integer, double, long integer, date, date time, string, ID or Boolean)

Collections (Lists, Sets and Maps)

SObject

This is a special data type in Salesforce.

It is similar to a table in SQL and contains fields similar to columns in SQL.

There are two types of sObjects:Standard and Custom.

For example, Account is a standard sObject; any other user-defined object (such as the Customer object we created) is Custom sObject.

Enums enumeration

Classes, Objects and Interfaces classes, objects and interfaces

Reference:

Apex data type-W3School

Trailhead Apex Practice https://trailhead.salesforce.com/content/learn/modules/apex_database/apex_database_intro

Create an Apex class with a method that returns an array (or list) of strings. Create an Apex class with a method that returns an array (or list) of formatted strings ('Test 0,' Test 1,...). The length of the array is determined by an integer parameter.

The Apex class must be called StringArrayTest and be in the public scope

The Apex class must have a public static method called generateStringArray

The generateStringArray method must return an array (or list) of strings

The method must accept an incoming Integer as a parameter, which will be used to determine the number of returned strings

The method must return a string value in the format Test n where n is the index of the current string in the array

/ * Apply To: Trailhead Apex PracticeCreated On: 05-14-2021Function: Developer Date Version Description---charles 05-14-2021 V1.0 Initial Version*///apex classclass StringArrayTest {/ / Apex method that takes in an Integer parameter And returns a List of Strings public static void generateStringArray (Integer n) {/ / Create a List of Strings List result = new List () / / Interate through a for loop to populate the array of Strings for (Integer item0; I

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report