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
€46.41
List Price:  €64.99
You save:  €18.57
£39.85
List Price:  £55.80
You save:  £15.94
CA$68.38
List Price:  CA$95.74
You save:  CA$27.36
A$75.69
List Price:  A$105.97
You save:  A$30.28
S$67.65
List Price:  S$94.71
You save:  S$27.06
HK$390.96
List Price:  HK$547.38
You save:  HK$156.41
CHF 45.35
List Price:  CHF 63.50
You save:  CHF 18.14
NOK kr542.95
List Price:  NOK kr760.18
You save:  NOK kr217.22
DKK kr346.22
List Price:  DKK kr484.74
You save:  DKK kr138.51
NZ$83.20
List Price:  NZ$116.49
You save:  NZ$33.28
د.إ183.60
List Price:  د.إ257.06
You save:  د.إ73.45
৳5,484.79
List Price:  ৳7,679.15
You save:  ৳2,194.35
₹4,174.22
List Price:  ₹5,844.24
You save:  ₹1,670.02
RM236.85
List Price:  RM331.61
You save:  RM94.76
₦61,737.65
List Price:  ₦86,437.65
You save:  ₦24,700
₨13,903.63
List Price:  ₨19,466.20
You save:  ₨5,562.56
฿1,842.69
List Price:  ฿2,579.91
You save:  ฿737.22
₺1,612.90
List Price:  ₺2,258.19
You save:  ₺645.29
B$253.75
List Price:  B$355.28
You save:  B$101.52
R922.13
List Price:  R1,291.06
You save:  R368.92
Лв90.85
List Price:  Лв127.20
You save:  Лв36.34
₩67,969.88
List Price:  ₩95,163.27
You save:  ₩27,193.39
₪185.94
List Price:  ₪260.34
You save:  ₪74.39
₱2,861.35
List Price:  ₱4,006.12
You save:  ₱1,144.77
¥7,722.34
List Price:  ¥10,811.89
You save:  ¥3,089.55
MX$843.21
List Price:  MX$1,180.56
You save:  MX$337.35
QR182.28
List Price:  QR255.22
You save:  QR72.93
P678.57
List Price:  P950.05
You save:  P271.48
KSh6,648.67
List Price:  KSh9,308.67
You save:  KSh2,660
E£2,385.52
List Price:  E£3,339.92
You save:  E£954.40
ብር2,869.28
List Price:  ብር4,017.22
You save:  ብር1,147.94
Kz41,825.96
List Price:  Kz58,559.69
You save:  Kz16,733.73
CLP$46,485.20
List Price:  CLP$65,083
You save:  CLP$18,597.80
CN¥354.33
List Price:  CN¥496.09
You save:  CN¥141.76
RD$2,899.21
List Price:  RD$4,059.13
You save:  RD$1,159.91
DA6,716.85
List Price:  DA9,404.13
You save:  DA2,687.28
FJ$112.23
List Price:  FJ$157.14
You save:  FJ$44.90
Q388.45
List Price:  Q543.86
You save:  Q155.41
GY$10,455.72
List Price:  GY$14,638.84
You save:  GY$4,183.12
ISK kr6,977.10
List Price:  ISK kr9,768.50
You save:  ISK kr2,791.40
DH500.96
List Price:  DH701.39
You save:  DH200.42
L885.56
List Price:  L1,239.86
You save:  L354.29
ден2,861.59
List Price:  ден4,006.46
You save:  ден1,144.86
MOP$402.29
List Price:  MOP$563.24
You save:  MOP$160.94
N$920.44
List Price:  N$1,288.69
You save:  N$368.25
C$1,839.55
List Price:  C$2,575.52
You save:  C$735.96
रु6,679.37
List Price:  रु9,351.66
You save:  रु2,672.28
S/186.27
List Price:  S/260.79
You save:  S/74.52
K193.32
List Price:  K270.67
You save:  K77.34
SAR187.48
List Price:  SAR262.50
You save:  SAR75.01
ZK1,358.11
List Price:  ZK1,901.47
You save:  ZK543.35
L231.01
List Price:  L323.43
You save:  L92.42
Kč1,161.35
List Price:  Kč1,625.98
You save:  Kč464.63
Ft18,056.25
List Price:  Ft25,280.20
You save:  Ft7,223.94
SEK kr542.25
List Price:  SEK kr759.20
You save:  SEK kr216.94
ARS$44,003.90
List Price:  ARS$61,608.98
You save:  ARS$17,605.08
Bs345.36
List Price:  Bs483.53
You save:  Bs138.17
COP$195,270.45
List Price:  COP$273,394.26
You save:  COP$78,123.80
₡25,568.20
List Price:  ₡35,797.53
You save:  ₡10,229.32
L1,234.61
List Price:  L1,728.55
You save:  L493.94
₲373,712.67
List Price:  ₲523,227.64
You save:  ₲149,514.97
$U1,909.55
List Price:  $U2,673.53
You save:  $U763.97
zł200.30
List Price:  zł280.44
You save:  zł80.13
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.