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
€47.51
List Price:  €66.52
You save:  €19
£39.57
List Price:  £55.40
You save:  £15.83
CA$69.83
List Price:  CA$97.77
You save:  CA$27.93
A$76.76
List Price:  A$107.48
You save:  A$30.71
S$67.19
List Price:  S$94.07
You save:  S$26.88
HK$389.07
List Price:  HK$544.73
You save:  HK$155.66
CHF 44.17
List Price:  CHF 61.85
You save:  CHF 17.67
NOK kr552.55
List Price:  NOK kr773.61
You save:  NOK kr221.06
DKK kr354.40
List Price:  DKK kr496.19
You save:  DKK kr141.78
NZ$85.21
List Price:  NZ$119.31
You save:  NZ$34.09
د.إ183.61
List Price:  د.إ257.07
You save:  د.إ73.46
৳5,978.91
List Price:  ৳8,370.95
You save:  ৳2,392.04
₹4,225.77
List Price:  ₹5,916.42
You save:  ₹1,690.64
RM223.20
List Price:  RM312.50
You save:  RM89.30
₦84,012.69
List Price:  ₦117,624.49
You save:  ₦33,611.80
₨13,908.54
List Price:  ₨19,473.08
You save:  ₨5,564.53
฿1,733.10
List Price:  ฿2,426.48
You save:  ฿693.38
₺1,727.24
List Price:  ₺2,418.28
You save:  ₺691.03
B$290.46
List Price:  B$406.67
You save:  B$116.21
R906.09
List Price:  R1,268.60
You save:  R362.51
Лв92.91
List Price:  Лв130.09
You save:  Лв37.17
₩70,046.43
List Price:  ₩98,070.61
You save:  ₩28,024.17
₪186.68
List Price:  ₪261.37
You save:  ₪74.69
₱2,952.60
List Price:  ₱4,133.88
You save:  ₱1,181.28
¥7,718.58
List Price:  ¥10,806.63
You save:  ¥3,088.05
MX$1,017.02
List Price:  MX$1,423.91
You save:  MX$406.89
QR182.44
List Price:  QR255.44
You save:  QR72.99
P683.49
List Price:  P956.94
You save:  P273.45
KSh6,461.20
List Price:  KSh9,046.20
You save:  KSh2,585
E£2,482.03
List Price:  E£3,475.04
You save:  E£993.01
ብር6,237.86
List Price:  ብር8,733.50
You save:  ብር2,495.64
Kz45,607.24
List Price:  Kz63,853.79
You save:  Kz18,246.54
CLP$48,681.26
List Price:  CLP$68,157.66
You save:  CLP$19,476.40
CN¥362.01
List Price:  CN¥506.84
You save:  CN¥144.83
RD$3,017.61
List Price:  RD$4,224.90
You save:  RD$1,207.28
DA6,678.15
List Price:  DA9,349.94
You save:  DA2,671.79
FJ$113.48
List Price:  FJ$158.89
You save:  FJ$45.40
Q386.23
List Price:  Q540.76
You save:  Q154.52
GY$10,467.47
List Price:  GY$14,655.30
You save:  GY$4,187.82
ISK kr6,913.61
List Price:  ISK kr9,679.61
You save:  ISK kr2,766
DH499.81
List Price:  DH699.78
You save:  DH199.96
L910.32
List Price:  L1,274.52
You save:  L364.20
ден2,923.74
List Price:  ден4,093.48
You save:  ден1,169.73
MOP$401.12
List Price:  MOP$561.60
You save:  MOP$160.48
N$907.46
List Price:  N$1,270.52
You save:  N$363.05
C$1,841.10
List Price:  C$2,577.69
You save:  C$736.58
रु6,753.23
List Price:  रु9,455.06
You save:  रु2,701.83
S/189.86
List Price:  S/265.82
You save:  S/75.96
K201.41
List Price:  K281.99
You save:  K80.58
SAR187.67
List Price:  SAR262.75
You save:  SAR75.08
ZK1,384.62
List Price:  ZK1,938.58
You save:  ZK553.95
L236.44
List Price:  L331.04
You save:  L94.59
Kč1,203.80
List Price:  Kč1,685.42
You save:  Kč481.62
Ft19,537.53
List Price:  Ft27,354.11
You save:  Ft7,816.57
SEK kr551.39
List Price:  SEK kr771.99
You save:  SEK kr220.60
ARS$50,126.56
List Price:  ARS$70,181.20
You save:  ARS$20,054.63
Bs346.46
List Price:  Bs485.08
You save:  Bs138.61
COP$220,634.58
List Price:  COP$308,906.07
You save:  COP$88,271.48
₡25,407.49
List Price:  ₡35,572.52
You save:  ₡10,165.02
L1,264.30
List Price:  L1,770.13
You save:  L505.82
₲391,827.47
List Price:  ₲548,589.81
You save:  ₲156,762.34
$U2,138.81
List Price:  $U2,994.50
You save:  $U855.69
zł206.57
List Price:  zł289.22
You save:  zł82.64
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.