What is Data Member in Apex and different types of data types in salesforce apex

Salesforce Development Using Apex What is Data Member in Apex and different types of data types in salesforce apex
29 minutes
Share the link to this page
Copied
  Completed
You need to have access to the item to view this lesson.
One-time Fee
$49.99
List Price:  $69.99
You save:  $20
€48.10
List Price:  €67.35
You save:  €19.24
£39.88
List Price:  £55.83
You save:  £15.95
CA$71.97
List Price:  CA$100.76
You save:  CA$28.79
A$80.16
List Price:  A$112.23
You save:  A$32.07
S$67.96
List Price:  S$95.14
You save:  S$27.18
HK$388.27
List Price:  HK$543.62
You save:  HK$155.34
CHF 45.02
List Price:  CHF 63.04
You save:  CHF 18.01
NOK kr569.59
List Price:  NOK kr797.48
You save:  NOK kr227.88
DKK kr358.90
List Price:  DKK kr502.49
You save:  DKK kr143.58
NZ$88.63
List Price:  NZ$124.10
You save:  NZ$35.46
د.إ183.61
List Price:  د.إ257.07
You save:  د.إ73.45
৳5,972.19
List Price:  ৳8,361.55
You save:  ৳2,389.35
₹4,258.89
List Price:  ₹5,962.79
You save:  ₹1,703.89
RM224.30
List Price:  RM314.04
You save:  RM89.74
₦77,378.02
List Price:  ₦108,335.42
You save:  ₦30,957.40
₨13,924.71
List Price:  ₨19,495.71
You save:  ₨5,570.99
฿1,707.62
List Price:  ฿2,390.81
You save:  ฿683.18
₺1,762.36
List Price:  ₺2,467.44
You save:  ₺705.08
B$310.08
List Price:  B$434.14
You save:  B$124.06
R926.14
List Price:  R1,296.68
You save:  R370.53
Лв94.05
List Price:  Лв131.68
You save:  Лв37.62
₩72,995.06
List Price:  ₩102,198.93
You save:  ₩29,203.86
₪183.24
List Price:  ₪256.56
You save:  ₪73.31
₱2,921.84
List Price:  ₱4,090.81
You save:  ₱1,168.96
¥7,853.11
List Price:  ¥10,994.99
You save:  ¥3,141.87
MX$1,006.35
List Price:  MX$1,408.98
You save:  MX$402.62
QR182.19
List Price:  QR255.09
You save:  QR72.89
P691.26
List Price:  P967.82
You save:  P276.56
KSh6,461.20
List Price:  KSh9,046.20
You save:  KSh2,585
E£2,544.49
List Price:  E£3,562.49
You save:  E£1,018
ብር6,361.91
List Price:  ብር8,907.19
You save:  ብር2,545.27
Kz45,590.88
List Price:  Kz63,830.88
You save:  Kz18,240
CLP$49,514.09
List Price:  CLP$69,323.69
You save:  CLP$19,809.60
CN¥364.84
List Price:  CN¥510.80
You save:  CN¥145.96
RD$3,032.23
List Price:  RD$4,245.36
You save:  RD$1,213.13
DA6,760.37
List Price:  DA9,465.07
You save:  DA2,704.69
FJ$115.98
List Price:  FJ$162.39
You save:  FJ$46.40
Q385.05
List Price:  Q539.11
You save:  Q154.05
GY$10,455.66
List Price:  GY$14,638.77
You save:  GY$4,183.10
ISK kr6,980.10
List Price:  ISK kr9,772.70
You save:  ISK kr2,792.60
DH502.81
List Price:  DH703.98
You save:  DH201.16
L922.32
List Price:  L1,291.33
You save:  L369
ден2,959.81
List Price:  ден4,143.97
You save:  ден1,184.16
MOP$399.96
List Price:  MOP$559.97
You save:  MOP$160.01
N$920.98
List Price:  N$1,289.45
You save:  N$368.46
C$1,839.04
List Price:  C$2,574.80
You save:  C$735.76
रु6,810.12
List Price:  रु9,534.71
You save:  रु2,724.59
S/186.41
List Price:  S/260.99
You save:  S/74.57
K202.74
List Price:  K283.85
You save:  K81.11
SAR187.78
List Price:  SAR262.91
You save:  SAR75.12
ZK1,383.10
List Price:  ZK1,936.45
You save:  ZK553.35
L239.36
List Price:  L335.12
You save:  L95.76
Kč1,209.95
List Price:  Kč1,694.03
You save:  Kč484.08
Ft19,835.61
List Price:  Ft27,771.44
You save:  Ft7,935.83
SEK kr553.09
List Price:  SEK kr774.38
You save:  SEK kr221.28
ARS$51,277.48
List Price:  ARS$71,792.58
You save:  ARS$20,515.09
Bs346.08
List Price:  Bs484.55
You save:  Bs138.46
COP$219,391.32
List Price:  COP$307,165.41
You save:  COP$87,774.08
₡25,377.51
List Price:  ₡35,530.54
You save:  ₡10,153.03
L1,269.45
List Price:  L1,777.33
You save:  L507.88
₲390,156.27
List Price:  ₲546,250
You save:  ₲156,093.73
$U2,225.52
List Price:  $U3,115.91
You save:  $U890.38
zł205.57
List Price:  zł287.82
You save:  zł82.24
Already have an account? Log In

Transcript

Let me write the syntax here how we are going to be a data member. Okay, let's see the syntax, then we'll see what we can do it. So now again, the data member is going to be my access specifier. What access Do we have this can be a symbol, and it's a optional if you do not want to write their site, they will take the class as it is verbatim, and we can define it as a final also, some key word something and also you can define it, I static. I listed all these things, what is going to happen? So there is an option is awesome for whatever writing in the box, that's optional.

Okay. Then, you can give your data title, see I'm not writing it inside the box. It's required you have to give that tape and my variable there. Okay, this is a minimum sentence, and if you want, then you can initialize the payload directly. moment when you are declaring that variable. So let's see, we have to set that also you can do that directly from here and as you as you know all the statements going to end with semicolon that also you have to give.

So now let's see if I want to create one variable number one. So now tell if equals a calculator functionality. Then number one, what we are going to store Am I going to store number one at location number one in manners, not at all good. So I want to number one Sora some 2830 or 45 or 50, some kind of integer value or some kind of decimal value a double Bellbird. So now whenever I'm going to declare data member, so past I'll define where this data member going to access. So in this in this place, going for the data members when declaring the assess procedure can be what kind of assets which are supported here.

Let me make a note of it. As best as you can be a public Okay can be that can be a private can be protected so I will tell parties can be global if it's in the class and here that one you I introduced called protected in the class I don't have I have a private public global, but in the day they came with something called protected okay. It can put it in okay so now public nothing but again it can be accessible public key like anywhere, anywhere and private uncovered in the scope where you define inside only that it can be accessible and the global the memory can access anywhere. Okay, so now pointer protected, protected. Again, we'll see in the time of inheritance, how this protected especial works. So we're not going to talk now procurator it's the atmosphere, which is going to be used for a new implement in returns in my office.

So now, return will just give me a note, as y'all can be. Public Private, protected or global and protected, we'll talk during mine in a tense concert. Okay? So now if I want it depend number one, what is going to happen? So I'm not going to define anything as a public. I see it's optional, you could not give it to somebody to go as a as a plus as a spell vertebra.

So now then we come to data die and something called final static, okay. So final number two you can see like the final value, what do you want like a constant Okay, what final value you want to store on this variable, that constant that value is not going to change in the transaction item. So whenever you want something Hello, you will save in a variable and that value is final to that variable name. Let's see. I will say college name equal to some University name I give. Okay.

So that name is handle. So in the tradition that name is not going to modify not going to change I mean, can you can say it as Tyneham. Okay. So that is that is that is a very big concern, which I'll talk. So right now for the polygon reference, I can say, whenever you refer something called study that you can assess without creating an object, okay, I'll come to static this person completely in appearance or someday be concerned being distracted. Okay, then we come to data type.

So what kind of diet a we can have whenever I'm defining one data member? versus Yes, tell me. Well mean. So what you're saying is if we declare the value of variable ones, that will not change in the runtime, right? Yes, you know, time will not change is like a constant. Okay?

Okay. Okay. So if I defame integer number equals 10, my 10 is a final value to that variable. Okay, finally, if you infuse the finest, yes, if you're the final, there's going to be a final value to that, when that's when I'm going to change it and it's a final value In seconds you can mod upon a country's content well Okay, so now we're going to happen here. So now we are going to see what kind of data we can set okay. There are many, many types of artists we have okay.

So see the moment I said I want to define a number one Hello, when you understood this number one, what do you mean? You initial okay? There is some 510 or 15 you want to store there? Am I correct? So, if you number each number one that number one we is not going to say it Nike look is minus or minus our device is nothing. So, it's a particular type of data which can be stored on that variable.

That's not the word would you call us my data. So, C equals a calculator class and what will happen in this particular class, I am going to write okay I understood Okay, you Want to store number one so we may write integer number one is equal to the woman to write this one. So number one is a variable, I'm going to store data of type integer okay. So if it's a variable see that data type I think depends what kind of data I can store on the variable. So, in the number one image invariable I define, it can store only integer type of data I cannot cannot store any string or I cannot store mannose Myers lowercase or us or India I can store 1020 3040 ledger some Hello I can store if I define some error if I define I will tell what is the string integer I'll tell if I depend string name, then I can define Okay, name equal to services, okay.

I cannot define string name equal to my salary I can define their string means it could have stored only the string type of data in displace okay there are three callers my street. So now whenever I whenever I go into direct I will see what kind of diet a supported by sulphurs biopics more more often. Okay, so what kind of art I supported in the evenings and parties a different type of data we have in topics, that's the past but we'll see okay. So, we understood that I have nothing but it is all about what kind of data I am going to store on a particular variable that we can define using manga type, okay. And in cell force, we have different kind of data types, okay. So, okay, what kind of it you know, location, manners, you know, maybe you have a subject in the collections list set map.

Okay, and a man has any idea what kind of already you know, integers string, double Well, long double Yes, that's absolutely correct what you said about you know what I said different rental data is we have two different categories of data okay in ethics leaving one thing whenever you want to learn a new language, it may be a technical language it may be any digital language, it may be an international language, okay. So we need to make sure you start from scratch you need to understand the alphabet of that you need to understand how to construct the world from the above it, how to construct a sentence from that words and how to construct a paragraph. Then you can go for a concert book, the new Eugen a be exporting that language, semi final Londo, any technical language, you have to learn its syntax, okay. Then how you will write your small statements.

This is PC, this is a small statement one program statement I added an integer number on Colton, and to write this integer number one we understood Okay, there is something integer is not a word, I can say my alphabet in a programming language, okay? using multiple alphabets, okay, I'm just going to make a word nothing which I can say my sentence. So communism, one sentence can be a method and can be a class. For most communists of many classes we can deliver a complete project. Okay? So that's nothing but a technical language what I can say.

So now we are going to learn the basic agreed. So for any programming language, we need the past thing to learn what kind of data type is supporting data, everything but it depends what kind of Hello I can store in a variable. So in the cell First we have something called primitive type of data, we've implemented a type. Okay, we have a subject that I will companies. So today, we have collection data type. And in the collection, we have multiple options there.

We'll come to that and we have some kind of radicals And also we have custom data you also identify this customer ID, okay? So any combination can be quite everything that we are they are you said integers, strings and all options. These all call on another primitive. So, in the previous quarter, we have one article blog, I'll come alphabetical part of I don't think we have. So once that meant you can always remember that or think about, it's going to define what kind of Hello I can store on a variable. Okay, they're still passing the result basic principle and the in the primitive type, okay, quite I can store exactly one value at a time.

One relevancy is a integer number one Colton, that means 10 is a single value which can be stored in number one. Number one, I cannot restore 10 and 20. So whenever I tell stories, In value, okay, that's it for today I can say primitive data type. So it can be a blob. It can be a Boolean, I'll define each of these for the law what is Boolean okay and the same way I can say something called debt, many days we sell for support. Okay, we have that time.

We have the decimal, we have double. We have on so Id also in one day, we have integers. We have long, there are different types are going to use. We have also object is also one day we are days, we have string. We have also time. We do multiple primitive data types which sell for support and avoid a blob of data.

It's nothing but you can say it's a binary large object data blob nothing more we can say it's a binary large object data. So now it's what happened is a collection of binary data. You see this blob is a complex one, like you you use very rare but the memory so it's a collection of binary data, which is going to store in a singular. There are many predefined methods we have in in selfoss platform for which we can use to convert it to string or from string to blob that we'll see. It's nothing but a binary Lazarus wherever you are, you have like Like, for example, let's see, you have failed you deserve. Let's see, you have a document.

And the document content is a big, big data on me. There are 20 pages of content I have in a document I want to store it somewhere or there is an image I want to store the images from here, all are going to store in a blob in a blob microdata visual ricola binary large object is a Boolean is nothing but is it true forms it can store either true or false. Like we can say are you are you working from a yes or no? That kind of data where you want to store that time you can use Boolean coupons it can have true false and also it can store an all in epics that also we can do so simply I can define Boolean is working, I can say also made in the app it's it's not buried in the Java c++ is anywhere but Boolean can happen also.

So, if you do not initialize any value to a variable, all the variables are going to be assigned within all okay. Now, yes yesterday me. So, when you are discussing about Have you told one thing, right? So for example, if you're discussing all this theory means, like class therapy, all these things it was stored as a binary digits, the independent blob, it's going to store as a binary large object. So we'll see this example whenever you're going to the crypto class like yeah, I have one complex example I'm giving. So let's see I am doing integration between two system and from server side I got a certificate to be used the certificate data I can stored in a blob.

Okay, that we are going to continue. So pH generally we'll use blob as yet because we're in a single folder trashing data that is coming as a large object that will convert into blob blob or string stream to blob we can convert we have many methods, we'll come to that but also, okay. Well, that's Paulina blob. So Boolean nothing but my true false value. You can store either true or false. Starting with a customer ID customer ID this yes or no that kind of thing and if you understood any kind of date value then we will define that a table date whenever you want like say to the third you simply can store the 28 in the local like your user local whatever we have in that way it will store 28 072019 and if you said dead time it stored the date with time 28 072019 and this thing also if you work in the admin part in the formula that time also you can see a current condition only you can see date and time type of four functions you may have seen when you're writing a validation rule sampling of who you are the date and time.

Okay, so now same way we have something called decimal where I can if you want to know data, like what is the point the instrument, okay, these are the things we're going to be this similar type of data. Okay, so number with with my decimal part are my decimal points. So when you want to store that kind of data, I can go for my decimal and when you want to double, okay, the other thing what it says 64 bit number, which also includes my decimal points, okay? And it doesn't so that I'm going to move on then we can go double. So normally if you see this policy point eight six also can be defended in a double, but if you see the technical back end of this, so it says 64 bit number, including my decimal points, double double may have a minimum of four and dismiss of that or minus two to the power of 63.

Whether it's to the power of 63 It's a bit of anything that you have this amount plants we can store in a double, okay, and the maximum we can store we did was two to the power 63 Okay, so that double blue gemstone that way, and they also poignancy ID as we know Salesforce on Salesforce, our main things are we are wanting to introspect. So every record will will present within the record ID if I open a particular record here you can see this particular record ID these are nothing but mine, you can store in the ID. So, this ID can be a 10 digit or can be it can be a 10 character or a 15 characters, okay. So that if you want to store you can you can make my database Id also or you can store an integer Hello, I can write 40 people 89 and integer value, you can store integer, okay, now when it came to long, it's also a 64 bit number, which include which doesn't include any decimal points, see between these in double and long.

It's the same thing, but double comes with my decimal points long is without my decimal points. But these are my laundry lists and object nothing but so it's the like in a cell phone so you have Okay, just give me a minute I'll just put in the chance okay. This conference will now be recorded okay. So, what you understood from this see, there are many type of food that is provided by sulfurous which remains there there is nothing but we have a primitive type dirties, we have let me make a list here we have a type a subject, we have collected in Oman cosmetic, in the primitive we saw all this See, object integer string double everything, and as of yet nothing but we are going to target my objects to speak their days, okay. So it may be a solid object, it may be a custom object, in the standard object we can say.

Like I can be the object that object also can be that they put me or cause cause some object you feel Anything like a purchase order or maybe lead reference, it may be custom custom objects. So anything custom ordered we have that also can be that a for me, like how would I account is equal to new account that also we can do. Same way New Energy accommodates a single new account upon nothing but I can say, so sec each one day of account object account, I'm going to store account type of like coordinates his image maybe a custom object and whenever you want to store the collection of values in one variable, like 1020 3040 are from multiple students names that I can go over collection lease at Mabry who you will see in the upcoming session how I'm going to defend collision and what are the things we can do no collisions, all right.

And the same way no knocking but my abstract data where I will define my possible set of values in the enum variable, and which we can refer to in my logic set Anyway, I can define my custom Rarity, where I am going to store my artist class. Are they are they in my class or anywhere? like whatever you want, I can do that. Okay, so any question till now, it's been discussed on record Martin. Sorry, I didn't understand. Perfect notice.

See, I'm just going to call a jumble. Just see. I'm just going to define one class here. Let's see public class. I will say it's my student class. Yes, my student class good.

So now on this route class, I'll have something inside this I'm not going to write here. Now, I want to define one more class. This is our class we created a survey system I want to create one more class whose name I have given us library. Okay. This may be one class for me. So in the center library, under the pending for the students going to be enrolled on a slide who is According to a representative of this library, so that I can define one that there is nothing worse than the STD So, you can define like this this STD h1 variable and what type of data it can store it can store the type of data nothing but like a student, I mean correct is the student what is really the best class for me.

So, I can be pay in one office class I did data to Eve as a dirty also. So whenever you want any office class, the custom classes for God what we have developed or maybe some standard class what we have in the system, if you want to use that class or the day you will get used that also. Okay, okay. Yeah, understood. Perfect. That's it right?

Yes class. And also, if you see this icon, this is also you can say this is also a class or a div upon with him with a class for me, so on All objects what we have, every object is a class for me into romantically, it may be an object in database, or it might be table in database, but I can say it is a class for me on program layer on my business layer. It's a class account is easy. I can simply say account a solid, but I will treat it as a class always. It's a class. It has some method, it has some properties.

Okay, we'll come to that but completed Don't worry. So till now, do you have any question? manners? on devices? Yeah, and the moment you will not too You will feel bored all the way or you will lose the interest let me know. Okay, we are going to have a long lesson.

So I don't want you to miss something. Okay. I want the system to be so smooth and so slow. You understand everything from the scratch first. Okay. Perfect.

So now you understood how we are going to define an artist with using many, many pieces. reaping the rewards for who we are we go from the surface, okay to mutability, or maybe colorism, maybe a subject or Vietnam, or anything. So these are my classes. So now let's go to my class example. Okay, so let's see, I want to create a class. So whenever I want to create a class many things, so there are some some kind of development enamored I need forever, I can write my logic forever, I can create my classes, see sulphurs being a cloud platform, whether providing Platform as a Service see service like Korean, or writing, any kind of logic or any kind of customization, I don't need to have any local setup in my system.

And there is also some reason why you can have local setup, so using a CLI, so maybe using my Visual Studio code, anything, but if you go here, also, I can create a class from here if you go to my setup, there are two mechanism I'm showing where without installing anything I can do, I can go to my class here. And under the developer, you can diameters classes, you can sample class. And here you can click the new and you can write whatever you want. This is one word. And also, if you want you can go to developer console, you can type on your on your name here wherever you can see my Developer Console, you can go here it will open one, they will console window Okay, where also you can create my new class I new on this class you can do from here, enter the class name click OK. Let's see I just want to create welcome sealer, some class name and give, I give Okay, see, it's creating a class which affects e x e x.

And also I can write some kind of code or C EP if I wrote this class and now I am just to writing one data member here integer x equal 10. And I just save it. What it Do you remember the previous lesson, it will go to my metadata server and storage. Okay, for this it's saved successfully. Without any compiler scenario. So, that means I have returned some kind of logic.

Whereas given a name, an image will come to this. And also I can write some kind of illusion I want to do, but I do not want to store in my metadata server one time I want to write and execute. And what I can do, I can do my anniversary window where I don't need to write any kind of logic, but what I can do, I can simply execute it that kind of thing also we can do here deactivated, so, I just completed a juice and what I am not going to store anywhere, but that kind of do when you want you can do my igloo dinos window, I will make completely introduce an objective level console what options we have, okay, just to I'm just giving you a way they can attack let's, let's I'm writing a class under the setup I went to develop under the develop, I have a business.

I'm just going to write one at this last year. So I just clicked new. Okay, let's see. I want to write a calculator class. So now you guys Tell me how I can write a class. But should I write?

I want to write a calculator class, or should I write? manners? Yeah, access vSphere like public. Public perfect. Class Name. No public class.

Yes, yes. Perfect. I get something perfect. This is my class. I just saved it. So now what class what Mr. Mr. Simpson, I don't give this back.

This is my mistake, I just give it like a public class class name. Then I just met quizzes subs, you can do complete set of the modules here and if you want polybag and integrated, or you can do full set, so it will serve and also it will open to you probably plus calculator so on this one, whatever calculator your class, which can be accessible anywhere on this URL, and you stored in WebSocket server. So in the inside of this class, what I can write I can write my data member. So in a calculator what I want to store I want to start to number and I want to do it sample division division. So what I'll do is how I can define it. Tell me, I n t. For me, it's not at all me integers, okay?

Yes. Indeed, yes. So, I write integer number one. Okay. Not simply I can do number one, correct? Yes.

I can define one more variable number two. Perfect. Yes. Perfect. So now so last can continue. Want more things?

It can contain data member and member method. So let's see what is this member method on how I'm going to write the member method in a class? Okay, then we'll come back to many more things very very basic thing for discussing we want to clean the basis then we can progress. So, quickly for the advanced topics, not only are you okay. So, if tomorrow somebody gave you to write a small class can you write this statement public class class name, then what data they want to store you can write with my directives, what kind of data they want to store based on take the array and then they give the variable name and if that needs to be a store as some interesting value that you can define here, okay. That one thing, so now we understood Okay, what is my in class variable, okay in the class variable, what again store same way I said, in the same same part, I have whenever defining a class have also member method or class plus member let's see party this class okay so whenever I'm saying this class member class method what so it's nothing about any pains the behavior of the class see that our members are detained the state of the class okay for it contents and class method defensive behavior see manasi a person with named manners, okay and the age is something and the gender is male and the qualification is something okay now these are the state

Sign Up

Share

Share with friends, get 20% off
Invite your friends to LearnDesk learning marketplace. For each purchase they make, you get 20% off (upto $10) on your next purchase.